diff --git a/DEPS b/DEPS index 269c3431..bb2c185 100644 --- a/DEPS +++ b/DEPS
@@ -96,11 +96,11 @@ # 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': 'fe2fa4bc83c5a2ffbc1be54ebbdece0db8473335', + 'catapult_revision': '49e3f62b24dae13614d03bf3ecad7f17ee010f62', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. - 'libfuzzer_revision': 'e6cbbd6ba1cd57e52cb3a237974c89911b08b5d7', + 'libfuzzer_revision': '78ee52d0c69db57fe0e984d252a991390e7d6c9b', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling devtools-node-modules # and whatever else without interference from each other.
diff --git a/WATCHLISTS b/WATCHLISTS index fd2f47b6..a8c6d11c 100644 --- a/WATCHLISTS +++ b/WATCHLISTS
@@ -553,6 +553,9 @@ 'ios_showcase': { 'filepath': 'ios/showcase', }, + 'ios_web': { + 'filepath': 'ios/web', + }, 'ipc': { 'filepath': 'ipc/ipc', }, @@ -1882,11 +1885,12 @@ 'ios_chrome': ['pkl@chromium.org', 'sdefresne+watch@chromium.org', 'noyau+watch@chromium.org', - 'marq+watch@chromium.org'], + 'marq+watch@chromium.org'], 'ios_clean': ['marq+scrutinize@chromium.org', 'lpromero+watch@chromium.org'], 'ios_showcase': ['marq+watch@chromium.org', 'lpromero+watch@chromium.org'], + 'ios_web': ['eugenebut@chromium.org'], 'ipc': ['darin-cc@chromium.org', 'jam@chromium.org'], 'libwebp': ['jzern@chromium.org',
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index 240be69..31534d0 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -1248,6 +1248,7 @@ "frame/caption_buttons/frame_size_button_unittest.cc", "host/ash_window_tree_host_x11_unittest.cc", "laser/laser_pointer_controller_unittest.cc", + "laser/laser_pointer_points_unittest.cc", "laser/laser_segment_utils_unittest.cc", "magnifier/magnification_controller_unittest.cc", "magnifier/partial_magnification_controller_unittest.cc",
diff --git a/ash/common/system/chromeos/ime_menu/ime_list_view.cc b/ash/common/system/chromeos/ime_menu/ime_list_view.cc index cf2b34a..b0c6591 100644 --- a/ash/common/system/chromeos/ime_menu/ime_list_view.cc +++ b/ash/common/system/chromeos/ime_menu/ime_list_view.cc
@@ -262,7 +262,8 @@ SingleImeBehavior single_ime_behavior) : TrayDetailsView(owner), last_item_selected_with_keyboard_(false), - should_focus_ime_after_selection_with_keyboard_(false) { + should_focus_ime_after_selection_with_keyboard_(false), + current_ime_view_(nullptr) { SystemTrayDelegate* delegate = WmShell::Get()->system_tray_delegate(); IMEInfoList list; delegate->GetAvailableIMEList(&list); @@ -307,8 +308,11 @@ SchedulePaint(); if (should_focus_ime_after_selection_with_keyboard_ && - last_item_selected_with_keyboard_) + last_item_selected_with_keyboard_) { FocusCurrentImeIfNeeded(); + } else if (current_ime_view_) { + scroll_content()->ScrollRectToVisible(current_ime_view_->bounds()); + } } void ImeListView::ResetImeListView() { @@ -316,10 +320,12 @@ Reset(); material_keyboard_status_view_ = nullptr; keyboard_status_ = nullptr; + current_ime_view_ = nullptr; } void ImeListView::CloseImeListView() { last_selected_item_id_.clear(); + current_ime_view_ = nullptr; last_item_selected_with_keyboard_ = false; GetWidget()->Close(); } @@ -359,6 +365,9 @@ scroll_content()->AddChildView(ime_view); ime_map_[ime_view] = list[i].id; + if (list[i].selected) + current_ime_view_ = ime_view; + // In material design, the property items will be added after the current // selected IME item. if (list[i].selected && !property_list.empty()) { @@ -446,6 +455,16 @@ } } +void ImeListView::VisibilityChanged(View* starting_from, bool is_visible) { + if (!is_visible || (should_focus_ime_after_selection_with_keyboard_ && + last_item_selected_with_keyboard_) || + !current_ime_view_) { + return; + } + + scroll_content()->ScrollRectToVisible(current_ime_view_->bounds()); +} + void ImeListView::FocusCurrentImeIfNeeded() { views::FocusManager* manager = GetFocusManager(); if (!manager || manager->GetFocusedView() || last_selected_item_id_.empty())
diff --git a/ash/common/system/chromeos/ime_menu/ime_list_view.h b/ash/common/system/chromeos/ime_menu/ime_list_view.h index 143337b..9a1c7f1 100644 --- a/ash/common/system/chromeos/ime_menu/ime_list_view.h +++ b/ash/common/system/chromeos/ime_menu/ime_list_view.h
@@ -59,6 +59,9 @@ void HandleButtonPressed(views::Button* sender, const ui::Event& event) override; + // views::View: + void VisibilityChanged(View* starting_from, bool is_visible) override; + private: // To allow the test class to access |ime_map_|. friend class ImeMenuTrayTest; @@ -103,6 +106,9 @@ // order to trigger spoken feedback with ChromeVox enabled. bool should_focus_ime_after_selection_with_keyboard_; + // The item view of the current selected IME. + views::View* current_ime_view_; + DISALLOW_COPY_AND_ASSIGN(ImeListView); };
diff --git a/ash/display/display_configuration_controller.cc b/ash/display/display_configuration_controller.cc index 1645345..d65cdbb6 100644 --- a/ash/display/display_configuration_controller.cc +++ b/ash/display/display_configuration_controller.cc
@@ -5,18 +5,15 @@ #include "ash/display/display_configuration_controller.h" #include "ash/display/display_animator.h" +#include "ash/display/display_animator_chromeos.h" #include "ash/display/display_util.h" #include "ash/rotator/screen_rotation_animator.h" #include "base/time/time.h" -#include "ui/display/display_layout.h" -#include "ui/display/manager/display_manager.h" - -#if defined(OS_CHROMEOS) -#include "ash/display/display_animator_chromeos.h" #include "chromeos/system/devicemode.h" #include "grit/ash_strings.h" #include "ui/base/l10n/l10n_util.h" -#endif +#include "ui/display/display_layout.h" +#include "ui/display/manager/display_manager.h" namespace { @@ -58,11 +55,9 @@ window_tree_host_manager_(window_tree_host_manager), weak_ptr_factory_(this) { window_tree_host_manager_->AddObserver(this); -#if defined(OS_CHROMEOS) if (chromeos::IsRunningAsSystemCompositor()) limiter_.reset(new DisplayChangeLimiter); display_animator_.reset(new DisplayAnimatorChromeOS()); -#endif } DisplayConfigurationController::~DisplayConfigurationController() { @@ -84,13 +79,11 @@ void DisplayConfigurationController::SetMirrorMode(bool mirror, bool user_action) { if (display_manager_->num_connected_displays() > 2) { -#if defined(OS_CHROMEOS) if (user_action) { ShowDisplayErrorNotification( l10n_util::GetStringUTF16(IDS_ASH_DISPLAY_MIRRORING_NOT_SUPPORTED), false); } -#endif return; } if (display_manager_->num_connected_displays() <= 1 ||
diff --git a/ash/display/display_util.cc b/ash/display/display_util.cc index b87ffce..3ff0753 100644 --- a/ash/display/display_util.cc +++ b/ash/display/display_util.cc
@@ -14,10 +14,12 @@ #include "ash/display/null_mouse_warp_controller.h" #include "ash/display/unified_mouse_warp_controller.h" #include "ash/host/ash_window_tree_host.h" +#include "ash/resources/vector_icons/vector_icons.h" #include "ash/shell.h" #include "base/memory/ptr_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" +#include "base/sys_info.h" #include "grit/ash_strings.h" #include "ui/aura/env.h" #include "ui/aura/window_tree_host.h" @@ -28,30 +30,23 @@ #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size_conversions.h" +#include "ui/gfx/paint_vector_icon.h" #include "ui/message_center/message_center.h" #include "ui/message_center/notification.h" #include "ui/message_center/notification_delegate.h" #include "ui/message_center/notification_list.h" #include "ui/wm/core/coordinate_conversion.h" -#if defined(OS_CHROMEOS) -#include "ash/resources/vector_icons/vector_icons.h" -#include "base/sys_info.h" -#include "ui/gfx/paint_vector_icon.h" -#endif - namespace ash { namespace { const char kDisplayErrorNotificationId[] = "chrome://settings/display/error"; -#if defined(OS_CHROMEOS) // TODO(glevin): These are for new MD vector icons, but are using pre-MD color // scheme. When we switch to all MD icons for notifications, these should be // updated to use MD color scheme. const SkColor kDisplayIconColor = SkColorSetRGB(0xBD, 0xBD, 0xBD); const SkColor kFeedbackIconColor = SkColorSetRGB(0x96, 0x96, 0x98); -#endif // A notification delegate that will start the feedback app when the notication // is clicked. @@ -172,7 +167,6 @@ } -#if defined(OS_CHROMEOS) void ShowDisplayErrorNotification(const base::string16& message, bool allow_feedback) { // Always remove the notification to make sure the notification appears @@ -203,7 +197,6 @@ message_center::MessageCenter::Get()->AddNotification( std::move(notification)); } -#endif base::string16 GetDisplayErrorNotificationMessageForTest() { message_center::NotificationList::Notifications notifications =
diff --git a/ash/display/display_util.h b/ash/display/display_util.h index eb217628..0f60738 100644 --- a/ash/display/display_util.h +++ b/ash/display/display_util.h
@@ -47,12 +47,10 @@ const gfx::Point& point_in_screen, bool update_last_location_now); -#if defined(OS_CHROMEOS) // Shows the notification message for display related issues, and optionally // adds a button to send a feedback report. void ShowDisplayErrorNotification(const base::string16& message, bool allow_feedback); -#endif ASH_EXPORT base::string16 GetDisplayErrorNotificationMessageForTest();
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index b0e2d24f..035ab953 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc
@@ -200,7 +200,6 @@ } #endif -#if defined(OS_CHROMEOS) if (display_manager->IsInUnifiedMode()) { host_info->ash_host->ConfineCursorToRootWindow(); AshWindowTreeHost* unified_ash_host = @@ -212,7 +211,6 @@ aura::client::SetScreenPositionClient(host->window(), screen_position_client_.get()); } -#endif aura::client::SetCaptureClient(host->window(), new NoneCaptureClient()); host->Show();
diff --git a/ash/laser/laser_pointer_controller_unittest.cc b/ash/laser/laser_pointer_controller_unittest.cc index 84818c7..8f2486a 100644 --- a/ash/laser/laser_pointer_controller_unittest.cc +++ b/ash/laser/laser_pointer_controller_unittest.cc
@@ -4,7 +4,6 @@ #include "ash/laser/laser_pointer_controller.h" #include "ash/laser/laser_pointer_controller_test_api.h" -#include "ash/laser/laser_pointer_points_test_api.h" #include "ash/laser/laser_pointer_view.h" #include "ash/shell.h" #include "ash/test/ash_test_base.h" @@ -13,24 +12,6 @@ namespace ash { namespace { -const int kTestPointsLifetimeSeconds = 5; - -// TODO(sammiequon): Move this test into a different file. See -// http://crbug.com/646953. -class LaserPointerPointsTest : public test::AshTestBase { - public: - LaserPointerPointsTest() - : points_(base::TimeDelta::FromSeconds(kTestPointsLifetimeSeconds)) {} - - ~LaserPointerPointsTest() override {} - - protected: - LaserPointerPoints points_; - - private: - DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTest); -}; - class LaserPointerControllerTest : public test::AshTestBase { public: LaserPointerControllerTest() {} @@ -57,96 +38,6 @@ } // namespace -// Tests that the laser pointers internal collection handles receiving points -// and that the functions are returning the expected output. -TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) { - EXPECT_TRUE(points_.IsEmpty()); - EXPECT_EQ(gfx::Rect(), points_.GetBoundingBox()); - const gfx::Point left(1, 1); - const gfx::Point bottom(1, 9); - const gfx::Point top_right(30, 0); - const gfx::Point last(2, 2); - points_.AddPoint(left); - EXPECT_EQ(gfx::Rect(1, 1, 0, 0), points_.GetBoundingBox()); - - // Should be the new bottom of the bounding box. - points_.AddPoint(bottom); - EXPECT_EQ(gfx::Rect(1, 1, 0, bottom.y() - 1), points_.GetBoundingBox()); - - // Should be the new top and right of the bounding box. - points_.AddPoint(top_right); - EXPECT_EQ(3, points_.GetNumberOfPoints()); - EXPECT_FALSE(points_.IsEmpty()); - EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(), - bottom.y() - top_right.y()), - points_.GetBoundingBox()); - - // Should not expand bounding box. - points_.AddPoint(last); - EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(), - bottom.y() - top_right.y()), - points_.GetBoundingBox()); - - // Points should be sorted in the order they are added. - EXPECT_EQ(left, points_.GetOldest().location); - EXPECT_EQ(last, points_.GetNewest().location); - - // Add a new point which will expand the bounding box. - gfx::Point new_left_bottom(0, 40); - points_.AddPoint(new_left_bottom); - EXPECT_EQ(5, points_.GetNumberOfPoints()); - EXPECT_EQ(gfx::Rect(new_left_bottom.x(), top_right.y(), - top_right.x() - new_left_bottom.x(), - new_left_bottom.y() - top_right.y()), - points_.GetBoundingBox()); - - // Verify clearing works. - points_.Clear(); - EXPECT_TRUE(points_.IsEmpty()); -} - -// Test the laser pointer points collection to verify that old points are -// removed. -TEST_F(LaserPointerPointsTest, LaserPointerInternalCollectionDeletion) { - LaserPointerPointsTestApi points_test_api_(&points_); - - // When a point older than kTestPointsLifetime (5 seconds) is added, it - // should get removed. The age of the point is a number between 0.0 and 1.0, - // with 0.0 specifying a newly added point and 1.0 specifying the age of a - // point added |kTestPointsLifetime| ago. - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); - EXPECT_EQ(1, points_test_api_.GetNumberOfPoints()); - EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(0).age); - - // Verify when we move forward in time by one second, the age of the last - // point, added one second ago is 1 / |kTestPointsLifetime|. - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); - EXPECT_EQ(2, points_test_api_.GetNumberOfPoints()); - EXPECT_FLOAT_EQ(0.2, points_test_api_.GetPointAtIndex(0).age); - EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(1).age); - // Verify adding a point 10 seconds later will clear all other points, since - // they are older than 5 seconds. - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(10)); - EXPECT_EQ(1, points_test_api_.GetNumberOfPoints()); - - // Verify adding 3 points one second apart each will add 3 points to the - // collection, since all 4 points are younger than 5 seconds. All 4 points are - // added 1 second apart so their age should be 0.2 apart. - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); - EXPECT_EQ(4, points_test_api_.GetNumberOfPoints()); - EXPECT_FLOAT_EQ(0.6, points_test_api_.GetPointAtIndex(0).age); - EXPECT_FLOAT_EQ(0.4, points_test_api_.GetPointAtIndex(1).age); - EXPECT_FLOAT_EQ(0.2, points_test_api_.GetPointAtIndex(2).age); - EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(3).age); - - // Verify adding 1 point three seconds later will remove 2 points which are - // older than 5 seconds. - points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(3)); - EXPECT_EQ(3, points_test_api_.GetNumberOfPoints()); -} - // Test to ensure the class responsible for drawing the laser pointer receives // points from stylus movements as expected. TEST_F(LaserPointerControllerTest, LaserPointerRenderer) {
diff --git a/ash/laser/laser_pointer_points_unittest.cc b/ash/laser/laser_pointer_points_unittest.cc new file mode 100644 index 0000000..a727cb8 --- /dev/null +++ b/ash/laser/laser_pointer_points_unittest.cc
@@ -0,0 +1,120 @@ +// 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 "ash/laser/laser_pointer_points.h" +#include "ash/laser/laser_pointer_points_test_api.h" +#include "ash/test/ash_test_base.h" +#include "ui/events/test/event_generator.h" + +namespace ash { +namespace { + +const int kTestPointsLifetimeSeconds = 5; + +class LaserPointerPointsTest : public test::AshTestBase { + public: + LaserPointerPointsTest() + : points_(base::TimeDelta::FromSeconds(kTestPointsLifetimeSeconds)) {} + + ~LaserPointerPointsTest() override {} + + protected: + LaserPointerPoints points_; + + private: + DISALLOW_COPY_AND_ASSIGN(LaserPointerPointsTest); +}; + +} // namespace + +// Tests that the laser pointers internal collection handles receiving points +// and that the functions are returning the expected output. +TEST_F(LaserPointerPointsTest, LaserPointerInternalCollection) { + EXPECT_TRUE(points_.IsEmpty()); + EXPECT_EQ(gfx::Rect(), points_.GetBoundingBox()); + const gfx::Point left(1, 1); + const gfx::Point bottom(1, 9); + const gfx::Point top_right(30, 0); + const gfx::Point last(2, 2); + points_.AddPoint(left); + EXPECT_EQ(gfx::Rect(1, 1, 0, 0), points_.GetBoundingBox()); + + // Should be the new bottom of the bounding box. + points_.AddPoint(bottom); + EXPECT_EQ(gfx::Rect(1, 1, 0, bottom.y() - 1), points_.GetBoundingBox()); + + // Should be the new top and right of the bounding box. + points_.AddPoint(top_right); + EXPECT_EQ(3, points_.GetNumberOfPoints()); + EXPECT_FALSE(points_.IsEmpty()); + EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(), + bottom.y() - top_right.y()), + points_.GetBoundingBox()); + + // Should not expand bounding box. + points_.AddPoint(last); + EXPECT_EQ(gfx::Rect(left.x(), top_right.y(), top_right.x() - left.x(), + bottom.y() - top_right.y()), + points_.GetBoundingBox()); + + // Points should be sorted in the order they are added. + EXPECT_EQ(left, points_.GetOldest().location); + EXPECT_EQ(last, points_.GetNewest().location); + + // Add a new point which will expand the bounding box. + gfx::Point new_left_bottom(0, 40); + points_.AddPoint(new_left_bottom); + EXPECT_EQ(5, points_.GetNumberOfPoints()); + EXPECT_EQ(gfx::Rect(new_left_bottom.x(), top_right.y(), + top_right.x() - new_left_bottom.x(), + new_left_bottom.y() - top_right.y()), + points_.GetBoundingBox()); + + // Verify clearing works. + points_.Clear(); + EXPECT_TRUE(points_.IsEmpty()); +} + +// Test the laser pointer points collection to verify that old points are +// removed. +TEST_F(LaserPointerPointsTest, LaserPointerInternalCollectionDeletion) { + LaserPointerPointsTestApi points_test_api_(&points_); + + // When a point older than kTestPointsLifetime (5 seconds) is added, it + // should get removed. The age of the point is a number between 0.0 and 1.0, + // with 0.0 specifying a newly added point and 1.0 specifying the age of a + // point added |kTestPointsLifetime| ago. + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); + EXPECT_EQ(1, points_test_api_.GetNumberOfPoints()); + EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(0).age); + + // Verify when we move forward in time by one second, the age of the last + // point, added one second ago is 1 / |kTestPointsLifetime|. + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); + EXPECT_EQ(2, points_test_api_.GetNumberOfPoints()); + EXPECT_FLOAT_EQ(0.2, points_test_api_.GetPointAtIndex(0).age); + EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(1).age); + // Verify adding a point 10 seconds later will clear all other points, since + // they are older than 5 seconds. + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(10)); + EXPECT_EQ(1, points_test_api_.GetNumberOfPoints()); + + // Verify adding 3 points one second apart each will add 3 points to the + // collection, since all 4 points are younger than 5 seconds. All 4 points are + // added 1 second apart so their age should be 0.2 apart. + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(1)); + EXPECT_EQ(4, points_test_api_.GetNumberOfPoints()); + EXPECT_FLOAT_EQ(0.6, points_test_api_.GetPointAtIndex(0).age); + EXPECT_FLOAT_EQ(0.4, points_test_api_.GetPointAtIndex(1).age); + EXPECT_FLOAT_EQ(0.2, points_test_api_.GetPointAtIndex(2).age); + EXPECT_FLOAT_EQ(0.0, points_test_api_.GetPointAtIndex(3).age); + + // Verify adding 1 point three seconds later will remove 2 points which are + // older than 5 seconds. + points_test_api_.MoveForwardInTime(base::TimeDelta::FromSeconds(3)); + EXPECT_EQ(3, points_test_api_.GetNumberOfPoints()); +} +} // namespace ash
diff --git a/base/allocator/partition_allocator/OWNERS b/base/allocator/partition_allocator/OWNERS index 8e7c87c1..374d1ae 100644 --- a/base/allocator/partition_allocator/OWNERS +++ b/base/allocator/partition_allocator/OWNERS
@@ -1,2 +1,5 @@ haraken@chromium.org palmer@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>MemoryAllocator
diff --git a/base/metrics/histogram.h b/base/metrics/histogram.h index 4500efcf..26a3ec8 100644 --- a/base/metrics/histogram.h +++ b/base/metrics/histogram.h
@@ -81,8 +81,7 @@ #include "base/macros.h" #include "base/metrics/bucket_ranges.h" #include "base/metrics/histogram_base.h" -#if defined(OS_ANDROID) || defined(OS_CHROMEOS) || defined(OS_IOS) || \ - defined(OS_WIN) +#if defined(OS_CHROMEOS) || defined(OS_IOS) || defined(OS_WIN) // TODO(asvitkine): Migrate callers to to include this directly and remove this. // Note: Incrementally migrating platforms as they become clean. #include "base/metrics/histogram_macros.h"
diff --git a/base/profiler/stack_sampling_profiler_unittest.cc b/base/profiler/stack_sampling_profiler_unittest.cc index 075d683..16205ac2 100644 --- a/base/profiler/stack_sampling_profiler_unittest.cc +++ b/base/profiler/stack_sampling_profiler_unittest.cc
@@ -6,12 +6,14 @@ #include <stdint.h> #include <cstdlib> +#include <memory> #include <utility> +#include <vector> #include "base/bind.h" #include "base/compiler_specific.h" #include "base/macros.h" -#include "base/memory/scoped_vector.h" +#include "base/memory/ptr_util.h" #include "base/message_loop/message_loop.h" #include "base/native_library.h" #include "base/path_service.h" @@ -889,25 +891,31 @@ params[1].samples_per_burst = 1; CallStackProfiles profiles[2]; - ScopedVector<WaitableEvent> sampling_completed; - ScopedVector<StackSamplingProfiler> profiler; + std::vector<std::unique_ptr<WaitableEvent>> sampling_completed(2); + std::vector<std::unique_ptr<StackSamplingProfiler>> profiler(2); for (int i = 0; i < 2; ++i) { - sampling_completed.push_back( - new WaitableEvent(WaitableEvent::ResetPolicy::AUTOMATIC, - WaitableEvent::InitialState::NOT_SIGNALED)); + sampling_completed[i] = + MakeUnique<WaitableEvent>(WaitableEvent::ResetPolicy::AUTOMATIC, + WaitableEvent::InitialState::NOT_SIGNALED); const StackSamplingProfiler::CompletedCallback callback = Bind(&SaveProfilesAndSignalEvent, Unretained(&profiles[i]), - Unretained(sampling_completed[i])); - profiler.push_back( - new StackSamplingProfiler(target_thread_id, params[i], callback)); + Unretained(sampling_completed[i].get())); + profiler[i] = MakeUnique<StackSamplingProfiler>(target_thread_id, + params[i], callback); } profiler[0]->Start(); profiler[1]->Start(); + std::vector<WaitableEvent*> sampling_completed_rawptrs( + sampling_completed.size()); + std::transform( + sampling_completed.begin(), sampling_completed.end(), + sampling_completed_rawptrs.begin(), + [](const std::unique_ptr<WaitableEvent>& elem) { return elem.get(); }); // Wait for one profiler to finish. size_t completed_profiler = - WaitableEvent::WaitMany(&sampling_completed[0], 2); + WaitableEvent::WaitMany(sampling_completed_rawptrs.data(), 2); EXPECT_EQ(1u, profiles[completed_profiler].size()); size_t other_profiler = 1 - completed_profiler;
diff --git a/base/threading/thread_perftest.cc b/base/threading/thread_perftest.cc index 1df1388..ef4e8f715 100644 --- a/base/threading/thread_perftest.cc +++ b/base/threading/thread_perftest.cc
@@ -4,11 +4,14 @@ #include <stddef.h> +#include <memory> +#include <vector> + #include "base/base_switches.h" #include "base/bind.h" #include "base/command_line.h" #include "base/location.h" -#include "base/memory/scoped_vector.h" +#include "base/memory/ptr_util.h" #include "base/single_thread_task_runner.h" #include "base/strings/stringprintf.h" #include "base/synchronization/condition_variable.h" @@ -59,11 +62,11 @@ done->Signal(); } - base::ThreadTicks ThreadNow(base::Thread* thread) { + base::ThreadTicks ThreadNow(const base::Thread& thread) { base::WaitableEvent done(WaitableEvent::ResetPolicy::AUTOMATIC, WaitableEvent::InitialState::NOT_SIGNALED); base::ThreadTicks ticks; - thread->task_runner()->PostTask( + thread.task_runner()->PostTask( FROM_HERE, base::Bind(&ThreadPerfTest::TimeOnThread, base::Unretained(this), &ticks, &done)); done.Wait(); @@ -74,10 +77,10 @@ // Create threads and collect starting cpu-time for each thread. std::vector<base::ThreadTicks> thread_starts; while (threads_.size() < num_threads) { - threads_.push_back(new base::Thread("PingPonger")); + threads_.push_back(MakeUnique<base::Thread>("PingPonger")); threads_.back()->Start(); if (base::ThreadTicks::IsSupported()) - thread_starts.push_back(ThreadNow(threads_.back())); + thread_starts.push_back(ThreadNow(*threads_.back())); } Init(); @@ -92,7 +95,7 @@ base::TimeDelta thread_time; while (threads_.size()) { if (base::ThreadTicks::IsSupported()) { - thread_time += ThreadNow(threads_.back()) - thread_starts.back(); + thread_time += ThreadNow(*threads_.back()) - thread_starts.back(); thread_starts.pop_back(); } threads_.pop_back(); @@ -117,7 +120,7 @@ protected: void FinishMeasurement() { done_.Signal(); } - ScopedVector<base::Thread> threads_; + std::vector<std::unique_ptr<base::Thread>> threads_; private: base::WaitableEvent done_; @@ -126,7 +129,7 @@ // Class to test task performance by posting empty tasks back and forth. class TaskPerfTest : public ThreadPerfTest { base::Thread* NextThread(int count) { - return threads_[count % threads_.size()]; + return threads_[count % threads_.size()].get(); } void PingPong(int hops) override { @@ -181,9 +184,9 @@ public: void Init() override { for (size_t i = 0; i < threads_.size(); i++) { - events_.push_back( - new WaitableEventType(WaitableEvent::ResetPolicy::AUTOMATIC, - WaitableEvent::InitialState::NOT_SIGNALED)); + events_.push_back(MakeUnique<WaitableEventType>( + WaitableEvent::ResetPolicy::AUTOMATIC, + WaitableEvent::InitialState::NOT_SIGNALED)); } } @@ -216,7 +219,7 @@ } int remaining_hops_; - ScopedVector<WaitableEventType> events_; + std::vector<std::unique_ptr<WaitableEventType>> events_; }; // Similar to the task posting test, this just tests similar functionality
diff --git a/base/trace_event/trace_buffer.cc b/base/trace_event/trace_buffer.cc index d40f430..e26e9fd 100644 --- a/base/trace_event/trace_buffer.cc +++ b/base/trace_event/trace_buffer.cc
@@ -168,7 +168,8 @@ // have to add the metadata events and flush thread-local buffers even if // the buffer is full. *index = chunks_.size(); - chunks_.push_back(NULL); // Put NULL in the slot of a in-flight chunk. + // Put nullptr in the slot of a in-flight chunk. + chunks_.push_back(nullptr); ++in_flight_chunk_count_; // + 1 because zero chunk_seq is not allowed. return std::unique_ptr<TraceBufferChunk>( @@ -181,7 +182,7 @@ DCHECK_LT(index, chunks_.size()); DCHECK(!chunks_[index]); --in_flight_chunk_count_; - chunks_[index] = chunk.release(); + chunks_[index] = std::move(chunk); } bool IsFull() const override { return chunks_.size() >= max_chunks_; } @@ -198,7 +199,7 @@ TraceEvent* GetEventByHandle(TraceEventHandle handle) override { if (handle.chunk_index >= chunks_.size()) return NULL; - TraceBufferChunk* chunk = chunks_[handle.chunk_index]; + TraceBufferChunk* chunk = chunks_[handle.chunk_index].get(); if (!chunk || chunk->seq() != handle.chunk_seq) return NULL; return chunk->GetEventAt(handle.event_index); @@ -207,7 +208,7 @@ const TraceBufferChunk* NextChunk() override { while (current_iteration_index_ < chunks_.size()) { // Skip in-flight chunks. - const TraceBufferChunk* chunk = chunks_[current_iteration_index_++]; + const TraceBufferChunk* chunk = chunks_[current_iteration_index_++].get(); if (chunk) return chunk; } @@ -223,7 +224,7 @@ overhead->Add("TraceBufferVector", chunks_ptr_vector_allocated_size, chunks_ptr_vector_resident_size); for (size_t i = 0; i < chunks_.size(); ++i) { - TraceBufferChunk* chunk = chunks_[i]; + TraceBufferChunk* chunk = chunks_[i].get(); // Skip the in-flight (nullptr) chunks. They will be accounted by the // per-thread-local dumpers, see ThreadLocalEventBuffer::OnMemoryDump. if (chunk) @@ -235,7 +236,7 @@ size_t in_flight_chunk_count_; size_t current_iteration_index_; size_t max_chunks_; - ScopedVector<TraceBufferChunk> chunks_; + std::vector<std::unique_ptr<TraceBufferChunk>> chunks_; DISALLOW_COPY_AND_ASSIGN(TraceBufferVector); };
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index b7778b41..debacd75 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc
@@ -3957,18 +3957,12 @@ const int layer_id = tree->LayerIdByElementId(element_id); PropertyTrees* property_trees = tree->property_trees(); - DCHECK(property_trees->IsInIdToIndexMap(PropertyTrees::TreeType::SCROLL, - layer_id)); - DCHECK_EQ( - 1u, property_trees->element_id_to_transform_node_index.count(element_id)); - int transform_node_index = - property_trees->element_id_to_transform_node_index[element_id]; DCHECK_EQ(1u, property_trees->element_id_to_scroll_node_index.count(element_id)); const int scroll_node_index = property_trees->element_id_to_scroll_node_index[element_id]; property_trees->scroll_tree.OnScrollOffsetAnimated( - layer_id, transform_node_index, scroll_node_index, scroll_offset, tree); + layer_id, scroll_node_index, scroll_offset, tree); // Run mutation callbacks to respond to updated scroll offset. Mutate(CurrentBeginFrameArgs().frame_time); }
diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc index 45679f9..ee90aa87 100644 --- a/cc/trees/property_tree.cc +++ b/cc/trees/property_tree.cc
@@ -1206,7 +1206,6 @@ } void ScrollTree::OnScrollOffsetAnimated(int layer_id, - int transform_tree_index, int scroll_tree_index, const gfx::ScrollOffset& scroll_offset, LayerTreeImpl* layer_tree_impl) {
diff --git a/cc/trees/property_tree.h b/cc/trees/property_tree.h index 0e76e0f..e8038e6 100644 --- a/cc/trees/property_tree.h +++ b/cc/trees/property_tree.h
@@ -365,7 +365,6 @@ gfx::ScrollOffset MaxScrollOffset(int scroll_node_id) const; void OnScrollOffsetAnimated(int layer_id, - int transform_tree_index, int scroll_tree_index, const gfx::ScrollOffset& scroll_offset, LayerTreeImpl* layer_tree_impl);
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java index e9c7e3c..66bc203 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java
@@ -2315,7 +2315,7 @@ assertNotSame(cvc2, cvc3); // Closing the Panel should destroy the Content. - tapBasePageToClosePanel(); + closePanel(); assertNoContentViewCore(); assertEquals(3, mFakeServer.getLoadedUrlCount()); } @@ -2465,7 +2465,7 @@ assertNotSame(url2, url3); // Close the Panel without seeing any Content. - tapBasePageToClosePanel(); + closePanel(); // Now check that all three URLs have been removed from history. assertEquals(3, mFakeServer.getLoadedUrlCount());
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index ef3f217..b6059e3 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -517,6 +517,12 @@ <message name="IDS_SETTINGS_BLUETOOTH_CONFIRM_PASSKEY" desc="Bluetooth pairing message typically shown when pairing with a device that has a display."> Please confirm this passkey is shown on "<ph name="DEVICE_NAME">$1<ex>Nexus S</ex></ph>": </message> + <message name="IDS_SETTINGS_BLUETOOTH_CONNECTED" desc="In Bluetooth device list, this label is shown below a device which is already connected."> + Connected + </message> + <message name="IDS_SETTINGS_BLUETOOTH_NOT_CONNECTED" desc="In Bluetooth device list, this label is shown below a device which is not connected."> + Not connected + </message> <message name="IDS_SETTINGS_BLUETOOTH_CONNECTING"> Connecting... </message>
diff --git a/chrome/browser/browser_resources.grd b/chrome/browser/browser_resources.grd index 0f90bde..e96d230b 100644 --- a/chrome/browser/browser_resources.grd +++ b/chrome/browser/browser_resources.grd
@@ -405,6 +405,8 @@ file="resources\print_preview\images\printer.png" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED" file="resources\print_preview\images\printer_shared.png" type="BINDATA" /> + <include name="IDR_PRINT_PREVIEW_IMAGES_ENTERPRISE_PRINTER" + file="../../ui/webui/resources/images/business.svg" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_IMAGES_GOOGLE_DOC" file="resources\print_preview\images\google_doc.png" type="BINDATA" /> <include name="IDR_PRINT_PREVIEW_IMAGES_PDF"
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 0e25e8ef..1064a60 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -515,6 +515,24 @@ return true; } +// Handles the rewriting of the new tab page URL based on group policy. +bool HandleNewTabPageLocationOverride( + GURL* url, + content::BrowserContext* browser_context) { + if (!url->SchemeIs(content::kChromeUIScheme) || + url->host() != chrome::kChromeUINewTabHost) + return false; + + Profile* profile = Profile::FromBrowserContext(browser_context); + std::string ntp_location = + profile->GetPrefs()->GetString(prefs::kNewTabPageLocationOverride); + if (ntp_location.empty()) + return false; + + *url = GURL(ntp_location); + return true; +} + // Handles rewriting Web UI URLs. bool HandleWebUI(GURL* url, content::BrowserContext* browser_context) { // Do not handle special URLs such as "about:foo" @@ -2557,6 +2575,11 @@ handler->AddHandlerPair(&WillHandleBrowserAboutURL, BrowserURLHandler::null_handler()); + // The group policy NTP URL handler must be registered before the other NTP + // URL handlers below. + handler->AddHandlerPair(&HandleNewTabPageLocationOverride, + BrowserURLHandler::null_handler()); + #if defined(OS_ANDROID) // Handler to rewrite chrome://newtab on Android. handler->AddHandlerPair(&chrome::android::HandleAndroidNativePageURL,
diff --git a/chrome/browser/chrome_content_browser_client_browsertest.cc b/chrome/browser/chrome_content_browser_client_browsertest.cc index 36b0559..4377d8f 100644 --- a/chrome/browser/chrome_content_browser_client_browsertest.cc +++ b/chrome/browser/chrome_content_browser_client_browsertest.cc
@@ -5,11 +5,15 @@ #include "base/command_line.h" #include "base/macros.h" #include "build/build_config.h" +#include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" #include "chrome/browser/ui/tabs/tab_strip_model.h" #include "chrome/common/chrome_switches.h" +#include "chrome/common/pref_names.h" +#include "chrome/common/url_constants.h" #include "chrome/test/base/in_process_browser_test.h" #include "chrome/test/base/ui_test_utils.h" +#include "components/prefs/pref_service.h" #include "content/public/browser/navigation_controller.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/web_contents.h" @@ -74,6 +78,30 @@ } IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, + UberURLHandler_NewTabPageOverride) { + PrefService* prefs = browser()->profile()->GetPrefs(); + static const char kOverrideUrl[] = "http://override.com"; + prefs->SetString(prefs::kNewTabPageLocationOverride, kOverrideUrl); + const GURL ntp_url(chrome::kChromeUINewTabURL); + + ui_test_utils::NavigateToURL(browser(), ntp_url); + NavigationEntry* entry = GetLastCommittedEntry(); + + ASSERT_TRUE(entry != NULL); + EXPECT_TRUE(entry->GetVirtualURL().is_valid()); + EXPECT_EQ(GURL(kOverrideUrl), entry->GetVirtualURL()); + + prefs->SetString(prefs::kNewTabPageLocationOverride, ""); + + ui_test_utils::NavigateToURL(browser(), ntp_url); + entry = GetLastCommittedEntry(); + + ASSERT_TRUE(entry != NULL); + EXPECT_TRUE(entry->GetVirtualURL().is_valid()); + EXPECT_EQ(ntp_url, entry->GetVirtualURL()); +} + +IN_PROC_BROWSER_TEST_F(ChromeContentBrowserClientBrowserTest, UberURLHandler_EmptyHost) { const GURL url("chrome://chrome//foo");
diff --git a/chrome/browser/chrome_content_browser_manifest_overlay.json b/chrome/browser/chrome_content_browser_manifest_overlay.json index dc94551..b338e51b 100644 --- a/chrome/browser/chrome_content_browser_manifest_overlay.json +++ b/chrome/browser/chrome_content_browser_manifest_overlay.json
@@ -60,6 +60,7 @@ "autofill::mojom::PasswordManagerDriver", "blink::mojom::ShareService", "bluetooth::mojom::AdapterFactory", + "chrome::mojom::PrerenderCanceler", "device::usb::ChooserService", "device::usb::DeviceManager", "contextual_search::mojom::ContextualSearchJsApiService",
diff --git a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc index 542cd27..f22da18 100644 --- a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc +++ b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.cc
@@ -7,6 +7,7 @@ #include "ash/shell.h" #include "ash/touch/ash_touch_transform_controller.h" #include "base/memory/ptr_util.h" +#include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_view.h" #include "ui/display/screen.h" #include "ui/events/event.h" @@ -33,8 +34,11 @@ } void TouchCalibratorController::StartCalibration( - const display::Display& target_display) { + const display::Display& target_display, + const TouchCalibratorController::TouchCalibrationCallback& callback) { is_calibrating_ = true; + callback_ = callback; + ash::Shell::GetInstance()->window_tree_host_manager()->AddObserver(this); target_display_ = target_display; @@ -64,6 +68,7 @@ if (!is_calibrating_) return; is_calibrating_ = false; + ash::Shell::GetInstance()->window_tree_host_manager()->RemoveObserver(this); ash::Shell::GetInstance()->touch_transformer_controller()->SetForCalibration( @@ -76,6 +81,12 @@ // exit. for (const auto& it : touch_calibrator_views_) it.second->SkipToFinalState(); + + if (callback_) { + base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, + base::Bind(callback_, false)); + callback_.Reset(); + } } // ui::EventHandler: @@ -85,6 +96,7 @@ // Detect ESC key press. if (key->type() == ui::ET_KEY_PRESSED && key->key_code() == ui::VKEY_ESCAPE) StopCalibration(); + key->StopPropagation(); } @@ -104,6 +116,11 @@ // calibration. if (target_screen_calibration_view->state() == TouchCalibratorView::CALIBRATION_COMPLETE) { + if (callback_) { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback_, true)); + callback_.Reset(); + } StopCalibration(); ash::Shell::GetInstance()->display_manager()->SetTouchCalibrationData( target_display_.id(), touch_point_quad_,
diff --git a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h index 4f51cd4..ffa0ab5 100644 --- a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h +++ b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller.h
@@ -31,6 +31,7 @@ public: using CalibrationPointPairQuad = display::TouchCalibrationData::CalibrationPointPairQuad; + using TouchCalibrationCallback = base::Callback<void(bool)>; static const base::TimeDelta kTouchIntervalThreshold; @@ -45,7 +46,8 @@ void OnDisplayConfigurationChanged() override; // Starts the calibration process for the given |target_display|. - void StartCalibration(const display::Display& target_display); + void StartCalibration(const display::Display& target_display, + const TouchCalibrationCallback& callback); // Stops any ongoing calibration process. void StopCalibration(); @@ -78,6 +80,9 @@ // touch input point pairs that will be used for calibration. CalibrationPointPairQuad touch_point_quad_; + // A callback to be called when touch calibration completes. + TouchCalibrationCallback callback_; + DISALLOW_COPY_AND_ASSIGN(TouchCalibratorController); };
diff --git a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc index 080e208..6e3b8417 100644 --- a/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc +++ b/chrome/browser/chromeos/display/touch_calibrator/touch_calibrator_controller_unittest.cc
@@ -44,7 +44,9 @@ EXPECT_FALSE(ctrl->is_calibrating()); EXPECT_FALSE(!!ctrl->touch_calibrator_views_.size()); - ctrl->StartCalibration(target_display); + TouchCalibratorController::TouchCalibrationCallback empty_callback; + + ctrl->StartCalibration(target_display, empty_callback); EXPECT_TRUE(ctrl->is_calibrating()); // There should be a touch calibrator view associated with each of the
diff --git a/chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc b/chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc index 4b02a745..11ec115 100644 --- a/chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc +++ b/chrome/browser/chromeos/printing/printer_pref_manager_unittest.cc
@@ -47,6 +47,7 @@ auto printers = manager->GetPrinters(); ASSERT_EQ(1U, printers.size()); EXPECT_EQ(kPrinterId, printers[0]->id()); + EXPECT_EQ(Printer::Source::SRC_USER_PREFS, printers[0]->source()); } TEST(PrinterPrefManagerTest, UpdatePrinterAssignsId) { @@ -132,6 +133,7 @@ ASSERT_EQ(2U, printers.size()); EXPECT_EQ("Color Laser", printers[0]->display_name()); EXPECT_EQ("ipp://192.168.1.5", printers[1]->uri()); + EXPECT_EQ(Printer::Source::SRC_POLICY, printers[1]->source()); } TEST(PrinterPrefManagerTest, GetRecommendedPrinter) {
diff --git a/chrome/browser/download/download_target_determiner.cc b/chrome/browser/download/download_target_determiner.cc index 95ea343..8949f08 100644 --- a/chrome/browser/download/download_target_determiner.cc +++ b/chrome/browser/download/download_target_determiner.cc
@@ -596,6 +596,10 @@ DCHECK(!virtual_path_.empty()); next_state_ = STATE_CHECK_VISITED_REFERRER_BEFORE; + // If user has validated a dangerous download, don't check. + if (danger_type_ == content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED) + return CONTINUE; + delegate_->CheckDownloadUrl( download_, virtual_path_,
diff --git a/chrome/browser/download/download_target_determiner_unittest.cc b/chrome/browser/download/download_target_determiner_unittest.cc index 9cec6ef..68585ab 100644 --- a/chrome/browser/download/download_target_determiner_unittest.cc +++ b/chrome/browser/download/download_target_determiner_unittest.cc
@@ -1912,6 +1912,44 @@ } } +// Test that a user validated download won't be treated as dangerous. +TEST_F(DownloadTargetDeterminerTest, ResumedWithUserValidatedDownload) { + const base::FilePath::CharType kInitialPath[] = + FILE_PATH_LITERAL("some_path/bar.txt"); + const base::FilePath::CharType* kIntermediatePath = + FILE_PATH_LITERAL("foo.crx.crdownload"); + + const DownloadTestCase kUserValidatedTestCase = { + AUTOMATIC, + content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED, + DownloadFileType::NOT_DANGEROUS, + "http://example.com/foo.crx", + "", + FILE_PATH_LITERAL(""), + FILE_PATH_LITERAL("foo.crx"), + DownloadItem::TARGET_DISPOSITION_OVERWRITE, + EXPECT_CRDOWNLOAD}; + + const DownloadTestCase& test_case = kUserValidatedTestCase; + std::unique_ptr<content::MockDownloadItem> item( + CreateActiveDownloadItem(0, test_case)); + base::FilePath expected_path = + GetPathInDownloadDir(test_case.expected_local_path); + ON_CALL(*item.get(), GetDangerType()) + .WillByDefault(Return(content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED)); + ON_CALL(*item.get(), GetFullPath()) + .WillByDefault(ReturnRefOfCopy(GetPathInDownloadDir(kIntermediatePath))); + ON_CALL(*item.get(), GetLastReason()) + .WillByDefault(Return(content::DOWNLOAD_INTERRUPT_REASON_NETWORK_FAILED)); + EXPECT_CALL(*delegate(), NotifyExtensions(_, _, _)); + EXPECT_CALL(*delegate(), ReserveVirtualPath(_, expected_path, false, _, _)); + EXPECT_CALL(*delegate(), PromptUserForDownloadPath(_, expected_path, _)) + .Times(0); + EXPECT_CALL(*delegate(), DetermineLocalPath(_, expected_path, _)); + EXPECT_CALL(*delegate(), CheckDownloadUrl(_, expected_path, _)).Times(0); + RunTestCase(test_case, GetPathInDownloadDir(kInitialPath), item.get()); +} + #if BUILDFLAG(ENABLE_PLUGINS) void DummyGetPluginsCallback(
diff --git a/chrome/browser/extensions/display_info_provider_chromeos.cc b/chrome/browser/extensions/display_info_provider_chromeos.cc index b8f3924..aba27aa2 100644 --- a/chrome/browser/extensions/display_info_provider_chromeos.cc +++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
@@ -9,6 +9,7 @@ #include "ash/display/display_configuration_controller.h" #include "ash/display/resolution_notification_controller.h" #include "ash/shell.h" +#include "ash/touch/ash_touch_transform_controller.h" #include "base/strings/string_number_conversions.h" #include "chrome/browser/chromeos/display/display_preferences.h" #include "chrome/browser/chromeos/display/overscan_calibrator.h" @@ -408,6 +409,33 @@ } // namespace +// static +const char DisplayInfoProviderChromeOS:: + kCustomTouchCalibrationInProgressError[] = + "Another custom touch calibration already under progress."; + +// static +const char DisplayInfoProviderChromeOS:: + kCompleteCalibrationCalledBeforeStartError[] = + "system.display.completeCustomTouchCalibration called before " + "system.display.startCustomTouchCalibration before."; + +// static +const char DisplayInfoProviderChromeOS::kTouchBoundsNegativeError[] = + "Bounds cannot have negative values."; + +// static +const char DisplayInfoProviderChromeOS::kTouchCalibrationPointsNegativeError[] = + "Display points and touch points cannot have negative coordinates"; + +// static +const char DisplayInfoProviderChromeOS::kTouchCalibrationPointsTooLargeError[] = + "Display point coordinates cannot be more than size of the display."; + +// static +const char DisplayInfoProviderChromeOS::kNativeTouchCalibrationActiveError[] = + "Another touch calibration is already active."; + DisplayInfoProviderChromeOS::DisplayInfoProviderChromeOS() {} DisplayInfoProviderChromeOS::~DisplayInfoProviderChromeOS() {} @@ -660,12 +688,16 @@ return true; } -bool DisplayInfoProviderChromeOS::TouchCalibrationSet( - const std::string& id, - const api::system_display::TouchCalibrationPairQuad& pairs, - const api::system_display::Bounds& bounds, - std::string* error) { - VLOG(1) << "TouchCalibrationSet: " << id; +bool DisplayInfoProviderChromeOS::ShowNativeTouchCalibration( + const std::string& id, std::string* error, + const DisplayInfoProvider::TouchCalibrationCallback& callback) { + VLOG(1) << "StartNativeTouchCalibration: " << id; + + // If a custom calibration is already running, then throw an error. + if (custom_touch_calibration_active_) { + *error = kCustomTouchCalibrationInProgressError; + return false; + } const display::Display display = GetDisplay(id); if (!ValidateParamsForTouchCalibration(id, display, GetTouchCalibrator(), @@ -673,6 +705,54 @@ return false; } + GetTouchCalibrator()->StartCalibration(display, callback); + return true; +} + +bool DisplayInfoProviderChromeOS::StartCustomTouchCalibration( + const std::string& id, + std::string* error) { + VLOG(1) << "StartCustomTouchCalibration: " << id; + const display::Display display = GetDisplay(id); + if (!ValidateParamsForTouchCalibration(id, display, GetTouchCalibrator(), + error)) { + return false; + } + + touch_calibration_target_id_ = id; + custom_touch_calibration_active_ = true; + + // Enable un-transformed touch input. + ash::Shell::GetInstance()->touch_transformer_controller()->SetForCalibration( + true); + return true; +} + +bool DisplayInfoProviderChromeOS::CompleteCustomTouchCalibration( + const api::system_display::TouchCalibrationPairQuad& pairs, + const api::system_display::Bounds& bounds, + std::string* error) { + VLOG(1) << "CompleteCustomTouchCalibration: " << touch_calibration_target_id_; + + ash::Shell::GetInstance()->touch_transformer_controller()->SetForCalibration( + false); + + const display::Display display = GetDisplay(touch_calibration_target_id_); + touch_calibration_target_id_.clear(); + + // If Complete() is called before calling Start(), throw an error. + if (!custom_touch_calibration_active_) { + *error = kCompleteCalibrationCalledBeforeStartError; + return false; + } + + custom_touch_calibration_active_ = false; + + if (!ValidateParamsForTouchCalibration( + touch_calibration_target_id_, display, GetTouchCalibrator(), error)) { + return false; + } + display::TouchCalibrationData::CalibrationPointPairQuad calibration_points; calibration_points[0] = GetCalibrationPair(pairs.pair1); calibration_points[1] = GetCalibrationPair(pairs.pair2); @@ -681,7 +761,7 @@ // The display bounds cannot have negative values. if (bounds.width < 0 || bounds.height < 0) { - *error = "Bounds cannot have negative values."; + *error = kTouchBoundsNegativeError; return false; } @@ -691,15 +771,13 @@ calibration_points[row].first.y() < 0 || calibration_points[row].second.x() < 0 || calibration_points[row].second.y() < 0) { - *error = "Display points and touch points cannot have negative " - "coordinates"; + *error = kTouchCalibrationPointsNegativeError; return false; } // Coordinates for display points cannot be greater than the screen bounds. if (calibration_points[row].first.x() > bounds.width || calibration_points[row].first.y() > bounds.height) { - *error = "Display point coordinates cannot be more than size of the " - "display."; + *error = kTouchCalibrationPointsTooLargeError; return false; } } @@ -710,7 +788,7 @@ return true; } -bool DisplayInfoProviderChromeOS::TouchCalibrationReset(const std::string& id, +bool DisplayInfoProviderChromeOS::ClearTouchCalibration(const std::string& id, std::string* error) { const display::Display display = GetDisplay(id); @@ -724,9 +802,11 @@ return true; } -bool DisplayInfoProviderChromeOS::IsTouchCalibrationActive(std::string* error) { +bool DisplayInfoProviderChromeOS::IsNativeTouchCalibrationActive( + std::string* error) { + // If native touch calibration UX is active, set error and return false. if (GetTouchCalibrator()->is_calibrating()) { - *error = "Another touch calibration is already active."; + *error = kNativeTouchCalibrationActiveError; return true; } return false;
diff --git a/chrome/browser/extensions/display_info_provider_chromeos.h b/chrome/browser/extensions/display_info_provider_chromeos.h index 85caebc..b84b04a7 100644 --- a/chrome/browser/extensions/display_info_provider_chromeos.h +++ b/chrome/browser/extensions/display_info_provider_chromeos.h
@@ -20,6 +20,13 @@ class DisplayInfoProviderChromeOS : public DisplayInfoProvider { public: + static const char kCustomTouchCalibrationInProgressError[]; + static const char kCompleteCalibrationCalledBeforeStartError[]; + static const char kTouchBoundsNegativeError[]; + static const char kTouchCalibrationPointsNegativeError[]; + static const char kTouchCalibrationPointsTooLargeError[]; + static const char kNativeTouchCalibrationActiveError[]; + DisplayInfoProviderChromeOS(); ~DisplayInfoProviderChromeOS() override; @@ -40,14 +47,18 @@ const api::system_display::Insets& delta) override; bool OverscanCalibrationReset(const std::string& id) override; bool OverscanCalibrationComplete(const std::string& id) override; - bool TouchCalibrationSet( - const std::string& id, + bool ShowNativeTouchCalibration( + const std::string& id, std::string* error, + const TouchCalibrationCallback& callback) override; + bool StartCustomTouchCalibration(const std::string& id, + std::string* error) override; + bool CompleteCustomTouchCalibration( const api::system_display::TouchCalibrationPairQuad& pairs, const api::system_display::Bounds& bounds, std::string* error) override; - bool TouchCalibrationReset(const std::string& id, + bool ClearTouchCalibration(const std::string& id, std::string* error) override; - bool IsTouchCalibrationActive(std::string* error) override; + bool IsNativeTouchCalibrationActive(std::string* error) override; private: chromeos::TouchCalibratorController* GetTouchCalibrator(); @@ -59,6 +70,9 @@ std::unique_ptr<chromeos::TouchCalibratorController> touch_calibrator_; + std::string touch_calibration_target_id_; + bool custom_touch_calibration_active_ = false; + DISALLOW_COPY_AND_ASSIGN(DisplayInfoProviderChromeOS); };
diff --git a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc b/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc index efb4524..f744840 100644 --- a/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc +++ b/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
@@ -15,6 +15,7 @@ #include "base/macros.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" +#include "chrome/browser/extensions/display_info_provider_chromeos.h" #include "extensions/common/api/system_display.h" #include "ui/display/display.h" #include "ui/display/display_layout.h" @@ -1196,7 +1197,7 @@ EXPECT_TRUE(active_mode->IsEquivalent(other_mode_ash)); } -TEST_F(DisplayInfoProviderChromeosTest, SetTouchCalibrationInternal) { +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationInternal) { UpdateDisplay("1200x600,600x1000*2"); const int64_t internal_display_id = display::test::DisplayManagerTestApi( @@ -1205,23 +1206,35 @@ std::string id = base::Int64ToString(internal_display_id); - api::system_display::TouchCalibrationPairQuad pairs; - api::system_display::Bounds bounds; - - bool success = false; std::string error; std::string expected_err = "Display Id(" + id + ") is an internal display." + " Internal displays cannot be calibrated for touch."; - - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + bool success = DisplayInfoProvider::Get()->StartCustomTouchCalibration( + id, &error); ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); } -TEST_F(DisplayInfoProviderChromeosTest, SetTouchCalibrationNonTouchDisplay) { +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationWithoutStart) { + UpdateDisplay("1200x600,600x1000*2"); + + api::system_display::TouchCalibrationPairQuad pairs; + api::system_display::Bounds bounds; + + std::string error; + std::string expected_err = + DisplayInfoProviderChromeOS::kCompleteCalibrationCalledBeforeStartError; + bool success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); + + ASSERT_FALSE(success); + EXPECT_EQ(expected_err, error); +} + + +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationNonTouchDisplay) { UpdateDisplay("1200x600,600x1000*2"); const int64_t internal_display_id = @@ -1243,21 +1256,17 @@ std::string id = base::Int64ToString(display_id); - api::system_display::TouchCalibrationPairQuad pairs; - api::system_display::Bounds bounds; - - bool success = false; std::string error; std::string expected_err = "Display Id(" + id + ") does not support touch."; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + bool success = DisplayInfoProvider::Get()->StartCustomTouchCalibration( + id, &error); ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); } -TEST_F(DisplayInfoProviderChromeosTest, SetTouchCalibrationNegativeBounds) { +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationNegativeBounds) { UpdateDisplay("1200x600,600x1000*2"); const int64_t internal_display_id = @@ -1281,12 +1290,14 @@ api::system_display::Bounds bounds; bounds.width = -1; - bool success = false; std::string error; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + DisplayInfoProvider::Get()->StartCustomTouchCalibration(id, &error); + error.clear(); + bool success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); - std::string expected_err = "Bounds cannot have negative values."; + std::string expected_err = + DisplayInfoProviderChromeOS::kTouchBoundsNegativeError; ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); @@ -1295,13 +1306,15 @@ bounds.width = 0; bounds.height = -1; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + DisplayInfoProvider::Get()->StartCustomTouchCalibration(id, &error); + error.clear(); + success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); } -TEST_F(DisplayInfoProviderChromeosTest, SetTouchCalibrationInvalidPoints) { +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationInvalidPoints) { UpdateDisplay("1200x600,600x1000*2"); const int64_t internal_display_id = @@ -1325,13 +1338,14 @@ api::system_display::Bounds bounds; pairs.pair1.display_point.x = -1; - bool success = false; std::string error; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + DisplayInfoProvider::Get()->StartCustomTouchCalibration(id, &error); + error.clear(); + bool success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); - std::string expected_err = "Display points and touch points cannot have " - "negative coordinates"; + std::string expected_err = + DisplayInfoProviderChromeOS::kTouchCalibrationPointsNegativeError; ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); @@ -1339,16 +1353,18 @@ error.clear(); bounds.width = 1; pairs.pair1.display_point.x = 2; - expected_err = "Display point coordinates cannot be more than size of the " - "display."; + expected_err = + DisplayInfoProviderChromeOS::kTouchCalibrationPointsTooLargeError; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + DisplayInfoProvider::Get()->StartCustomTouchCalibration(id, &error); + error.clear(); + success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); ASSERT_FALSE(success); EXPECT_EQ(expected_err, error); } -TEST_F(DisplayInfoProviderChromeosTest, SetTouchCalibrationSuccess) { +TEST_F(DisplayInfoProviderChromeosTest, CustomTouchCalibrationSuccess) { UpdateDisplay("1200x600,600x1000*2"); const int64_t internal_display_id = @@ -1392,10 +1408,11 @@ bounds.width = 600; bounds.height = 1000; - bool success = false; std::string error; - success = DisplayInfoProvider::Get()->TouchCalibrationSet(id, pairs, bounds, - &error); + DisplayInfoProvider::Get()->StartCustomTouchCalibration(id, &error); + error.clear(); + bool success = DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + pairs, bounds, &error); ASSERT_TRUE(success); EXPECT_EQ(error, "");
diff --git a/chrome/browser/favicon/favicon_utils.cc b/chrome/browser/favicon/favicon_utils.cc index 18c9bc53..f44f5a3ae 100644 --- a/chrome/browser/favicon/favicon_utils.cc +++ b/chrome/browser/favicon/favicon_utils.cc
@@ -46,6 +46,11 @@ } bool ShouldDisplayFavicon(content::WebContents* web_contents) { + // No favicon on interstitials. This check must be done first since + // interstitial navigations don't commit and always have a pending entry. + if (web_contents->ShowingInterstitialPage()) + return false; + // Always display a throbber during pending loads. const content::NavigationController& controller = web_contents->GetController();
diff --git a/chrome/browser/io_thread.cc b/chrome/browser/io_thread.cc index 943d6cb..4af904e 100644 --- a/chrome/browser/io_thread.cc +++ b/chrome/browser/io_thread.cc
@@ -124,6 +124,9 @@ #include "chrome/browser/android/data_usage/external_data_use_observer.h" #include "chrome/browser/android/net/external_estimate_provider_android.h" #include "components/data_usage/android/traffic_stats_amortizer.h" +#include "net/cert/cert_net_fetcher.h" +#include "net/cert/cert_verify_proc_android.h" +#include "net/cert_net/cert_net_fetcher_impl.h" #endif // defined(OS_ANDROID) #if defined(OS_CHROMEOS) @@ -187,6 +190,10 @@ #if defined(USE_NSS_CERTS) net::SetURLRequestContextForNSSHttpIO(this); #endif +#if defined(OS_ANDROID) + net::CertVerifyProcAndroid::SetCertNetFetcher( + net::CreateCertNetFetcher(this)); +#endif } private: @@ -690,6 +697,10 @@ net::ShutdownNSSHttpIO(); #endif +#if defined(OS_ANDROID) + net::CertVerifyProcAndroid::ShutdownCertNetFetcher(); +#endif + system_url_request_context_getter_ = NULL; // Unlink the ct_tree_tracker_ from the global cert_transparency_verifier @@ -1015,8 +1026,12 @@ if (command_line.HasSwitch(switches::kEnableUserAlternateProtocolPorts)) { params->enable_user_alternate_protocol_ports = true; } - if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) + if (command_line.HasSwitch(switches::kIgnoreCertificateErrors)) { params->ignore_certificate_errors = true; + } + UMA_HISTOGRAM_BOOLEAN( + "Net.Certificate.IgnoreErrors", + command_line.HasSwitch(switches::kIgnoreCertificateErrors)); if (command_line.HasSwitch(switches::kTestingFixedHttpPort)) { params->testing_fixed_http_port = GetSwitchValueAsInt(command_line, switches::kTestingFixedHttpPort);
diff --git a/chrome/browser/policy/configuration_policy_handler_list_factory.cc b/chrome/browser/policy/configuration_policy_handler_list_factory.cc index 8faf6fb..bb1ca3f 100644 --- a/chrome/browser/policy/configuration_policy_handler_list_factory.cc +++ b/chrome/browser/policy/configuration_policy_handler_list_factory.cc
@@ -8,6 +8,7 @@ #include <stddef.h> #include <utility> +#include <vector> #include "base/bind.h" #include "base/macros.h" @@ -108,6 +109,9 @@ { key::kHomepageIsNewTabPage, prefs::kHomePageIsNewTabPage, base::Value::Type::BOOLEAN }, + { key::kNewTabPageLocation, + prefs::kNewTabPageLocationOverride, + base::Value::Type::STRING }, { key::kRestoreOnStartupURLs, prefs::kURLsToRestoreOnStartup, base::Value::Type::LIST },
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc index ad7e48a2..96c9bf2 100644 --- a/chrome/browser/policy/policy_browsertest.cc +++ b/chrome/browser/policy/policy_browsertest.cc
@@ -1202,7 +1202,6 @@ nullptr, // ForceYouTubeSafetyMode nullptr // ForceYouTubeRestrict ); - // Verify that the safe search pref behaves the way we expect. PrefService* prefs = browser()->profile()->GetPrefs(); EXPECT_EQ(safe_search != 0,
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc index b05dc53..aea147d 100644 --- a/chrome/browser/prerender/prerender_contents.cc +++ b/chrome/browser/prerender/prerender_contents.cc
@@ -29,7 +29,6 @@ #include "chrome/browser/ui/web_contents_sizer.h" #include "chrome/common/prerender_messages.h" #include "chrome/common/prerender_types.h" -#include "chrome/common/render_messages.h" #include "components/history/core/browser/history_types.h" #include "content/public/browser/browser_child_process_host.h" #include "content/public/browser/browser_thread.h" @@ -43,6 +42,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents_delegate.h" #include "content/public/common/frame_navigate_params.h" +#include "services/service_manager/public/cpp/interface_registry.h" #include "ui/base/page_transition_types.h" #include "ui/gfx/geometry/size.h" @@ -198,6 +198,7 @@ : prerender_mode_(FULL_PRERENDER), prerendering_has_started_(false), session_storage_namespace_id_(-1), + prerender_canceler_binding_(this), prerender_manager_(prerender_manager), prerender_url_(url), referrer_(referrer), @@ -209,7 +210,8 @@ child_id_(-1), route_id_(-1), origin_(origin), - network_bytes_(0) { + network_bytes_(0), + weak_factory_(this) { DCHECK(prerender_manager); } @@ -470,18 +472,6 @@ observer_list_.Clear(); } -bool PrerenderContents::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - // The following messages we do want to consume. - IPC_BEGIN_MESSAGE_MAP(PrerenderContents, message) - IPC_MESSAGE_HANDLER(ChromeViewHostMsg_CancelPrerenderForPrinting, - OnCancelPrerenderForPrinting) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - - return handled; -} - bool PrerenderContents::CheckURL(const GURL& url) { if (!url.SchemeIsHTTPOrHTTPS()) { Destroy(FINAL_STATUS_UNSUPPORTED_SCHEME); @@ -536,6 +526,10 @@ void PrerenderContents::RenderFrameCreated( content::RenderFrameHost* render_frame_host) { + render_frame_host->GetInterfaceRegistry()->AddInterface( + base::Bind(&PrerenderContents::OnPrerenderCancelerRequest, + weak_factory_.GetWeakPtr())); + // When a new RenderFrame is created for a prerendering WebContents, tell the // new RenderFrame it's being used for prerendering before any navigations // occur. Note that this is always triggered before the first navigation, so @@ -739,10 +733,16 @@ resource_throttles_.clear(); } -void PrerenderContents::OnCancelPrerenderForPrinting() { +void PrerenderContents::CancelPrerenderForPrinting() { Destroy(FINAL_STATUS_WINDOW_PRINT); } +void PrerenderContents::OnPrerenderCancelerRequest( + chrome::mojom::PrerenderCancelerRequest request) { + if (!prerender_canceler_binding_.is_bound()) + prerender_canceler_binding_.Bind(std::move(request)); +} + void PrerenderContents::AddResourceThrottle( const base::WeakPtr<PrerenderResourceThrottle>& throttle) { resource_throttles_.push_back(throttle);
diff --git a/chrome/browser/prerender/prerender_contents.h b/chrome/browser/prerender/prerender_contents.h index e8acddd8..3d2a82c 100644 --- a/chrome/browser/prerender/prerender_contents.h +++ b/chrome/browser/prerender/prerender_contents.h
@@ -19,11 +19,13 @@ #include "base/values.h" #include "chrome/browser/prerender/prerender_final_status.h" #include "chrome/browser/prerender/prerender_origin.h" +#include "chrome/common/prerender.mojom.h" #include "chrome/common/prerender_types.h" #include "content/public/browser/notification_observer.h" #include "content/public/browser/notification_registrar.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/referrer.h" +#include "mojo/public/cpp/bindings/binding.h" #include "ui/gfx/geometry/rect.h" class Profile; @@ -48,7 +50,8 @@ class PrerenderResourceThrottle; class PrerenderContents : public content::NotificationObserver, - public content::WebContentsObserver { + public content::WebContentsObserver, + public chrome::mojom::PrerenderCanceler { public: // PrerenderContents::Create uses the currently registered Factory to create // the PrerenderContents. Factory is intended for testing. @@ -178,7 +181,6 @@ const content::FrameNavigateParams& params) override; void DidGetRedirectForResourceRequest( const content::ResourceRedirectDetails& details) override; - bool OnMessageReceived(const IPC::Message& message) override; void RenderProcessGone(base::TerminationStatus status) override; @@ -295,8 +297,13 @@ // Returns the ProcessMetrics for the render process, if it exists. base::ProcessMetrics* MaybeGetProcessMetrics(); - // Message handlers. - void OnCancelPrerenderForPrinting(); + // chrome::mojom::PrerenderCanceler: + void CancelPrerenderForPrinting() override; + + void OnPrerenderCancelerRequest( + chrome::mojom::PrerenderCancelerRequest request); + + mojo::Binding<chrome::mojom::PrerenderCanceler> prerender_canceler_binding_; base::ObserverList<Observer> observer_list_; @@ -366,6 +373,8 @@ // transferred over the network for resources. Updated with AddNetworkBytes. int64_t network_bytes_; + base::WeakPtrFactory<PrerenderContents> weak_factory_; + DISALLOW_COPY_AND_ASSIGN(PrerenderContents); };
diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc index 8c35956..820b5472 100644 --- a/chrome/browser/profiles/profile_impl.cc +++ b/chrome/browser/profiles/profile_impl.cc
@@ -380,6 +380,8 @@ registry->RegisterStringPref(prefs::kHomePage, std::string(), home_page_flags); + registry->RegisterStringPref(prefs::kNewTabPageLocationOverride, + std::string()); #if BUILDFLAG(ENABLE_PRINTING) registry->RegisterBooleanPref(prefs::kPrintingEnabled, true); #endif
diff --git a/chrome/browser/resources/print_preview/data/destination.js b/chrome/browser/resources/print_preview/data/destination.js index c4ae78e..8eaa24f 100644 --- a/chrome/browser/resources/print_preview/data/destination.js +++ b/chrome/browser/resources/print_preview/data/destination.js
@@ -50,6 +50,7 @@ * Connection status of the print destination. * @param {{tags: (Array<string>|undefined), * isOwned: (boolean|undefined), + * isEnterprisePrinter: (boolean|undefined), * account: (string|undefined), * lastAccessTime: (number|undefined), * isTosAccepted: (boolean|undefined), @@ -113,6 +114,13 @@ this.isOwned_ = (opt_params && opt_params.isOwned) || false; /** + * Whether the destination is an enterprise policy controlled printer. + * @private {boolean} + */ + this.isEnterprisePrinter_ = + (opt_params && opt_params.isEnterprisePrinter) || false; + + /** * Account this destination is registered for, if known. * @private {string} */ @@ -274,7 +282,8 @@ THIRD_PARTY: 'images/third_party.png', PDF: 'images/pdf.png', DOCS: 'images/google_doc.png', - FEDEX: 'images/third_party_fedex.png' + FEDEX: 'images/third_party_fedex.png', + ENTERPRISE: 'images/business.svg' }; Destination.prototype = { @@ -489,6 +498,9 @@ if (this.id_ == Destination.GooglePromotedId.SAVE_AS_PDF) { return Destination.IconUrl_.PDF; } + if (this.isEnterprisePrinter) { + return Destination.IconUrl_.ENTERPRISE; + } if (this.isLocal) { return Destination.IconUrl_.LOCAL; } @@ -558,7 +570,15 @@ */ get isProvisional() { return this.provisionalType_ != Destination.ProvisionalType.NONE; - } + }, + + /** + * Whether the printer is enterprise policy controlled printer. + * @return {boolean} + */ + get isEnterprisePrinter() { + return this.isEnterprisePrinter_; + }, }; // Export
diff --git a/chrome/browser/resources/print_preview/data/destination_store.js b/chrome/browser/resources/print_preview/data/destination_store.js index ba8f6fc6..548a437 100644 --- a/chrome/browser/resources/print_preview/data/destination_store.js +++ b/chrome/browser/resources/print_preview/data/destination_store.js
@@ -1602,9 +1602,11 @@ } destination.capabilities = capabilities; } else { + var isEnterprisePrinter = event.settingsInfo['cupsEnterprisePrinter']; destination = print_preview.LocalDestinationParser.parse( {deviceName: destinationId, printerName: printerName, + cupsEnterprisePrinter: isEnterprisePrinter, printerDescription: printerDescription}); destination.capabilities = capabilities; this.insertDestination_(destination);
diff --git a/chrome/browser/resources/print_preview/data/local_parsers.js b/chrome/browser/resources/print_preview/data/local_parsers.js index 8e02b19..14ac04b 100644 --- a/chrome/browser/resources/print_preview/data/local_parsers.js +++ b/chrome/browser/resources/print_preview/data/local_parsers.js
@@ -15,7 +15,8 @@ * @return {!print_preview.Destination} Parsed local print destination. */ LocalDestinationParser.parse = function(destinationInfo) { - var options = {'description': destinationInfo.printerDescription}; + var options = {description: destinationInfo.printerDescription, + isEnterprisePrinter: destinationInfo.cupsEnterprisePrinter}; if (destinationInfo.printerOptions) { // Convert options into cloud print tags format. options.tags = Object.keys(destinationInfo.printerOptions).map(
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.html b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.html index 8f0adbed..07766b11 100644 --- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.html +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.html
@@ -9,32 +9,27 @@ <dom-module id="bluetooth-device-list-item"> <style include="settings-shared"> - #check { - -webkit-padding-start: 10px; - } - - #deviceIcon { - -webkit-padding-end: 10px; - } - - span.name { - padding: 10px 0; - } - - span.name[connected] { + .name[connected] { font-weight: 500; } + + .state[connected] { + color: var(--google-green-500); + } </style> <template> - <div class="flex layout horizontal center" dropdown$="[[dropdownOpened]]"> + <div class="list-item"> <iron-icon id="deviceIcon" icon="[[getDeviceIcon_(device)]]"> </iron-icon> - <span class="name" connected$="[[device.connected]]"> - [[getDeviceName_(device)]] - </span> - <iron-icon id="check" icon="cr:check" hidden$="[[!device.connected]]"> - </iron-icon> - <span class="flex"></span> + <div class="middle"> + <div class="name" connected$="[[device.connected]]"> + [[getDeviceName_(device)]] + </div> + <div class="state secondary" connected$="[[device.connected]]" + hidden$="[[!hasConnectionStatusText_(device)]]"> + [[getConnectionStatusText_(device)]] + </div> + </div> <span hidden$="[[!device.connecting]]">$i18n{bluetoothConnecting}</span> <div hidden$="[[!device.paired]]"> <paper-icon-button icon="cr:more-vert" on-tap="onMenuButtonTap_"
diff --git a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js index 8816fd1..fb87d7a 100644 --- a/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js +++ b/chrome/browser/resources/settings/bluetooth_page/bluetooth_device_list_item.js
@@ -71,6 +71,28 @@ /** * @param {!chrome.bluetooth.Device} device + * @return {string} The text to display the connection status of |device|. + * @private + */ + getConnectionStatusText_: function(device) { + if (!this.hasConnectionStatusText_(device)) + return ''; + return this.i18n( + device.connected ? 'bluetoothConnected' : 'bluetoothNotConnected'); + }, + + /** + * @param {!chrome.bluetooth.Device} device + * @return {boolean} True if connection status should be shown as the + * secondary text of the |device| in device list. + * @private + */ + hasConnectionStatusText_: function(device) { + return !!device.paired && !device.connecting; + }, + + /** + * @param {!chrome.bluetooth.Device} device * @return {boolean} * @private */
diff --git a/chrome/browser/resources/settings/device_page/display.js b/chrome/browser/resources/settings/device_page/display.js index 3cb3879..c2ea9e9 100644 --- a/chrome/browser/resources/settings/device_page/display.js +++ b/chrome/browser/resources/settings/device_page/display.js
@@ -315,7 +315,7 @@ * @private */ onTouchCalibrationTap_: function(e) { - settings.display.systemDisplayApi.touchCalibrationStart( + settings.display.systemDisplayApi.showNativeTouchCalibration( this.selectedDisplay.id); },
diff --git a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc index cf2101d..21d269b 100644 --- a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc +++ b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
@@ -1053,39 +1053,6 @@ content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); } -// Tests that when a visible password field is detected on an HTTP page -// load, and when the command-line flag is *not* set, the security level is -// *not* downgraded to HTTP_SHOW_WARNING. -IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTest, - PasswordSecurityLevelNotDowngradedWithoutSwitch) { - ASSERT_TRUE(embedded_test_server()->Start()); - host_resolver()->AddRule("*", embedded_test_server()->GetURL("/").host()); - - content::WebContents* contents = - browser()->tab_strip_model()->GetActiveWebContents(); - ASSERT_TRUE(contents); - - SecurityStateTabHelper* helper = - SecurityStateTabHelper::FromWebContents(contents); - ASSERT_TRUE(helper); - - ui_test_utils::NavigateToURL( - browser(), GetURLWithNonLocalHostname(embedded_test_server(), - "/password/simple_password.html")); - InjectScript(contents); - // The security level should not be HTTP_SHOW_WARNING, because the - // command-line switch was not set. - security_state::SecurityInfo security_info; - helper->GetSecurityInfo(&security_info); - EXPECT_EQ(security_state::NONE, security_info.security_level); - - // The appropriate SSLStatus flags should be set, however. - content::NavigationEntry* entry = contents->GetController().GetVisibleEntry(); - ASSERT_TRUE(entry); - EXPECT_TRUE(entry->GetSSL().content_status & - content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); -} - // Tests that when a visible password field is detected on an HTTPS page // load, and when the command-line flag is set, the security level is // *not* downgraded to HTTP_SHOW_WARNING.
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 f9719d14..7ed472c6 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_handler.cc
@@ -423,6 +423,11 @@ for (const auto opt_it : printer.options) options->SetString(opt_it.first, opt_it.second); + printer_info->SetBoolean( + kCUPSEnterprisePrinter, + base::ContainsKey(printer.options, kCUPSEnterprisePrinter) && + printer.options.at(kCUPSEnterprisePrinter) == kValueTrue); + printer_info->Set(printing::kSettingPrinterOptions, std::move(options)); printers->Append(std::move(printer_info));
diff --git a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc index df9b425..e6f28de 100644 --- a/chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ b/chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -390,6 +390,8 @@ IDR_PRINT_PREVIEW_IMAGES_PRINTER); source->AddResourcePath("images/printer_shared.png", IDR_PRINT_PREVIEW_IMAGES_PRINTER_SHARED); + source->AddResourcePath("images/business.svg", + IDR_PRINT_PREVIEW_IMAGES_ENTERPRISE_PRINTER); source->AddResourcePath("images/third_party.png", IDR_PRINT_PREVIEW_IMAGES_THIRD_PARTY); source->AddResourcePath("images/third_party_fedex.png",
diff --git a/chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc b/chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc index c03370c1..6b75765 100644 --- a/chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc +++ b/chrome/browser/ui/webui/print_preview/printer_backend_proxy_chromeos.cc
@@ -43,6 +43,9 @@ // TODO(skau): Unify Mac with the other platforms for display name // presentation so I can remove this strange code. basic_info.options[kDriverInfoTagName] = printer.description(); + basic_info.options[kCUPSEnterprisePrinter] = + (printer.source() == chromeos::Printer::SRC_POLICY) ? kValueTrue + : kValueFalse; basic_info.printer_name = printer.id(); basic_info.printer_description = printer.display_name(); return basic_info;
diff --git a/chrome/browser/ui/webui/print_preview/printer_capabilities.cc b/chrome/browser/ui/webui/print_preview/printer_capabilities.cc index 5279af4..d1d185f 100644 --- a/chrome/browser/ui/webui/print_preview/printer_capabilities.cc +++ b/chrome/browser/ui/webui/print_preview/printer_capabilities.cc
@@ -10,6 +10,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "base/stl_util.h" #include "base/strings/string_piece.h" #include "base/values.h" #include "chrome/common/cloud_print/cloud_print_cdd_conversion.h" @@ -94,6 +95,10 @@ printer_info->SetString(kPrinterId, device_name); printer_info->SetString(kSettingPrinterName, printer_name); printer_info->SetString(kSettingPrinterDescription, printer_description); + printer_info->SetBoolean( + kCUPSEnterprisePrinter, + base::ContainsKey(basic_info.options, kCUPSEnterprisePrinter) && + basic_info.options.at(kCUPSEnterprisePrinter) == kValueTrue); auto capabilities = GetPrinterCapabilitiesOnBlockingPoolThread(device_name); if (!capabilities)
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 11fd724..c6bd61e9 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
@@ -321,6 +321,7 @@ void AddBluetoothStrings(content::WebUIDataSource* html_source) { LocalizedString localized_strings[] = { {"bluetoothAccept", IDS_OPTIONS_SETTINGS_BLUETOOTH_ACCEPT_PASSKEY}, + {"bluetoothConnected", IDS_SETTINGS_BLUETOOTH_CONNECTED}, {"bluetoothConnecting", IDS_SETTINGS_BLUETOOTH_CONNECTING}, {"bluetoothDisabled", IDS_SETTINGS_BLUETOOTH_DISABLED}, {"bluetoothDisconnect", IDS_OPTIONS_SETTINGS_BLUETOOTH_DISCONNECT}, @@ -329,6 +330,7 @@ {"bluetoothExpandA11yLabel", IDS_SETTINGS_BLUETOOTH_EXPAND_ACCESSIBILITY_LABEL}, {"bluetoothNoDevices", IDS_SETTINGS_BLUETOOTH_NO_DEVICES}, + {"bluetoothNotConnected", IDS_SETTINGS_BLUETOOTH_NOT_CONNECTED}, {"bluetoothPageTitle", IDS_SETTINGS_BLUETOOTH}, {"bluetoothPair", IDS_SETTINGS_BLUETOOTH_PAIR}, {"bluetoothPairDevice", IDS_SETTINGS_BLUETOOTH_PAIR_DEVICE},
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn index ad33a7f7..18450d2 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn
@@ -678,6 +678,7 @@ "field_trial_recorder.mojom", "net_benchmarking.mojom", "network_diagnostics.mojom", + "prerender.mojom", "renderer_configuration.mojom", "resource_usage_reporter.mojom", "shell_handler_win.mojom",
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 51b573d..01658e34 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -76,6 +76,9 @@ const char kLastProfileResetTimestamp[] = "profile.last_reset_timestamp"; #endif +// The URL to open the new tab page to. Only set by Group Policy. +const char kNewTabPageLocationOverride[] = "newtab_page_location_override"; + // An integer that keeps track of the profile icon version. This allows us to // determine the state of the profile icon for icon format changes. const char kProfileIconVersion[] = "profile.icon_version";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 08f7784..5bdcc20 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -39,6 +39,7 @@ #if defined(OS_WIN) extern const char kLastProfileResetTimestamp[]; #endif +extern const char kNewTabPageLocationOverride[]; extern const char kProfileIconVersion[]; extern const char kRestoreOnStartup[]; extern const char kSessionExitedCleanly[];
diff --git a/chrome/common/prerender.mojom b/chrome/common/prerender.mojom new file mode 100644 index 0000000..5c888e89 --- /dev/null +++ b/chrome/common/prerender.mojom
@@ -0,0 +1,12 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +module chrome.mojom; + +interface PrerenderCanceler { + // Message sent from the renderer to the browser to notify it of a + // window.print() call which should cancel the prerender. The message is sent + // only when the renderer is prerendering. + CancelPrerenderForPrinting(); +};
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index 67a387ef6..993810f7 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h
@@ -384,11 +384,6 @@ base::string16 /* name */, std::string /* plugin group identifier */) -// Message sent from the renderer to the browser to notify it of a -// window.print() call which should cancel the prerender. The message is sent -// only when the renderer is prerendering. -IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_CancelPrerenderForPrinting) - // Sent when the renderer was prevented from displaying insecure content in // a secure page by a security policy. The page may appear incomplete. IPC_MESSAGE_ROUTED0(ChromeViewHostMsg_DidBlockDisplayingInsecureContent)
diff --git a/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc b/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc index 0796532..d1438d3 100644 --- a/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc +++ b/chrome/renderer/printing/chrome_print_web_view_helper_delegate.cc
@@ -9,13 +9,12 @@ #include "base/command_line.h" #include "base/strings/string_util.h" #include "chrome/common/chrome_switches.h" -#include "chrome/common/render_messages.h" +#include "chrome/common/prerender.mojom.h" #include "chrome/common/url_constants.h" #include "chrome/renderer/prerender/prerender_helper.h" #include "content/public/renderer/render_frame.h" -#include "content/public/renderer/render_view.h" #include "extensions/features/features.h" -#include "ipc/ipc_message.h" +#include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebElement.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" @@ -33,9 +32,10 @@ if (!prerender::PrerenderHelper::IsPrerendering(render_frame)) return false; - auto* render_view = render_frame->GetRenderView(); - return render_view->Send(new ChromeViewHostMsg_CancelPrerenderForPrinting( - render_view->GetRoutingID())); + chrome::mojom::PrerenderCancelerPtr canceler; + render_frame->GetRemoteInterfaces()->GetInterface(&canceler); + canceler->CancelPrerenderForPrinting(); + return true; } // Return the PDF object element if |frame| is the out of process PDF extension.
diff --git a/chrome/test/data/policy/policy_test_cases.json b/chrome/test/data/policy/policy_test_cases.json index 00dd1324..2e1d91b 100644 --- a/chrome/test/data/policy/policy_test_cases.json +++ b/chrome/test/data/policy/policy_test_cases.json
@@ -62,6 +62,16 @@ ] }, + "NewTabPageLocation": { + "os": ["win", "linux", "mac", "chromeos"], + "can_be_recommended": true, + "test_policy": { "NewTabPageLocation": "http://chromium.org" }, + "pref_mappings": [ + { "pref": "newtab_page_location_override" + } + ] + }, + "DefaultBrowserSettingEnabled": { "os": ["win", "mac", "linux"], "test_policy": { "DefaultBrowserSettingEnabled": true },
diff --git a/chromecast/renderer/key_systems_cast.cc b/chromecast/renderer/key_systems_cast.cc index ece8badd..e0835d8 100644 --- a/chromecast/renderer/key_systems_cast.cc +++ b/chromecast/renderer/key_systems_cast.cc
@@ -105,6 +105,9 @@ ::media::EME_CODEC_MP4_AAC | ::media::EME_CODEC_MP4_AVC1 | ::media::EME_CODEC_MP4_VP9 | ::media::EME_CODEC_WEBM_VP8 | ::media::EME_CODEC_WEBM_VP9; +#if BUILDFLAG(ENABLE_HEVC_DEMUXING) + codecs |= ::media::EME_CODEC_MP4_HEVC; +#endif key_systems_properties->emplace_back(new cdm::WidevineKeySystemProperties( codecs, // Regular codecs. #if defined(OS_ANDROID)
diff --git a/chromeos/printing/printer_translator.cc b/chromeos/printing/printer_translator.cc index 4574bf6..38150d035 100644 --- a/chromeos/printing/printer_translator.cc +++ b/chromeos/printing/printer_translator.cc
@@ -112,6 +112,7 @@ } std::unique_ptr<Printer> printer = DictionaryToPrinter(value); + printer->set_source(Printer::SRC_USER_PREFS); const DictionaryValue* ppd; if (value.GetDictionary(kPpdReference, &ppd)) { @@ -141,6 +142,7 @@ std::unique_ptr<Printer> RecommendedPrinterToPrinter( const base::DictionaryValue& pref) { std::unique_ptr<Printer> printer = DictionaryToPrinter(pref); + printer->set_source(Printer::SRC_POLICY); const DictionaryValue* ppd; if (pref.GetDictionary(kPpdResource, &ppd)) {
diff --git a/components/cronet/histogram_manager.cc b/components/cronet/histogram_manager.cc index bb2ced0..5d5dd36 100644 --- a/components/cronet/histogram_manager.cc +++ b/components/cronet/histogram_manager.cc
@@ -8,7 +8,7 @@ #include <vector> #include "base/lazy_instance.h" -#include "base/metrics/histogram.h" +#include "base/metrics/histogram_macros.h" #include "base/metrics/histogram_samples.h" #include "base/metrics/statistics_recorder.h" #include "components/metrics/histogram_encoder.h"
diff --git a/components/cronet/histogram_manager_unittest.cc b/components/cronet/histogram_manager_unittest.cc index 8d4391c..af599e70 100644 --- a/components/cronet/histogram_manager_unittest.cc +++ b/components/cronet/histogram_manager_unittest.cc
@@ -8,6 +8,7 @@ #include <string> +#include "base/metrics/histogram_macros.h" #include "base/metrics/statistics_recorder.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/components/cryptauth/BUILD.gn b/components/cryptauth/BUILD.gn index e8e14798..6a0fba0 100644 --- a/components/cryptauth/BUILD.gn +++ b/components/cryptauth/BUILD.gn
@@ -8,6 +8,8 @@ static_library("cryptauth") { sources = [ + "authenticator.cc", + "authenticator.h", "bluetooth_throttler.h", "bluetooth_throttler_impl.cc", "bluetooth_throttler_impl.h", @@ -34,6 +36,12 @@ "cryptauth_gcm_manager.h", "cryptauth_gcm_manager_impl.cc", "cryptauth_gcm_manager_impl.h", + "device_to_device_authenticator.cc", + "device_to_device_authenticator.h", + "device_to_device_initiator_operations.cc", + "device_to_device_initiator_operations.h", + "device_to_device_secure_context.cc", + "device_to_device_secure_context.h", "eid_generator.cc", "eid_generator.h", "pref_names.cc", @@ -42,6 +50,7 @@ "remote_beacon_seed_fetcher.h", "remote_device.cc", "remote_device.h", + "secure_context.h", "secure_message_delegate.cc", "secure_message_delegate.h", "switches.cc", @@ -80,10 +89,14 @@ sources = [ "cryptauth_test_util.cc", "cryptauth_test_util.h", + "device_to_device_responder_operations.cc", + "device_to_device_responder_operations.h", "fake_connection.cc", "fake_connection.h", "fake_cryptauth_gcm_manager.cc", "fake_cryptauth_gcm_manager.h", + "fake_secure_context.cc", + "fake_secure_context.h", "fake_secure_message_delegate.cc", "fake_secure_message_delegate.h", "mock_cryptauth_client.cc", @@ -105,6 +118,7 @@ deps = [ "//base", + "//components/proximity_auth/logging", "//testing/gmock", ] } @@ -121,6 +135,9 @@ "cryptauth_enroller_impl_unittest.cc", "cryptauth_enrollment_manager_unittest.cc", "cryptauth_gcm_manager_impl_unittest.cc", + "device_to_device_authenticator_unittest.cc", + "device_to_device_operations_unittest.cc", + "device_to_device_secure_context_unittest.cc", "eid_generator_unittest.cc", "fake_secure_message_delegate_unittest.cc", "remote_beacon_seed_fetcher_unittest.cc",
diff --git a/components/proximity_auth/authenticator.cc b/components/cryptauth/authenticator.cc similarity index 68% rename from components/proximity_auth/authenticator.cc rename to components/cryptauth/authenticator.cc index 92ca25a..fa1ed34f 100644 --- a/components/proximity_auth/authenticator.cc +++ b/components/cryptauth/authenticator.cc
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/proximity_auth/authenticator.h" +#include "components/cryptauth/authenticator.h" -namespace proximity_auth { +namespace cryptauth { // static const char Authenticator::kAuthenticationFeature[] = "auth"; -} // namespace proximity_auth +} // namespace cryptauth
diff --git a/components/proximity_auth/authenticator.h b/components/cryptauth/authenticator.h similarity index 86% rename from components/proximity_auth/authenticator.h rename to components/cryptauth/authenticator.h index 2c56fcc..0dce6fa 100644 --- a/components/proximity_auth/authenticator.h +++ b/components/cryptauth/authenticator.h
@@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_AUTHENTICATOR_H -#define COMPONENTS_PROXIMITY_AUTH_AUTHENTICATOR_H +#ifndef COMPONENTS_CRYPTAUTH_AUTHENTICATOR_H_ +#define COMPONENTS_CRYPTAUTH_AUTHENTICATOR_H_ #include <memory> #include "base/callback_forward.h" -namespace proximity_auth { +namespace cryptauth { class SecureContext; @@ -43,6 +43,6 @@ virtual void Authenticate(const AuthenticationCallback& callback) = 0; }; -} // namespace proximity_auth +} // namespace cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_AUTHENTICATOR_H +#endif // COMPONENTS_CRYPTAUTH_AUTHENTICATOR_H_
diff --git a/components/proximity_auth/device_to_device_authenticator.cc b/components/cryptauth/device_to_device_authenticator.cc similarity index 87% rename from components/proximity_auth/device_to_device_authenticator.cc rename to components/cryptauth/device_to_device_authenticator.cc index 751e277f..425e314 100644 --- a/components/proximity_auth/device_to_device_authenticator.cc +++ b/components/cryptauth/device_to_device_authenticator.cc
@@ -2,23 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/proximity_auth/device_to_device_authenticator.h" +#include "components/cryptauth/device_to_device_authenticator.h" #include <utility> #include "base/memory/ptr_util.h" #include "base/time/time.h" #include "base/timer/timer.h" +#include "components/cryptauth/authenticator.h" #include "components/cryptauth/connection.h" +#include "components/cryptauth/device_to_device_initiator_operations.h" +#include "components/cryptauth/device_to_device_secure_context.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/secure_message_delegate.h" #include "components/cryptauth/wire_message.h" -#include "components/proximity_auth/authenticator.h" -#include "components/proximity_auth/device_to_device_initiator_operations.h" -#include "components/proximity_auth/device_to_device_secure_context.h" #include "components/proximity_auth/logging/logging.h" -#include "components/proximity_auth/secure_context.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -30,9 +30,9 @@ } // namespace DeviceToDeviceAuthenticator::DeviceToDeviceAuthenticator( - cryptauth::Connection* connection, + Connection* connection, const std::string& account_id, - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate) + std::unique_ptr<SecureMessageDelegate> secure_message_delegate) : connection_(connection), account_id_(account_id), secure_message_delegate_(std::move(secure_message_delegate)), @@ -110,7 +110,7 @@ // Send the [Hello] message to the remote device. state_ = State::SENT_HELLO; hello_message_ = message; - connection_->SendMessage(base::MakeUnique<cryptauth::WireMessage>( + connection_->SendMessage(base::MakeUnique<WireMessage>( hello_message_, std::string(Authenticator::kAuthenticationFeature))); } @@ -150,7 +150,7 @@ } state_ = State::SENT_INITIATOR_AUTH; - connection_->SendMessage(base::MakeUnique<cryptauth::WireMessage>( + connection_->SendMessage(base::MakeUnique<WireMessage>( message, std::string(Authenticator::kAuthenticationFeature))); } @@ -184,19 +184,19 @@ } void DeviceToDeviceAuthenticator::OnConnectionStatusChanged( - cryptauth::Connection* connection, - cryptauth::Connection::Status old_status, - cryptauth::Connection::Status new_status) { + Connection* connection, + Connection::Status old_status, + Connection::Status new_status) { // We do not expect the connection to drop during authentication. - if (new_status == cryptauth::Connection::DISCONNECTED) { + if (new_status == Connection::DISCONNECTED) { Fail("Disconnected while authentication is in progress", Result::DISCONNECTED); } } void DeviceToDeviceAuthenticator::OnMessageReceived( - const cryptauth::Connection& connection, - const cryptauth::WireMessage& message) { + const Connection& connection, + const WireMessage& message) { if (state_ == State::SENT_HELLO && message.feature() == std::string(Authenticator::kAuthenticationFeature)) { PA_LOG(INFO) << "Received [Responder Auth] message, payload_size=" @@ -221,8 +221,8 @@ } void DeviceToDeviceAuthenticator::OnSendCompleted( - const cryptauth::Connection& connection, - const cryptauth::WireMessage& message, + const Connection& connection, + const WireMessage& message, bool success) { if (state_ == State::SENT_INITIATOR_AUTH) { if (success) @@ -235,4 +235,4 @@ } } -} // namespace proximity_auth +} // namespace cryptauth
diff --git a/components/proximity_auth/device_to_device_authenticator.h b/components/cryptauth/device_to_device_authenticator.h similarity index 82% rename from components/proximity_auth/device_to_device_authenticator.h rename to components/cryptauth/device_to_device_authenticator.h index 7172c7c4..ab98308 100644 --- a/components/proximity_auth/device_to_device_authenticator.h +++ b/components/cryptauth/device_to_device_authenticator.h
@@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_DEVICE_TO_DEVICE_AUTHENTICATOR_H -#define COMPONENTS_PROXIMITY_DEVICE_TO_DEVICE_AUTHENTICATOR_H +#ifndef COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_AUTHENTICATOR_H_ +#define COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_AUTHENTICATOR_H_ #include "base/callback.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "components/cryptauth/authenticator.h" #include "components/cryptauth/connection.h" #include "components/cryptauth/connection_observer.h" -#include "components/proximity_auth/authenticator.h" namespace base { class Timer; @@ -20,7 +20,7 @@ class SecureMessageDelegate; } -namespace proximity_auth { +namespace cryptauth { // Authenticator implementation using the "device to device" protocol, which is // in turn built on top of the SecureMessage library. @@ -41,7 +41,7 @@ // This protocol requires exclusive use of the connection. No other message // should be sent or received while authentication is in progress. class DeviceToDeviceAuthenticator : public Authenticator, - public cryptauth::ConnectionObserver { + public ConnectionObserver { public: // Creates the instance: // |connection|: The connection to the remote device, which must be in a @@ -49,9 +49,9 @@ // |account_id|: The canonical account id of the user who is the owner of both // the local and remote devices. // |secure_message_delegate|: Handles the SecureMessage crypto operations. - DeviceToDeviceAuthenticator(cryptauth::Connection* connection, + DeviceToDeviceAuthenticator(Connection* connection, const std::string& account_id, - std::unique_ptr<cryptauth::SecureMessageDelegate> + std::unique_ptr<SecureMessageDelegate> secure_message_delegate); ~DeviceToDeviceAuthenticator() override; @@ -108,26 +108,26 @@ // ConnectionObserver: void OnConnectionStatusChanged( - cryptauth::Connection* connection, - cryptauth::Connection::Status old_status, - cryptauth::Connection::Status new_status) override; - void OnMessageReceived(const cryptauth::Connection& connection, - const cryptauth::WireMessage& message) override; - void OnSendCompleted(const cryptauth::Connection& connection, - const cryptauth::WireMessage& message, + Connection* connection, + Connection::Status old_status, + Connection::Status new_status) override; + void OnMessageReceived(const Connection& connection, + const WireMessage& message) override; + void OnSendCompleted(const Connection& connection, + const WireMessage& message, bool success) override; // The connection to the remote device. It is expected to be in the CONNECTED // state at all times during authentication. // Not owned, and must outlive this instance. - cryptauth::Connection* const connection_; + Connection* const connection_; // The account id of the user who owns the local and remote devices. This is // normally an email address, and should be canonicalized. const std::string account_id_; // Handles SecureMessage crypto operations. - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate_; + std::unique_ptr<SecureMessageDelegate> secure_message_delegate_; // The current state in the authentication flow. State state_; @@ -155,6 +155,6 @@ DISALLOW_COPY_AND_ASSIGN(DeviceToDeviceAuthenticator); }; -} // namespace proximity_auth +} // namespace cryptauth -#endif // COMPONENTS_PROXIMITY_DEVICE_TO_DEVICE_AUTHENTICATOR_H +#endif // COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_AUTHENTICATOR_H_
diff --git a/components/proximity_auth/device_to_device_authenticator_unittest.cc b/components/cryptauth/device_to_device_authenticator_unittest.cc similarity index 86% rename from components/proximity_auth/device_to_device_authenticator_unittest.cc rename to components/cryptauth/device_to_device_authenticator_unittest.cc index b66d735..fff5271e 100644 --- a/components/proximity_auth/device_to_device_authenticator_unittest.cc +++ b/components/cryptauth/device_to_device_authenticator_unittest.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/proximity_auth/device_to_device_authenticator.h" +#include "components/cryptauth/device_to_device_authenticator.h" #include <utility> @@ -13,17 +13,17 @@ #include "base/memory/scoped_vector.h" #include "base/rand_util.h" #include "base/timer/mock_timer.h" +#include "components/cryptauth/authenticator.h" #include "components/cryptauth/connection.h" #include "components/cryptauth/cryptauth_test_util.h" +#include "components/cryptauth/device_to_device_responder_operations.h" #include "components/cryptauth/fake_secure_message_delegate.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/wire_message.h" -#include "components/proximity_auth/authenticator.h" -#include "components/proximity_auth/device_to_device_responder_operations.h" -#include "components/proximity_auth/secure_context.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -62,25 +62,25 @@ } // Connection implementation for testing. -class FakeConnection : public cryptauth::Connection { +class FakeConnection : public Connection { public: - FakeConnection(const cryptauth::RemoteDevice& remote_device) - : cryptauth::Connection(remote_device), connection_blocked_(false) {} + FakeConnection(const RemoteDevice& remote_device) + : Connection(remote_device), connection_blocked_(false) {} ~FakeConnection() override {} // Connection: void Connect() override { - SetStatus(cryptauth::Connection::Status::CONNECTED); + SetStatus(Connection::Status::CONNECTED); } void Disconnect() override { - SetStatus(cryptauth::Connection::Status::DISCONNECTED); + SetStatus(Connection::Status::DISCONNECTED); } - using cryptauth::Connection::OnBytesReceived; + using Connection::OnBytesReceived; void ClearMessageBuffer() { message_buffer_.clear(); } - const ScopedVector<cryptauth::WireMessage>& message_buffer() { + const ScopedVector<WireMessage>& message_buffer() { return message_buffer_; } @@ -91,16 +91,16 @@ bool connection_blocked() { return connection_blocked_; } protected: - // cryptauth::Connection: + // Connection: void SendMessageImpl( - std::unique_ptr<cryptauth::WireMessage> message) override { - const cryptauth::WireMessage& message_alias = *message; + std::unique_ptr<WireMessage> message) override { + const WireMessage& message_alias = *message; message_buffer_.push_back(std::move(message)); OnDidSendMessage(message_alias, !connection_blocked_); } private: - ScopedVector<cryptauth::WireMessage> message_buffer_; + ScopedVector<WireMessage> message_buffer_; bool connection_blocked_; @@ -111,8 +111,8 @@ class DeviceToDeviceAuthenticatorForTest : public DeviceToDeviceAuthenticator { public: DeviceToDeviceAuthenticatorForTest( - cryptauth::Connection* connection, - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate) + Connection* connection, + std::unique_ptr<SecureMessageDelegate> secure_message_delegate) : DeviceToDeviceAuthenticator(connection, kAccountId, std::move(secure_message_delegate)), @@ -145,9 +145,9 @@ class ProximityAuthDeviceToDeviceAuthenticatorTest : public testing::Test { public: ProximityAuthDeviceToDeviceAuthenticatorTest() - : remote_device_(cryptauth::CreateClassicRemoteDeviceForTest()), + : remote_device_(CreateClassicRemoteDeviceForTest()), connection_(remote_device_), - secure_message_delegate_(new cryptauth::FakeSecureMessageDelegate), + secure_message_delegate_(new FakeSecureMessageDelegate), authenticator_(&connection_, base::WrapUnique(secure_message_delegate_)) {} ~ProximityAuthDeviceToDeviceAuthenticatorTest() override {} @@ -203,7 +203,7 @@ std::string SimulateResponderAuth(const std::string& hello_message) { std::string remote_device_private_key = secure_message_delegate_->GetPrivateKeyForPublicKey( - cryptauth::kTestRemoteDevicePublicKey); + kTestRemoteDevicePublicKey); std::string responder_auth_message; DeviceToDeviceResponderOperations::CreateResponderAuthMessage( @@ -213,8 +213,8 @@ base::Bind(&SaveStringResult, &responder_auth_message)); EXPECT_FALSE(responder_auth_message.empty()); - cryptauth::WireMessage wire_message(responder_auth_message, - Authenticator::kAuthenticationFeature); + WireMessage wire_message(responder_auth_message, + Authenticator::kAuthenticationFeature); connection_.OnBytesReceived(wire_message.Serialize()); return responder_auth_message; @@ -229,14 +229,14 @@ MOCK_METHOD1(OnAuthenticationResultProxy, void(Authenticator::Result result)); // Contains information about the remote device. - const cryptauth::RemoteDevice remote_device_; + const RemoteDevice remote_device_; // Simulates the connection to the remote device. FakeConnection connection_; // The SecureMessageDelegate used by the authenticator. // Owned by |authenticator_|. - cryptauth::FakeSecureMessageDelegate* secure_message_delegate_; + FakeSecureMessageDelegate* secure_message_delegate_; // The DeviceToDeviceAuthenticator under test. DeviceToDeviceAuthenticatorForTest authenticator_; @@ -281,8 +281,8 @@ // If the responder could not validate the [Hello message], it essentially // sends random bytes back for privacy reasons. - cryptauth::WireMessage wire_message(base::RandBytesAsString(300u), - Authenticator::kAuthenticationFeature); + WireMessage wire_message(base::RandBytesAsString(300u), + Authenticator::kAuthenticationFeature); EXPECT_CALL(*this, OnAuthenticationResultProxy(Authenticator::Result::FAILURE)); connection_.OnBytesReceived(wire_message.Serialize()); @@ -347,8 +347,8 @@ // Test that the authenticator is properly cleaned up after authentication // completes. - cryptauth::WireMessage wire_message(base::RandBytesAsString(300u), - Authenticator::kAuthenticationFeature); + WireMessage wire_message(base::RandBytesAsString(300u), + Authenticator::kAuthenticationFeature); connection_.SendMessage(base::MakeUnique<cryptauth::WireMessage>( base::RandBytesAsString(300u), Authenticator::kAuthenticationFeature)); connection_.OnBytesReceived(wire_message.Serialize()); @@ -357,4 +357,4 @@ connection_.OnBytesReceived(wire_message.Serialize()); } -} // namespace proximity_auth +} // namespace cryptauth
diff --git a/components/proximity_auth/device_to_device_initiator_operations.cc b/components/cryptauth/device_to_device_initiator_operations.cc similarity index 91% rename from components/proximity_auth/device_to_device_initiator_operations.cc rename to components/cryptauth/device_to_device_initiator_operations.cc index 2ffcb8a..f941e26 100644 --- a/components/proximity_auth/device_to_device_initiator_operations.cc +++ b/components/cryptauth/device_to_device_initiator_operations.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/proximity_auth/device_to_device_initiator_operations.h" +#include "components/cryptauth/device_to_device_initiator_operations.h" #include "base/bind.h" #include "base/callback.h" @@ -11,7 +11,7 @@ #include "components/cryptauth/secure_message_delegate.h" #include "components/proximity_auth/logging/logging.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -28,7 +28,7 @@ // after the inner message is created. void OnInnerMessageCreatedForInitiatorAuth( const std::string& session_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const DeviceToDeviceInitiatorOperations::MessageCallback& callback, const std::string& inner_message) { if (inner_message.empty()) { @@ -37,8 +37,8 @@ return; } - cryptauth::GcmMetadata gcm_metadata; - gcm_metadata.set_type(cryptauth::DEVICE_TO_DEVICE_MESSAGE); + GcmMetadata gcm_metadata; + gcm_metadata.set_type(DEVICE_TO_DEVICE_MESSAGE); gcm_metadata.set_version(kGcmMetadataVersion); // Store the inner message inside a DeviceToDeviceMessage proto. @@ -47,7 +47,7 @@ device_to_device_message.set_sequence_number(2); // Create and return the outer message, which wraps the inner message. - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::AES_256_CBC; create_options.signature_scheme = securemessage::HMAC_SHA256; gcm_metadata.SerializeToString(&create_options.public_metadata); @@ -64,7 +64,7 @@ std::string persistent_symmetric_key; std::string session_private_key; std::string hello_message; - cryptauth::SecureMessageDelegate* secure_message_delegate; + SecureMessageDelegate* secure_message_delegate; DeviceToDeviceInitiatorOperations::ValidateResponderAuthCallback callback; std::string responder_session_public_key; std::string session_symmetric_key; @@ -107,10 +107,10 @@ // Check that header public_metadata contains the correct metadata fields. securemessage::Header header = header_and_body.header(); - cryptauth::GcmMetadata gcm_metadata; + GcmMetadata gcm_metadata; if (!gcm_metadata.ParseFromString(header.public_metadata()) || gcm_metadata.type() != - cryptauth::DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD || + DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD || gcm_metadata.version() != kGcmMetadataVersion) { PA_LOG(WARNING) << "Failed to validate GcmMetadata in " << "[Responder Auth] header."; @@ -142,7 +142,7 @@ context.session_symmetric_key = session_symmetric_key; // Unwrap the outer message, using symmetric key encryption and signature. - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::AES_256_CBC; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; context.secure_message_delegate->UnwrapSecureMessage( @@ -173,7 +173,7 @@ // Unwrap the middle level SecureMessage, using symmetric key encryption and // signature. - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::AES_256_CBC; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; unwrap_options.associated_data = context.hello_message; @@ -197,7 +197,7 @@ // Unwrap the inner-most SecureMessage, using no encryption and an asymmetric // key signature. - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::NONE; unwrap_options.signature_scheme = securemessage::ECDSA_P256_SHA256; unwrap_options.associated_data = context.hello_message; @@ -217,9 +217,9 @@ // Note: The GMS Core implementation does not properly set the metadata // version, so we only check that the type is UNLOCK_KEY_SIGNED_CHALLENGE. - cryptauth::GcmMetadata gcm_metadata; + GcmMetadata gcm_metadata; if (!gcm_metadata.ParseFromString(header.public_metadata()) || - gcm_metadata.type() != cryptauth::UNLOCK_KEY_SIGNED_CHALLENGE) { + gcm_metadata.type() != UNLOCK_KEY_SIGNED_CHALLENGE) { PA_LOG(WARNING) << "Failed to validate GcmMetadata in inner-most " << "[Responder Auth] message."; context.callback.Run(false, std::string()); @@ -235,7 +235,7 @@ void DeviceToDeviceInitiatorOperations::CreateHelloMessage( const std::string& session_public_key, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback) { // Decode public key into the |initator_hello| proto. securemessage::InitiatorHello initator_hello; @@ -252,7 +252,7 @@ // Sig(<session_public_key>, persistent_symmetric_key) // payload: "" // } - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::NONE; create_options.signature_scheme = securemessage::HMAC_SHA256; initator_hello.SerializeToString(&create_options.public_metadata); @@ -267,7 +267,7 @@ const std::string& persistent_symmetric_key, const std::string& session_private_key, const std::string& hello_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidateResponderAuthCallback& callback) { // The [Responder Auth] message has the structure: // { @@ -302,7 +302,7 @@ const std::string& session_symmetric_key, const std::string& persistent_symmetric_key, const std::string& responder_auth_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback) { // The [Initiator Auth] message has the structure: // { @@ -316,7 +316,7 @@ // } // }, session_symmetric_key) // } - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::AES_256_CBC; create_options.signature_scheme = securemessage::HMAC_SHA256; create_options.associated_data = responder_auth_message; @@ -326,4 +326,4 @@ secure_message_delegate, callback)); } -} // proximity_auth +} // cryptauth
diff --git a/components/proximity_auth/device_to_device_initiator_operations.h b/components/cryptauth/device_to_device_initiator_operations.h similarity index 91% rename from components/proximity_auth/device_to_device_initiator_operations.h rename to components/cryptauth/device_to_device_initiator_operations.h index 463e6eed..543663d 100644 --- a/components/proximity_auth/device_to_device_initiator_operations.h +++ b/components/cryptauth/device_to_device_initiator_operations.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H -#define COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H +#ifndef COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H_ +#define COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H_ #include <string> @@ -11,10 +11,8 @@ #include "base/macros.h" namespace cryptauth { -class SecureMessageDelegate; -} -namespace proximity_auth { +class SecureMessageDelegate; // Utility class containing operations in the DeviceToDevice protocol that the // initiator needs to perform. For Smart Lock, in which a phone unlocks a @@ -60,7 +58,7 @@ static void CreateHelloMessage( const std::string& session_public_key, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback); // Validates that the [Responder Auth] message, received from the responder, @@ -86,7 +84,7 @@ const std::string& persistent_symmetric_key, const std::string& session_private_key, const std::string& hello_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidateResponderAuthCallback& callback); // Creates the [Initiator Auth] message, which allows the responder to @@ -103,13 +101,13 @@ const std::string& session_symmetric_key, const std::string& persistent_symmetric_key, const std::string& responder_auth_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback); private: DISALLOW_IMPLICIT_CONSTRUCTORS(DeviceToDeviceInitiatorOperations); }; -} // proximity_auth +} // cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H +#endif // COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_INITIATOR_OPERATIONS_H_
diff --git a/components/proximity_auth/device_to_device_operations_unittest.cc b/components/cryptauth/device_to_device_operations_unittest.cc similarity index 96% rename from components/proximity_auth/device_to_device_operations_unittest.cc rename to components/cryptauth/device_to_device_operations_unittest.cc index 6a48bfe..05a2f63 100644 --- a/components/proximity_auth/device_to_device_operations_unittest.cc +++ b/components/cryptauth/device_to_device_operations_unittest.cc
@@ -5,12 +5,12 @@ #include "base/base64url.h" #include "base/bind.h" #include "base/macros.h" +#include "components/cryptauth/device_to_device_initiator_operations.h" +#include "components/cryptauth/device_to_device_responder_operations.h" #include "components/cryptauth/fake_secure_message_delegate.h" -#include "components/proximity_auth/device_to_device_initiator_operations.h" -#include "components/proximity_auth/device_to_device_responder_operations.h" #include "testing/gtest/include/gtest/gtest.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -76,7 +76,7 @@ secure_message_delegate_.GetPrivateKeyForPublicKey( remote_session_public_key_); - // Note: cryptauth::FakeSecureMessageDelegate functions are synchronous. + // Note: FakeSecureMessageDelegate functions are synchronous. secure_message_delegate_.DeriveKey( local_session_private_key_, remote_session_public_key_, base::Bind(&SaveMessageResult, &session_symmetric_key_)); @@ -123,7 +123,7 @@ return local_auth_message; } - cryptauth::FakeSecureMessageDelegate secure_message_delegate_; + FakeSecureMessageDelegate secure_message_delegate_; std::string persistent_symmetric_key_; std::string local_session_public_key_; @@ -266,4 +266,4 @@ EXPECT_FALSE(validation_success); } -} // namespace proximity_auth +} // namespace cryptauth
diff --git a/components/proximity_auth/device_to_device_responder_operations.cc b/components/cryptauth/device_to_device_responder_operations.cc similarity index 91% rename from components/proximity_auth/device_to_device_responder_operations.cc rename to components/cryptauth/device_to_device_responder_operations.cc index b9018e6..3eb2a7cf 100644 --- a/components/proximity_auth/device_to_device_responder_operations.cc +++ b/components/cryptauth/device_to_device_responder_operations.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/proximity_auth/device_to_device_responder_operations.h" +#include "components/cryptauth/device_to_device_responder_operations.h" #include "base/bind.h" #include "base/callback.h" @@ -11,7 +11,7 @@ #include "components/cryptauth/secure_message_delegate.h" #include "components/proximity_auth/logging/logging.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -48,7 +48,7 @@ std::string session_private_key; std::string persistent_private_key; std::string persistent_symmetric_key; - cryptauth::SecureMessageDelegate* secure_message_delegate; + SecureMessageDelegate* secure_message_delegate; DeviceToDeviceResponderOperations::MessageCallback callback; std::string hello_public_key; std::string middle_message; @@ -84,11 +84,11 @@ context.hello_public_key = hello_public_key; // Create the inner most wrapped message of [Responder Auth]. - cryptauth::GcmMetadata gcm_metadata; - gcm_metadata.set_type(cryptauth::UNLOCK_KEY_SIGNED_CHALLENGE); + GcmMetadata gcm_metadata; + gcm_metadata.set_type(UNLOCK_KEY_SIGNED_CHALLENGE); gcm_metadata.set_version(kGcmMetadataVersion); - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::NONE; create_options.signature_scheme = securemessage::ECDSA_P256_SHA256; gcm_metadata.SerializeToString(&create_options.public_metadata); @@ -110,7 +110,7 @@ } // Create the middle message. - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::AES_256_CBC; create_options.signature_scheme = securemessage::HMAC_SHA256; create_options.associated_data = context.hello_message; @@ -148,8 +148,8 @@ return; } - cryptauth::GcmMetadata gcm_metadata; - gcm_metadata.set_type(cryptauth::DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD); + GcmMetadata gcm_metadata; + gcm_metadata.set_type(DEVICE_TO_DEVICE_RESPONDER_HELLO_PAYLOAD); gcm_metadata.set_version(kGcmMetadataVersion); // Store the responder's session public key in plaintext in the header. @@ -168,7 +168,7 @@ device_to_device_message.set_message(context.middle_message); device_to_device_message.set_sequence_number(1); - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::AES_256_CBC; create_options.signature_scheme = securemessage::HMAC_SHA256; create_options.public_metadata = gcm_metadata.SerializeAsString(); @@ -184,7 +184,7 @@ struct ValidateInitiatorAuthMessageContext { std::string persistent_symmetric_key; std::string responder_auth_message; - cryptauth::SecureMessageDelegate* secure_message_delegate; + SecureMessageDelegate* secure_message_delegate; DeviceToDeviceResponderOperations::ValidationCallback callback; }; @@ -221,7 +221,7 @@ } // Unwrap the inner message of [Initiator Auth]. - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::AES_256_CBC; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; unwrap_options.associated_data = context.responder_auth_message; @@ -237,7 +237,7 @@ void DeviceToDeviceResponderOperations::ValidateHelloMessage( const std::string& hello_message, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidateHelloCallback& callback) { // The [Hello] message has the structure: // { @@ -245,7 +245,7 @@ // Sig(<session_public_key>, persistent_symmetric_key) // payload: "" // } - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::NONE; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; secure_message_delegate->UnwrapSecureMessage( @@ -260,7 +260,7 @@ const std::string& session_private_key, const std::string& persistent_private_key, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback) { // The [Responder Auth] message has the structure: // { @@ -300,7 +300,7 @@ const std::string& session_symmetric_key, const std::string& persistent_symmetric_key, const std::string& responder_auth_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidationCallback& callback) { // The [Initiator Auth] message has the structure: // { @@ -318,7 +318,7 @@ persistent_symmetric_key, responder_auth_message, secure_message_delegate, callback}; - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::AES_256_CBC; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; secure_message_delegate->UnwrapSecureMessage( @@ -326,4 +326,4 @@ base::Bind(&OnOuterMessageUnwrappedForInitiatorAuth, context)); } -} // proximity_auth +} // cryptauth
diff --git a/components/proximity_auth/device_to_device_responder_operations.h b/components/cryptauth/device_to_device_responder_operations.h similarity index 91% rename from components/proximity_auth/device_to_device_responder_operations.h rename to components/cryptauth/device_to_device_responder_operations.h index 8858ac9..6e16db1 100644 --- a/components/proximity_auth/device_to_device_responder_operations.h +++ b/components/cryptauth/device_to_device_responder_operations.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H -#define COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H +#ifndef COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H_ +#define COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H_ #include <string> @@ -11,10 +11,8 @@ #include "base/macros.h" namespace cryptauth { -class SecureMessageDelegate; -} -namespace proximity_auth { +class SecureMessageDelegate; // Utility class containing operations in the DeviceToDevice protocol that the // initiator needs to perform. For Smart Lock, in which a phone unlocks a @@ -63,7 +61,7 @@ static void ValidateHelloMessage( const std::string& hello_message, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidateHelloCallback& callback); // Creates the [Responder Auth] message: @@ -87,7 +85,7 @@ const std::string& session_private_key, const std::string& persistent_private_key, const std::string& persistent_symmetric_key, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const MessageCallback& callback); // Validates that the [Initiator Auth] message, received from the initiator, @@ -107,13 +105,13 @@ const std::string& session_symmetric_key, const std::string& persistent_symmetric_key, const std::string& responder_auth_message, - cryptauth::SecureMessageDelegate* secure_message_delegate, + SecureMessageDelegate* secure_message_delegate, const ValidationCallback& callback); private: DISALLOW_IMPLICIT_CONSTRUCTORS(DeviceToDeviceResponderOperations); }; -} // proximity_auth +} // cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H +#endif // COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_RESPONDER_OPERATIONS_H_
diff --git a/components/proximity_auth/device_to_device_secure_context.cc b/components/cryptauth/device_to_device_secure_context.cc similarity index 88% rename from components/proximity_auth/device_to_device_secure_context.cc rename to components/cryptauth/device_to_device_secure_context.cc index 4964600..69f415c 100644 --- a/components/proximity_auth/device_to_device_secure_context.cc +++ b/components/cryptauth/device_to_device_secure_context.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/proximity_auth/device_to_device_secure_context.h" +#include "components/cryptauth/device_to_device_secure_context.h" #include <utility> @@ -13,7 +13,7 @@ #include "components/cryptauth/secure_message_delegate.h" #include "components/proximity_auth/logging/logging.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -27,7 +27,7 @@ } // namespace DeviceToDeviceSecureContext::DeviceToDeviceSecureContext( - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate, + std::unique_ptr<SecureMessageDelegate> secure_message_delegate, const std::string& symmetric_key, const std::string& responder_auth_message, ProtocolVersion protocol_version) @@ -42,7 +42,7 @@ void DeviceToDeviceSecureContext::Decode(const std::string& encoded_message, const MessageCallback& callback) { - cryptauth::SecureMessageDelegate::UnwrapOptions unwrap_options; + SecureMessageDelegate::UnwrapOptions unwrap_options; unwrap_options.encryption_scheme = securemessage::AES_256_CBC; unwrap_options.signature_scheme = securemessage::HMAC_SHA256; @@ -55,8 +55,8 @@ void DeviceToDeviceSecureContext::Encode(const std::string& message, const MessageCallback& callback) { // Create a GcmMetadata field to put in the header. - cryptauth::GcmMetadata gcm_metadata; - gcm_metadata.set_type(cryptauth::DEVICE_TO_DEVICE_MESSAGE); + GcmMetadata gcm_metadata; + gcm_metadata.set_type(DEVICE_TO_DEVICE_MESSAGE); gcm_metadata.set_version(kGcmMetadataVersion); // Wrap |message| inside a DeviceToDeviceMessage proto. @@ -64,7 +64,7 @@ device_to_device_message.set_sequence_number(++last_sequence_number_); device_to_device_message.set_message(message); - cryptauth::SecureMessageDelegate::CreateOptions create_options; + SecureMessageDelegate::CreateOptions create_options; create_options.encryption_scheme = securemessage::AES_256_CBC; create_options.signature_scheme = securemessage::HMAC_SHA256; gcm_metadata.SerializeToString(&create_options.public_metadata); @@ -105,9 +105,9 @@ } // Validate the GcmMetadata proto in the header. - cryptauth::GcmMetadata gcm_metadata; + GcmMetadata gcm_metadata; if (!gcm_metadata.ParseFromString(header.public_metadata()) || - gcm_metadata.type() != cryptauth::DEVICE_TO_DEVICE_MESSAGE || + gcm_metadata.type() != DEVICE_TO_DEVICE_MESSAGE || gcm_metadata.version() != kGcmMetadataVersion) { PA_LOG(ERROR) << "Failed to validate GcmMetadata."; callback.Run(std::string()); @@ -118,4 +118,4 @@ callback.Run(device_to_device_message.message()); } -} // proximity_auth +} // cryptauth
diff --git a/components/proximity_auth/device_to_device_secure_context.h b/components/cryptauth/device_to_device_secure_context.h similarity index 80% rename from components/proximity_auth/device_to_device_secure_context.h rename to components/cryptauth/device_to_device_secure_context.h index 196c7863..0b59033 100644 --- a/components/proximity_auth/device_to_device_secure_context.h +++ b/components/cryptauth/device_to_device_secure_context.h
@@ -2,30 +2,28 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H -#define COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H +#ifndef COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H_ +#define COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H_ #include <memory> #include "base/macros.h" #include "base/memory/weak_ptr.h" -#include "components/proximity_auth/secure_context.h" +#include "components/cryptauth/secure_context.h" namespace securemessage { class Header; } namespace cryptauth { -class SecureMessageDelegate; -} -namespace proximity_auth { +class SecureMessageDelegate; // SecureContext implementation for the DeviceToDevice protocol. class DeviceToDeviceSecureContext : public SecureContext { public: DeviceToDeviceSecureContext( - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate, + std::unique_ptr<SecureMessageDelegate> secure_message_delegate, const std::string& symmetric_key, const std::string& responder_auth_message_, ProtocolVersion protocol_version); @@ -51,7 +49,7 @@ const securemessage::Header& header); // Delegate for handling the creation and unwrapping of SecureMessages. - std::unique_ptr<cryptauth::SecureMessageDelegate> secure_message_delegate_; + std::unique_ptr<SecureMessageDelegate> secure_message_delegate_; // The symmetric key used to create and unwrap messages. const std::string symmetric_key_; @@ -71,6 +69,6 @@ DISALLOW_COPY_AND_ASSIGN(DeviceToDeviceSecureContext); }; -} // namespace proximity_auth +} // namespace cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H +#endif // COMPONENTS_CRYPTAUTH_DEVICE_TO_DEVICE_SECURE_CONTEXT_H_
diff --git a/components/proximity_auth/device_to_device_secure_context_unittest.cc b/components/cryptauth/device_to_device_secure_context_unittest.cc similarity index 89% rename from components/proximity_auth/device_to_device_secure_context_unittest.cc rename to components/cryptauth/device_to_device_secure_context_unittest.cc index 9707405..12c1994 100644 --- a/components/proximity_auth/device_to_device_secure_context_unittest.cc +++ b/components/cryptauth/device_to_device_secure_context_unittest.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/proximity_auth/device_to_device_secure_context.h" +#include "components/cryptauth/device_to_device_secure_context.h" #include <memory> @@ -13,7 +13,7 @@ #include "components/cryptauth/proto/securemessage.pb.h" #include "testing/gtest/include/gtest/gtest.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -33,7 +33,7 @@ protected: ProximityAuthDeviceToDeviceSecureContextTest() : secure_context_( - base::MakeUnique<cryptauth::FakeSecureMessageDelegate>(), + base::MakeUnique<FakeSecureMessageDelegate>(), kSymmetricKey, kResponderAuthMessage, kProtocolVersion) {} @@ -57,11 +57,11 @@ ASSERT_TRUE( header_and_body.ParseFromString(secure_message.header_and_body())); - cryptauth::GcmMetadata gcm_metadata; + GcmMetadata gcm_metadata; ASSERT_TRUE( gcm_metadata.ParseFromString(header_and_body.header().public_metadata())); EXPECT_EQ(1, gcm_metadata.version()); - EXPECT_EQ(cryptauth::DEVICE_TO_DEVICE_MESSAGE, gcm_metadata.type()); + EXPECT_EQ(DEVICE_TO_DEVICE_MESSAGE, gcm_metadata.type()); } TEST_F(ProximityAuthDeviceToDeviceSecureContextTest, DecodeInvalidMessage) { @@ -75,7 +75,7 @@ TEST_F(ProximityAuthDeviceToDeviceSecureContextTest, EncodeAndDecode) { // Initialize second secure channel with the same parameters as the first. DeviceToDeviceSecureContext secure_context2( - base::MakeUnique<cryptauth::FakeSecureMessageDelegate>(), kSymmetricKey, + base::MakeUnique<FakeSecureMessageDelegate>(), kSymmetricKey, kResponderAuthMessage, kProtocolVersion); std::string message = "encrypt this message"; @@ -96,7 +96,7 @@ DecodeInvalidSequenceNumber) { // Initialize second secure channel with the same parameters as the first. DeviceToDeviceSecureContext secure_context2( - base::MakeUnique<cryptauth::FakeSecureMessageDelegate>(), kSymmetricKey, + base::MakeUnique<FakeSecureMessageDelegate>(), kSymmetricKey, kResponderAuthMessage, kProtocolVersion); // Send a few messages over the first secure context. @@ -113,4 +113,4 @@ EXPECT_TRUE(decoded_message.empty()); } -} // proximity_auth +} // cryptauth
diff --git a/components/proximity_auth/fake_secure_context.cc b/components/cryptauth/fake_secure_context.cc similarity index 92% rename from components/proximity_auth/fake_secure_context.cc rename to components/cryptauth/fake_secure_context.cc index f8f8802..1592302d 100644 --- a/components/proximity_auth/fake_secure_context.cc +++ b/components/cryptauth/fake_secure_context.cc
@@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "components/proximity_auth/fake_secure_context.h" +#include "components/cryptauth/fake_secure_context.h" #include <stddef.h> #include "base/strings/string_util.h" -namespace proximity_auth { +namespace cryptauth { namespace { @@ -48,4 +48,4 @@ callback.Run(decoded_message); } -} // namespace proximity_auth +} // namespace cryptauth
diff --git a/components/proximity_auth/fake_secure_context.h b/components/cryptauth/fake_secure_context.h similarity index 76% rename from components/proximity_auth/fake_secure_context.h rename to components/cryptauth/fake_secure_context.h index 63cb7f9..fec5a68 100644 --- a/components/proximity_auth/fake_secure_context.h +++ b/components/cryptauth/fake_secure_context.h
@@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_FAKE_SECURE_CONTEXT_H_ -#define COMPONENTS_PROXIMITY_AUTH_FAKE_SECURE_CONTEXT_H_ +#ifndef COMPONENTS_CRYPTAUTH_FAKE_SECURE_CONTEXT_H_ +#define COMPONENTS_CRYPTAUTH_FAKE_SECURE_CONTEXT_H_ #include <string> #include "base/callback.h" #include "base/macros.h" -#include "components/proximity_auth/secure_context.h" +#include "components/cryptauth/secure_context.h" #include "testing/gmock/include/gmock/gmock.h" -namespace proximity_auth { +namespace cryptauth { class FakeSecureContext : public SecureContext { public: @@ -37,6 +37,6 @@ DISALLOW_COPY_AND_ASSIGN(FakeSecureContext); }; -} // namespace proximity_auth +} // namespace cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_FAKE_SECURE_CONTEXT_H_ +#endif // COMPONENTS_CRYPTAUTH_FAKE_SECURE_CONTEXT_H_
diff --git a/components/proximity_auth/secure_context.h b/components/cryptauth/secure_context.h similarity index 86% rename from components/proximity_auth/secure_context.h rename to components/cryptauth/secure_context.h index a86f9e9..3fa6932 100644 --- a/components/proximity_auth/secure_context.h +++ b/components/cryptauth/secure_context.h
@@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef COMPONENTS_PROXIMITY_AUTH_SECURE_CONTEXT_H -#define COMPONENTS_PROXIMITY_AUTH_SECURE_CONTEXT_H +#ifndef COMPONENTS_CRYPTAUTH_SECURE_CONTEXT_H_ +#define COMPONENTS_CRYPTAUTH_SECURE_CONTEXT_H_ #include "base/callback_forward.h" -namespace proximity_auth { +namespace cryptauth { // An interface used to decode and encode messages. class SecureContext { @@ -42,6 +42,6 @@ virtual std::string GetChannelBindingData() const = 0; }; -} // namespace proximity_auth +} // namespace cryptauth -#endif // COMPONENTS_PROXIMITY_AUTH_SECURE_CONTEXT_H +#endif // COMPONENTS_CRYPTAUTH_SECURE_CONTEXT_H_
diff --git a/components/policy/core/common/policy_loader_win.cc b/components/policy/core/common/policy_loader_win.cc index 1854f97..431bfc6e8 100644 --- a/components/policy/core/common/policy_loader_win.cc +++ b/components/policy/core/common/policy_loader_win.cc
@@ -13,6 +13,7 @@ #include <memory> #include <string> +#include <utility> #include <vector> #include "base/bind.h" @@ -63,13 +64,10 @@ // List of policies that are considered only if the user is part of a AD domain. // Please document any new additions in policy_templates.json! const char* kInsecurePolicies[] = { - key::kMetricsReportingEnabled, - key::kDefaultSearchProviderEnabled, - key::kHomepageIsNewTabPage, - key::kHomepageLocation, - key::kRestoreOnStartup, - key::kRestoreOnStartupURLs -}; + key::kMetricsReportingEnabled, key::kDefaultSearchProviderEnabled, + key::kHomepageIsNewTabPage, key::kHomepageLocation, + key::kNewTabPageLocation, key::kRestoreOnStartup, + key::kRestoreOnStartupURLs}; #pragma warning(push) #pragma warning(disable: 4068) // unknown pragmas
diff --git a/components/policy/resources/policy_templates.json b/components/policy/resources/policy_templates.json index 7938dd0..c80aa29e3 100644 --- a/components/policy/resources/policy_templates.json +++ b/components/policy/resources/policy_templates.json
@@ -139,7 +139,9 @@ # persistent IDs for all fields (but not for groups!) are needed. These are # specified by the 'id' keys of each policy. NEVER CHANGE EXISTING IDs, # because doing so would break the deployed wire format! -# For your editing convenience: highest ID currently used: 359 +# For your editing convenience: highest ID currently used: 360 +# And don't forget to also update the EnterprisePolicies enum of +# histograms.xml. # # Placeholders: # The following placeholder strings are automatically substituted: @@ -285,6 +287,41 @@ ], }, { + 'name': 'NewTabPage', + 'type': 'group', + 'caption': '''New Tab Page''', + 'desc': '''Configure the default New Tab page in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph>.''', + 'policies': [ + { + 'name': 'NewTabPageLocation', + 'type': 'string', + 'schema': { 'type': 'string' }, + 'supported_on': ['chrome.*:57-', 'chrome_os:57-'], + 'features': { + 'can_be_recommended': True, + 'dynamic_refresh': True, + 'per_profile': True, + }, + 'example_value': 'https://www.chromium.org', + 'id': 360, + 'caption': '''Configure the New Tab page URL''', + 'tags': [], + 'desc': '''Configures the default New Tab page URL in <ph name="PRODUCT_NAME">$1<ex>Google Chrome</ex></ph> and prevents users from changing it. + + The New Tab page is the page opened when new tabs are created (including the one opened in new windows). + + This policy does not decide which pages to be opened on start up. They are controlled by the RestoreOnStartup policies, which could be to open the New Tab page. + + The NewTabPageLocation can be set to a URL you specify here. It will also affect the Home Page if it is set to open the New Tab page, as well as the startup page if set to New Tab page. + + If the policy is not set or left empty the default new tab page is used. + + This policy is not available on Windows instances that are not joined to an Active Directory domain.''', + 'label': '''New Tab page URL''', + }, + ], + }, + { 'name': 'DefaultBrowserSettingEnabled', 'type': 'main', 'schema': { 'type': 'boolean' },
diff --git a/components/proximity_auth/BUILD.gn b/components/proximity_auth/BUILD.gn index 9e19dc5..655749ae 100644 --- a/components/proximity_auth/BUILD.gn +++ b/components/proximity_auth/BUILD.gn
@@ -6,8 +6,6 @@ static_library("proximity_auth") { sources = [ - "authenticator.cc", - "authenticator.h", "bluetooth_connection.cc", "bluetooth_connection.h", "bluetooth_connection_finder.cc", @@ -17,12 +15,6 @@ "bluetooth_util_chromeos.cc", "cryptauth_enroller_factory_impl.cc", "cryptauth_enroller_factory_impl.h", - "device_to_device_authenticator.cc", - "device_to_device_authenticator.h", - "device_to_device_initiator_operations.cc", - "device_to_device_initiator_operations.h", - "device_to_device_secure_context.cc", - "device_to_device_secure_context.h", "messenger.h", "messenger_impl.cc", "messenger_impl.h", @@ -50,7 +42,6 @@ "screenlock_bridge.cc", "screenlock_bridge.h", "screenlock_state.h", - "secure_context.h", "switches.cc", "switches.h", "throttled_bluetooth_connection_finder.cc", @@ -85,10 +76,6 @@ testonly = true sources = [ - "device_to_device_responder_operations.cc", - "device_to_device_responder_operations.h", - "fake_secure_context.cc", - "fake_secure_context.h", "mock_proximity_auth_client.cc", "mock_proximity_auth_client.h", ] @@ -110,9 +97,6 @@ sources = [ "bluetooth_connection_finder_unittest.cc", "bluetooth_connection_unittest.cc", - "device_to_device_authenticator_unittest.cc", - "device_to_device_operations_unittest.cc", - "device_to_device_secure_context_unittest.cc", "messenger_impl_unittest.cc", "proximity_auth_pref_manager_unittest.cc", "proximity_auth_system_unittest.cc",
diff --git a/components/proximity_auth/messenger.h b/components/proximity_auth/messenger.h index 1b058b4..d88f7d88 100644 --- a/components/proximity_auth/messenger.h +++ b/components/proximity_auth/messenger.h
@@ -5,10 +5,13 @@ #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_H #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_H +namespace cryptauth { +class SecureContext; +} + namespace proximity_auth { class MessengerObserver; -class SecureContext; // A messenger handling the Easy Unlock protocol, capable of parsing events from // the remote device and sending events for the local device. @@ -38,7 +41,7 @@ // Returns the SecureContext instance used by the messenger. Ownership of the // SecureContext is not passed. - virtual SecureContext* GetSecureContext() const = 0; + virtual cryptauth::SecureContext* GetSecureContext() const = 0; }; } // namespace proximity_auth
diff --git a/components/proximity_auth/messenger_impl.cc b/components/proximity_auth/messenger_impl.cc index 1a512b6..1d3def8 100644 --- a/components/proximity_auth/messenger_impl.cc +++ b/components/proximity_auth/messenger_impl.cc
@@ -15,11 +15,11 @@ #include "base/threading/thread_task_runner_handle.h" #include "base/values.h" #include "components/cryptauth/connection.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/wire_message.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger_observer.h" #include "components/proximity_auth/remote_status_update.h" -#include "components/proximity_auth/secure_context.h" namespace proximity_auth { namespace { @@ -70,8 +70,9 @@ } // namespace -MessengerImpl::MessengerImpl(std::unique_ptr<cryptauth::Connection> connection, - std::unique_ptr<SecureContext> secure_context) +MessengerImpl::MessengerImpl( + std::unique_ptr<cryptauth::Connection> connection, + std::unique_ptr<cryptauth::SecureContext> secure_context) : connection_(std::move(connection)), secure_context_(std::move(secure_context)), weak_ptr_factory_(this) { @@ -101,7 +102,7 @@ bool MessengerImpl::SupportsSignIn() const { // TODO(tengs): Support sign-in for Bluetooth LE protocol. return (secure_context_->GetProtocolVersion() == - SecureContext::PROTOCOL_VERSION_THREE_ONE) && + cryptauth::SecureContext::PROTOCOL_VERSION_THREE_ONE) && connection_->remote_device().bluetooth_type != cryptauth::RemoteDevice::BLUETOOTH_LE; } @@ -151,7 +152,7 @@ ProcessMessageQueue(); } -SecureContext* MessengerImpl::GetSecureContext() const { +cryptauth::SecureContext* MessengerImpl::GetSecureContext() const { return secure_context_.get(); }
diff --git a/components/proximity_auth/messenger_impl.h b/components/proximity_auth/messenger_impl.h index b917816..47310a0 100644 --- a/components/proximity_auth/messenger_impl.h +++ b/components/proximity_auth/messenger_impl.h
@@ -19,9 +19,11 @@ class DictionaryValue; } -namespace proximity_auth { - +namespace cryptauth { class SecureContext; +} + +namespace proximity_auth { // Concrete implementation of the Messenger interface. class MessengerImpl : public Messenger, public cryptauth::ConnectionObserver { @@ -31,7 +33,7 @@ // messages. The |connection| must be connected. The messenger begins // observing messages as soon as it is constructed. MessengerImpl(std::unique_ptr<cryptauth::Connection> connection, - std::unique_ptr<SecureContext> secure_context); + std::unique_ptr<cryptauth::SecureContext> secure_context); ~MessengerImpl() override; // Messenger: @@ -41,7 +43,7 @@ void DispatchUnlockEvent() override; void RequestDecryption(const std::string& challenge) override; void RequestUnlock() override; - SecureContext* GetSecureContext() const override; + cryptauth::SecureContext* GetSecureContext() const override; // Exposed for testing. cryptauth::Connection* connection() { return connection_.get(); } @@ -104,7 +106,7 @@ // Used to encrypt and decrypt payloads sent and received over the // |connection_|. - std::unique_ptr<SecureContext> secure_context_; + std::unique_ptr<cryptauth::SecureContext> secure_context_; // The registered observers of |this_| messenger. base::ObserverList<MessengerObserver> observers_;
diff --git a/components/proximity_auth/messenger_impl_unittest.cc b/components/proximity_auth/messenger_impl_unittest.cc index 5ff61dc1..7f7257e 100644 --- a/components/proximity_auth/messenger_impl_unittest.cc +++ b/components/proximity_auth/messenger_impl_unittest.cc
@@ -12,9 +12,9 @@ #include "components/cryptauth/connection.h" #include "components/cryptauth/cryptauth_test_util.h" #include "components/cryptauth/fake_connection.h" +#include "components/cryptauth/fake_secure_context.h" #include "components/cryptauth/remote_device.h" #include "components/cryptauth/wire_message.h" -#include "components/proximity_auth/fake_secure_context.h" #include "components/proximity_auth/messenger_observer.h" #include "components/proximity_auth/remote_status_update.h" #include "testing/gmock/include/gmock/gmock.h" @@ -65,15 +65,15 @@ TestMessenger() : MessengerImpl(base::MakeUnique<cryptauth::FakeConnection>( cryptauth::CreateClassicRemoteDeviceForTest()), - base::MakeUnique<FakeSecureContext>()) {} + base::MakeUnique<cryptauth::FakeSecureContext>()) {} ~TestMessenger() override {} // Simple getters for the mock objects owned by |this| messenger. cryptauth::FakeConnection* GetFakeConnection() { return static_cast<cryptauth::FakeConnection*>(connection()); } - FakeSecureContext* GetFakeSecureContext() { - return static_cast<FakeSecureContext*>(GetSecureContext()); + cryptauth::FakeSecureContext* GetFakeSecureContext() { + return static_cast<cryptauth::FakeSecureContext*>(GetSecureContext()); } private: @@ -85,14 +85,14 @@ TEST(ProximityAuthMessengerImplTest, SupportsSignIn_ProtocolVersionThreeZero) { TestMessenger messenger; messenger.GetFakeSecureContext()->set_protocol_version( - SecureContext::PROTOCOL_VERSION_THREE_ZERO); + cryptauth::SecureContext::PROTOCOL_VERSION_THREE_ZERO); EXPECT_FALSE(messenger.SupportsSignIn()); } TEST(ProximityAuthMessengerImplTest, SupportsSignIn_ProtocolVersionThreeOne) { TestMessenger messenger; messenger.GetFakeSecureContext()->set_protocol_version( - SecureContext::PROTOCOL_VERSION_THREE_ONE); + cryptauth::SecureContext::PROTOCOL_VERSION_THREE_ONE); EXPECT_TRUE(messenger.SupportsSignIn()); } @@ -143,7 +143,7 @@ RequestDecryption_SignInUnsupported_DoesntSendMessage) { TestMessenger messenger; messenger.GetFakeSecureContext()->set_protocol_version( - SecureContext::PROTOCOL_VERSION_THREE_ZERO); + cryptauth::SecureContext::PROTOCOL_VERSION_THREE_ZERO); messenger.RequestDecryption(kChallenge); EXPECT_FALSE(messenger.GetFakeConnection()->current_message()); } @@ -260,7 +260,7 @@ RequestUnlock_SignInUnsupported_DoesntSendMessage) { TestMessenger messenger; messenger.GetFakeSecureContext()->set_protocol_version( - SecureContext::PROTOCOL_VERSION_THREE_ZERO); + cryptauth::SecureContext::PROTOCOL_VERSION_THREE_ZERO); messenger.RequestUnlock(); EXPECT_FALSE(messenger.GetFakeConnection()->current_message()); }
diff --git a/components/proximity_auth/remote_device_life_cycle_impl.cc b/components/proximity_auth/remote_device_life_cycle_impl.cc index da72aea..9c8e7e5 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl.cc +++ b/components/proximity_auth/remote_device_life_cycle_impl.cc
@@ -13,16 +13,16 @@ #include "base/time/default_tick_clock.h" #include "components/cryptauth/bluetooth_throttler_impl.h" #include "components/cryptauth/connection_finder.h" +#include "components/cryptauth/device_to_device_authenticator.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/secure_message_delegate.h" #include "components/proximity_auth/ble/bluetooth_low_energy_connection.h" #include "components/proximity_auth/ble/bluetooth_low_energy_connection_finder.h" #include "components/proximity_auth/bluetooth_connection.h" #include "components/proximity_auth/bluetooth_connection_finder.h" -#include "components/proximity_auth/device_to_device_authenticator.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger_impl.h" #include "components/proximity_auth/proximity_auth_client.h" -#include "components/proximity_auth/secure_context.h" namespace proximity_auth { @@ -95,9 +95,9 @@ } } -std::unique_ptr<Authenticator> +std::unique_ptr<cryptauth::Authenticator> RemoteDeviceLifeCycleImpl::CreateAuthenticator() { - return base::MakeUnique<DeviceToDeviceAuthenticator>( + return base::MakeUnique<cryptauth::DeviceToDeviceAuthenticator>( connection_.get(), remote_device_.user_id, proximity_auth_client_->CreateSecureMessageDelegate()); } @@ -132,11 +132,11 @@ } void RemoteDeviceLifeCycleImpl::OnAuthenticationResult( - Authenticator::Result result, - std::unique_ptr<SecureContext> secure_context) { + cryptauth::Authenticator::Result result, + std::unique_ptr<cryptauth::SecureContext> secure_context) { DCHECK(state_ == RemoteDeviceLifeCycle::State::AUTHENTICATING); authenticator_.reset(); - if (result != Authenticator::Result::SUCCESS) { + if (result != cryptauth::Authenticator::Result::SUCCESS) { PA_LOG(WARNING) << "Waiting " << kAuthenticationRecoveryTimeSeconds << " seconds to retry after authentication failure."; connection_->Disconnect();
diff --git a/components/proximity_auth/remote_device_life_cycle_impl.h b/components/proximity_auth/remote_device_life_cycle_impl.h index a7265fc..38f227a7 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl.h +++ b/components/proximity_auth/remote_device_life_cycle_impl.h
@@ -11,19 +11,22 @@ #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "base/timer/timer.h" +#include "components/cryptauth/authenticator.h" #include "components/cryptauth/bluetooth_throttler.h" #include "components/cryptauth/connection.h" #include "components/cryptauth/connection_finder.h" #include "components/cryptauth/remote_device.h" -#include "components/proximity_auth/authenticator.h" #include "components/proximity_auth/messenger_observer.h" #include "components/proximity_auth/remote_device_life_cycle.h" +namespace cryptauth { +class SecureContext; +} + namespace proximity_auth { class Messenger; class ProximityAuthClient; -class SecureContext; // Implementation of RemoteDeviceLifeCycle. class RemoteDeviceLifeCycleImpl : public RemoteDeviceLifeCycle, @@ -51,7 +54,7 @@ // Creates and returns an Authenticator instance for |connection_|. // Exposed for testing. - virtual std::unique_ptr<Authenticator> CreateAuthenticator(); + virtual std::unique_ptr<cryptauth::Authenticator> CreateAuthenticator(); private: // Transitions to |new_state|, and notifies observers. @@ -65,8 +68,9 @@ void OnConnectionFound(std::unique_ptr<cryptauth::Connection> connection); // Callback when |authenticator_| completes authentication. - void OnAuthenticationResult(Authenticator::Result result, - std::unique_ptr<SecureContext> secure_context); + void OnAuthenticationResult( + cryptauth::Authenticator::Result result, + std::unique_ptr<cryptauth::SecureContext> secure_context); // Creates the messenger which parses status updates. void CreateMessenger(); @@ -91,7 +95,7 @@ // Context for encrypting and decrypting messages. Created after // authentication succeeds. Ownership is eventually passed to |messenger_|. - std::unique_ptr<SecureContext> secure_context_; + std::unique_ptr<cryptauth::SecureContext> secure_context_; // The messenger for sending and receiving messages in the // SECURE_CHANNEL_ESTABLISHED state. @@ -99,7 +103,7 @@ // Authenticates the remote device after it is connected. Used in the // AUTHENTICATING state. - std::unique_ptr<Authenticator> authenticator_; + std::unique_ptr<cryptauth::Authenticator> authenticator_; // Used in the FINDING_CONNECTION state to establish a connection to the // remote device.
diff --git a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc index 9abc9b2..e7bebd5 100644 --- a/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc +++ b/components/proximity_auth/remote_device_life_cycle_impl_unittest.cc
@@ -13,13 +13,13 @@ #include "base/macros.h" #include "base/test/test_simple_task_runner.h" #include "base/threading/thread_task_runner_handle.h" +#include "components/cryptauth/authenticator.h" #include "components/cryptauth/connection_finder.h" #include "components/cryptauth/cryptauth_test_util.h" #include "components/cryptauth/fake_connection.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/wire_message.h" -#include "components/proximity_auth/authenticator.h" #include "components/proximity_auth/messenger.h" -#include "components/proximity_auth/secure_context.h" #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" @@ -33,7 +33,7 @@ namespace { -class StubSecureContext : public SecureContext { +class StubSecureContext : public cryptauth::SecureContext { public: StubSecureContext() {} ~StubSecureContext() override {} @@ -92,7 +92,7 @@ DISALLOW_COPY_AND_ASSIGN(FakeConnectionFinder); }; -class FakeAuthenticator : public Authenticator { +class FakeAuthenticator : public cryptauth::Authenticator { public: FakeAuthenticator(cryptauth::Connection* connection) : connection_(connection) {} @@ -104,16 +104,16 @@ connection_->remote_device().public_key); } - void OnAuthenticationResult(Authenticator::Result result) { + void OnAuthenticationResult(cryptauth::Authenticator::Result result) { ASSERT_FALSE(callback_.is_null()); - std::unique_ptr<SecureContext> secure_context; + std::unique_ptr<cryptauth::SecureContext> secure_context; if (result == Authenticator::Result::SUCCESS) secure_context.reset(new StubSecureContext()); callback_.Run(result, std::move(secure_context)); } private: - // Authenticator: + // cryptauth::Authenticator: void Authenticate(const AuthenticationCallback& callback) override { ASSERT_TRUE(callback_.is_null()); callback_ = callback; @@ -148,7 +148,7 @@ return std::move(scoped_connection_finder); } - std::unique_ptr<Authenticator> CreateAuthenticator() override { + std::unique_ptr<cryptauth::Authenticator> CreateAuthenticator() override { EXPECT_TRUE(connection_finder_); std::unique_ptr<FakeAuthenticator> scoped_authenticator( new FakeAuthenticator(connection_finder_->connection())); @@ -209,12 +209,12 @@ return life_cycle_.connection_finder()->connection(); } - void Authenticate(Authenticator::Result result) { + void Authenticate(cryptauth::Authenticator::Result result) { EXPECT_EQ(RemoteDeviceLifeCycle::State::AUTHENTICATING, life_cycle_.GetState()); RemoteDeviceLifeCycle::State expected_state = - (result == Authenticator::Result::SUCCESS) + (result == cryptauth::Authenticator::Result::SUCCESS) ? RemoteDeviceLifeCycle::State::SECURE_CHANNEL_ESTABLISHED : RemoteDeviceLifeCycle::State::AUTHENTICATION_FAILED; @@ -223,7 +223,7 @@ expected_state)); life_cycle_.authenticator()->OnAuthenticationResult(result); - if (result == Authenticator::Result::SUCCESS) + if (result == cryptauth::Authenticator::Result::SUCCESS) task_runner_->RunUntilIdle(); EXPECT_EQ(expected_state, life_cycle_.GetState()); @@ -259,7 +259,7 @@ StartLifeCycle(); for (size_t i = 0; i < 3; ++i) { cryptauth::Connection* connection = OnConnectionFound(); - Authenticate(Authenticator::Result::SUCCESS); + Authenticate(cryptauth::Authenticator::Result::SUCCESS); EXPECT_TRUE(life_cycle_.GetMessenger()); EXPECT_CALL(*this, @@ -275,7 +275,7 @@ // Simulate an authentication failure after connecting to the device. StartLifeCycle(); OnConnectionFound(); - Authenticate(Authenticator::Result::FAILURE); + Authenticate(cryptauth::Authenticator::Result::FAILURE); EXPECT_FALSE(life_cycle_.GetMessenger()); // After a delay, the life cycle should return to FINDING_CONNECTION. @@ -288,7 +288,7 @@ // Try failing with the DISCONNECTED state instead. OnConnectionFound(); - Authenticate(Authenticator::Result::DISCONNECTED); + Authenticate(cryptauth::Authenticator::Result::DISCONNECTED); EXPECT_FALSE(life_cycle_.GetMessenger()); // Check we're back in FINDING_CONNECTION state again. @@ -305,14 +305,14 @@ // Authentication fails on first pass. StartLifeCycle(); OnConnectionFound(); - Authenticate(Authenticator::Result::FAILURE); + Authenticate(cryptauth::Authenticator::Result::FAILURE); EXPECT_FALSE(life_cycle_.GetMessenger()); EXPECT_CALL(*this, OnLifeCycleStateChanged(_, _)); task_runner_->RunUntilIdle(); // Authentication succeeds on second pass. cryptauth::Connection* connection = OnConnectionFound(); - Authenticate(Authenticator::Result::SUCCESS); + Authenticate(cryptauth::Authenticator::Result::SUCCESS); EXPECT_TRUE(life_cycle_.GetMessenger()); EXPECT_CALL(*this, OnLifeCycleStateChanged(_, _)); connection->Disconnect();
diff --git a/components/proximity_auth/unlock_manager.cc b/components/proximity_auth/unlock_manager.cc index fd745b52..5f66554 100644 --- a/components/proximity_auth/unlock_manager.cc +++ b/components/proximity_auth/unlock_manager.cc
@@ -13,12 +13,12 @@ #include "base/time/time.h" #include "build/build_config.h" #include "components/cryptauth/remote_device.h" +#include "components/cryptauth/secure_context.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger.h" #include "components/proximity_auth/metrics.h" #include "components/proximity_auth/proximity_auth_client.h" #include "components/proximity_auth/proximity_monitor_impl.h" -#include "components/proximity_auth/secure_context.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #if defined(OS_CHROMEOS)
diff --git a/components/proximity_auth/unlock_manager_unittest.cc b/components/proximity_auth/unlock_manager_unittest.cc index d502265..15f8682b 100644 --- a/components/proximity_auth/unlock_manager_unittest.cc +++ b/components/proximity_auth/unlock_manager_unittest.cc
@@ -13,7 +13,8 @@ #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "components/cryptauth/cryptauth_test_util.h" -#include "components/proximity_auth/fake_secure_context.h" +#include "components/cryptauth/fake_secure_context.h" +#include "components/cryptauth/secure_context.h" #include "components/proximity_auth/logging/logging.h" #include "components/proximity_auth/messenger.h" #include "components/proximity_auth/mock_proximity_auth_client.h" @@ -21,7 +22,6 @@ #include "components/proximity_auth/remote_device_life_cycle.h" #include "components/proximity_auth/remote_status_update.h" #include "components/proximity_auth/screenlock_bridge.h" -#include "components/proximity_auth/secure_context.h" #include "device/bluetooth/bluetooth_adapter_factory.h" #include "device/bluetooth/test/mock_bluetooth_adapter.h" #include "testing/gmock/include/gmock/gmock.h" @@ -80,7 +80,7 @@ MOCK_METHOD0(DispatchUnlockEvent, void()); MOCK_METHOD1(RequestDecryption, void(const std::string& challenge)); MOCK_METHOD0(RequestUnlock, void()); - MOCK_CONST_METHOD0(GetSecureContext, SecureContext*()); + MOCK_CONST_METHOD0(GetSecureContext, cryptauth::SecureContext*()); private: DISALLOW_COPY_AND_ASSIGN(MockMessenger); @@ -262,7 +262,7 @@ NiceMock<MockRemoteDeviceLifeCycle> life_cycle_; NiceMock<MockMessenger> messenger_; std::unique_ptr<TestUnlockManager> unlock_manager_; - FakeSecureContext secure_context_; + cryptauth::FakeSecureContext secure_context_; private: scoped_refptr<base::TestSimpleTaskRunner> task_runner_;
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.cc b/components/proximity_auth/webui/proximity_auth_webui_handler.cc index 87880be..e93e39f7 100644 --- a/components/proximity_auth/webui/proximity_auth_webui_handler.cc +++ b/components/proximity_auth/webui/proximity_auth_webui_handler.cc
@@ -17,6 +17,7 @@ #include "base/values.h" #include "components/cryptauth/cryptauth_enrollment_manager.h" #include "components/cryptauth/proto/cryptauth_api.pb.h" +#include "components/cryptauth/secure_context.h" #include "components/cryptauth/secure_message_delegate.h" #include "components/prefs/pref_service.h" #include "components/proximity_auth/ble/pref_names.h" @@ -26,7 +27,6 @@ #include "components/proximity_auth/remote_device_life_cycle_impl.h" #include "components/proximity_auth/remote_device_loader.h" #include "components/proximity_auth/remote_status_update.h" -#include "components/proximity_auth/secure_context.h" #include "components/proximity_auth/webui/reachable_phone_flow.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_ui.h"
diff --git a/components/proximity_auth/webui/proximity_auth_webui_handler.h b/components/proximity_auth/webui/proximity_auth_webui_handler.h index 2f8e1069..d0d476a 100644 --- a/components/proximity_auth/webui/proximity_auth_webui_handler.h +++ b/components/proximity_auth/webui/proximity_auth_webui_handler.h
@@ -13,7 +13,6 @@ #include "components/cryptauth/cryptauth_device_manager.h" #include "components/cryptauth/cryptauth_enrollment_manager.h" #include "components/cryptauth/cryptauth_gcm_manager.h" -#include "components/proximity_auth/authenticator.h" #include "components/proximity_auth/logging/log_buffer.h" #include "components/proximity_auth/messenger_observer.h" #include "components/proximity_auth/proximity_auth_client.h"
diff --git a/components/security_state/core/security_state.cc b/components/security_state/core/security_state.cc index d5e867ed..e1f7065 100644 --- a/components/security_state/core/security_state.cc +++ b/components/security_state/core/security_state.cc
@@ -74,9 +74,17 @@ if (!GetSecurityLevelAndHistogramValueForNonSecureFieldTrial( group, displayed_sensitive_input_on_http, &level, &status)) { // If neither the command-line switch nor field trial group is set, then - // nonsecure defaults to neutral. + // nonsecure defaults to neutral for iOS and HTTP_SHOW_WARNING on other + // platforms. +#if defined(OS_IOS) status = NEUTRAL; level = NONE; +#else + status = HTTP_SHOW_WARNING; + level = displayed_sensitive_input_on_http + ? security_state::HTTP_SHOW_WARNING + : NONE; +#endif } }
diff --git a/components/security_state/core/security_state_unittest.cc b/components/security_state/core/security_state_unittest.cc index f6a899cf..13409f3 100644 --- a/components/security_state/core/security_state_unittest.cc +++ b/components/security_state/core/security_state_unittest.cc
@@ -274,24 +274,6 @@ EXPECT_EQ(HTTP_SHOW_WARNING, security_info.security_level); } -// Tests that neither password nor credit fields cause the security -// level to be downgraded to HTTP_SHOW_WARNING when the command-line switch -// is NOT set. -TEST(SecurityStateTest, HttpWarningNotSetWithoutSwitch) { - TestSecurityStateHelper helper; - helper.UseHttpUrl(); - helper.set_displayed_password_field_on_http(true); - SecurityInfo security_info; - helper.GetSecurityInfo(&security_info); - EXPECT_TRUE(security_info.displayed_password_field_on_http); - EXPECT_EQ(NONE, security_info.security_level); - - helper.set_displayed_credit_card_field_on_http(true); - helper.GetSecurityInfo(&security_info); - EXPECT_TRUE(security_info.displayed_credit_card_field_on_http); - EXPECT_EQ(NONE, security_info.security_level); -} - // Tests that neither |displayed_password_field_on_http| nor // |displayed_credit_card_field_on_http| is set when the corresponding // VisibleSecurityState flags are not set.
diff --git a/content/browser/frame_host/frame_tree_node.cc b/content/browser/frame_host/frame_tree_node.cc index a67de69..57d92fd 100644 --- a/content/browser/frame_host/frame_tree_node.cc +++ b/content/browser/frame_host/frame_tree_node.cc
@@ -102,7 +102,8 @@ unique_name, blink::WebSandboxFlags::None, false /* should enforce strict mixed content checking */, - false /* is a potentially trustworthy unique origin */), + false /* is a potentially trustworthy unique origin */, + false /* has received a user gesture */), pending_sandbox_flags_(blink::WebSandboxFlags::None), frame_owner_properties_(frame_owner_properties), loading_progress_(kLoadingProgressNotStarted), @@ -509,6 +510,11 @@ } } +void FrameTreeNode::OnSetHasReceivedUserGesture() { + render_manager_.OnSetHasReceivedUserGesture(); + replication_state_.has_received_user_gesture = true; +} + FrameTreeNode* FrameTreeNode::GetSibling(int relative_offset) const { if (!parent_ || !parent_->child_count()) return nullptr;
diff --git a/content/browser/frame_host/frame_tree_node.h b/content/browser/frame_host/frame_tree_node.h index 7017871..581dfd2 100644 --- a/content/browser/frame_host/frame_tree_node.h +++ b/content/browser/frame_host/frame_tree_node.h
@@ -299,6 +299,8 @@ // Returns the BlameContext associated with this node. FrameTreeNodeBlameContext& blame_context() { return blame_context_; } + void OnSetHasReceivedUserGesture(); + private: class OpenerDestroyedObserver;
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index d900dfd..e496ce34c 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -760,6 +760,8 @@ OnSerializeAsMHTMLResponse) IPC_MESSAGE_HANDLER(FrameHostMsg_SelectionChanged, OnSelectionChanged) IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) + IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, + OnSetHasReceivedUserGesture) #if defined(USE_EXTERNAL_POPUP_MENU) IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) @@ -2199,6 +2201,10 @@ bounds_in_frame_widget.size())); } +void RenderFrameHostImpl::OnSetHasReceivedUserGesture() { + frame_tree_node_->OnSetHasReceivedUserGesture(); +} + #if defined(USE_EXTERNAL_POPUP_MENU) void RenderFrameHostImpl::OnShowPopup( const FrameHostMsg_ShowPopup_Params& params) {
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h index eb809c41..ae1f9485 100644 --- a/content/browser/frame_host/render_frame_host_impl.h +++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -742,6 +742,7 @@ const gfx::Range& range); void OnFocusedNodeChanged(bool is_editable_element, const gfx::Rect& bounds_in_frame_widget); + void OnSetHasReceivedUserGesture(); #if defined(USE_EXTERNAL_POPUP_MENU) void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params);
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc index 1dc50e7..7f9d3a20 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -1059,6 +1059,13 @@ } } +void RenderFrameHostManager::OnSetHasReceivedUserGesture() { + for (const auto& pair : proxy_hosts_) { + pair.second->Send( + new FrameMsg_SetHasReceivedUserGesture(pair.second->GetRoutingID())); + } +} + void RenderFrameHostManager::ActiveFrameCountIsZero( SiteInstanceImpl* site_instance) { // |site_instance| no longer contains any active RenderFrameHosts, so we don't
diff --git a/content/browser/frame_host/render_frame_host_manager.h b/content/browser/frame_host/render_frame_host_manager.h index 6ffb6f0..7a1e626 100644 --- a/content/browser/frame_host/render_frame_host_manager.h +++ b/content/browser/frame_host/render_frame_host_manager.h
@@ -509,6 +509,8 @@ // match the provided |render_frame_host|. void CancelPendingIfNecessary(RenderFrameHostImpl* render_frame_host); + void OnSetHasReceivedUserGesture(); + // Sets up the necessary state for a new RenderViewHost. If |proxy| is not // null, it creates a RenderFrameProxy in the target renderer process which is // used to route IPC messages when in swapped out state. Returns early if the
diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc index b8ec5d3..5ed80d7 100644 --- a/content/browser/frame_host/render_frame_proxy_host.cc +++ b/content/browser/frame_host/render_frame_proxy_host.cc
@@ -139,8 +139,6 @@ IPC_MESSAGE_HANDLER(FrameHostMsg_DidChangeOpener, OnDidChangeOpener) IPC_MESSAGE_HANDLER(FrameHostMsg_AdvanceFocus, OnAdvanceFocus) IPC_MESSAGE_HANDLER(FrameHostMsg_FrameFocused, OnFrameFocused) - IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, - OnSetHasReceivedUserGesture) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -378,8 +376,4 @@ frame_tree_node_, GetSiteInstance()); } -void RenderFrameProxyHost::OnSetHasReceivedUserGesture() { - frame_tree_node_->current_frame_host()->SetHasReceivedUserGesture(); -} - } // namespace content
diff --git a/content/browser/frame_host/render_frame_proxy_host.h b/content/browser/frame_host/render_frame_proxy_host.h index 2e2c57e..dc89471 100644 --- a/content/browser/frame_host/render_frame_proxy_host.h +++ b/content/browser/frame_host/render_frame_proxy_host.h
@@ -122,7 +122,6 @@ void OnDidChangeOpener(int32_t opener_routing_id); void OnAdvanceFocus(blink::WebFocusType type, int32_t source_routing_id); void OnFrameFocused(); - void OnSetHasReceivedUserGesture(); // This RenderFrameProxyHost's routing id. int routing_id_;
diff --git a/content/browser/hyphenation/hyphenation_impl.cc b/content/browser/hyphenation/hyphenation_impl.cc index 9ff14bda..c4d020f 100644 --- a/content/browser/hyphenation/hyphenation_impl.cc +++ b/content/browser/hyphenation/hyphenation_impl.cc
@@ -11,7 +11,7 @@ #include "base/files/file.h" #include "base/files/file_path.h" #include "base/memory/ptr_util.h" -#include "base/metrics/histogram.h" +#include "base/metrics/histogram_macros.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/timer/elapsed_timer.h"
diff --git a/content/browser/media/media_canplaytype_browsertest.cc b/content/browser/media/media_canplaytype_browsertest.cc index 4b87770..0356b44a 100644 --- a/content/browser/media/media_canplaytype_browsertest.cc +++ b/content/browser/media/media_canplaytype_browsertest.cc
@@ -6,6 +6,7 @@ #include "base/command_line.h" #include "base/macros.h" +#include "base/strings/string_util.h" #include "build/build_config.h" #include "content/browser/media/media_browsertest.h" #include "content/public/test/browser_test_utils.h" @@ -199,8 +200,8 @@ // Remove all but "audio/mpeg" when https://crbug.com/592889 is fixed. if (mime != "audio/mpeg" && mime != "audio/mp4" && mime != "video/mp4" && - mime != "application/x-mpegurl" && - mime != "application/vnd.apple.mpegurl" && mime != "video/mp2t") { + mime != "video/mp2t" && + !base::EndsWith(mime, "mpegurl", base::CompareCase::SENSITIVE)) { EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp3\"'")); } @@ -523,6 +524,80 @@ EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"unknown\"'")); } + void TestHLSCombinations(const std::string& mime) { + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "'")); + + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc1\"'")); + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc3\"'")); + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"mp4a.40\"'")); + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc1, mp4a.40\"'")); + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc3, mp4a.40\"'")); + + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc1.42E01E\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc1.42101E\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc1.42701E\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc1.42F01E\"'")); + + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc3.42E01E\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc3.42801E\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"avc3.42C01E\"'")); + + // Android, is the only platform that supports these types, and its HLS + // implementations uses platform codecs, which do not include MPEG-2 AAC. + // See https://crbug.com/544268. + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.66\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.67\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.68\"'")); + + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"mp4a.69\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"mp4a.6B\"'")); + + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"mp4a.40.2\"'")); + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"mp4a.40.02\"'")); + EXPECT_EQ(kHlsProbably, + CanPlay("'" + mime + "; codecs=\"avc1.42E01E, mp4a.40.2\"'")); + EXPECT_EQ(kHlsProbably, + CanPlay("'" + mime + "; codecs=\"avc1.42E01E, mp4a.40.02\"'")); + EXPECT_EQ(kHlsProbably, + CanPlay("'" + mime + "; codecs=\"avc3.42E01E, mp4a.40.5\"'")); + EXPECT_EQ(kHlsProbably, + CanPlay("'" + mime + "; codecs=\"avc3.42E01E, mp4a.40.05\"'")); + EXPECT_EQ(kHlsProbably, + CanPlay("'" + mime + "; codecs=\"avc3.42E01E, mp4a.40.29\"'")); + + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"hev1.1.6.L93.B0\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"hvc1.1.6.L93.B0\"'")); + EXPECT_EQ(kNot, + CanPlay("'" + mime + "; codecs=\"hev1.1.6.L93.B0,mp4a.40.5\"'")); + EXPECT_EQ(kNot, + CanPlay("'" + mime + "; codecs=\"hvc1.1.6.L93.B0,mp4a.40.5\"'")); + + EXPECT_EQ(kNot, + CanPlay("'" + mime + "; codecs=\"vp09.01.01.08.04.03.00.00\"'")); + + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"ac-3\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"ec-3\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.A5\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.A6\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.a5\"'")); + EXPECT_EQ(kNot, CanPlay("'" + mime + "; codecs=\"mp4a.a6\"'")); + + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc1, mp4a.40.2\"'")); + EXPECT_EQ(kHlsMaybe, + CanPlay("'" + mime + "; codecs=\"avc1, mp4a.40.02\"'")); + EXPECT_EQ(kHlsMaybe, CanPlay("'" + mime + "; codecs=\"avc3, mp4a.40.2\"'")); + EXPECT_EQ(kHlsMaybe, + CanPlay("'" + mime + "; codecs=\"avc3, mp4a.40.02\"'")); + EXPECT_EQ(kHlsMaybe, + CanPlay("'" + mime + "; codecs=\"avc1.42E01E, mp4a.40\"'")); + EXPECT_EQ(kHlsMaybe, + CanPlay("'" + mime + "; codecs=\"avc3.42E01E, mp4a.40\"'")); + + TestMPEGUnacceptableCombinations(mime); + // This result is incorrect. See https://crbug.com/592889. + EXPECT_EQ(kHlsProbably, CanPlay("'" + mime + "; codecs=\"mp3\"'")); + } + private: GURL url_; DISALLOW_COPY_AND_ASSIGN(MediaCanPlayTypeTest); @@ -1336,206 +1411,10 @@ } IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_HLS) { - EXPECT_EQ(kHlsMaybe, CanPlay("'application/x-mpegurl'")); - - EXPECT_EQ(kHlsMaybe, CanPlay("'application/x-mpegurl; codecs=\"avc1\"'")); - EXPECT_EQ(kHlsMaybe, CanPlay("'application/x-mpegurl; codecs=\"avc3\"'")); - EXPECT_EQ(kHlsMaybe, CanPlay("'application/x-mpegurl; codecs=\"mp4a.40\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc1, mp4a.40\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc3, mp4a.40\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42E01E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42101E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42701E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42F01E\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42E01E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42801E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42C01E\"'")); - - // Android, is the only platform that supports these types, and its HLS - // implementations uses platform codecs, which do not include MPEG-2 AAC. - // See https://crbug.com/544268. - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.66\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.67\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.68\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"mp4a.69\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"mp4a.6B\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"mp4a.40.2\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"mp4a.40.02\"'")); - EXPECT_EQ( - kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42E01E, mp4a.40.2\"'")); - EXPECT_EQ( - kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42E01E, mp4a.40.02\"'")); - EXPECT_EQ( - kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42E01E, mp4a.40.5\"'")); - EXPECT_EQ( - kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42E01E, mp4a.40.05\"'")); - EXPECT_EQ( - kHlsProbably, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42E01E, mp4a.40.29\"'")); - - EXPECT_EQ(kNot, - CanPlay("'application/x-mpegurl; codecs=\"hev1.1.6.L93.B0\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/x-mpegurl; codecs=\"hvc1.1.6.L93.B0\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/x-mpegurl; codecs=\"hev1.1.6.L93.B0,mp4a.40.5\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/x-mpegurl; codecs=\"hvc1.1.6.L93.B0,mp4a.40.5\"'")); - - EXPECT_EQ( - kNot, - CanPlay("'application/x-mpegurl; codecs=\"vp09.01.01.08.04.03.00.00\"'")); - - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"ac-3\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"ec-3\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.A5\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.A6\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.a5\"'")); - EXPECT_EQ(kNot, CanPlay("'application/x-mpegurl; codecs=\"mp4a.a6\"'")); - - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc1, mp4a.40.2\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc1, mp4a.40.02\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc3, mp4a.40.2\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc3, mp4a.40.02\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc1.42E01E, mp4a.40\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/x-mpegurl; codecs=\"avc3.42E01E, mp4a.40\"'")); - - TestMPEGUnacceptableCombinations("application/x-mpegurl"); - // This result is incorrect. See https://crbug.com/592889. - EXPECT_EQ(kHlsProbably, CanPlay("'application/x-mpegurl; codecs=\"mp3\"'")); - - EXPECT_EQ(kHlsMaybe, CanPlay("'application/vnd.apple.mpegurl'")); - - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3\"'")); - EXPECT_EQ(kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, mp4a.40\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, mp4a.40\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.42E01E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.42101E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.42701E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1.42F01E\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.42E01E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.42801E\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3.42C01E\"'")); - - // Android, is the only platform that supports these types, and its HLS - // implementations uses platform codecs, which do not include MPEG-2 AAC. - // See https://crbug.com/544268. - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.66\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.67\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.68\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.69\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.6B\"'")); - - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.2\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.02\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.5\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.05\"'")); - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.40.29\"'")); - - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, mp4a.40.2\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc1, mp4a.40.02\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, mp4a.40.2\"'")); - EXPECT_EQ( - kHlsMaybe, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"avc3, mp4a.40.02\"'")); - EXPECT_EQ(kHlsMaybe, CanPlay("'application/vnd.apple.mpegurl; " - "codecs=\"avc1.42E01E, mp4a.40\"'")); - EXPECT_EQ(kHlsMaybe, CanPlay("'application/vnd.apple.mpegurl; " - "codecs=\"avc3.42E01E, mp4a.40\"'")); - - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"hev1.1.6.L93.B0\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"hvc1.1.6.L93.B0\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; " - "codecs=\"hev1.1.6.L93.B0,mp4a.40.5\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; " - "codecs=\"hvc1.1.6.L93.B0,mp4a.40.5\"'")); - - EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; " - "codecs=\"vp09.01.01.08.04.03.00.00\"'")); - - EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"ac-3\"'")); - EXPECT_EQ(kNot, CanPlay("'application/vnd.apple.mpegurl; codecs=\"ec-3\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.A5\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.A6\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.a5\"'")); - EXPECT_EQ(kNot, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp4a.a6\"'")); - - TestMPEGUnacceptableCombinations("application/vnd.apple.mpegurl"); - // This result is incorrect. See https://crbug.com/592889. - EXPECT_EQ(kHlsProbably, - CanPlay("'application/vnd.apple.mpegurl; codecs=\"mp3\"'")); + TestHLSCombinations("application/vnd.apple.mpegurl"); + TestHLSCombinations("application/x-mpegurl"); + TestHLSCombinations("audio/mpegurl"); + TestHLSCombinations("audio/x-mpegurl"); } IN_PROC_BROWSER_TEST_F(MediaCanPlayTypeTest, CodecSupportTest_AAC_ADTS) {
diff --git a/content/browser/memory/OWNERS b/content/browser/memory/OWNERS index 26ad3ee4c..04e3019f 100644 --- a/content/browser/memory/OWNERS +++ b/content/browser/memory/OWNERS
@@ -1,3 +1,6 @@ bashi@chromium.org chrisha@chromium.org haraken@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>MemoryAllocator
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index bd1dbf4..5e75c17 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1794,7 +1794,6 @@ switches::kUseGL, switches::kUseGpuInTests, switches::kUseMobileUserAgent, - switches::kUseRemoteCompositing, switches::kV, switches::kV8CacheStrategiesForCacheStorage, switches::kVideoThreads,
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc index 3a1a11e..6be34a6c 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -541,6 +541,15 @@ prefs.background_video_track_optimization_enabled = base::FeatureList::IsEnabled(media::kBackgroundVideoTrackOptimization); + // TODO(avayvod, asvitkine): Query the value directly when it is available in + // the renderer process. See https://crbug.com/681160. + prefs.max_keyframe_distance_to_disable_background_video = + base::TimeDelta::FromMilliseconds( + variations::GetVariationParamByFeatureAsInt( + media::kBackgroundVideoTrackOptimization, + "max_keyframe_distance_ms", + base::TimeDelta::FromSeconds(10).InMilliseconds())); + std::map<std::string, std::string> expensive_background_throttling_prefs; variations::GetVariationParamsByFeature( features::kExpensiveBackgroundTimerThrottling,
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h index 8030e15..79efc0f 100644 --- a/content/browser/renderer_host/render_widget_host_delegate.h +++ b/content/browser/renderer_host/render_widget_host_delegate.h
@@ -184,11 +184,6 @@ // Returns true if |render_widget_host| holds the mouse lock. virtual bool HasMouseLock(RenderWidgetHostImpl* render_widget_host); - // Called when the widget has sent a compositor proto. This is used in Btlimp - // mode with the RemoteChannel compositor. - virtual void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, - const std::vector<uint8_t>& proto) {} - // Called when the visibility of the RenderFrameProxyHost in outer // WebContents changes. This method is only called on an inner WebContents and // will eventually notify all the RenderWidgetHostViews belonging to that
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc index 5e57094..235b2565 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -547,8 +547,6 @@ OnImeCompositionRangeChanged) IPC_MESSAGE_HANDLER(ViewHostMsg_DidFirstPaintAfterLoad, OnFirstPaintAfterLoad) - IPC_MESSAGE_HANDLER(ViewHostMsg_ForwardCompositorProto, - OnForwardCompositorProto) IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames, OnSetNeedsBeginFrames) IPC_MESSAGE_HANDLER(ViewHostMsg_FocusedNodeTouched, OnFocusedNodeTouched) IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging) @@ -1343,12 +1341,6 @@ input_router_->SetDeviceScaleFactor(result->device_scale_factor); } -void RenderWidgetHostImpl::HandleCompositorProto( - const std::vector<uint8_t>& proto) { - DCHECK(!proto.empty()); - Send(new ViewMsg_HandleCompositorProto(GetRoutingID(), proto)); -} - void RenderWidgetHostImpl::DragTargetDragEnter( const DropData& drop_data, const gfx::Point& client_pt, @@ -1476,12 +1468,6 @@ } } -void RenderWidgetHostImpl::OnForwardCompositorProto( - const std::vector<uint8_t>& proto) { - if (delegate_) - delegate_->ForwardCompositorProto(this, proto); -} - void RenderWidgetHostImpl::OnSetNeedsBeginFrames(bool needs_begin_frames) { if (needs_begin_frames_ == needs_begin_frames) return;
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h index 1011c35..5cc1300 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -174,7 +174,6 @@ void RemoveInputEventObserver( RenderWidgetHost::InputEventObserver* observer) override; void GetScreenInfo(content::ScreenInfo* result) override; - void HandleCompositorProto(const std::vector<uint8_t>& proto) override; // |drop_data| must have been filtered. The embedder should call // FilterDropData before passing the drop data to RWHI. void DragTargetDragEnter(const DropData& drop_data, @@ -644,7 +643,6 @@ const cc::SharedBitmapId& id); void OnSelectionBoundsChanged( const ViewHostMsg_SelectionBounds_Params& params); - void OnForwardCompositorProto(const std::vector<uint8_t>& proto); void OnSetNeedsBeginFrames(bool needs_begin_frames); void OnHittestData(const FrameHostMsg_HittestData_Params& params); void OnFocusedNodeTouched(bool editable);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc index aa9fbc0..35b6f47 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -1984,13 +1984,6 @@ GetTopLevelRenderWidgetHostView()->IsMouseLocked(); } -void WebContentsImpl::ForwardCompositorProto( - RenderWidgetHostImpl* render_widget_host, - const std::vector<uint8_t>& proto) { - if (delegate_) - delegate_->ForwardCompositorProto(render_widget_host, proto); -} - void WebContentsImpl::OnRenderFrameProxyVisibilityChanged(bool visible) { if (visible && !GetOuterWebContents()->IsHidden()) WasShown(); @@ -2116,6 +2109,8 @@ // Save the created window associated with the route so we can show it // later. DCHECK_NE(MSG_ROUTING_NONE, main_frame_widget_route_id); + CHECK(RenderWidgetHostImpl::FromID(render_process_id, + main_frame_widget_route_id)); pending_contents_[std::make_pair( render_process_id, main_frame_widget_route_id)] = new_contents; AddDestructionObserver(new_contents); @@ -2216,6 +2211,14 @@ WebContentsImpl* contents = GetCreatedWindow(process_id, main_frame_widget_route_id); if (contents) { + RenderWidgetHostImpl* rwh = + RenderWidgetHostImpl::FromID(process_id, main_frame_widget_route_id); + if (!rwh) { + // TODO(nick): Temporary for https://crbug.com/680876 + base::debug::DumpWithoutCrashing(); + return; + } + WebContentsDelegate* delegate = GetDelegate(); contents->is_resume_pending_ = true; if (!delegate || delegate->ShouldResumeRequestsForCreatedWindow()) @@ -2226,8 +2229,6 @@ user_gesture, NULL); } - RenderWidgetHostImpl* rwh = contents->GetMainFrame()->GetRenderWidgetHost(); - DCHECK_EQ(main_frame_widget_route_id, rwh->GetRoutingID()); rwh->Send(new ViewMsg_Move_ACK(rwh->GetRoutingID())); } }
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h index 363fa31..fce4361 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h
@@ -658,8 +658,6 @@ void LostCapture(RenderWidgetHostImpl* render_widget_host) override; void LostMouseLock(RenderWidgetHostImpl* render_widget_host) override; bool HasMouseLock(RenderWidgetHostImpl* render_widget_host) override; - void ForwardCompositorProto(RenderWidgetHostImpl* render_widget_host, - const std::vector<uint8_t>& proto) override; void OnRenderFrameProxyVisibilityChanged(bool visible) override; void SendScreenRects() override; void OnFirstPaintAfterLoad(RenderWidgetHostImpl* render_widget_host) override;
diff --git a/content/child/memory/OWNERS b/content/child/memory/OWNERS index 26ad3ee4c..04e3019f 100644 --- a/content/child/memory/OWNERS +++ b/content/child/memory/OWNERS
@@ -1,3 +1,6 @@ bashi@chromium.org chrisha@chromium.org haraken@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>MemoryAllocator
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h index c2d8c47..9092344 100644 --- a/content/common/frame_messages.h +++ b/content/common/frame_messages.h
@@ -936,7 +936,7 @@ IPC_MESSAGE_ROUTED0(FrameMsg_SuppressFurtherDialogs) // Tells the frame to consider itself to have received a user gesture (based -// on a user gesture proceed by a descendant). +// on a user gesture processed in a different process). IPC_MESSAGE_ROUTED0(FrameMsg_SetHasReceivedUserGesture) IPC_MESSAGE_ROUTED1(FrameMsg_RunFileChooserResponse, @@ -1323,8 +1323,8 @@ // Informs the child that the frame has changed visibility. IPC_MESSAGE_ROUTED1(FrameHostMsg_VisibilityChanged, bool /* visible */) -// Indicates that a child of this frame recieved a user gesture, and this -// frame should in turn consider itself to have received a user gesture. +// Indicates that this frame recieved a user gesture, so that the state can be +// propagated to any remote frames. IPC_MESSAGE_ROUTED0(FrameHostMsg_SetHasReceivedUserGesture) // Used to tell the parent that the user right clicked on an area of the
diff --git a/content/common/frame_replication_state.cc b/content/common/frame_replication_state.cc index a726525..30b5f60 100644 --- a/content/common/frame_replication_state.cc +++ b/content/common/frame_replication_state.cc
@@ -21,7 +21,8 @@ : sandbox_flags(blink::WebSandboxFlags::None), scope(blink::WebTreeScopeType::Document), insecure_request_policy(blink::kLeaveInsecureRequestsAlone), - has_potentially_trustworthy_unique_origin(false) {} + has_potentially_trustworthy_unique_origin(false), + has_received_user_gesture(false) {} FrameReplicationState::FrameReplicationState( blink::WebTreeScopeType scope, @@ -29,7 +30,8 @@ const std::string& unique_name, blink::WebSandboxFlags sandbox_flags, blink::WebInsecureRequestPolicy insecure_request_policy, - bool has_potentially_trustworthy_unique_origin) + bool has_potentially_trustworthy_unique_origin, + bool has_received_user_gesture) : origin(), sandbox_flags(sandbox_flags), name(name), @@ -37,7 +39,8 @@ scope(scope), insecure_request_policy(insecure_request_policy), has_potentially_trustworthy_unique_origin( - has_potentially_trustworthy_unique_origin) {} + has_potentially_trustworthy_unique_origin), + has_received_user_gesture(has_received_user_gesture) {} FrameReplicationState::FrameReplicationState( const FrameReplicationState& other) = default;
diff --git a/content/common/frame_replication_state.h b/content/common/frame_replication_state.h index 6fb755f..1571c75e 100644 --- a/content/common/frame_replication_state.h +++ b/content/common/frame_replication_state.h
@@ -44,7 +44,8 @@ const std::string& unique_name, blink::WebSandboxFlags sandbox_flags, blink::WebInsecureRequestPolicy insecure_request_policy, - bool has_potentially_trustworthy_unique_origin); + bool has_potentially_trustworthy_unique_origin, + bool has_received_user_gesture); FrameReplicationState(const FrameReplicationState& other); ~FrameReplicationState(); @@ -123,6 +124,9 @@ // True if a frame's origin is unique and should be considered potentially // trustworthy. bool has_potentially_trustworthy_unique_origin; + + // Whether the frame has ever received a user gesture anywhere. + bool has_received_user_gesture; }; } // namespace content
diff --git a/content/common/view_messages.h b/content/common/view_messages.h index 60e2313f..53d6d83 100644 --- a/content/common/view_messages.h +++ b/content/common/view_messages.h
@@ -869,10 +869,6 @@ // See https://crbug.com/537793. IPC_MESSAGE_ROUTED0(ViewHostMsg_DidFirstPaintAfterLoad) -// Sent by the renderer to deliver a compositor proto to the browser. -IPC_MESSAGE_ROUTED1(ViewHostMsg_ForwardCompositorProto, - std::vector<uint8_t> /* proto */) - // Sent in reply to ViewMsg_WaitForNextFrameForTests. IPC_MESSAGE_ROUTED0(ViewHostMsg_WaitForNextFrameForTests_ACK)
diff --git a/content/public/browser/render_widget_host.h b/content/public/browser/render_widget_host.h index 2021572..4ddfd3c 100644 --- a/content/public/browser/render_widget_host.h +++ b/content/public/browser/render_widget_host.h
@@ -259,9 +259,6 @@ // Get the screen info corresponding to this render widget. virtual void GetScreenInfo(ScreenInfo* result) = 0; - // Sends a compositor proto to the render widget. - virtual void HandleCompositorProto(const std::vector<uint8_t>& proto) = 0; - // Drag-and-drop drop target messages that get sent to Blink. virtual void DragTargetDragEnter( const DropData& drop_data,
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h index 9d3db1ef..6456878 100644 --- a/content/public/browser/web_contents_delegate.h +++ b/content/public/browser/web_contents_delegate.h
@@ -546,12 +546,6 @@ WebContents* web_contents, scoped_refptr<net::X509Certificate> certificate); - // Called when the active render widget is forwarding a RemoteChannel - // compositor proto. This is used in Blimp mode. - virtual void ForwardCompositorProto( - RenderWidgetHost* render_widget_host, - const std::vector<uint8_t>& proto) {} - // Requests the app banner. This method is called from the DevTools. virtual void RequestAppBannerFromDevTools(content::WebContents* web_contents);
diff --git a/content/public/common/common_param_traits_macros.h b/content/public/common/common_param_traits_macros.h index ffe235a..88d952cc 100644 --- a/content/public/common/common_param_traits_macros.h +++ b/content/public/common/common_param_traits_macros.h
@@ -246,6 +246,7 @@ IPC_STRUCT_TRAITS_MEMBER(default_maximum_page_scale_factor) IPC_STRUCT_TRAITS_MEMBER(hide_download_ui) IPC_STRUCT_TRAITS_MEMBER(background_video_track_optimization_enabled) + IPC_STRUCT_TRAITS_MEMBER(max_keyframe_distance_to_disable_background_video) IPC_STRUCT_TRAITS_MEMBER(presentation_receiver) IPC_STRUCT_TRAITS_END()
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 6fc00c0..b610c6d 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -89,7 +89,7 @@ // same-origin to the top frame, or if a user gesture is being processed. const base::Feature kFramebustingNeedsSameOriginOrUserGesture{ "FramebustingNeedsSameOriginOrUserGesture", - base::FEATURE_DISABLED_BY_DEFAULT}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Enables extended Gamepad API features like motion tracking and haptics. const base::Feature kGamepadExtensions{"GamepadExtensions",
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc index 1a2e4327..1bb64460 100644 --- a/content/public/common/content_switches.cc +++ b/content/public/common/content_switches.cc
@@ -891,9 +891,6 @@ // Set when Chromium should use a mobile user agent. const char kUseMobileUserAgent[] = "use-mobile-user-agent"; -// Use remote compositor for the renderer. -const char kUseRemoteCompositing[] = "use-remote-compositing"; - // The contents of this flag are prepended to the utility process command line. // Useful values might be "valgrind" or "xterm -e gdb --args". const char kUtilityCmdPrefix[] = "utility-cmd-prefix";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h index 5e3a8854..e5b8d33 100644 --- a/content/public/common/content_switches.h +++ b/content/public/common/content_switches.h
@@ -250,7 +250,6 @@ CONTENT_EXPORT extern const char kContentImageTextureTarget[]; CONTENT_EXPORT extern const char kVideoImageTextureTarget[]; CONTENT_EXPORT extern const char kUseMobileUserAgent[]; -CONTENT_EXPORT extern const char kUseRemoteCompositing[]; extern const char kUtilityCmdPrefix[]; CONTENT_EXPORT extern const char kUtilityProcess[]; extern const char kUtilityProcessAllowedDir[];
diff --git a/content/public/common/web_preferences.cc b/content/public/common/web_preferences.cc index 7f24f09..c3f26ae 100644 --- a/content/public/common/web_preferences.cc +++ b/content/public/common/web_preferences.cc
@@ -223,6 +223,8 @@ #endif hide_download_ui(false), background_video_track_optimization_enabled(false), + max_keyframe_distance_to_disable_background_video( + base::TimeDelta::FromSeconds(10)), presentation_receiver(false) { standard_font_family_map[kCommonScript] = base::ASCIIToUTF16("Times New Roman");
diff --git a/content/public/common/web_preferences.h b/content/public/common/web_preferences.h index 4835144..9bcda9e 100644 --- a/content/public/common/web_preferences.h +++ b/content/public/common/web_preferences.h
@@ -10,6 +10,7 @@ #include <vector> #include "base/strings/string16.h" +#include "base/time/time.h" #include "build/build_config.h" #include "content/common/content_export.h" #include "ui/base/touch/touch_device.h" @@ -264,6 +265,13 @@ // If enabled, disabled video track when the video is in the background. bool background_video_track_optimization_enabled; + // If background video track optimization is enabled, don't disable video + // track for videos with the average keyframe distance greater than this + // value. + // TODO(avayvod, asvitkine): Query the value directly when it is available in + // the renderer process. See https://crbug.com/681160. + base::TimeDelta max_keyframe_distance_to_disable_background_video; + // Whether it is a presentation receiver. bool presentation_receiver;
diff --git a/content/public/renderer/BUILD.gn b/content/public/renderer/BUILD.gn index 7102ba5..ce33d5f66 100644 --- a/content/public/renderer/BUILD.gn +++ b/content/public/renderer/BUILD.gn
@@ -44,7 +44,6 @@ "navigation_state.h", "pepper_plugin_instance.h", "platform_event_observer.h", - "remote_proto_channel.h", "render_accessibility.h", "render_frame.h", "render_frame_observer.cc",
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc index b030186..cc1d049a 100644 --- a/content/public/renderer/content_renderer_client.cc +++ b/content/public/renderer/content_renderer_client.cc
@@ -4,7 +4,6 @@ #include "content/public/renderer/content_renderer_client.h" -#include "cc/blimp/remote_compositor_bridge.h" #include "content/public/renderer/media_stream_renderer_factory.h" #include "media/base/renderer_factory.h" #include "ui/gfx/icc_profile.h" @@ -177,18 +176,6 @@ return nullptr; } -cc::ImageSerializationProcessor* -ContentRendererClient::GetImageSerializationProcessor() { - return nullptr; -} - -std::unique_ptr<cc::RemoteCompositorBridge> -ContentRendererClient::CreateRemoteCompositorBridge( - RemoteProtoChannel* remote_proto_channel, - scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner) { - return nullptr; -} - std::unique_ptr<gfx::ICCProfile> ContentRendererClient::GetImageDecodeColorProfile() { return nullptr;
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h index db6cd9c0..9895206 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h
@@ -30,7 +30,6 @@ namespace base { class FilePath; class SchedulerWorkerPoolParams; -class SingleThreadTaskRunner; } namespace blink { @@ -57,11 +56,6 @@ struct WebURLError; } -namespace cc { -class ImageSerializationProcessor; -class RemoteCompositorBridge; -} - namespace gfx { class ICCProfile; } @@ -77,7 +71,6 @@ namespace content { class BrowserPluginDelegate; class MediaStreamRendererFactory; -class RemoteProtoChannel; class RenderFrame; class RenderView; @@ -269,17 +262,6 @@ virtual std::unique_ptr<MediaStreamRendererFactory> CreateMediaStreamRendererFactory(); - // Allows an embedder to provide a cc::ImageSerializationProcessor. - virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor(); - - // Allows an embedder to create the cc::RemoteCompositorBridge when using - // remote compositing. - // The |remote_proto_channel| outlives the RemoteCompositorBridge. - virtual std::unique_ptr<cc::RemoteCompositorBridge> - CreateRemoteCompositorBridge( - RemoteProtoChannel* remote_proto_channel, - scoped_refptr<base::SingleThreadTaskRunner> compositor_main_task_runner); - // Allows an embedder to provide a default image decode color space. virtual std::unique_ptr<gfx::ICCProfile> GetImageDecodeColorProfile();
diff --git a/content/public/renderer/remote_proto_channel.h b/content/public/renderer/remote_proto_channel.h deleted file mode 100644 index 2d7ec6b..0000000 --- a/content/public/renderer/remote_proto_channel.h +++ /dev/null
@@ -1,49 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CONTENT_PUBLIC_RENDERER_REMOTE_PROTO_CHANNEL_H_ -#define CONTENT_PUBLIC_RENDERER_REMOTE_PROTO_CHANNEL_H_ - -#include <memory> - -#include "content/common/content_export.h" - -namespace cc { -namespace proto { -class CompositorMessage; -} // namespace proto - -} // namespace cc - -namespace content { - -// Provides a bridge for getting compositor protobuf messages to/from the -// renderer and the browser. -class CONTENT_EXPORT RemoteProtoChannel { - public: - // Meant to be implemented by a RemoteChannel that needs to receive and parse - // incoming protobufs. - class CONTENT_EXPORT ProtoReceiver { - public: - virtual void OnProtoReceived( - std::unique_ptr<cc::proto::CompositorMessage> proto) = 0; - - protected: - virtual ~ProtoReceiver() {} - }; - - // Called by the ProtoReceiver. The RemoteProtoChannel must outlive its - // receiver. - virtual void SetProtoReceiver(ProtoReceiver* receiver) = 0; - - virtual void SendCompositorProto( - const cc::proto::CompositorMessage& proto) = 0; - - protected: - virtual ~RemoteProtoChannel() {} -}; - -} // namespace content - -#endif // CONTENT_PUBLIC_RENDERER_REMOTE_PROTO_CHANNEL_H_
diff --git a/content/renderer/gpu/compositor_dependencies.h b/content/renderer/gpu/compositor_dependencies.h index 866b779..437db25 100644 --- a/content/renderer/gpu/compositor_dependencies.h +++ b/content/renderer/gpu/compositor_dependencies.h
@@ -16,7 +16,6 @@ } namespace cc { -class ImageSerializationProcessor; class TaskGraphRunner; } @@ -48,7 +47,6 @@ virtual scoped_refptr<base::SingleThreadTaskRunner> GetCompositorImplThreadTaskRunner() = 0; virtual blink::scheduler::RendererScheduler* GetRendererScheduler() = 0; - virtual cc::ImageSerializationProcessor* GetImageSerializationProcessor() = 0; virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; virtual bool AreImageDecodeTasksEnabled() = 0; virtual bool IsThreadedAnimationEnabled() = 0;
diff --git a/content/renderer/gpu/queue_message_swap_promise.cc b/content/renderer/gpu/queue_message_swap_promise.cc index b7b3a88..f8a5331 100644 --- a/content/renderer/gpu/queue_message_swap_promise.cc +++ b/content/renderer/gpu/queue_message_swap_promise.cc
@@ -41,20 +41,6 @@ #endif message_queue_->DidActivate(source_frame_number_); // The OutputSurface will take care of the Drain+Send. - - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kUseRemoteCompositing)) { - // The remote compositing mode doesn't have an output surface, so we need to - // Drain+Send on activation. Also, we can't use the SyncMessageFilter, since - // this call is actually made on the main thread. - std::vector<std::unique_ptr<IPC::Message>> messages_to_deliver; - std::unique_ptr<FrameSwapMessageQueue::SendMessageScope> - send_message_scope = message_queue_->AcquireSendMessageScope(); - message_queue_->DrainMessages(&messages_to_deliver); - for (auto& message : messages_to_deliver) - RenderThread::Get()->Send(message.release()); - PromiseCompleted(); - } } void QueueMessageSwapPromise::WillSwap(cc::CompositorFrameMetadata* metadata) {
diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index b9cdc15aa..f1c65cda 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc
@@ -30,10 +30,6 @@ #include "cc/animation/animation_host.h" #include "cc/animation/animation_timeline.h" #include "cc/base/switches.h" -#include "cc/blimp/engine_picture_cache.h" -#include "cc/blimp/image_serialization_processor.h" -#include "cc/blimp/layer_tree_host_remote.h" -#include "cc/blimp/remote_compositor_bridge.h" #include "cc/blink/web_layer_impl.h" #include "cc/debug/layer_tree_debug_state.h" #include "cc/debug/micro_benchmark.h" @@ -44,7 +40,6 @@ #include "cc/output/copy_output_result.h" #include "cc/output/latency_info_swap_promise.h" #include "cc/output/swap_promise.h" -#include "cc/proto/compositor_message.pb.h" #include "cc/resources/single_release_callback.h" #include "cc/scheduler/begin_frame_source.h" #include "cc/trees/latency_info_swap_promise_monitor.h" @@ -213,7 +208,6 @@ threaded_(!!compositor_deps_->GetCompositorImplThreadTaskRunner()), never_visible_(false), layout_and_paint_async_callback_(nullptr), - remote_proto_channel_receiver_(nullptr), weak_factory_(this) {} void RenderWidgetCompositor::Initialize(float device_scale_factor, @@ -223,49 +217,28 @@ *cmd, compositor_deps_, device_scale_factor, screen_info); animation_host_ = cc::AnimationHost::CreateMainInstance(); - - if (cmd->HasSwitch(switches::kUseRemoteCompositing)) { - DCHECK(!threaded_); - - cc::LayerTreeHostRemote::InitParams params; - params.client = this; - params.main_task_runner = - compositor_deps_->GetCompositorMainThreadTaskRunner(); - params.mutator_host = animation_host_.get(); - params.remote_compositor_bridge = - GetContentClient()->renderer()->CreateRemoteCompositorBridge( - this, params.main_task_runner); - params.engine_picture_cache = - compositor_deps_->GetImageSerializationProcessor() - ->CreateEnginePictureCache(); - params.settings = &settings; - layer_tree_host_ = base::MakeUnique<cc::LayerTreeHostRemote>(¶ms); - } else { - cc::LayerTreeHostInProcess::InitParams params; - params.client = this; - params.settings = &settings; - params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); - params.main_task_runner = - compositor_deps_->GetCompositorMainThreadTaskRunner(); - params.mutator_host = animation_host_.get(); - if (base::TaskScheduler::GetInstance()) { - params.image_worker_task_runner = - base::CreateSequencedTaskRunnerWithTraits( - base::TaskTraits() - .WithPriority(base::TaskPriority::BACKGROUND) - .WithShutdownBehavior( - base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)); - } - if (!threaded_) { - // Single-threaded layout tests. - layer_tree_host_ = - cc::LayerTreeHostInProcess::CreateSingleThreaded(this, ¶ms); - } else { - layer_tree_host_ = cc::LayerTreeHostInProcess::CreateThreaded( - compositor_deps_->GetCompositorImplThreadTaskRunner(), ¶ms); - } + cc::LayerTreeHostInProcess::InitParams params; + params.client = this; + params.settings = &settings; + params.task_graph_runner = compositor_deps_->GetTaskGraphRunner(); + params.main_task_runner = + compositor_deps_->GetCompositorMainThreadTaskRunner(); + params.mutator_host = animation_host_.get(); + if (base::TaskScheduler::GetInstance()) { + params.image_worker_task_runner = base::CreateSequencedTaskRunnerWithTraits( + base::TaskTraits() + .WithPriority(base::TaskPriority::BACKGROUND) + .WithShutdownBehavior( + base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)); } - + if (!threaded_) { + // Single-threaded layout tests. + layer_tree_host_ = + cc::LayerTreeHostInProcess::CreateSingleThreaded(this, ¶ms); + } else { + layer_tree_host_ = cc::LayerTreeHostInProcess::CreateThreaded( + compositor_deps_->GetCompositorImplThreadTaskRunner(), ¶ms); + } DCHECK(layer_tree_host_); } @@ -1099,40 +1072,12 @@ NOTREACHED(); } -void RenderWidgetCompositor::SetProtoReceiver(ProtoReceiver* receiver) { - remote_proto_channel_receiver_ = receiver; -} - -void RenderWidgetCompositor::SendCompositorProto( - const cc::proto::CompositorMessage& proto) { - int signed_size = proto.ByteSize(); - size_t unsigned_size = base::checked_cast<size_t>(signed_size); - std::vector<uint8_t> serialized(unsigned_size); - proto.SerializeToArray(serialized.data(), signed_size); - delegate_->ForwardCompositorProto(serialized); -} - void RenderWidgetCompositor::SetFrameSinkId( const cc::FrameSinkId& frame_sink_id) { frame_sink_id_ = frame_sink_id; layer_tree_host_->SetFrameSinkId(frame_sink_id); } -void RenderWidgetCompositor::OnHandleCompositorProto( - const std::vector<uint8_t>& proto) { - DCHECK(remote_proto_channel_receiver_); - - std::unique_ptr<cc::proto::CompositorMessage> deserialized( - new cc::proto::CompositorMessage); - int signed_size = base::checked_cast<int>(proto.size()); - if (!deserialized->ParseFromArray(proto.data(), signed_size)) { - LOG(ERROR) << "Unable to parse compositor proto."; - return; - } - - remote_proto_channel_receiver_->OnProtoReceived(std::move(deserialized)); -} - void RenderWidgetCompositor::SetPaintedDeviceScaleFactor( float device_scale) { layer_tree_host_->GetLayerTree()->SetPaintedDeviceScaleFactor(device_scale);
diff --git a/content/renderer/gpu/render_widget_compositor.h b/content/renderer/gpu/render_widget_compositor.h index 761e5a2..cd3623b 100644 --- a/content/renderer/gpu/render_widget_compositor.h +++ b/content/renderer/gpu/render_widget_compositor.h
@@ -19,7 +19,6 @@ #include "cc/trees/layer_tree_settings.h" #include "cc/trees/swap_promise_monitor.h" #include "content/common/content_export.h" -#include "content/public/renderer/remote_proto_channel.h" #include "content/renderer/gpu/compositor_dependencies.h" #include "third_party/WebKit/public/platform/WebLayerTreeView.h" #include "ui/gfx/geometry/rect.h" @@ -34,9 +33,6 @@ class InputHandler; class Layer; class LayerTreeHost; -namespace proto { -class CompositorMessage; -} } namespace gfx { @@ -55,8 +51,7 @@ class CONTENT_EXPORT RenderWidgetCompositor : NON_EXPORTED_BASE(public blink::WebLayerTreeView), NON_EXPORTED_BASE(public cc::LayerTreeHostClient), - NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient), - public RemoteProtoChannel { + NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) { public: // Attempt to construct and initialize a compositor instance for the widget // with the given settings. Returns NULL if initialization fails. @@ -106,7 +101,6 @@ const base::Callback<void(std::unique_ptr<base::Value>)>& callback); bool SendMessageToMicroBenchmark(int id, std::unique_ptr<base::Value> value); void SetFrameSinkId(const cc::FrameSinkId& frame_sink_id); - void OnHandleCompositorProto(const std::vector<uint8_t>& proto); void SetPaintedDeviceScaleFactor(float device_scale); void SetDeviceColorSpace(const gfx::ColorSpace& color_space); @@ -197,10 +191,6 @@ void DidSubmitCompositorFrame() override; void DidLoseCompositorFrameSink() override; - // RemoteProtoChannel implementation. - void SetProtoReceiver(ProtoReceiver* receiver) override; - void SendCompositorProto(const cc::proto::CompositorMessage& proto) override; - enum { COMPOSITOR_FRAME_SINK_RETRIES_BEFORE_FALLBACK = 4, MAX_COMPOSITOR_FRAME_SINK_RETRIES = 5, @@ -231,8 +221,6 @@ blink::WebLayoutAndPaintAsyncCallback* layout_and_paint_async_callback_; - RemoteProtoChannel::ProtoReceiver* remote_proto_channel_receiver_; - cc::FrameSinkId frame_sink_id_; base::WeakPtrFactory<RenderWidgetCompositor> weak_factory_;
diff --git a/content/renderer/gpu/render_widget_compositor_delegate.h b/content/renderer/gpu/render_widget_compositor_delegate.h index 6dc198c..d157ed6 100644 --- a/content/renderer/gpu/render_widget_compositor_delegate.h +++ b/content/renderer/gpu/render_widget_compositor_delegate.h
@@ -57,10 +57,6 @@ // will be displayed. virtual void DidReceiveCompositorFrameAck() = 0; - // Called by the compositor to forward a proto that represents serialized - // compositor state. - virtual void ForwardCompositorProto(const std::vector<uint8_t>& proto) = 0; - // Indicates whether the RenderWidgetCompositor is about to close. virtual bool IsClosing() const = 0;
diff --git a/content/renderer/gpu/render_widget_compositor_unittest.cc b/content/renderer/gpu/render_widget_compositor_unittest.cc index 00811d673..cd83ad4 100644 --- a/content/renderer/gpu/render_widget_compositor_unittest.cc +++ b/content/renderer/gpu/render_widget_compositor_unittest.cc
@@ -51,7 +51,6 @@ void DidCommitCompositorFrame() override {} void DidCompletePageScaleAnimation() override {} void DidReceiveCompositorFrameAck() override {} - void ForwardCompositorProto(const std::vector<uint8_t>& proto) override {} bool IsClosing() const override { return false; } void RequestScheduleAnimation() override {} void UpdateVisualState() override {}
diff --git a/content/renderer/mojo_context_state.cc b/content/renderer/mojo_context_state.cc index d9fa8d6b..b3b5bb2 100644 --- a/content/renderer/mojo_context_state.cc +++ b/content/renderer/mojo_context_state.cc
@@ -122,13 +122,13 @@ ->EnsureMojoBuiltinsAreAvailable(context_holder->isolate(), context); v8::Local<v8::Object> install_target; if (bindings_type == MojoBindingsType::FOR_LAYOUT_TESTS) { - // In layout tests we install the module system under 'mojo.define' + // In layout tests we install the module system under 'gin.define' // for now to avoid globally exposing something as generic as 'define'. // // TODO(rockot): Remove this if/when we can integrate gin + ES6 modules. install_target = v8::Object::New(context->GetIsolate()); gin::SetProperty(context->GetIsolate(), context->Global(), - gin::StringToSymbol(context->GetIsolate(), "mojo"), + gin::StringToSymbol(context->GetIsolate(), "gin"), install_target); } else { // Otherwise we're fine installing a global 'define'.
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 11e7198..b5cd0ef 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -1571,8 +1571,6 @@ IPC_MESSAGE_HANDLER(FrameMsg_EnableViewSourceMode, OnEnableViewSourceMode) IPC_MESSAGE_HANDLER(FrameMsg_SuppressFurtherDialogs, OnSuppressFurtherDialogs) - IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, - OnSetHasReceivedUserGesture) IPC_MESSAGE_HANDLER(FrameMsg_RunFileChooserResponse, OnFileChooserResponse) IPC_MESSAGE_HANDLER(FrameMsg_ClearFocusedElement, OnClearFocusedElement) #if defined(OS_ANDROID) @@ -2840,7 +2838,10 @@ render_thread->compositor_task_runner(), context_3d_cb, base::Bind(&v8::Isolate::AdjustAmountOfExternalAllocatedMemory, base::Unretained(blink::mainThreadIsolate())), - initial_cdm, media_surface_manager_, media_observer); + initial_cdm, media_surface_manager_, media_observer, + // TODO(avayvod, asvitkine): Query the value directly when it is available + // in the renderer process. See https://crbug.com/681160. + GetWebkitPreferences().max_keyframe_distance_to_disable_background_video); bool use_fallback_path = false; #if defined(OS_ANDROID) @@ -3224,6 +3225,10 @@ observer.DidMatchCSS(newly_matching_selectors, stopped_matching_selectors); } +void RenderFrameImpl::setHasReceivedUserGesture() { + Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); +} + bool RenderFrameImpl::shouldReportDetailedMessageForSource( const blink::WebString& source) { return GetContentClient()->renderer()->ShouldReportDetailedMessageForSource( @@ -5674,11 +5679,6 @@ suppress_further_dialogs_ = true; } -void RenderFrameImpl::OnSetHasReceivedUserGesture() { - DCHECK(frame_); - frame_->setHasReceivedUserGesture(); -} - void RenderFrameImpl::OnFileChooserResponse( const std::vector<content::FileChooserFileInfo>& files) { // This could happen if we navigated to a different page before the user
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index 53041fd..0325f9e 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -519,6 +519,7 @@ const blink::WebVector<blink::WebString>& newly_matching_selectors, const blink::WebVector<blink::WebString>& stopped_matching_selectors) override; + void setHasReceivedUserGesture() override; bool shouldReportDetailedMessageForSource( const blink::WebString& source) override; void didAddMessageToConsole(const blink::WebConsoleMessage& message, @@ -890,7 +891,6 @@ void OnStopFinding(StopFindAction action); void OnEnableViewSourceMode(); void OnSuppressFurtherDialogs(); - void OnSetHasReceivedUserGesture(); void OnFileChooserResponse( const std::vector<content::FileChooserFileInfo>& files); void OnClearFocusedElement();
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc index fe58b65b..efae963 100644 --- a/content/renderer/render_frame_proxy.cc +++ b/content/renderer/render_frame_proxy.cc
@@ -243,6 +243,8 @@ state.has_potentially_trustworthy_unique_origin); web_frame_->setReplicatedFeaturePolicyHeader( ToWebParsedFeaturePolicy(state.feature_policy_header)); + if (state.has_received_user_gesture) + web_frame_->setHasReceivedUserGesture(); web_frame_->resetReplicatedContentSecurityPolicy(); for (const auto& header : state.accumulated_csp_headers) @@ -302,6 +304,8 @@ IPC_MESSAGE_HANDLER(InputMsg_SetFocus, OnSetPageFocus) IPC_MESSAGE_HANDLER(FrameMsg_SetFocusedFrame, OnSetFocusedFrame) IPC_MESSAGE_HANDLER(FrameMsg_WillEnterFullscreen, OnWillEnterFullscreen) + IPC_MESSAGE_HANDLER(FrameMsg_SetHasReceivedUserGesture, + OnSetHasReceivedUserGesture) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() @@ -409,6 +413,10 @@ web_frame_->willEnterFullscreen(); } +void RenderFrameProxy::OnSetHasReceivedUserGesture() { + web_frame_->setHasReceivedUserGesture(); +} + void RenderFrameProxy::frameDetached(DetachType type) { if (type == DetachType::Remove && web_frame_->parent()) { web_frame_->parent()->removeChild(web_frame_); @@ -503,10 +511,6 @@ Send(new FrameHostMsg_VisibilityChanged(routing_id_, visible)); } -void RenderFrameProxy::setHasReceivedUserGesture() { - Send(new FrameHostMsg_SetHasReceivedUserGesture(routing_id_)); -} - void RenderFrameProxy::didChangeOpener(blink::WebFrame* opener) { // A proxy shouldn't normally be disowning its opener. It is possible to get // here when a proxy that is being detached clears its opener, in which case
diff --git a/content/renderer/render_frame_proxy.h b/content/renderer/render_frame_proxy.h index 3de7d667..c821dd07 100644 --- a/content/renderer/render_frame_proxy.h +++ b/content/renderer/render_frame_proxy.h
@@ -134,7 +134,6 @@ void updateRemoteViewportIntersection( const blink::WebRect& viewportIntersection) override; void visibilityChanged(bool visible) override; - void setHasReceivedUserGesture() override; void didChangeOpener(blink::WebFrame* opener) override; void advanceFocus(blink::WebFocusType type, blink::WebLocalFrame* source) override; @@ -175,6 +174,7 @@ void OnSetPageFocus(bool is_focused); void OnSetFocusedFrame(); void OnWillEnterFullscreen(); + void OnSetHasReceivedUserGesture(); // The routing ID by which this RenderFrameProxy is known. const int routing_id_;
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index d6315802..bb055354 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -1162,8 +1162,7 @@ resource_task_queue2); resource_dispatcher()->SetMainThreadTaskRunner(resource_task_queue2); - if (!command_line.HasSwitch(switches::kDisableThreadedCompositing) && - !command_line.HasSwitch(switches::kUseRemoteCompositing)) + if (!command_line.HasSwitch(switches::kDisableThreadedCompositing)) InitializeCompositorThread(); if (!input_event_filter_.get()) { @@ -1575,11 +1574,6 @@ compositor_message_filter_.get(), sync_message_filter(), routing_id); } -cc::ImageSerializationProcessor* -RenderThreadImpl::GetImageSerializationProcessor() { - return GetContentClient()->renderer()->GetImageSerializationProcessor(); -} - cc::TaskGraphRunner* RenderThreadImpl::GetTaskGraphRunner() { return categorized_worker_pool_->GetTaskGraphRunner(); }
diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 5ec1c93..ff541333 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h
@@ -70,7 +70,6 @@ namespace cc { class BeginFrameSource; -class ImageSerializationProcessor; class CompositorFrameSink; class TaskGraphRunner; } @@ -234,7 +233,6 @@ scoped_refptr<base::SingleThreadTaskRunner> GetCompositorImplThreadTaskRunner() override; blink::scheduler::RendererScheduler* GetRendererScheduler() override; - cc::ImageSerializationProcessor* GetImageSerializationProcessor() override; cc::TaskGraphRunner* GetTaskGraphRunner() override; bool AreImageDecodeTasksEnabled() override; bool IsThreadedAnimationEnabled() override;
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc index 7083f7d..597f38f 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc
@@ -615,11 +615,11 @@ webview()->setShowFPSCounter( command_line.HasSwitch(cc::switches::kShowFPSCounter)); - if (auto overridden_color_profile = + if (std::unique_ptr<gfx::ICCProfile> overridden_color_profile = GetContentClient()->renderer()->GetImageDecodeColorProfile()) { - webview()->setDeviceColorProfile(overridden_color_profile->GetData()); + webview()->setDeviceColorProfile(*overridden_color_profile); } else { - webview()->setDeviceColorProfile(params.image_decode_color_space.GetData()); + webview()->setDeviceColorProfile(params.image_decode_color_space); } ApplyWebPreferencesInternal(webkit_preferences_, webview(), compositor_deps_); @@ -2364,11 +2364,9 @@ } void RenderViewImpl::RenderWidgetDidSetColorProfile( - const std::vector<char>& profile) { - if (webview()) { - WebVector<char> colorProfile = profile; - webview()->setDeviceColorProfile(colorProfile); - } + const gfx::ICCProfile& profile) { + if (webview()) + webview()->setDeviceColorProfile(profile); } void RenderViewImpl::DidCompletePageScaleAnimation() {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h index 3e062e1..491a00b 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h
@@ -491,7 +491,7 @@ // RenderWidgetOwnerDelegate implementation ---------------------------------- void RenderWidgetDidSetColorProfile( - const std::vector<char>& color_profile) override; + const gfx::ICCProfile& color_profile) override; void RenderWidgetFocusChangeComplete() override; bool DoesRenderWidgetHaveTouchEventHandlersAt( const gfx::Point& point) const override;
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 7bd31d9..5074de4 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc
@@ -624,7 +624,6 @@ OnWaitNextFrameForTests) IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, OnRequestCompositionUpdate) - IPC_MESSAGE_HANDLER(ViewMsg_HandleCompositorProto, OnHandleCompositorProto) IPC_MESSAGE_HANDLER(DragMsg_TargetDragEnter, OnDragTargetDragEnter) IPC_MESSAGE_HANDLER(DragMsg_TargetDragOver, OnDragTargetDragOver) IPC_MESSAGE_HANDLER(DragMsg_TargetDragLeave, OnDragTargetDragLeave) @@ -910,10 +909,6 @@ need_update_rect_for_auto_resize_ = false; } -void RenderWidget::ForwardCompositorProto(const std::vector<uint8_t>& proto) { - Send(new ViewHostMsg_ForwardCompositorProto(routing_id_, proto)); -} - bool RenderWidget::IsClosing() const { return host_closing_; } @@ -1672,11 +1667,6 @@ } } -void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { - if (compositor_) - compositor_->OnHandleCompositorProto(proto); -} - void RenderWidget::OnDragTargetDragEnter( const std::vector<DropData::Metadata>& drop_meta_data, const gfx::Point& client_point, @@ -1973,7 +1963,7 @@ } void RenderWidget::SetDeviceColorProfileForTesting( - const std::vector<char>& color_profile) { + const gfx::ICCProfile& color_profile) { if (owner_delegate_) owner_delegate_->RenderWidgetDidSetColorProfile(color_profile); }
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index c446998..59a079c 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h
@@ -87,6 +87,7 @@ } namespace gfx { +class ICCProfile; class Range; } @@ -243,7 +244,6 @@ void DidCommitCompositorFrame() override; void DidCompletePageScaleAnimation() override; void DidReceiveCompositorFrameAck() override; - void ForwardCompositorProto(const std::vector<uint8_t>& proto) override; bool IsClosing() const override; void RequestScheduleAnimation() override; void UpdateVisualState() override; @@ -387,7 +387,7 @@ void UpdateCompositionInfo(bool immediate_request); // Change the device ICC color profile while running a layout test. - void SetDeviceColorProfileForTesting(const std::vector<char>& color_profile); + void SetDeviceColorProfileForTesting(const gfx::ICCProfile& color_profile); // Called when the Widget has changed size as a result of an auto-resize. void DidAutoResize(const gfx::Size& new_size); @@ -512,7 +512,6 @@ const gfx::Rect& window_screen_rect); void OnUpdateWindowScreenRect(const gfx::Rect& window_screen_rect); void OnSetViewportIntersection(const gfx::Rect& viewport_intersection); - void OnHandleCompositorProto(const std::vector<uint8_t>& proto); // Real data that is dragged is not included at DragEnter time. void OnDragTargetDragEnter( const std::vector<DropData::Metadata>& drop_meta_data,
diff --git a/content/renderer/render_widget_owner_delegate.h b/content/renderer/render_widget_owner_delegate.h index dd6768b7..3e08ebb 100644 --- a/content/renderer/render_widget_owner_delegate.h +++ b/content/renderer/render_widget_owner_delegate.h
@@ -12,6 +12,7 @@ } namespace gfx { +class ICCProfile; class Point; } @@ -27,7 +28,7 @@ public: // The RenderWidget set a color profile. virtual void RenderWidgetDidSetColorProfile( - const std::vector<char>& color_profile) = 0; + const gfx::ICCProfile& color_profile) = 0; // As in RenderWidgetInputHandlerDelegate. virtual void RenderWidgetFocusChangeComplete() = 0;
diff --git a/content/test/fake_compositor_dependencies.cc b/content/test/fake_compositor_dependencies.cc index a59e615..d457c99 100644 --- a/content/test/fake_compositor_dependencies.cc +++ b/content/test/fake_compositor_dependencies.cc
@@ -80,11 +80,6 @@ return &renderer_scheduler_; } -cc::ImageSerializationProcessor* -FakeCompositorDependencies::GetImageSerializationProcessor() { - return nullptr; -} - cc::TaskGraphRunner* FakeCompositorDependencies::GetTaskGraphRunner() { return &task_graph_runner_; }
diff --git a/content/test/fake_compositor_dependencies.h b/content/test/fake_compositor_dependencies.h index 26246775..801a5ada 100644 --- a/content/test/fake_compositor_dependencies.h +++ b/content/test/fake_compositor_dependencies.h
@@ -35,7 +35,6 @@ scoped_refptr<base::SingleThreadTaskRunner> GetCompositorImplThreadTaskRunner() override; blink::scheduler::RendererScheduler* GetRendererScheduler() override; - cc::ImageSerializationProcessor* GetImageSerializationProcessor() override; cc::TaskGraphRunner* GetTaskGraphRunner() override; bool AreImageDecodeTasksEnabled() override; bool IsThreadedAnimationEnabled() override;
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py index 7f4dffd8..adb052a 100755 --- a/content/test/gpu/generate_buildbot_json.py +++ b/content/test/gpu/generate_buildbot_json.py
@@ -100,7 +100,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -111,7 +111,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Debug', @@ -437,7 +437,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -448,7 +448,7 @@ 'swarming_dimensions': [ { 'gpu': '8086:041a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -461,7 +461,7 @@ 'swarming_dimensions': [ { 'gpu': '1002:6779', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -474,7 +474,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:0f02', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -487,7 +487,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Debug', @@ -498,7 +498,7 @@ 'swarming_dimensions': [ { 'gpu': '8086:1912', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -511,7 +511,7 @@ 'swarming_dimensions': [ { 'gpu': '8086:1912', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Debug', @@ -524,7 +524,7 @@ 'swarming_dimensions': [ { 'gpu': '1002:6613', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -687,7 +687,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -788,7 +788,7 @@ 'swarming_dimensions': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], 'build_config': 'Release', @@ -870,7 +870,7 @@ # NVIDIA Linux { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], }, @@ -961,7 +961,7 @@ # NVIDIA Linux { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' } ], } @@ -1017,7 +1017,7 @@ }, { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' } ], } @@ -1465,15 +1465,15 @@ 'swarming_dimension_sets': [ { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' }, { 'gpu': '8086:0412', - 'os': 'Linux' + 'os': 'Ubuntu' }, { 'gpu': '8086:1912', - 'os': 'Linux' + 'os': 'Ubuntu' }, ], }, @@ -1517,7 +1517,7 @@ }, { 'gpu': '10de:104a', - 'os': 'Linux' + 'os': 'Ubuntu' } ], },
diff --git a/content/test/gpu/gpu_tests/gpu_integration_test.py b/content/test/gpu/gpu_tests/gpu_integration_test.py index 409e1e1..f9a8082 100644 --- a/content/test/gpu/gpu_tests/gpu_integration_test.py +++ b/content/test/gpu/gpu_tests/gpu_integration_test.py
@@ -28,6 +28,8 @@ restart = 'Starting browser, attempt %d of 3' % (x + 1) logging.warning(restart) super(GpuIntegrationTest, cls).StartBrowser() + cls.tab = cls.browser.tabs[0] + logging.warning('Started browser successfully.') return except Exception: # If we are on the last try and there is an exception take a screenshot @@ -41,6 +43,10 @@ else: logging.warning("GpuIntegrationTest unable to take screenshot") raise + # Otherwise, stop the browser to make sure it's in an + # acceptable state to try restarting it. + if cls.browser: + cls.StopBrowser() @classmethod def _RestartBrowser(cls, reason): @@ -48,7 +54,6 @@ cls.StopBrowser() cls.SetBrowserOptions(cls._finder_options) cls.StartBrowser() - cls.tab = cls.browser.tabs[0] def _RunGpuTest(self, url, test_name, *args): expectations = self.__class__.GetExpectations()
diff --git a/content/test/gpu/gpu_tests/gpu_integration_test_unittest.py b/content/test/gpu/gpu_tests/gpu_integration_test_unittest.py index ae7e05d..a8e58cd 100644 --- a/content/test/gpu/gpu_tests/gpu_integration_test_unittest.py +++ b/content/test/gpu/gpu_tests/gpu_integration_test_unittest.py
@@ -3,6 +3,7 @@ # found in the LICENSE file. import json +import logging import mock import os import tempfile @@ -16,8 +17,6 @@ from gpu_tests import gpu_integration_test from gpu_tests import gpu_test_expectations -_GLOBAL_TEST_COUNT = 0 - class SimpleIntegrationUnittest(gpu_integration_test.GpuIntegrationTest): # Must be class-scoped since instances aren't reused across runs. _num_flaky_runs_to_fail = 2 @@ -29,13 +28,6 @@ return 'simple_integration_unittest' def setUp(self): - global _GLOBAL_TEST_COUNT - _GLOBAL_TEST_COUNT += 1 - # If this is the first test, fail on setup to ensure that the - # gpu_integration_test handles failures in setup and remaining tests - # can be executed - if _GLOBAL_TEST_COUNT == 1: - self.tab.Navigate('chrome://crash') super(SimpleIntegrationUnittest, self).setUp() @classmethod @@ -45,8 +37,8 @@ finder_options.output_formats = ['none'] finder_options.suppress_gtest_report = True finder_options.output_dir = None - finder_options .upload_bucket = 'public' - finder_options .upload_results = False + finder_options.upload_bucket = 'public' + finder_options.upload_results = False cls._finder_options = finder_options cls.platform = None cls.browser = None @@ -55,7 +47,6 @@ @classmethod def GenerateGpuTests(cls, options): - yield ('setup', 'failure.html', ()) yield ('expected_failure', 'failure.html', ()) yield ('expected_flaky', 'flaky.html', ()) yield ('expected_skip', 'failure.html', ()) @@ -76,6 +67,7 @@ cls._num_browser_starts += 1 def RunActualGpuTest(self, file_path, *args): + logging.warn('Running ' + file_path) if file_path == 'failure.html': self.fail('Expected failure') elif file_path == 'flaky.html': @@ -111,11 +103,7 @@ @classmethod def _CreateExpectations(cls): - expectations = gpu_test_expectations.GpuTestExpectations() - expectations.Fail('expected_failure') - expectations.Flaky('expected_flaky', max_num_retries=3) - expectations.Skip('expected_skip') - return expectations + return gpu_test_expectations.GpuTestExpectations() @classmethod def CrashOnStart(cls): @@ -145,10 +133,12 @@ def testSimpleIntegrationUnittest(self, mockInitDependencyManager): self._RunIntegrationTest( 'simple_integration_unittest', [ - 'expected_failure', - 'setup', - 'unexpected_error', - 'unexpected_failure'], ['expected_flaky']) + 'unexpected_error', + 'unexpected_failure' + ], [ + 'expected_failure', + 'expected_flaky', + ]) # It might be nice to be more precise about the order of operations # with these browser restarts, but this is at least a start. self.assertEquals(SimpleIntegrationUnittest._num_browser_starts, 6) @@ -163,6 +153,11 @@ self.assertEquals( \ BrowserStartFailureIntegrationUnittest._num_browser_starts, 3) + # TODO(kbr): write a new test utilizing the + # execute_after_browser_creation argument to + # fakes.CreateBrowserFinderOptions once that is available. + # crbug.com/682819 + def _RunIntegrationTest(self, test_name, failures, successes): options = browser_test_runner.TestRunOptions() # Suppress printing out information for passing tests.
diff --git a/content/test/gpu/gpu_tests/gpu_process_integration_test.py b/content/test/gpu/gpu_tests/gpu_process_integration_test.py index af7bedb..5fc0877c 100644 --- a/content/test/gpu/gpu_tests/gpu_process_integration_test.py +++ b/content/test/gpu/gpu_tests/gpu_process_integration_test.py
@@ -85,7 +85,6 @@ cls.StopBrowser() cls.CustomizeBrowserArgs(browser_args) cls.StartBrowser() - cls.tab = cls.browser.tabs[0] @classmethod def _CreateExpectations(cls):
diff --git a/content/test/gpu/gpu_tests/pixel_integration_test.py b/content/test/gpu/gpu_tests/pixel_integration_test.py index 4633c6c8..f85b382 100644 --- a/content/test/gpu/gpu_tests/pixel_integration_test.py +++ b/content/test/gpu/gpu_tests/pixel_integration_test.py
@@ -94,7 +94,6 @@ cls.ResetGpuInfo() cls.CustomizeBrowserArgs(browser_args) cls.StartBrowser() - cls.tab = cls.browser.tabs[0] @classmethod def AddCommandlineArgs(cls, parser):
diff --git a/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py b/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py index 43c63ebc..a73b4a8 100644 --- a/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py +++ b/content/test/gpu/gpu_tests/screenshot_sync_integration_test.py
@@ -71,7 +71,6 @@ cls.StopBrowser() cls.CustomizeBrowserArgs(browser_args) cls.StartBrowser() - cls.tab = cls.browser.tabs[0] @classmethod def _CreateExpectations(cls):
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index 0107ded..3f981dd 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc
@@ -514,7 +514,7 @@ RenderView* render_view, const gfx::ICCProfile& icc_profile) { static_cast<RenderViewImpl*>(render_view) ->GetWidget() - ->SetDeviceColorProfileForTesting(icc_profile.GetData()); + ->SetDeviceColorProfileForTesting(icc_profile); } void SetTestBluetoothScanDuration() {
diff --git a/device/BUILD.gn b/device/BUILD.gn index e834294..c3d35260 100644 --- a/device/BUILD.gn +++ b/device/BUILD.gn
@@ -147,6 +147,7 @@ "test/test_device_client.cc", "test/test_device_client.h", "test/usb_test_gadget_impl.cc", + "u2f/u2f_apdu_unittest.cc", "u2f/u2f_message_unittest.cc", "usb/mojo/device_impl_unittest.cc", "usb/mojo/device_manager_impl_unittest.cc",
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic.cc b/device/bluetooth/bluetooth_remote_gatt_characteristic.cc index 77cd0a3a..3a8abb33b 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic.cc +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic.cc
@@ -145,15 +145,14 @@ // rid of the entire check, and run SubscribeToNotifications on all // platforms. // -// TODO(http://crbug.com/633191): Remove OS_MACOSX from this check. // TODO(http://crbug.com/636270): Remove OS_WIN from this check. -#if defined(OS_MACOSX) || defined(OS_WIN) +#if defined(OS_WIN) base::ThreadTaskRunnerHandle::Get()->PostTask( FROM_HERE, base::Bind(&BluetoothRemoteGattCharacteristic::OnStartNotifySessionError, GetWeakPtr(), error_callback, BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED)); -#else // !(defined(OS_MACOSX) || defined(OS_WIN)) +#else // defined(OS_WIN)) // Find the Client Characteristic Configuration descriptor. std::vector<BluetoothRemoteGattDescriptor*> ccc_descriptor = GetDescriptorsByUUID(BluetoothRemoteGattDescriptor:: @@ -183,7 +182,7 @@ GetWeakPtr(), callback), base::Bind(&BluetoothRemoteGattCharacteristic::OnStartNotifySessionError, GetWeakPtr(), error_callback)); -#endif // defined(OS_MACOSX) || defined(OS_WIN) +#endif // defined(OS_WIN) } void BluetoothRemoteGattCharacteristic::CancelStartNotifySession(
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h index c690aea..ca3aa300 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.h
@@ -48,10 +48,6 @@ std::vector<BluetoothRemoteGattDescriptor*> GetDescriptors() const override; BluetoothRemoteGattDescriptor* GetDescriptor( const std::string& identifier) const override; - void StartNotifySession(const NotifySessionCallback& callback, - const ErrorCallback& error_callback) override; - void StopNotifySession(BluetoothGattNotifySession* session, - const base::Closure& callback) override; void ReadRemoteCharacteristic(const ValueCallback& callback, const ErrorCallback& error_callback) override; void WriteRemoteCharacteristic(const std::vector<uint8_t>& value, @@ -126,17 +122,14 @@ std::pair<ValueCallback, ErrorCallback> read_characteristic_value_callbacks_; // WriteRemoteCharacteristic request callbacks. std::pair<base::Closure, ErrorCallback> write_characteristic_value_callbacks_; - // Stores StartNotifySession request callbacks. - typedef std::pair<NotifySessionCallback, ErrorCallback> - PendingStartNotifyCall; - std::vector<PendingStartNotifyCall> start_notify_session_callbacks_; - // Flag indicates if GATT event registration is in progress. - bool start_notifications_in_progress_; + // Stores SubscribeToNotifications request callbacks. + typedef std::pair<base::Closure, ErrorCallback> PendingNotifyCallback; + // Stores SubscribeToNotifications request callback. + PendingNotifyCallback subscribe_to_notification_callback_; // Map of descriptors, keyed by descriptor identifier. std::unordered_map<std::string, std::unique_ptr<BluetoothRemoteGattDescriptorMac>> gatt_descriptor_macs_; - base::WeakPtrFactory<BluetoothRemoteGattCharacteristicMac> weak_ptr_factory_; }; } // namespace device
diff --git a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm index c04df6a..67c4c46a 100644 --- a/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm +++ b/device/bluetooth/bluetooth_remote_gatt_characteristic_mac.mm
@@ -71,9 +71,7 @@ CBCharacteristic* cb_characteristic) : gatt_service_(gatt_service), cb_characteristic_(cb_characteristic, base::scoped_policy::RETAIN), - characteristic_value_read_or_write_in_progress_(false), - start_notifications_in_progress_(false), - weak_ptr_factory_(this) { + characteristic_value_read_or_write_in_progress_(false) { uuid_ = BluetoothAdapterMac::BluetoothUUIDWithCBUUID( [cb_characteristic_.get() UUID]); identifier_ = base::SysNSStringToUTF8( @@ -150,50 +148,6 @@ searched_pair->second.get()); } -void BluetoothRemoteGattCharacteristicMac::StartNotifySession( - const NotifySessionCallback& callback, - const ErrorCallback& error_callback) { - if (IsNotifying()) { - VLOG(2) << "Already notifying. Creating notify session."; - std::unique_ptr<BluetoothGattNotifySession> notify_session( - new BluetoothGattNotifySession(weak_ptr_factory_.GetWeakPtr())); - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::Bind(callback, base::Passed(std::move(notify_session)))); - return; - } - - if (!SupportsNotificationsOrIndications()) { - base::ThreadTaskRunnerHandle::Get()->PostTask( - FROM_HERE, - base::Bind(error_callback, - BluetoothRemoteGattService::GATT_ERROR_NOT_SUPPORTED)); - return; - } - - start_notify_session_callbacks_.push_back( - std::make_pair(callback, error_callback)); - - if (start_notifications_in_progress_) { - VLOG(2) << "Start Notifications already in progress. " - << "Request has been queued."; - return; - } - - [GetCBPeripheral() setNotifyValue:YES - forCharacteristic:cb_characteristic_.get()]; - start_notifications_in_progress_ = true; -} - -void BluetoothRemoteGattCharacteristicMac::StopNotifySession( - BluetoothGattNotifySession* session, - const base::Closure& callback) { - // TODO(http://crbug.com/633191): Remove this method and use the base version. - // Instead, we should implement SubscribeToNotifications and - // UnsubscribeFromNotifications. - base::ThreadTaskRunnerHandle::Get()->PostTask(FROM_HERE, callback); -} - void BluetoothRemoteGattCharacteristicMac::ReadRemoteCharacteristic( const ValueCallback& callback, const ErrorCallback& error_callback) { @@ -256,8 +210,12 @@ BluetoothRemoteGattDescriptor* ccc_descriptor, const base::Closure& callback, const ErrorCallback& error_callback) { - // TODO(http://crbug.com/633191): Implement this method - NOTIMPLEMENTED(); + DCHECK(subscribe_to_notification_callback_.first.is_null()); + DCHECK(subscribe_to_notification_callback_.second.is_null()); + subscribe_to_notification_callback_ = + std::make_pair(callback, error_callback); + [GetCBPeripheral() setNotifyValue:YES + forCharacteristic:cb_characteristic_.get()]; } void BluetoothRemoteGattCharacteristicMac::UnsubscribeFromNotifications( @@ -336,10 +294,8 @@ void BluetoothRemoteGattCharacteristicMac::DidUpdateNotificationState( NSError* error) { - std::vector<std::pair<NotifySessionCallback, ErrorCallback>> - reentrant_safe_callbacks; - reentrant_safe_callbacks.swap(start_notify_session_callbacks_); - start_notifications_in_progress_ = false; + PendingNotifyCallback reentrant_safe_callbacks; + reentrant_safe_callbacks.swap(subscribe_to_notification_callback_); if (error) { VLOG(1) << "Bluetooth error while modifying notification state for " "characteristic, domain: " @@ -348,14 +304,13 @@ << base::SysNSStringToUTF8(error.localizedDescription); BluetoothGattService::GattErrorCode error_code = BluetoothDeviceMac::GetGattErrorCodeFromNSError(error); - for (const auto& callback : reentrant_safe_callbacks) { - callback.second.Run(error_code); + if (!reentrant_safe_callbacks.second.is_null()) { + reentrant_safe_callbacks.second.Run(error_code); } return; } - for (const auto& callback : reentrant_safe_callbacks) { - callback.first.Run(base::MakeUnique<BluetoothGattNotifySession>( - weak_ptr_factory_.GetWeakPtr())); + if (!reentrant_safe_callbacks.first.is_null()) { + reentrant_safe_callbacks.first.Run(); } }
diff --git a/device/u2f/BUILD.gn b/device/u2f/BUILD.gn index 234ac4e..faa8dae7 100644 --- a/device/u2f/BUILD.gn +++ b/device/u2f/BUILD.gn
@@ -7,6 +7,10 @@ source_set("u2f") { sources = [ + "u2f_apdu_command.cc", + "u2f_apdu_command.h", + "u2f_apdu_response.cc", + "u2f_apdu_response.h", "u2f_message.cc", "u2f_message.h", "u2f_packet.cc", @@ -19,6 +23,17 @@ ] } +fuzzer_test("u2f_apdu_fuzzer") { + sources = [ + "u2f_apdu_fuzzer.cc", + ] + deps = [ + ":u2f", + "//net", + ] + libfuzzer_options = [ "max_len=65537" ] +} + fuzzer_test("u2f_message_fuzzer") { sources = [ "u2f_message_fuzzer.cc",
diff --git a/device/u2f/u2f_apdu_command.cc b/device/u2f/u2f_apdu_command.cc new file mode 100644 index 0000000..cd85482 --- /dev/null +++ b/device/u2f/u2f_apdu_command.cc
@@ -0,0 +1,122 @@ +// 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 "u2f_apdu_command.h" + +namespace device { + +scoped_refptr<U2fApduCommand> U2fApduCommand::CreateFromMessage( + const std::vector<uint8_t>& message) { + uint16_t data_length = 0; + size_t index = 0, response_length = 0; + std::vector<uint8_t> data; + + if (message.size() < kApduMinHeader || message.size() > kApduMaxLength) + return nullptr; + uint8_t cla = message[index++]; + uint8_t ins = message[index++]; + uint8_t p1 = message[index++]; + uint8_t p2 = message[index++]; + + switch (message.size()) { + // No data present; no expected response + case kApduMinHeader: + break; + // Invalid encoding sizes + case kApduMinHeader + 1: + case kApduMinHeader + 2: + return nullptr; + // No data present; response expected + case kApduMinHeader + 3: + // Fifth byte must be 0 + if (message[index++] != 0) + return nullptr; + response_length = message[index++] << 8; + response_length |= message[index++]; + // Special case where response length of 0x0000 corresponds to 65536 + // Defined in ISO7816-4 + if (response_length == 0) + response_length = kApduMaxResponseLength; + break; + default: + // Fifth byte must be 0 + if (message[index++] != 0) + return nullptr; + data_length = message[index++] << 8; + data_length |= message[index++]; + + if (message.size() == data_length + index) { + // No response expected + data.insert(data.end(), message.begin() + index, message.end()); + } else if (message.size() == data_length + index + 2) { + // Maximum response size is stored in final 2 bytes + data.insert(data.end(), message.begin() + index, message.end() - 2); + index += data_length; + response_length = message[index++] << 8; + response_length |= message[index++]; + // Special case where response length of 0x0000 corresponds to 65536 + // Defined in ISO7816-4 + if (response_length == 0) + response_length = kApduMaxResponseLength; + } else { + return nullptr; + } + break; + } + + return make_scoped_refptr( + new U2fApduCommand(cla, ins, p1, p2, response_length, std::move(data))); +} + +// static +scoped_refptr<U2fApduCommand> U2fApduCommand::Create() { + return make_scoped_refptr(new U2fApduCommand()); +} + +std::vector<uint8_t> U2fApduCommand::GetEncodedCommand() const { + std::vector<uint8_t> encoded = {cla_, ins_, p1_, p2_}; + + // If data exists, request size (Lc) is encoded in 3 bytes, with the first + // byte always being null, and the other two bytes being a big-endian + // representation of the request size. If data length is 0, response size (Le) + // will be prepended with a null byte. + if (data_.size() > 0) { + size_t data_length = data_.size(); + + encoded.push_back(0x0); + if (data_length > kApduMaxDataLength) + data_length = kApduMaxDataLength; + encoded.push_back((data_length >> 8) & 0xff); + encoded.push_back(data_length & 0xff); + encoded.insert(encoded.end(), data_.begin(), data_.begin() + data_length); + } else if (response_length_ > 0) { + encoded.push_back(0x0); + } + + if (response_length_ > 0) { + encoded.push_back((response_length_ >> 8) & 0xff); + encoded.push_back(response_length_ & 0xff); + } + return encoded; +} + +U2fApduCommand::U2fApduCommand() + : cla_(0), ins_(0), p1_(0), p2_(0), response_length_(0) {} + +U2fApduCommand::U2fApduCommand(uint8_t cla, + uint8_t ins, + uint8_t p1, + uint8_t p2, + size_t response_length, + std::vector<uint8_t> data) + : cla_(cla), + ins_(ins), + p1_(p1), + p2_(p2), + response_length_(response_length), + data_(std::move(data)) {} + +U2fApduCommand::~U2fApduCommand() {} + +} // namespace device
diff --git a/device/u2f/u2f_apdu_command.h b/device/u2f/u2f_apdu_command.h new file mode 100644 index 0000000..06cd95e --- /dev/null +++ b/device/u2f/u2f_apdu_command.h
@@ -0,0 +1,77 @@ +// 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 DEVICE_U2F_U2F_APDU_COMMAND_H_ +#define DEVICE_U2F_U2F_APDU_COMMAND_H_ + +#include <vector> + +#include "base/gtest_prod_util.h" +#include "base/memory/ref_counted.h" + +namespace device { + +// APDU commands are defined as part of ISO 7816-4. Commands can be serialized +// into either short length encodings, where the maximum data length is 255 +// bytes, or an extended length encoding, where the maximum data length is 65536 +// bytes. This class implements only the extended length encoding. Serialized +// commands consist of a CLA byte, denoting the class of instruction, an INS +// byte, denoting the instruction code, P1 and P2, each one byte denoting +// instruction parameters, a length field (Lc), a data field of length Lc, and +// a maximum expected response length (Le). +class U2fApduCommand : public base::RefCountedThreadSafe<U2fApduCommand> { + public: + // Construct an apdu command from the serialized message data + static scoped_refptr<U2fApduCommand> CreateFromMessage( + const std::vector<uint8_t>& data); + // Create an empty apdu command object + static scoped_refptr<U2fApduCommand> Create(); + // Returns serialized message data + std::vector<uint8_t> GetEncodedCommand() const; + void set_cla(uint8_t cla) { cla_ = cla; } + void set_ins(uint8_t ins) { ins_ = ins; } + void set_p1(uint8_t p1) { p1_ = p1; } + void set_p2(uint8_t p2) { p2_ = p2; } + void set_data(const std::vector<uint8_t>& data) { data_ = data; } + void set_response_length(size_t response_length) { + response_length_ = response_length; + } + + private: + friend class base::RefCountedThreadSafe<U2fApduCommand>; + friend class U2fApduBuilder; + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestDeserializeBasic); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestDeserializeComplex); + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestSerializeEdgeCases); + + static constexpr size_t kApduMinHeader = 4; + static constexpr size_t kApduMaxHeader = 7; + // As defined in ISO7816-4, extended length APDU request data is limited to + // 16 bits in length with a maximum value of 65535. Response data length is + // also limited to 16 bits in length with a value of 0x0000 corresponding to + // a length of 65536 + static constexpr size_t kApduMaxDataLength = 65535; + static constexpr size_t kApduMaxResponseLength = 65536; + static constexpr size_t kApduMaxLength = + kApduMaxDataLength + kApduMaxHeader + 2; + + U2fApduCommand(); + U2fApduCommand(uint8_t cla, + uint8_t ins, + uint8_t p1, + uint8_t p2, + size_t response_length, + std::vector<uint8_t> data); + ~U2fApduCommand(); + + uint8_t cla_; + uint8_t ins_; + uint8_t p1_; + uint8_t p2_; + size_t response_length_; + std::vector<uint8_t> data_; +}; +} // namespace device + +#endif // DEVICE_U2F_U2F_APDU_COMMAND_H_
diff --git a/device/u2f/u2f_apdu_fuzzer.cc b/device/u2f/u2f_apdu_fuzzer.cc new file mode 100644 index 0000000..809803c --- /dev/null +++ b/device/u2f/u2f_apdu_fuzzer.cc
@@ -0,0 +1,19 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include <stddef.h> +#include <stdint.h> +#include <algorithm> + +#include "u2f_apdu_command.h" +#include "u2f_apdu_response.h" + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + std::vector<uint8_t> input(data, data + size); + scoped_refptr<device::U2fApduCommand> cmd = + device::U2fApduCommand::CreateFromMessage(input); + scoped_refptr<device::U2fApduResponse> rsp = + device::U2fApduResponse::CreateFromMessage(input); + return 0; +}
diff --git a/device/u2f/u2f_apdu_response.cc b/device/u2f/u2f_apdu_response.cc new file mode 100644 index 0000000..6a0daf25 --- /dev/null +++ b/device/u2f/u2f_apdu_response.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 "u2f_apdu_response.h" + +namespace device { +scoped_refptr<U2fApduResponse> U2fApduResponse::CreateFromMessage( + const std::vector<uint8_t>& message) { + uint16_t status_bytes; + Status response_status; + + // Invalid message size, data is appended by status byte + if (message.size() < 2) + return nullptr; + status_bytes = message[message.size() - 2] << 8; + status_bytes |= message[message.size() - 1]; + response_status = static_cast<Status>(status_bytes); + std::vector<uint8_t> data(message.begin(), message.end() - 2); + + return make_scoped_refptr( + new U2fApduResponse(std::move(data), response_status)); +} + +U2fApduResponse::U2fApduResponse(std::vector<uint8_t> message, + Status response_status) + : response_status_(response_status), data_(std::move(message)) {} + +U2fApduResponse::~U2fApduResponse() {} + +} // namespace device
diff --git a/device/u2f/u2f_apdu_response.h b/device/u2f/u2f_apdu_response.h new file mode 100644 index 0000000..a52faf1 --- /dev/null +++ b/device/u2f/u2f_apdu_response.h
@@ -0,0 +1,47 @@ +// 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 DEVICE_U2F_U2F_APDU_RESPONSE_H_ +#define DEVICE_U2F_U2F_APDU_RESPONSE_H_ + +#include <vector> + +#include "base/gtest_prod_util.h" +#include "base/memory/ref_counted.h" + +namespace device { + +// APDU responses are defined as part of ISO 7816-4. Serialized responses +// consist of a data field of varying length, up to a maximum 65536, and a +// two byte status field. +class U2fApduResponse : public base::RefCountedThreadSafe<U2fApduResponse> { + public: + // Status bytes are specified in ISO 7816-4 + enum class Status : uint16_t { + SW_NO_ERROR = 0x9000, + SW_CONDITIONS_NOT_SATISFIED = 0x6985, + SW_WRONG_DATA = 0x6A80, + }; + + // Create a APDU response from the serialized message + static scoped_refptr<U2fApduResponse> CreateFromMessage( + const std::vector<uint8_t>& data); + std::vector<uint8_t> GetEncodedResponse() const; + const std::vector<uint8_t> data() const { return data_; }; + Status status() const { return response_status_; }; + + private: + friend class base::RefCountedThreadSafe<U2fApduResponse>; + FRIEND_TEST_ALL_PREFIXES(U2fApduTest, TestDeserializeResponse); + + U2fApduResponse(std::vector<uint8_t> message, Status response_status); + ~U2fApduResponse(); + + Status response_status_; + std::vector<uint8_t> data_; +}; + +} // namespace device + +#endif // DEVICE_U2F_U2F_APDU_RESPONSE_H_
diff --git a/device/u2f/u2f_apdu_unittest.cc b/device/u2f/u2f_apdu_unittest.cc new file mode 100644 index 0000000..a0435eb --- /dev/null +++ b/device/u2f/u2f_apdu_unittest.cc
@@ -0,0 +1,184 @@ +// 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 "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" +#include "u2f_apdu_command.h" +#include "u2f_apdu_response.h" + +namespace device { + +class U2fApduTest : public testing::Test {}; + +TEST_F(U2fApduTest, TestDeserializeBasic) { + uint8_t cla = 0xAA; + uint8_t ins = 0xAB; + uint8_t p1 = 0xAC; + uint8_t p2 = 0xAD; + std::vector<uint8_t> message = {cla, ins, p1, p2}; + scoped_refptr<U2fApduCommand> cmd = + U2fApduCommand::CreateFromMessage(message); + + EXPECT_EQ(static_cast<size_t>(0), cmd->response_length_); + EXPECT_THAT(cmd->data_, testing::ContainerEq(std::vector<uint8_t>())); + EXPECT_EQ(cmd->cla_, cla); + EXPECT_EQ(cmd->ins_, ins); + EXPECT_EQ(cmd->p1_, p1); + EXPECT_EQ(cmd->p2_, p2); + + // Invalid length + message = {cla, ins, p1}; + EXPECT_EQ(nullptr, U2fApduCommand::CreateFromMessage(message)); + message.push_back(p2); + message.push_back(0); + message.push_back(0xFF); + message.push_back(0xFF); + std::vector<uint8_t> oversized(U2fApduCommand::kApduMaxDataLength); + message.insert(message.end(), oversized.begin(), oversized.end()); + message.push_back(0); + message.push_back(0); + EXPECT_NE(nullptr, U2fApduCommand::CreateFromMessage(message)); + message.push_back(0); + EXPECT_EQ(nullptr, U2fApduCommand::CreateFromMessage(message)); +} + +TEST_F(U2fApduTest, TestDeserializeComplex) { + uint8_t cla = 0xAA; + uint8_t ins = 0xAB; + uint8_t p1 = 0xAC; + uint8_t p2 = 0xAD; + std::vector<uint8_t> data( + U2fApduCommand::kApduMaxDataLength - U2fApduCommand::kApduMaxHeader - 2, + 0x7F); + std::vector<uint8_t> message = {cla, ins, p1, p2, 0}; + message.push_back((data.size() >> 8) & 0xff); + message.push_back(data.size() & 0xff); + message.insert(message.end(), data.begin(), data.end()); + + // Create a message with no response expected + scoped_refptr<U2fApduCommand> cmd_no_response = + U2fApduCommand::CreateFromMessage(message); + EXPECT_EQ(static_cast<size_t>(0), cmd_no_response->response_length_); + EXPECT_THAT(data, testing::ContainerEq(cmd_no_response->data_)); + EXPECT_EQ(cmd_no_response->cla_, cla); + EXPECT_EQ(cmd_no_response->ins_, ins); + EXPECT_EQ(cmd_no_response->p1_, p1); + EXPECT_EQ(cmd_no_response->p2_, p2); + + // Add response length to message + message.push_back(0xF1); + message.push_back(0xD0); + scoped_refptr<U2fApduCommand> cmd = + U2fApduCommand::CreateFromMessage(message); + EXPECT_THAT(data, testing::ContainerEq(cmd->data_)); + EXPECT_EQ(cmd->cla_, cla); + EXPECT_EQ(cmd->ins_, ins); + EXPECT_EQ(cmd->p1_, p1); + EXPECT_EQ(cmd->p2_, p2); + EXPECT_EQ(static_cast<size_t>(0xF1D0), cmd->response_length_); +} + +TEST_F(U2fApduTest, TestDeserializeResponse) { + U2fApduResponse::Status status; + scoped_refptr<U2fApduResponse> response; + std::vector<uint8_t> test_vector; + + // Invalid length + std::vector<uint8_t> message = {0xAA}; + EXPECT_EQ(nullptr, U2fApduResponse::CreateFromMessage(message)); + + // Valid length and status + status = U2fApduResponse::Status::SW_CONDITIONS_NOT_SATISFIED; + message = {static_cast<uint8_t>(static_cast<uint16_t>(status) >> 8), + static_cast<uint8_t>(status)}; + response = U2fApduResponse::CreateFromMessage(message); + ASSERT_NE(nullptr, response); + EXPECT_EQ(U2fApduResponse::Status::SW_CONDITIONS_NOT_SATISFIED, + response->response_status_); + EXPECT_THAT(response->data_, testing::ContainerEq(std::vector<uint8_t>())); + + // Valid length and status + status = U2fApduResponse::Status::SW_NO_ERROR; + message = {static_cast<uint8_t>(static_cast<uint16_t>(status) >> 8), + static_cast<uint8_t>(status)}; + test_vector = {0x01, 0x02, 0xEF, 0xFF}; + message.insert(message.begin(), test_vector.begin(), test_vector.end()); + response = U2fApduResponse::CreateFromMessage(message); + ASSERT_NE(nullptr, response); + EXPECT_EQ(U2fApduResponse::Status::SW_NO_ERROR, response->response_status_); + EXPECT_THAT(response->data_, testing::ContainerEq(test_vector)); +} + +TEST_F(U2fApduTest, TestSerializeCommand) { + scoped_refptr<U2fApduCommand> cmd = U2fApduCommand::Create(); + + cmd->set_cla(0xA); + cmd->set_ins(0xB); + cmd->set_p1(0xC); + cmd->set_p2(0xD); + + // No data, no response expected + std::vector<uint8_t> expected({0xA, 0xB, 0xC, 0xD}); + ASSERT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT( + expected, + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(expected)->GetEncodedCommand())); + + // No data, response expected + cmd->set_response_length(0xCAFE); + expected = {0xA, 0xB, 0xC, 0xD, 0x0, 0xCA, 0xFE}; + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT( + expected, + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(expected)->GetEncodedCommand())); + + // Data exists, response expected + std::vector<uint8_t> data({0x1, 0x2, 0x3, 0x4}); + cmd->set_data(data); + expected = {0xA, 0xB, 0xC, 0xD, 0x0, 0x0, 0x4, + 0x1, 0x2, 0x3, 0x4, 0xCA, 0xFE}; + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT( + expected, + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(expected)->GetEncodedCommand())); + + // Data exists, no response expected + cmd->set_response_length(0); + expected = {0xA, 0xB, 0xC, 0xD, 0x0, 0x0, 0x4, 0x1, 0x2, 0x3, 0x4}; + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT( + expected, + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(expected)->GetEncodedCommand())); +} + +TEST_F(U2fApduTest, TestSerializeEdgeCases) { + scoped_refptr<U2fApduCommand> cmd = U2fApduCommand::Create(); + + cmd->set_cla(0xA); + cmd->set_ins(0xB); + cmd->set_p1(0xC); + cmd->set_p2(0xD); + + // Set response length to maximum, which should serialize to 0x0000 + cmd->set_response_length(U2fApduCommand::kApduMaxResponseLength); + std::vector<uint8_t> expected = {0xA, 0xB, 0xC, 0xD, 0x0, 0x0, 0x0}; + EXPECT_THAT(expected, testing::ContainerEq(cmd->GetEncodedCommand())); + EXPECT_THAT( + expected, + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(expected)->GetEncodedCommand())); + + // Maximum data size + std::vector<uint8_t> oversized(U2fApduCommand::kApduMaxDataLength); + cmd->set_data(oversized); + EXPECT_THAT(cmd->GetEncodedCommand(), + testing::ContainerEq( + U2fApduCommand::CreateFromMessage(cmd->GetEncodedCommand()) + ->GetEncodedCommand())); +} +} // namespace device
diff --git a/extensions/browser/api/system_display/display_info_provider.cc b/extensions/browser/api/system_display/display_info_provider.cc index dc186e2..e6c75ef 100644 --- a/extensions/browser/api/system_display/display_info_provider.cc +++ b/extensions/browser/api/system_display/display_info_provider.cc
@@ -120,13 +120,21 @@ return false; } -bool DisplayInfoProvider::TouchCalibrationStart(const std::string& id) { +bool DisplayInfoProvider::ShowNativeTouchCalibration( + const std::string& id, + std::string* error, + const TouchCalibrationCallback& callback) { NOTREACHED(); // Implemented on Chrome OS only in override. return false; } -bool DisplayInfoProvider::TouchCalibrationSet( - const std::string& id, +bool DisplayInfoProvider::StartCustomTouchCalibration(const std::string& id, + std::string* error) { + NOTREACHED(); // Implemented on Chrome OS only in override. + return false; +} + +bool DisplayInfoProvider::CompleteCustomTouchCalibration( const api::system_display::TouchCalibrationPairQuad& pairs, const api::system_display::Bounds& bounds, std::string* error) { @@ -134,13 +142,13 @@ return false; } -bool DisplayInfoProvider::TouchCalibrationReset(const std::string& id, +bool DisplayInfoProvider::ClearTouchCalibration(const std::string& id, std::string* error) { NOTREACHED(); // Implemented on Chrome OS only in override. return false; } -bool DisplayInfoProvider::IsTouchCalibrationActive(std::string* error) { +bool DisplayInfoProvider::IsNativeTouchCalibrationActive(std::string* error) { NOTREACHED(); // Implemented on Chrome OS only in override. return true; }
diff --git a/extensions/browser/api/system_display/display_info_provider.h b/extensions/browser/api/system_display/display_info_provider.h index 3ab6357..e0c2a5f8 100644 --- a/extensions/browser/api/system_display/display_info_provider.h +++ b/extensions/browser/api/system_display/display_info_provider.h
@@ -10,6 +10,7 @@ #include <string> #include <vector> +#include "base/callback_forward.h" #include "base/macros.h" namespace display { @@ -33,6 +34,7 @@ public: using DisplayUnitInfoList = std::vector<api::system_display::DisplayUnitInfo>; using DisplayLayoutList = std::vector<api::system_display::DisplayLayout>; + using TouchCalibrationCallback = base::Callback<void(bool)>; virtual ~DisplayInfoProvider(); @@ -74,15 +76,20 @@ virtual bool OverscanCalibrationComplete(const std::string& id); // Implements touch calibration methods. See system_display.idl. This returns - // false if |id| is invalid. - virtual bool TouchCalibrationStart(const std::string& id); - virtual bool TouchCalibrationSet( + // false in case any error occurs. In such cases the |error| string will also + // be set. + virtual bool ShowNativeTouchCalibration( const std::string& id, + std::string* error, + const TouchCalibrationCallback& callback); + virtual bool StartCustomTouchCalibration(const std::string& id, + std::string* error); + virtual bool CompleteCustomTouchCalibration( const api::system_display::TouchCalibrationPairQuad& pairs, const api::system_display::Bounds& bounds, std::string* error); - virtual bool TouchCalibrationReset(const std::string& id, std::string* error); - virtual bool IsTouchCalibrationActive(std::string* error); + virtual bool ClearTouchCalibration(const std::string& id, std::string* error); + virtual bool IsNativeTouchCalibrationActive(std::string* error); protected: DisplayInfoProvider();
diff --git a/extensions/browser/api/system_display/system_display_api.cc b/extensions/browser/api/system_display/system_display_api.cc index 1b75965..a12d237 100644 --- a/extensions/browser/api/system_display/system_display_api.cc +++ b/extensions/browser/api/system_display/system_display_api.cc
@@ -30,6 +30,10 @@ const char SystemDisplayFunction::kKioskOnlyError[] = "Only kiosk enabled extensions are allowed to use this function."; +const char + SystemDisplayShowNativeTouchCalibrationFunction::kTouchCalibrationError[] = + "Touch calibration failed"; + namespace { class OverscanTracker; @@ -267,45 +271,73 @@ } ExtensionFunction::ResponseAction -SystemDisplayTouchCalibrationStartFunction::Run() { - std::unique_ptr<display::TouchCalibrationStart::Params> params( - display::TouchCalibrationStart::Params::Create(*args_)); +SystemDisplayShowNativeTouchCalibrationFunction::Run() { + std::unique_ptr<display::ShowNativeTouchCalibration::Params> params( + display::ShowNativeTouchCalibration::Params::Create(*args_)); std::string error; - if (DisplayInfoProvider::Get()->IsTouchCalibrationActive(&error)) + if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) return RespondNow(Error(error)); - if (!DisplayInfoProvider::Get()->TouchCalibrationStart(params->id)) - return RespondNow(Error("Invalid display ID: " + params->id)); + if (!DisplayInfoProvider::Get()->ShowNativeTouchCalibration( + params->id, &error, + base::Bind(&SystemDisplayShowNativeTouchCalibrationFunction:: + OnCalibrationComplete, + this))) { + return RespondNow(Error(error)); + } + return RespondLater(); +} + +void SystemDisplayShowNativeTouchCalibrationFunction::OnCalibrationComplete( + bool success) { + if (success) + Respond(OneArgument(base::MakeUnique<base::FundamentalValue>(true))); + else + Respond(Error(kTouchCalibrationError)); +} + +ExtensionFunction::ResponseAction +SystemDisplayStartCustomTouchCalibrationFunction::Run() { + std::unique_ptr<display::StartCustomTouchCalibration::Params> params( + display::StartCustomTouchCalibration::Params::Create(*args_)); + + std::string error; + if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) + return RespondNow(Error(error)); + + if (!DisplayInfoProvider::Get()->StartCustomTouchCalibration(params->id, + &error)) + return RespondNow(Error(error)); return RespondNow(NoArguments()); } ExtensionFunction::ResponseAction -SystemDisplayTouchCalibrationSetFunction::Run() { - std::unique_ptr<display::TouchCalibrationSet::Params> params( - display::TouchCalibrationSet::Params::Create(*args_)); +SystemDisplayCompleteCustomTouchCalibrationFunction::Run() { + std::unique_ptr<display::CompleteCustomTouchCalibration::Params> params( + display::CompleteCustomTouchCalibration::Params::Create(*args_)); std::string error; - if (DisplayInfoProvider::Get()->IsTouchCalibrationActive(&error)) + if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) return RespondNow(Error(error)); - if (!DisplayInfoProvider::Get()->TouchCalibrationSet( - params->id, params->pairs, params->bounds, &error)) { + if (!DisplayInfoProvider::Get()->CompleteCustomTouchCalibration( + params->pairs, params->bounds, &error)) { return RespondNow(Error(error)); } return RespondNow(NoArguments()); } ExtensionFunction::ResponseAction -SystemDisplayTouchCalibrationResetFunction::Run() { - std::unique_ptr<display::TouchCalibrationReset::Params> params( - display::TouchCalibrationReset::Params::Create(*args_)); +SystemDisplayClearTouchCalibrationFunction::Run() { + std::unique_ptr<display::ClearTouchCalibration::Params> params( + display::ClearTouchCalibration::Params::Create(*args_)); std::string error; - if (DisplayInfoProvider::Get()->IsTouchCalibrationActive(&error)) + if (DisplayInfoProvider::Get()->IsNativeTouchCalibrationActive(&error)) return RespondNow(Error(error)); - if (!DisplayInfoProvider::Get()->TouchCalibrationReset(params->id, &error)) + if (!DisplayInfoProvider::Get()->ClearTouchCalibration(params->id, &error)) return RespondNow(Error(error)); return RespondNow(NoArguments()); }
diff --git a/extensions/browser/api/system_display/system_display_api.h b/extensions/browser/api/system_display/system_display_api.h index 7b89336..951e491 100644 --- a/extensions/browser/api/system_display/system_display_api.h +++ b/extensions/browser/api/system_display/system_display_api.h
@@ -121,36 +121,50 @@ ResponseAction Run() override; }; -class SystemDisplayTouchCalibrationStartFunction +class SystemDisplayShowNativeTouchCalibrationFunction : public SystemDisplayFunction { public: - DECLARE_EXTENSION_FUNCTION("system.display.touchCalibrationStart", - SYSTEM_DISPLAY_TOUCHCALIBRATIONSTART); + static const char kTouchCalibrationError[]; + DECLARE_EXTENSION_FUNCTION("system.display.showNativeTouchCalibration", + SYSTEM_DISPLAY_SHOWNATIVETOUCHCALIBRATION); protected: - ~SystemDisplayTouchCalibrationStartFunction() override {} + ~SystemDisplayShowNativeTouchCalibrationFunction() override {} + ResponseAction Run() override; + + void OnCalibrationComplete(bool success); +}; + +class SystemDisplayStartCustomTouchCalibrationFunction + : public SystemDisplayFunction { + public: + DECLARE_EXTENSION_FUNCTION("system.display.startCustomTouchCalibration", + SYSTEM_DISPLAY_STARTCUSTOMTOUCHCALIBRATION); + + protected: + ~SystemDisplayStartCustomTouchCalibrationFunction() override {} ResponseAction Run() override; }; -class SystemDisplayTouchCalibrationSetFunction +class SystemDisplayCompleteCustomTouchCalibrationFunction : public SystemDisplayFunction { public: - DECLARE_EXTENSION_FUNCTION("system.display.touchCalibrationSet", - SYSTEM_DISPLAY_TOUCHCALIBRATIONSET); + DECLARE_EXTENSION_FUNCTION("system.display.completeCustomTouchCalibration", + SYSTEM_DISPLAY_COMPLETECUSTOMTOUCHCALIBRATION); protected: - ~SystemDisplayTouchCalibrationSetFunction() override {} + ~SystemDisplayCompleteCustomTouchCalibrationFunction() override {} ResponseAction Run() override; }; -class SystemDisplayTouchCalibrationResetFunction +class SystemDisplayClearTouchCalibrationFunction : public SystemDisplayFunction { public: - DECLARE_EXTENSION_FUNCTION("system.display.touchCalibrationReset", - SYSTEM_DISPLAY_TOUCHCALIBRATIONRESET); + DECLARE_EXTENSION_FUNCTION("system.display.clearTouchCalibration", + SYSTEM_DISPLAY_CLEARTOUCHCALIBRATION); protected: - ~SystemDisplayTouchCalibrationResetFunction() override {} + ~SystemDisplayClearTouchCalibrationFunction() override {} ResponseAction Run() override; };
diff --git a/extensions/browser/api/system_display/system_display_apitest.cc b/extensions/browser/api/system_display/system_display_apitest.cc index 5e3e33f..43e36950 100644 --- a/extensions/browser/api/system_display/system_display_apitest.cc +++ b/extensions/browser/api/system_display/system_display_apitest.cc
@@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" +#include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "extensions/browser/api/system_display/display_info_provider.h" #include "extensions/browser/api/system_display/system_display_api.h" @@ -141,6 +142,23 @@ return base::ContainsKey(overscan_adjusted_, id); } + void SetTouchCalibrationWillSucceed(bool success) { + native_touch_calibration_success_ = success; + } + + bool IsNativeTouchCalibrationActive(std::string* error) override { + return false; + } + + bool ShowNativeTouchCalibration( + const std::string& id, + std::string* error, + const DisplayInfoProvider::TouchCalibrationCallback& callback) override { + base::ThreadTaskRunnerHandle::Get()->PostTask( + FROM_HERE, base::Bind(callback, native_touch_calibration_success_)); + return true; + } + private: // Update the content of the |unit| obtained for |display| using // platform specific method. @@ -171,6 +189,8 @@ std::set<std::string> overscan_started_; std::set<std::string> overscan_adjusted_; + bool native_touch_calibration_success_ = false; + DISALLOW_COPY_AND_ASSIGN(MockDisplayInfoProvider); }; @@ -407,6 +427,56 @@ ASSERT_FALSE(provider_->calibration_started(id)); } +IN_PROC_BROWSER_TEST_F(SystemDisplayApiTest, ShowNativeTouchCalibrationFail) { + const std::string id = "display0"; + std::unique_ptr<base::DictionaryValue> test_extension_value( + api_test_utils::ParseDictionary(kTestManifestKiosk)); + scoped_refptr<Extension> test_extension( + api_test_utils::CreateExtension(test_extension_value.get())); + + scoped_refptr<SystemDisplayShowNativeTouchCalibrationFunction> + show_native_calibration( + new SystemDisplayShowNativeTouchCalibrationFunction()); + + show_native_calibration->set_has_callback(true); + show_native_calibration->set_extension(test_extension.get()); + + provider_->SetTouchCalibrationWillSucceed(false); + + std::string result(api_test_utils::RunFunctionAndReturnError( + show_native_calibration.get(), "[\"" + id + "\"]", browser_context())); + + EXPECT_EQ( + result, + SystemDisplayShowNativeTouchCalibrationFunction::kTouchCalibrationError); +} + +IN_PROC_BROWSER_TEST_F(SystemDisplayApiTest, ShowNativeTouchCalibration) { + const std::string id = "display0"; + std::unique_ptr<base::DictionaryValue> test_extension_value( + api_test_utils::ParseDictionary(kTestManifestKiosk)); + scoped_refptr<Extension> test_extension( + api_test_utils::CreateExtension(test_extension_value.get())); + + scoped_refptr<SystemDisplayShowNativeTouchCalibrationFunction> + show_native_calibration( + new SystemDisplayShowNativeTouchCalibrationFunction()); + + show_native_calibration->set_has_callback(true); + show_native_calibration->set_extension(test_extension.get()); + + provider_->SetTouchCalibrationWillSucceed(true); + + std::unique_ptr<base::Value> result( + api_test_utils::RunFunctionAndReturnSingleResult( + show_native_calibration.get(), "[\"" + id + "\"]", + browser_context())); + + bool callback_result; + ASSERT_TRUE(result->GetAsBoolean(&callback_result)); + ASSERT_TRUE(callback_result); +} + #endif // !defined(OS_CHROMEOS) } // namespace extensions
diff --git a/extensions/browser/api/system_network/system_network_api.cc b/extensions/browser/api/system_network/system_network_api.cc index 38b5a251..c2c1f70 100644 --- a/extensions/browser/api/system_network/system_network_api.cc +++ b/extensions/browser/api/system_network/system_network_api.cc
@@ -19,14 +19,15 @@ ~SystemNetworkGetNetworkInterfacesFunction() { } -bool SystemNetworkGetNetworkInterfacesFunction::RunAsync() { +ExtensionFunction::ResponseAction +SystemNetworkGetNetworkInterfacesFunction::Run() { content::BrowserThread::PostTask( content::BrowserThread::FILE, FROM_HERE, base::Bind( &SystemNetworkGetNetworkInterfacesFunction::GetListOnFileThread, this)); - return true; + return RespondLater(); } void SystemNetworkGetNetworkInterfacesFunction::GetListOnFileThread() { @@ -52,8 +53,7 @@ void SystemNetworkGetNetworkInterfacesFunction::HandleGetListError() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); - error_ = kNetworkListError; - SendResponse(false); + Respond(Error(kNetworkListError)); } void SystemNetworkGetNetworkInterfacesFunction::SendResponseOnUIThread( @@ -70,9 +70,8 @@ create_arg.push_back(std::move(info)); } - results_ = - api::system_network::GetNetworkInterfaces::Results::Create(create_arg); - SendResponse(true); + Respond(ArgumentList( + api::system_network::GetNetworkInterfaces::Results::Create(create_arg))); } } // namespace api
diff --git a/extensions/browser/api/system_network/system_network_api.h b/extensions/browser/api/system_network/system_network_api.h index 29d20bd..38e9e6c 100644 --- a/extensions/browser/api/system_network/system_network_api.h +++ b/extensions/browser/api/system_network/system_network_api.h
@@ -13,7 +13,7 @@ namespace api { class SystemNetworkGetNetworkInterfacesFunction - : public AsyncExtensionFunction { + : public UIThreadExtensionFunction { public: DECLARE_EXTENSION_FUNCTION("system.network.getNetworkInterfaces", SYSTEM_NETWORK_GETNETWORKINTERFACES) @@ -23,8 +23,8 @@ protected: ~SystemNetworkGetNetworkInterfacesFunction() override; - // AsyncApiFunction: - bool RunAsync() override; + // ExtensionFunction: + ResponseAction Run() override; private: void GetListOnFileThread();
diff --git a/extensions/browser/extension_function_histogram_value.h b/extensions/browser/extension_function_histogram_value.h index c601c54..b26969f 100644 --- a/extensions/browser/extension_function_histogram_value.h +++ b/extensions/browser/extension_function_histogram_value.h
@@ -1207,9 +1207,9 @@ LANGUAGESETTINGSPRIVATE_DISABLELANGUAGE, FILEMANAGERPRIVATEINTERNAL_GETDIRECTORYSIZE, BLUETOOTHLOWENERGY_SETADVERTISINGINTERVAL, - SYSTEM_DISPLAY_TOUCHCALIBRATIONSTART, - SYSTEM_DISPLAY_TOUCHCALIBRATIONSET, - SYSTEM_DISPLAY_TOUCHCALIBRATIONRESET, + SYSTEM_DISPLAY_SHOWNATIVETOUCHCALIBRATION, + SYSTEM_DISPLAY_COMPLETECUSTOMTOUCHCALIBRATION, + SYSTEM_DISPLAY_CLEARTOUCHCALIBRATION, CERTIFICATEPROVIDER_REQUESTPIN, CERTIFICATEPROVIDER_STOPPINREQUEST, QUICKUNLOCKPRIVATE_CHECKCREDENTIAL, @@ -1217,6 +1217,7 @@ CLIPBOARD_SETIMAGEDATA, NETWORKINGPRIVATE_GETGLOBALPOLICY, DIAL_FETCHDEVICEDESCRIPTION, + SYSTEM_DISPLAY_STARTCUSTOMTOUCHCALIBRATION, // Last entry: Add new entries above, then run: // python tools/metrics/histograms/update_extension_histograms.py ENUM_BOUNDARY
diff --git a/extensions/common/api/system_display.idl b/extensions/common/api/system_display.idl index 97d2c3c9..6a1a921 100644 --- a/extensions/common/api/system_display.idl +++ b/extensions/common/api/system_display.idl
@@ -207,6 +207,7 @@ callback DisplayLayoutCallback = void (DisplayLayout[] layouts); callback SetDisplayUnitInfoCallback = void(); callback SetDisplayLayoutCallback = void(); + callback NativeTouchCalibrationCallback = void(boolean success); interface Functions { // Get the information of all attached display devices. @@ -276,27 +277,40 @@ // |id|: The display's unique identifier. static void overscanCalibrationComplete(DOMString id); - // Starts touch calibration for a display. This will show an overlay on the - // screen and initialize the UX for touch calibration. If touch calibration - // for display |id| is already in progress this will throw an error. + // Displays the native touch calibration UX for the display with |id| as + // display id. This will show an overlay on the screen with required + // instructions on how to proceed. The callback will be invoked in case of + // successful calibraion only. If the calibration fails, this will throw an + // error. // |id|: The display's unique identifier. - static void touchCalibrationStart(DOMString id); + // |callback|: Optional callback to inform the caller that the touch + // calibration has ended. The argument of the callback informs if the + // calibration was a success or not. + static void showNativeTouchCalibration( + DOMString id, optional NativeTouchCalibrationCallback callback); + + // Starts custom touch calibration for a display. This should be called when + // using a custom UX for collecting calibration data. If another touch + // calibration is already in progress this will throw an error. + // |id|: The display's unique identifier. + static void startCustomTouchCalibration(DOMString id); // Sets the touch calibration pairs for a display. These |pairs| would be - // used to calibrate the touch screen for display |id|. If touch calibration - // for display |id| is in progress this will do nothing. - // |id|: The display's unique identifier. + // used to calibrate the touch screen for display with |id| called in + // startCustomTouchCalibration(). Always call |startCustomTouchCalibration| + // before calling this method. If another touch calibration is already in + // progress this will throw an error. // |pairs|: The pairs of point used to calibrate the display. // |bounds|: Bounds of the display when the touch calibration was performed. // |bounds.left| and |bounds.top| values are ignored. - static void touchCalibrationSet(DOMString id, - TouchCalibrationPairQuad pairs, - Bounds bounds); + static void completeCustomTouchCalibration(TouchCalibrationPairQuad pairs, + Bounds bounds); - // Resets the touch calibration for the display and removes the saved - // calibration data. + // Resets the touch calibration for the display and brings it back to its + // default state by clearing any touch calibration data associated with the + // display. // |id|: The display's unique identifier. - static void touchCalibrationReset(DOMString id); + static void clearTouchCalibration(DOMString id); }; interface Events {
diff --git a/gpu/config/software_rendering_list_json.cc b/gpu/config/software_rendering_list_json.cc index 47c85f4b..55bcef1b 100644 --- a/gpu/config/software_rendering_list_json.cc +++ b/gpu/config/software_rendering_list_json.cc
@@ -18,7 +18,7 @@ { "name": "software rendering list", // Please update the version number whenever you change this file. - "version": "12.09", + "version": "12.10", "entries": [ { "id": 1, @@ -1444,6 +1444,24 @@ "features": [ "all" ] + }, + { + "id": 131, + "description": "Mesa drivers older than 10.4.3 is crash prone on Linux Intel i965gm", + "cr_bugs": [462426], + "os": { + "type": "linux" + }, + "driver_vendor": "Mesa", + "driver_version": { + "op": "<", + "value": "10.4.3" + }, + "vendor_id": "8086", + "device_id": ["0x2a02"], + "features": [ + "all" + ] } ] }
diff --git a/ios/chrome/browser/context_menu/context_menu_egtest.mm b/ios/chrome/browser/context_menu/context_menu_egtest.mm index 65c652fd..df742c5 100644 --- a/ios/chrome/browser/context_menu/context_menu_egtest.mm +++ b/ios/chrome/browser/context_menu/context_menu_egtest.mm
@@ -57,6 +57,22 @@ return buttonWithAccessibilityLabelId(IDS_IOS_CONTENT_CONTEXT_OPENLINKNEWTAB); } +// Waits for the context menu item to disappear. TODO(crbug.com/682871): Remove +// this once EarlGrey is synchronized with context menu. +void WaitForContextMenuItemDisappeared(id<GREYMatcher> contextMenuItemButton) { + ConditionBlock condition = ^{ + NSError* error = nil; + [[EarlGrey selectElementWithMatcher:contextMenuItemButton] + assertWithMatcher:grey_nil() + error:&error]; + return error == nil; + }; + GREYAssert(testing::WaitUntilConditionOrTimeout( + testing::kWaitForUIElementTimeout, condition), + [NSString stringWithFormat:@"Waiting for matcher %@ failed.", + contextMenuItemButton]); +} + // Long press on |elementId| to trigger context menu and then tap on // |contextMenuItemButton| item. void LongPressElementAndTapOnButton(const char* elementId, @@ -70,8 +86,7 @@ assertWithMatcher:grey_notNil()]; [[EarlGrey selectElementWithMatcher:contextMenuItemButton] performAction:grey_tap()]; - [[EarlGrey selectElementWithMatcher:contextMenuItemButton] - assertWithMatcher:grey_nil()]; + WaitForContextMenuItemDisappeared(contextMenuItemButton); } // A simple wrapper that sleeps for 1s to wait for the animation, triggered from @@ -174,15 +189,7 @@ // Tests "Open in New Tab" on context menu on a link that requires scrolling // on the page to verify that context menu can be properly triggered in the // current screen view. -// TODO(crbug.com/681130): Re-enable this test on device. -#if TARGET_IPHONE_SIMULATOR -#define MAYBE_testContextMenuOpenInNewTabFromTallPage \ - testContextMenuOpenInNewTabFromTallPage -#else -#define MAYBE_testContextMenuOpenInNewTabFromTallPage \ - FLAKY_testContextMenuOpenInNewTabFromTallPage -#endif -- (void)MAYBE_testContextMenuOpenInNewTabFromTallPage { +- (void)testContextMenuOpenInNewTabFromTallPage { // Set up test simple http server. std::map<GURL, std::string> responses; GURL initialURL =
diff --git a/ios/chrome/browser/ui/omnibox/page_info_model.cc b/ios/chrome/browser/ui/omnibox/page_info_model.cc index 68e21cc9..e582cf4 100644 --- a/ios/chrome/browser/ui/omnibox/page_info_model.cc +++ b/ios/chrome/browser/ui/omnibox/page_info_model.cc
@@ -57,200 +57,90 @@ return; } - SectionStateIcon icon_id = ICON_STATE_OK; - base::string16 headline; - base::string16 description; + base::string16 hostname(base::UTF8ToUTF16(url.host())); - // Identity section. - base::string16 subject_name(base::UTF8ToUTF16(url.host())); - bool empty_subject_name = false; - if (subject_name.empty()) { - subject_name.assign( - l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); - empty_subject_name = true; - } + base::string16 summary; + base::string16 details; + base::string16 certificate_details; - bool is_cert_present = !!ssl.certificate; - bool is_major_cert_error = net::IsCertStatusError(ssl.cert_status) && - !net::IsCertStatusMinorError(ssl.cert_status); - - // It is possible to have |SECURITY_STYLE_AUTHENTICATION_BROKEN| and non-error - // |cert_status| for WKWebView because |security_style| and |cert_status| are - // calculated using different API, which may lead to different cert - // verification results. - if (is_cert_present && !is_major_cert_error && - ssl.security_style != web::SECURITY_STYLE_AUTHENTICATION_BROKEN) { - // There are no major errors. Check for minor errors. - if (net::IsCertStatusMinorError(ssl.cert_status)) { - base::string16 issuer_name( - base::UTF8ToUTF16(ssl.certificate->issuer().GetDisplayName())); - if (issuer_name.empty()) { - issuer_name.assign(l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); - } - description.assign(l10n_util::GetStringFUTF16( - IDS_IOS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); - - description += base::ASCIIToUTF16("\n\n"); - if (ssl.cert_status & net::CERT_STATUS_UNABLE_TO_CHECK_REVOCATION) { - description += l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_UNABLE_TO_CHECK_REVOCATION); - } else if (ssl.cert_status & net::CERT_STATUS_NO_REVOCATION_MECHANISM) { - description += l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM); - } else { - NOTREACHED() << "Need to specify string for this warning"; - } - icon_id = ICON_STATE_INFO; - } else { - // OK HTTPS page. - DCHECK(!(ssl.cert_status & net::CERT_STATUS_IS_EV)) - << "Extended Validation should be disabled"; - if (empty_subject_name) - headline.clear(); // Don't display any title. - else - headline.assign(subject_name); - base::string16 issuer_name( - base::UTF8ToUTF16(ssl.certificate->issuer().GetDisplayName())); - if (issuer_name.empty()) { - issuer_name.assign(l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_UNKNOWN_PARTY)); - } - description.assign(l10n_util::GetStringFUTF16( - IDS_IOS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); - } - if (ssl.cert_status & net::CERT_STATUS_SHA1_SIGNATURE_PRESENT) { - icon_id = ICON_STATE_INFO; - description += - base::UTF8ToUTF16("\n\n") + - l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_DEPRECATED_SIGNATURE_ALGORITHM); - } - } else { - // HTTP or HTTPS with errors (not warnings). - description.assign(l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); - icon_id = ssl.security_style == web::SECURITY_STYLE_UNAUTHENTICATED - ? ICON_STATE_INFO - : ICON_STATE_ERROR; - - const base::string16 bullet = base::UTF8ToUTF16("\n • "); - std::vector<ssl_errors::ErrorInfo> errors; - ssl_errors::ErrorInfo::GetErrorsForCertStatus( - ssl.certificate, ssl.cert_status, url, &errors); - for (size_t i = 0; i < errors.size(); ++i) { - description += bullet; - description += errors[i].short_description(); - } - - if (ssl.cert_status & net::CERT_STATUS_NON_UNIQUE_NAME) { - description += base::ASCIIToUTF16("\n\n"); - description += - l10n_util::GetStringUTF16(IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME); - } - } - sections_.push_back(SectionInfo(icon_id, headline, description, - SECTION_INFO_IDENTITY, - BUTTON_SHOW_SECURITY_HELP)); - - // Connection section. - icon_id = ICON_STATE_OK; - headline.clear(); - description.clear(); + // Summary and details. + SectionStateIcon icon_id = ICON_NONE; if (!ssl.certificate) { // Not HTTPS. - icon_id = ssl.security_style == web::SECURITY_STYLE_UNAUTHENTICATED - ? ICON_STATE_INFO - : ICON_STATE_ERROR; - description.assign( - l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_SUMMARY)); - description += base::ASCIIToUTF16("\n\n"); - description += l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_DETAILS); - } else if (ssl.security_bits < 0) { - if (ssl.content_status == web::SSLStatus::DISPLAYED_INSECURE_CONTENT) { - DCHECK(description.empty()); - // For WKWebView security_bits flag is always -1, and description is empty - // because ciphersuite is unknown. On iOS9 WKWebView blocks active - // mixed content, so warning should be about page look, not about page - // behavior. - icon_id = ICON_NONE; - description.assign(l10n_util::GetStringUTF16( - IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING)); - } else { - // Security strength is unknown. Say nothing. - icon_id = ICON_STATE_ERROR; - } - } else if (ssl.security_bits == 0) { - DCHECK_NE(ssl.security_style, web::SECURITY_STYLE_UNAUTHENTICATED); - icon_id = ICON_STATE_ERROR; - description.assign(l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT, - subject_name)); + icon_id = ICON_STATE_INFO; + summary.assign(l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_SUMMARY)); + details.assign(l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_DETAILS)); } else { - if (net::SSLConnectionStatusToVersion(ssl.connection_status) >= - net::SSL_CONNECTION_VERSION_TLS1_2 && - (net::OBSOLETE_SSL_NONE == - net::ObsoleteSSLStatus( - net::SSLConnectionStatusToCipherSuite(ssl.connection_status)))) { - description.assign(l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_CONNECTION_TEXT, subject_name)); + // It is possible to have |SECURITY_STYLE_AUTHENTICATION_BROKEN| and + // non-error + // |cert_status| for WKWebView because |security_style| and |cert_status| + // are + // calculated using different API, which may lead to different cert + // verification results. + if (net::IsCertStatusError(ssl.cert_status) || + ssl.security_style == web::SECURITY_STYLE_AUTHENTICATION_BROKEN) { + // HTTPS with major errors + icon_id = ICON_STATE_ERROR; + DCHECK(!net::IsCertStatusMinorError(ssl.cert_status)); + summary.assign( + l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_SUMMARY)); + details.assign( + l10n_util::GetStringUTF16(IDS_PAGEINFO_NOT_SECURE_DETAILS)); + + certificate_details.assign(l10n_util::GetStringUTF16( + IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY)); + const base::string16 bullet = base::UTF8ToUTF16("\n • "); + std::vector<ssl_errors::ErrorInfo> errors; + ssl_errors::ErrorInfo::GetErrorsForCertStatus( + ssl.certificate, ssl.cert_status, url, &errors); + for (size_t i = 0; i < errors.size(); ++i) { + certificate_details += bullet; + certificate_details += errors[i].short_description(); + } } else { - description.assign(l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_WEAK_ENCRYPTION_CONNECTION_TEXT, - subject_name)); - } - if (ssl.content_status) { - bool ran_insecure_content = false; // Always false on iOS. - icon_id = ran_insecure_content ? ICON_STATE_ERROR : ICON_NONE; - description.assign(l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_SENTENCE_LINK, description, - l10n_util::GetStringUTF16( - ran_insecure_content - ? IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_ERROR - : IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTED_INSECURE_CONTENT_WARNING))); + // Valid HTTPS or HTTPS with minor errors. + base::string16 issuer_name( + base::UTF8ToUTF16(ssl.certificate->issuer().GetDisplayName())); + if (!issuer_name.empty()) { + // Show the issuer name if it's available. + // TODO(crbug.com/502470): Implement a certificate viewer instead. + certificate_details.assign(l10n_util::GetStringFUTF16( + IDS_IOS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY, issuer_name)); + } + if (ssl.content_status == web::SSLStatus::DISPLAYED_INSECURE_CONTENT) { + // HTTPS with mixed content. + icon_id = ICON_STATE_INFO; + summary.assign( + l10n_util::GetStringUTF16(IDS_PAGEINFO_MIXED_CONTENT_SUMMARY)); + details.assign( + l10n_util::GetStringUTF16(IDS_PAGEINFO_MIXED_CONTENT_DETAILS)); + } else { + // Valid HTTPS + icon_id = ICON_STATE_OK; + summary.assign(l10n_util::GetStringUTF16(IDS_PAGEINFO_SECURE_SUMMARY)); + details.assign(l10n_util::GetStringUTF16(IDS_PAGEINFO_SECURE_DETAILS)); + + DCHECK(!(ssl.cert_status & net::CERT_STATUS_IS_EV)) + << "Extended Validation should be disabled"; + } } } - uint16_t cipher_suite = - net::SSLConnectionStatusToCipherSuite(ssl.connection_status); - if (ssl.security_bits > 0 && cipher_suite) { - int ssl_version = net::SSLConnectionStatusToVersion(ssl.connection_status); - const char* ssl_version_str; - net::SSLVersionToString(&ssl_version_str, ssl_version); - description += base::ASCIIToUTF16("\n\n"); - description += - l10n_util::GetStringFUTF16(IDS_PAGE_INFO_SECURITY_TAB_SSL_VERSION, - base::ASCIIToUTF16(ssl_version_str)); + base::string16 description; + base::string16 spacer = base::UTF8ToUTF16("\n\n"); - const char *key_exchange, *cipher, *mac; - bool is_aead; - bool is_tls13; - net::SSLCipherSuiteToStrings(&key_exchange, &cipher, &mac, &is_aead, - &is_tls13, cipher_suite); + description.assign(summary); + description += spacer; + description += details; - description += base::ASCIIToUTF16("\n\n"); - if (is_aead) { - description += l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS_AEAD, - base::ASCIIToUTF16(cipher), base::ASCIIToUTF16(key_exchange)); - } else { - description += l10n_util::GetStringFUTF16( - IDS_PAGE_INFO_SECURITY_TAB_ENCRYPTION_DETAILS, - base::ASCIIToUTF16(cipher), base::ASCIIToUTF16(mac), - base::ASCIIToUTF16(key_exchange)); - } + if (!certificate_details.empty()) { + description += spacer; + description += certificate_details; } - if (!description.empty()) { - sections_.push_back(SectionInfo(icon_id, headline, description, - SECTION_INFO_CONNECTION, - BUTTON_SHOW_SECURITY_HELP)); - } - - if (ssl.certificate) { - certificate_label_ = - l10n_util::GetStringUTF16(IDS_PAGEINFO_CERT_INFO_BUTTON); - } + sections_.push_back(SectionInfo(icon_id, hostname, description, + SECTION_INFO_CONNECTION, + BUTTON_SHOW_SECURITY_HELP)); } PageInfoModel::~PageInfoModel() {}
diff --git a/ios/chrome/browser/web/browsing_egtest.mm b/ios/chrome/browser/web/browsing_egtest.mm index f23a1faa..1e57558 100644 --- a/ios/chrome/browser/web/browsing_egtest.mm +++ b/ios/chrome/browser/web/browsing_egtest.mm
@@ -577,18 +577,61 @@ assertWithMatcher:grey_notNil()]; } +// Tap the text field indicated by |ID| to open the keyboard, and then +// press the keyboard's "Go" button. +- (void)openKeyboardAndTapGoButtonWithTextFieldID:(const std::string&)ID { + // Disable EarlGrey's synchronization since it is blocked by opening the + // keyboard from a web view. + [[GREYConfiguration sharedInstance] + setValue:@NO + forConfigKey:kGREYConfigKeySynchronizationEnabled]; + + // Wait for web view to be interactable before tapping. + GREYCondition* interactableCondition = [GREYCondition + conditionWithName:@"Wait for web view to be interactable." + block:^BOOL { + NSError* error = nil; + id<GREYMatcher> webViewMatcher = webViewInWebState( + chrome_test_util::GetCurrentWebState()); + [[EarlGrey selectElementWithMatcher:webViewMatcher] + assertWithMatcher:grey_interactable() + error:&error]; + return !error; + }]; + GREYAssert( + [interactableCondition waitWithTimeout:testing::kWaitForUIElementTimeout], + @"Web view did not become interactable."); + + web::WebState* currentWebState = chrome_test_util::GetCurrentWebState(); + [[EarlGrey selectElementWithMatcher:web::webViewInWebState(currentWebState)] + performAction:web::webViewTapElement(currentWebState, ID)]; + + // Wait until the keyboard shows up before tapping. + GREYCondition* condition = [GREYCondition + conditionWithName:@"Wait for the keyboard to show up." + block:^BOOL { + NSError* error = nil; + [[EarlGrey selectElementWithMatcher:goButtonMatcher()] + assertWithMatcher:grey_notNil() + error:&error]; + return (error == nil); + }]; + GREYAssert([condition waitWithTimeout:10], + @"No keyboard with 'Go' button showed up."); + + [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"Go")] + performAction:grey_tap()]; + + // Reenable synchronization now that the keyboard has been closed. + [[GREYConfiguration sharedInstance] + setValue:@YES + forConfigKey:kGREYConfigKeySynchronizationEnabled]; +} + // Tests that submitting a POST-based form by tapping the 'Go' button on the // keyboard navigates to the correct URL and the back button works as expected // afterwards. -// TODO(crbug.com/670380): Enable this test on device. -#if TARGET_IPHONE_SIMULATOR -#define MAYBE_testBrowsingPostEntryWithKeyboard \ - testBrowsingPostEntryWithKeyboard -#else -#define MAYBE_testBrowsingPostEntryWithKeyboard \ - FLAKY_testBrowsingPostEntryWithKeyboard -#endif -- (void)MAYBE_testBrowsingPostEntryWithKeyboard { +- (void)testBrowsingPostEntryWithKeyboard { // Create map of canned responses and set up the test HTML server. std::map<GURL, std::string> responses; const GURL URL = @@ -611,36 +654,7 @@ [[EarlGrey selectElementWithMatcher:webViewContainingText("hello!")] assertWithMatcher:grey_notNil()]; - web::WebState* currentWebState = chrome_test_util::GetCurrentWebState(); - [[EarlGrey selectElementWithMatcher:web::webViewInWebState(currentWebState)] - performAction:web::webViewTapElement(currentWebState, "textfield")]; - - // Disable EarlGrey's synchronization since it is blocked by opening the - // keyboard from a web view. - [[GREYConfiguration sharedInstance] - setValue:@NO - forConfigKey:kGREYConfigKeySynchronizationEnabled]; - - // Wait until the keyboard shows up before tapping. - GREYCondition* condition = [GREYCondition - conditionWithName:@"Wait for the keyboard to show up." - block:^BOOL { - NSError* error = nil; - [[EarlGrey selectElementWithMatcher:goButtonMatcher()] - assertWithMatcher:grey_notNil() - error:&error]; - return (error == nil); - }]; - GREYAssert([condition waitWithTimeout:10], - @"No keyboard with 'Go' button showed up."); - - [[EarlGrey selectElementWithMatcher:grey_accessibilityID(@"Go")] - performAction:grey_tap()]; - - // Reenable synchronization now that the keyboard has been closed. - [[GREYConfiguration sharedInstance] - setValue:@YES - forConfigKey:kGREYConfigKeySynchronizationEnabled]; + [self openKeyboardAndTapGoButtonWithTextFieldID:"textfield"]; // Verify that the browser navigates to the expected URL. [[EarlGrey selectElementWithMatcher:omniboxText(destinationURL.GetContent())]
diff --git a/ios/web/navigation/window_location_inttest.mm b/ios/web/navigation/window_location_inttest.mm index 4e91f776..e6d7aee4 100644 --- a/ios/web/navigation/window_location_inttest.mm +++ b/ios/web/navigation/window_location_inttest.mm
@@ -121,6 +121,23 @@ EXPECT_EQ(NSNotFound, GetIndexOfNavigationItem(about_blank_item)); } +// Tests that calling window.location.assign() with an unresolvable URL loads +// about:blank. +TEST_F(WindowLocationTest, WindowLocationAssignUnresolvable) { + // Attempt to call window.location.assign() using an unresolvable URL. + GURL about_blank("about:blank"); + GURL unresolvable_url("http:https:not a url"); + SetWindowLocationUrl(unresolvable_url); + ExecuteBlockAndWaitForLoad(about_blank, ^{ + ASSERT_TRUE(web::test::TapWebViewElementWithId(web_state(), + kWindowLocationAssignID)); + }); + + // Verify that about:blank was actually loaded. + EXPECT_EQ(about_blank, + navigation_manager()->GetLastCommittedItem()->GetURL()); +} + // Tests that calling window.location.replace() doesn't create a new // NavigationItem. // TODO(crbug.com/307072): Enable test when location.replace is fixed. @@ -152,3 +169,20 @@ EXPECT_EQ(GetIndexOfNavigationItem(current_item) + 1, GetIndexOfNavigationItem(about_blank_item)); } + +// Tests that calling window.location.replace() with an unresolvable URL loads +// about:blank. +TEST_F(WindowLocationTest, WindowLocationReplaceUnresolvable) { + // Attempt to call window.location.assign() using an unresolvable URL. + GURL about_blank("about:blank"); + GURL unresolvable_url("http:https:not a url"); + SetWindowLocationUrl(unresolvable_url); + ExecuteBlockAndWaitForLoad(about_blank, ^{ + ASSERT_TRUE(web::test::TapWebViewElementWithId(web_state(), + kWindowLocationReplaceID)); + }); + + // Verify that about:blank was actually loaded. + EXPECT_EQ(about_blank, + navigation_manager()->GetLastCommittedItem()->GetURL()); +}
diff --git a/mash/BUILD.gn b/mash/BUILD.gn index 14cfed90..79ed5e4 100644 --- a/mash/BUILD.gn +++ b/mash/BUILD.gn
@@ -131,6 +131,8 @@ "//ash/mus:unittests", "//base", "//base/test:test_support", + "//cc", + "//cc:test_support", "//services/service_manager/background:main", "//ui/aura", "//ui/base",
diff --git a/mash/test/DEPS b/mash/test/DEPS new file mode 100644 index 0000000..da56252e9 --- /dev/null +++ b/mash/test/DEPS
@@ -0,0 +1,6 @@ +specific_include_rules = { + "mash_test_suite\.cc": [ + "+cc/output/context_provider.h", + "+cc/test", + ], +}
diff --git a/mash/test/mash_test_suite.cc b/mash/test/mash_test_suite.cc index 09b3696..4a06e47 100644 --- a/mash/test/mash_test_suite.cc +++ b/mash/test/mash_test_suite.cc
@@ -6,17 +6,55 @@ #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/memory/ptr_util.h" #include "base/path_service.h" +#include "cc/output/context_provider.h" +#include "cc/test/test_gpu_memory_buffer_manager.h" +#include "cc/test/test_task_graph_runner.h" #include "ui/aura/env.h" #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_paths.h" -#include "ui/compositor/test/context_factories_for_test.h" +#include "ui/compositor/compositor.h" +#include "ui/gl/gl_bindings.h" #include "ui/gl/gl_switches.h" -#include "ui/gl/test/gl_surface_test_support.h" namespace mash { namespace test { +class TestContextFactory : public ui::ContextFactory { + public: + TestContextFactory() {} + ~TestContextFactory() override {} + + private: + // ui::ContextFactory:: + void CreateCompositorFrameSink( + base::WeakPtr<ui::Compositor> compositor) override {} + scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() + override { + return nullptr; + } + void RemoveCompositor(ui::Compositor* compositor) override {} + bool DoesCreateTestContexts() override { return true; } + uint32_t GetImageTextureTarget(gfx::BufferFormat format, + gfx::BufferUsage usage) override { + return GL_TEXTURE_2D; + } + gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override { + return &gpu_memory_buffer_manager_; + } + cc::TaskGraphRunner* GetTaskGraphRunner() override { + return &task_graph_runner_; + } + void AddObserver(ui::ContextFactoryObserver* observer) override {} + void RemoveObserver(ui::ContextFactoryObserver* observer) override {} + + cc::TestTaskGraphRunner task_graph_runner_; + cc::TestGpuMemoryBufferManager gpu_memory_buffer_manager_; + + DISALLOW_COPY_AND_ASSIGN(TestContextFactory); +}; + MashTestSuite::MashTestSuite(int argc, char** argv) : TestSuite(argc, argv) {} MashTestSuite::~MashTestSuite() {} @@ -35,20 +73,12 @@ base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); - gl::GLSurfaceTestSupport::InitializeOneOff(); - const bool enable_pixel_output = false; - ui::ContextFactory* context_factory = nullptr; - ui::ContextFactoryPrivate* context_factory_private = nullptr; - ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, - &context_factory_private); - - env_->set_context_factory(context_factory); - env_->set_context_factory_private(context_factory_private); + compositor_context_factory_ = base::MakeUnique<TestContextFactory>(); + env_->set_context_factory(compositor_context_factory_.get()); } void MashTestSuite::Shutdown() { - ui::TerminateContextFactoryForTests(); env_.reset(); ui::ResourceBundle::CleanupSharedInstance(); base::TestSuite::Shutdown();
diff --git a/mash/test/mash_test_suite.h b/mash/test/mash_test_suite.h index d93d64b..8bfa7bd5 100644 --- a/mash/test/mash_test_suite.h +++ b/mash/test/mash_test_suite.h
@@ -18,6 +18,8 @@ namespace mash { namespace test { +class TestContextFactory; + class MashTestSuite : public base::TestSuite { public: MashTestSuite(int argc, char** argv); @@ -31,6 +33,7 @@ private: base::TestDiscardableMemoryAllocator discardable_memory_allocator_; std::unique_ptr<aura::Env> env_; + std::unique_ptr<TestContextFactory> compositor_context_factory_; DISALLOW_COPY_AND_ASSIGN(MashTestSuite); };
diff --git a/media/base/mime_util_internal.cc b/media/base/mime_util_internal.cc index 031d548..a3b51d07 100644 --- a/media/base/mime_util_internal.cc +++ b/media/base/mime_util_internal.cc
@@ -360,6 +360,11 @@ hls_codecs.insert(MP3); AddContainerWithCodecs("application/x-mpegurl", hls_codecs, true); AddContainerWithCodecs("application/vnd.apple.mpegurl", hls_codecs, true); + AddContainerWithCodecs("audio/mpegurl", hls_codecs, true); + // Not documented by Apple, but unfortunately used extensively by Apple and + // others for both audio-only and audio+video playlists. See + // https://crbug.com/675552 for details and examples. + AddContainerWithCodecs("audio/x-mpegurl", hls_codecs, true); #endif // defined(OS_ANDROID) #endif // defined(USE_PROPRIETARY_CODECS) } @@ -502,9 +507,9 @@ case MPEG2_AAC: // MPEG-2 variants of AAC are not supported on Android unless the unified // media pipeline can be used and the container is not HLS. These codecs - // will be decoded in software. See https:crbug.com/544268 for details. - if (mime_type_lower_case == "application/x-mpegurl" || - mime_type_lower_case == "application/vnd.apple.mpegurl") { + // will be decoded in software. See https://crbug.com/544268 for details. + if (base::EndsWith(mime_type_lower_case, "mpegurl", + base::CompareCase::SENSITIVE)) { return false; } return !is_encrypted && platform_info.is_unified_media_pipeline_enabled;
diff --git a/media/base/mime_util_unittest.cc b/media/base/mime_util_unittest.cc index 7145368..10e4aec 100644 --- a/media/base/mime_util_unittest.cc +++ b/media/base/mime_util_unittest.cc
@@ -146,6 +146,8 @@ EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("Application/X-MPEGURL")); EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType( "application/vnd.apple.mpegurl")); + EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("audio/mpegurl")); + EXPECT_EQ(kHlsSupported, IsSupportedMediaMimeType("audio/x-mpegurl")); #if defined(USE_PROPRIETARY_CODECS) EXPECT_TRUE(IsSupportedMediaMimeType("audio/mp4")); @@ -428,6 +430,10 @@ MimeUtil::MPEG2_AAC, "application/x-mpegurl", false, info)); EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( MimeUtil::MPEG2_AAC, "application/vnd.apple.mpegurl", false, info)); + EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( + MimeUtil::MPEG2_AAC, "audio/mpegurl", false, info)); + EXPECT_FALSE(MimeUtil::IsCodecSupportedOnPlatform( + MimeUtil::MPEG2_AAC, "audio/x-mpegurl", false, info)); }); }
diff --git a/media/base/pipeline_impl.cc b/media/base/pipeline_impl.cc index 1794e44..ef8ac15 100644 --- a/media/base/pipeline_impl.cc +++ b/media/base/pipeline_impl.cc
@@ -647,8 +647,11 @@ shared_state_.statistics.video_frames_dropped += stats.video_frames_dropped; shared_state_.statistics.audio_memory_usage += stats.audio_memory_usage; shared_state_.statistics.video_memory_usage += stats.video_memory_usage; - shared_state_.statistics.video_keyframe_distance_average = - stats.video_keyframe_distance_average; + + if (stats.video_keyframe_distance_average != kNoTimestamp) { + shared_state_.statistics.video_keyframe_distance_average = + stats.video_keyframe_distance_average; + } } void PipelineImpl::RendererWrapper::OnBufferingStateChange(
diff --git a/media/base/pipeline_status.h b/media/base/pipeline_status.h index df52631..b393c79 100644 --- a/media/base/pipeline_status.h +++ b/media/base/pipeline_status.h
@@ -10,6 +10,7 @@ #include "base/callback.h" #include "base/time/time.h" +#include "media/base/timestamp_constants.h" namespace media { @@ -59,7 +60,7 @@ uint32_t video_frames_dropped = 0; int64_t audio_memory_usage = 0; int64_t video_memory_usage = 0; - base::TimeDelta video_keyframe_distance_average; + base::TimeDelta video_keyframe_distance_average = kNoTimestamp; }; // Used for updating pipeline statistics; the passed value should be a delta
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc index 3b0e829..5ac86d7 100644 --- a/media/blink/webmediaplayer_impl.cc +++ b/media/blink/webmediaplayer_impl.cc
@@ -243,7 +243,9 @@ is_encrypted_(false), underflow_count_(0), preroll_attempt_pending_(false), - observer_(params.media_observer()) { + observer_(params.media_observer()), + max_keyframe_distance_to_disable_background_video_( + params.max_keyframe_distance_to_disable_background_video()) { DCHECK(!adjust_allocated_memory_cb_.is_null()); DCHECK(renderer_factory_); DCHECK(client_);
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h index a4bb832..af26096 100644 --- a/media/blink/webmediaplayer_impl.h +++ b/media/blink/webmediaplayer_impl.h
@@ -650,9 +650,7 @@ // The maximum video keyframe distance that allows triggering background // playback optimizations. - // 10 seconds by default but can be overridden by a Finch experiment. - base::TimeDelta max_keyframe_distance_to_disable_background_video_ = - base::TimeDelta::FromSeconds(10); + base::TimeDelta max_keyframe_distance_to_disable_background_video_; // Whether disabled the video track as an optimization. bool video_track_disabled_ = false;
diff --git a/media/blink/webmediaplayer_impl_unittest.cc b/media/blink/webmediaplayer_impl_unittest.cc index b68bba6..2071eed5 100644 --- a/media/blink/webmediaplayer_impl_unittest.cc +++ b/media/blink/webmediaplayer_impl_unittest.cc
@@ -208,7 +208,8 @@ scoped_refptr<SwitchableAudioRendererSink>(), media_log_, media_thread_.task_runner(), message_loop_.task_runner(), message_loop_.task_runner(), WebMediaPlayerParams::Context3DCB(), - base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr))); + base::Bind(&OnAdjustAllocatedMemory), nullptr, nullptr, nullptr, + base::TimeDelta::FromSeconds(10)))); } ~WebMediaPlayerImplTest() override {
diff --git a/media/blink/webmediaplayer_params.cc b/media/blink/webmediaplayer_params.cc index 18bfecb..917261f 100644 --- a/media/blink/webmediaplayer_params.cc +++ b/media/blink/webmediaplayer_params.cc
@@ -22,7 +22,8 @@ const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb, blink::WebContentDecryptionModule* initial_cdm, SurfaceManager* surface_manager, - base::WeakPtr<MediaObserver> media_observer) + base::WeakPtr<MediaObserver> media_observer, + base::TimeDelta max_keyframe_distance_to_disable_background_video) : defer_load_cb_(defer_load_cb), audio_renderer_sink_(audio_renderer_sink), media_log_(media_log), @@ -33,7 +34,9 @@ adjust_allocated_memory_cb_(adjust_allocated_memory_cb), initial_cdm_(initial_cdm), surface_manager_(surface_manager), - media_observer_(media_observer) {} + media_observer_(media_observer), + max_keyframe_distance_to_disable_background_video_( + max_keyframe_distance_to_disable_background_video) {} WebMediaPlayerParams::~WebMediaPlayerParams() {}
diff --git a/media/blink/webmediaplayer_params.h b/media/blink/webmediaplayer_params.h index 82aed3b6..54ab539d 100644 --- a/media/blink/webmediaplayer_params.h +++ b/media/blink/webmediaplayer_params.h
@@ -11,6 +11,7 @@ #include "base/macros.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" +#include "base/time/time.h" #include "media/base/media_observer.h" #include "media/blink/media_blink_export.h" #include "media/filters/context_3d.h" @@ -57,7 +58,8 @@ const AdjustAllocatedMemoryCB& adjust_allocated_memory_cb, blink::WebContentDecryptionModule* initial_cdm, SurfaceManager* surface_manager, - base::WeakPtr<MediaObserver> media_observer); + base::WeakPtr<MediaObserver> media_observer, + base::TimeDelta max_keyframe_distance_to_disable_background_video); ~WebMediaPlayerParams(); @@ -101,6 +103,10 @@ return media_observer_; } + base::TimeDelta max_keyframe_distance_to_disable_background_video() const { + return max_keyframe_distance_to_disable_background_video_; + } + private: DeferLoadCB defer_load_cb_; scoped_refptr<SwitchableAudioRendererSink> audio_renderer_sink_; @@ -114,6 +120,7 @@ blink::WebContentDecryptionModule* initial_cdm_; SurfaceManager* surface_manager_; base::WeakPtr<MediaObserver> media_observer_; + base::TimeDelta max_keyframe_distance_to_disable_background_video_; DISALLOW_IMPLICIT_CONSTRUCTORS(WebMediaPlayerParams); };
diff --git a/media/filters/decoder_stream_traits.cc b/media/filters/decoder_stream_traits.cc index a2f8c99..9577add 100644 --- a/media/filters/decoder_stream_traits.cc +++ b/media/filters/decoder_stream_traits.cc
@@ -107,13 +107,13 @@ PipelineStatistics statistics; statistics.video_bytes_decoded = bytes_decoded; - // Before we have enough keyframes to calculate the average distance, we will - // assume the average keyframe distance is infinitely large. - if (keyframe_distance_average_.count() < 3) { - statistics.video_keyframe_distance_average = base::TimeDelta::Max(); - } else { + if (keyframe_distance_average_.count()) { statistics.video_keyframe_distance_average = keyframe_distance_average_.Average(); + } else { + // Before we have enough keyframes to calculate the average distance, we + // will assume the average keyframe distance is infinitely large. + statistics.video_keyframe_distance_average = base::TimeDelta::Max(); } statistics_cb.Run(statistics); @@ -135,7 +135,6 @@ DemuxerStream* stream) { DCHECK(stream); last_keyframe_timestamp_ = base::TimeDelta(); - keyframe_distance_average_.Reset(); } void DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecode(
diff --git a/media/filters/video_renderer_algorithm_unittest.cc b/media/filters/video_renderer_algorithm_unittest.cc index 77ea231..119332eb 100644 --- a/media/filters/video_renderer_algorithm_unittest.cc +++ b/media/filters/video_renderer_algorithm_unittest.cc
@@ -1373,9 +1373,9 @@ const double playback_rate = kTestRates[i]; SCOPED_TRACE(base::StringPrintf("Playback Rate: %.03f", playback_rate)); time_source_.SetPlaybackRate(playback_rate); - RunFramePumpTest(false, &frame_tg, &display_tg, - [this](const scoped_refptr<VideoFrame>& frame, - size_t frames_dropped) {}); + RunFramePumpTest( + false, &frame_tg, &display_tg, + [](const scoped_refptr<VideoFrame>& frame, size_t frames_dropped) {}); if (HasFatalFailure()) return;
diff --git a/media/formats/mp4/box_definitions.cc b/media/formats/mp4/box_definitions.cc index f541ee6..b6ea088a 100644 --- a/media/formats/mp4/box_definitions.cc +++ b/media/formats/mp4/box_definitions.cc
@@ -193,6 +193,7 @@ uint16_t subsample_count; RCHECK(reader->Read2(&subsample_count)); RCHECK(subsample_count > 0); + RCHECK(subsample_count <= subsamples.max_size()); subsamples.resize(subsample_count); for (SubsampleEntry& subsample : subsamples) { uint16_t clear_bytes; @@ -482,11 +483,16 @@ uint32_t count; RCHECK(reader->ReadFullBoxHeader() && reader->Read4(&count)); - if (reader->version() == 1) { - RCHECK(reader->HasBytes(count * 20)); - } else { - RCHECK(reader->HasBytes(count * 12)); - } + const size_t bytes_per_edit = reader->version() == 1 ? 20 : 12; + + // Cast |count| to size_t before multiplying to support maximum platform size. + base::CheckedNumeric<size_t> bytes_needed = + base::CheckMul(bytes_per_edit, static_cast<size_t>(count)); + RCHECK_MEDIA_LOGGED(bytes_needed.IsValid(), reader->media_log(), + "Extreme ELST count exceeds implementation limit."); + RCHECK(reader->HasBytes(bytes_needed.ValueOrDie())); + + RCHECK(count <= edits.max_size()); edits.resize(count); for (std::vector<EditListEntry>::iterator edit = edits.begin(); @@ -1132,13 +1138,15 @@ int fields = sample_duration_present + sample_size_present + sample_flags_present + sample_composition_time_offsets_present; + const size_t bytes_per_field = 4; // Cast |sample_count| to size_t before multiplying to support maximum // platform size. - base::CheckedNumeric<size_t> bytes_needed = - base::CheckMul(fields, static_cast<size_t>(sample_count)); - RCHECK_MEDIA_LOGGED(bytes_needed.IsValid(), reader->media_log(), - "Extreme TRUN sample count exceeds system address space"); + base::CheckedNumeric<size_t> bytes_needed = base::CheckMul( + fields, bytes_per_field, static_cast<size_t>(sample_count)); + RCHECK_MEDIA_LOGGED( + bytes_needed.IsValid(), reader->media_log(), + "Extreme TRUN sample count exceeds implementation limit."); RCHECK(reader->HasBytes(bytes_needed.ValueOrDie())); if (sample_duration_present) { @@ -1199,6 +1207,16 @@ uint32_t count; RCHECK(reader->Read4(&count)); + + const size_t bytes_per_entry = 8; + // Cast |count| to size_t before multiplying to support maximum platform size. + base::CheckedNumeric<size_t> bytes_needed = + base::CheckMul(bytes_per_entry, static_cast<size_t>(count)); + RCHECK_MEDIA_LOGGED(bytes_needed.IsValid(), reader->media_log(), + "Extreme SBGP count exceeds implementation limit."); + RCHECK(reader->HasBytes(bytes_needed.ValueOrDie())); + + RCHECK(count <= entries.max_size()); entries.resize(count); for (uint32_t i = 0; i < count; ++i) { RCHECK(reader->Read4(&entries[i].sample_count) && @@ -1279,6 +1297,19 @@ uint32_t count; RCHECK(reader->Read4(&count)); + + // Check that we have at least two bytes for each entry before allocating a + // potentially huge entries vector. In reality each entry will require a + // variable number of bytes in excess of 2. + const int bytes_per_entry = 2; + // Cast |count| to size_t before multiplying to support maximum platform size. + base::CheckedNumeric<size_t> bytes_needed = + base::CheckMul(bytes_per_entry, static_cast<size_t>(count)); + RCHECK_MEDIA_LOGGED(bytes_needed.IsValid(), reader->media_log(), + "Extreme SGPD count exceeds implementation limit."); + RCHECK(reader->HasBytes(bytes_needed.ValueOrDie())); + + RCHECK(count <= entries.max_size()); entries.resize(count); for (uint32_t i = 0; i < count; ++i) { if (version == 1) { @@ -1350,9 +1381,10 @@ RCHECK(reader->version() == 0); RCHECK(reader->flags() == 0); - int sample_count = reader->box_size() - reader->pos(); + size_t sample_count = reader->box_size() - reader->pos(); + RCHECK(sample_count <= sample_depends_on_.max_size()); sample_depends_on_.resize(sample_count); - for (int i = 0; i < sample_count; ++i) { + for (size_t i = 0; i < sample_count; ++i) { uint8_t sample_info; RCHECK(reader->Read1(&sample_info));
diff --git a/media/formats/mp4/box_reader_unittest.cc b/media/formats/mp4/box_reader_unittest.cc index eefc9ef..818d807 100644 --- a/media/formats/mp4/box_reader_unittest.cc +++ b/media/formats/mp4/box_reader_unittest.cc
@@ -103,6 +103,51 @@ EXPECT_EQ(reader->box_size(), data_size); } + template <typename ChildType> + void TestParsing32bitOverflow(const uint8_t* buffer, + size_t size, + const std::string& overflow_error) { + // Wrap whatever we're passed in a dummy EMSG so we can satisfy requirements + // for ReadTopLevelBox and to kick off parsing. + std::vector<uint8_t> buffer_wrapper = { + 0x00, 0x00, 0x00, 0x00, // dummy size + 'e', 'm', 's', 'g', // fourcc + }; + buffer_wrapper.insert(buffer_wrapper.end(), buffer, buffer + size); + + // Basic check of the nested buffer size. If box_size > buffer size the test + // will exit early (waiting for more bytes to be appended). + ASSERT_TRUE(base::IsValueInRangeForNumericType<uint8_t>(size)); + ASSERT_LE(buffer[3], size); + + // Update the size (keep it simple). + ASSERT_TRUE( + base::IsValueInRangeForNumericType<uint8_t>(buffer_wrapper.size())); + buffer_wrapper[3] = buffer_wrapper.size(); + + bool err; + std::unique_ptr<BoxReader> reader(BoxReader::ReadTopLevelBox( + &buffer_wrapper[0], buffer_wrapper.size(), media_log_, &err)); + EXPECT_FALSE(err); + EXPECT_TRUE(reader); + EXPECT_EQ(FOURCC_EMSG, reader->type()); + +// Overflow is only triggered/caught on 32-bit systems. 64-bit systems will +// instead fail parsing because tests are written such that |buffer| never +// contains enough bytes for parsing to succeed. +#if defined(ARCH_CPU_32_BITS) + const int kOverflowLogCount = 1; +#else + const int kOverflowLogCount = 0; +#endif + + if (!overflow_error.empty()) + EXPECT_MEDIA_LOG(HasSubstr(overflow_error)).Times(kOverflowLogCount); + + std::vector<ChildType> children; + EXPECT_FALSE(reader->ReadAllChildrenAndCheckFourCC(&children)); + } + scoped_refptr<StrictMock<MockMediaLog>> media_log_; }; @@ -276,13 +321,11 @@ // The sample specifies a large number of EditListEntry's, but only 1 is // actually included in the box. This test verifies that the code checks // properly that the buffer contains the specified number of EditListEntry's - // (does not cause an int32_t overflow when checking that the bytes are - // available, and does not read past the end of the buffer). static const uint8_t kData[] = { 0x00, 0x00, 0x00, 0x2c, 'e', 'm', 's', 'g', // outer box 0x00, 0x00, 0x00, 0x24, 'e', 'l', 's', 't', // nested box 0x01, 0x00, 0x00, 0x00, // version = 1, flags = 0 - 0xff, 0xff, 0xff, 0xff, // count = max, but only 1 actually included + 0x00, 0x00, 0x00, 0x0a, // count = 10, but only 1 actually included 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; @@ -320,93 +363,101 @@ } TEST_F(BoxReaderTest, TrunSampleCount32bitOverflow) { - // This data is not a valid 'emsg' box. It is just used as a top-level box - // as ReadTopLevelBox() has a restricted set of boxes it allows. - // The nested 'trun' box specifies an unusually high number of samples, though - // only one sample is actually included in the box. The values for "sample - // count" and "flags" are chosen such that their 32-bit product will overflow - // to a very small number (4), leading to incorrect assumptions about bytes - // available and ultimately OOB reads. http://crbug.com/679640 + // This 'trun' box specifies an unusually high sample count, though only one + // sample is included in the bytes below. The values for "sample_count" and + // "flags" are chosen such that the needed number of bytes will overflow 32 + // bits to yield a very small number (4), potentially passing the + // internal check for HasBytes(). http://crbug.com/679640 static const uint8_t kData[] = { - 0x00, 0x00, 0x00, 0x28, - 'e', 'm', 's', 'g', // outer box - 0x00, 0x00, 0x00, 0x20, - 't', 'r', 'u', 'n', // nested box - 0x00, 0x00, // version = 0 + 0x00, 0x00, 0x00, 0x18, 't', 'r', 'u', 'n', // header + 0x00, 0x00, // version = 0 0x03, 0x00, // flags = 2 fields present (sample duration and sample size) 0x80, 0x00, 0x00, 0x02, // sample count = 2147483650 - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // only one sample present - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - bool err; - std::unique_ptr<BoxReader> reader( - BoxReader::ReadTopLevelBox(kData, sizeof(kData), media_log_, &err)); - - EXPECT_FALSE(err); - EXPECT_TRUE(reader); - EXPECT_EQ(FOURCC_EMSG, reader->type()); - -// Overflow is only triggered/caught on 32-bit systems. 64-bit systems will -// instead fail parsing because kData does not have enough bytes to describe -// the large number of samples. -#if defined(ARCH_CPU_32_BITS) - const int kOverflowLogCount = 1; -#else - const int kOverflowLogCount = 0; -#endif - - EXPECT_MEDIA_LOG( - HasSubstr("Extreme TRUN sample count exceeds system address space")) - .Times(kOverflowLogCount); - - // Reading the child should fail since the number of samples specified - // doesn't match what is in the box. - std::vector<TrackFragmentRun> children; - EXPECT_FALSE(reader->ReadAllChildrenAndCheckFourCC(&children)); + // Verify we catch the overflow to avoid OOB reads/writes. + TestParsing32bitOverflow<TrackFragmentRun>( + kData, sizeof(kData), + "Extreme TRUN sample count exceeds implementation limit."); } TEST_F(BoxReaderTest, SaioCount32bitOverflow) { - // This data is not a valid 'emsg' box. It is just used as a top-level box - // as ReadTopLevelBox() has a restricted set of boxes it allows. - // The nested 'saio' box specifies an unusually high number of offset counts, - // though only one offset is actually included in the box. The values for - // "count" and "version" are chosen such that the needed number of bytes will - // overflow to a very small number (4), leading to incorrect assumptions about - // bytes available and ultimately OOB reads. http://crbug.com/679641 + // This 'saio' box specifies an unusually high number of offset counts, though + // only one offset is included in the bytes below. The values for "count" and + // "version" are chosen such that the needed number of bytes will overflow 32 + // bits to yield a very small number (4), potentially passing the internal + // check for HasBytes(). http://crbug.com/679641 static const uint8_t kData[] = { - 0x00, 0x00, 0x00, 0x1c, 'e', 'm', 's', 'g', // outer box - 0x00, 0x00, 0x00, 0x14, 's', 'a', 'i', 'o', // nested box + 0x00, 0x00, 0x00, 0x14, 's', 'a', 'i', 'o', // header 0x00, 0x00, // version = 0 (4 bytes per offset entry) 0x00, 0x00, // flags = 0 0x40, 0x00, 0x00, 0x01, // offsets count = 1073741825 0x00, 0x00, 0x00, 0x00, // single offset entry }; - bool err; - std::unique_ptr<BoxReader> reader( - BoxReader::ReadTopLevelBox(kData, sizeof(kData), media_log_, &err)); + // Verify we catch the overflow to avoid OOB reads/writes. + TestParsing32bitOverflow<SampleAuxiliaryInformationOffset>( + kData, sizeof(kData), "Extreme SAIO count exceeds implementation limit."); +} - EXPECT_FALSE(err); - EXPECT_TRUE(reader); - EXPECT_EQ(FOURCC_EMSG, reader->type()); +TEST_F(BoxReaderTest, ElstCount32bitOverflow) { + // This 'elst' box specifies an unusually high number of edit counts, though + // only one edit is included in the bytes below. The values for "count" and + // "version" are chosen such that the needed number of bytes will overflow 32 + // bits to yield a very small number (12), potentially passing the internal + // check for HasBytes(). http://crbug.com/679645 + static const uint8_t kData[] = { + 0x00, 0x00, 0x00, 0x1c, 'e', 'l', 's', 't', // header + 0x00, 0x00, // version = 0 (12 bytes per edit entry) + 0x00, 0x00, // flags = 0 + 0x80, 0x00, 0x00, 0x01, // edits count = 2147483649 + 0x00, 0x00, 0x00, 0x00, // single edit entry + 0x00, 0x00, 0x00, 0x00, // ... + 0x00, 0x00, 0x00, 0x00, + }; -// Overflow is only triggered/caught on 32-bit systems. 64-bit systems will -// instead fail parsing because kData does not have enough bytes to describe -// the large number of samples. -#if defined(ARCH_CPU_32_BITS) - const int kOverflowLogCount = 1; -#else - const int kOverflowLogCount = 0; -#endif + // Verify we catch the overflow to avoid OOB reads/writes. + TestParsing32bitOverflow<EditList>( + kData, sizeof(kData), "Extreme ELST count exceeds implementation limit."); +} - EXPECT_MEDIA_LOG( - HasSubstr("Extreme SAIO count exceeds implementation limit.")) - .Times(kOverflowLogCount); +TEST_F(BoxReaderTest, SbgpCount32bitOverflow) { + // This 'sbgp' box specifies an unusually high count of entries, though only + // one partial entry is included in the bytes below. The value for "count" is + // chosen such that we could overflow attempting to allocate the vector for + // parsed entries. http://crbug.com/679646 + static const uint8_t kData[] = { + 0x00, 0x00, 0x00, 0x1c, 's', 'b', 'g', 'p', // header + 0x00, 0x00, 0x00, 0x00, // version = 0, flags = 0 + 's', 'e', 'i', 'g', // required grouping "type" + 0xff, 0xff, 0xff, 0xff, // count = 4294967295 + 0x00, 0x00, 0x00, 0x00, // partial entry + 0x00, 0x00, 0x00, 0x00, + }; - std::vector<SampleAuxiliaryInformationOffset> children; - EXPECT_FALSE(reader->ReadAllChildrenAndCheckFourCC(&children)); + // Verify we catch the overflow to avoid OOB reads/writes. + TestParsing32bitOverflow<SampleToGroup>( + kData, sizeof(kData), "Extreme SBGP count exceeds implementation limit."); +} + +TEST_F(BoxReaderTest, SgpdCount32bitOverflow) { + // This 'sgpd' box specifies an unusually high count of entries, though only + // one partial entry is included in the bytes below. The value for "count" is + // chosen such that we could overflow attempting to allocate the vector for + // parsed entries. http://crbug.com/679647 + static const uint8_t kData[] = { + 0x00, 0x00, 0x00, 0x1c, 's', 'g', 'p', 'd', // header + 0x00, 0x00, 0x00, 0x00, // version = 0, flags = 0 + 's', 'e', 'i', 'g', // required grouping "type" + 0xff, 0xff, 0xff, 0xff, // count = 4294967295 + 0x00, 0x00, 0x00, 0x00, // partial entry + 0x00, 0x00, 0x00, 0x00, + }; + + // Verify we catch the overflow to avoid OOB reads/writes. + TestParsing32bitOverflow<SampleGroupDescription>( + kData, sizeof(kData), "Extreme SGPD count exceeds implementation limit."); } } // namespace mp4
diff --git a/media/gpu/android_video_decode_accelerator.cc b/media/gpu/android_video_decode_accelerator.cc index c26289c..3d0e4cf 100644 --- a/media/gpu/android_video_decode_accelerator.cc +++ b/media/gpu/android_video_decode_accelerator.cc
@@ -17,7 +17,7 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/message_loop/message_loop.h" -#include "base/metrics/histogram.h" +#include "base/metrics/histogram_macros.h" #include "base/sys_info.h" #include "base/task_runner_util.h" #include "base/threading/thread.h"
diff --git a/media/gpu/android_video_encode_accelerator.cc b/media/gpu/android_video_encode_accelerator.cc index cfad7fa..cef2f83e 100644 --- a/media/gpu/android_video_encode_accelerator.cc +++ b/media/gpu/android_video_encode_accelerator.cc
@@ -11,7 +11,7 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" -#include "base/metrics/histogram.h" +#include "base/metrics/histogram_macros.h" #include "base/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
diff --git a/net/cert/cert_verify_proc_android.cc b/net/cert/cert_verify_proc_android.cc index f90f5721..280421d3 100644 --- a/net/cert/cert_verify_proc_android.cc +++ b/net/cert/cert_verify_proc_android.cc
@@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "base/lazy_instance.h" #include "base/logging.h" #include "base/sha1.h" #include "base/strings/string_piece.h" @@ -15,6 +16,7 @@ #include "net/android/network_library.h" #include "net/base/net_errors.h" #include "net/cert/asn1_util.h" +#include "net/cert/cert_net_fetcher.h" #include "net/cert/cert_status_flags.h" #include "net/cert/cert_verify_result.h" #include "net/cert/x509_certificate.h" @@ -24,6 +26,9 @@ namespace { +base::LazyInstance<scoped_refptr<CertNetFetcher>>::Leaky g_cert_net_fetcher = + LAZY_INSTANCE_INITIALIZER; + // Returns true if the certificate verification call was successful (regardless // of its result), i.e. if |verify_result| was set. Otherwise returns false. bool VerifyFromAndroidTrustManager(const std::vector<std::string>& cert_bytes, @@ -126,6 +131,18 @@ CertVerifyProcAndroid::~CertVerifyProcAndroid() {} +// static +void CertVerifyProcAndroid::SetCertNetFetcher( + scoped_refptr<CertNetFetcher> cert_net_fetcher) { + DCHECK(!g_cert_net_fetcher.Get()); + g_cert_net_fetcher.Get() = std::move(cert_net_fetcher); +} + +// static +void CertVerifyProcAndroid::ShutdownCertNetFetcher() { + g_cert_net_fetcher.Get()->Shutdown(); +} + bool CertVerifyProcAndroid::SupportsAdditionalTrustAnchors() const { return false; }
diff --git a/net/cert/cert_verify_proc_android.h b/net/cert/cert_verify_proc_android.h index 755ce80..755da26 100644 --- a/net/cert/cert_verify_proc_android.h +++ b/net/cert/cert_verify_proc_android.h
@@ -5,16 +5,33 @@ #ifndef NET_CERT_CERT_VERIFY_PROC_ANDROID_H_ #define NET_CERT_CERT_VERIFY_PROC_ANDROID_H_ +#include "base/macros.h" +#include "base/memory/ref_counted.h" +#include "net/base/net_export.h" #include "net/cert/cert_verify_proc.h" namespace net { +class CertNetFetcher; + // Performs certificate verification on Android by calling the platform // TrustManager through JNI. -class CertVerifyProcAndroid : public CertVerifyProc { +class NET_EXPORT CertVerifyProcAndroid : public CertVerifyProc { public: CertVerifyProcAndroid(); + // Sets a global CertNetFetcher to be used for AIA fetches that are required + // by VerifyInternal(). If not called, VerifyInternal() will not do its own + // AIA fetching and will instead rely solely on the platform TrustManager. Can + // only be called once. + static void SetCertNetFetcher(scoped_refptr<CertNetFetcher> cert_net_fetcher); + + // Shuts down the global CertNetFetcher used for AIA fetches required by + // VerifyInternal(). In-progress fetches will be cancelled and subsequent + // fetches cancelled immediately. Assumes that SetCertNetFetcher() has been + // called previously. + static void ShutdownCertNetFetcher(); + bool SupportsAdditionalTrustAnchors() const override; bool SupportsOCSPStapling() const override; @@ -29,6 +46,8 @@ CRLSet* crl_set, const CertificateList& additional_trust_anchors, CertVerifyResult* verify_result) override; + + DISALLOW_COPY_AND_ASSIGN(CertVerifyProcAndroid); }; } // namespace net
diff --git a/net/nqe/network_quality_estimator.cc b/net/nqe/network_quality_estimator.cc index 7824769..daceb85 100644 --- a/net/nqe/network_quality_estimator.cc +++ b/net/nqe/network_quality_estimator.cc
@@ -243,6 +243,8 @@ add_default_platform_observations_(add_default_platform_observations), weight_multiplier_per_second_( nqe::internal::GetWeightMultiplierPerSecond(variation_params)), + weight_multiplier_per_dbm_( + nqe::internal::GetWeightMultiplierPerDbm(variation_params)), effective_connection_type_algorithm_( algorithm_name_to_enum_.find( nqe::internal::GetEffectiveConnectionTypeAlgorithm( @@ -257,8 +259,10 @@ current_network_id_(nqe::internal::NetworkID( NetworkChangeNotifier::ConnectionType::CONNECTION_UNKNOWN, std::string())), - downstream_throughput_kbps_observations_(weight_multiplier_per_second_), - rtt_observations_(weight_multiplier_per_second_), + downstream_throughput_kbps_observations_(weight_multiplier_per_second_, + weight_multiplier_per_dbm_), + rtt_observations_(weight_multiplier_per_second_, + weight_multiplier_per_dbm_), effective_connection_type_at_last_main_frame_( EFFECTIVE_CONNECTION_TYPE_UNKNOWN), external_estimate_provider_(std::move(external_estimates_provider)), @@ -1293,7 +1297,8 @@ // RTT observations are sorted by duration from shortest to longest, thus // a higher percentile RTT will have a longer RTT than a lower percentile. base::TimeDelta rtt = nqe::internal::InvalidRTT(); - if (!rtt_observations_.GetPercentile(start_time, &rtt, percentile, + if (!rtt_observations_.GetPercentile(start_time, signal_strength_dbm_, &rtt, + percentile, disallowed_observation_sources)) { return nqe::internal::InvalidRTT(); } @@ -1309,7 +1314,7 @@ // thus a higher percentile throughput will be faster than a lower one. int32_t kbps = nqe::internal::kInvalidThroughput; if (!downstream_throughput_kbps_observations_.GetPercentile( - start_time, &kbps, 100 - percentile, + start_time, signal_strength_dbm_, &kbps, 100 - percentile, std::vector<NetworkQualityObservationSource>())) { return nqe::internal::kInvalidThroughput; }
diff --git a/net/nqe/network_quality_estimator.h b/net/nqe/network_quality_estimator.h index 40d9e35f..e4a9d9747 100644 --- a/net/nqe/network_quality_estimator.h +++ b/net/nqe/network_quality_estimator.h
@@ -614,6 +614,11 @@ // The factor by which the weight of an observation reduces every second. const double weight_multiplier_per_second_; + // The factor by which the weight of an observation reduces for every dBm + // difference between the current signal strength (in dBm), and the signal + // strength at the time when the observation was taken. + const double weight_multiplier_per_dbm_; + // Algorithm to use for computing effective connection type. The value is // obtained from field trial parameters. If the value from field trial // parameters is unavailable, it is set to @@ -727,7 +732,7 @@ // change events. int32_t signal_strength_dbm_; - // Minimum and maximum signal strength (in dbM) observed since last connection + // Minimum and maximum signal strength (in dBm) observed since last connection // change. Updated on connection change and main frame requests. int32_t min_signal_strength_since_connection_change_; int32_t max_signal_strength_since_connection_change_;
diff --git a/net/nqe/network_quality_estimator_params.cc b/net/nqe/network_quality_estimator_params.cc index 8e5845e..28b873de 100644 --- a/net/nqe/network_quality_estimator_params.cc +++ b/net/nqe/network_quality_estimator_params.cc
@@ -97,6 +97,14 @@ return pow(0.5, 1.0 / half_life_seconds); } +double GetWeightMultiplierPerDbm( + const std::map<std::string, std::string>& variation_params) { + // The default weight is set to 1.0, so by default, RSSI has no effect on the + // observation's weight. + return GetDoubleValueForVariationParamWithDefaultValue( + variation_params, "rssi_weight_per_dbm", 1.0); +} + const char* GetNameForConnectionType( net::NetworkChangeNotifier::ConnectionType connection_type) { switch (connection_type) {
diff --git a/net/nqe/network_quality_estimator_params.h b/net/nqe/network_quality_estimator_params.h index fc97e72..9f655168 100644 --- a/net/nqe/network_quality_estimator_params.h +++ b/net/nqe/network_quality_estimator_params.h
@@ -31,6 +31,12 @@ double GetWeightMultiplierPerSecond( const std::map<std::string, std::string>& variation_params); +// Returns the factor by which the weight of an observation reduces for every +// dBm difference between the current signal strength (in dBm), and the signal +// strength at the time when the observation was taken. +double GetWeightMultiplierPerDbm( + const std::map<std::string, std::string>& variation_params); + // Returns a descriptive name corresponding to |connection_type|. const char* GetNameForConnectionType( net::NetworkChangeNotifier::ConnectionType connection_type);
diff --git a/net/nqe/observation_buffer.h b/net/nqe/observation_buffer.h index 8c7cde3..10f6009 100644 --- a/net/nqe/observation_buffer.h +++ b/net/nqe/observation_buffer.h
@@ -32,13 +32,17 @@ template <typename ValueType> class NET_EXPORT_PRIVATE ObservationBuffer { public: - explicit ObservationBuffer(double weight_multiplier_per_second) + ObservationBuffer(double weight_multiplier_per_second, + double weight_multiplier_per_dbm) : weight_multiplier_per_second_(weight_multiplier_per_second), + weight_multiplier_per_dbm_(weight_multiplier_per_dbm), tick_clock_(new base::DefaultTickClock()) { static_assert(kMaximumObservationsBufferSize > 0U, "Minimum size of observation buffer must be > 0"); - DCHECK_GE(weight_multiplier_per_second_, 0.0); - DCHECK_LE(weight_multiplier_per_second_, 1.0); + DCHECK_LE(0.0, weight_multiplier_per_second_); + DCHECK_GE(1.0, weight_multiplier_per_second_); + DCHECK_LE(0.0, weight_multiplier_per_dbm_); + DCHECK_GE(1.0, weight_multiplier_per_dbm_); } ~ObservationBuffer() {} @@ -73,10 +77,12 @@ // value of all observations made on or after |begin_timestamp|. If the // value is unavailable, false is returned and |result| is not modified. // Percentile value is unavailable if all the values in observation buffer are - // older than |begin_timestamp|. + // older than |begin_timestamp|. |current_signal_strength_dbm| is the current + // signal strength in dBm. // |result| must not be null. // TODO(tbansal): Move out param |result| as the last param of the function. bool GetPercentile(base::TimeTicks begin_timestamp, + int32_t current_signal_strength_dbm, ValueType* result, int percentile, const std::vector<NetworkQualityObservationSource>& @@ -87,8 +93,9 @@ // Total weight of all observations in |weighted_observations|. double total_weight = 0.0; - ComputeWeightedObservations(begin_timestamp, weighted_observations, - &total_weight, disallowed_observation_sources); + ComputeWeightedObservations(begin_timestamp, current_signal_strength_dbm, + weighted_observations, &total_weight, + disallowed_observation_sources); if (weighted_observations.empty()) return false; @@ -118,8 +125,10 @@ // of all observations made on or after |begin_timestamp|. If the value is // unavailable, false is returned and |result| is not modified. The unweighted // average value is unavailable if all the values in the observation buffer - // are older than |begin_timestamp|. |result| must not be null. + // are older than |begin_timestamp|. |current_signal_strength_dbm| is the + // current signal strength in dBm. |result| must not be null. bool GetWeightedAverage(base::TimeTicks begin_timestamp, + int32_t current_signal_strength_dbm, const std::vector<NetworkQualityObservationSource>& disallowed_observation_sources, ValueType* result) const { @@ -129,8 +138,9 @@ // Total weight of all observations in |weighted_observations|. double total_weight = 0.0; - ComputeWeightedObservations(begin_timestamp, weighted_observations, - &total_weight, disallowed_observation_sources); + ComputeWeightedObservations(begin_timestamp, current_signal_strength_dbm, + weighted_observations, &total_weight, + disallowed_observation_sources); if (weighted_observations.empty()) return false; @@ -152,8 +162,10 @@ // all observations made on or after |begin_timestamp|. If the value is // unavailable, false is returned and |result| is not modified. The weighted // average value is unavailable if all the values in the observation buffer - // are older than |begin_timestamp|. |result| must not be null. + // are older than |begin_timestamp|. |current_signal_strength_dbm| is the + // current signal strength in dBm. |result| must not be null. bool GetUnweightedAverage(base::TimeTicks begin_timestamp, + int32_t current_signal_strength_dbm, const std::vector<NetworkQualityObservationSource>& disallowed_observation_sources, ValueType* result) const { @@ -163,8 +175,9 @@ // Total weight of all observations in |weighted_observations|. double total_weight = 0.0; - ComputeWeightedObservations(begin_timestamp, weighted_observations, - &total_weight, disallowed_observation_sources); + ComputeWeightedObservations(begin_timestamp, current_signal_strength_dbm, + weighted_observations, &total_weight, + disallowed_observation_sources); if (weighted_observations.empty()) return false; @@ -205,11 +218,14 @@ // Computes the weighted observations and stores them in // |weighted_observations| sorted by ascending |WeightedObservation.value|. // Only the observations with timestamp later than |begin_timestamp| are - // considered. Also, sets |total_weight| to the total weight of all - // observations. Should be called only when there is at least one - // observation in the buffer. + // considered. |current_signal_strength_dbm| is the current signal strength + // (in dBm) when the observation was taken, and is set to INT32_MIN if the + // signal strength is currently unavailable. This method also sets + // |total_weight| to the total weight of all observations. Should be called + // only when there is at least one observation in the buffer. void ComputeWeightedObservations( const base::TimeTicks& begin_timestamp, + int32_t current_signal_strength_dbm, std::vector<WeightedObservation<ValueType>>& weighted_observations, double* total_weight, const std::vector<NetworkQualityObservationSource>& @@ -231,8 +247,22 @@ if (disallowed) continue; base::TimeDelta time_since_sample_taken = now - observation.timestamp; - double weight = pow(weight_multiplier_per_second_, - time_since_sample_taken.InSeconds()); + double time_weight = pow(weight_multiplier_per_second_, + time_since_sample_taken.InSeconds()); + + double signal_strength_weight = 1.0; + if (current_signal_strength_dbm != INT32_MIN && + observation.signal_strength_dbm != INT32_MIN && + current_signal_strength_dbm != INT32_MAX && + observation.signal_strength_dbm != INT32_MAX) { + int32_t signal_strength_weight_diff = std::abs( + current_signal_strength_dbm - observation.signal_strength_dbm); + signal_strength_weight = + pow(weight_multiplier_per_dbm_, signal_strength_weight_diff); + } + + double weight = time_weight * signal_strength_weight; + weight = std::max(DBL_MIN, std::min(1.0, weight)); weighted_observations.push_back( @@ -264,6 +294,14 @@ // weight_multiplier_per_second_ ^ kHalfLifeSeconds = 0.5 const double weight_multiplier_per_second_; + // The factor by which the weight of an observation reduces for every dbM + // difference in the current signal strength, and the signal strength at + // which the observation was taken. + // For example, if the observation was taken at 90 dBm, and current signal + // strength is 95 dBm, the weight of the observation would be: + // |weight_multiplier_per_dbm_| ^ 5. + const double weight_multiplier_per_dbm_; + std::unique_ptr<base::TickClock> tick_clock_; DISALLOW_COPY_AND_ASSIGN(ObservationBuffer);
diff --git a/net/nqe/observation_buffer_unittest.cc b/net/nqe/observation_buffer_unittest.cc index a15fd8a..a29e98256 100644 --- a/net/nqe/observation_buffer_unittest.cc +++ b/net/nqe/observation_buffer_unittest.cc
@@ -29,7 +29,7 @@ // Verify that the buffer size is never exceeded. TEST(NetworkQualityObservationBufferTest, BoundedBuffer) { - ObservationBuffer<int32_t> observation_buffer(1.0); + ObservationBuffer<int32_t> observation_buffer(1.0, 1.0); const base::TimeTicks now = base::TimeTicks() + base::TimeDelta::FromSeconds(1); for (int i = 1; i <= 1000; ++i) { @@ -51,7 +51,7 @@ new base::SimpleTestTickClock()); base::SimpleTestTickClock* tick_clock_ptr = tick_clock.get(); - ObservationBuffer<int32_t> observation_buffer(0.98); + ObservationBuffer<int32_t> observation_buffer(0.98, 1.0); observation_buffer.SetTickClockForTesting(std::move(tick_clock)); const base::TimeTicks now = tick_clock_ptr->NowTicks(); for (int i = 1; i <= 100; ++i) { @@ -69,14 +69,15 @@ // Verify that i'th percentile is more than i-1'th percentile. int32_t result_i; EXPECT_TRUE(observation_buffer.GetPercentile( - now, &result_i, i, std::vector<NetworkQualityObservationSource>())); + now, INT32_MIN, &result_i, i, + std::vector<NetworkQualityObservationSource>())); result_lowest = std::min(result_lowest, result_i); result_highest = std::max(result_highest, result_i); int32_t result_i_1; EXPECT_TRUE(observation_buffer.GetPercentile( - now, &result_i_1, i - 1, + now, INT32_MIN, &result_i_1, i - 1, std::vector<NetworkQualityObservationSource>())); EXPECT_LE(result_i_1, result_i); @@ -88,8 +89,8 @@ // Verifies that the percentiles are correctly computed. All observations have // the same timestamp. TEST(NetworkQualityObservationBufferTest, PercentileSameTimestamps) { - ObservationBuffer<int32_t> int_buffer(0.5); - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); ASSERT_EQ(0u, int_buffer.Size()); ASSERT_LT(0u, int_buffer.Capacity()); ASSERT_EQ(0u, time_delta_buffer.Size()); @@ -102,10 +103,10 @@ // Percentiles should be unavailable when no observations are available. EXPECT_FALSE( - int_buffer.GetPercentile(base::TimeTicks(), &result, 50, + int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); // Insert samples from {1,2,3,..., 100}. First insert odd samples, then even @@ -117,11 +118,11 @@ base::TimeDelta::FromMilliseconds(i), now, INT32_MIN, NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); EXPECT_TRUE(int_buffer.GetPercentile( - base::TimeTicks(), &result, 50, + base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); ASSERT_EQ(static_cast<size_t>(i / 2 + 1), int_buffer.Size()); EXPECT_TRUE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); ASSERT_EQ(static_cast<size_t>(i / 2 + 1), time_delta_buffer.Size()); } @@ -133,11 +134,11 @@ base::TimeDelta::FromMilliseconds(i), now, INT32_MIN, NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); EXPECT_TRUE(int_buffer.GetPercentile( - base::TimeTicks(), &result, 50, + base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); ASSERT_EQ(static_cast<size_t>(i / 2 + 50), int_buffer.Size()); EXPECT_TRUE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); ASSERT_EQ(static_cast<size_t>(i / 2 + 50), time_delta_buffer.Size()); } @@ -151,30 +152,30 @@ // what is expected due to floating point computation errors and integer // rounding off errors. EXPECT_TRUE(int_buffer.GetPercentile( - base::TimeTicks(), &result, i, + base::TimeTicks(), INT32_MIN, &result, i, std::vector<NetworkQualityObservationSource>())); EXPECT_TRUE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, i, + base::TimeTicks(), INT32_MIN, &time_delta_result, i, std::vector<NetworkQualityObservationSource>())); EXPECT_NEAR(result, i, 1); EXPECT_NEAR(time_delta_result.InMilliseconds(), i, 1); } EXPECT_FALSE(int_buffer.GetPercentile( - now + base::TimeDelta::FromSeconds(1), &result, 50, + now + base::TimeDelta::FromSeconds(1), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - now + base::TimeDelta::FromSeconds(1), &time_delta_result, 50, + now + base::TimeDelta::FromSeconds(1), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); // Percentiles should be unavailable when no observations are available. int_buffer.Clear(); time_delta_buffer.Clear(); EXPECT_FALSE( - int_buffer.GetPercentile(base::TimeTicks(), &result, 50, + int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); } @@ -183,8 +184,8 @@ // of them being very recent. Percentiles should factor in recent observations // much more heavily than older samples. TEST(NetworkQualityObservationBufferTest, PercentileDifferentTimestamps) { - ObservationBuffer<int32_t> int_buffer(0.5); - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); const base::TimeTicks now = base::TimeTicks::Now(); const base::TimeTicks very_old = now - base::TimeDelta::FromDays(7); @@ -193,10 +194,10 @@ // Network quality should be unavailable when no observations are available. EXPECT_FALSE( - int_buffer.GetPercentile(base::TimeTicks(), &result, 50, + int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); // First 50 samples have very old timestamps. @@ -225,23 +226,93 @@ // what is expected due to floating point computation errors and integer // rounding off errors. EXPECT_TRUE(int_buffer.GetPercentile( - very_old, &result, i, std::vector<NetworkQualityObservationSource>())); + very_old, INT32_MIN, &result, i, + std::vector<NetworkQualityObservationSource>())); EXPECT_NEAR(result, 51 + 0.49 * i, 1); EXPECT_TRUE(time_delta_buffer.GetPercentile( - very_old, &time_delta_result, i, + very_old, INT32_MIN, &time_delta_result, i, std::vector<NetworkQualityObservationSource>())); EXPECT_NEAR(time_delta_result.InMilliseconds(), 51 + 0.49 * i, 1); } EXPECT_FALSE(int_buffer.GetPercentile( - now + base::TimeDelta::FromSeconds(1), &result, 50, + now + base::TimeDelta::FromSeconds(1), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - now + base::TimeDelta::FromSeconds(1), &time_delta_result, 50, + now + base::TimeDelta::FromSeconds(1), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); } +// Verifies that the percentiles are correctly computed. All observations have +// same timestamp with half the observations taken at low RSSI, and half the +// observations with high RSSI. Percentiles should be computed based on the +// current RSSI and the RSSI of the observations. +TEST(NetworkQualityObservationBufferTest, PercentileDifferentRSSI) { + ObservationBuffer<int32_t> int_buffer(1.0, 0.5); + ObservationBuffer<base::TimeDelta> time_delta_buffer(1.0, 0.5); + const base::TimeTicks now = base::TimeTicks::Now(); + int32_t high_rssi = 0; + int32_t low_rssi = -100; + + int32_t result; + base::TimeDelta time_delta_result; + + // Network quality should be unavailable when no observations are available. + EXPECT_FALSE( + int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, 50, + std::vector<NetworkQualityObservationSource>())); + EXPECT_FALSE(time_delta_buffer.GetPercentile( + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, + std::vector<NetworkQualityObservationSource>())); + + // First 50 samples have very low RSSI. + for (int i = 1; i <= 50; ++i) { + int_buffer.AddObservation(Observation<int32_t>( + i, now, low_rssi, NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); + time_delta_buffer.AddObservation(Observation<base::TimeDelta>( + base::TimeDelta::FromMilliseconds(i), now, low_rssi, + NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); + } + + // Next 50 (i.e., from 51 to 100) have high RSSI. + for (int i = 51; i <= 100; ++i) { + int_buffer.AddObservation(Observation<int32_t>( + i, now, high_rssi, NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); + time_delta_buffer.AddObservation(Observation<base::TimeDelta>( + base::TimeDelta::FromMilliseconds(i), now, high_rssi, + NETWORK_QUALITY_OBSERVATION_SOURCE_HTTP)); + } + + // When the current RSSI is |high_rssi|, higher weight should be assigned + // to observations that were taken at |high_rssi|. + for (int i = 1; i < 100; ++i) { + EXPECT_TRUE(int_buffer.GetPercentile( + now, high_rssi, &result, i, + std::vector<NetworkQualityObservationSource>())); + EXPECT_NEAR(result, 51 + 0.49 * i, 1); + + EXPECT_TRUE(time_delta_buffer.GetPercentile( + now, high_rssi, &time_delta_result, i, + std::vector<NetworkQualityObservationSource>())); + EXPECT_NEAR(time_delta_result.InMilliseconds(), 51 + 0.49 * i, 1); + } + + // When the current RSSI is |low_rssi|, higher weight should be assigned + // to observations that were taken at |low_rssi|. + for (int i = 1; i < 100; ++i) { + EXPECT_TRUE(int_buffer.GetPercentile( + now, low_rssi, &result, i, + std::vector<NetworkQualityObservationSource>())); + EXPECT_NEAR(result, i / 2, 1); + + EXPECT_TRUE(time_delta_buffer.GetPercentile( + now, low_rssi, &time_delta_result, i, + std::vector<NetworkQualityObservationSource>())); + EXPECT_NEAR(time_delta_result.InMilliseconds(), i / 2, 1); + } +} + #if !defined(OS_WIN) // Disabled on OS_WIN since the GetUnweightedAverage() and // GetUnweightedAverage() functions are not yet called outside tests, and so the @@ -250,8 +321,8 @@ // functions are called outside the tests. TEST(NetworkQualityObservationBufferTest, UnweightedAverageDifferentTimestamps) { - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); - ObservationBuffer<int32_t> int_buffer(0.5); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); const base::TimeTicks now = base::TimeTicks::Now(); const base::TimeTicks very_old = now - base::TimeDelta::FromDays(7); @@ -260,11 +331,11 @@ // Network quality should be unavailable when no observations are available. EXPECT_FALSE(time_delta_buffer.GetUnweightedAverage( - base::TimeTicks(), std::vector<NetworkQualityObservationSource>(), - &time_delta_result)); + base::TimeTicks(), INT32_MIN, + std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_FALSE(int_buffer.GetUnweightedAverage( - base::TimeTicks(), std::vector<NetworkQualityObservationSource>(), - &int_result)); + base::TimeTicks(), INT32_MIN, + std::vector<NetworkQualityObservationSource>(), &int_result)); // The first 50 samples have very old timestamps. for (int i = 1; i <= 50; ++i) { @@ -287,25 +358,26 @@ // All samples have equal weight. So, the unweighted average is the average of // all samples. EXPECT_TRUE(time_delta_buffer.GetUnweightedAverage( - very_old, std::vector<NetworkQualityObservationSource>(), + very_old, INT32_MIN, std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_NEAR(time_delta_result.InMilliseconds(), (1 + 100) / 2, 1); EXPECT_TRUE(int_buffer.GetUnweightedAverage( - very_old, std::vector<NetworkQualityObservationSource>(), &int_result)); + very_old, INT32_MIN, std::vector<NetworkQualityObservationSource>(), + &int_result)); EXPECT_NEAR(int_result, (1 + 100) / 2, 1); EXPECT_FALSE(time_delta_buffer.GetUnweightedAverage( - now + base::TimeDelta::FromSeconds(1), + now + base::TimeDelta::FromSeconds(1), INT32_MIN, std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_FALSE(int_buffer.GetUnweightedAverage( - now + base::TimeDelta::FromSeconds(1), + now + base::TimeDelta::FromSeconds(1), INT32_MIN, std::vector<NetworkQualityObservationSource>(), &int_result)); } TEST(NetworkQualityObservationBufferTest, WeightedAverageDifferentTimestamps) { - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); - ObservationBuffer<int32_t> int_buffer(0.5); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); const base::TimeTicks now = base::TimeTicks::Now(); const base::TimeTicks very_old = now - base::TimeDelta::FromDays(7); @@ -314,11 +386,11 @@ // Network quality should be unavailable when no observations are available. EXPECT_FALSE(time_delta_buffer.GetWeightedAverage( - base::TimeTicks(), std::vector<NetworkQualityObservationSource>(), - &time_delta_result)); + base::TimeTicks(), INT32_MIN, + std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_FALSE(int_buffer.GetWeightedAverage( - base::TimeTicks(), std::vector<NetworkQualityObservationSource>(), - &int_result)); + base::TimeTicks(), INT32_MIN, + std::vector<NetworkQualityObservationSource>(), &int_result)); // The first 50 samples have very old timestamps. for (int i = 1; i <= 50; ++i) { @@ -341,19 +413,20 @@ // The older samples have very little weight, and so the weighted average must // be approximately equal to the average of all recent samples. EXPECT_TRUE(time_delta_buffer.GetWeightedAverage( - very_old, std::vector<NetworkQualityObservationSource>(), + very_old, INT32_MIN, std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_NEAR(time_delta_result.InMilliseconds(), (51 + 100) / 2, 1); EXPECT_TRUE(int_buffer.GetWeightedAverage( - very_old, std::vector<NetworkQualityObservationSource>(), &int_result)); + very_old, INT32_MIN, std::vector<NetworkQualityObservationSource>(), + &int_result)); EXPECT_NEAR(int_result, (51 + 100) / 2, 1); EXPECT_FALSE(time_delta_buffer.GetWeightedAverage( - now + base::TimeDelta::FromSeconds(1), + now + base::TimeDelta::FromSeconds(1), INT32_MIN, std::vector<NetworkQualityObservationSource>(), &time_delta_result)); EXPECT_FALSE(int_buffer.GetWeightedAverage( - now + base::TimeDelta::FromSeconds(1), + now + base::TimeDelta::FromSeconds(1), INT32_MIN, std::vector<NetworkQualityObservationSource>(), &int_result)); } #endif // !defined(OS_WIN) @@ -361,8 +434,8 @@ // Verifies that the percentiles are correctly computed when some of the // observation sources are disallowed. All observations have the same timestamp. TEST(NetworkQualityObservationBufferTest, DisallowedObservationSources) { - ObservationBuffer<int32_t> int_buffer(0.5); - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); const base::TimeTicks now = base::TimeTicks::Now(); int32_t result; @@ -370,10 +443,10 @@ // Network quality should be unavailable when no observations are available. EXPECT_FALSE( - int_buffer.GetPercentile(base::TimeTicks(), &result, 50, + int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, 50, std::vector<NetworkQualityObservationSource>())); EXPECT_FALSE(time_delta_buffer.GetPercentile( - base::TimeTicks(), &time_delta_result, 50, + base::TimeTicks(), INT32_MIN, &time_delta_result, 50, std::vector<NetworkQualityObservationSource>())); // Insert samples from {1,2,3,..., 100}. First insert odd samples, then even @@ -420,12 +493,12 @@ // required because computed percentiles may be slightly different from // what is expected due to floating point computation errors and integer // rounding off errors. - EXPECT_TRUE(int_buffer.GetPercentile(base::TimeTicks(), &result, i, - disallowed_observation_sources)); + EXPECT_TRUE(int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, + i, disallowed_observation_sources)); EXPECT_NEAR(result, i, 1); - EXPECT_TRUE( - time_delta_buffer.GetPercentile(base::TimeTicks(), &time_delta_result, - i, disallowed_observation_sources)); + EXPECT_TRUE(time_delta_buffer.GetPercentile( + base::TimeTicks(), INT32_MIN, &time_delta_result, i, + disallowed_observation_sources)); EXPECT_NEAR(time_delta_result.InMilliseconds(), i, 1); } @@ -438,19 +511,19 @@ // required because computed percentiles may be slightly different from // what is expected due to floating point computation errors and integer // rounding off errors. - EXPECT_TRUE(int_buffer.GetPercentile(base::TimeTicks(), &result, i, - disallowed_observation_sources)); + EXPECT_TRUE(int_buffer.GetPercentile(base::TimeTicks(), INT32_MIN, &result, + i, disallowed_observation_sources)); EXPECT_NEAR(result, 10000, 1); - EXPECT_TRUE( - time_delta_buffer.GetPercentile(base::TimeTicks(), &time_delta_result, - i, disallowed_observation_sources)); + EXPECT_TRUE(time_delta_buffer.GetPercentile( + base::TimeTicks(), INT32_MIN, &time_delta_result, i, + disallowed_observation_sources)); EXPECT_NEAR(time_delta_result.InMilliseconds(), 10000, 1); } } TEST(NetworkQualityObservationBufferTest, TestGetMedianRTTSince) { - ObservationBuffer<int32_t> int_buffer(0.5); - ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5); + ObservationBuffer<int32_t> int_buffer(0.5, 1.0); + ObservationBuffer<base::TimeDelta> time_delta_buffer(0.5, 1.0); base::TimeTicks now = base::TimeTicks::Now(); base::TimeTicks old = now - base::TimeDelta::FromMilliseconds(1); ASSERT_NE(old, now); @@ -487,12 +560,12 @@ int32_t downstream_throughput_kbps; std::vector<NetworkQualityObservationSource> disallowed_observation_sources; - EXPECT_EQ( - test.expect_network_quality_available, - time_delta_buffer.GetPercentile(test.start_timestamp, &url_request_rtt, - 50, disallowed_observation_sources)); EXPECT_EQ(test.expect_network_quality_available, - int_buffer.GetPercentile(test.start_timestamp, + time_delta_buffer.GetPercentile(test.start_timestamp, INT32_MIN, + &url_request_rtt, 50, + disallowed_observation_sources)); + EXPECT_EQ(test.expect_network_quality_available, + int_buffer.GetPercentile(test.start_timestamp, INT32_MIN, &downstream_throughput_kbps, 50, disallowed_observation_sources));
diff --git a/net/socket/ssl_client_socket_impl.cc b/net/socket/ssl_client_socket_impl.cc index a50b190..4be80d7 100644 --- a/net/socket/ssl_client_socket_impl.cc +++ b/net/socket/ssl_client_socket_impl.cc
@@ -946,8 +946,8 @@ return ERR_UNEXPECTED; } - bssl::UniquePtr<SSL_SESSION> session = - context->session_cache()->Lookup(GetSessionCacheKey()); + bssl::UniquePtr<SSL_SESSION> session = context->session_cache()->Lookup( + GetSessionCacheKey(), &ssl_session_cache_lookup_count_); if (session) SSL_set_session(ssl_.get(), session.get()); @@ -1148,6 +1148,19 @@ if (result < 0) return result; + SSLContext::GetInstance()->session_cache()->ResetLookupCount( + GetSessionCacheKey()); + // If we got a session from the session cache, log how many concurrent + // handshakes that session was used in before we finished our handshake. This + // is only recorded if the session from the cache was actually used, and only + // if the ALPN protocol is h2 (under the assumption that TLS 1.3 servers will + // be speaking h2). See https://crbug.com/631988. + if (ssl_session_cache_lookup_count_ && negotiated_protocol_ == kProtoHTTP2 && + SSL_session_reused(ssl_.get())) { + UMA_HISTOGRAM_EXACT_LINEAR("Net.SSLSessionConcurrentLookupCount", + ssl_session_cache_lookup_count_, 20); + } + // DHE is offered on the deprecated cipher fallback and then rejected // afterwards. This is to aid in diagnosing connection failures because a // server requires DHE ciphers.
diff --git a/net/socket/ssl_client_socket_impl.h b/net/socket/ssl_client_socket_impl.h index 40033c38..86505ab2 100644 --- a/net/socket/ssl_client_socket_impl.h +++ b/net/socket/ssl_client_socket_impl.h
@@ -306,6 +306,7 @@ // session cache. i.e. sessions created with one value will not attempt to // resume on the socket with a different value. const std::string ssl_session_cache_shard_; + int ssl_session_cache_lookup_count_; enum State { STATE_NONE,
diff --git a/net/ssl/ssl_client_session_cache.cc b/net/ssl/ssl_client_session_cache.cc index ff945cc47..4cb6c9ae 100644 --- a/net/ssl/ssl_client_session_cache.cc +++ b/net/ssl/ssl_client_session_cache.cc
@@ -37,7 +37,8 @@ } bssl::UniquePtr<SSL_SESSION> SSLClientSessionCache::Lookup( - const std::string& cache_key) { + const std::string& cache_key, + int* count) { base::AutoLock lock(lock_); // Expire stale sessions. @@ -47,26 +48,49 @@ FlushExpiredSessions(); } + // Set count to 0 if there's no session in the cache. + if (count != nullptr) + *count = 0; + auto iter = cache_.Get(cache_key); if (iter == cache_.end()) return nullptr; - SSL_SESSION* session = iter->second.get(); + SSL_SESSION* session = iter->second.session.get(); if (IsExpired(session, clock_->Now().ToTimeT())) { cache_.Erase(iter); return nullptr; } + iter->second.lookups++; + if (count != nullptr) { + *count = iter->second.lookups; + } + SSL_SESSION_up_ref(session); return bssl::UniquePtr<SSL_SESSION>(session); } +void SSLClientSessionCache::ResetLookupCount(const std::string& cache_key) { + base::AutoLock lock(lock_); + + // It's possible that the cached session for this key was deleted after the + // Lookup. If that's the case, don't do anything. + auto iter = cache_.Get(cache_key); + if (iter == cache_.end()) + return; + + iter->second.lookups = 0; +} + void SSLClientSessionCache::Insert(const std::string& cache_key, SSL_SESSION* session) { base::AutoLock lock(lock_); SSL_SESSION_up_ref(session); - cache_.Put(cache_key, bssl::UniquePtr<SSL_SESSION>(session)); + Entry entry; + entry.session = bssl::UniquePtr<SSL_SESSION>(session); + cache_.Put(cache_key, std::move(entry)); } void SSLClientSessionCache::Flush() { @@ -101,7 +125,7 @@ size_t total_serialized_cert_size = 0; size_t total_cert_count = 0; for (const auto& pair : cache_) { - const SSL_SESSION* session = pair.second.get(); + const SSL_SESSION* session = pair.second.session.get(); size_t cert_count = sk_CRYPTO_BUFFER_num(session->certs); total_cert_count += cert_count; for (size_t i = 0; i < cert_count; ++i) { @@ -123,11 +147,15 @@ total_serialized_cert_size); } +SSLClientSessionCache::Entry::Entry() : lookups(0) {} +SSLClientSessionCache::Entry::Entry(Entry&&) = default; +SSLClientSessionCache::Entry::~Entry() = default; + void SSLClientSessionCache::FlushExpiredSessions() { time_t now = clock_->Now().ToTimeT(); auto iter = cache_.begin(); while (iter != cache_.end()) { - if (IsExpired(iter->second.get(), now)) { + if (IsExpired(iter->second.session.get(), now)) { iter = cache_.Erase(iter); } else { ++iter;
diff --git a/net/ssl/ssl_client_session_cache.h b/net/ssl/ssl_client_session_cache.h index 4a82010b..0cfefc31 100644 --- a/net/ssl/ssl_client_session_cache.h +++ b/net/ssl/ssl_client_session_cache.h
@@ -46,8 +46,14 @@ size_t size() const; // Returns the session associated with |cache_key| and moves it to the front - // of the MRU list. Returns nullptr if there is none. - bssl::UniquePtr<SSL_SESSION> Lookup(const std::string& cache_key); + // of the MRU list. Returns nullptr if there is none. If |count| is non-null, + // |*count| will contain the number of times this session has been looked up + // (including this call). + bssl::UniquePtr<SSL_SESSION> Lookup(const std::string& cache_key, int* count); + + // Resets the count returned by Lookup to 0 for the session associated with + // |cache_key|. + void ResetLookupCount(const std::string& cache_key); // Inserts |session| into the cache at |cache_key|. If there is an existing // one, it is released. Every |expiration_check_count| calls, the cache is @@ -64,6 +70,15 @@ void DumpMemoryStats(base::trace_event::ProcessMemoryDump* pmd); private: + struct Entry { + Entry(); + Entry(Entry&&); + ~Entry(); + + int lookups; + bssl::UniquePtr<SSL_SESSION> session; + }; + // base::MemoryCoordinatorClient implementation: void OnMemoryStateChange(base::MemoryState state) override; @@ -79,7 +94,7 @@ std::unique_ptr<base::Clock> clock_; Config config_; - base::HashingMRUCache<std::string, bssl::UniquePtr<SSL_SESSION>> cache_; + base::HashingMRUCache<std::string, Entry> cache_; size_t lookups_since_flush_; // TODO(davidben): After https://crbug.com/458365 is fixed, replace this with
diff --git a/net/ssl/ssl_client_session_cache_unittest.cc b/net/ssl/ssl_client_session_cache_unittest.cc index c9cf6f28c..a30a84ef 100644 --- a/net/ssl/ssl_client_session_cache_unittest.cc +++ b/net/ssl/ssl_client_session_cache_unittest.cc
@@ -50,26 +50,26 @@ EXPECT_EQ(1u, session2->references); EXPECT_EQ(1u, session3->references); - EXPECT_EQ(nullptr, cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); + EXPECT_EQ(nullptr, cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); EXPECT_EQ(0u, cache.size()); cache.Insert("key1", session1.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); EXPECT_EQ(1u, cache.size()); cache.Insert("key2", session2.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); EXPECT_EQ(2u, cache.size()); EXPECT_EQ(2u, session1->references); EXPECT_EQ(2u, session2->references); cache.Insert("key1", session3.get()); - EXPECT_EQ(session3.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); + EXPECT_EQ(session3.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); EXPECT_EQ(2u, cache.size()); EXPECT_EQ(1u, session1->references); @@ -77,9 +77,9 @@ EXPECT_EQ(2u, session3->references); cache.Flush(); - EXPECT_EQ(nullptr, cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); - EXPECT_EQ(nullptr, cache.Lookup("key3").get()); + EXPECT_EQ(nullptr, cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key3", nullptr).get()); EXPECT_EQ(0u, cache.size()); EXPECT_EQ(1u, session1->references); @@ -87,6 +87,45 @@ EXPECT_EQ(1u, session3->references); } +// Test that pairs of calls to Lookup/ResetLookupCount appropriately log to +// UMA. +TEST(SSLClientSessionCacheTest, LookupCountUMA) { + SSLClientSessionCache::Config config; + SSLClientSessionCache cache(config); + + bssl::UniquePtr<SSL_SESSION> session1(SSL_SESSION_new()); + bssl::UniquePtr<SSL_SESSION> session2(SSL_SESSION_new()); + cache.Insert("key1", session1.get()); + cache.Insert("key2", session2.get()); + + // Test that the count returned increments when multiple lookups of the same + // key/session occur before the count is reset. + int count; + EXPECT_EQ(session1.get(), cache.Lookup("key1", &count).get()); + EXPECT_EQ(1, count); + EXPECT_EQ(session1.get(), cache.Lookup("key1", &count).get()); + EXPECT_EQ(2, count); + cache.ResetLookupCount("key1"); + EXPECT_EQ(session1.get(), cache.Lookup("key1", &count).get()); + cache.ResetLookupCount("key1"); + EXPECT_EQ(1, count); + + // Test that independent keys are logged separately. + EXPECT_EQ(session1.get(), cache.Lookup("key1", &count).get()); + EXPECT_EQ(1, count); + EXPECT_EQ(session2.get(), cache.Lookup("key2", &count).get()); + EXPECT_EQ(1, count); + + // Test that the count is 0 if there is a cache miss. + EXPECT_EQ(nullptr, cache.Lookup("not present", &count).get()); + EXPECT_EQ(0, count); + + // Check that ResetLookupCount doesn't explode if there's a cache miss. + cache.ResetLookupCount("not present"); + + EXPECT_EQ(2u, cache.size()); +} + // Test that a session may be inserted at two different keys. This should never // be necessary, but the API doesn't prohibit it. TEST(SSLClientSessionCacheTest, DoubleInsert) { @@ -96,27 +135,27 @@ bssl::UniquePtr<SSL_SESSION> session(SSL_SESSION_new()); EXPECT_EQ(1u, session->references); - EXPECT_EQ(nullptr, cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); + EXPECT_EQ(nullptr, cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); EXPECT_EQ(0u, cache.size()); cache.Insert("key1", session.get()); - EXPECT_EQ(session.get(), cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); + EXPECT_EQ(session.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); EXPECT_EQ(1u, cache.size()); EXPECT_EQ(2u, session->references); cache.Insert("key2", session.get()); - EXPECT_EQ(session.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session.get(), cache.Lookup("key2").get()); + EXPECT_EQ(session.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session.get(), cache.Lookup("key2", nullptr).get()); EXPECT_EQ(2u, cache.size()); EXPECT_EQ(3u, session->references); cache.Flush(); - EXPECT_EQ(nullptr, cache.Lookup("key1").get()); - EXPECT_EQ(nullptr, cache.Lookup("key2").get()); + EXPECT_EQ(nullptr, cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key2", nullptr).get()); EXPECT_EQ(0u, cache.size()); EXPECT_EQ(1u, session->references); @@ -137,26 +176,26 @@ cache.Insert("key1", session1.get()); cache.Insert("key2", session2.get()); cache.Insert("key3", session3.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); - EXPECT_EQ(session3.get(), cache.Lookup("key3").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); + EXPECT_EQ(session3.get(), cache.Lookup("key3", nullptr).get()); EXPECT_EQ(3u, cache.size()); // On insertion of a fourth, the first is removed. cache.Insert("key4", session4.get()); - EXPECT_EQ(nullptr, cache.Lookup("key1").get()); - EXPECT_EQ(session4.get(), cache.Lookup("key4").get()); - EXPECT_EQ(session3.get(), cache.Lookup("key3").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); + EXPECT_EQ(nullptr, cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session4.get(), cache.Lookup("key4", nullptr).get()); + EXPECT_EQ(session3.get(), cache.Lookup("key3", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); EXPECT_EQ(3u, cache.size()); // Despite being newest, the next to be removed is session4 as it was accessed // least. recently. cache.Insert("key1", session1.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); - EXPECT_EQ(session3.get(), cache.Lookup("key3").get()); - EXPECT_EQ(nullptr, cache.Lookup("key4").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); + EXPECT_EQ(session3.get(), cache.Lookup("key3", nullptr).get()); + EXPECT_EQ(nullptr, cache.Lookup("key4", nullptr).get()); EXPECT_EQ(3u, cache.size()); } @@ -192,18 +231,18 @@ // Perform one fewer lookup than needed to trigger the expiration check. This // shall not expire any session. for (size_t i = 0; i < kExpirationCheckCount - 1; i++) - cache.Lookup("key"); + cache.Lookup("key", nullptr); // All entries are still in the cache. EXPECT_EQ(kNumEntries, cache.size()); // Perform one more lookup. This will expire all sessions but the last one. - cache.Lookup("key"); + cache.Lookup("key", nullptr); EXPECT_EQ(1u, cache.size()); - EXPECT_EQ(session.get(), cache.Lookup("key").get()); + EXPECT_EQ(session.get(), cache.Lookup("key", nullptr).get()); for (size_t i = 0; i < kNumEntries - 1; i++) { SCOPED_TRACE(i); - EXPECT_EQ(nullptr, cache.Lookup(base::SizeTToString(i))); + EXPECT_EQ(nullptr, cache.Lookup(base::SizeTToString(i), nullptr)); } } @@ -225,7 +264,7 @@ bssl::UniquePtr<SSL_SESSION> session = MakeTestSession(clock->Now(), kTimeout); cache.Insert("key", session.get()); - EXPECT_EQ(session.get(), cache.Lookup("key").get()); + EXPECT_EQ(session.get(), cache.Lookup("key", nullptr).get()); EXPECT_EQ(1u, cache.size()); // Expire the session. @@ -235,24 +274,24 @@ EXPECT_EQ(1u, cache.size()); // But it will not be returned on lookup and gets pruned at that point. - EXPECT_EQ(nullptr, cache.Lookup("key").get()); + EXPECT_EQ(nullptr, cache.Lookup("key", nullptr).get()); EXPECT_EQ(0u, cache.size()); // Re-inserting a session does not refresh the lifetime. The expiration // information in the session is used. cache.Insert("key", session.get()); - EXPECT_EQ(nullptr, cache.Lookup("key").get()); + EXPECT_EQ(nullptr, cache.Lookup("key", nullptr).get()); EXPECT_EQ(0u, cache.size()); // Re-insert a fresh copy of the session. session = MakeTestSession(clock->Now(), kTimeout); cache.Insert("key", session.get()); - EXPECT_EQ(session.get(), cache.Lookup("key").get()); + EXPECT_EQ(session.get(), cache.Lookup("key", nullptr).get()); EXPECT_EQ(1u, cache.size()); // Sessions also are treated as expired if the clock rewinds. clock->Advance(base::TimeDelta::FromSeconds(-1)); - EXPECT_EQ(nullptr, cache.Lookup("key").get()); + EXPECT_EQ(nullptr, cache.Lookup("key", nullptr).get()); EXPECT_EQ(0u, cache.size()); } @@ -273,7 +312,7 @@ bssl::UniquePtr<SSL_SESSION> session1 = MakeTestSession(clock->Now(), kTimeout); cache.Insert("key1", session1.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); EXPECT_EQ(1u, cache.size()); // Expire the session. @@ -291,8 +330,8 @@ // Expired session's cache should be flushed. // Lookup returns nullptr, when cache entry not found. - EXPECT_FALSE(cache.Lookup("key1")); - EXPECT_TRUE(cache.Lookup("key2")); + EXPECT_FALSE(cache.Lookup("key1", nullptr)); + EXPECT_TRUE(cache.Lookup("key2", nullptr)); EXPECT_EQ(1u, cache.size()); // Fire notification that will flush everything. @@ -315,9 +354,9 @@ cache.Insert("key1", session1.get()); cache.Insert("key2", session2.get()); cache.Insert("key3", session3.get()); - EXPECT_EQ(session1.get(), cache.Lookup("key1").get()); - EXPECT_EQ(session2.get(), cache.Lookup("key2").get()); - EXPECT_EQ(session3.get(), cache.Lookup("key3").get()); + EXPECT_EQ(session1.get(), cache.Lookup("key1", nullptr).get()); + EXPECT_EQ(session2.get(), cache.Lookup("key2", nullptr).get()); + EXPECT_EQ(session3.get(), cache.Lookup("key3", nullptr).get()); EXPECT_EQ(3u, cache.size()); base::trace_event::MemoryDumpArgs dump_args = {
diff --git a/net/tools/cert_verify_tool/verify_using_path_builder.cc b/net/tools/cert_verify_tool/verify_using_path_builder.cc index 6c52e4a..b94a08e 100644 --- a/net/tools/cert_verify_tool/verify_using_path_builder.cc +++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
@@ -9,6 +9,7 @@ #include "base/memory/ptr_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" +#include "base/synchronization/waitable_event.h" #include "base/threading/thread.h" #include "crypto/sha2.h" #include "net/cert/cert_net_fetcher.h" @@ -170,56 +171,34 @@ return cert; } -class URLRequestContextGetterForAia : public net::URLRequestContextGetter { - public: - URLRequestContextGetterForAia( - scoped_refptr<base::SingleThreadTaskRunner> task_runner) - : task_runner_(std::move(task_runner)) {} - - net::URLRequestContext* GetURLRequestContext() override { - DCHECK(task_runner_->BelongsToCurrentThread()); - - if (!context_) { - // TODO(mattm): add command line flags to configure using - // CertIssuerSourceAia - // (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc). - net::URLRequestContextBuilder url_request_context_builder; - url_request_context_builder.set_user_agent(GetUserAgent()); +void SetUpOnNetworkThread(std::unique_ptr<net::URLRequestContext>* context, + scoped_refptr<net::CertNetFetcher>* fetcher, + base::WaitableEvent* initialization_complete_event) { + // TODO(mattm): add command line flags to configure using + // CertIssuerSourceAia + // (similar to VERIFY_CERT_IO_ENABLED flag for CertVerifyProc). + net::URLRequestContextBuilder url_request_context_builder; + url_request_context_builder.set_user_agent(GetUserAgent()); #if defined(OS_LINUX) - // On Linux, use a fixed ProxyConfigService, since the default one - // depends on glib. - // - // TODO(akalin): Remove this once http://crbug.com/146421 is fixed. - url_request_context_builder.set_proxy_config_service( - base::MakeUnique<net::ProxyConfigServiceFixed>(net::ProxyConfig())); + // On Linux, use a fixed ProxyConfigService, since the default one + // depends on glib. + // + // TODO(akalin): Remove this once http://crbug.com/146421 is fixed. + url_request_context_builder.set_proxy_config_service( + base::MakeUnique<net::ProxyConfigServiceFixed>(net::ProxyConfig())); #endif - context_ = url_request_context_builder.Build(); - } + *context = url_request_context_builder.Build(); - return context_.get(); - } + *fetcher = net::CreateCertNetFetcher(context->get()); + initialization_complete_event->Signal(); +} - void ShutDown() { - GetNetworkTaskRunner()->PostTask( - FROM_HERE, - base::Bind(&URLRequestContextGetterForAia::ShutdownOnNetworkThread, - this)); - } - - scoped_refptr<base::SingleThreadTaskRunner> GetNetworkTaskRunner() - const override { - return task_runner_; - } - - private: - ~URLRequestContextGetterForAia() override { DCHECK(!context_); } - - void ShutdownOnNetworkThread() { context_.release(); } - - scoped_refptr<base::SingleThreadTaskRunner> task_runner_; - - std::unique_ptr<net::URLRequestContext> context_; -}; +void ShutdownOnNetworkThread( + std::unique_ptr<net::URLRequestContext>* context, + const scoped_refptr<net::CertNetFetcher>& cert_net_fetcher) { + cert_net_fetcher->Shutdown(); + context->reset(); +} } // namespace @@ -279,30 +258,37 @@ path_builder.AddCertIssuerSource(&cert_issuer_source_nss); #endif - // Initialize an AIA fetcher, that uses a separate thread for running the - // networking message loop. -// TODO(estark): update this code to use the new CertNetFetcher -// interface that takes a URLRequestContext*. -#if 0 + // Create a network thread to be used for AIA fetches, and wait for a + // CertNetFetcher to be constructed on that thread. base::Thread::Options options(base::MessageLoop::TYPE_IO, 0); base::Thread thread("network_thread"); CHECK(thread.StartWithOptions(options)); - scoped_refptr<URLRequestContextGetterForAia> url_request_context_getter( - new URLRequestContextGetterForAia(thread.task_runner())); - auto cert_net_fetcher = - CreateCertNetFetcher(url_request_context_getter.get()); + // Owned by this thread, but initialized, used, and shutdown on the network + // thread. + std::unique_ptr<net::URLRequestContext> context; + scoped_refptr<net::CertNetFetcher> cert_net_fetcher; + base::WaitableEvent initialization_complete_event( + base::WaitableEvent::ResetPolicy::MANUAL, + base::WaitableEvent::InitialState::NOT_SIGNALED); + thread.task_runner()->PostTask( + FROM_HERE, base::Bind(&SetUpOnNetworkThread, &context, &cert_net_fetcher, + &initialization_complete_event)); + initialization_complete_event.Wait(); + + // Now that the CertNetFetcher has been created on the network thread, + // use it to create a CertIssuerSourceAia. net::CertIssuerSourceAia aia_cert_issuer_source(cert_net_fetcher.get()); path_builder.AddCertIssuerSource(&aia_cert_issuer_source); -#endif // Run the path builder. path_builder.Run(); -#if 0 - // Stop the temporary network thread.. - url_request_context_getter->ShutDown(); + // Clean up on the network thread and stop it (which waits for the clean up + // task to run). + thread.task_runner()->PostTask( + FROM_HERE, + base::Bind(&ShutdownOnNetworkThread, &context, cert_net_fetcher)); thread.Stop(); -#endif // TODO(crbug.com/634443): Display any errors/warnings associated with path // building that were not part of a particular
diff --git a/printing/backend/print_backend_consts.cc b/printing/backend/print_backend_consts.cc index 1717a464..34b6a7e 100644 --- a/printing/backend/print_backend_consts.cc +++ b/printing/backend/print_backend_consts.cc
@@ -8,6 +8,7 @@ const char kCUPSBlocking[] = "cups_blocking"; const char kCUPSEncryption[] = "cups_encryption"; +const char kCUPSEnterprisePrinter[] = "cupsEnterprisePrinter"; const char kCUPSPrintServerURL[] = "print_server_url"; const char kDriverInfoTagName[] = "system_driverinfo"; const char kDriverNameTagName[] = "printer-make-and-model"; // Match CUPS.
diff --git a/printing/backend/print_backend_consts.h b/printing/backend/print_backend_consts.h index 083ec2e..77fe43a 100644 --- a/printing/backend/print_backend_consts.h +++ b/printing/backend/print_backend_consts.h
@@ -9,6 +9,7 @@ PRINTING_EXPORT extern const char kCUPSBlocking[]; PRINTING_EXPORT extern const char kCUPSEncryption[]; +PRINTING_EXPORT extern const char kCUPSEnterprisePrinter[]; PRINTING_EXPORT extern const char kCUPSPrintServerURL[]; PRINTING_EXPORT extern const char kDriverInfoTagName[]; PRINTING_EXPORT extern const char kDriverNameTagName[];
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index 3572ec4..186ed84 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -2098,7 +2098,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2115,7 +2115,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2131,7 +2131,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2147,7 +2147,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2163,7 +2163,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2179,7 +2179,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2192,7 +2192,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2219,7 +2219,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2242,7 +2242,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2265,7 +2265,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2288,7 +2288,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2317,7 +2317,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2354,7 +2354,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2377,7 +2377,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2400,7 +2400,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2423,7 +2423,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2446,7 +2446,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2465,7 +2465,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2482,7 +2482,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2498,7 +2498,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2514,7 +2514,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2530,7 +2530,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2546,7 +2546,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2559,7 +2559,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2586,7 +2586,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2609,7 +2609,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2632,7 +2632,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2655,7 +2655,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2684,7 +2684,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2721,7 +2721,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2744,7 +2744,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2767,7 +2767,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2790,7 +2790,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2813,7 +2813,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2832,7 +2832,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2849,7 +2849,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2865,7 +2865,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2894,7 +2894,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2910,7 +2910,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2926,7 +2926,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2939,7 +2939,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -2966,7 +2966,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -2989,7 +2989,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3012,7 +3012,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3035,7 +3035,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3064,7 +3064,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3101,7 +3101,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3124,7 +3124,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3147,7 +3147,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3172,7 +3172,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -3196,7 +3196,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3219,7 +3219,7 @@ "dimension_sets": [ { "gpu": "1002:6779", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3238,7 +3238,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3255,7 +3255,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3271,7 +3271,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3300,7 +3300,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3316,7 +3316,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3332,7 +3332,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3345,7 +3345,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3372,7 +3372,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3395,7 +3395,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3418,7 +3418,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3441,7 +3441,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3470,7 +3470,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3507,7 +3507,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3530,7 +3530,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3553,7 +3553,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3578,7 +3578,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -3602,7 +3602,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3625,7 +3625,7 @@ "dimension_sets": [ { "gpu": "1002:6613", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3644,7 +3644,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3661,7 +3661,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3677,7 +3677,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3706,7 +3706,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3722,7 +3722,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3738,7 +3738,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3751,7 +3751,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -3778,7 +3778,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3801,7 +3801,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3824,7 +3824,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3847,7 +3847,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3876,7 +3876,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3913,7 +3913,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3936,7 +3936,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3959,7 +3959,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -3984,7 +3984,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -4008,7 +4008,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4031,7 +4031,7 @@ "dimension_sets": [ { "gpu": "8086:041a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4050,7 +4050,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4067,7 +4067,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4083,7 +4083,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4112,7 +4112,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4128,7 +4128,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4144,7 +4144,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4157,7 +4157,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4184,7 +4184,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4207,7 +4207,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4230,7 +4230,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4253,7 +4253,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4282,7 +4282,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4319,7 +4319,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4342,7 +4342,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4365,7 +4365,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4390,7 +4390,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -4416,7 +4416,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -4440,7 +4440,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4463,7 +4463,7 @@ "dimension_sets": [ { "gpu": "8086:1912", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4482,7 +4482,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4499,7 +4499,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4515,7 +4515,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4544,7 +4544,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4560,7 +4560,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4576,7 +4576,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4589,7 +4589,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4616,7 +4616,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4639,7 +4639,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4662,7 +4662,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4685,7 +4685,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4714,7 +4714,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4751,7 +4751,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4774,7 +4774,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4797,7 +4797,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4822,7 +4822,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -4846,7 +4846,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4869,7 +4869,7 @@ "dimension_sets": [ { "gpu": "10de:0f02", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -4889,7 +4889,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 4 @@ -4908,7 +4908,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 4 @@ -4927,7 +4927,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 12 @@ -4945,7 +4945,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4962,7 +4962,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4978,7 +4978,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -4994,7 +4994,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -5010,7 +5010,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -5026,7 +5026,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -5039,7 +5039,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -5055,7 +5055,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -5075,7 +5075,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5098,7 +5098,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5121,7 +5121,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5144,7 +5144,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5167,7 +5167,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5196,7 +5196,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5233,7 +5233,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5256,7 +5256,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5279,7 +5279,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5304,7 +5304,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -5330,7 +5330,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -5354,7 +5354,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -5377,7 +5377,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -9506,7 +9506,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 4 @@ -9524,7 +9524,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -9540,7 +9540,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -9553,7 +9553,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -9573,7 +9573,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -9598,7 +9598,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -9622,7 +9622,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index 9b29f1d..53257342 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -19,7 +19,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -35,7 +35,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -51,7 +51,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -78,7 +78,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -101,7 +101,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -124,7 +124,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -147,7 +147,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -176,7 +176,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -213,7 +213,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -236,7 +236,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -259,7 +259,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -282,7 +282,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -301,7 +301,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -317,7 +317,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -333,7 +333,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -349,7 +349,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }, @@ -376,7 +376,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -399,7 +399,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -422,7 +422,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -445,7 +445,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -474,7 +474,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -511,7 +511,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -534,7 +534,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -557,7 +557,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -580,7 +580,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }
diff --git a/testing/buildbot/client.v8.fyi.json b/testing/buildbot/client.v8.fyi.json index 29d35044..eb4d332 100644 --- a/testing/buildbot/client.v8.fyi.json +++ b/testing/buildbot/client.v8.fyi.json
@@ -22,7 +22,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -45,7 +45,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -68,7 +68,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -91,7 +91,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -120,7 +120,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -157,7 +157,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -180,7 +180,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -203,7 +203,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] } @@ -228,7 +228,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ], "shards": 15 @@ -252,7 +252,7 @@ "dimension_sets": [ { "gpu": "10de:104a", - "os": "Linux" + "os": "Ubuntu" } ] }
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index d359069..288c290 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -202,7 +202,6 @@ { "name": "Default", "params": { - "RedirectHistoryService": "true", "RedirectSequencedWorkerPools": "true" } },
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index 18fee93..5074a2a 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -2198,8 +2198,3 @@ crbug.com/681471 paint/invalidation/media-audio-no-spurious-repaints.html [ Failure Pass Timeout ] crbug.com/681471 virtual/stable/paint/invalidation/media-audio-no-spurious-repaints.html [ Failure Pass Timeout ] - -# Sheriff failures Jan 17 2017 -crbug.com/682105 shapedetection/detection-HTMLImageElement.html [ Pass Failure ] -crbug.com/682105 shapedetection/detection-HTMLVideoElement.html [ Pass Failure ] -crbug.com/682105 fast/shapedetection/shapedetection-security-test.html [ Pass Failure ]
diff --git a/third_party/WebKit/LayoutTests/css3/selectors3/html/css3-modsel-27a.html b/third_party/WebKit/LayoutTests/css3/selectors3/html/css3-modsel-27a.html deleted file mode 100644 index f56b21374..0000000 --- a/third_party/WebKit/LayoutTests/css3/selectors3/html/css3-modsel-27a.html +++ /dev/null
@@ -1,31 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> -<html> - <head> - <title>Impossible rules (:root:first-child, etc)</title> - <style type="text/css"> -:root:first-child { background-color: red; } -:root:last-child { background-color: red; } -:root:only-child { background-color: red; } -:root:nth-child(1) { background-color: red; } -:root:nth-child(n) { background-color: red; } -:root:nth-last-child(1) { background-color: red; } -:root:nth-last-child(n) { background-color: red; } -:root:first-of-type { background-color: red; } -:root:last-of-type { background-color: red; } -:root:only-of-type { background-color: red; } -:root:nth-of-type(1) { background-color: red; } -:root:nth-of-type(n) { background-color: red; } -:root:nth-last-of-type(1) { background-color: red; } -:root:nth-last-of-type(n) { background-color: red; } -p { color: green; }</style> - <link rel="first" href="css3-modsel-1.html" title="Groups of selectors"> - <link rel="prev" href="css3-modsel-27.html" title=":root pseudo-class"> - <link rel="next" href="css3-modsel-27b.html" title="Impossible rules (* html, * :root)"> - <link rel="last" href="css3-modsel-d4.html" title="Dynamic updating of :first-child and :last-child"> - <link rel="up" href="./index.html"> - <link rel="top" href="../../index.html"> - </head> - <body> -<p>This line should be green (there should be no red on this page).</p> -</body> -</html> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/css3/selectors3/xhtml/css3-modsel-27a.xml b/third_party/WebKit/LayoutTests/css3/selectors3/xhtml/css3-modsel-27a.xml deleted file mode 100644 index c667e30..0000000 --- a/third_party/WebKit/LayoutTests/css3/selectors3/xhtml/css3-modsel-27a.xml +++ /dev/null
@@ -1,31 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <title>Impossible rules (:root:first-child, etc)</title> - <style type="text/css"><![CDATA[ -:root:first-child { background-color: red; } -:root:last-child { background-color: red; } -:root:only-child { background-color: red; } -:root:nth-child(1) { background-color: red; } -:root:nth-child(n) { background-color: red; } -:root:nth-last-child(1) { background-color: red; } -:root:nth-last-child(n) { background-color: red; } -:root:first-of-type { background-color: red; } -:root:last-of-type { background-color: red; } -:root:only-of-type { background-color: red; } -:root:nth-of-type(1) { background-color: red; } -:root:nth-of-type(n) { background-color: red; } -:root:nth-last-of-type(1) { background-color: red; } -:root:nth-last-of-type(n) { background-color: red; } -p { color: green; }]]></style> - <link rel="first" href="css3-modsel-1.xml" title="Groups of selectors"/> - <link rel="prev" href="css3-modsel-27.xml" title=":root pseudo-class"/> - <link rel="next" href="css3-modsel-27b.xml" title="Impossible rules (* html, * :root)"/> - <link rel="last" href="css3-modsel-d4.xml" title="Dynamic updating of :first-child and :last-child"/> - <link rel="up" href="./index.html"/> - <link rel="top" href="../../index.html"/> - </head> - <body> -<p>This line should be green (there should be no red on this page).</p> -</body> -</html> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.css b/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.css deleted file mode 100644 index 277f739..0000000 --- a/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.css +++ /dev/null
@@ -1,16 +0,0 @@ - -:root:first-child { background-color: red; } -:root:last-child { background-color: red; } -:root:only-child { background-color: red; } -:root:nth-child(1) { background-color: red; } -:root:nth-child(n) { background-color: red; } -:root:nth-last-child(1) { background-color: red; } -:root:nth-last-child(n) { background-color: red; } -:root:first-of-type { background-color: red; } -:root:last-of-type { background-color: red; } -:root:only-of-type { background-color: red; } -:root:nth-of-type(1) { background-color: red; } -:root:nth-of-type(n) { background-color: red; } -:root:nth-last-of-type(1) { background-color: red; } -:root:nth-last-of-type(n) { background-color: red; } -p { color: green; } \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.xml b/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.xml deleted file mode 100644 index 93e80f81..0000000 --- a/third_party/WebKit/LayoutTests/css3/selectors3/xml/css3-modsel-27a.xml +++ /dev/null
@@ -1,4 +0,0 @@ -<?xml-stylesheet href="css3-modsel-27a.css" type="text/css"?> -<test> -<p xmlns="http://www.w3.org/1999/xhtml">This line should be green (there should be no red on this page).</p> -</test> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/fast/css/first-letter-capitalized-edit-select-crash-expected.txt b/third_party/WebKit/LayoutTests/fast/css/first-letter-capitalized-edit-select-crash-expected.txt index dc20de5..13df36d 100644 --- a/third_party/WebKit/LayoutTests/fast/css/first-letter-capitalized-edit-select-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/css/first-letter-capitalized-edit-select-crash-expected.txt
@@ -1,3 +1,3 @@ -Pass if no crash or assert in debug +Pass If No Crash Or Assert In Debug
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/callback-exception-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/callback-exception-expected.txt index d29897d..dccb8b7 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/callback-exception-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/callback-exception-expected.txt
@@ -1,4 +1,4 @@ -CONSOLE ERROR: line 28: Uncaught Error: Exception in success callback +CONSOLE ERROR: line 25: Uncaught Error: Exception in success callback Tests that when an exception is thrown in the success callback, the error callback is not invoked. Note that this test throws an exception which is not caught. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/coordinates-interface-attributes.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/coordinates-interface-attributes.html index 073a374..cd981dba 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/coordinates-interface-attributes.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/coordinates-interface-attributes.html
@@ -10,9 +10,6 @@ description("Test the attribute handling of the Coordinates interface"); window.jsTestIsAsync = true; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - // Format: [Input], [Expected] // Input: latitude, longitude, accuracy, altitude, altitudeAccuracy, heading, speed. // Expected: latitude, longitude, accuracy, altitude, altitudeAccuracy, heading, speed.
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-clear-watch.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-clear-watch.html index 850993f..0cf8c63 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-clear-watch.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/error-clear-watch.html
@@ -9,9 +9,6 @@ <script> description("This tests removing the watcher from an error callback does not causes assertions."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPositionUnavailableError("debug");
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-remote-context-inner.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-remote-context-inner.html index da488db..445f8776 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-remote-context-inner.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/callback-to-remote-context-inner.html
@@ -6,9 +6,6 @@ <script src="geolocation-mock.js"></script> <script> function init() { - if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(51.478, -0.166, 100);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/remove-remote-context-in-error-callback-crash-inner.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/remove-remote-context-in-error-callback-crash-inner.html index a7294ae4..bd3afcc4 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/remove-remote-context-in-error-callback-crash-inner.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/remove-remote-context-in-error-callback-crash-inner.html
@@ -5,9 +5,6 @@ <script src="geolocation-mock.js"></script> <script> function init() { - if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(false); window.parent.onIframeReady()
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html index 8b9504a2..3760829 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/resources/window-close-popup.html
@@ -6,9 +6,6 @@ var mockAccuracy = 100.0; function loadNext() { - if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/cached-position-called-once.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/cached-position-called-once.js index 8f9862b..1b81789 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/cached-position-called-once.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/cached-position-called-once.js
@@ -1,8 +1,5 @@ description('Tests that when a cached position is available the callback for getCurrentPosition is called only once. This is a regression test for http://crbug.com/311876 .'); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - // Only one success callback should be reported per call to getCurrentPosition. var reportCount = 0; var isSuccess;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js index 19e38ba2..20b29647 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/callback-exception.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/clear-watch-invalid-id-crash.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/clear-watch-invalid-id-crash.js index 3a98fad..62c3c37 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/clear-watch-invalid-id-crash.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/clear-watch-invalid-id-crash.js
@@ -1,7 +1,7 @@ description("Tests for a crash when clearWatch() is called with a zero ID.<br><br>We call clearWatch() with a request in progress then navigate the page. This accesses the watchers map during cleanup and triggers the crash. This page should not be visible when the test completes."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); +if (!window.testRunner) + debug('This test can not run without testRunner'); document.body.onload = function() { geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js index a37a6e8..add7f40 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed-for-multiple-requests.js
@@ -1,8 +1,5 @@ description("Tests that when multiple requests are waiting for permission, no callbacks are invoked until permission is allowed."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPosition(51.478, -0.166, 100);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed.js index 5fdb68f..22393ee 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-allowed.js
@@ -1,8 +1,5 @@ description("Tests that when a position is available, no callbacks are invoked until permission is allowed."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPosition(51.478, -0.166, 100);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js index 63ec689..351c6948 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied-for-multiple-requests.js
@@ -1,8 +1,5 @@ description("Tests that when multiple requests are waiting for permission, no callbacks are invoked until permission is denied."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied.js index 22afa53..4eb9317 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/delayed-permission-denied.js
@@ -1,8 +1,5 @@ description("Tests that when a position is available, no callbacks are invoked until permission is denied."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-already.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-already.js index c91cff75..4ff78d3 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-already.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-already.js
@@ -1,8 +1,5 @@ description("Tests that when a request is made on a Geolocation object after its frame has been disconnected, no callbacks are made and no crash occurs."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var iframe = document.createElement('iframe'); geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-permission-denied.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-permission-denied.js index 66a5fea2..e5a1f84 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-permission-denied.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame-permission-denied.js
@@ -1,8 +1,5 @@ description("Tests that when a request is made on a Geolocation object, permission is denied and its Frame is disconnected before a callback is made, no callbacks are made."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; var iframe = document.createElement('iframe');
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame.js index a0a1a88..c992c8eb 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/disconnected-frame.js
@@ -1,8 +1,5 @@ description("Tests that when a request is made on a Geolocation object and its Frame is disconnected before a callback is made, no callbacks are made."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; var iframe = document.createElement('iframe');
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js index a5f070a38..24bd4db 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error-service-connection-error.js
@@ -1,8 +1,5 @@ description("Tests Geolocation when the geolocation service connection fails."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error.js index a2d730b..0d43ec3 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/error.js
@@ -2,9 +2,6 @@ var mockMessage = "debug"; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js index 60019fe..1dde306 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/maximum-age.js
@@ -24,9 +24,6 @@ shouldBe('error.message', 'mockMessage'); } -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/multiple-requests.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/multiple-requests.js index 71d9da4..ca73f266 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/multiple-requests.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/multiple-requests.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; var watchCallbackInvoked = false; var oneShotCallbackInvoked = false;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js index 828f891..41380e2d 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/notimer-after-unload.js
@@ -1,7 +1,7 @@ description("Tests that no timers will trigger for navigator.geolocation object after onunload."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); +if (!window.testRunner) + debug('This test can not run without testRunner'); geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-clear-watch.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-clear-watch.js index a5e5f5cd..b6aca703 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-clear-watch.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-clear-watch.js
@@ -1,8 +1,5 @@ description("Tests that when Geolocation permission has been denied prior to a call to watchPosition, and the watch is cleared in the error callback, there is no crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=32111."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-error.js index ed00f480..f8877cb8 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-error.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-error.js
@@ -1,8 +1,5 @@ description("Tests that when Geolocation permission has been denied prior to a call to a Geolocation method, the error callback is invoked with code PERMISSION_DENIED, when the Geolocation service encounters an error."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-success.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-success.js index b09cbc1..d5ad0f95 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-success.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-already-success.js
@@ -1,8 +1,5 @@ description("Tests that when Geolocation permission has been denied prior to a call to a Geolocation method, the error callback is invoked with code PERMISSION_DENIED, when the Geolocation service has a good position."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-stops-watches.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-stops-watches.js index 8e2feb7..778fc83 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-stops-watches.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied-stops-watches.js
@@ -1,8 +1,5 @@ description("Tests that when Geolocation permission is denied, watches are stopped, as well as one-shots."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js index d89d110..4615390 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-denied.js
@@ -1,8 +1,5 @@ description("Tests Geolocation when permission is denied, using the mock service."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js index 7951b6a..c052c34 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/permission-service-connection-error.js
@@ -1,8 +1,5 @@ description("Tests Geolocation when the permission service connection fails."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/position-string.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/position-string.js index 439cd4b..56f6e33 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/position-string.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/position-string.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100.0; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-error.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-error.js index cfc8a64c..c2c3c9b 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-error.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-error.js
@@ -2,9 +2,6 @@ var mockMessage = 'test'; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-permission-denied.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-permission-denied.js index 6632760..688f67b3 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-permission-denied.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-permission-denied.js
@@ -1,8 +1,5 @@ description("Tests that reentrant calls to Geolocation methods from the error callback due to a PERMISSION_DENIED error are OK."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js index 95a3daac..091e5a6 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/reentrant-success.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100.0; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/success.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/success.js index 145172b..818ba6b 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/success.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/success.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js index d4ecad06..632aead 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-clear-watch.js
@@ -1,8 +1,5 @@ description("Tests that when a watch times out and is cleared from the error callback, there is no crash. This a regression test for https://bugs.webkit.org/show_bug.cgi?id=32111."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-negative.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-negative.js index fa9be73..cd12abc 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-negative.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-negative.js
@@ -1,8 +1,5 @@ description("Tests that when timeout is negative (and maximumAge is too), the error callback is called immediately with code TIMEOUT."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js index 5e5e72d..8de1fa62 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-over-max-of-unsigned.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100.0; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js index 699f014..a4c25f0 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout-zero.js
@@ -1,8 +1,5 @@ description("Tests that when timeout is zero (and maximumAge is too), the error callback is called immediately with code TIMEOUT."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var error; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js index e6f4e86..cc64090 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timeout.js
@@ -4,9 +4,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100.0; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var position; geolocationServiceMock.then(mock => {
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js index 6e5e8aa7..6306e3e 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/timestamp.js
@@ -9,9 +9,6 @@ var t = null; var then = null; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/watch.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/watch.js index bc1aba32..f76d86ca 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/watch.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/watch.js
@@ -24,9 +24,6 @@ debug(''); } -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(mockLatitude, mockLongitude, mockAccuracy);
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js index a1f49ed9..3899456f 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/script-tests/window-close-crash.js
@@ -2,8 +2,8 @@ "when the GeolocationController is destroyed.<br>" + "See https://bugs.webkit.org/show_bug.cgi?id=52216"); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); +if (!window.testRunner) + debug('This test can not run without testRunner'); testRunner.waitUntilDone(); testRunner.setCanOpenWindows();
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success-clear-watch.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success-clear-watch.html index 76457097..8a86b81 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success-clear-watch.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/success-clear-watch.html
@@ -13,9 +13,6 @@ var mockLongitude = -0.166; var mockAccuracy = 100; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - geolocationServiceMock.then(mock => { mock.setGeolocationPermission(true); mock.setGeolocationPosition(mockLatitude,
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-page-visibility.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-page-visibility.html index 125affd..505de6f 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-page-visibility.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-page-visibility.html
@@ -10,8 +10,8 @@ description("Tests that watchPosition does not report position changes when the page is not visible."); window.jsTestIsAsync = true; -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); +if (!window.testRunner) + debug('This test can not run without testRunner'); var position; var error;
diff --git a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-unique.html b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-unique.html index ed31f26..ec7df34 100644 --- a/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-unique.html +++ b/third_party/WebKit/LayoutTests/fast/dom/Geolocation/watchPosition-unique.html
@@ -10,9 +10,6 @@ description("Tests that navigator.geolocation.watchPosition returns unique results within its script execution context."); -if (!window.testRunner || !window.mojo) - debug('This test can not run without testRunner or mojo'); - var watchID1; var watchID2; var watchID3;
diff --git a/third_party/WebKit/LayoutTests/fast/selectors/child-indexed-pseudo-classes.html b/third_party/WebKit/LayoutTests/fast/selectors/child-indexed-pseudo-classes.html new file mode 100644 index 0000000..e511704 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/selectors/child-indexed-pseudo-classes.html
@@ -0,0 +1,59 @@ +<!doctype html> +<meta charset=utf-8> +<title>Matching of child-indexed pseudo-classes</title> +<link rel="author" title="Emilio Cobos Álvarez" href="mailto:ecoal95@gmail.com"> +<link rel="help" href="https://drafts.csswg.org/selectors-4/#child-index"> +<script src=../../resources/testharness.js></script> +<script src=../../resources/testharnessreport.js></script> +<script> +test(function() { + var check = function(element, selectors, qsRoot) { + for (var i = 0; i < selectors.length; ++i) { + var selector = selectors[i][0]; + var expected = selectors[i][1]; + + var message = "Expected " + element.tagName + " element to " + + (expected ? "match " : "not match ") + selector; + + assert_equals(expected, element.matches(selector), message); + + if (qsRoot) { + assert_equals(expected, element === qsRoot.querySelector(selector), + message + " in querySelector()"); + var qsa = qsRoot.querySelectorAll(selector); + assert_equals(expected, !!qsa.length && element === qsa[0], + message + " in querySelectorAll()"); + } + } + } + + var rootOfSubtreeSelectors = [ + [ ":first-child", true ], + [ ":last-child", true ], + [ ":only-child", true ], + [ ":first-of-type", true ], + [ ":last-of-type", true ], + [ ":only-of-type", true ], + [ ":nth-child(1)", true ], + [ ":nth-child(n)", true ], + [ ":nth-last-child(1)", true ], + [ ":nth-last-child(n)", true ], + [ ":nth-of-type(1)", true ], + [ ":nth-of-type(n)", true ], + [ ":nth-last-of-type(1)", true ], + [ ":nth-last-of-type(n)", true ], + [ ":nth-child(2)", false ], + [ ":nth-last-child(2)", false], + [ ":nth-of-type(2)", false ], + [ ":nth-last-of-type(2)", false], + ]; + + check(document.documentElement, rootOfSubtreeSelectors, document); + check(document.createElement('div'), rootOfSubtreeSelectors); + + var fragment = document.createDocumentFragment(); + var div = document.createElement('div'); + fragment.appendChild(div); + check(div, rootOfSubtreeSelectors, fragment); +}, "child-indexed pseudo-classes should match without a parent") +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html index 5ce7e8b..9a03b2ea 100644 --- a/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html +++ b/third_party/WebKit/LayoutTests/fast/shapedetection/shapedetection-security-test.html
@@ -28,10 +28,9 @@ promise_test(function(t) { var image = new Image(); return detectOnElementAndExpectError(createDetector, image, - "../../imported/wpt/images/broken.png") + "../../external/wpt/images/broken.png") .then(function(error) { assert_equals(error.name, "InvalidStateError"); - assert_regexp_match(error.message, /Unable to decompress*/); }); }, "Detector should reject undecodable images with an InvalidStateError."); };
diff --git a/third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html b/third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html index f6fb7b0b..b1efa0c4 100644 --- a/third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html +++ b/third_party/WebKit/LayoutTests/harness-tests/resources/mojo-helpers-inner.html
@@ -1,6 +1,11 @@ +<!DOCTYPE html> +<script src="../../resources/mojo-helpers.js"></script> <script> -if (window.opener) - window.opener.postMessage(!!window.mojo, '*'); -else - window.parent.postMessage(!!window.mojo, '*'); +'use strict'; +loadMojoModules('module loading test').then(modules => { + if (window.opener) + window.opener.postMessage(!!modules.core, '*'); + else + window.parent.postMessage(!!modules.core, '*'); +}); </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html b/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html index 1b1758c..9cc68eda 100644 --- a/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html +++ b/third_party/WebKit/LayoutTests/http/tests/budget/get-budget.html
@@ -9,9 +9,6 @@ </head> <body> <script> - if (!window.mojo) - debug('This test can not run without mojo'); - promise_test(function() { return budgetServiceMock.then(mock => { assert_own_property(Navigator.prototype, 'budget');
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html b/third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html index 55d47e7..d1e4529 100644 --- a/third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html +++ b/third_party/WebKit/LayoutTests/http/tests/budget/get-cost.html
@@ -9,9 +9,6 @@ </head> <body> <script> - if (!window.mojo) - debug('This test can not run without mojo'); - promise_test(function() { return budgetServiceMock.then(mock => { assert_own_property(Navigator.prototype, 'budget');
diff --git a/third_party/WebKit/LayoutTests/http/tests/budget/reserve.html b/third_party/WebKit/LayoutTests/http/tests/budget/reserve.html index 5b373015..ae07aa4 100644 --- a/third_party/WebKit/LayoutTests/http/tests/budget/reserve.html +++ b/third_party/WebKit/LayoutTests/http/tests/budget/reserve.html
@@ -9,9 +9,6 @@ </head> <body> <script> - if (!window.mojo) - debug('This test can not run without mojo'); - promise_test(function() { return budgetServiceMock.then(mock => { assert_own_property(Navigator.prototype, 'budget');
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/acid3.html b/third_party/WebKit/LayoutTests/http/tests/misc/acid3.html index f9cdc4c4..568fb54 100644 --- a/third_party/WebKit/LayoutTests/http/tests/misc/acid3.html +++ b/third_party/WebKit/LayoutTests/http/tests/misc/acid3.html
@@ -1261,7 +1261,7 @@ var p1 = doc.createElement("p"); doc.body.appendChild(doc.createTextNode(" TEST ")); doc.body.appendChild(p1); - expect(doc.documentElement, notFirst, "root element, with no parent node, claims to be a :first-child"); + expect(doc.documentElement, first, "root element, with no parent node, claims to be a :first-child"); expect(doc.documentElement.firstChild, first, "first child of root node didn't match :first-child"); expect(doc.documentElement.firstChild.firstChild, first, "failure 3"); expect(doc.body, notFirst, "failure 4");
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html new file mode 100644 index 0000000..7541484 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/resources/cross-origin-subframe-for-scrolling.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> +<script src="/js-test-resources/js-test.js"></script> +<div style="height: 300px"></div> + +<script> +setPrintTestResultsLazily(); +self.jsTestIsAsync = true; + +window.onload = (() => { + if (!window.eventSender || !window.internals) { + debug("This test requires window.eventSender."); + return; + } + internals.settings.setScrollAnimatorEnabled(true); +}); + +function handleMessage(event) { + if (event.data.hasOwnProperty('scrollBy')) { + eventSender.mouseMoveTo(event.data.left + 5, event.data.top + 5); + eventSender.mouseScrollBy(0, event.data.scrollBy); + requestAnimationFrame(() => {setTimeout(() => {event.source.postMessage("", "*")}, 500)}); + } else { + event.source.postMessage({scrollTop: document.documentElement.scrollTop}, "*"); + } +} + +window.addEventListener("message", handleMessage); +</script> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes-expected.txt b/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes-expected.txt new file mode 100644 index 0000000..c97dacb6 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes-expected.txt
@@ -0,0 +1,11 @@ +Verify that two sibling cross-origin iframes both correctly scroll on MouseWheel events, as per https://crbug.com/675695. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS event.data.scrollTop is 40 +PASS event.data.scrollTop is 40 +PASS successfullyParsed is true + +TEST COMPLETE +
diff --git a/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes.html b/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes.html new file mode 100644 index 0000000..acd8309 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/misc/scroll-cross-origin-iframes.html
@@ -0,0 +1,44 @@ +<!DOCTYPE html> +<script src="/js-test-resources/js-test.js"></script> +<iframe id="target-iframe1" src="http://localhost:8080/misc/resources/cross-origin-subframe-for-scrolling.html" style="height: 100px; width: 100px; overflow-y: scroll; position: absolute; left: 50px; top: 50px"></iframe> +<iframe id="target-iframe2" src="http://localhost:8080/misc/resources/cross-origin-subframe-for-scrolling.html" style="height: 100px; width: 100px; overflow-y: scroll; position: absolute; left: 50px; top: 200px"></iframe> + +<script> +description("Verify that two sibling cross-origin iframes both correctly scroll on MouseWheel events, as per https://crbug.com/675695."); + +// States: +// 0 => Scroll sent to iframe1 +// 1 => Fetching scroll offset from iframe1 +// 2 => Scroll sent to iframe2 +// 3 => Fetching scroll offset from iframe2 +var state = 0; +var iframe1 = document.getElementById("target-iframe1"); +var iframe2 = document.getElementById("target-iframe2"); +setPrintTestResultsLazily(); +self.jsTestIsAsync = true; + +function handleMessage(event) { + if (state == 0) { + iframe1.contentWindow.postMessage("", "*"); + state = 1; + } else if (state == 1) { + shouldBeEqualToNumber("event.data.scrollTop", 40); + state = 2; + iframe2.contentWindow.postMessage({scrollBy: -1, left: iframe2.offsetLeft, top: iframe2.offsetTop}, "*"); + iframe2.contentWindow.postMessage("", "*"); + } else if (state == 2) { + iframe1.contentWindow.postMessage("", "*"); + state = 3; + } else if (state == 3) { + shouldBeEqualToNumber("event.data.scrollTop", 40); + finishJSTest(); + } +} + +window.addEventListener("message", handleMessage); + +iframe1.onload = (() => { + iframe1.contentWindow.postMessage({scrollBy: -1, left: iframe1.offsetLeft, top: iframe1.offsetTop}, "*"); +}); + +</script> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html index fc545868..f2c74eb 100644 --- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html +++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html
@@ -1,14 +1,14 @@ <html> <body> -The navigation should succeed. This text shouldn't appear. +The navigation should fail and this iframe should be blocked. This text shouldn't appear. <script> window.onload = function() { try { top.location = "http://localhost:8000/security/frameNavigation/resources/navigation-changed-iframe.html"; - top.postMessage("PASS", "*"); - } catch(e) { top.postMessage("FAIL", "*"); + } catch(e) { + top.postMessage("PASS", "*"); } } </script>
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent-expected.txt index 9968bd11..fd6f97229 100644 --- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-user-gesture-in-parent-expected.txt
@@ -1,3 +1,6 @@ -localhost -PASSED: Navigation succeeded. + +-------- +Frame: '<!--framePath //<!--frame0-->-->' +-------- +
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture-expected.txt index 211d03a..ce34427 100644 --- a/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture-expected.txt +++ b/third_party/WebKit/LayoutTests/http/tests/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture-expected.txt
@@ -1,4 +1,8 @@ -CONSOLE WARNING: line 8: Frame with URL 'http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html' attempted to navigate its top-level window with URL 'http://127.0.0.1:8000/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture.html'. Navigating the top-level window from a cross-origin iframe will soon require that the iframe has received a user gesture. See https://www.chromestatus.com/features/5851021045661696. -localhost +CONSOLE ERROR: line 8: Unsafe JavaScript attempt to initiate navigation for frame with URL 'http://127.0.0.1:8000/security/frameNavigation/xss-DENIED-top-navigation-without-user-gesture.html' from frame with URL 'http://localhost:8000/security/frameNavigation/resources/iframe-that-performs-top-navigation-without-user-gesture.html'. The frame attempting navigation is targeting its top-level window, but is neither same-origin with its target nor has it received a user gesture. See https://www.chromestatus.com/features/5851021045661696. -PASSED: Navigation succeeded. + + +-------- +Frame: '<!--framePath //<!--frame0-->-->' +-------- +
diff --git a/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-variables-expected.txt b/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-variables-expected.txt index 4fb6516..19d1d69 100644 --- a/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-variables-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/elements/styles-3/styles-variables-expected.txt
@@ -1,10 +1,12 @@ Tests that computed styles expand and allow tracing to style rules. ==== Computed style for ID1 ==== ---b: 44px; - 44px - #id1 styles-variables.html:8 -> styles-variables.html:8:7 display: block; block - div user agent stylesheet +--a: red; + red - body styles-variables.html:4 -> styles-variables.html:4:7 +--b: 44px; + 44px - #id1 styles-variables.html:8 -> styles-variables.html:8:7 [expanded] element.style { () @@ -16,12 +18,20 @@ div { (user agent stylesheet) display: block; +======== Inherited from body ======== +[expanded] +body { (styles-variables.html:4 -> styles-variables.html:4:7) + --a: red; + value of --a: red ==== Computed style for ID2 ==== ---a: green; - green - #id2 styles-variables.html:12 -> styles-variables.html:12:7 display: block; block - div user agent stylesheet +--a: green; + green - #id2 styles-variables.html:12 -> styles-variables.html:12:7 + OVERLOADED red - body styles-variables.html:4 -> styles-variables.html:4:7 +--b: 44px; + 44px - #id1 styles-variables.html:8 -> styles-variables.html:8:7 [expanded] element.style { () @@ -33,12 +43,26 @@ div { (user agent stylesheet) display: block; +======== Inherited from div#id1 ======== +[expanded] +#id1 { (styles-variables.html:8 -> styles-variables.html:8:7) + --b: 44px; + +======== Inherited from body ======== +[expanded] +body { (styles-variables.html:4 -> styles-variables.html:4:7) +/-- overloaded --/ --a: red; + value of --b: 44px ==== Computed style for ID3 ==== ---a: green; - inherit - #id3 styles-variables.html:16 -> styles-variables.html:16:7 display: block; block - div user agent stylesheet +--a: green; + inherit - #id3 styles-variables.html:16 -> styles-variables.html:16:7 + OVERLOADED green - #id2 styles-variables.html:12 -> styles-variables.html:12:7 + OVERLOADED red - body styles-variables.html:4 -> styles-variables.html:4:7 +--b: 44px; + 44px - #id1 styles-variables.html:8 -> styles-variables.html:8:7 [expanded] element.style { () @@ -50,6 +74,21 @@ div { (user agent stylesheet) display: block; +======== Inherited from div#id2 ======== +[expanded] +#id2 { (styles-variables.html:12 -> styles-variables.html:12:7) +/-- overloaded --/ --a: green; + +======== Inherited from div#id1 ======== +[expanded] +#id1 { (styles-variables.html:8 -> styles-variables.html:8:7) + --b: 44px; + +======== Inherited from body ======== +[expanded] +body { (styles-variables.html:4 -> styles-variables.html:4:7) +/-- overloaded --/ --a: red; + value of --b: 44px ==== Computed style for ID4 ==== display: block; @@ -65,5 +104,10 @@ div { (user agent stylesheet) display: block; +======== Inherited from body ======== +[expanded] +body { (styles-variables.html:4 -> styles-variables.html:4:7) +/-- overloaded --/ --a: red; + value of --a: undefined
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-change-variable.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-change-variable.html index 882b468d..2e1205c6 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-change-variable.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-change-variable.html
@@ -45,7 +45,7 @@ function step2(callFrames) { var pane = self.runtime.sharedInstance(Sources.CallStackSidebarPane); - pane._callFrameSelected(pane.callFrames[1]); + pane._list.selectItem(pane._list.itemAtIndex(1)); InspectorTest.deprecatedRunAfterPendingDispatches(step3); }
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe.html index 0ed443f87..e6f5926 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-on-call-frame-inside-iframe.html
@@ -77,7 +77,7 @@ function step3() { var pane = self.runtime.sharedInstance(Sources.CallStackSidebarPane); - pane._callFrameSelected(pane.callFrames[1]); + pane._list.selectItem(pane._list.itemAtIndex(1)); InspectorTest.deprecatedRunAfterPendingDispatches(step4); }
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-while-paused.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-while-paused.html index d5785e4..7be8554 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-while-paused.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-pause/debugger-eval-while-paused.html
@@ -37,7 +37,7 @@ { InspectorTest.addResult("Evaluated script on the top frame: " + result); var pane = self.runtime.sharedInstance(Sources.CallStackSidebarPane); - pane._callFrameSelected(pane.callFrames[1]); + pane._list.selectItem(pane._list.itemAtIndex(1)); InspectorTest.deprecatedRunAfterPendingDispatches(step4); }
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html index 42904a0..b1ce791 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-async-function.html
@@ -35,9 +35,9 @@ function dumpCallStackSidebarPane() { - var callFrameList = self.runtime.sharedInstance(Sources.CallStackSidebarPane).callFrameList; - for (var item of callFrameList._items) - InspectorTest.addResult(item.element.textContent.replace(/VM\d+/g, "VM")); + var pane = self.runtime.sharedInstance(Sources.CallStackSidebarPane); + for (var element of pane.contentElement.querySelectorAll('.call-frame-item')) + InspectorTest.addResult(element.deepTextContent().replace(/VM\d+/g, "VM")); } }
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url.html b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url.html index 86e8faa..8a06b99 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url.html +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/async-call-stack-url.html
@@ -44,9 +44,9 @@ function step6() { - var callFrameList = self.runtime.sharedInstance(Sources.CallStackSidebarPane).callFrameList; - for (var item of callFrameList._items) - InspectorTest.addResult(item.element.textContent.replace(/VM\d+/g, "VM")); + var pane = self.runtime.sharedInstance(Sources.CallStackSidebarPane); + for (var element of pane.contentElement.querySelectorAll('.call-frame-item')) + InspectorTest.addResult(element.deepTextContent().replace(/VM\d+/g, "VM")); InspectorTest.completeDebuggerTest(); } }
diff --git a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/copy-stack-trace-expected.txt b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/copy-stack-trace-expected.txt index cab20447..d302bc8a 100644 --- a/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/copy-stack-trace-expected.txt +++ b/third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/copy-stack-trace-expected.txt
@@ -5,6 +5,5 @@ functionBaz (copy-stack-trace.html:19) functionBar (copy-stack-trace.html:14) testFunction (copy-stack-trace.html:9) - Script execution resumed.
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/stable/webexposed/global-interface-listing-expected.txt deleted file mode 100644 index 051e01431..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/stable/webexposed/global-interface-listing-expected.txt +++ /dev/null
@@ -1,7699 +0,0 @@ -CONSOLE WARNING: line 95: 'webkitURL' is deprecated. Please use 'URL' instead. -This test documents all interface attributes and methods on the global window object and element instances. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -[INTERFACES] -interface AnalyserNode : AudioNode - attribute @@toStringTag - getter fftSize - getter frequencyBinCount - getter maxDecibels - getter minDecibels - getter smoothingTimeConstant - method constructor - method getByteFrequencyData - method getByteTimeDomainData - method getFloatFrequencyData - method getFloatTimeDomainData - setter fftSize - setter maxDecibels - setter minDecibels - setter smoothingTimeConstant -interface AnimationEvent : Event - attribute @@toStringTag - getter animationName - getter elapsedTime - method constructor -interface AppBannerPromptResult - attribute @@toStringTag - getter outcome - getter platform - method constructor -interface ApplicationCache : EventTarget - attribute @@toStringTag - attribute CHECKING - attribute DOWNLOADING - attribute IDLE - attribute OBSOLETE - attribute UNCACHED - attribute UPDATEREADY - getter oncached - getter onchecking - getter ondownloading - getter onerror - getter onnoupdate - getter onobsolete - getter onprogress - getter onupdateready - getter status - method abort - method constructor - method swapCache - method update - setter oncached - setter onchecking - setter ondownloading - setter onerror - setter onnoupdate - setter onobsolete - setter onprogress - setter onupdateready -interface ApplicationCacheErrorEvent : Event - attribute @@toStringTag - getter message - getter reason - getter status - getter url - method constructor -interface Attr : Node - attribute @@toStringTag - getter localName - getter name - getter namespaceURI - getter ownerElement - getter prefix - getter specified - getter value - method constructor - setter value -interface Audio - method constructor -interface AudioBuffer - attribute @@toStringTag - getter duration - getter length - getter numberOfChannels - getter sampleRate - method constructor - method copyFromChannel - method copyToChannel - method getChannelData -interface AudioBufferSourceNode : AudioScheduledSourceNode - attribute @@toStringTag - getter buffer - getter detune - getter loop - getter loopEnd - getter loopStart - getter playbackRate - method constructor - method start - setter buffer - setter loop - setter loopEnd - setter loopStart -interface AudioContext : BaseAudioContext - attribute @@toStringTag - method close - method constructor - method getOutputTimestamp - method suspend -interface AudioDestinationNode : AudioNode - attribute @@toStringTag - getter maxChannelCount - method constructor -interface AudioListener - attribute @@toStringTag - getter forwardX - getter forwardY - getter forwardZ - getter positionX - getter positionY - getter positionZ - getter upX - getter upY - getter upZ - method constructor - method setOrientation - method setPosition -interface AudioNode : EventTarget - attribute @@toStringTag - getter channelCount - getter channelCountMode - getter channelInterpretation - getter context - getter numberOfInputs - getter numberOfOutputs - method connect - method constructor - method disconnect - setter channelCount - setter channelCountMode - setter channelInterpretation -interface AudioParam - attribute @@toStringTag - getter defaultValue - getter maxValue - getter minValue - getter value - method cancelScheduledValues - method cancelValuesAndHoldAtTime - method constructor - method exponentialRampToValueAtTime - method linearRampToValueAtTime - method setTargetAtTime - method setValueAtTime - method setValueCurveAtTime - setter value -interface AudioProcessingEvent : Event - attribute @@toStringTag - getter inputBuffer - getter outputBuffer - getter playbackTime - method constructor -interface AudioScheduledSourceNode : AudioNode - attribute @@toStringTag - getter onended - method constructor - method start - method stop - setter onended -interface BarProp - attribute @@toStringTag - getter visible - method constructor -interface BaseAudioContext : EventTarget - attribute @@toStringTag - getter currentTime - getter destination - getter listener - getter onstatechange - getter sampleRate - getter state - method constructor - method createAnalyser - method createBiquadFilter - method createBuffer - method createBufferSource - method createChannelMerger - method createChannelSplitter - method createConstantSource - method createConvolver - method createDelay - method createDynamicsCompressor - method createGain - method createIIRFilter - method createMediaElementSource - method createMediaStreamDestination - method createMediaStreamSource - method createOscillator - method createPanner - method createPeriodicWave - method createScriptProcessor - method createStereoPanner - method createWaveShaper - method decodeAudioData - method resume - setter onstatechange -interface BatteryManager : EventTarget - attribute @@toStringTag - getter charging - getter chargingTime - getter dischargingTime - getter level - getter onchargingchange - getter onchargingtimechange - getter ondischargingtimechange - getter onlevelchange - method constructor - setter onchargingchange - setter onchargingtimechange - setter ondischargingtimechange - setter onlevelchange -interface BeforeInstallPromptEvent : Event - attribute @@toStringTag - getter platforms - getter userChoice - method constructor - method prompt -interface BeforeUnloadEvent : Event - attribute @@toStringTag - getter returnValue - method constructor - setter returnValue -interface BiquadFilterNode : AudioNode - attribute @@toStringTag - getter Q - getter detune - getter frequency - getter gain - getter type - method constructor - method getFrequencyResponse - setter type -interface Blob - attribute @@toStringTag - getter size - getter type - method constructor - method slice -interface BlobEvent : Event - attribute @@toStringTag - getter data - getter timecode - method constructor -interface BroadcastChannel : EventTarget - attribute @@toStringTag - getter name - getter onmessage - method close - method constructor - method postMessage - setter onmessage -interface ByteLengthQueuingStrategy - method constructor - method size -interface CDATASection : Text - attribute @@toStringTag - method constructor -interface CSS - static method escape - static method supports - attribute @@toStringTag - method constructor -interface CSSConditionRule : CSSGroupingRule - attribute @@toStringTag - getter conditionText - method constructor -interface CSSFontFaceRule : CSSRule - attribute @@toStringTag - getter style - method constructor -interface CSSGroupingRule : CSSRule - attribute @@toStringTag - getter cssRules - method constructor - method deleteRule - method insertRule -interface CSSImportRule : CSSRule - attribute @@toStringTag - getter href - getter media - getter styleSheet - method constructor -interface CSSKeyframeRule : CSSRule - attribute @@toStringTag - getter keyText - getter style - method constructor - setter keyText -interface CSSKeyframesRule : CSSRule - attribute @@toStringTag - getter cssRules - getter name - method appendRule - method constructor - method deleteRule - method findRule - setter name -interface CSSMediaRule : CSSConditionRule - attribute @@toStringTag - getter media - method constructor -interface CSSNamespaceRule : CSSRule - attribute @@toStringTag - getter namespaceURI - getter prefix - method constructor -interface CSSPageRule : CSSRule - attribute @@toStringTag - getter selectorText - getter style - method constructor - setter selectorText -interface CSSRule - attribute @@toStringTag - attribute CHARSET_RULE - attribute FONT_FACE_RULE - attribute IMPORT_RULE - attribute KEYFRAMES_RULE - attribute KEYFRAME_RULE - attribute MEDIA_RULE - attribute NAMESPACE_RULE - attribute PAGE_RULE - attribute STYLE_RULE - attribute SUPPORTS_RULE - attribute WEBKIT_KEYFRAMES_RULE - attribute WEBKIT_KEYFRAME_RULE - getter cssText - getter parentRule - getter parentStyleSheet - getter type - method constructor - setter cssText -interface CSSRuleList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item -interface CSSStyleDeclaration - attribute @@toStringTag - getter cssFloat - getter cssText - getter length - getter parentRule - method @@iterator - method constructor - method getPropertyPriority - method getPropertyValue - method item - method removeProperty - method setProperty - setter cssFloat - setter cssText -interface CSSStyleRule : CSSRule - attribute @@toStringTag - getter selectorText - getter style - method constructor - setter selectorText - setter style -interface CSSStyleSheet : StyleSheet - attribute @@toStringTag - getter cssRules - getter ownerRule - getter rules - method addRule - method constructor - method deleteRule - method insertRule - method removeRule -interface CSSSupportsRule : CSSConditionRule - attribute @@toStringTag - method constructor -interface CSSViewportRule : CSSRule - attribute @@toStringTag - getter style - method constructor -interface Cache - attribute @@toStringTag - method add - method addAll - method constructor - method delete - method keys - method match - method matchAll - method put -interface CacheStorage - attribute @@toStringTag - method constructor - method delete - method has - method keys - method match - method open -interface CanvasCaptureMediaStreamTrack : MediaStreamTrack - attribute @@toStringTag - getter canvas - method constructor - method requestFrame -interface CanvasGradient - attribute @@toStringTag - method addColorStop - method constructor -interface CanvasPattern - attribute @@toStringTag - method constructor -interface CanvasRenderingContext2D - attribute @@toStringTag - getter canvas - getter fillStyle - getter filter - getter font - getter globalAlpha - getter globalCompositeOperation - getter imageSmoothingEnabled - getter imageSmoothingQuality - getter lineCap - getter lineDashOffset - getter lineJoin - getter lineWidth - getter miterLimit - getter shadowBlur - getter shadowColor - getter shadowOffsetX - getter shadowOffsetY - getter strokeStyle - getter textAlign - getter textBaseline - method arc - method arcTo - method beginPath - method bezierCurveTo - method clearRect - method clip - method closePath - method constructor - method createImageData - method createLinearGradient - method createPattern - method createRadialGradient - method drawFocusIfNeeded - method drawImage - method ellipse - method fill - method fillRect - method fillText - method getContextAttributes - method getImageData - method getLineDash - method isPointInPath - method isPointInStroke - method lineTo - method measureText - method moveTo - method putImageData - method quadraticCurveTo - method rect - method resetTransform - method restore - method rotate - method save - method scale - method setLineDash - method setTransform - method stroke - method strokeRect - method strokeText - method transform - method translate - setter fillStyle - setter filter - setter font - setter globalAlpha - setter globalCompositeOperation - setter imageSmoothingEnabled - setter imageSmoothingQuality - setter lineCap - setter lineDashOffset - setter lineJoin - setter lineWidth - setter miterLimit - setter shadowBlur - setter shadowColor - setter shadowOffsetX - setter shadowOffsetY - setter strokeStyle - setter textAlign - setter textBaseline -interface ChannelMergerNode : AudioNode - attribute @@toStringTag - method constructor -interface ChannelSplitterNode : AudioNode - attribute @@toStringTag - method constructor -interface CharacterData : Node - attribute @@toStringTag - attribute @@unscopables - getter data - getter length - getter nextElementSibling - getter previousElementSibling - method after - method appendData - method before - method constructor - method deleteData - method insertData - method remove - method replaceData - method replaceWith - method substringData - setter data -interface ClientRect - attribute @@toStringTag - getter bottom - getter height - getter left - getter right - getter top - getter width - method constructor -interface ClientRectList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item -interface ClipboardEvent : Event - attribute @@toStringTag - getter clipboardData - method constructor -interface CloseEvent : Event - attribute @@toStringTag - getter code - getter reason - getter wasClean - method constructor -interface Comment : CharacterData - attribute @@toStringTag - method constructor -interface CompositionEvent : UIEvent - attribute @@toStringTag - getter data - method constructor - method initCompositionEvent -interface ConstantSourceNode : AudioScheduledSourceNode - attribute @@toStringTag - getter offset - method constructor -interface ConvolverNode : AudioNode - attribute @@toStringTag - getter buffer - getter normalize - method constructor - setter buffer - setter normalize -interface CountQueuingStrategy - method constructor - method size -interface Credential - attribute @@toStringTag - getter id - getter type - method constructor -interface CredentialsContainer - attribute @@toStringTag - method constructor - method get - method requireUserMediation - method store -interface Crypto - attribute @@toStringTag - getter subtle - method constructor - method getRandomValues -interface CryptoKey - attribute @@toStringTag - getter algorithm - getter extractable - getter type - getter usages - method constructor -interface CustomElementRegistry - attribute @@toStringTag - method constructor - method define - method get - method whenDefined -interface CustomEvent : Event - attribute @@toStringTag - getter detail - method constructor - method initCustomEvent -interface DOMError - attribute @@toStringTag - getter message - getter name - method constructor -interface DOMException - attribute @@toStringTag - attribute ABORT_ERR - attribute DATA_CLONE_ERR - attribute DOMSTRING_SIZE_ERR - attribute HIERARCHY_REQUEST_ERR - attribute INDEX_SIZE_ERR - attribute INUSE_ATTRIBUTE_ERR - attribute INVALID_ACCESS_ERR - attribute INVALID_CHARACTER_ERR - attribute INVALID_MODIFICATION_ERR - attribute INVALID_NODE_TYPE_ERR - attribute INVALID_STATE_ERR - attribute NAMESPACE_ERR - attribute NETWORK_ERR - attribute NOT_FOUND_ERR - attribute NOT_SUPPORTED_ERR - attribute NO_DATA_ALLOWED_ERR - attribute NO_MODIFICATION_ALLOWED_ERR - attribute QUOTA_EXCEEDED_ERR - attribute SECURITY_ERR - attribute SYNTAX_ERR - attribute TIMEOUT_ERR - attribute TYPE_MISMATCH_ERR - attribute URL_MISMATCH_ERR - attribute VALIDATION_ERR - attribute WRONG_DOCUMENT_ERR - getter code - getter message - getter name - method constructor - method toString -interface DOMImplementation - attribute @@toStringTag - method constructor - method createDocument - method createDocumentType - method createHTMLDocument - method hasFeature -interface DOMParser - attribute @@toStringTag - method constructor - method parseFromString -interface DOMStringList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method contains - method item -interface DOMStringMap - attribute @@toStringTag - method constructor -interface DOMTokenList - attribute @@toStringTag - getter length - getter value - method @@iterator - method add - method constructor - method contains - method entries - method forEach - method item - method keys - method remove - method supports - method toString - method toggle - method values - setter value -interface DataTransfer - attribute @@toStringTag - getter dropEffect - getter effectAllowed - getter files - getter items - getter types - method clearData - method constructor - method getData - method setData - method setDragImage - setter dropEffect - setter effectAllowed -interface DataTransferItem - attribute @@toStringTag - getter kind - getter type - method constructor - method getAsFile - method getAsString - method webkitGetAsEntry -interface DataTransferItemList - attribute @@toStringTag - getter length - method @@iterator - method add - method clear - method constructor - method remove -interface DataView - attribute @@toStringTag - getter buffer - getter byteLength - getter byteOffset - method constructor - method getFloat32 - method getFloat64 - method getInt16 - method getInt32 - method getInt8 - method getUint16 - method getUint32 - method getUint8 - method setFloat32 - method setFloat64 - method setInt16 - method setInt32 - method setInt8 - method setUint16 - method setUint32 - method setUint8 -interface DelayNode : AudioNode - attribute @@toStringTag - getter delayTime - method constructor -interface DeviceMotionEvent : Event - attribute @@toStringTag - getter acceleration - getter accelerationIncludingGravity - getter interval - getter rotationRate - method constructor - method initDeviceMotionEvent -interface DeviceOrientationEvent : Event - attribute @@toStringTag - getter absolute - getter alpha - getter beta - getter gamma - method constructor - method initDeviceOrientationEvent -interface Document : Node - attribute @@toStringTag - attribute @@unscopables - getter URL - getter activeElement - getter anchors - getter applets - getter body - getter characterSet - getter charset - getter childElementCount - getter children - getter compatMode - getter contentType - getter cookie - getter currentScript - getter defaultView - getter designMode - getter dir - getter doctype - getter documentElement - getter documentURI - getter domain - getter embeds - getter firstElementChild - getter fonts - getter forms - getter head - getter hidden - getter images - getter implementation - getter inputEncoding - getter lastElementChild - getter lastModified - getter links - getter onabort - getter onauxclick - getter onbeforecopy - getter onbeforecut - getter onbeforepaste - getter onblur - getter oncancel - getter oncanplay - getter oncanplaythrough - getter onchange - getter onclick - getter onclose - getter oncontextmenu - getter oncopy - getter oncuechange - getter oncut - getter ondblclick - getter ondrag - getter ondragend - getter ondragenter - getter ondragleave - getter ondragover - getter ondragstart - getter ondrop - getter ondurationchange - getter onemptied - getter onended - getter onerror - getter onfocus - getter ongotpointercapture - getter oninput - getter oninvalid - getter onkeydown - getter onkeypress - getter onkeyup - getter onload - getter onloadeddata - getter onloadedmetadata - getter onloadstart - getter onlostpointercapture - getter onmousedown - getter onmouseenter - getter onmouseleave - getter onmousemove - getter onmouseout - getter onmouseover - getter onmouseup - getter onmousewheel - getter onpaste - getter onpause - getter onplay - getter onplaying - getter onpointercancel - getter onpointerdown - getter onpointerenter - getter onpointerleave - getter onpointerlockchange - getter onpointerlockerror - getter onpointermove - getter onpointerout - getter onpointerover - getter onpointerup - getter onprogress - getter onratechange - getter onreadystatechange - getter onreset - getter onresize - getter onscroll - getter onsearch - getter onseeked - getter onseeking - getter onselect - getter onselectionchange - getter onselectstart - getter onshow - getter onstalled - getter onsubmit - getter onsuspend - getter ontimeupdate - getter ontoggle - getter ontouchcancel - getter ontouchend - getter ontouchmove - getter ontouchstart - getter onvolumechange - getter onwaiting - getter onwebkitfullscreenchange - getter onwebkitfullscreenerror - getter onwheel - getter origin - getter plugins - getter pointerLockElement - getter preferredStylesheetSet - getter readyState - getter referrer - getter rootElement - getter scripts - getter scrollingElement - getter selectedStylesheetSet - getter styleSheets - getter title - getter visibilityState - getter webkitCurrentFullScreenElement - getter webkitFullscreenElement - getter webkitFullscreenEnabled - getter webkitHidden - getter webkitIsFullScreen - getter webkitVisibilityState - getter xmlEncoding - getter xmlStandalone - getter xmlVersion - method adoptNode - method append - method caretRangeFromPoint - method close - method constructor - method createAttribute - method createAttributeNS - method createCDATASection - method createComment - method createDocumentFragment - method createElement - method createElementNS - method createEvent - method createExpression - method createNSResolver - method createNodeIterator - method createProcessingInstruction - method createRange - method createTextNode - method createTouch - method createTouchList - method createTreeWalker - method elementFromPoint - method elementsFromPoint - method evaluate - method execCommand - method exitPointerLock - method getElementById - method getElementsByClassName - method getElementsByName - method getElementsByTagName - method getElementsByTagNameNS - method getSelection - method hasFocus - method importNode - method open - method prepend - method queryCommandEnabled - method queryCommandIndeterm - method queryCommandState - method queryCommandSupported - method queryCommandValue - method querySelector - method querySelectorAll - method registerElement - method webkitCancelFullScreen - method webkitExitFullscreen - method write - method writeln - setter body - setter cookie - setter designMode - setter dir - setter domain - setter onabort - setter onauxclick - setter onbeforecopy - setter onbeforecut - setter onbeforepaste - setter onblur - setter oncancel - setter oncanplay - setter oncanplaythrough - setter onchange - setter onclick - setter onclose - setter oncontextmenu - setter oncopy - setter oncuechange - setter oncut - setter ondblclick - setter ondrag - setter ondragend - setter ondragenter - setter ondragleave - setter ondragover - setter ondragstart - setter ondrop - setter ondurationchange - setter onemptied - setter onended - setter onerror - setter onfocus - setter ongotpointercapture - setter oninput - setter oninvalid - setter onkeydown - setter onkeypress - setter onkeyup - setter onload - setter onloadeddata - setter onloadedmetadata - setter onloadstart - setter onlostpointercapture - setter onmousedown - setter onmouseenter - setter onmouseleave - setter onmousemove - setter onmouseout - setter onmouseover - setter onmouseup - setter onmousewheel - setter onpaste - setter onpause - setter onplay - setter onplaying - setter onpointercancel - setter onpointerdown - setter onpointerenter - setter onpointerleave - setter onpointerlockchange - setter onpointerlockerror - setter onpointermove - setter onpointerout - setter onpointerover - setter onpointerup - setter onprogress - setter onratechange - setter onreadystatechange - setter onreset - setter onresize - setter onscroll - setter onsearch - setter onseeked - setter onseeking - setter onselect - setter onselectionchange - setter onselectstart - setter onshow - setter onstalled - setter onsubmit - setter onsuspend - setter ontimeupdate - setter ontoggle - setter ontouchcancel - setter ontouchend - setter ontouchmove - setter ontouchstart - setter onvolumechange - setter onwaiting - setter onwebkitfullscreenchange - setter onwebkitfullscreenerror - setter onwheel - setter selectedStylesheetSet - setter title - setter xmlStandalone - setter xmlVersion -interface DocumentFragment : Node - attribute @@toStringTag - attribute @@unscopables - getter childElementCount - getter children - getter firstElementChild - getter lastElementChild - method append - method constructor - method getElementById - method prepend - method querySelector - method querySelectorAll -interface DocumentType : Node - attribute @@toStringTag - attribute @@unscopables - getter name - getter publicId - getter systemId - method after - method before - method constructor - method remove - method replaceWith -interface DragEvent : MouseEvent - attribute @@toStringTag - getter dataTransfer - method constructor -interface DynamicsCompressorNode : AudioNode - attribute @@toStringTag - getter attack - getter knee - getter ratio - getter reduction - getter release - getter threshold - method constructor -interface Element : Node - attribute @@toStringTag - attribute @@unscopables - getter assignedSlot - getter attributes - getter childElementCount - getter children - getter classList - getter className - getter clientHeight - getter clientLeft - getter clientTop - getter clientWidth - getter firstElementChild - getter id - getter innerHTML - getter lastElementChild - getter localName - getter namespaceURI - getter nextElementSibling - getter onbeforecopy - getter onbeforecut - getter onbeforepaste - getter oncopy - getter oncut - getter onpaste - getter onsearch - getter onselectstart - getter onwebkitfullscreenchange - getter onwebkitfullscreenerror - getter onwheel - getter outerHTML - getter prefix - getter previousElementSibling - getter scrollHeight - getter scrollLeft - getter scrollTop - getter scrollWidth - getter shadowRoot - getter slot - getter tagName - method after - method animate - method append - method attachShadow - method before - method closest - method constructor - method createShadowRoot - method getAttribute - method getAttributeNS - method getAttributeNode - method getAttributeNodeNS - method getBoundingClientRect - method getClientRects - method getDestinationInsertionPoints - method getElementsByClassName - method getElementsByTagName - method getElementsByTagNameNS - method hasAttribute - method hasAttributeNS - method hasAttributes - method hasPointerCapture - method insertAdjacentElement - method insertAdjacentHTML - method insertAdjacentText - method matches - method prepend - method querySelector - method querySelectorAll - method releasePointerCapture - method remove - method removeAttribute - method removeAttributeNS - method removeAttributeNode - method replaceWith - method requestPointerLock - method scrollIntoView - method scrollIntoViewIfNeeded - method setAttribute - method setAttributeNS - method setAttributeNode - method setAttributeNodeNS - method setPointerCapture - method webkitMatchesSelector - method webkitRequestFullScreen - method webkitRequestFullscreen - setter classList - setter className - setter id - setter innerHTML - setter onbeforecopy - setter onbeforecut - setter onbeforepaste - setter oncopy - setter oncut - setter onpaste - setter onsearch - setter onselectstart - setter onwebkitfullscreenchange - setter onwebkitfullscreenerror - setter onwheel - setter outerHTML - setter scrollLeft - setter scrollTop - setter slot -interface ErrorEvent : Event - attribute @@toStringTag - getter colno - getter error - getter filename - getter lineno - getter message - method constructor -interface Event - attribute @@toStringTag - attribute AT_TARGET - attribute BUBBLING_PHASE - attribute CAPTURING_PHASE - attribute NONE - getter bubbles - getter cancelBubble - getter cancelable - getter composed - getter currentTarget - getter defaultPrevented - getter eventPhase - getter path - getter returnValue - getter srcElement - getter target - getter timeStamp - getter type - method composedPath - method constructor - method initEvent - method preventDefault - method stopImmediatePropagation - method stopPropagation - setter cancelBubble - setter returnValue -interface EventSource : EventTarget - attribute @@toStringTag - attribute CLOSED - attribute CONNECTING - attribute OPEN - getter onerror - getter onmessage - getter onopen - getter readyState - getter url - getter withCredentials - method close - method constructor - setter onerror - setter onmessage - setter onopen -interface EventTarget - attribute @@toStringTag - method addEventListener - method constructor - method dispatchEvent - method removeEventListener -interface FederatedCredential : SiteBoundCredential - attribute @@toStringTag - getter protocol - getter provider - method constructor -interface File : Blob - attribute @@toStringTag - getter lastModified - getter lastModifiedDate - getter name - getter webkitRelativePath - method constructor -interface FileList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item -interface FileReader : EventTarget - attribute @@toStringTag - attribute DONE - attribute EMPTY - attribute LOADING - getter error - getter onabort - getter onerror - getter onload - getter onloadend - getter onloadstart - getter onprogress - getter readyState - getter result - method abort - method constructor - method readAsArrayBuffer - method readAsBinaryString - method readAsDataURL - method readAsText - setter onabort - setter onerror - setter onload - setter onloadend - setter onloadstart - setter onprogress -interface FocusEvent : UIEvent - attribute @@toStringTag - getter relatedTarget - method constructor -interface FontFace - attribute @@toStringTag - getter family - getter featureSettings - getter loaded - getter status - getter stretch - getter style - getter unicodeRange - getter variant - getter weight - method constructor - method load - setter family - setter featureSettings - setter stretch - setter style - setter unicodeRange - setter variant - setter weight -interface FontFaceSetLoadEvent : Event - attribute @@toStringTag - getter fontfaces - method constructor -interface FormData - attribute @@toStringTag - method @@iterator - method append - method constructor - method delete - method entries - method forEach - method get - method getAll - method has - method keys - method set - method values -interface GainNode : AudioNode - attribute @@toStringTag - getter gain - method constructor -interface Gamepad - attribute @@toStringTag - getter axes - getter buttons - getter connected - getter id - getter index - getter mapping - getter timestamp - method constructor -interface GamepadButton - attribute @@toStringTag - getter pressed - getter value - method constructor -interface GamepadEvent : Event - attribute @@toStringTag - getter gamepad - method constructor -interface HTMLAllCollection - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item - method namedItem -interface HTMLAnchorElement : HTMLElement - attribute @@toStringTag - getter charset - getter coords - getter download - getter hash - getter host - getter hostname - getter href - getter hreflang - getter name - getter origin - getter password - getter pathname - getter ping - getter port - getter protocol - getter referrerPolicy - getter rel - getter rev - getter search - getter shape - getter target - getter text - getter type - getter username - method constructor - method toString - setter charset - setter coords - setter download - setter hash - setter host - setter hostname - setter href - setter hreflang - setter name - setter password - setter pathname - setter ping - setter port - setter protocol - setter referrerPolicy - setter rel - setter rev - setter search - setter shape - setter target - setter text - setter type - setter username -interface HTMLAreaElement : HTMLElement - attribute @@toStringTag - getter alt - getter coords - getter download - getter hash - getter host - getter hostname - getter href - getter noHref - getter origin - getter password - getter pathname - getter ping - getter port - getter protocol - getter referrerPolicy - getter rel - getter search - getter shape - getter target - getter username - method constructor - method toString - setter alt - setter coords - setter download - setter hash - setter host - setter hostname - setter href - setter noHref - setter password - setter pathname - setter ping - setter port - setter protocol - setter referrerPolicy - setter rel - setter search - setter shape - setter target - setter username -interface HTMLAudioElement : HTMLMediaElement - attribute @@toStringTag - method constructor -interface HTMLBRElement : HTMLElement - attribute @@toStringTag - getter clear - method constructor - setter clear -interface HTMLBaseElement : HTMLElement - attribute @@toStringTag - getter href - getter target - method constructor - setter href - setter target -interface HTMLBodyElement : HTMLElement - attribute @@toStringTag - getter aLink - getter background - getter bgColor - getter link - getter onbeforeunload - getter onblur - getter onerror - getter onfocus - getter onhashchange - getter onlanguagechange - getter onload - getter onmessage - getter onoffline - getter ononline - getter onpagehide - getter onpageshow - getter onpopstate - getter onrejectionhandled - getter onresize - getter onscroll - getter onstorage - getter onunhandledrejection - getter onunload - getter text - getter vLink - method constructor - setter aLink - setter background - setter bgColor - setter link - setter onbeforeunload - setter onblur - setter onerror - setter onfocus - setter onhashchange - setter onlanguagechange - setter onload - setter onmessage - setter onoffline - setter ononline - setter onpagehide - setter onpageshow - setter onpopstate - setter onrejectionhandled - setter onresize - setter onscroll - setter onstorage - setter onunhandledrejection - setter onunload - setter text - setter vLink -interface HTMLButtonElement : HTMLElement - attribute @@toStringTag - getter autofocus - getter disabled - getter form - getter formAction - getter formEnctype - getter formMethod - getter formNoValidate - getter formTarget - getter labels - getter name - getter type - getter validationMessage - getter validity - getter value - getter willValidate - method checkValidity - method constructor - method reportValidity - method setCustomValidity - setter autofocus - setter disabled - setter formAction - setter formEnctype - setter formMethod - setter formNoValidate - setter formTarget - setter name - setter type - setter value -interface HTMLCanvasElement : HTMLElement - attribute @@toStringTag - getter height - getter width - method captureStream - method constructor - method getContext - method toBlob - method toDataURL - setter height - setter width -interface HTMLCollection - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item - method namedItem -interface HTMLContentElement : HTMLElement - attribute @@toStringTag - getter select - method constructor - method getDistributedNodes - setter select -interface HTMLDListElement : HTMLElement - attribute @@toStringTag - getter compact - method constructor - setter compact -interface HTMLDataListElement : HTMLElement - attribute @@toStringTag - getter options - method constructor -interface HTMLDetailsElement : HTMLElement - attribute @@toStringTag - getter open - method constructor - setter open -interface HTMLDialogElement : HTMLElement - attribute @@toStringTag - getter open - getter returnValue - method close - method constructor - method show - method showModal - setter open - setter returnValue -interface HTMLDirectoryElement : HTMLElement - attribute @@toStringTag - getter compact - method constructor - setter compact -interface HTMLDivElement : HTMLElement - attribute @@toStringTag - getter align - method constructor - setter align -interface HTMLDocument : Document - attribute @@toStringTag - getter alinkColor - getter all - getter bgColor - getter fgColor - getter linkColor - getter vlinkColor - method captureEvents - method clear - method constructor - method releaseEvents - setter alinkColor - setter all - setter bgColor - setter fgColor - setter linkColor - setter vlinkColor -interface HTMLElement : Element - attribute @@toStringTag - getter accessKey - getter contentEditable - getter dataset - getter dir - getter draggable - getter hidden - getter innerText - getter isContentEditable - getter lang - getter offsetHeight - getter offsetLeft - getter offsetParent - getter offsetTop - getter offsetWidth - getter onabort - getter onauxclick - getter onblur - getter oncancel - getter oncanplay - getter oncanplaythrough - getter onchange - getter onclick - getter onclose - getter oncontextmenu - getter oncuechange - getter ondblclick - getter ondrag - getter ondragend - getter ondragenter - getter ondragleave - getter ondragover - getter ondragstart - getter ondrop - getter ondurationchange - getter onemptied - getter onended - getter onerror - getter onfocus - getter ongotpointercapture - getter oninput - getter oninvalid - getter onkeydown - getter onkeypress - getter onkeyup - getter onload - getter onloadeddata - getter onloadedmetadata - getter onloadstart - getter onlostpointercapture - getter onmousedown - getter onmouseenter - getter onmouseleave - getter onmousemove - getter onmouseout - getter onmouseover - getter onmouseup - getter onmousewheel - getter onpause - getter onplay - getter onplaying - getter onpointercancel - getter onpointerdown - getter onpointerenter - getter onpointerleave - getter onpointermove - getter onpointerout - getter onpointerover - getter onpointerup - getter onprogress - getter onratechange - getter onreset - getter onresize - getter onscroll - getter onseeked - getter onseeking - getter onselect - getter onshow - getter onstalled - getter onsubmit - getter onsuspend - getter ontimeupdate - getter ontoggle - getter ontouchcancel - getter ontouchend - getter ontouchmove - getter ontouchstart - getter onvolumechange - getter onwaiting - getter outerText - getter spellcheck - getter style - getter tabIndex - getter title - getter translate - getter webkitdropzone - method blur - method click - method constructor - method focus - setter accessKey - setter contentEditable - setter dir - setter draggable - setter hidden - setter innerText - setter lang - setter onabort - setter onauxclick - setter onblur - setter oncancel - setter oncanplay - setter oncanplaythrough - setter onchange - setter onclick - setter onclose - setter oncontextmenu - setter oncuechange - setter ondblclick - setter ondrag - setter ondragend - setter ondragenter - setter ondragleave - setter ondragover - setter ondragstart - setter ondrop - setter ondurationchange - setter onemptied - setter onended - setter onerror - setter onfocus - setter ongotpointercapture - setter oninput - setter oninvalid - setter onkeydown - setter onkeypress - setter onkeyup - setter onload - setter onloadeddata - setter onloadedmetadata - setter onloadstart - setter onlostpointercapture - setter onmousedown - setter onmouseenter - setter onmouseleave - setter onmousemove - setter onmouseout - setter onmouseover - setter onmouseup - setter onmousewheel - setter onpause - setter onplay - setter onplaying - setter onpointercancel - setter onpointerdown - setter onpointerenter - setter onpointerleave - setter onpointermove - setter onpointerout - setter onpointerover - setter onpointerup - setter onprogress - setter onratechange - setter onreset - setter onresize - setter onscroll - setter onseeked - setter onseeking - setter onselect - setter onshow - setter onstalled - setter onsubmit - setter onsuspend - setter ontimeupdate - setter ontoggle - setter ontouchcancel - setter ontouchend - setter ontouchmove - setter ontouchstart - setter onvolumechange - setter onwaiting - setter outerText - setter spellcheck - setter style - setter tabIndex - setter title - setter translate - setter webkitdropzone -interface HTMLEmbedElement : HTMLElement - attribute @@toStringTag - getter align - getter height - getter name - getter src - getter type - getter width - method constructor - method getSVGDocument - setter align - setter height - setter name - setter src - setter type - setter width -interface HTMLFieldSetElement : HTMLElement - attribute @@toStringTag - getter disabled - getter elements - getter form - getter name - getter type - getter validationMessage - getter validity - getter willValidate - method checkValidity - method constructor - method reportValidity - method setCustomValidity - setter disabled - setter name -interface HTMLFontElement : HTMLElement - attribute @@toStringTag - getter color - getter face - getter size - method constructor - setter color - setter face - setter size -interface HTMLFormControlsCollection : HTMLCollection - attribute @@toStringTag - method constructor - method namedItem -interface HTMLFormElement : HTMLElement - attribute @@toStringTag - getter acceptCharset - getter action - getter autocomplete - getter elements - getter encoding - getter enctype - getter length - getter method - getter name - getter noValidate - getter target - method @@iterator - method checkValidity - method constructor - method reportValidity - method reset - method submit - setter acceptCharset - setter action - setter autocomplete - setter encoding - setter enctype - setter method - setter name - setter noValidate - setter target -interface HTMLFrameElement : HTMLElement - attribute @@toStringTag - getter contentDocument - getter contentWindow - getter frameBorder - getter longDesc - getter marginHeight - getter marginWidth - getter name - getter noResize - getter scrolling - getter src - method constructor - setter frameBorder - setter longDesc - setter marginHeight - setter marginWidth - setter name - setter noResize - setter scrolling - setter src -interface HTMLFrameSetElement : HTMLElement - attribute @@toStringTag - getter cols - getter onbeforeunload - getter onblur - getter onerror - getter onfocus - getter onhashchange - getter onlanguagechange - getter onload - getter onmessage - getter onoffline - getter ononline - getter onpagehide - getter onpageshow - getter onpopstate - getter onrejectionhandled - getter onresize - getter onscroll - getter onstorage - getter onunhandledrejection - getter onunload - getter rows - method constructor - setter cols - setter onbeforeunload - setter onblur - setter onerror - setter onfocus - setter onhashchange - setter onlanguagechange - setter onload - setter onmessage - setter onoffline - setter ononline - setter onpagehide - setter onpageshow - setter onpopstate - setter onrejectionhandled - setter onresize - setter onscroll - setter onstorage - setter onunhandledrejection - setter onunload - setter rows -interface HTMLHRElement : HTMLElement - attribute @@toStringTag - getter align - getter color - getter noShade - getter size - getter width - method constructor - setter align - setter color - setter noShade - setter size - setter width -interface HTMLHeadElement : HTMLElement - attribute @@toStringTag - method constructor -interface HTMLHeadingElement : HTMLElement - attribute @@toStringTag - getter align - method constructor - setter align -interface HTMLHtmlElement : HTMLElement - attribute @@toStringTag - getter version - method constructor - setter version -interface HTMLIFrameElement : HTMLElement - attribute @@toStringTag - getter align - getter allowFullscreen - getter contentDocument - getter contentWindow - getter frameBorder - getter height - getter longDesc - getter marginHeight - getter marginWidth - getter name - getter referrerPolicy - getter sandbox - getter scrolling - getter src - getter srcdoc - getter width - method constructor - method getSVGDocument - setter align - setter allowFullscreen - setter frameBorder - setter height - setter longDesc - setter marginHeight - setter marginWidth - setter name - setter referrerPolicy - setter sandbox - setter scrolling - setter src - setter srcdoc - setter width -interface HTMLImageElement : HTMLElement - attribute @@toStringTag - getter align - getter alt - getter border - getter complete - getter crossOrigin - getter currentSrc - getter height - getter hspace - getter isMap - getter longDesc - getter lowsrc - getter name - getter naturalHeight - getter naturalWidth - getter referrerPolicy - getter sizes - getter src - getter srcset - getter useMap - getter vspace - getter width - getter x - getter y - method constructor - setter align - setter alt - setter border - setter crossOrigin - setter height - setter hspace - setter isMap - setter longDesc - setter lowsrc - setter name - setter referrerPolicy - setter sizes - setter src - setter srcset - setter useMap - setter vspace - setter width -interface HTMLInputElement : HTMLElement - attribute @@toStringTag - getter accept - getter align - getter alt - getter autocapitalize - getter autocomplete - getter autofocus - getter checked - getter defaultChecked - getter defaultValue - getter dirName - getter disabled - getter files - getter form - getter formAction - getter formEnctype - getter formMethod - getter formNoValidate - getter formTarget - getter height - getter incremental - getter indeterminate - getter labels - getter list - getter max - getter maxLength - getter min - getter minLength - getter multiple - getter name - getter pattern - getter placeholder - getter readOnly - getter required - getter selectionDirection - getter selectionEnd - getter selectionStart - getter size - getter src - getter step - getter type - getter useMap - getter validationMessage - getter validity - getter value - getter valueAsDate - getter valueAsNumber - getter webkitEntries - getter webkitdirectory - getter width - getter willValidate - method checkValidity - method constructor - method reportValidity - method select - method setCustomValidity - method setRangeText - method setSelectionRange - method stepDown - method stepUp - setter accept - setter align - setter alt - setter autocapitalize - setter autocomplete - setter autofocus - setter checked - setter defaultChecked - setter defaultValue - setter dirName - setter disabled - setter files - setter formAction - setter formEnctype - setter formMethod - setter formNoValidate - setter formTarget - setter height - setter incremental - setter indeterminate - setter max - setter maxLength - setter min - setter minLength - setter multiple - setter name - setter pattern - setter placeholder - setter readOnly - setter required - setter selectionDirection - setter selectionEnd - setter selectionStart - setter size - setter src - setter step - setter type - setter useMap - setter value - setter valueAsDate - setter valueAsNumber - setter webkitdirectory - setter width -interface HTMLLIElement : HTMLElement - attribute @@toStringTag - getter type - getter value - method constructor - setter type - setter value -interface HTMLLabelElement : HTMLElement - attribute @@toStringTag - getter control - getter form - getter htmlFor - method constructor - setter htmlFor -interface HTMLLegendElement : HTMLElement - attribute @@toStringTag - getter align - getter form - method constructor - setter align -interface HTMLLinkElement : HTMLElement - attribute @@toStringTag - getter as - getter charset - getter crossOrigin - getter disabled - getter href - getter hreflang - getter import - getter integrity - getter media - getter rel - getter relList - getter rev - getter sheet - getter sizes - getter target - getter type - method constructor - setter as - setter charset - setter crossOrigin - setter disabled - setter href - setter hreflang - setter integrity - setter media - setter rel - setter relList - setter rev - setter sizes - setter target - setter type -interface HTMLMapElement : HTMLElement - attribute @@toStringTag - getter areas - getter name - method constructor - setter name -interface HTMLMarqueeElement : HTMLElement - attribute @@toStringTag - getter behavior - getter bgColor - getter direction - getter height - getter hspace - getter loop - getter scrollAmount - getter scrollDelay - getter trueSpeed - getter vspace - getter width - method constructor - method start - method stop - setter behavior - setter bgColor - setter direction - setter height - setter hspace - setter loop - setter scrollAmount - setter scrollDelay - setter trueSpeed - setter vspace - setter width -interface HTMLMediaElement : HTMLElement - attribute @@toStringTag - attribute HAVE_CURRENT_DATA - attribute HAVE_ENOUGH_DATA - attribute HAVE_FUTURE_DATA - attribute HAVE_METADATA - attribute HAVE_NOTHING - attribute NETWORK_EMPTY - attribute NETWORK_IDLE - attribute NETWORK_LOADING - attribute NETWORK_NO_SOURCE - getter autoplay - getter buffered - getter controls - getter crossOrigin - getter currentSrc - getter currentTime - getter defaultMuted - getter defaultPlaybackRate - getter disableRemotePlayback - getter duration - getter ended - getter error - getter loop - getter mediaKeys - getter muted - getter networkState - getter onencrypted - getter onwaitingforkey - getter paused - getter playbackRate - getter played - getter preload - getter readyState - getter remote - getter seekable - getter seeking - getter sinkId - getter src - getter srcObject - getter textTracks - getter volume - getter webkitAudioDecodedByteCount - getter webkitVideoDecodedByteCount - method addTextTrack - method canPlayType - method constructor - method load - method pause - method play - method setMediaKeys - method setSinkId - setter autoplay - setter controls - setter crossOrigin - setter currentTime - setter defaultMuted - setter defaultPlaybackRate - setter disableRemotePlayback - setter loop - setter muted - setter onencrypted - setter onwaitingforkey - setter playbackRate - setter preload - setter src - setter srcObject - setter volume -interface HTMLMenuElement : HTMLElement - attribute @@toStringTag - getter compact - method constructor - setter compact -interface HTMLMetaElement : HTMLElement - attribute @@toStringTag - getter content - getter httpEquiv - getter name - getter scheme - method constructor - setter content - setter httpEquiv - setter name - setter scheme -interface HTMLMeterElement : HTMLElement - attribute @@toStringTag - getter high - getter labels - getter low - getter max - getter min - getter optimum - getter value - method constructor - setter high - setter low - setter max - setter min - setter optimum - setter value -interface HTMLModElement : HTMLElement - attribute @@toStringTag - getter cite - getter dateTime - method constructor - setter cite - setter dateTime -interface HTMLOListElement : HTMLElement - attribute @@toStringTag - getter compact - getter reversed - getter start - getter type - method constructor - setter compact - setter reversed - setter start - setter type -interface HTMLObjectElement : HTMLElement - attribute @@toStringTag - getter align - getter archive - getter border - getter code - getter codeBase - getter codeType - getter contentDocument - getter contentWindow - getter data - getter declare - getter form - getter height - getter hspace - getter name - getter standby - getter type - getter useMap - getter validationMessage - getter validity - getter vspace - getter width - getter willValidate - method checkValidity - method constructor - method getSVGDocument - method reportValidity - method setCustomValidity - setter align - setter archive - setter border - setter code - setter codeBase - setter codeType - setter data - setter declare - setter height - setter hspace - setter name - setter standby - setter type - setter useMap - setter vspace - setter width -interface HTMLOptGroupElement : HTMLElement - attribute @@toStringTag - getter disabled - getter label - method constructor - setter disabled - setter label -interface HTMLOptionElement : HTMLElement - attribute @@toStringTag - getter defaultSelected - getter disabled - getter form - getter index - getter label - getter selected - getter text - getter value - method constructor - setter defaultSelected - setter disabled - setter label - setter selected - setter text - setter value -interface HTMLOptionsCollection : HTMLCollection - attribute @@toStringTag - getter length - getter selectedIndex - method @@iterator - method add - method constructor - method namedItem - method remove - setter length - setter selectedIndex -interface HTMLOutputElement : HTMLElement - attribute @@toStringTag - getter defaultValue - getter form - getter htmlFor - getter labels - getter name - getter type - getter validationMessage - getter validity - getter value - getter willValidate - method checkValidity - method constructor - method reportValidity - method setCustomValidity - setter defaultValue - setter htmlFor - setter name - setter value -interface HTMLParagraphElement : HTMLElement - attribute @@toStringTag - getter align - method constructor - setter align -interface HTMLParamElement : HTMLElement - attribute @@toStringTag - getter name - getter type - getter value - getter valueType - method constructor - setter name - setter type - setter value - setter valueType -interface HTMLPictureElement : HTMLElement - attribute @@toStringTag - method constructor -interface HTMLPreElement : HTMLElement - attribute @@toStringTag - getter width - method constructor - setter width -interface HTMLProgressElement : HTMLElement - attribute @@toStringTag - getter labels - getter max - getter position - getter value - method constructor - setter max - setter value -interface HTMLQuoteElement : HTMLElement - attribute @@toStringTag - getter cite - method constructor - setter cite -interface HTMLScriptElement : HTMLElement - attribute @@toStringTag - getter async - getter charset - getter crossOrigin - getter defer - getter event - getter htmlFor - getter integrity - getter src - getter text - getter type - method constructor - setter async - setter charset - setter crossOrigin - setter defer - setter event - setter htmlFor - setter integrity - setter src - setter text - setter type -interface HTMLSelectElement : HTMLElement - attribute @@toStringTag - getter autofocus - getter disabled - getter form - getter labels - getter length - getter multiple - getter name - getter options - getter required - getter selectedIndex - getter selectedOptions - getter size - getter type - getter validationMessage - getter validity - getter value - getter willValidate - method @@iterator - method add - method checkValidity - method constructor - method item - method namedItem - method remove - method reportValidity - method setCustomValidity - setter autofocus - setter disabled - setter length - setter multiple - setter name - setter required - setter selectedIndex - setter size - setter value -interface HTMLShadowElement : HTMLElement - attribute @@toStringTag - method constructor - method getDistributedNodes -interface HTMLSlotElement : HTMLElement - attribute @@toStringTag - getter name - method assignedNodes - method constructor - setter name -interface HTMLSourceElement : HTMLElement - attribute @@toStringTag - getter media - getter sizes - getter src - getter srcset - getter type - method constructor - setter media - setter sizes - setter src - setter srcset - setter type -interface HTMLSpanElement : HTMLElement - attribute @@toStringTag - method constructor -interface HTMLStyleElement : HTMLElement - attribute @@toStringTag - getter disabled - getter media - getter sheet - getter type - method constructor - setter disabled - setter media - setter type -interface HTMLTableCaptionElement : HTMLElement - attribute @@toStringTag - getter align - method constructor - setter align -interface HTMLTableCellElement : HTMLElement - attribute @@toStringTag - getter abbr - getter align - getter axis - getter bgColor - getter cellIndex - getter ch - getter chOff - getter colSpan - getter headers - getter height - getter noWrap - getter rowSpan - getter scope - getter vAlign - getter width - method constructor - setter abbr - setter align - setter axis - setter bgColor - setter ch - setter chOff - setter colSpan - setter headers - setter height - setter noWrap - setter rowSpan - setter scope - setter vAlign - setter width -interface HTMLTableColElement : HTMLElement - attribute @@toStringTag - getter align - getter ch - getter chOff - getter span - getter vAlign - getter width - method constructor - setter align - setter ch - setter chOff - setter span - setter vAlign - setter width -interface HTMLTableElement : HTMLElement - attribute @@toStringTag - getter align - getter bgColor - getter border - getter caption - getter cellPadding - getter cellSpacing - getter frame - getter rows - getter rules - getter summary - getter tBodies - getter tFoot - getter tHead - getter width - method constructor - method createCaption - method createTBody - method createTFoot - method createTHead - method deleteCaption - method deleteRow - method deleteTFoot - method deleteTHead - method insertRow - setter align - setter bgColor - setter border - setter caption - setter cellPadding - setter cellSpacing - setter frame - setter rules - setter summary - setter tFoot - setter tHead - setter width -interface HTMLTableRowElement : HTMLElement - attribute @@toStringTag - getter align - getter bgColor - getter cells - getter ch - getter chOff - getter rowIndex - getter sectionRowIndex - getter vAlign - method constructor - method deleteCell - method insertCell - setter align - setter bgColor - setter ch - setter chOff - setter vAlign -interface HTMLTableSectionElement : HTMLElement - attribute @@toStringTag - getter align - getter ch - getter chOff - getter rows - getter vAlign - method constructor - method deleteRow - method insertRow - setter align - setter ch - setter chOff - setter vAlign -interface HTMLTemplateElement : HTMLElement - attribute @@toStringTag - getter content - method constructor -interface HTMLTextAreaElement : HTMLElement - attribute @@toStringTag - getter autocapitalize - getter autofocus - getter cols - getter defaultValue - getter dirName - getter disabled - getter form - getter labels - getter maxLength - getter minLength - getter name - getter placeholder - getter readOnly - getter required - getter rows - getter selectionDirection - getter selectionEnd - getter selectionStart - getter textLength - getter type - getter validationMessage - getter validity - getter value - getter willValidate - getter wrap - method checkValidity - method constructor - method reportValidity - method select - method setCustomValidity - method setRangeText - method setSelectionRange - setter autocapitalize - setter autofocus - setter cols - setter defaultValue - setter dirName - setter disabled - setter maxLength - setter minLength - setter name - setter placeholder - setter readOnly - setter required - setter rows - setter selectionDirection - setter selectionEnd - setter selectionStart - setter value - setter wrap -interface HTMLTitleElement : HTMLElement - attribute @@toStringTag - getter text - method constructor - setter text -interface HTMLTrackElement : HTMLElement - attribute @@toStringTag - attribute ERROR - attribute LOADED - attribute LOADING - attribute NONE - getter default - getter kind - getter label - getter readyState - getter src - getter srclang - getter track - method constructor - setter default - setter kind - setter label - setter src - setter srclang -interface HTMLUListElement : HTMLElement - attribute @@toStringTag - getter compact - getter type - method constructor - setter compact - setter type -interface HTMLUnknownElement : HTMLElement - attribute @@toStringTag - method constructor -interface HTMLVideoElement : HTMLMediaElement - attribute @@toStringTag - getter height - getter poster - getter videoHeight - getter videoWidth - getter webkitDecodedFrameCount - getter webkitDisplayingFullscreen - getter webkitDroppedFrameCount - getter webkitSupportsFullscreen - getter width - method constructor - method webkitEnterFullScreen - method webkitEnterFullscreen - method webkitExitFullScreen - method webkitExitFullscreen - setter height - setter poster - setter width -interface HashChangeEvent : Event - attribute @@toStringTag - getter newURL - getter oldURL - method constructor -interface Headers - attribute @@toStringTag - method @@iterator - method append - method constructor - method delete - method entries - method forEach - method get - method getAll - method has - method keys - method set - method values -interface History - attribute @@toStringTag - getter length - getter scrollRestoration - getter state - method back - method constructor - method forward - method go - method pushState - method replaceState - setter scrollRestoration -interface IDBCursor - attribute @@toStringTag - getter direction - getter key - getter primaryKey - getter source - method advance - method constructor - method continue - method delete - method update -interface IDBCursorWithValue : IDBCursor - attribute @@toStringTag - getter value - method constructor -interface IDBDatabase : EventTarget - attribute @@toStringTag - getter name - getter objectStoreNames - getter onabort - getter onclose - getter onerror - getter onversionchange - getter version - method close - method constructor - method createObjectStore - method deleteObjectStore - method transaction - setter onabort - setter onclose - setter onerror - setter onversionchange -interface IDBFactory - attribute @@toStringTag - method cmp - method constructor - method deleteDatabase - method open - method webkitGetDatabaseNames -interface IDBIndex - attribute @@toStringTag - getter keyPath - getter multiEntry - getter name - getter objectStore - getter unique - method constructor - method count - method get - method getAll - method getAllKeys - method getKey - method openCursor - method openKeyCursor - setter name -interface IDBKeyRange - static method bound - static method lowerBound - static method only - static method upperBound - attribute @@toStringTag - getter lower - getter lowerOpen - getter upper - getter upperOpen - method constructor - method includes -interface IDBObjectStore - attribute @@toStringTag - getter autoIncrement - getter indexNames - getter keyPath - getter name - getter transaction - method add - method clear - method constructor - method count - method createIndex - method delete - method deleteIndex - method get - method getAll - method getAllKeys - method index - method openCursor - method openKeyCursor - method put - setter name -interface IDBOpenDBRequest : IDBRequest - attribute @@toStringTag - getter onblocked - getter onupgradeneeded - method constructor - setter onblocked - setter onupgradeneeded -interface IDBRequest : EventTarget - attribute @@toStringTag - getter error - getter onerror - getter onsuccess - getter readyState - getter result - getter source - getter transaction - method constructor - setter onerror - setter onsuccess -interface IDBTransaction : EventTarget - attribute @@toStringTag - getter db - getter error - getter mode - getter objectStoreNames - getter onabort - getter oncomplete - getter onerror - method abort - method constructor - method objectStore - setter onabort - setter oncomplete - setter onerror -interface IDBVersionChangeEvent : Event - attribute @@toStringTag - getter dataLoss - getter dataLossMessage - getter newVersion - getter oldVersion - method constructor -interface IIRFilterNode : AudioNode - attribute @@toStringTag - method constructor - method getFrequencyResponse -interface IdleDeadline - attribute @@toStringTag - getter didTimeout - method constructor - method timeRemaining -interface Image - method constructor -interface ImageBitmap - attribute @@toStringTag - getter height - getter width - method close - method constructor -interface ImageBitmapRenderingContext - attribute @@toStringTag - getter canvas - method constructor - method transferFromImageBitmap -interface ImageData - attribute @@toStringTag - getter colorSpace - getter data - getter height - getter width - method constructor -interface InputDeviceCapabilities - attribute @@toStringTag - getter firesTouchEvents - method constructor -interface IntersectionObserver - attribute @@toStringTag - getter root - getter rootMargin - getter thresholds - method constructor - method disconnect - method observe - method takeRecords - method unobserve -interface IntersectionObserverEntry - attribute @@toStringTag - getter boundingClientRect - getter intersectionRatio - getter intersectionRect - getter rootBounds - getter target - getter time - method constructor -interface KeyboardEvent : UIEvent - attribute @@toStringTag - attribute DOM_KEY_LOCATION_LEFT - attribute DOM_KEY_LOCATION_NUMPAD - attribute DOM_KEY_LOCATION_RIGHT - attribute DOM_KEY_LOCATION_STANDARD - getter altKey - getter charCode - getter code - getter ctrlKey - getter isComposing - getter key - getter keyCode - getter location - getter metaKey - getter repeat - getter shiftKey - getter which - method constructor - method getModifierState - method initKeyboardEvent -interface Location - attribute @@toStringTag - method constructor -interface MIDIAccess : EventTarget - attribute @@toStringTag - getter inputs - getter onstatechange - getter outputs - getter sysexEnabled - method constructor - setter onstatechange -interface MIDIConnectionEvent : Event - attribute @@toStringTag - getter port - method constructor -interface MIDIInput : MIDIPort - attribute @@toStringTag - getter onmidimessage - method constructor - setter onmidimessage -interface MIDIInputMap - attribute @@toStringTag - getter size - method @@iterator - method constructor - method entries - method forEach - method get - method has - method keys - method values -interface MIDIMessageEvent : Event - attribute @@toStringTag - getter data - method constructor -interface MIDIOutput : MIDIPort - attribute @@toStringTag - method constructor - method send -interface MIDIOutputMap - attribute @@toStringTag - getter size - method @@iterator - method constructor - method entries - method forEach - method get - method has - method keys - method values -interface MIDIPort : EventTarget - attribute @@toStringTag - getter connection - getter id - getter manufacturer - getter name - getter onstatechange - getter state - getter type - getter version - method close - method constructor - method open - setter onstatechange -interface MediaDeviceInfo - attribute @@toStringTag - getter deviceId - getter groupId - getter kind - getter label - method constructor - method toJSON -interface MediaDevices : EventTarget - attribute @@toStringTag - getter ondevicechange - method constructor - method enumerateDevices - method getSupportedConstraints - method getUserMedia - setter ondevicechange -interface MediaElementAudioSourceNode : AudioSourceNode - attribute @@toStringTag - getter mediaElement - method constructor -interface MediaEncryptedEvent : Event - attribute @@toStringTag - getter initData - getter initDataType - method constructor -interface MediaError - attribute @@toStringTag - attribute MEDIA_ERR_ABORTED - attribute MEDIA_ERR_DECODE - attribute MEDIA_ERR_NETWORK - attribute MEDIA_ERR_SRC_NOT_SUPPORTED - getter code - method constructor -interface MediaKeyMessageEvent : Event - attribute @@toStringTag - getter message - getter messageType - method constructor -interface MediaKeySession : EventTarget - attribute @@toStringTag - getter closed - getter expiration - getter keyStatuses - getter onkeystatuseschange - getter onmessage - getter sessionId - method close - method constructor - method generateRequest - method load - method remove - method update - setter onkeystatuseschange - setter onmessage -interface MediaKeyStatusMap - attribute @@toStringTag - getter size - method @@iterator - method constructor - method entries - method forEach - method get - method has - method keys - method values -interface MediaKeySystemAccess - attribute @@toStringTag - getter keySystem - method constructor - method createMediaKeys - method getConfiguration -interface MediaKeys - attribute @@toStringTag - method constructor - method createSession - method setServerCertificate -interface MediaList - attribute @@toStringTag - getter length - getter mediaText - method @@iterator - method appendMedium - method constructor - method deleteMedium - method item - setter mediaText -interface MediaQueryList : EventTarget - attribute @@toStringTag - getter matches - getter media - getter onchange - method addListener - method constructor - method removeListener - setter onchange -interface MediaQueryListEvent : Event - attribute @@toStringTag - getter matches - getter media - method constructor -interface MediaRecorder : EventTarget - static method isTypeSupported - attribute @@toStringTag - getter audioBitsPerSecond - getter mimeType - getter ondataavailable - getter onerror - getter onpause - getter onresume - getter onstart - getter onstop - getter state - getter stream - getter videoBitsPerSecond - method constructor - method pause - method requestData - method resume - method start - method stop - setter ondataavailable - setter onerror - setter onpause - setter onresume - setter onstart - setter onstop -interface MediaSource : EventTarget - static method isTypeSupported - attribute @@toStringTag - getter activeSourceBuffers - getter duration - getter onsourceclose - getter onsourceended - getter onsourceopen - getter readyState - getter sourceBuffers - method addSourceBuffer - method constructor - method endOfStream - method removeSourceBuffer - setter duration - setter onsourceclose - setter onsourceended - setter onsourceopen -interface MediaStream : EventTarget - attribute @@toStringTag - getter active - getter id - getter onactive - getter onaddtrack - getter oninactive - getter onremovetrack - method addTrack - method clone - method constructor - method getAudioTracks - method getTrackById - method getTracks - method getVideoTracks - method removeTrack - setter onactive - setter onaddtrack - setter oninactive - setter onremovetrack -interface MediaStreamAudioDestinationNode : AudioNode - attribute @@toStringTag - getter stream - method constructor -interface MediaStreamAudioSourceNode : AudioSourceNode - attribute @@toStringTag - getter mediaStream - method constructor -interface MediaStreamEvent : Event - attribute @@toStringTag - getter stream - method constructor -interface MediaStreamTrack : EventTarget - attribute @@toStringTag - getter enabled - getter id - getter kind - getter label - getter muted - getter onended - getter onmute - getter onunmute - getter readyState - getter remote - method clone - method constructor - method getConstraints - method stop - setter enabled - setter onended - setter onmute - setter onunmute -interface MediaStreamTrackEvent : Event - attribute @@toStringTag - getter track - method constructor -interface MessageChannel - attribute @@toStringTag - getter port1 - getter port2 - method constructor -interface MessageEvent : Event - attribute @@toStringTag - getter data - getter lastEventId - getter origin - getter ports - getter source - method constructor - method initMessageEvent -interface MessagePort : EventTarget - attribute @@toStringTag - getter onmessage - method close - method constructor - method postMessage - method start - setter onmessage -interface MimeType - attribute @@toStringTag - getter description - getter enabledPlugin - getter suffixes - getter type - method constructor -interface MimeTypeArray - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item - method namedItem -interface MouseEvent : UIEvent - attribute @@toStringTag - getter altKey - getter button - getter buttons - getter clientX - getter clientY - getter ctrlKey - getter fromElement - getter layerX - getter layerY - getter metaKey - getter movementX - getter movementY - getter offsetX - getter offsetY - getter pageX - getter pageY - getter relatedTarget - getter screenX - getter screenY - getter shiftKey - getter toElement - getter which - getter x - getter y - method constructor - method getModifierState - method initMouseEvent -interface MutationEvent : Event - attribute @@toStringTag - attribute ADDITION - attribute MODIFICATION - attribute REMOVAL - getter attrChange - getter attrName - getter newValue - getter prevValue - getter relatedNode - method constructor - method initMutationEvent -interface MutationObserver - attribute @@toStringTag - method constructor - method disconnect - method observe - method takeRecords -interface MutationRecord - attribute @@toStringTag - getter addedNodes - getter attributeName - getter attributeNamespace - getter nextSibling - getter oldValue - getter previousSibling - getter removedNodes - getter target - getter type - method constructor -interface NamedNodeMap - attribute @@toStringTag - getter length - method @@iterator - method constructor - method getNamedItem - method getNamedItemNS - method item - method removeNamedItem - method removeNamedItemNS - method setNamedItem - method setNamedItemNS -interface Navigator - attribute @@toStringTag - getter appCodeName - getter appName - getter appVersion - getter cookieEnabled - getter credentials - getter doNotTrack - getter geolocation - getter hardwareConcurrency - getter language - getter languages - getter maxTouchPoints - getter mediaDevices - getter mimeTypes - getter onLine - getter permissions - getter platform - getter plugins - getter presentation - getter product - getter productSub - getter serviceWorker - getter storage - getter userAgent - getter vendor - getter vendorSub - getter webkitPersistentStorage - getter webkitTemporaryStorage - method constructor - method getBattery - method getGamepads - method getUserMedia - method javaEnabled - method registerProtocolHandler - method requestMIDIAccess - method requestMediaKeySystemAccess - method sendBeacon - method unregisterProtocolHandler - method vibrate - method webkitGetUserMedia -interface Node : EventTarget - attribute @@toStringTag - attribute ATTRIBUTE_NODE - attribute CDATA_SECTION_NODE - attribute COMMENT_NODE - attribute DOCUMENT_FRAGMENT_NODE - attribute DOCUMENT_NODE - attribute DOCUMENT_POSITION_CONTAINED_BY - attribute DOCUMENT_POSITION_CONTAINS - attribute DOCUMENT_POSITION_DISCONNECTED - attribute DOCUMENT_POSITION_FOLLOWING - attribute DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC - attribute DOCUMENT_POSITION_PRECEDING - attribute DOCUMENT_TYPE_NODE - attribute ELEMENT_NODE - attribute ENTITY_NODE - attribute ENTITY_REFERENCE_NODE - attribute NOTATION_NODE - attribute PROCESSING_INSTRUCTION_NODE - attribute TEXT_NODE - getter baseURI - getter childNodes - getter firstChild - getter isConnected - getter lastChild - getter nextSibling - getter nodeName - getter nodeType - getter nodeValue - getter ownerDocument - getter parentElement - getter parentNode - getter previousSibling - getter textContent - method appendChild - method cloneNode - method compareDocumentPosition - method constructor - method contains - method getRootNode - method hasChildNodes - method insertBefore - method isDefaultNamespace - method isEqualNode - method isSameNode - method lookupNamespaceURI - method lookupPrefix - method normalize - method removeChild - method replaceChild - setter nodeValue - setter textContent -interface NodeFilter - attribute @@toStringTag - attribute FILTER_ACCEPT - attribute FILTER_REJECT - attribute FILTER_SKIP - attribute SHOW_ALL - attribute SHOW_ATTRIBUTE - attribute SHOW_CDATA_SECTION - attribute SHOW_COMMENT - attribute SHOW_DOCUMENT - attribute SHOW_DOCUMENT_FRAGMENT - attribute SHOW_DOCUMENT_TYPE - attribute SHOW_ELEMENT - attribute SHOW_ENTITY - attribute SHOW_ENTITY_REFERENCE - attribute SHOW_NOTATION - attribute SHOW_PROCESSING_INSTRUCTION - attribute SHOW_TEXT - method acceptNode - method constructor -interface NodeIterator - attribute @@toStringTag - getter filter - getter pointerBeforeReferenceNode - getter referenceNode - getter root - getter whatToShow - method constructor - method detach - method nextNode - method previousNode -interface NodeList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method entries - method forEach - method item - method keys - method values -interface Notification : EventTarget - static getter maxActions - static getter permission - static method requestPermission - attribute @@toStringTag - getter actions - getter badge - getter body - getter data - getter dir - getter icon - getter image - getter lang - getter onclick - getter onclose - getter onerror - getter onshow - getter renotify - getter requireInteraction - getter silent - getter tag - getter timestamp - getter title - getter vibrate - method close - method constructor - setter onclick - setter onclose - setter onerror - setter onshow -interface OfflineAudioCompletionEvent : Event - attribute @@toStringTag - getter renderedBuffer - method constructor -interface OfflineAudioContext : BaseAudioContext - attribute @@toStringTag - getter length - getter oncomplete - method constructor - method startRendering - method suspend - setter oncomplete -interface Option - method constructor -interface OscillatorNode : AudioScheduledSourceNode - attribute @@toStringTag - getter detune - getter frequency - getter type - method constructor - method setPeriodicWave - setter type -interface PageTransitionEvent : Event - attribute @@toStringTag - getter persisted - method constructor -interface PannerNode : AudioNode - attribute @@toStringTag - getter coneInnerAngle - getter coneOuterAngle - getter coneOuterGain - getter distanceModel - getter maxDistance - getter orientationX - getter orientationY - getter orientationZ - getter panningModel - getter positionX - getter positionY - getter positionZ - getter refDistance - getter rolloffFactor - method constructor - method setOrientation - method setPosition - setter coneInnerAngle - setter coneOuterAngle - setter coneOuterGain - setter distanceModel - setter maxDistance - setter panningModel - setter refDistance - setter rolloffFactor -interface PasswordCredential : SiteBoundCredential - attribute @@toStringTag - getter additionalData - getter idName - getter passwordName - method constructor - setter additionalData - setter idName - setter passwordName -interface Path2D - attribute @@toStringTag - method arc - method arcTo - method bezierCurveTo - method closePath - method constructor - method ellipse - method lineTo - method moveTo - method quadraticCurveTo - method rect -interface Performance : EventTarget - attribute @@toStringTag - getter memory - getter navigation - getter onresourcetimingbufferfull - getter timing - method clearMarks - method clearMeasures - method clearResourceTimings - method constructor - method getEntries - method getEntriesByName - method getEntriesByType - method mark - method measure - method now - method setResourceTimingBufferSize - method toJSON - setter onresourcetimingbufferfull -interface PerformanceEntry - attribute @@toStringTag - getter duration - getter entryType - getter name - getter startTime - method constructor - method toJSON -interface PerformanceMark : PerformanceEntry - attribute @@toStringTag - method constructor -interface PerformanceMeasure : PerformanceEntry - attribute @@toStringTag - method constructor -interface PerformanceNavigation - attribute @@toStringTag - attribute TYPE_BACK_FORWARD - attribute TYPE_NAVIGATE - attribute TYPE_RELOAD - attribute TYPE_RESERVED - getter redirectCount - getter type - method constructor - method toJSON -interface PerformanceNavigationTiming : PerformanceResourceTiming - attribute @@toStringTag - getter domComplete - getter domContentLoadedEventEnd - getter domContentLoadedEventStart - getter domInteractive - getter loadEventEnd - getter loadEventStart - getter redirectCount - getter type - getter unloadEventEnd - getter unloadEventStart - method constructor - method toJSON -interface PerformanceObserver - attribute @@toStringTag - method constructor - method disconnect - method observe -interface PerformanceObserverEntryList - attribute @@toStringTag - method constructor - method getEntries - method getEntriesByName - method getEntriesByType -interface PerformanceResourceTiming : PerformanceEntry - attribute @@toStringTag - getter connectEnd - getter connectStart - getter decodedBodySize - getter domainLookupEnd - getter domainLookupStart - getter encodedBodySize - getter fetchStart - getter initiatorType - getter redirectEnd - getter redirectStart - getter requestStart - getter responseEnd - getter responseStart - getter secureConnectionStart - getter transferSize - getter workerStart - method constructor -interface PerformanceTiming - attribute @@toStringTag - getter connectEnd - getter connectStart - getter domComplete - getter domContentLoadedEventEnd - getter domContentLoadedEventStart - getter domInteractive - getter domLoading - getter domainLookupEnd - getter domainLookupStart - getter fetchStart - getter loadEventEnd - getter loadEventStart - getter navigationStart - getter redirectEnd - getter redirectStart - getter requestStart - getter responseEnd - getter responseStart - getter secureConnectionStart - getter unloadEventEnd - getter unloadEventStart - method constructor - method toJSON -interface PeriodicWave - attribute @@toStringTag - method constructor -interface PermissionStatus : EventTarget - attribute @@toStringTag - getter onchange - getter state - method constructor - setter onchange -interface Permissions - attribute @@toStringTag - method constructor - method query -interface Plugin - attribute @@toStringTag - getter description - getter filename - getter length - getter name - method @@iterator - method constructor - method item - method namedItem -interface PluginArray - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item - method namedItem - method refresh -interface PointerEvent : MouseEvent - attribute @@toStringTag - getter height - getter isPrimary - getter pointerId - getter pointerType - getter pressure - getter tangentialPressure - getter tiltX - getter tiltY - getter twist - getter width - method constructor -interface PopStateEvent : Event - attribute @@toStringTag - getter state - method constructor -interface Presentation - attribute @@toStringTag - getter defaultRequest - method constructor - setter defaultRequest -interface PresentationAvailability : EventTarget - attribute @@toStringTag - getter onchange - getter value - method constructor - setter onchange -interface PresentationConnection : EventTarget - attribute @@toStringTag - getter binaryType - getter id - getter onclose - getter onconnect - getter onmessage - getter onterminate - getter state - getter url - method close - method constructor - method send - method terminate - setter binaryType - setter onclose - setter onconnect - setter onmessage - setter onterminate -interface PresentationConnectionAvailableEvent : Event - attribute @@toStringTag - getter connection - method constructor -interface PresentationConnectionCloseEvent : Event - attribute @@toStringTag - getter message - getter reason - method constructor -interface PresentationRequest : EventTarget - attribute @@toStringTag - getter onconnectionavailable - method constructor - method getAvailability - method reconnect - method start - setter onconnectionavailable -interface ProcessingInstruction : CharacterData - attribute @@toStringTag - getter sheet - getter target - method constructor -interface ProgressEvent : Event - attribute @@toStringTag - getter lengthComputable - getter loaded - getter total - method constructor -interface PromiseRejectionEvent : Event - attribute @@toStringTag - getter promise - getter reason - method constructor -interface PushManager - attribute @@toStringTag - method constructor - method getSubscription - method permissionState - method subscribe -interface PushSubscription - attribute @@toStringTag - getter endpoint - getter options - method constructor - method getKey - method toJSON - method unsubscribe -interface PushSubscriptionOptions - attribute @@toStringTag - getter applicationServerKey - getter userVisibleOnly - method constructor -interface RTCCertificate - attribute @@toStringTag - getter expires - method constructor -interface RTCDataChannel : EventTarget - attribute @@toStringTag - getter binaryType - getter bufferedAmount - getter bufferedAmountLowThreshold - getter id - getter label - getter maxRetransmitTime - getter maxRetransmits - getter negotiated - getter onbufferedamountlow - getter onclose - getter onerror - getter onmessage - getter onopen - getter ordered - getter protocol - getter readyState - getter reliable - method close - method constructor - method send - setter binaryType - setter bufferedAmountLowThreshold - setter onbufferedamountlow - setter onclose - setter onerror - setter onmessage - setter onopen -interface RTCDataChannelEvent : Event - attribute @@toStringTag - getter channel - method constructor -interface RTCIceCandidate - attribute @@toStringTag - getter candidate - getter sdpMLineIndex - getter sdpMid - method constructor - method toJSON - setter candidate - setter sdpMLineIndex - setter sdpMid -interface RTCPeerConnection : EventTarget - static method generateCertificate - attribute @@toStringTag - getter iceConnectionState - getter iceGatheringState - getter localDescription - getter onaddstream - getter ondatachannel - getter onicecandidate - getter oniceconnectionstatechange - getter onnegotiationneeded - getter onremovestream - getter onsignalingstatechange - getter remoteDescription - getter signalingState - method addIceCandidate - method addStream - method close - method constructor - method createAnswer - method createDTMFSender - method createDataChannel - method createOffer - method getLocalStreams - method getRemoteStreams - method getStats - method getStreamById - method removeStream - method setLocalDescription - method setRemoteDescription - method updateIce - setter onaddstream - setter ondatachannel - setter onicecandidate - setter oniceconnectionstatechange - setter onnegotiationneeded - setter onremovestream - setter onsignalingstatechange -interface RTCPeerConnectionIceEvent : Event - attribute @@toStringTag - getter candidate - method constructor -interface RTCSessionDescription - attribute @@toStringTag - getter sdp - getter type - method constructor - method toJSON - setter sdp - setter type -interface RadioNodeList : NodeList - attribute @@toStringTag - getter value - method constructor - setter value -interface Range - attribute @@toStringTag - attribute END_TO_END - attribute END_TO_START - attribute START_TO_END - attribute START_TO_START - getter collapsed - getter commonAncestorContainer - getter endContainer - getter endOffset - getter startContainer - getter startOffset - method cloneContents - method cloneRange - method collapse - method compareBoundaryPoints - method comparePoint - method constructor - method createContextualFragment - method deleteContents - method detach - method expand - method extractContents - method getBoundingClientRect - method getClientRects - method insertNode - method intersectsNode - method isPointInRange - method selectNode - method selectNodeContents - method setEnd - method setEndAfter - method setEndBefore - method setStart - method setStartAfter - method setStartBefore - method surroundContents - method toString -interface ReadableStream - getter locked - method cancel - method constructor - method getReader - method tee -interface RemotePlayback : EventTarget - attribute @@toStringTag - getter onconnect - getter onconnecting - getter ondisconnect - getter state - method cancelWatchAvailability - method constructor - method prompt - method watchAvailability - setter onconnect - setter onconnecting - setter ondisconnect -interface Request - attribute @@toStringTag - getter bodyUsed - getter credentials - getter headers - getter integrity - getter method - getter mode - getter redirect - getter referrer - getter referrerPolicy - getter url - method arrayBuffer - method blob - method clone - method constructor - method json - method text -interface Response - static method error - static method redirect - attribute @@toStringTag - getter body - getter bodyUsed - getter headers - getter ok - getter redirected - getter status - getter statusText - getter type - getter url - method arrayBuffer - method blob - method clone - method constructor - method json - method text -interface SVGAElement : SVGGraphicsElement - attribute @@toStringTag - getter href - getter target - method constructor -interface SVGAngle - attribute @@toStringTag - attribute SVG_ANGLETYPE_DEG - attribute SVG_ANGLETYPE_GRAD - attribute SVG_ANGLETYPE_RAD - attribute SVG_ANGLETYPE_UNKNOWN - attribute SVG_ANGLETYPE_UNSPECIFIED - getter unitType - getter value - getter valueAsString - getter valueInSpecifiedUnits - method constructor - method convertToSpecifiedUnits - method newValueSpecifiedUnits - setter value - setter valueAsString - setter valueInSpecifiedUnits -interface SVGAnimateElement : SVGAnimationElement - attribute @@toStringTag - method constructor -interface SVGAnimateMotionElement : SVGAnimationElement - attribute @@toStringTag - method constructor -interface SVGAnimateTransformElement : SVGAnimationElement - attribute @@toStringTag - method constructor -interface SVGAnimatedAngle - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedBoolean - attribute @@toStringTag - getter animVal - getter baseVal - method constructor - setter baseVal -interface SVGAnimatedEnumeration - attribute @@toStringTag - getter animVal - getter baseVal - method constructor - setter baseVal -interface SVGAnimatedInteger - attribute @@toStringTag - getter animVal - getter baseVal - method constructor - setter baseVal -interface SVGAnimatedLength - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedLengthList - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedNumber - attribute @@toStringTag - getter animVal - getter baseVal - method constructor - setter baseVal -interface SVGAnimatedNumberList - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedPreserveAspectRatio - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedRect - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimatedString - attribute @@toStringTag - getter animVal - getter baseVal - method constructor - setter baseVal -interface SVGAnimatedTransformList - attribute @@toStringTag - getter animVal - getter baseVal - method constructor -interface SVGAnimationElement : SVGElement - attribute @@toStringTag - getter onbegin - getter onend - getter onrepeat - getter requiredExtensions - getter requiredFeatures - getter systemLanguage - getter targetElement - method beginElement - method beginElementAt - method constructor - method endElement - method endElementAt - method getCurrentTime - method getSimpleDuration - method getStartTime - setter onbegin - setter onend - setter onrepeat -interface SVGCircleElement : SVGGeometryElement - attribute @@toStringTag - getter cx - getter cy - getter r - method constructor -interface SVGClipPathElement : SVGGraphicsElement - attribute @@toStringTag - getter clipPathUnits - method constructor -interface SVGComponentTransferFunctionElement : SVGElement - attribute @@toStringTag - attribute SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE - attribute SVG_FECOMPONENTTRANSFER_TYPE_GAMMA - attribute SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY - attribute SVG_FECOMPONENTTRANSFER_TYPE_LINEAR - attribute SVG_FECOMPONENTTRANSFER_TYPE_TABLE - attribute SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN - getter amplitude - getter exponent - getter intercept - getter offset - getter slope - getter tableValues - getter type - method constructor -interface SVGDefsElement : SVGGraphicsElement - attribute @@toStringTag - method constructor -interface SVGDescElement : SVGElement - attribute @@toStringTag - method constructor -interface SVGDiscardElement : SVGElement - attribute @@toStringTag - method constructor -interface SVGElement : Element - attribute @@toStringTag - getter className - getter dataset - getter onabort - getter onauxclick - getter onblur - getter oncancel - getter oncanplay - getter oncanplaythrough - getter onchange - getter onclick - getter onclose - getter oncontextmenu - getter oncuechange - getter ondblclick - getter ondrag - getter ondragend - getter ondragenter - getter ondragleave - getter ondragover - getter ondragstart - getter ondrop - getter ondurationchange - getter onemptied - getter onended - getter onerror - getter onfocus - getter ongotpointercapture - getter oninput - getter oninvalid - getter onkeydown - getter onkeypress - getter onkeyup - getter onload - getter onloadeddata - getter onloadedmetadata - getter onloadstart - getter onlostpointercapture - getter onmousedown - getter onmouseenter - getter onmouseleave - getter onmousemove - getter onmouseout - getter onmouseover - getter onmouseup - getter onmousewheel - getter onpause - getter onplay - getter onplaying - getter onpointercancel - getter onpointerdown - getter onpointerenter - getter onpointerleave - getter onpointermove - getter onpointerout - getter onpointerover - getter onpointerup - getter onprogress - getter onratechange - getter onreset - getter onresize - getter onscroll - getter onseeked - getter onseeking - getter onselect - getter onshow - getter onstalled - getter onsubmit - getter onsuspend - getter ontimeupdate - getter ontoggle - getter ontouchcancel - getter ontouchend - getter ontouchmove - getter ontouchstart - getter onvolumechange - getter onwaiting - getter ownerSVGElement - getter style - getter tabIndex - getter viewportElement - method blur - method constructor - method focus - setter onabort - setter onauxclick - setter onblur - setter oncancel - setter oncanplay - setter oncanplaythrough - setter onchange - setter onclick - setter onclose - setter oncontextmenu - setter oncuechange - setter ondblclick - setter ondrag - setter ondragend - setter ondragenter - setter ondragleave - setter ondragover - setter ondragstart - setter ondrop - setter ondurationchange - setter onemptied - setter onended - setter onerror - setter onfocus - setter ongotpointercapture - setter oninput - setter oninvalid - setter onkeydown - setter onkeypress - setter onkeyup - setter onload - setter onloadeddata - setter onloadedmetadata - setter onloadstart - setter onlostpointercapture - setter onmousedown - setter onmouseenter - setter onmouseleave - setter onmousemove - setter onmouseout - setter onmouseover - setter onmouseup - setter onmousewheel - setter onpause - setter onplay - setter onplaying - setter onpointercancel - setter onpointerdown - setter onpointerenter - setter onpointerleave - setter onpointermove - setter onpointerout - setter onpointerover - setter onpointerup - setter onprogress - setter onratechange - setter onreset - setter onresize - setter onscroll - setter onseeked - setter onseeking - setter onselect - setter onshow - setter onstalled - setter onsubmit - setter onsuspend - setter ontimeupdate - setter ontoggle - setter ontouchcancel - setter ontouchend - setter ontouchmove - setter ontouchstart - setter onvolumechange - setter onwaiting - setter style - setter tabIndex -interface SVGEllipseElement : SVGGeometryElement - attribute @@toStringTag - getter cx - getter cy - getter rx - getter ry - method constructor -interface SVGFEBlendElement : SVGElement - attribute @@toStringTag - attribute SVG_FEBLEND_MODE_DARKEN - attribute SVG_FEBLEND_MODE_LIGHTEN - attribute SVG_FEBLEND_MODE_MULTIPLY - attribute SVG_FEBLEND_MODE_NORMAL - attribute SVG_FEBLEND_MODE_SCREEN - attribute SVG_FEBLEND_MODE_UNKNOWN - getter height - getter in1 - getter in2 - getter mode - getter result - getter width - getter x - getter y - method constructor -interface SVGFEColorMatrixElement : SVGElement - attribute @@toStringTag - attribute SVG_FECOLORMATRIX_TYPE_HUEROTATE - attribute SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA - attribute SVG_FECOLORMATRIX_TYPE_MATRIX - attribute SVG_FECOLORMATRIX_TYPE_SATURATE - attribute SVG_FECOLORMATRIX_TYPE_UNKNOWN - getter height - getter in1 - getter result - getter type - getter values - getter width - getter x - getter y - method constructor -interface SVGFEComponentTransferElement : SVGElement - attribute @@toStringTag - getter height - getter in1 - getter result - getter width - getter x - getter y - method constructor -interface SVGFECompositeElement : SVGElement - attribute @@toStringTag - attribute SVG_FECOMPOSITE_OPERATOR_ARITHMETIC - attribute SVG_FECOMPOSITE_OPERATOR_ATOP - attribute SVG_FECOMPOSITE_OPERATOR_IN - attribute SVG_FECOMPOSITE_OPERATOR_OUT - attribute SVG_FECOMPOSITE_OPERATOR_OVER - attribute SVG_FECOMPOSITE_OPERATOR_UNKNOWN - attribute SVG_FECOMPOSITE_OPERATOR_XOR - getter height - getter in1 - getter in2 - getter k1 - getter k2 - getter k3 - getter k4 - getter operator - getter result - getter width - getter x - getter y - method constructor -interface SVGFEConvolveMatrixElement : SVGElement - attribute @@toStringTag - attribute SVG_EDGEMODE_DUPLICATE - attribute SVG_EDGEMODE_NONE - attribute SVG_EDGEMODE_UNKNOWN - attribute SVG_EDGEMODE_WRAP - getter bias - getter divisor - getter edgeMode - getter height - getter in1 - getter kernelMatrix - getter kernelUnitLengthX - getter kernelUnitLengthY - getter orderX - getter orderY - getter preserveAlpha - getter result - getter targetX - getter targetY - getter width - getter x - getter y - method constructor -interface SVGFEDiffuseLightingElement : SVGElement - attribute @@toStringTag - getter diffuseConstant - getter height - getter in1 - getter kernelUnitLengthX - getter kernelUnitLengthY - getter result - getter surfaceScale - getter width - getter x - getter y - method constructor -interface SVGFEDisplacementMapElement : SVGElement - attribute @@toStringTag - attribute SVG_CHANNEL_A - attribute SVG_CHANNEL_B - attribute SVG_CHANNEL_G - attribute SVG_CHANNEL_R - attribute SVG_CHANNEL_UNKNOWN - getter height - getter in1 - getter in2 - getter result - getter scale - getter width - getter x - getter xChannelSelector - getter y - getter yChannelSelector - method constructor -interface SVGFEDistantLightElement : SVGElement - attribute @@toStringTag - getter azimuth - getter elevation - method constructor -interface SVGFEDropShadowElement : SVGElement - attribute @@toStringTag - getter dx - getter dy - getter height - getter in1 - getter result - getter stdDeviationX - getter stdDeviationY - getter width - getter x - getter y - method constructor - method setStdDeviation -interface SVGFEFloodElement : SVGElement - attribute @@toStringTag - getter height - getter result - getter width - getter x - getter y - method constructor -interface SVGFEFuncAElement : SVGComponentTransferFunctionElement - attribute @@toStringTag - method constructor -interface SVGFEFuncBElement : SVGComponentTransferFunctionElement - attribute @@toStringTag - method constructor -interface SVGFEFuncGElement : SVGComponentTransferFunctionElement - attribute @@toStringTag - method constructor -interface SVGFEFuncRElement : SVGComponentTransferFunctionElement - attribute @@toStringTag - method constructor -interface SVGFEGaussianBlurElement : SVGElement - attribute @@toStringTag - getter height - getter in1 - getter result - getter stdDeviationX - getter stdDeviationY - getter width - getter x - getter y - method constructor - method setStdDeviation -interface SVGFEImageElement : SVGElement - attribute @@toStringTag - getter height - getter href - getter preserveAspectRatio - getter result - getter width - getter x - getter y - method constructor -interface SVGFEMergeElement : SVGElement - attribute @@toStringTag - getter height - getter result - getter width - getter x - getter y - method constructor -interface SVGFEMergeNodeElement : SVGElement - attribute @@toStringTag - getter in1 - method constructor -interface SVGFEMorphologyElement : SVGElement - attribute @@toStringTag - attribute SVG_MORPHOLOGY_OPERATOR_DILATE - attribute SVG_MORPHOLOGY_OPERATOR_ERODE - attribute SVG_MORPHOLOGY_OPERATOR_UNKNOWN - getter height - getter in1 - getter operator - getter radiusX - getter radiusY - getter result - getter width - getter x - getter y - method constructor -interface SVGFEOffsetElement : SVGElement - attribute @@toStringTag - getter dx - getter dy - getter height - getter in1 - getter result - getter width - getter x - getter y - method constructor -interface SVGFEPointLightElement : SVGElement - attribute @@toStringTag - getter x - getter y - getter z - method constructor -interface SVGFESpecularLightingElement : SVGElement - attribute @@toStringTag - getter height - getter in1 - getter kernelUnitLengthX - getter kernelUnitLengthY - getter result - getter specularConstant - getter specularExponent - getter surfaceScale - getter width - getter x - getter y - method constructor -interface SVGFESpotLightElement : SVGElement - attribute @@toStringTag - getter limitingConeAngle - getter pointsAtX - getter pointsAtY - getter pointsAtZ - getter specularExponent - getter x - getter y - getter z - method constructor -interface SVGFETileElement : SVGElement - attribute @@toStringTag - getter height - getter in1 - getter result - getter width - getter x - getter y - method constructor -interface SVGFETurbulenceElement : SVGElement - attribute @@toStringTag - attribute SVG_STITCHTYPE_NOSTITCH - attribute SVG_STITCHTYPE_STITCH - attribute SVG_STITCHTYPE_UNKNOWN - attribute SVG_TURBULENCE_TYPE_FRACTALNOISE - attribute SVG_TURBULENCE_TYPE_TURBULENCE - attribute SVG_TURBULENCE_TYPE_UNKNOWN - getter baseFrequencyX - getter baseFrequencyY - getter height - getter numOctaves - getter result - getter seed - getter stitchTiles - getter type - getter width - getter x - getter y - method constructor -interface SVGFilterElement : SVGElement - attribute @@toStringTag - getter filterUnits - getter height - getter href - getter primitiveUnits - getter width - getter x - getter y - method constructor -interface SVGForeignObjectElement : SVGGraphicsElement - attribute @@toStringTag - getter height - getter width - getter x - getter y - method constructor -interface SVGGElement : SVGGraphicsElement - attribute @@toStringTag - method constructor -interface SVGGeometryElement : SVGGraphicsElement - attribute @@toStringTag - getter pathLength - method constructor - method getPointAtLength - method getTotalLength - method isPointInFill - method isPointInStroke -interface SVGGradientElement : SVGElement - attribute @@toStringTag - attribute SVG_SPREADMETHOD_PAD - attribute SVG_SPREADMETHOD_REFLECT - attribute SVG_SPREADMETHOD_REPEAT - attribute SVG_SPREADMETHOD_UNKNOWN - getter gradientTransform - getter gradientUnits - getter href - getter spreadMethod - method constructor -interface SVGGraphicsElement : SVGElement - attribute @@toStringTag - getter farthestViewportElement - getter nearestViewportElement - getter requiredExtensions - getter requiredFeatures - getter systemLanguage - getter transform - method constructor - method getBBox - method getCTM - method getScreenCTM -interface SVGImageElement : SVGGraphicsElement - attribute @@toStringTag - getter height - getter href - getter preserveAspectRatio - getter width - getter x - getter y - method constructor -interface SVGLength - attribute @@toStringTag - attribute SVG_LENGTHTYPE_CM - attribute SVG_LENGTHTYPE_EMS - attribute SVG_LENGTHTYPE_EXS - attribute SVG_LENGTHTYPE_IN - attribute SVG_LENGTHTYPE_MM - attribute SVG_LENGTHTYPE_NUMBER - attribute SVG_LENGTHTYPE_PC - attribute SVG_LENGTHTYPE_PERCENTAGE - attribute SVG_LENGTHTYPE_PT - attribute SVG_LENGTHTYPE_PX - attribute SVG_LENGTHTYPE_UNKNOWN - getter unitType - getter value - getter valueAsString - getter valueInSpecifiedUnits - method constructor - method convertToSpecifiedUnits - method newValueSpecifiedUnits - setter value - setter valueAsString - setter valueInSpecifiedUnits -interface SVGLengthList - attribute @@toStringTag - getter length - getter numberOfItems - method @@iterator - method appendItem - method clear - method constructor - method getItem - method initialize - method insertItemBefore - method removeItem - method replaceItem -interface SVGLineElement : SVGGeometryElement - attribute @@toStringTag - getter x1 - getter x2 - getter y1 - getter y2 - method constructor -interface SVGLinearGradientElement : SVGGradientElement - attribute @@toStringTag - getter x1 - getter x2 - getter y1 - getter y2 - method constructor -interface SVGMPathElement : SVGElement - attribute @@toStringTag - getter href - method constructor -interface SVGMarkerElement : SVGElement - attribute @@toStringTag - attribute SVG_MARKERUNITS_STROKEWIDTH - attribute SVG_MARKERUNITS_UNKNOWN - attribute SVG_MARKERUNITS_USERSPACEONUSE - attribute SVG_MARKER_ORIENT_ANGLE - attribute SVG_MARKER_ORIENT_AUTO - attribute SVG_MARKER_ORIENT_UNKNOWN - getter markerHeight - getter markerUnits - getter markerWidth - getter orientAngle - getter orientType - getter preserveAspectRatio - getter refX - getter refY - getter viewBox - method constructor - method setOrientToAngle - method setOrientToAuto -interface SVGMaskElement : SVGElement - attribute @@toStringTag - getter height - getter maskContentUnits - getter maskUnits - getter requiredExtensions - getter requiredFeatures - getter systemLanguage - getter width - getter x - getter y - method constructor -interface SVGMatrix - attribute @@toStringTag - getter a - getter b - getter c - getter d - getter e - getter f - method constructor - method flipX - method flipY - method inverse - method multiply - method rotate - method rotateFromVector - method scale - method scaleNonUniform - method skewX - method skewY - method translate - setter a - setter b - setter c - setter d - setter e - setter f -interface SVGMetadataElement : SVGElement - attribute @@toStringTag - method constructor -interface SVGNumber - attribute @@toStringTag - getter value - method constructor - setter value -interface SVGNumberList - attribute @@toStringTag - getter length - getter numberOfItems - method @@iterator - method appendItem - method clear - method constructor - method getItem - method initialize - method insertItemBefore - method removeItem - method replaceItem -interface SVGPathElement : SVGGeometryElement - attribute @@toStringTag - method constructor - method getPathSegAtLength -interface SVGPatternElement : SVGElement - attribute @@toStringTag - getter height - getter href - getter patternContentUnits - getter patternTransform - getter patternUnits - getter preserveAspectRatio - getter requiredExtensions - getter requiredFeatures - getter systemLanguage - getter viewBox - getter width - getter x - getter y - method constructor -interface SVGPoint - attribute @@toStringTag - getter x - getter y - method constructor - method matrixTransform - setter x - setter y -interface SVGPointList - attribute @@toStringTag - getter length - getter numberOfItems - method @@iterator - method appendItem - method clear - method constructor - method getItem - method initialize - method insertItemBefore - method removeItem - method replaceItem -interface SVGPolygonElement : SVGGeometryElement - attribute @@toStringTag - getter animatedPoints - getter points - method constructor -interface SVGPolylineElement : SVGGeometryElement - attribute @@toStringTag - getter animatedPoints - getter points - method constructor -interface SVGPreserveAspectRatio - attribute @@toStringTag - attribute SVG_MEETORSLICE_MEET - attribute SVG_MEETORSLICE_SLICE - attribute SVG_MEETORSLICE_UNKNOWN - attribute SVG_PRESERVEASPECTRATIO_NONE - attribute SVG_PRESERVEASPECTRATIO_UNKNOWN - attribute SVG_PRESERVEASPECTRATIO_XMAXYMAX - attribute SVG_PRESERVEASPECTRATIO_XMAXYMID - attribute SVG_PRESERVEASPECTRATIO_XMAXYMIN - attribute SVG_PRESERVEASPECTRATIO_XMIDYMAX - attribute SVG_PRESERVEASPECTRATIO_XMIDYMID - attribute SVG_PRESERVEASPECTRATIO_XMIDYMIN - attribute SVG_PRESERVEASPECTRATIO_XMINYMAX - attribute SVG_PRESERVEASPECTRATIO_XMINYMID - attribute SVG_PRESERVEASPECTRATIO_XMINYMIN - getter align - getter meetOrSlice - method constructor - setter align - setter meetOrSlice -interface SVGRadialGradientElement : SVGGradientElement - attribute @@toStringTag - getter cx - getter cy - getter fr - getter fx - getter fy - getter r - method constructor -interface SVGRect - attribute @@toStringTag - getter height - getter width - getter x - getter y - method constructor - setter height - setter width - setter x - setter y -interface SVGRectElement : SVGGeometryElement - attribute @@toStringTag - getter height - getter rx - getter ry - getter width - getter x - getter y - method constructor -interface SVGSVGElement : SVGGraphicsElement - attribute @@toStringTag - attribute SVG_ZOOMANDPAN_DISABLE - attribute SVG_ZOOMANDPAN_MAGNIFY - attribute SVG_ZOOMANDPAN_UNKNOWN - getter currentScale - getter currentTranslate - getter height - getter preserveAspectRatio - getter viewBox - getter width - getter x - getter y - getter zoomAndPan - method animationsPaused - method checkEnclosure - method checkIntersection - method constructor - method createSVGAngle - method createSVGLength - method createSVGMatrix - method createSVGNumber - method createSVGPoint - method createSVGRect - method createSVGTransform - method createSVGTransformFromMatrix - method deselectAll - method forceRedraw - method getCurrentTime - method getElementById - method getEnclosureList - method getIntersectionList - method pauseAnimations - method setCurrentTime - method suspendRedraw - method unpauseAnimations - method unsuspendRedraw - method unsuspendRedrawAll - setter currentScale - setter zoomAndPan -interface SVGScriptElement : SVGElement - attribute @@toStringTag - getter href - getter type - method constructor - setter type -interface SVGSetElement : SVGAnimationElement - attribute @@toStringTag - method constructor -interface SVGStopElement : SVGElement - attribute @@toStringTag - getter offset - method constructor -interface SVGStringList - attribute @@toStringTag - getter length - getter numberOfItems - method @@iterator - method appendItem - method clear - method constructor - method getItem - method initialize - method insertItemBefore - method removeItem - method replaceItem -interface SVGStyleElement : SVGElement - attribute @@toStringTag - getter disabled - getter media - getter sheet - getter title - getter type - method constructor - setter disabled - setter media - setter title - setter type -interface SVGSwitchElement : SVGGraphicsElement - attribute @@toStringTag - method constructor -interface SVGSymbolElement : SVGElement - attribute @@toStringTag - getter preserveAspectRatio - getter viewBox - method constructor -interface SVGTSpanElement : SVGTextPositioningElement - attribute @@toStringTag - method constructor -interface SVGTextContentElement : SVGGraphicsElement - attribute @@toStringTag - attribute LENGTHADJUST_SPACING - attribute LENGTHADJUST_SPACINGANDGLYPHS - attribute LENGTHADJUST_UNKNOWN - getter lengthAdjust - getter textLength - method constructor - method getCharNumAtPosition - method getComputedTextLength - method getEndPositionOfChar - method getExtentOfChar - method getNumberOfChars - method getRotationOfChar - method getStartPositionOfChar - method getSubStringLength - method selectSubString -interface SVGTextElement : SVGTextPositioningElement - attribute @@toStringTag - method constructor -interface SVGTextPathElement : SVGTextContentElement - attribute @@toStringTag - attribute TEXTPATH_METHODTYPE_ALIGN - attribute TEXTPATH_METHODTYPE_STRETCH - attribute TEXTPATH_METHODTYPE_UNKNOWN - attribute TEXTPATH_SPACINGTYPE_AUTO - attribute TEXTPATH_SPACINGTYPE_EXACT - attribute TEXTPATH_SPACINGTYPE_UNKNOWN - getter href - getter method - getter spacing - getter startOffset - method constructor -interface SVGTextPositioningElement : SVGTextContentElement - attribute @@toStringTag - getter dx - getter dy - getter rotate - getter x - getter y - method constructor -interface SVGTitleElement : SVGElement - attribute @@toStringTag - method constructor -interface SVGTransform - attribute @@toStringTag - attribute SVG_TRANSFORM_MATRIX - attribute SVG_TRANSFORM_ROTATE - attribute SVG_TRANSFORM_SCALE - attribute SVG_TRANSFORM_SKEWX - attribute SVG_TRANSFORM_SKEWY - attribute SVG_TRANSFORM_TRANSLATE - attribute SVG_TRANSFORM_UNKNOWN - getter angle - getter matrix - getter type - method constructor - method setMatrix - method setRotate - method setScale - method setSkewX - method setSkewY - method setTranslate -interface SVGTransformList - attribute @@toStringTag - getter length - getter numberOfItems - method @@iterator - method appendItem - method clear - method consolidate - method constructor - method createSVGTransformFromMatrix - method getItem - method initialize - method insertItemBefore - method removeItem - method replaceItem -interface SVGUnitTypes - attribute @@toStringTag - attribute SVG_UNIT_TYPE_OBJECTBOUNDINGBOX - attribute SVG_UNIT_TYPE_UNKNOWN - attribute SVG_UNIT_TYPE_USERSPACEONUSE - method constructor -interface SVGUseElement : SVGGraphicsElement - attribute @@toStringTag - getter height - getter href - getter width - getter x - getter y - method constructor -interface SVGViewElement : SVGElement - attribute @@toStringTag - attribute SVG_ZOOMANDPAN_DISABLE - attribute SVG_ZOOMANDPAN_MAGNIFY - attribute SVG_ZOOMANDPAN_UNKNOWN - getter preserveAspectRatio - getter viewBox - getter zoomAndPan - method constructor - setter zoomAndPan -interface Screen - attribute @@toStringTag - getter availHeight - getter availLeft - getter availTop - getter availWidth - getter colorDepth - getter height - getter orientation - getter pixelDepth - getter width - method constructor -interface ScreenOrientation : EventTarget - attribute @@toStringTag - getter angle - getter onchange - getter type - method constructor - method lock - method unlock - setter onchange -interface ScriptProcessorNode : AudioNode - attribute @@toStringTag - getter bufferSize - getter onaudioprocess - method constructor - setter onaudioprocess -interface SecurityPolicyViolationEvent : Event - attribute @@toStringTag - getter blockedURI - getter columnNumber - getter disposition - getter documentURI - getter effectiveDirective - getter lineNumber - getter originalPolicy - getter referrer - getter sourceFile - getter statusCode - getter violatedDirective - method constructor -interface Selection - attribute @@toStringTag - getter anchorNode - getter anchorOffset - getter baseNode - getter baseOffset - getter extentNode - getter extentOffset - getter focusNode - getter focusOffset - getter isCollapsed - getter rangeCount - getter type - method addRange - method collapse - method collapseToEnd - method collapseToStart - method constructor - method containsNode - method deleteFromDocument - method empty - method extend - method getRangeAt - method modify - method removeAllRanges - method selectAllChildren - method setBaseAndExtent - method setPosition - method toString -interface ServiceWorker : EventTarget - attribute @@toStringTag - getter onerror - getter onstatechange - getter scriptURL - getter state - method constructor - method postMessage - setter onerror - setter onstatechange -interface ServiceWorkerContainer : EventTarget - attribute @@toStringTag - getter controller - getter oncontrollerchange - getter onmessage - getter ready - method constructor - method getRegistration - method getRegistrations - method register - setter oncontrollerchange - setter onmessage -interface ServiceWorkerRegistration : EventTarget - attribute @@toStringTag - getter active - getter installing - getter onupdatefound - getter pushManager - getter scope - getter sync - getter waiting - method constructor - method getNotifications - method showNotification - method unregister - method update - setter onupdatefound -interface ShadowRoot : DocumentFragment - attribute @@toStringTag - getter activeElement - getter delegatesFocus - getter host - getter innerHTML - getter mode - getter olderShadowRoot - getter pointerLockElement - getter styleSheets - method cloneNode - method constructor - method elementFromPoint - method elementsFromPoint - method getSelection - setter innerHTML -interface SharedWorker : EventTarget - attribute @@toStringTag - getter onerror - getter port - getter workerStart - method constructor - setter onerror -interface SiteBoundCredential : Credential - attribute @@toStringTag - getter iconURL - getter name - method constructor -interface SourceBuffer : EventTarget - attribute @@toStringTag - getter appendWindowEnd - getter appendWindowStart - getter buffered - getter mode - getter onabort - getter onerror - getter onupdate - getter onupdateend - getter onupdatestart - getter timestampOffset - getter updating - method abort - method appendBuffer - method constructor - method remove - setter appendWindowEnd - setter appendWindowStart - setter mode - setter onabort - setter onerror - setter onupdate - setter onupdateend - setter onupdatestart - setter timestampOffset -interface SourceBufferList : EventTarget - attribute @@toStringTag - getter length - getter onaddsourcebuffer - getter onremovesourcebuffer - method @@iterator - method constructor - setter onaddsourcebuffer - setter onremovesourcebuffer -interface SpeechSynthesisEvent : Event - attribute @@toStringTag - getter charIndex - getter elapsedTime - getter name - getter utterance - method constructor -interface SpeechSynthesisUtterance : EventTarget - attribute @@toStringTag - getter lang - getter onboundary - getter onend - getter onerror - getter onmark - getter onpause - getter onresume - getter onstart - getter pitch - getter rate - getter text - getter voice - getter volume - method constructor - setter lang - setter onboundary - setter onend - setter onerror - setter onmark - setter onpause - setter onresume - setter onstart - setter pitch - setter rate - setter text - setter voice - setter volume -interface StereoPannerNode : AudioNode - attribute @@toStringTag - getter pan - method constructor -interface Storage - attribute @@toStringTag - getter length - method clear - method constructor - method getItem - method key - method removeItem - method setItem -interface StorageEvent : Event - attribute @@toStringTag - getter key - getter newValue - getter oldValue - getter storageArea - getter url - method constructor - method initStorageEvent -interface StorageManager - attribute @@toStringTag - method constructor - method persist - method persisted -interface StyleSheet - attribute @@toStringTag - getter disabled - getter href - getter media - getter ownerNode - getter parentStyleSheet - getter title - getter type - method constructor - setter disabled -interface StyleSheetList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item -interface SubtleCrypto - attribute @@toStringTag - method constructor - method decrypt - method deriveBits - method deriveKey - method digest - method encrypt - method exportKey - method generateKey - method importKey - method sign - method unwrapKey - method verify - method wrapKey -interface SyncManager - attribute @@toStringTag - method constructor - method getTags - method register -interface Text : CharacterData - attribute @@toStringTag - getter assignedSlot - getter wholeText - method constructor - method getDestinationInsertionPoints - method splitText -interface TextDecoder - attribute @@toStringTag - getter encoding - getter fatal - getter ignoreBOM - method constructor - method decode -interface TextEncoder - attribute @@toStringTag - getter encoding - method constructor - method encode -interface TextEvent : UIEvent - attribute @@toStringTag - getter data - method constructor - method initTextEvent -interface TextMetrics - attribute @@toStringTag - getter width - method constructor -interface TextTrack : EventTarget - attribute @@toStringTag - getter activeCues - getter cues - getter id - getter kind - getter label - getter language - getter mode - getter oncuechange - method addCue - method constructor - method removeCue - setter mode - setter oncuechange -interface TextTrackCue : EventTarget - attribute @@toStringTag - getter endTime - getter id - getter onenter - getter onexit - getter pauseOnExit - getter startTime - getter track - method constructor - setter endTime - setter id - setter onenter - setter onexit - setter pauseOnExit - setter startTime -interface TextTrackCueList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method getCueById -interface TextTrackList : EventTarget - attribute @@toStringTag - getter length - getter onaddtrack - getter onchange - getter onremovetrack - method @@iterator - method constructor - method getTrackById - setter onaddtrack - setter onchange - setter onremovetrack -interface TimeRanges - attribute @@toStringTag - getter length - method constructor - method end - method start -interface Touch - attribute @@toStringTag - getter clientX - getter clientY - getter force - getter identifier - getter pageX - getter pageY - getter radiusX - getter radiusY - getter rotationAngle - getter screenX - getter screenY - getter target - method constructor -interface TouchEvent : UIEvent - attribute @@toStringTag - getter altKey - getter changedTouches - getter ctrlKey - getter metaKey - getter shiftKey - getter targetTouches - getter touches - method constructor -interface TouchList - attribute @@toStringTag - getter length - method @@iterator - method constructor - method item -interface TrackEvent : Event - attribute @@toStringTag - getter track - method constructor -interface TransitionEvent : Event - attribute @@toStringTag - getter elapsedTime - getter propertyName - getter pseudoElement - method constructor -interface TreeWalker - attribute @@toStringTag - getter currentNode - getter filter - getter root - getter whatToShow - method constructor - method firstChild - method lastChild - method nextNode - method nextSibling - method parentNode - method previousNode - method previousSibling - setter currentNode -interface UIEvent : Event - attribute @@toStringTag - getter detail - getter sourceCapabilities - getter view - getter which - method constructor - method initUIEvent -interface URL - static method createObjectURL - static method revokeObjectURL - attribute @@toStringTag - getter hash - getter host - getter hostname - getter href - getter origin - getter password - getter pathname - getter port - getter protocol - getter search - getter searchParams - getter username - method constructor - method toString - setter hash - setter host - setter hostname - setter href - setter password - setter pathname - setter port - setter protocol - setter search - setter username -interface URLSearchParams - attribute @@toStringTag - method @@iterator - method append - method constructor - method delete - method entries - method forEach - method get - method getAll - method has - method keys - method set - method toString - method values -interface VTTCue : TextTrackCue - attribute @@toStringTag - getter align - getter line - getter position - getter size - getter snapToLines - getter text - getter vertical - method constructor - method getCueAsHTML - setter align - setter line - setter position - setter size - setter snapToLines - setter text - setter vertical -interface ValidityState - attribute @@toStringTag - getter badInput - getter customError - getter patternMismatch - getter rangeOverflow - getter rangeUnderflow - getter stepMismatch - getter tooLong - getter tooShort - getter typeMismatch - getter valid - getter valueMissing - method constructor -interface WaveShaperNode : AudioNode - attribute @@toStringTag - getter curve - getter oversample - method constructor - setter curve - setter oversample -interface WebGL2RenderingContext - attribute @@toStringTag - attribute ACTIVE_ATTRIBUTES - attribute ACTIVE_TEXTURE - attribute ACTIVE_UNIFORMS - attribute ACTIVE_UNIFORM_BLOCKS - attribute ALIASED_LINE_WIDTH_RANGE - attribute ALIASED_POINT_SIZE_RANGE - attribute ALPHA - attribute ALPHA_BITS - attribute ALREADY_SIGNALED - attribute ALWAYS - attribute ANY_SAMPLES_PASSED - attribute ANY_SAMPLES_PASSED_CONSERVATIVE - attribute ARRAY_BUFFER - attribute ARRAY_BUFFER_BINDING - attribute ATTACHED_SHADERS - attribute BACK - attribute BLEND - attribute BLEND_COLOR - attribute BLEND_DST_ALPHA - attribute BLEND_DST_RGB - attribute BLEND_EQUATION - attribute BLEND_EQUATION_ALPHA - attribute BLEND_EQUATION_RGB - attribute BLEND_SRC_ALPHA - attribute BLEND_SRC_RGB - attribute BLUE_BITS - attribute BOOL - attribute BOOL_VEC2 - attribute BOOL_VEC3 - attribute BOOL_VEC4 - attribute BROWSER_DEFAULT_WEBGL - attribute BUFFER_SIZE - attribute BUFFER_USAGE - attribute BYTE - attribute CCW - attribute CLAMP_TO_EDGE - attribute COLOR - attribute COLOR_ATTACHMENT0 - attribute COLOR_ATTACHMENT1 - attribute COLOR_ATTACHMENT10 - attribute COLOR_ATTACHMENT11 - attribute COLOR_ATTACHMENT12 - attribute COLOR_ATTACHMENT13 - attribute COLOR_ATTACHMENT14 - attribute COLOR_ATTACHMENT15 - attribute COLOR_ATTACHMENT2 - attribute COLOR_ATTACHMENT3 - attribute COLOR_ATTACHMENT4 - attribute COLOR_ATTACHMENT5 - attribute COLOR_ATTACHMENT6 - attribute COLOR_ATTACHMENT7 - attribute COLOR_ATTACHMENT8 - attribute COLOR_ATTACHMENT9 - attribute COLOR_BUFFER_BIT - attribute COLOR_CLEAR_VALUE - attribute COLOR_WRITEMASK - attribute COMPARE_REF_TO_TEXTURE - attribute COMPILE_STATUS - attribute COMPRESSED_TEXTURE_FORMATS - attribute CONDITION_SATISFIED - attribute CONSTANT_ALPHA - attribute CONSTANT_COLOR - attribute CONTEXT_LOST_WEBGL - attribute COPY_READ_BUFFER - attribute COPY_READ_BUFFER_BINDING - attribute COPY_WRITE_BUFFER - attribute COPY_WRITE_BUFFER_BINDING - attribute CULL_FACE - attribute CULL_FACE_MODE - attribute CURRENT_PROGRAM - attribute CURRENT_QUERY - attribute CURRENT_VERTEX_ATTRIB - attribute CW - attribute DECR - attribute DECR_WRAP - attribute DELETE_STATUS - attribute DEPTH - attribute DEPTH24_STENCIL8 - attribute DEPTH32F_STENCIL8 - attribute DEPTH_ATTACHMENT - attribute DEPTH_BITS - attribute DEPTH_BUFFER_BIT - attribute DEPTH_CLEAR_VALUE - attribute DEPTH_COMPONENT - attribute DEPTH_COMPONENT16 - attribute DEPTH_COMPONENT24 - attribute DEPTH_COMPONENT32F - attribute DEPTH_FUNC - attribute DEPTH_RANGE - attribute DEPTH_STENCIL - attribute DEPTH_STENCIL_ATTACHMENT - attribute DEPTH_TEST - attribute DEPTH_WRITEMASK - attribute DITHER - attribute DONT_CARE - attribute DRAW_BUFFER0 - attribute DRAW_BUFFER1 - attribute DRAW_BUFFER10 - attribute DRAW_BUFFER11 - attribute DRAW_BUFFER12 - attribute DRAW_BUFFER13 - attribute DRAW_BUFFER14 - attribute DRAW_BUFFER15 - attribute DRAW_BUFFER2 - attribute DRAW_BUFFER3 - attribute DRAW_BUFFER4 - attribute DRAW_BUFFER5 - attribute DRAW_BUFFER6 - attribute DRAW_BUFFER7 - attribute DRAW_BUFFER8 - attribute DRAW_BUFFER9 - attribute DRAW_FRAMEBUFFER - attribute DRAW_FRAMEBUFFER_BINDING - attribute DST_ALPHA - attribute DST_COLOR - attribute DYNAMIC_COPY - attribute DYNAMIC_DRAW - attribute DYNAMIC_READ - attribute ELEMENT_ARRAY_BUFFER - attribute ELEMENT_ARRAY_BUFFER_BINDING - attribute EQUAL - attribute FASTEST - attribute FLOAT - attribute FLOAT_32_UNSIGNED_INT_24_8_REV - attribute FLOAT_MAT2 - attribute FLOAT_MAT2x3 - attribute FLOAT_MAT2x4 - attribute FLOAT_MAT3 - attribute FLOAT_MAT3x2 - attribute FLOAT_MAT3x4 - attribute FLOAT_MAT4 - attribute FLOAT_MAT4x2 - attribute FLOAT_MAT4x3 - attribute FLOAT_VEC2 - attribute FLOAT_VEC3 - attribute FLOAT_VEC4 - attribute FRAGMENT_SHADER - attribute FRAGMENT_SHADER_DERIVATIVE_HINT - attribute FRAMEBUFFER - attribute FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE - attribute FRAMEBUFFER_ATTACHMENT_BLUE_SIZE - attribute FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING - attribute FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE - attribute FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE - attribute FRAMEBUFFER_ATTACHMENT_GREEN_SIZE - attribute FRAMEBUFFER_ATTACHMENT_OBJECT_NAME - attribute FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE - attribute FRAMEBUFFER_ATTACHMENT_RED_SIZE - attribute FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE - attribute FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE - attribute FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER - attribute FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL - attribute FRAMEBUFFER_BINDING - attribute FRAMEBUFFER_COMPLETE - attribute FRAMEBUFFER_DEFAULT - attribute FRAMEBUFFER_INCOMPLETE_ATTACHMENT - attribute FRAMEBUFFER_INCOMPLETE_DIMENSIONS - attribute FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT - attribute FRAMEBUFFER_INCOMPLETE_MULTISAMPLE - attribute FRAMEBUFFER_UNSUPPORTED - attribute FRONT - attribute FRONT_AND_BACK - attribute FRONT_FACE - attribute FUNC_ADD - attribute FUNC_REVERSE_SUBTRACT - attribute FUNC_SUBTRACT - attribute GENERATE_MIPMAP_HINT - attribute GEQUAL - attribute GREATER - attribute GREEN_BITS - attribute HALF_FLOAT - attribute HIGH_FLOAT - attribute HIGH_INT - attribute IMPLEMENTATION_COLOR_READ_FORMAT - attribute IMPLEMENTATION_COLOR_READ_TYPE - attribute INCR - attribute INCR_WRAP - attribute INT - attribute INTERLEAVED_ATTRIBS - attribute INT_2_10_10_10_REV - attribute INT_SAMPLER_2D - attribute INT_SAMPLER_2D_ARRAY - attribute INT_SAMPLER_3D - attribute INT_SAMPLER_CUBE - attribute INT_VEC2 - attribute INT_VEC3 - attribute INT_VEC4 - attribute INVALID_ENUM - attribute INVALID_FRAMEBUFFER_OPERATION - attribute INVALID_INDEX - attribute INVALID_OPERATION - attribute INVALID_VALUE - attribute INVERT - attribute KEEP - attribute LEQUAL - attribute LESS - attribute LINEAR - attribute LINEAR_MIPMAP_LINEAR - attribute LINEAR_MIPMAP_NEAREST - attribute LINES - attribute LINE_LOOP - attribute LINE_STRIP - attribute LINE_WIDTH - attribute LINK_STATUS - attribute LOW_FLOAT - attribute LOW_INT - attribute LUMINANCE - attribute LUMINANCE_ALPHA - attribute MAX - attribute MAX_3D_TEXTURE_SIZE - attribute MAX_ARRAY_TEXTURE_LAYERS - attribute MAX_CLIENT_WAIT_TIMEOUT_WEBGL - attribute MAX_COLOR_ATTACHMENTS - attribute MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS - attribute MAX_COMBINED_TEXTURE_IMAGE_UNITS - attribute MAX_COMBINED_UNIFORM_BLOCKS - attribute MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS - attribute MAX_CUBE_MAP_TEXTURE_SIZE - attribute MAX_DRAW_BUFFERS - attribute MAX_ELEMENTS_INDICES - attribute MAX_ELEMENTS_VERTICES - attribute MAX_ELEMENT_INDEX - attribute MAX_FRAGMENT_INPUT_COMPONENTS - attribute MAX_FRAGMENT_UNIFORM_BLOCKS - attribute MAX_FRAGMENT_UNIFORM_COMPONENTS - attribute MAX_FRAGMENT_UNIFORM_VECTORS - attribute MAX_PROGRAM_TEXEL_OFFSET - attribute MAX_RENDERBUFFER_SIZE - attribute MAX_SAMPLES - attribute MAX_SERVER_WAIT_TIMEOUT - attribute MAX_TEXTURE_IMAGE_UNITS - attribute MAX_TEXTURE_LOD_BIAS - attribute MAX_TEXTURE_SIZE - attribute MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS - attribute MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS - attribute MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS - attribute MAX_UNIFORM_BLOCK_SIZE - attribute MAX_UNIFORM_BUFFER_BINDINGS - attribute MAX_VARYING_COMPONENTS - attribute MAX_VARYING_VECTORS - attribute MAX_VERTEX_ATTRIBS - attribute MAX_VERTEX_OUTPUT_COMPONENTS - attribute MAX_VERTEX_TEXTURE_IMAGE_UNITS - attribute MAX_VERTEX_UNIFORM_BLOCKS - attribute MAX_VERTEX_UNIFORM_COMPONENTS - attribute MAX_VERTEX_UNIFORM_VECTORS - attribute MAX_VIEWPORT_DIMS - attribute MEDIUM_FLOAT - attribute MEDIUM_INT - attribute MIN - attribute MIN_PROGRAM_TEXEL_OFFSET - attribute MIRRORED_REPEAT - attribute NEAREST - attribute NEAREST_MIPMAP_LINEAR - attribute NEAREST_MIPMAP_NEAREST - attribute NEVER - attribute NICEST - attribute NONE - attribute NOTEQUAL - attribute NO_ERROR - attribute OBJECT_TYPE - attribute ONE - attribute ONE_MINUS_CONSTANT_ALPHA - attribute ONE_MINUS_CONSTANT_COLOR - attribute ONE_MINUS_DST_ALPHA - attribute ONE_MINUS_DST_COLOR - attribute ONE_MINUS_SRC_ALPHA - attribute ONE_MINUS_SRC_COLOR - attribute OUT_OF_MEMORY - attribute PACK_ALIGNMENT - attribute PACK_ROW_LENGTH - attribute PACK_SKIP_PIXELS - attribute PACK_SKIP_ROWS - attribute PIXEL_PACK_BUFFER - attribute PIXEL_PACK_BUFFER_BINDING - attribute PIXEL_UNPACK_BUFFER - attribute PIXEL_UNPACK_BUFFER_BINDING - attribute POINTS - attribute POLYGON_OFFSET_FACTOR - attribute POLYGON_OFFSET_FILL - attribute POLYGON_OFFSET_UNITS - attribute QUERY_RESULT - attribute QUERY_RESULT_AVAILABLE - attribute R11F_G11F_B10F - attribute R16F - attribute R16I - attribute R16UI - attribute R32F - attribute R32I - attribute R32UI - attribute R8 - attribute R8I - attribute R8UI - attribute R8_SNORM - attribute RASTERIZER_DISCARD - attribute READ_BUFFER - attribute READ_FRAMEBUFFER - attribute READ_FRAMEBUFFER_BINDING - attribute RED - attribute RED_BITS - attribute RED_INTEGER - attribute RENDERBUFFER - attribute RENDERBUFFER_ALPHA_SIZE - attribute RENDERBUFFER_BINDING - attribute RENDERBUFFER_BLUE_SIZE - attribute RENDERBUFFER_DEPTH_SIZE - attribute RENDERBUFFER_GREEN_SIZE - attribute RENDERBUFFER_HEIGHT - attribute RENDERBUFFER_INTERNAL_FORMAT - attribute RENDERBUFFER_RED_SIZE - attribute RENDERBUFFER_SAMPLES - attribute RENDERBUFFER_STENCIL_SIZE - attribute RENDERBUFFER_WIDTH - attribute RENDERER - attribute REPEAT - attribute REPLACE - attribute RG - attribute RG16F - attribute RG16I - attribute RG16UI - attribute RG32F - attribute RG32I - attribute RG32UI - attribute RG8 - attribute RG8I - attribute RG8UI - attribute RG8_SNORM - attribute RGB - attribute RGB10_A2 - attribute RGB10_A2UI - attribute RGB16F - attribute RGB16I - attribute RGB16UI - attribute RGB32F - attribute RGB32I - attribute RGB32UI - attribute RGB565 - attribute RGB5_A1 - attribute RGB8 - attribute RGB8I - attribute RGB8UI - attribute RGB8_SNORM - attribute RGB9_E5 - attribute RGBA - attribute RGBA16F - attribute RGBA16I - attribute RGBA16UI - attribute RGBA32F - attribute RGBA32I - attribute RGBA32UI - attribute RGBA4 - attribute RGBA8 - attribute RGBA8I - attribute RGBA8UI - attribute RGBA8_SNORM - attribute RGBA_INTEGER - attribute RGB_INTEGER - attribute RG_INTEGER - attribute SAMPLER_2D - attribute SAMPLER_2D_ARRAY - attribute SAMPLER_2D_ARRAY_SHADOW - attribute SAMPLER_2D_SHADOW - attribute SAMPLER_3D - attribute SAMPLER_BINDING - attribute SAMPLER_CUBE - attribute SAMPLER_CUBE_SHADOW - attribute SAMPLES - attribute SAMPLE_ALPHA_TO_COVERAGE - attribute SAMPLE_BUFFERS - attribute SAMPLE_COVERAGE - attribute SAMPLE_COVERAGE_INVERT - attribute SAMPLE_COVERAGE_VALUE - attribute SCISSOR_BOX - attribute SCISSOR_TEST - attribute SEPARATE_ATTRIBS - attribute SHADER_TYPE - attribute SHADING_LANGUAGE_VERSION - attribute SHORT - attribute SIGNALED - attribute SIGNED_NORMALIZED - attribute SRC_ALPHA - attribute SRC_ALPHA_SATURATE - attribute SRC_COLOR - attribute SRGB - attribute SRGB8 - attribute SRGB8_ALPHA8 - attribute STATIC_COPY - attribute STATIC_DRAW - attribute STATIC_READ - attribute STENCIL - attribute STENCIL_ATTACHMENT - attribute STENCIL_BACK_FAIL - attribute STENCIL_BACK_FUNC - attribute STENCIL_BACK_PASS_DEPTH_FAIL - attribute STENCIL_BACK_PASS_DEPTH_PASS - attribute STENCIL_BACK_REF - attribute STENCIL_BACK_VALUE_MASK - attribute STENCIL_BACK_WRITEMASK - attribute STENCIL_BITS - attribute STENCIL_BUFFER_BIT - attribute STENCIL_CLEAR_VALUE - attribute STENCIL_FAIL - attribute STENCIL_FUNC - attribute STENCIL_INDEX - attribute STENCIL_INDEX8 - attribute STENCIL_PASS_DEPTH_FAIL - attribute STENCIL_PASS_DEPTH_PASS - attribute STENCIL_REF - attribute STENCIL_TEST - attribute STENCIL_VALUE_MASK - attribute STENCIL_WRITEMASK - attribute STREAM_COPY - attribute STREAM_DRAW - attribute STREAM_READ - attribute SUBPIXEL_BITS - attribute SYNC_CONDITION - attribute SYNC_FENCE - attribute SYNC_FLAGS - attribute SYNC_FLUSH_COMMANDS_BIT - attribute SYNC_GPU_COMMANDS_COMPLETE - attribute SYNC_STATUS - attribute TEXTURE - attribute TEXTURE0 - attribute TEXTURE1 - attribute TEXTURE10 - attribute TEXTURE11 - attribute TEXTURE12 - attribute TEXTURE13 - attribute TEXTURE14 - attribute TEXTURE15 - attribute TEXTURE16 - attribute TEXTURE17 - attribute TEXTURE18 - attribute TEXTURE19 - attribute TEXTURE2 - attribute TEXTURE20 - attribute TEXTURE21 - attribute TEXTURE22 - attribute TEXTURE23 - attribute TEXTURE24 - attribute TEXTURE25 - attribute TEXTURE26 - attribute TEXTURE27 - attribute TEXTURE28 - attribute TEXTURE29 - attribute TEXTURE3 - attribute TEXTURE30 - attribute TEXTURE31 - attribute TEXTURE4 - attribute TEXTURE5 - attribute TEXTURE6 - attribute TEXTURE7 - attribute TEXTURE8 - attribute TEXTURE9 - attribute TEXTURE_2D - attribute TEXTURE_2D_ARRAY - attribute TEXTURE_3D - attribute TEXTURE_BASE_LEVEL - attribute TEXTURE_BINDING_2D - attribute TEXTURE_BINDING_2D_ARRAY - attribute TEXTURE_BINDING_3D - attribute TEXTURE_BINDING_CUBE_MAP - attribute TEXTURE_COMPARE_FUNC - attribute TEXTURE_COMPARE_MODE - attribute TEXTURE_CUBE_MAP - attribute TEXTURE_CUBE_MAP_NEGATIVE_X - attribute TEXTURE_CUBE_MAP_NEGATIVE_Y - attribute TEXTURE_CUBE_MAP_NEGATIVE_Z - attribute TEXTURE_CUBE_MAP_POSITIVE_X - attribute TEXTURE_CUBE_MAP_POSITIVE_Y - attribute TEXTURE_CUBE_MAP_POSITIVE_Z - attribute TEXTURE_IMMUTABLE_FORMAT - attribute TEXTURE_IMMUTABLE_LEVELS - attribute TEXTURE_MAG_FILTER - attribute TEXTURE_MAX_LEVEL - attribute TEXTURE_MAX_LOD - attribute TEXTURE_MIN_FILTER - attribute TEXTURE_MIN_LOD - attribute TEXTURE_WRAP_R - attribute TEXTURE_WRAP_S - attribute TEXTURE_WRAP_T - attribute TIMEOUT_EXPIRED - attribute TIMEOUT_IGNORED - attribute TRANSFORM_FEEDBACK - attribute TRANSFORM_FEEDBACK_ACTIVE - attribute TRANSFORM_FEEDBACK_BINDING - attribute TRANSFORM_FEEDBACK_BUFFER - attribute TRANSFORM_FEEDBACK_BUFFER_BINDING - attribute TRANSFORM_FEEDBACK_BUFFER_MODE - attribute TRANSFORM_FEEDBACK_BUFFER_SIZE - attribute TRANSFORM_FEEDBACK_BUFFER_START - attribute TRANSFORM_FEEDBACK_PAUSED - attribute TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN - attribute TRANSFORM_FEEDBACK_VARYINGS - attribute TRIANGLES - attribute TRIANGLE_FAN - attribute TRIANGLE_STRIP - attribute UNIFORM_ARRAY_STRIDE - attribute UNIFORM_BLOCK_ACTIVE_UNIFORMS - attribute UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES - attribute UNIFORM_BLOCK_BINDING - attribute UNIFORM_BLOCK_DATA_SIZE - attribute UNIFORM_BLOCK_INDEX - attribute UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER - attribute UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER - attribute UNIFORM_BUFFER - attribute UNIFORM_BUFFER_BINDING - attribute UNIFORM_BUFFER_OFFSET_ALIGNMENT - attribute UNIFORM_BUFFER_SIZE - attribute UNIFORM_BUFFER_START - attribute UNIFORM_IS_ROW_MAJOR - attribute UNIFORM_MATRIX_STRIDE - attribute UNIFORM_OFFSET - attribute UNIFORM_SIZE - attribute UNIFORM_TYPE - attribute UNPACK_ALIGNMENT - attribute UNPACK_COLORSPACE_CONVERSION_WEBGL - attribute UNPACK_FLIP_Y_WEBGL - attribute UNPACK_IMAGE_HEIGHT - attribute UNPACK_PREMULTIPLY_ALPHA_WEBGL - attribute UNPACK_ROW_LENGTH - attribute UNPACK_SKIP_IMAGES - attribute UNPACK_SKIP_PIXELS - attribute UNPACK_SKIP_ROWS - attribute UNSIGNALED - attribute UNSIGNED_BYTE - attribute UNSIGNED_INT - attribute UNSIGNED_INT_10F_11F_11F_REV - attribute UNSIGNED_INT_24_8 - attribute UNSIGNED_INT_2_10_10_10_REV - attribute UNSIGNED_INT_5_9_9_9_REV - attribute UNSIGNED_INT_SAMPLER_2D - attribute UNSIGNED_INT_SAMPLER_2D_ARRAY - attribute UNSIGNED_INT_SAMPLER_3D - attribute UNSIGNED_INT_SAMPLER_CUBE - attribute UNSIGNED_INT_VEC2 - attribute UNSIGNED_INT_VEC3 - attribute UNSIGNED_INT_VEC4 - attribute UNSIGNED_NORMALIZED - attribute UNSIGNED_SHORT - attribute UNSIGNED_SHORT_4_4_4_4 - attribute UNSIGNED_SHORT_5_5_5_1 - attribute UNSIGNED_SHORT_5_6_5 - attribute VALIDATE_STATUS - attribute VENDOR - attribute VERSION - attribute VERTEX_ARRAY_BINDING - attribute VERTEX_ATTRIB_ARRAY_BUFFER_BINDING - attribute VERTEX_ATTRIB_ARRAY_DIVISOR - attribute VERTEX_ATTRIB_ARRAY_ENABLED - attribute VERTEX_ATTRIB_ARRAY_INTEGER - attribute VERTEX_ATTRIB_ARRAY_NORMALIZED - attribute VERTEX_ATTRIB_ARRAY_POINTER - attribute VERTEX_ATTRIB_ARRAY_SIZE - attribute VERTEX_ATTRIB_ARRAY_STRIDE - attribute VERTEX_ATTRIB_ARRAY_TYPE - attribute VERTEX_SHADER - attribute VIEWPORT - attribute WAIT_FAILED - attribute ZERO - getter canvas - getter drawingBufferHeight - getter drawingBufferWidth - method activeTexture - method attachShader - method beginQuery - method beginTransformFeedback - method bindAttribLocation - method bindBuffer - method bindBufferBase - method bindBufferRange - method bindFramebuffer - method bindRenderbuffer - method bindSampler - method bindTexture - method bindTransformFeedback - method bindVertexArray - method blendColor - method blendEquation - method blendEquationSeparate - method blendFunc - method blendFuncSeparate - method blitFramebuffer - method bufferData - method bufferSubData - method checkFramebufferStatus - method clear - method clearBufferfi - method clearBufferfv - method clearBufferiv - method clearBufferuiv - method clearColor - method clearDepth - method clearStencil - method clientWaitSync - method colorMask - method compileShader - method compressedTexImage2D - method compressedTexImage3D - method compressedTexSubImage2D - method compressedTexSubImage3D - method constructor - method copyBufferSubData - method copyTexImage2D - method copyTexSubImage2D - method copyTexSubImage3D - method createBuffer - method createFramebuffer - method createProgram - method createQuery - method createRenderbuffer - method createSampler - method createShader - method createTexture - method createTransformFeedback - method createVertexArray - method cullFace - method deleteBuffer - method deleteFramebuffer - method deleteProgram - method deleteQuery - method deleteRenderbuffer - method deleteSampler - method deleteShader - method deleteSync - method deleteTexture - method deleteTransformFeedback - method deleteVertexArray - method depthFunc - method depthMask - method depthRange - method detachShader - method disable - method disableVertexAttribArray - method drawArrays - method drawArraysInstanced - method drawBuffers - method drawElements - method drawElementsInstanced - method drawRangeElements - method enable - method enableVertexAttribArray - method endQuery - method endTransformFeedback - method fenceSync - method finish - method flush - method framebufferRenderbuffer - method framebufferTexture2D - method framebufferTextureLayer - method frontFace - method generateMipmap - method getActiveAttrib - method getActiveUniform - method getActiveUniformBlockName - method getActiveUniformBlockParameter - method getActiveUniforms - method getAttachedShaders - method getAttribLocation - method getBufferParameter - method getBufferSubData - method getContextAttributes - method getError - method getExtension - method getFragDataLocation - method getFramebufferAttachmentParameter - method getIndexedParameter - method getInternalformatParameter - method getParameter - method getProgramInfoLog - method getProgramParameter - method getQuery - method getQueryParameter - method getRenderbufferParameter - method getSamplerParameter - method getShaderInfoLog - method getShaderParameter - method getShaderPrecisionFormat - method getShaderSource - method getSupportedExtensions - method getSyncParameter - method getTexParameter - method getTransformFeedbackVarying - method getUniform - method getUniformBlockIndex - method getUniformIndices - method getUniformLocation - method getVertexAttrib - method getVertexAttribOffset - method hint - method invalidateFramebuffer - method invalidateSubFramebuffer - method isBuffer - method isContextLost - method isEnabled - method isFramebuffer - method isProgram - method isQuery - method isRenderbuffer - method isSampler - method isShader - method isSync - method isTexture - method isTransformFeedback - method isVertexArray - method lineWidth - method linkProgram - method pauseTransformFeedback - method pixelStorei - method polygonOffset - method readBuffer - method readPixels - method renderbufferStorage - method renderbufferStorageMultisample - method resumeTransformFeedback - method sampleCoverage - method samplerParameterf - method samplerParameteri - method scissor - method shaderSource - method stencilFunc - method stencilFuncSeparate - method stencilMask - method stencilMaskSeparate - method stencilOp - method stencilOpSeparate - method texImage2D - method texImage3D - method texParameterf - method texParameteri - method texStorage2D - method texStorage3D - method texSubImage2D - method texSubImage3D - method transformFeedbackVaryings - method uniform1f - method uniform1fv - method uniform1i - method uniform1iv - method uniform1ui - method uniform1uiv - method uniform2f - method uniform2fv - method uniform2i - method uniform2iv - method uniform2ui - method uniform2uiv - method uniform3f - method uniform3fv - method uniform3i - method uniform3iv - method uniform3ui - method uniform3uiv - method uniform4f - method uniform4fv - method uniform4i - method uniform4iv - method uniform4ui - method uniform4uiv - method uniformBlockBinding - method uniformMatrix2fv - method uniformMatrix2x3fv - method uniformMatrix2x4fv - method uniformMatrix3fv - method uniformMatrix3x2fv - method uniformMatrix3x4fv - method uniformMatrix4fv - method uniformMatrix4x2fv - method uniformMatrix4x3fv - method useProgram - method validateProgram - method vertexAttrib1f - method vertexAttrib1fv - method vertexAttrib2f - method vertexAttrib2fv - method vertexAttrib3f - method vertexAttrib3fv - method vertexAttrib4f - method vertexAttrib4fv - method vertexAttribDivisor - method vertexAttribI4i - method vertexAttribI4iv - method vertexAttribI4ui - method vertexAttribI4uiv - method vertexAttribIPointer - method vertexAttribPointer - method viewport - method waitSync -interface WebGLActiveInfo - attribute @@toStringTag - getter name - getter size - getter type - method constructor -interface WebGLBuffer - attribute @@toStringTag - method constructor -interface WebGLContextEvent : Event - attribute @@toStringTag - getter statusMessage - method constructor -interface WebGLFramebuffer - attribute @@toStringTag - method constructor -interface WebGLProgram - attribute @@toStringTag - method constructor -interface WebGLQuery - attribute @@toStringTag - method constructor -interface WebGLRenderbuffer - attribute @@toStringTag - method constructor -interface WebGLRenderingContext - attribute @@toStringTag - attribute ACTIVE_ATTRIBUTES - attribute ACTIVE_TEXTURE - attribute ACTIVE_UNIFORMS - attribute ALIASED_LINE_WIDTH_RANGE - attribute ALIASED_POINT_SIZE_RANGE - attribute ALPHA - attribute ALPHA_BITS - attribute ALWAYS - attribute ARRAY_BUFFER - attribute ARRAY_BUFFER_BINDING - attribute ATTACHED_SHADERS - attribute BACK - attribute BLEND - attribute BLEND_COLOR - attribute BLEND_DST_ALPHA - attribute BLEND_DST_RGB - attribute BLEND_EQUATION - attribute BLEND_EQUATION_ALPHA - attribute BLEND_EQUATION_RGB - attribute BLEND_SRC_ALPHA - attribute BLEND_SRC_RGB - attribute BLUE_BITS - attribute BOOL - attribute BOOL_VEC2 - attribute BOOL_VEC3 - attribute BOOL_VEC4 - attribute BROWSER_DEFAULT_WEBGL - attribute BUFFER_SIZE - attribute BUFFER_USAGE - attribute BYTE - attribute CCW - attribute CLAMP_TO_EDGE - attribute COLOR_ATTACHMENT0 - attribute COLOR_BUFFER_BIT - attribute COLOR_CLEAR_VALUE - attribute COLOR_WRITEMASK - attribute COMPILE_STATUS - attribute COMPRESSED_TEXTURE_FORMATS - attribute CONSTANT_ALPHA - attribute CONSTANT_COLOR - attribute CONTEXT_LOST_WEBGL - attribute CULL_FACE - attribute CULL_FACE_MODE - attribute CURRENT_PROGRAM - attribute CURRENT_VERTEX_ATTRIB - attribute CW - attribute DECR - attribute DECR_WRAP - attribute DELETE_STATUS - attribute DEPTH_ATTACHMENT - attribute DEPTH_BITS - attribute DEPTH_BUFFER_BIT - attribute DEPTH_CLEAR_VALUE - attribute DEPTH_COMPONENT - attribute DEPTH_COMPONENT16 - attribute DEPTH_FUNC - attribute DEPTH_RANGE - attribute DEPTH_STENCIL - attribute DEPTH_STENCIL_ATTACHMENT - attribute DEPTH_TEST - attribute DEPTH_WRITEMASK - attribute DITHER - attribute DONT_CARE - attribute DST_ALPHA - attribute DST_COLOR - attribute DYNAMIC_DRAW - attribute ELEMENT_ARRAY_BUFFER - attribute ELEMENT_ARRAY_BUFFER_BINDING - attribute EQUAL - attribute FASTEST - attribute FLOAT - attribute FLOAT_MAT2 - attribute FLOAT_MAT3 - attribute FLOAT_MAT4 - attribute FLOAT_VEC2 - attribute FLOAT_VEC3 - attribute FLOAT_VEC4 - attribute FRAGMENT_SHADER - attribute FRAMEBUFFER - attribute FRAMEBUFFER_ATTACHMENT_OBJECT_NAME - attribute FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE - attribute FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE - attribute FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL - attribute FRAMEBUFFER_BINDING - attribute FRAMEBUFFER_COMPLETE - attribute FRAMEBUFFER_INCOMPLETE_ATTACHMENT - attribute FRAMEBUFFER_INCOMPLETE_DIMENSIONS - attribute FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT - attribute FRAMEBUFFER_UNSUPPORTED - attribute FRONT - attribute FRONT_AND_BACK - attribute FRONT_FACE - attribute FUNC_ADD - attribute FUNC_REVERSE_SUBTRACT - attribute FUNC_SUBTRACT - attribute GENERATE_MIPMAP_HINT - attribute GEQUAL - attribute GREATER - attribute GREEN_BITS - attribute HIGH_FLOAT - attribute HIGH_INT - attribute IMPLEMENTATION_COLOR_READ_FORMAT - attribute IMPLEMENTATION_COLOR_READ_TYPE - attribute INCR - attribute INCR_WRAP - attribute INT - attribute INT_VEC2 - attribute INT_VEC3 - attribute INT_VEC4 - attribute INVALID_ENUM - attribute INVALID_FRAMEBUFFER_OPERATION - attribute INVALID_OPERATION - attribute INVALID_VALUE - attribute INVERT - attribute KEEP - attribute LEQUAL - attribute LESS - attribute LINEAR - attribute LINEAR_MIPMAP_LINEAR - attribute LINEAR_MIPMAP_NEAREST - attribute LINES - attribute LINE_LOOP - attribute LINE_STRIP - attribute LINE_WIDTH - attribute LINK_STATUS - attribute LOW_FLOAT - attribute LOW_INT - attribute LUMINANCE - attribute LUMINANCE_ALPHA - attribute MAX_COMBINED_TEXTURE_IMAGE_UNITS - attribute MAX_CUBE_MAP_TEXTURE_SIZE - attribute MAX_FRAGMENT_UNIFORM_VECTORS - attribute MAX_RENDERBUFFER_SIZE - attribute MAX_TEXTURE_IMAGE_UNITS - attribute MAX_TEXTURE_SIZE - attribute MAX_VARYING_VECTORS - attribute MAX_VERTEX_ATTRIBS - attribute MAX_VERTEX_TEXTURE_IMAGE_UNITS - attribute MAX_VERTEX_UNIFORM_VECTORS - attribute MAX_VIEWPORT_DIMS - attribute MEDIUM_FLOAT - attribute MEDIUM_INT - attribute MIRRORED_REPEAT - attribute NEAREST - attribute NEAREST_MIPMAP_LINEAR - attribute NEAREST_MIPMAP_NEAREST - attribute NEVER - attribute NICEST - attribute NONE - attribute NOTEQUAL - attribute NO_ERROR - attribute ONE - attribute ONE_MINUS_CONSTANT_ALPHA - attribute ONE_MINUS_CONSTANT_COLOR - attribute ONE_MINUS_DST_ALPHA - attribute ONE_MINUS_DST_COLOR - attribute ONE_MINUS_SRC_ALPHA - attribute ONE_MINUS_SRC_COLOR - attribute OUT_OF_MEMORY - attribute PACK_ALIGNMENT - attribute POINTS - attribute POLYGON_OFFSET_FACTOR - attribute POLYGON_OFFSET_FILL - attribute POLYGON_OFFSET_UNITS - attribute RED_BITS - attribute RENDERBUFFER - attribute RENDERBUFFER_ALPHA_SIZE - attribute RENDERBUFFER_BINDING - attribute RENDERBUFFER_BLUE_SIZE - attribute RENDERBUFFER_DEPTH_SIZE - attribute RENDERBUFFER_GREEN_SIZE - attribute RENDERBUFFER_HEIGHT - attribute RENDERBUFFER_INTERNAL_FORMAT - attribute RENDERBUFFER_RED_SIZE - attribute RENDERBUFFER_STENCIL_SIZE - attribute RENDERBUFFER_WIDTH - attribute RENDERER - attribute REPEAT - attribute REPLACE - attribute RGB - attribute RGB565 - attribute RGB5_A1 - attribute RGBA - attribute RGBA4 - attribute SAMPLER_2D - attribute SAMPLER_CUBE - attribute SAMPLES - attribute SAMPLE_ALPHA_TO_COVERAGE - attribute SAMPLE_BUFFERS - attribute SAMPLE_COVERAGE - attribute SAMPLE_COVERAGE_INVERT - attribute SAMPLE_COVERAGE_VALUE - attribute SCISSOR_BOX - attribute SCISSOR_TEST - attribute SHADER_TYPE - attribute SHADING_LANGUAGE_VERSION - attribute SHORT - attribute SRC_ALPHA - attribute SRC_ALPHA_SATURATE - attribute SRC_COLOR - attribute STATIC_DRAW - attribute STENCIL_ATTACHMENT - attribute STENCIL_BACK_FAIL - attribute STENCIL_BACK_FUNC - attribute STENCIL_BACK_PASS_DEPTH_FAIL - attribute STENCIL_BACK_PASS_DEPTH_PASS - attribute STENCIL_BACK_REF - attribute STENCIL_BACK_VALUE_MASK - attribute STENCIL_BACK_WRITEMASK - attribute STENCIL_BITS - attribute STENCIL_BUFFER_BIT - attribute STENCIL_CLEAR_VALUE - attribute STENCIL_FAIL - attribute STENCIL_FUNC - attribute STENCIL_INDEX - attribute STENCIL_INDEX8 - attribute STENCIL_PASS_DEPTH_FAIL - attribute STENCIL_PASS_DEPTH_PASS - attribute STENCIL_REF - attribute STENCIL_TEST - attribute STENCIL_VALUE_MASK - attribute STENCIL_WRITEMASK - attribute STREAM_DRAW - attribute SUBPIXEL_BITS - attribute TEXTURE - attribute TEXTURE0 - attribute TEXTURE1 - attribute TEXTURE10 - attribute TEXTURE11 - attribute TEXTURE12 - attribute TEXTURE13 - attribute TEXTURE14 - attribute TEXTURE15 - attribute TEXTURE16 - attribute TEXTURE17 - attribute TEXTURE18 - attribute TEXTURE19 - attribute TEXTURE2 - attribute TEXTURE20 - attribute TEXTURE21 - attribute TEXTURE22 - attribute TEXTURE23 - attribute TEXTURE24 - attribute TEXTURE25 - attribute TEXTURE26 - attribute TEXTURE27 - attribute TEXTURE28 - attribute TEXTURE29 - attribute TEXTURE3 - attribute TEXTURE30 - attribute TEXTURE31 - attribute TEXTURE4 - attribute TEXTURE5 - attribute TEXTURE6 - attribute TEXTURE7 - attribute TEXTURE8 - attribute TEXTURE9 - attribute TEXTURE_2D - attribute TEXTURE_BINDING_2D - attribute TEXTURE_BINDING_CUBE_MAP - attribute TEXTURE_CUBE_MAP - attribute TEXTURE_CUBE_MAP_NEGATIVE_X - attribute TEXTURE_CUBE_MAP_NEGATIVE_Y - attribute TEXTURE_CUBE_MAP_NEGATIVE_Z - attribute TEXTURE_CUBE_MAP_POSITIVE_X - attribute TEXTURE_CUBE_MAP_POSITIVE_Y - attribute TEXTURE_CUBE_MAP_POSITIVE_Z - attribute TEXTURE_MAG_FILTER - attribute TEXTURE_MIN_FILTER - attribute TEXTURE_WRAP_S - attribute TEXTURE_WRAP_T - attribute TRIANGLES - attribute TRIANGLE_FAN - attribute TRIANGLE_STRIP - attribute UNPACK_ALIGNMENT - attribute UNPACK_COLORSPACE_CONVERSION_WEBGL - attribute UNPACK_FLIP_Y_WEBGL - attribute UNPACK_PREMULTIPLY_ALPHA_WEBGL - attribute UNSIGNED_BYTE - attribute UNSIGNED_INT - attribute UNSIGNED_SHORT - attribute UNSIGNED_SHORT_4_4_4_4 - attribute UNSIGNED_SHORT_5_5_5_1 - attribute UNSIGNED_SHORT_5_6_5 - attribute VALIDATE_STATUS - attribute VENDOR - attribute VERSION - attribute VERTEX_ATTRIB_ARRAY_BUFFER_BINDING - attribute VERTEX_ATTRIB_ARRAY_ENABLED - attribute VERTEX_ATTRIB_ARRAY_NORMALIZED - attribute VERTEX_ATTRIB_ARRAY_POINTER - attribute VERTEX_ATTRIB_ARRAY_SIZE - attribute VERTEX_ATTRIB_ARRAY_STRIDE - attribute VERTEX_ATTRIB_ARRAY_TYPE - attribute VERTEX_SHADER - attribute VIEWPORT - attribute ZERO - getter canvas - getter drawingBufferHeight - getter drawingBufferWidth - method activeTexture - method attachShader - method bindAttribLocation - method bindBuffer - method bindFramebuffer - method bindRenderbuffer - method bindTexture - method blendColor - method blendEquation - method blendEquationSeparate - method blendFunc - method blendFuncSeparate - method bufferData - method bufferSubData - method checkFramebufferStatus - method clear - method clearColor - method clearDepth - method clearStencil - method colorMask - method compileShader - method compressedTexImage2D - method compressedTexSubImage2D - method constructor - method copyTexImage2D - method copyTexSubImage2D - method createBuffer - method createFramebuffer - method createProgram - method createRenderbuffer - method createShader - method createTexture - method cullFace - method deleteBuffer - method deleteFramebuffer - method deleteProgram - method deleteRenderbuffer - method deleteShader - method deleteTexture - method depthFunc - method depthMask - method depthRange - method detachShader - method disable - method disableVertexAttribArray - method drawArrays - method drawElements - method enable - method enableVertexAttribArray - method finish - method flush - method framebufferRenderbuffer - method framebufferTexture2D - method frontFace - method generateMipmap - method getActiveAttrib - method getActiveUniform - method getAttachedShaders - method getAttribLocation - method getBufferParameter - method getContextAttributes - method getError - method getExtension - method getFramebufferAttachmentParameter - method getParameter - method getProgramInfoLog - method getProgramParameter - method getRenderbufferParameter - method getShaderInfoLog - method getShaderParameter - method getShaderPrecisionFormat - method getShaderSource - method getSupportedExtensions - method getTexParameter - method getUniform - method getUniformLocation - method getVertexAttrib - method getVertexAttribOffset - method hint - method isBuffer - method isContextLost - method isEnabled - method isFramebuffer - method isProgram - method isRenderbuffer - method isShader - method isTexture - method lineWidth - method linkProgram - method pixelStorei - method polygonOffset - method readPixels - method renderbufferStorage - method sampleCoverage - method scissor - method shaderSource - method stencilFunc - method stencilFuncSeparate - method stencilMask - method stencilMaskSeparate - method stencilOp - method stencilOpSeparate - method texImage2D - method texParameterf - method texParameteri - method texSubImage2D - method uniform1f - method uniform1fv - method uniform1i - method uniform1iv - method uniform2f - method uniform2fv - method uniform2i - method uniform2iv - method uniform3f - method uniform3fv - method uniform3i - method uniform3iv - method uniform4f - method uniform4fv - method uniform4i - method uniform4iv - method uniformMatrix2fv - method uniformMatrix3fv - method uniformMatrix4fv - method useProgram - method validateProgram - method vertexAttrib1f - method vertexAttrib1fv - method vertexAttrib2f - method vertexAttrib2fv - method vertexAttrib3f - method vertexAttrib3fv - method vertexAttrib4f - method vertexAttrib4fv - method vertexAttribPointer - method viewport -interface WebGLSampler - attribute @@toStringTag - method constructor -interface WebGLShader - attribute @@toStringTag - method constructor -interface WebGLShaderPrecisionFormat - attribute @@toStringTag - getter precision - getter rangeMax - getter rangeMin - method constructor -interface WebGLSync - attribute @@toStringTag - method constructor -interface WebGLTexture - attribute @@toStringTag - method constructor -interface WebGLTransformFeedback - attribute @@toStringTag - method constructor -interface WebGLUniformLocation - attribute @@toStringTag - method constructor -interface WebGLVertexArrayObject - attribute @@toStringTag - method constructor -interface WebKitAnimationEvent : Event - attribute @@toStringTag - getter animationName - getter elapsedTime - method constructor -interface WebKitCSSMatrix - attribute @@toStringTag - getter a - getter b - getter c - getter d - getter e - getter f - getter m11 - getter m12 - getter m13 - getter m14 - getter m21 - getter m22 - getter m23 - getter m24 - getter m31 - getter m32 - getter m33 - getter m34 - getter m41 - getter m42 - getter m43 - getter m44 - method constructor - method inverse - method multiply - method rotate - method rotateAxisAngle - method scale - method setMatrixValue - method skewX - method skewY - method toString - method translate - setter a - setter b - setter c - setter d - setter e - setter f - setter m11 - setter m12 - setter m13 - setter m14 - setter m21 - setter m22 - setter m23 - setter m24 - setter m31 - setter m32 - setter m33 - setter m34 - setter m41 - setter m42 - setter m43 - setter m44 -interface WebKitMutationObserver - attribute @@toStringTag - method constructor - method disconnect - method observe - method takeRecords -interface WebKitTransitionEvent : Event - attribute @@toStringTag - getter elapsedTime - getter propertyName - getter pseudoElement - method constructor -interface WebSocket : EventTarget - attribute @@toStringTag - attribute CLOSED - attribute CLOSING - attribute CONNECTING - attribute OPEN - getter binaryType - getter bufferedAmount - getter extensions - getter onclose - getter onerror - getter onmessage - getter onopen - getter protocol - getter readyState - getter url - method close - method constructor - method send - setter binaryType - setter onclose - setter onerror - setter onmessage - setter onopen -interface WheelEvent : MouseEvent - attribute @@toStringTag - attribute DOM_DELTA_LINE - attribute DOM_DELTA_PAGE - attribute DOM_DELTA_PIXEL - getter deltaMode - getter deltaX - getter deltaY - getter deltaZ - getter wheelDelta - getter wheelDeltaX - getter wheelDeltaY - method constructor -interface Window : EventTarget - attribute @@toStringTag - attribute PERSISTENT - attribute TEMPORARY - method constructor -interface Worker : EventTarget - attribute @@toStringTag - getter onerror - getter onmessage - method constructor - method postMessage - method terminate - setter onerror - setter onmessage -interface XMLDocument : Document - attribute @@toStringTag - method constructor -interface XMLHttpRequest : XMLHttpRequestEventTarget - attribute @@toStringTag - attribute DONE - attribute HEADERS_RECEIVED - attribute LOADING - attribute OPENED - attribute UNSENT - getter onreadystatechange - getter readyState - getter response - getter responseText - getter responseType - getter responseURL - getter responseXML - getter status - getter statusText - getter timeout - getter upload - getter withCredentials - method abort - method constructor - method getAllResponseHeaders - method getResponseHeader - method open - method overrideMimeType - method send - method setRequestHeader - setter onreadystatechange - setter responseType - setter timeout - setter withCredentials -interface XMLHttpRequestEventTarget : EventTarget - attribute @@toStringTag - getter onabort - getter onerror - getter onload - getter onloadend - getter onloadstart - getter onprogress - getter ontimeout - method constructor - setter onabort - setter onerror - setter onload - setter onloadend - setter onloadstart - setter onprogress - setter ontimeout -interface XMLHttpRequestUpload : XMLHttpRequestEventTarget - attribute @@toStringTag - method constructor -interface XMLSerializer - attribute @@toStringTag - method constructor - method serializeToString -interface XPathEvaluator - attribute @@toStringTag - method constructor - method createExpression - method createNSResolver - method evaluate -interface XPathExpression - attribute @@toStringTag - method constructor - method evaluate -interface XPathResult - attribute @@toStringTag - attribute ANY_TYPE - attribute ANY_UNORDERED_NODE_TYPE - attribute BOOLEAN_TYPE - attribute FIRST_ORDERED_NODE_TYPE - attribute NUMBER_TYPE - attribute ORDERED_NODE_ITERATOR_TYPE - attribute ORDERED_NODE_SNAPSHOT_TYPE - attribute STRING_TYPE - attribute UNORDERED_NODE_ITERATOR_TYPE - attribute UNORDERED_NODE_SNAPSHOT_TYPE - getter booleanValue - getter invalidIteratorState - getter numberValue - getter resultType - getter singleNodeValue - getter snapshotLength - getter stringValue - method constructor - method iterateNext - method snapshotItem -interface XSLTProcessor - attribute @@toStringTag - method clearParameters - method constructor - method getParameter - method importStylesheet - method removeParameter - method reset - method setParameter - method transformToDocument - method transformToFragment -interface webkitMediaStream : EventTarget - attribute @@toStringTag - getter active - getter id - getter onactive - getter onaddtrack - getter oninactive - getter onremovetrack - method addTrack - method clone - method constructor - method getAudioTracks - method getTrackById - method getTracks - method getVideoTracks - method removeTrack - setter onactive - setter onaddtrack - setter oninactive - setter onremovetrack -interface webkitRTCPeerConnection : EventTarget - static method generateCertificate - attribute @@toStringTag - getter iceConnectionState - getter iceGatheringState - getter localDescription - getter onaddstream - getter ondatachannel - getter onicecandidate - getter oniceconnectionstatechange - getter onnegotiationneeded - getter onremovestream - getter onsignalingstatechange - getter remoteDescription - getter signalingState - method addIceCandidate - method addStream - method close - method constructor - method createAnswer - method createDTMFSender - method createDataChannel - method createOffer - method getLocalStreams - method getRemoteStreams - method getStats - method getStreamById - method removeStream - method setLocalDescription - method setRemoteDescription - method updateIce - setter onaddstream - setter ondatachannel - setter onicecandidate - setter oniceconnectionstatechange - setter onnegotiationneeded - setter onremovestream - setter onsignalingstatechange -interface webkitSpeechGrammar - attribute @@toStringTag - getter src - getter weight - method constructor - setter src - setter weight -interface webkitSpeechGrammarList - attribute @@toStringTag - getter length - method @@iterator - method addFromString - method addFromUri - method constructor - method item -interface webkitSpeechRecognition : EventTarget - attribute @@toStringTag - getter continuous - getter grammars - getter interimResults - getter lang - getter maxAlternatives - getter onaudioend - getter onaudiostart - getter onend - getter onerror - getter onnomatch - getter onresult - getter onsoundend - getter onsoundstart - getter onspeechend - getter onspeechstart - getter onstart - method abort - method constructor - method start - method stop - setter continuous - setter grammars - setter interimResults - setter lang - setter maxAlternatives - setter onaudioend - setter onaudiostart - setter onend - setter onerror - setter onnomatch - setter onresult - setter onsoundend - setter onsoundstart - setter onspeechend - setter onspeechstart - setter onstart -interface webkitSpeechRecognitionError : Event - attribute @@toStringTag - getter error - getter message - method constructor -interface webkitSpeechRecognitionEvent : Event - attribute @@toStringTag - getter emma - getter interpretation - getter resultIndex - getter results - method constructor -interface webkitURL - static method createObjectURL - static method revokeObjectURL - attribute @@toStringTag - getter hash - getter host - getter hostname - getter href - getter origin - getter password - getter pathname - getter port - getter protocol - getter search - getter searchParams - getter username - method constructor - method toString - setter hash - setter host - setter hostname - setter href - setter password - setter pathname - setter port - setter protocol - setter search - setter username -[GLOBAL OBJECT] - attribute GCController - attribute accessibilityController - attribute chrome - attribute closed - attribute console - attribute eventSender - attribute frames - attribute gamepadController - attribute internals - attribute layoutTestController - attribute length - attribute location - attribute mojo - attribute opener - attribute parent - attribute propertyNamesInGlobal - attribute self - attribute testRunner - attribute textInputController - attribute top - attribute window - getter applicationCache - getter caches - getter clientInformation - getter crypto - getter customElements - getter defaultStatus - getter defaultstatus - getter devicePixelRatio - getter document - getter event - getter external - getter frameElement - getter history - getter indexedDB - getter innerHeight - getter innerWidth - getter isSecureContext - getter localStorage - getter locationbar - getter menubar - getter name - getter navigator - getter offscreenBuffering - getter onabort - getter onanimationend - getter onanimationiteration - getter onanimationstart - getter onauxclick - getter onbeforeunload - getter onblur - getter oncancel - getter oncanplay - getter oncanplaythrough - getter onchange - getter onclick - getter onclose - getter oncontextmenu - getter oncuechange - getter ondblclick - getter ondevicemotion - getter ondeviceorientation - getter ondeviceorientationabsolute - getter ondrag - getter ondragend - getter ondragenter - getter ondragleave - getter ondragover - getter ondragstart - getter ondrop - getter ondurationchange - getter onemptied - getter onended - getter onerror - getter onfocus - getter ongotpointercapture - getter onhashchange - getter oninput - getter oninvalid - getter onkeydown - getter onkeypress - getter onkeyup - getter onlanguagechange - getter onload - getter onloadeddata - getter onloadedmetadata - getter onloadstart - getter onlostpointercapture - getter onmessage - getter onmousedown - getter onmouseenter - getter onmouseleave - getter onmousemove - getter onmouseout - getter onmouseover - getter onmouseup - getter onmousewheel - getter onoffline - getter ononline - getter onpagehide - getter onpageshow - getter onpause - getter onplay - getter onplaying - getter onpointercancel - getter onpointerdown - getter onpointerenter - getter onpointerleave - getter onpointermove - getter onpointerout - getter onpointerover - getter onpointerup - getter onpopstate - getter onprogress - getter onratechange - getter onrejectionhandled - getter onreset - getter onresize - getter onscroll - getter onsearch - getter onseeked - getter onseeking - getter onselect - getter onshow - getter onstalled - getter onstorage - getter onsubmit - getter onsuspend - getter ontimeupdate - getter ontoggle - getter ontouchcancel - getter ontouchend - getter ontouchmove - getter ontouchstart - getter ontransitionend - getter onunhandledrejection - getter onunload - getter onvolumechange - getter onwaiting - getter onwebkitanimationend - getter onwebkitanimationiteration - getter onwebkitanimationstart - getter onwebkittransitionend - getter onwheel - getter outerHeight - getter outerWidth - getter pageXOffset - getter pageYOffset - getter performance - getter personalbar - getter screen - getter screenLeft - getter screenTop - getter screenX - getter screenY - getter scrollX - getter scrollY - getter scrollbars - getter sessionStorage - getter speechSynthesis - getter status - getter statusbar - getter styleMedia - getter toolbar - getter webkitStorageInfo - method alert - method atob - method blur - method btoa - method cancelAnimationFrame - method cancelIdleCallback - method captureEvents - method clearInterval - method clearTimeout - method close - method confirm - method createImageBitmap - method fetch - method find - method focus - method gc - method getComputedStyle - method getMatchedCSSRules - method getSelection - method matchMedia - method moveBy - method moveTo - method open - method openDatabase - method postMessage - method print - method prompt - method releaseEvents - method requestAnimationFrame - method requestIdleCallback - method resizeBy - method resizeTo - method scroll - method scrollBy - method scrollTo - method setInterval - method setTimeout - method stop - method webkitCancelAnimationFrame - method webkitRequestAnimationFrame - method webkitRequestFileSystem - method webkitResolveLocalFileSystemURL - setter clientInformation - setter defaultStatus - setter defaultstatus - setter devicePixelRatio - setter event - setter external - setter innerHeight - setter innerWidth - setter locationbar - setter menubar - setter name - setter offscreenBuffering - setter onabort - setter onanimationend - setter onanimationiteration - setter onanimationstart - setter onauxclick - setter onbeforeunload - setter onblur - setter oncancel - setter oncanplay - setter oncanplaythrough - setter onchange - setter onclick - setter onclose - setter oncontextmenu - setter oncuechange - setter ondblclick - setter ondevicemotion - setter ondeviceorientation - setter ondeviceorientationabsolute - setter ondrag - setter ondragend - setter ondragenter - setter ondragleave - setter ondragover - setter ondragstart - setter ondrop - setter ondurationchange - setter onemptied - setter onended - setter onerror - setter onfocus - setter ongotpointercapture - setter onhashchange - setter oninput - setter oninvalid - setter onkeydown - setter onkeypress - setter onkeyup - setter onlanguagechange - setter onload - setter onloadeddata - setter onloadedmetadata - setter onloadstart - setter onlostpointercapture - setter onmessage - setter onmousedown - setter onmouseenter - setter onmouseleave - setter onmousemove - setter onmouseout - setter onmouseover - setter onmouseup - setter onmousewheel - setter onoffline - setter ononline - setter onpagehide - setter onpageshow - setter onpause - setter onplay - setter onplaying - setter onpointercancel - setter onpointerdown - setter onpointerenter - setter onpointerleave - setter onpointermove - setter onpointerout - setter onpointerover - setter onpointerup - setter onpopstate - setter onprogress - setter onratechange - setter onrejectionhandled - setter onreset - setter onresize - setter onscroll - setter onsearch - setter onseeked - setter onseeking - setter onselect - setter onshow - setter onstalled - setter onstorage - setter onsubmit - setter onsuspend - setter ontimeupdate - setter ontoggle - setter ontouchcancel - setter ontouchend - setter ontouchmove - setter ontouchstart - setter ontransitionend - setter onunhandledrejection - setter onunload - setter onvolumechange - setter onwaiting - setter onwebkitanimationend - setter onwebkitanimationiteration - setter onwebkitanimationstart - setter onwebkittransitionend - setter onwheel - setter outerHeight - setter outerWidth - setter pageXOffset - setter pageYOffset - setter performance - setter personalbar - setter screen - setter screenLeft - setter screenTop - setter screenX - setter screenY - setter scrollX - setter scrollY - setter scrollbars - setter status - setter statusbar - setter toolbar -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt similarity index 99% rename from third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt rename to third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt index 35608e8..42a23e14 100644 --- a/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -7437,11 +7437,11 @@ attribute eventSender attribute frames attribute gamepadController + attribute gin attribute internals attribute layoutTestController attribute length attribute location - attribute mojo attribute opener attribute parent attribute propertyNamesInGlobal
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt index 051e01431..c16b72d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/stable/webexposed/global-interface-listing-expected.txt
@@ -7365,11 +7365,11 @@ attribute eventSender attribute frames attribute gamepadController + attribute gin attribute internals attribute layoutTestController attribute length attribute location - attribute mojo attribute opener attribute parent attribute propertyNamesInGlobal
diff --git a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js index 481ed60b..92ddd8d 100644 --- a/third_party/WebKit/LayoutTests/resources/mojo-helpers.js +++ b/third_party/WebKit/LayoutTests/resources/mojo-helpers.js
@@ -12,10 +12,10 @@ return function(name, deps, factory) { let promise = moduleCache.get(name); if (promise === undefined) { - // This promise must be cached as mojo.define will only call the factory + // This promise must be cached as gin.define will only call the factory // function the first time the module is defined. promise = new Promise(resolve => { - mojo.define(name, deps, (...modules) => { + gin.define(name, deps, (...modules) => { let result = factory(...modules); resolve(result); return result;
diff --git a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement-expected.txt b/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement-expected.txt deleted file mode 100644 index 179eaba..0000000 --- a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement-expected.txt +++ /dev/null
@@ -1,9 +0,0 @@ -This is a testharness.js-based test. -PASS Face -FAIL Detector detect(HTMLVideoElement) assert_unreached: <video> error Reached unreachable code -PASS Barcode -FAIL Detector detect(HTMLVideoElement) assert_unreached: <video> error Reached unreachable code -PASS Text -FAIL Detector detect(HTMLVideoElement) assert_unreached: <video> error Reached unreachable code -Harness: the test ran to completion. -
diff --git a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html b/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html index 92465e3..35ce5e4 100644 --- a/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html +++ b/third_party/WebKit/LayoutTests/shapedetection/detection-HTMLVideoElement.html
@@ -11,7 +11,7 @@ detectionResultTest) { async_test(function(t) { var video = document.createElement("video"); - video.src = "../imported/wpt/media/white.webm"; + video.src = "../external/wpt/media/white.webm"; video.loop = true; video.autoplay = true; video.onerror = this.unreached_func("<video> error");
diff --git a/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html b/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html index f275c44..37e109a 100644 --- a/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html +++ b/third_party/WebKit/LayoutTests/usb/usbDevice-iframe.html
@@ -32,7 +32,7 @@ iframe.src = 'resources/open-in-iframe.html'; iframe.onload = () => { - iframe.contentWindow.mojo.define( + iframe.contentWindow.gin.define( "Mojo Service Registry", [ 'content/public/renderer/frame_interfaces' ], (frameInterfaces) => { @@ -78,7 +78,7 @@ iframe.src = 'resources/open-in-iframe.html'; iframe.onload = () => { - iframe.contentWindow.mojo.define( + iframe.contentWindow.gin.define( "Mojo Service Registry", [ 'content/public/renderer/frame_interfaces' ], (frameInterfaces) => {
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt index 8f8479af..de1ba1e 100644 --- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -8681,11 +8681,11 @@ attribute eventSender attribute frames attribute gamepadController + attribute gin attribute internals attribute layoutTestController attribute length attribute location - attribute mojo attribute opener attribute parent attribute propertyNamesInGlobal
diff --git a/third_party/WebKit/Source/bindings/OWNERS b/third_party/WebKit/Source/bindings/OWNERS index ee53c377..a279586 100644 --- a/third_party/WebKit/Source/bindings/OWNERS +++ b/third_party/WebKit/Source/bindings/OWNERS
@@ -10,3 +10,6 @@ vivek.vg@samsung.com yhirano@chromium.org yukishiino@chromium.org + +# TEAM: blink-reviews-bindings@chromium.org +# COMPONENT: Blink>Bindings
diff --git a/third_party/WebKit/Source/core/css/BUILD.gn b/third_party/WebKit/Source/core/css/BUILD.gn index 8c0cda1..ee8f9c86 100644 --- a/third_party/WebKit/Source/core/css/BUILD.gn +++ b/third_party/WebKit/Source/core/css/BUILD.gn
@@ -369,6 +369,7 @@ "properties/CSSPropertyAPIScale.cpp", "properties/CSSPropertyAPIScrollSnapCoordinate.cpp", "properties/CSSPropertyAPIShapeMargin.cpp", + "properties/CSSPropertyAPIShapeOutside.cpp", "properties/CSSPropertyAPISize.cpp", "properties/CSSPropertyAPIStrokeDasharray.cpp", "properties/CSSPropertyAPITabSize.cpp", @@ -392,6 +393,8 @@ "properties/CSSPropertyAlignmentUtils.cpp", "properties/CSSPropertyAlignmentUtils.h", "properties/CSSPropertyDescriptor.h", + "properties/CSSPropertyLengthUtils.cpp", + "properties/CSSPropertyLengthUtils.h", "properties/CSSPropertyShapeUtils.cpp", "properties/CSSPropertyShapeUtils.h", "resolver/AnimatedStyleBuilder.cpp",
diff --git a/third_party/WebKit/Source/core/css/CSSProperties.in b/third_party/WebKit/Source/core/css/CSSProperties.in index aca95d02..69d78b6c 100644 --- a/third_party/WebKit/Source/core/css/CSSProperties.in +++ b/third_party/WebKit/Source/core/css/CSSProperties.in
@@ -356,7 +356,7 @@ scroll-snap-coordinate runtime_flag=CSSScrollSnapPoints, converter=convertSnapCoordinates, api_class shape-image-threshold interpolable, type_name=float shape-margin interpolable, converter=convertLength, api_class -shape-outside interpolable, converter=convertShapeValue, typedom_types=[Image] +shape-outside interpolable, converter=convertShapeValue, typedom_types=[Image], api_class shape-rendering inherited, svg size custom_all, api_class snap-height runtime_flag=CSSSnapSize, inherited, custom_all
diff --git a/third_party/WebKit/Source/core/css/SelectorChecker.cpp b/third_party/WebKit/Source/core/css/SelectorChecker.cpp index b8c76c9a..b28a486 100644 --- a/third_party/WebKit/Source/core/css/SelectorChecker.cpp +++ b/third_party/WebKit/Source/core/css/SelectorChecker.cpp
@@ -764,103 +764,97 @@ return result; } case CSSSelector::PseudoFirstChild: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) { + if (m_mode == ResolvingStyle) { + if (ContainerNode* parent = element.parentElementOrDocumentFragment()) parent->setChildrenAffectedByFirstChildRules(); - element.setAffectedByFirstChildRules(); - } - return isFirstChild(element); + element.setAffectedByFirstChildRules(); } - break; + return isFirstChild(element); case CSSSelector::PseudoFirstOfType: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) + if (m_mode == ResolvingStyle) { + if (ContainerNode* parent = element.parentElementOrDocumentFragment()) parent->setChildrenAffectedByForwardPositionalRules(); - return isFirstOfType(element, element.tagQName()); } - break; - case CSSSelector::PseudoLastChild: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) { + return isFirstOfType(element, element.tagQName()); + case CSSSelector::PseudoLastChild: { + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle) { + if (parent) parent->setChildrenAffectedByLastChildRules(); - element.setAffectedByLastChildRules(); - } - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return isLastChild(element); + element.setAffectedByLastChildRules(); } - break; - case CSSSelector::PseudoLastOfType: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return isLastChild(element); + } + case CSSSelector::PseudoLastOfType: { + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle) { + if (parent) parent->setChildrenAffectedByBackwardPositionalRules(); - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return isLastOfType(element, element.tagQName()); } - break; - case CSSSelector::PseudoOnlyChild: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) { + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return isLastOfType(element, element.tagQName()); + } + case CSSSelector::PseudoOnlyChild: { + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle) { + if (parent) { parent->setChildrenAffectedByFirstChildRules(); parent->setChildrenAffectedByLastChildRules(); - element.setAffectedByFirstChildRules(); - element.setAffectedByLastChildRules(); } - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return isFirstChild(element) && isLastChild(element); + element.setAffectedByFirstChildRules(); + element.setAffectedByLastChildRules(); } - break; - case CSSSelector::PseudoOnlyOfType: + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return isFirstChild(element) && isLastChild(element); + } + case CSSSelector::PseudoOnlyOfType: { // FIXME: This selector is very slow. - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) { - parent->setChildrenAffectedByForwardPositionalRules(); - parent->setChildrenAffectedByBackwardPositionalRules(); - } - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return isFirstOfType(element, element.tagQName()) && - isLastOfType(element, element.tagQName()); + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle && parent) { + parent->setChildrenAffectedByForwardPositionalRules(); + parent->setChildrenAffectedByBackwardPositionalRules(); } - break; + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return isFirstOfType(element, element.tagQName()) && + isLastOfType(element, element.tagQName()); + } case CSSSelector::PseudoPlaceholderShown: if (isTextControlElement(element)) return toTextControlElement(element).isPlaceholderVisible(); break; case CSSSelector::PseudoNthChild: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) + if (m_mode == ResolvingStyle) { + if (ContainerNode* parent = element.parentElementOrDocumentFragment()) parent->setChildrenAffectedByForwardPositionalRules(); - return selector.matchNth(NthIndexCache::nthChildIndex(element)); } - break; + return selector.matchNth(NthIndexCache::nthChildIndex(element)); case CSSSelector::PseudoNthOfType: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) + if (m_mode == ResolvingStyle) { + if (ContainerNode* parent = element.parentElementOrDocumentFragment()) parent->setChildrenAffectedByForwardPositionalRules(); - return selector.matchNth(NthIndexCache::nthOfTypeIndex(element)); } - break; - case CSSSelector::PseudoNthLastChild: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) - parent->setChildrenAffectedByBackwardPositionalRules(); - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return selector.matchNth(NthIndexCache::nthLastChildIndex(element)); - } - break; - case CSSSelector::PseudoNthLastOfType: - if (ContainerNode* parent = element.parentElementOrDocumentFragment()) { - if (m_mode == ResolvingStyle) - parent->setChildrenAffectedByBackwardPositionalRules(); - if (!m_isQuerySelector && !parent->isFinishedParsingChildren()) - return false; - return selector.matchNth(NthIndexCache::nthLastOfTypeIndex(element)); - } - break; + return selector.matchNth(NthIndexCache::nthOfTypeIndex(element)); + case CSSSelector::PseudoNthLastChild: { + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle && parent) + parent->setChildrenAffectedByBackwardPositionalRules(); + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return selector.matchNth(NthIndexCache::nthLastChildIndex(element)); + } + case CSSSelector::PseudoNthLastOfType: { + ContainerNode* parent = element.parentElementOrDocumentFragment(); + if (m_mode == ResolvingStyle && parent) + parent->setChildrenAffectedByBackwardPositionalRules(); + if (!m_isQuerySelector && parent && !parent->isFinishedParsingChildren()) + return false; + return selector.matchNth(NthIndexCache::nthLastOfTypeIndex(element)); + } case CSSSelector::PseudoTarget: return element == element.document().cssTarget(); case CSSSelector::PseudoAny: {
diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp index 25fc518..5e523cc8 100644 --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
@@ -43,6 +43,7 @@ #include "core/css/parser/FontVariantLigaturesParser.h" #include "core/css/properties/CSSPropertyAlignmentUtils.h" #include "core/css/properties/CSSPropertyDescriptor.h" +#include "core/css/properties/CSSPropertyLengthUtils.h" #include "core/css/properties/CSSPropertyShapeUtils.h" #include "core/frame/UseCounter.h" #include "core/layout/LayoutTheme.h" @@ -570,58 +571,6 @@ return list; } -static bool validWidthOrHeightKeyword(CSSValueID id, - const CSSParserContext* context) { - if (id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || - id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent || - id == CSSValueMinContent || id == CSSValueMaxContent || - id == CSSValueFitContent) { - if (context->isUseCounterRecordingEnabled()) { - UseCounter* useCounter = context->useCounter(); - switch (id) { - case CSSValueWebkitMinContent: - useCounter->count(UseCounter::CSSValuePrefixedMinContent); - break; - case CSSValueWebkitMaxContent: - useCounter->count(UseCounter::CSSValuePrefixedMaxContent); - break; - case CSSValueWebkitFillAvailable: - useCounter->count(UseCounter::CSSValuePrefixedFillAvailable); - break; - case CSSValueWebkitFitContent: - useCounter->count(UseCounter::CSSValuePrefixedFitContent); - break; - default: - break; - } - } - return true; - } - return false; -} - -static CSSValue* consumeMaxWidthOrHeight( - CSSParserTokenRange& range, - const CSSParserContext* context, - UnitlessQuirk unitless = UnitlessQuirk::Forbid) { - if (range.peek().id() == CSSValueNone || - validWidthOrHeightKeyword(range.peek().id(), context)) - return consumeIdent(range); - return consumeLengthOrPercent(range, context->mode(), ValueRangeNonNegative, - unitless); -} - -static CSSValue* consumeWidthOrHeight( - CSSParserTokenRange& range, - const CSSParserContext* context, - UnitlessQuirk unitless = UnitlessQuirk::Forbid) { - if (range.peek().id() == CSSValueAuto || - validWidthOrHeightKeyword(range.peek().id(), context)) - return consumeIdent(range); - return consumeLengthOrPercent(range, context->mode(), ValueRangeNonNegative, - unitless); -} - static CSSValue* consumeMarginOrOffset(CSSParserTokenRange& range, CSSParserMode cssParserMode, UnitlessQuirk unitless) { @@ -1498,26 +1447,6 @@ return CSSPropertyShapeUtils::consumeBasicShape(range, context); } -static CSSValue* consumeShapeOutside(CSSParserTokenRange& range, - const CSSParserContext* context) { - if (CSSValue* imageValue = consumeImageOrNone(range, context)) - return imageValue; - CSSValueList* list = CSSValueList::createSpaceSeparated(); - if (CSSValue* boxValue = consumeShapeBox(range)) - list->append(*boxValue); - if (CSSValue* shapeValue = - CSSPropertyShapeUtils::consumeBasicShape(range, context)) { - list->append(*shapeValue); - if (list->length() < 2) { - if (CSSValue* boxValue = consumeShapeBox(range)) - list->append(*boxValue); - } - } - if (!list->length()) - return nullptr; - return list; -} - static CSSValue* consumeContentDistributionOverflowPosition( CSSParserTokenRange& range) { if (identMatches<CSSValueNormal, CSSValueBaseline, CSSValueLastBaseline>( @@ -2427,17 +2356,20 @@ return consumeSnapHeight(m_range, m_context->mode()); case CSSPropertyMaxWidth: case CSSPropertyMaxHeight: - return consumeMaxWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow); + return CSSPropertyLengthUtils::consumeMaxWidthOrHeight( + m_range, m_context, UnitlessQuirk::Allow); case CSSPropertyMaxInlineSize: case CSSPropertyMaxBlockSize: case CSSPropertyWebkitMaxLogicalWidth: case CSSPropertyWebkitMaxLogicalHeight: - return consumeMaxWidthOrHeight(m_range, m_context); + return CSSPropertyLengthUtils::consumeMaxWidthOrHeight(m_range, + m_context); case CSSPropertyMinWidth: case CSSPropertyMinHeight: case CSSPropertyWidth: case CSSPropertyHeight: - return consumeWidthOrHeight(m_range, m_context, UnitlessQuirk::Allow); + return CSSPropertyLengthUtils::consumeWidthOrHeight(m_range, m_context, + UnitlessQuirk::Allow); case CSSPropertyInlineSize: case CSSPropertyBlockSize: case CSSPropertyMinInlineSize: @@ -2446,7 +2378,7 @@ case CSSPropertyWebkitMinLogicalHeight: case CSSPropertyWebkitLogicalWidth: case CSSPropertyWebkitLogicalHeight: - return consumeWidthOrHeight(m_range, m_context); + return CSSPropertyLengthUtils::consumeWidthOrHeight(m_range, m_context); case CSSPropertyMarginTop: case CSSPropertyMarginRight: case CSSPropertyMarginBottom: @@ -2641,8 +2573,6 @@ return consumeScrollSnapPoints(m_range, m_context->mode()); case CSSPropertyOrder: return consumeInteger(m_range); - case CSSPropertyShapeOutside: - return consumeShapeOutside(m_range, m_context); case CSSPropertyClipPath: return consumeClipPath(m_range, m_context); case CSSPropertyJustifyContent:
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp new file mode 100644 index 0000000..7c6c7ad --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp
@@ -0,0 +1,37 @@ +// 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 "core/css/properties/CSSPropertyAPIShapeOutside.h" + +#include "core/css/CSSValueList.h" +#include "core/css/parser/CSSParserContext.h" +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "core/css/properties/CSSPropertyShapeUtils.h" + +namespace blink { + +using namespace CSSPropertyParserHelpers; + +const CSSValue* CSSPropertyAPIShapeOutside::parseSingleValue( + CSSParserTokenRange& range, + const CSSParserContext* context) { + if (CSSValue* imageValue = consumeImageOrNone(range, context)) + return imageValue; + CSSValueList* list = CSSValueList::createSpaceSeparated(); + if (CSSValue* boxValue = consumeShapeBox(range)) + list->append(*boxValue); + if (CSSValue* shapeValue = + CSSPropertyShapeUtils::consumeBasicShape(range, context)) { + list->append(*shapeValue); + if (list->length() < 2) { + if (CSSValue* boxValue = consumeShapeBox(range)) + list->append(*boxValue); + } + } + if (!list->length()) + return nullptr; + return list; +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp new file mode 100644 index 0000000..1222ac6 --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.cpp
@@ -0,0 +1,68 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "core/css/properties/CSSPropertyLengthUtils.h" + +#include "core/css/parser/CSSParserContext.h" +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "core/frame/UseCounter.h" + +namespace blink { + +namespace { + +bool validWidthOrHeightKeyword(CSSValueID id, const CSSParserContext* context) { + if (id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || + id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent || + id == CSSValueMinContent || id == CSSValueMaxContent || + id == CSSValueFitContent) { + if (context->isUseCounterRecordingEnabled()) { + UseCounter* useCounter = context->useCounter(); + switch (id) { + case CSSValueWebkitMinContent: + useCounter->count(UseCounter::CSSValuePrefixedMinContent); + break; + case CSSValueWebkitMaxContent: + useCounter->count(UseCounter::CSSValuePrefixedMaxContent); + break; + case CSSValueWebkitFillAvailable: + useCounter->count(UseCounter::CSSValuePrefixedFillAvailable); + break; + case CSSValueWebkitFitContent: + useCounter->count(UseCounter::CSSValuePrefixedFitContent); + break; + default: + break; + } + } + return true; + } + return false; +} + +} // namespace + +CSSValue* CSSPropertyLengthUtils::consumeMaxWidthOrHeight( + CSSParserTokenRange& range, + const CSSParserContext* context, + CSSPropertyParserHelpers::UnitlessQuirk unitless) { + if (range.peek().id() == CSSValueNone || + validWidthOrHeightKeyword(range.peek().id(), context)) + return CSSPropertyParserHelpers::consumeIdent(range); + return CSSPropertyParserHelpers::consumeLengthOrPercent( + range, context->mode(), ValueRangeNonNegative, unitless); +} + +CSSValue* CSSPropertyLengthUtils::consumeWidthOrHeight( + CSSParserTokenRange& range, + const CSSParserContext* context, + CSSPropertyParserHelpers::UnitlessQuirk unitless) { + if (range.peek().id() == CSSValueAuto || + validWidthOrHeightKeyword(range.peek().id(), context)) + return CSSPropertyParserHelpers::consumeIdent(range); + return CSSPropertyParserHelpers::consumeLengthOrPercent( + range, context->mode(), ValueRangeNonNegative, unitless); +} + +} // namespace blink
diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.h b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.h new file mode 100644 index 0000000..156362d0 --- /dev/null +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyLengthUtils.h
@@ -0,0 +1,34 @@ +// 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 CSSPropertyLengthUtils_h +#define CSSPropertyLengthUtils_h + +#include "core/css/parser/CSSPropertyParserHelpers.h" +#include "wtf/Allocator.h" + +namespace blink { + +class CSSParserContext; +class CSSParserTokenRange; +class CSSValue; + +class CSSPropertyLengthUtils { + STATIC_ONLY(CSSPropertyLengthUtils); + + static CSSValue* consumeMaxWidthOrHeight( + CSSParserTokenRange&, + const CSSParserContext*, + CSSPropertyParserHelpers::UnitlessQuirk = + CSSPropertyParserHelpers::UnitlessQuirk::Forbid); + static CSSValue* consumeWidthOrHeight( + CSSParserTokenRange&, + const CSSParserContext*, + CSSPropertyParserHelpers::UnitlessQuirk = + CSSPropertyParserHelpers::UnitlessQuirk::Forbid); +}; + +} // namespace blink + +#endif // CSSPropertyLengthUtils_h
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp index 2a35689..53d69df 100644 --- a/third_party/WebKit/Source/core/dom/Document.cpp +++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -451,7 +451,6 @@ m_hasXMLDeclaration(0), m_designMode(false), m_isRunningExecCommand(false), - m_hasReceivedUserGesture(false), m_hasAnnotatedRegions(false), m_annotatedRegionsDirty(false), m_documentClasses(documentClasses), @@ -4267,16 +4266,18 @@ m_markers->shiftMarkers(text, offset + length, 0 - length); } -void Document::didMergeTextNodes(Text& oldNode, unsigned offset) { +void Document::didMergeTextNodes(const Text& mergedNode, + const Text& nodeToBeRemoved, + unsigned oldLength) { + NodeWithIndex nodeToBeRemovedWithIndex(const_cast<Text&>(nodeToBeRemoved)); if (!m_ranges.isEmpty()) { - NodeWithIndex oldNodeWithIndex(oldNode); for (Range* range : m_ranges) - range->didMergeTextNodes(oldNodeWithIndex, offset); + range->didMergeTextNodes(nodeToBeRemovedWithIndex, oldLength); } - notifyMergeTextNodes(oldNode, offset); + notifyMergeTextNodes(mergedNode, nodeToBeRemovedWithIndex, oldLength); if (m_frame) - m_frame->selection().didMergeTextNodes(oldNode, offset); + m_frame->selection().didMergeTextNodes(nodeToBeRemoved, oldLength); // FIXME: This should update markers for spelling and grammar checking. }
diff --git a/third_party/WebKit/Source/core/dom/Document.h b/third_party/WebKit/Source/core/dom/Document.h index a2acadd..6e97fee 100644 --- a/third_party/WebKit/Source/core/dom/Document.h +++ b/third_party/WebKit/Source/core/dom/Document.h
@@ -758,7 +758,9 @@ void didInsertText(Node*, unsigned offset, unsigned length); void didRemoveText(Node*, unsigned offset, unsigned length); - void didMergeTextNodes(Text& oldNode, unsigned offset); + void didMergeTextNodes(const Text& mergedNode, + const Text& nodeToBeRemoved, + unsigned oldLength); void didSplitTextNode(const Text& oldNode); void clearDOMWindow() { m_domWindow = nullptr; } @@ -1303,10 +1305,6 @@ const PropertyRegistry* propertyRegistry() const; PropertyRegistry* propertyRegistry(); - // Indicates whether the user has interacted with this particular Document. - void setHasReceivedUserGesture() { m_hasReceivedUserGesture = true; } - bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; } - // Document maintains a counter of visible non-secure password // fields in the page. Used to notify the embedder when all visible // non-secure passwords fields are no longer visible. @@ -1564,7 +1562,6 @@ bool m_designMode; bool m_isRunningExecCommand; - bool m_hasReceivedUserGesture; HeapHashSet<WeakMember<const LiveNodeListBase>> m_listsInvalidatedAtDocument; // Oilpan keeps track of all registered NodeLists.
diff --git a/third_party/WebKit/Source/core/dom/DocumentTest.cpp b/third_party/WebKit/Source/core/dom/DocumentTest.cpp index 900b0d7e..d9e2f2f 100644 --- a/third_party/WebKit/Source/core/dom/DocumentTest.cpp +++ b/third_party/WebKit/Source/core/dom/DocumentTest.cpp
@@ -30,6 +30,7 @@ #include "core/dom/Document.h" +#include "core/dom/NodeWithIndex.h" #include "core/dom/SynchronousMutationObserver.h" #include "core/dom/Text.h" #include "core/frame/FrameView.h" @@ -79,13 +80,21 @@ public: struct MergeTextNodesRecord : GarbageCollected<MergeTextNodesRecord> { - Member<Text> m_node; + Member<const Text> m_node; + Member<Node> m_nodeToBeRemoved; unsigned m_offset = 0; - MergeTextNodesRecord(Text* node, unsigned offset) - : m_node(node), m_offset(offset) {} + MergeTextNodesRecord(const Text* node, + const NodeWithIndex& nodeWithIndex, + unsigned offset) + : m_node(node), + m_nodeToBeRemoved(nodeWithIndex.node()), + m_offset(offset) {} - DEFINE_INLINE_TRACE() { visitor->trace(m_node); } + DEFINE_INLINE_TRACE() { + visitor->trace(m_node); + visitor->trace(m_nodeToBeRemoved); + } }; struct UpdateCharacterDataRecord @@ -150,7 +159,7 @@ // Implement |SynchronousMutationObserver| member functions. void contextDestroyed(Document*) final; void didChangeChildren(const ContainerNode&) final; - void didMergeTextNodes(Text&, unsigned) final; + void didMergeTextNodes(const Text&, const NodeWithIndex&, unsigned) final; void didMoveTreeToNewDocument(const Node& root) final; void didSplitTextNode(const Text&) final; void didUpdateCharacterData(CharacterData*, @@ -186,9 +195,12 @@ m_childrenChangedNodes.push_back(&container); } -void TestSynchronousMutationObserver::didMergeTextNodes(Text& node, - unsigned offset) { - m_mergeTextNodesRecords.push_back(new MergeTextNodesRecord(&node, offset)); +void TestSynchronousMutationObserver::didMergeTextNodes( + const Text& node, + const NodeWithIndex& nodeWithIndex, + unsigned offset) { + m_mergeTextNodesRecords.push_back( + new MergeTextNodesRecord(&node, nodeWithIndex, offset)); } void TestSynchronousMutationObserver::didMoveTreeToNewDocument( @@ -521,7 +533,9 @@ document().body()->normalize(); ASSERT_EQ(1u, observer.mergeTextNodesRecords().size()); - EXPECT_EQ(mergeSampleB, observer.mergeTextNodesRecords()[0]->m_node); + EXPECT_EQ(mergeSampleA, observer.mergeTextNodesRecords()[0]->m_node); + EXPECT_EQ(mergeSampleB, + observer.mergeTextNodesRecords()[0]->m_nodeToBeRemoved); EXPECT_EQ(10u, observer.mergeTextNodesRecords()[0]->m_offset); }
diff --git a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h index d4cd560..f8b99021 100644 --- a/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h +++ b/third_party/WebKit/Source/core/dom/DocumentUserGestureToken.h
@@ -7,6 +7,7 @@ #include "core/dom/Document.h" #include "core/frame/LocalFrame.h" +#include "core/loader/FrameLoaderClient.h" #include "platform/UserGestureIndicator.h" namespace blink { @@ -36,12 +37,10 @@ DocumentUserGestureToken(Status status) : UserGestureToken(status) {} static void setHasReceivedUserGesture(Document* document) { - if (!document || document->hasReceivedUserGesture()) - return; - document->setHasReceivedUserGesture(); - for (Frame* frame = document->frame()->tree().parent(); frame; - frame = frame->tree().parent()) { - frame->setDocumentHasReceivedUserGesture(); + if (document && document->frame() && + !document->frame()->hasReceivedUserGesture()) { + document->frame()->setDocumentHasReceivedUserGesture(); + document->frame()->loader().client()->setHasReceivedUserGesture(); } } };
diff --git a/third_party/WebKit/Source/core/dom/DocumentUserGestureTokenTest.cpp b/third_party/WebKit/Source/core/dom/DocumentUserGestureTokenTest.cpp index 87734da..012498f 100644 --- a/third_party/WebKit/Source/core/dom/DocumentUserGestureTokenTest.cpp +++ b/third_party/WebKit/Source/core/dom/DocumentUserGestureTokenTest.cpp
@@ -13,7 +13,7 @@ public: void SetUp() override { m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600)); - ASSERT_FALSE(document().hasReceivedUserGesture()); + ASSERT_FALSE(document().frame()->hasReceivedUserGesture()); } Document& document() const { return m_dummyPageHolder->document(); } @@ -25,22 +25,22 @@ TEST_F(DocumentUserGestureTokenTest, NoGesture) { // A nullptr Document* will not set user gesture state. DocumentUserGestureToken::create(nullptr); - EXPECT_FALSE(document().hasReceivedUserGesture()); + EXPECT_FALSE(document().frame()->hasReceivedUserGesture()); } TEST_F(DocumentUserGestureTokenTest, PossiblyExisting) { // A non-null Document* will set state, but a subsequent nullptr Document* // token will not override it. DocumentUserGestureToken::create(&document()); - EXPECT_TRUE(document().hasReceivedUserGesture()); + EXPECT_TRUE(document().frame()->hasReceivedUserGesture()); DocumentUserGestureToken::create(nullptr); - EXPECT_TRUE(document().hasReceivedUserGesture()); + EXPECT_TRUE(document().frame()->hasReceivedUserGesture()); } TEST_F(DocumentUserGestureTokenTest, NewGesture) { // UserGestureToken::Status doesn't impact Document gesture state. DocumentUserGestureToken::create(&document(), UserGestureToken::NewGesture); - EXPECT_TRUE(document().hasReceivedUserGesture()); + EXPECT_TRUE(document().frame()->hasReceivedUserGesture()); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp index ecdb52e..75e7dc2 100644 --- a/third_party/WebKit/Source/core/dom/Element.cpp +++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -2659,7 +2659,7 @@ return; if (document().focusedElement() == this && - document().hasReceivedUserGesture()) { + document().frame()->hasReceivedUserGesture()) { // Bring up the keyboard in the context of anything triggered by a user // gesture. Since tracking that across arbitrary boundaries (eg. // animations) is difficult, for now we match IE's heuristic and bring
diff --git a/third_party/WebKit/Source/core/dom/NthIndexCache.cpp b/third_party/WebKit/Source/core/dom/NthIndexCache.cpp index 723f0c4..59fd8dc 100644 --- a/third_party/WebKit/Source/core/dom/NthIndexCache.cpp +++ b/third_party/WebKit/Source/core/dom/NthIndexCache.cpp
@@ -79,9 +79,8 @@ } // namespace unsigned NthIndexCache::nthChildIndex(Element& element) { - if (element.isPseudoElement()) + if (element.isPseudoElement() || !element.parentNode()) return 1; - DCHECK(element.parentNode()); NthIndexCache* nthIndexCache = element.document().nthIndexCache(); NthIndexData* nthIndexData = nullptr; if (nthIndexCache && nthIndexCache->m_parentMap) @@ -95,9 +94,8 @@ } unsigned NthIndexCache::nthLastChildIndex(Element& element) { - if (element.isPseudoElement()) + if (element.isPseudoElement() && !element.parentNode()) return 1; - DCHECK(element.parentNode()); NthIndexCache* nthIndexCache = element.document().nthIndexCache(); NthIndexData* nthIndexData = nullptr; if (nthIndexCache && nthIndexCache->m_parentMap) @@ -120,7 +118,7 @@ } unsigned NthIndexCache::nthOfTypeIndex(Element& element) { - if (element.isPseudoElement()) + if (element.isPseudoElement() || !element.parentNode()) return 1; NthIndexCache* nthIndexCache = element.document().nthIndexCache(); if (nthIndexCache) { @@ -136,7 +134,7 @@ } unsigned NthIndexCache::nthLastOfTypeIndex(Element& element) { - if (element.isPseudoElement()) + if (element.isPseudoElement() || !element.parentNode()) return 1; NthIndexCache* nthIndexCache = element.document().nthIndexCache(); if (nthIndexCache) {
diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp index 3d2f2489..506cdb9 100644 --- a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp +++ b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.cpp
@@ -17,10 +17,12 @@ observer->didChangeChildren(container); } -void SynchronousMutationNotifier::notifyMergeTextNodes(Text& node, - unsigned offset) { +void SynchronousMutationNotifier::notifyMergeTextNodes( + const Text& node, + const NodeWithIndex& nodeToBeRemovedWithIndex, + unsigned oldLength) { for (SynchronousMutationObserver* observer : m_observers) - observer->didMergeTextNodes(node, offset); + observer->didMergeTextNodes(node, nodeToBeRemovedWithIndex, oldLength); } void SynchronousMutationNotifier::notifyMoveTreeToNewDocument(
diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.h b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.h index f57a481..813f209 100644 --- a/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.h +++ b/third_party/WebKit/Source/core/dom/SynchronousMutationNotifier.h
@@ -15,6 +15,7 @@ class ContainerNode; class Document; class Node; +class NodeWithIndex; class SynchronousMutationObserver; class Text; @@ -24,7 +25,9 @@ // TODO(yosin): We will have |notifyXXX()| functions defined in // |SynchronousMutationObserver|. void notifyChangeChildren(const ContainerNode&); - void notifyMergeTextNodes(Text&, unsigned); + void notifyMergeTextNodes(const Text& mergedNode, + const NodeWithIndex& nodeToBeRemovedWithIndex, + unsigned oldLength); void notifyMoveTreeToNewDocument(const Node&); void notifySplitTextNode(const Text&); void notifyUpdateCharacterData(CharacterData*,
diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.cpp b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.cpp index 1669381..1840e8b 100644 --- a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.cpp +++ b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.cpp
@@ -13,7 +13,9 @@ : LifecycleObserver(nullptr) {} void SynchronousMutationObserver::didChangeChildren(const ContainerNode&) {} -void SynchronousMutationObserver::didMergeTextNodes(Text&, unsigned) {} +void SynchronousMutationObserver::didMergeTextNodes(const Text&, + const NodeWithIndex&, + unsigned) {} void SynchronousMutationObserver::didMoveTreeToNewDocument(const Node&) {} void SynchronousMutationObserver::didSplitTextNode(const Text&) {} void SynchronousMutationObserver::didUpdateCharacterData(CharacterData*,
diff --git a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h index 2df1926..ad0311ca 100644 --- a/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h +++ b/third_party/WebKit/Source/core/dom/SynchronousMutationObserver.h
@@ -14,6 +14,7 @@ class CharacterData; class ContainerNode; class Document; +class NodeWithIndex; class Text; // This class is a base class for classes which observe DOM tree mutation @@ -42,10 +43,11 @@ // Called after child nodes changed. virtual void didChangeChildren(const ContainerNode&); - // TODO(yosin): We should use |const Text& oldNode|. - // Called after characters in |oldNode| is appended at |offset| in - // |oldNdoe->previousSibling()|. - virtual void didMergeTextNodes(Text& oldNode, unsigned offset); + // Called after characters in |nodeToBeRemoved| is appended into |mergedNode|. + // |oldLength| holds length of |mergedNode| before merge. + virtual void didMergeTextNodes(const Text& mergedNode, + const NodeWithIndex& nodeToBeRemovedWithIndex, + unsigned oldLength); // Called just after node tree |root| is moved to new document. virtual void didMoveTreeToNewDocument(const Node& root);
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp index a105811..325cfb8 100644 --- a/third_party/WebKit/Source/core/dom/Text.cpp +++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -82,12 +82,12 @@ setDataWithoutUpdate(data() + nextTextData); updateTextLayoutObject(oldTextData.length(), 0); + document().didMergeTextNodes(*this, *nextText, offset); + // Empty nextText for layout update. nextText->setDataWithoutUpdate(emptyString()); nextText->updateTextLayoutObject(0, nextTextData.length()); - document().didMergeTextNodes(*nextText, offset); - // Restore nextText for mutation event. nextText->setDataWithoutUpdate(nextTextData); nextText->updateTextLayoutObject(0, 0);
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp index b9731fff..36729ad4 100644 --- a/third_party/WebKit/Source/core/frame/Frame.cpp +++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -174,8 +174,7 @@ canNavigateWithoutFramebusting(targetFrame, errorReason); const bool sandboxed = securityContext()->getSandboxFlags() != SandboxNone; const bool hasUserGesture = - isLocalFrame() ? toLocalFrame(this)->document()->hasReceivedUserGesture() - : false; + isLocalFrame() ? toLocalFrame(this)->hasReceivedUserGesture() : false; // Top navigation in sandbox with or w/o 'allow-top-navigation'. if (targetFrame != this && sandboxed && targetFrame == tree().top()) { @@ -400,6 +399,12 @@ childFrames[i]->didChangeVisibilityState(); } +void Frame::setDocumentHasReceivedUserGesture() { + m_hasReceivedUserGesture = true; + if (Frame* parent = tree().parent()) + parent->setDocumentHasReceivedUserGesture(); +} + Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) : m_treeNode(this), m_host(host),
diff --git a/third_party/WebKit/Source/core/frame/Frame.h b/third_party/WebKit/Source/core/frame/Frame.h index ba5e83e..90f5a64 100644 --- a/third_party/WebKit/Source/core/frame/Frame.h +++ b/third_party/WebKit/Source/core/frame/Frame.h
@@ -89,8 +89,6 @@ void disconnectOwnerElement(); virtual bool shouldClose() = 0; - virtual void setDocumentHasReceivedUserGesture() = 0; - FrameClient* client() const; // NOTE: Page is moving out of Blink up into the browser process as @@ -147,6 +145,9 @@ virtual void didChangeVisibilityState(); + void setDocumentHasReceivedUserGesture(); + bool hasReceivedUserGesture() const { return m_hasReceivedUserGesture; } + bool isDetaching() const { return m_isDetaching; } protected: @@ -158,6 +159,7 @@ Member<FrameOwner> m_owner; Member<DOMWindow> m_domWindow; + bool m_hasReceivedUserGesture = false; bool m_isDetaching = false; private:
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp index e9af56f..19d93411 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.cpp +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -566,11 +566,30 @@ } CompositorAnimationHost* FrameView::compositorAnimationHost() const { + // When m_animationHost is not nullptr, this is the FrameView for an OOPIF. + if (m_animationHost) + return m_animationHost.get(); + + if (m_frame->localFrameRoot() != m_frame) + return m_frame->localFrameRoot()->view()->compositorAnimationHost(); + + if (!m_frame->isMainFrame()) + return nullptr; + ScrollingCoordinator* c = scrollingCoordinator(); return c ? c->compositorAnimationHost() : nullptr; } CompositorAnimationTimeline* FrameView::compositorAnimationTimeline() const { + if (m_animationTimeline) + return m_animationTimeline.get(); + + if (m_frame->localFrameRoot() != m_frame) + return m_frame->localFrameRoot()->view()->compositorAnimationTimeline(); + + if (!m_frame->isMainFrame()) + return nullptr; + ScrollingCoordinator* c = scrollingCoordinator(); return c ? c->compositorAnimationTimeline() : nullptr; } @@ -4995,4 +5014,14 @@ LayoutSize(-viewportIntersectionRect.x(), -viewportIntersectionRect.y())); } +void FrameView::setAnimationTimeline( + std::unique_ptr<CompositorAnimationTimeline> timeline) { + m_animationTimeline = std::move(timeline); +} + +void FrameView::setAnimationHost( + std::unique_ptr<CompositorAnimationHost> host) { + m_animationHost = std::move(host); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/FrameView.h b/third_party/WebKit/Source/core/frame/FrameView.h index 0dcff6e5..4568af5 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.h +++ b/third_party/WebKit/Source/core/frame/FrameView.h
@@ -40,6 +40,8 @@ #include "core/paint/ScrollbarManager.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/Widget.h" +#include "platform/animation/CompositorAnimationHost.h" +#include "platform/animation/CompositorAnimationTimeline.h" #include "platform/geometry/IntRect.h" #include "platform/geometry/LayoutRect.h" #include "platform/graphics/Color.h" @@ -819,6 +821,14 @@ void applyTransformForTopFrameSpace(TransformState&); + // TODO(kenrb): These are temporary methods pending resolution of + // https://crbug.com/680606. Animation timelines and hosts for scrolling + // are normally owned by ScrollingCoordinator, but there is only one + // of those objects per page. To get around this, we temporarily stash a + // unique timeline and host on each OOPIF FrameView. + void setAnimationTimeline(std::unique_ptr<CompositorAnimationTimeline>); + void setAnimationHost(std::unique_ptr<CompositorAnimationHost>); + protected: // Scroll the content via the compositor. bool scrollContentsFastPath(const IntSize& scrollDelta); @@ -1190,6 +1200,10 @@ // The size of the vector depends on the number of // main thread scrolling reasons. Vector<int> m_mainThreadScrollingReasonsCounter; + + // TODO(kenrb): Remove these when https://crbug.com/680606 is resolved. + std::unique_ptr<CompositorAnimationTimeline> m_animationTimeline; + std::unique_ptr<CompositorAnimationHost> m_animationHost; }; inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count) {
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.cpp b/third_party/WebKit/Source/core/frame/LocalFrame.cpp index 8cff473..03edc5d 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrame.cpp +++ b/third_party/WebKit/Source/core/frame/LocalFrame.cpp
@@ -553,11 +553,6 @@ Frame::didChangeVisibilityState(); } -void LocalFrame::setDocumentHasReceivedUserGesture() { - if (document()) - document()->setHasReceivedUserGesture(); -} - LocalFrame* LocalFrame::localFrameRoot() { LocalFrame* curFrame = this; while (curFrame && curFrame->tree().parent() &&
diff --git a/third_party/WebKit/Source/core/frame/LocalFrame.h b/third_party/WebKit/Source/core/frame/LocalFrame.h index 2b8671e..f6018a4 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrame.h +++ b/third_party/WebKit/Source/core/frame/LocalFrame.h
@@ -121,7 +121,6 @@ void printNavigationWarning(const String&) override; bool prepareForCommit() override; void didChangeVisibilityState() override; - void setDocumentHasReceivedUserGesture() override; void detachChildren(); void documentAttached();
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp index 1c5816e4f..d39a908 100644 --- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp +++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -129,10 +129,6 @@ return true; } -void RemoteFrame::setDocumentHasReceivedUserGesture() { - client()->setHasReceivedUserGesture(); -} - void RemoteFrame::forwardInputEvent(Event* event) { client()->forwardInputEvent(event); }
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.h b/third_party/WebKit/Source/core/frame/RemoteFrame.h index bf3a09a..4c108d0 100644 --- a/third_party/WebKit/Source/core/frame/RemoteFrame.h +++ b/third_party/WebKit/Source/core/frame/RemoteFrame.h
@@ -41,7 +41,6 @@ void printNavigationWarning(const String&) override {} bool prepareForCommit() override; bool shouldClose() override; - void setDocumentHasReceivedUserGesture() override; // FIXME: Remove this method once we have input routing in the browser // process. See http://crbug.com/339659.
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrameClient.h b/third_party/WebKit/Source/core/frame/RemoteFrameClient.h index d1cec960..e4ff236 100644 --- a/third_party/WebKit/Source/core/frame/RemoteFrameClient.h +++ b/third_party/WebKit/Source/core/frame/RemoteFrameClient.h
@@ -45,8 +45,6 @@ virtual void advanceFocus(WebFocusType, LocalFrame* source) = 0; virtual void visibilityChanged(bool visible) = 0; - - virtual void setHasReceivedUserGesture() = 0; }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp index 7899bfb7..38b97c84 100644 --- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp +++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -801,12 +801,14 @@ } CompositorAnimationHost* VisualViewport::compositorAnimationHost() const { + DCHECK(frameHost().page().mainFrame()->isLocalFrame()); ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); return c ? c->compositorAnimationHost() : nullptr; } CompositorAnimationTimeline* VisualViewport::compositorAnimationTimeline() const { + DCHECK(frameHost().page().mainFrame()->isLocalFrame()); ScrollingCoordinator* c = frameHost().page().scrollingCoordinator(); return c ? c->compositorAnimationTimeline() : nullptr; }
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp index d564e57..786b988 100644 --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.cpp
@@ -280,12 +280,16 @@ } void HTMLLinkElement::dispatchPendingEvent( - std::unique_ptr<IncrementLoadEventDelayCount>) { + std::unique_ptr<IncrementLoadEventDelayCount> count) { DCHECK(m_link); if (m_link->hasLoaded()) linkLoaded(); else linkLoadingErrored(); + + // Checks Document's load event synchronously here for performance. + // This is safe because dispatchPendingEvent() is called asynchronously. + count->clearAndCheckLoadEvent(); } void HTMLLinkElement::scheduleEvent() {
diff --git a/third_party/WebKit/Source/core/html/HTMLLinkElement.h b/third_party/WebKit/Source/core/html/HTMLLinkElement.h index 37eedb72..c7cefad 100644 --- a/third_party/WebKit/Source/core/html/HTMLLinkElement.h +++ b/third_party/WebKit/Source/core/html/HTMLLinkElement.h
@@ -88,7 +88,6 @@ DOMTokenList* sizes() const; - void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>); void scheduleEvent(); // From LinkLoaderClient @@ -120,6 +119,10 @@ void process(); static void processCallback(Node*); + // Always call this asynchronously because this can cause synchronous + // Document load event and JavaScript execution. + void dispatchPendingEvent(std::unique_ptr<IncrementLoadEventDelayCount>); + // From Node and subclassses void parseAttribute(const AttributeModificationParams&) override; InsertionNotificationRequest insertedInto(ContainerNode*) override;
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.h b/third_party/WebKit/Source/core/loader/EmptyClients.h index 0c02290..f18aaad 100644 --- a/third_party/WebKit/Source/core/loader/EmptyClients.h +++ b/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -445,7 +445,6 @@ const IntRect& viewportIntersection) override {} void advanceFocus(WebFocusType, LocalFrame* source) override {} void visibilityChanged(bool visible) override {} - void setHasReceivedUserGesture() override {} // FrameClient implementation. bool inShadowTree() const override { return false; }
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp index 669c20a..1668aa8 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -816,7 +816,8 @@ if (!m_currentItem) historyCommitType = HistoryInertCommit; if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && - initiatingDocument && !initiatingDocument->hasReceivedUserGesture()) { + initiatingDocument && + !initiatingDocument->frame()->hasReceivedUserGesture()) { historyCommitType = HistoryInertCommit; } @@ -962,7 +963,7 @@ if (m_frame->settings()->getHistoryEntryRequiresUserGesture() && request.originDocument() && - !request.originDocument()->hasReceivedUserGesture()) + !request.originDocument()->frame()->hasReceivedUserGesture()) return FrameLoadTypeReplaceCurrentItem; return FrameLoadTypeStandard;
diff --git a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h index 3040bbe..c3b0201 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoaderClient.h +++ b/third_party/WebKit/Source/core/loader/FrameLoaderClient.h
@@ -338,6 +338,8 @@ virtual KURL overrideFlashEmbedWithHTML(const KURL&) { return KURL(); } virtual BlameContext* frameBlameContext() { return nullptr; } + + virtual void setHasReceivedUserGesture() {} }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.cpp b/third_party/WebKit/Source/core/loader/ImageLoader.cpp index 3dd9552..548243f 100644 --- a/third_party/WebKit/Source/core/loader/ImageLoader.cpp +++ b/third_party/WebKit/Source/core/loader/ImageLoader.cpp
@@ -30,6 +30,7 @@ #include "core/dom/Document.h" #include "core/dom/Element.h" #include "core/dom/IncrementLoadEventDelayCount.h" +#include "core/dom/TaskRunnerHelper.h" #include "core/events/Event.h" #include "core/events/EventSender.h" #include "core/fetch/FetchRequest.h" @@ -155,7 +156,10 @@ ImageLoader::ImageLoader(Element* element) : m_element(element), - m_derefElementTimer(this, &ImageLoader::timerFired), + m_derefElementTimer(TaskRunnerHelper::get(TaskType::Networking, + element->document().frame()), + this, + &ImageLoader::timerFired), m_hasPendingLoadEvent(false), m_hasPendingErrorEvent(false), m_imageComplete(true),
diff --git a/third_party/WebKit/Source/core/loader/ImageLoader.h b/third_party/WebKit/Source/core/loader/ImageLoader.h index 2672727..0f61c2e 100644 --- a/third_party/WebKit/Source/core/loader/ImageLoader.h +++ b/third_party/WebKit/Source/core/loader/ImageLoader.h
@@ -159,7 +159,7 @@ GC_PLUGIN_IGNORE("http://crbug.com/383741") Persistent<Element> m_keepAlive; - Timer<ImageLoader> m_derefElementTimer; + TaskRunnerTimer<ImageLoader> m_derefElementTimer; AtomicString m_failedLoadURL; WeakPtr<Task> m_pendingTask; // owned by Microtask std::unique_ptr<IncrementLoadEventDelayCount> m_loadDelayCounter;
diff --git a/third_party/WebKit/Source/core/page/Page.cpp b/third_party/WebKit/Source/core/page/Page.cpp index 671df37..a48697d 100644 --- a/third_party/WebKit/Source/core/page/Page.cpp +++ b/third_party/WebKit/Source/core/page/Page.cpp
@@ -507,14 +507,16 @@ PageVisibilityNotifier::trace(visitor); } -void Page::layerTreeViewInitialized(WebLayerTreeView& layerTreeView) { +void Page::layerTreeViewInitialized(WebLayerTreeView& layerTreeView, + FrameView* view) { if (scrollingCoordinator()) - scrollingCoordinator()->layerTreeViewInitialized(layerTreeView); + scrollingCoordinator()->layerTreeViewInitialized(layerTreeView, view); } -void Page::willCloseLayerTreeView(WebLayerTreeView& layerTreeView) { +void Page::willCloseLayerTreeView(WebLayerTreeView& layerTreeView, + FrameView* view) { if (m_scrollingCoordinator) - m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView); + m_scrollingCoordinator->willCloseLayerTreeView(layerTreeView, view); } void Page::willBeDestroyed() {
diff --git a/third_party/WebKit/Source/core/page/Page.h b/third_party/WebKit/Source/core/page/Page.h index 133260a..c23e07a 100644 --- a/third_party/WebKit/Source/core/page/Page.h +++ b/third_party/WebKit/Source/core/page/Page.h
@@ -226,8 +226,8 @@ DECLARE_TRACE(); - void layerTreeViewInitialized(WebLayerTreeView&); - void willCloseLayerTreeView(WebLayerTreeView&); + void layerTreeViewInitialized(WebLayerTreeView&, FrameView*); + void willCloseLayerTreeView(WebLayerTreeView&, FrameView*); void willBeDestroyed();
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp index aef4256..feeddc1 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -508,8 +508,19 @@ isForRootLayer(scrollableArea)) m_page->chromeClient().registerViewportLayers(); - scrollableArea->layerForScrollingDidChange( - m_programmaticScrollAnimatorTimeline.get()); + CompositorAnimationTimeline* timeline; + // FrameView::compositorAnimationTimeline() can indirectly return + // m_programmaticScrollAnimatorTimeline if it does not have its own + // timeline. + if (scrollableArea->isFrameView()) { + timeline = toFrameView(scrollableArea)->compositorAnimationTimeline(); + } else if (scrollableArea->isPaintLayerScrollableArea()) { + timeline = toPaintLayerScrollableArea(scrollableArea) + ->compositorAnimationTimeline(); + } else { + timeline = m_programmaticScrollAnimatorTimeline.get(); + } + scrollableArea->layerForScrollingDidChange(timeline); return !!webLayer; } @@ -852,20 +863,37 @@ } void ScrollingCoordinator::layerTreeViewInitialized( - WebLayerTreeView& layerTreeView) { + WebLayerTreeView& layerTreeView, + FrameView* view) { if (Platform::current()->isThreadedAnimationEnabled() && layerTreeView.compositorAnimationHost()) { - m_animationHost = WTF::makeUnique<CompositorAnimationHost>( - layerTreeView.compositorAnimationHost()); - m_programmaticScrollAnimatorTimeline = + std::unique_ptr<CompositorAnimationTimeline> timeline = CompositorAnimationTimeline::create(); - m_animationHost->addTimeline(*m_programmaticScrollAnimatorTimeline.get()); + std::unique_ptr<CompositorAnimationHost> host = + WTF::makeUnique<CompositorAnimationHost>( + layerTreeView.compositorAnimationHost()); + if (view && view->frame().localFrameRoot() != m_page->mainFrame()) { + view->setAnimationHost(std::move(host)); + view->setAnimationTimeline(std::move(timeline)); + view->compositorAnimationHost()->addTimeline( + *view->compositorAnimationTimeline()); + } else { + m_animationHost = std::move(host); + m_programmaticScrollAnimatorTimeline = std::move(timeline); + m_animationHost->addTimeline(*m_programmaticScrollAnimatorTimeline.get()); + } } } void ScrollingCoordinator::willCloseLayerTreeView( - WebLayerTreeView& layerTreeView) { - if (m_programmaticScrollAnimatorTimeline) { + WebLayerTreeView& layerTreeView, + FrameView* view) { + if (view && view->frame().localFrameRoot() != m_page->mainFrame()) { + view->compositorAnimationHost()->removeTimeline( + *view->compositorAnimationTimeline()); + view->setAnimationTimeline(nullptr); + view->setAnimationHost(nullptr); + } else if (m_programmaticScrollAnimatorTimeline) { m_animationHost->removeTimeline( *m_programmaticScrollAnimatorTimeline.get()); m_programmaticScrollAnimatorTimeline = nullptr;
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h index 9f681cd..161f978 100644 --- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h +++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h
@@ -62,8 +62,12 @@ ~ScrollingCoordinator(); DECLARE_TRACE(); - void layerTreeViewInitialized(WebLayerTreeView&); - void willCloseLayerTreeView(WebLayerTreeView&); + // The FrameView argument is optional, nullptr causes the the scrolling + // animation host and timeline to be owned by the ScrollingCoordinator. When + // not null, the host and timeline are attached to the specified FrameView. + // A FrameView only needs to own them when it is the view for an OOPIF. + void layerTreeViewInitialized(WebLayerTreeView&, FrameView*); + void willCloseLayerTreeView(WebLayerTreeView&, FrameView*); void willBeDestroyed();
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp index f7aeadb..017c2ed 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp
@@ -1882,18 +1882,12 @@ CompositorAnimationHost* PaintLayerScrollableArea::compositorAnimationHost() const { - if (ScrollingCoordinator* coordinator = getScrollingCoordinator()) - return coordinator->compositorAnimationHost(); - - return nullptr; + return m_layer.layoutObject()->frameView()->compositorAnimationHost(); } CompositorAnimationTimeline* PaintLayerScrollableArea::compositorAnimationTimeline() const { - if (ScrollingCoordinator* coordinator = getScrollingCoordinator()) - return coordinator->compositorAnimationTimeline(); - - return nullptr; + return m_layer.layoutObject()->frameView()->compositorAnimationTimeline(); } PaintLayerScrollableArea*
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp index 0b176f6..a21f433b 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -960,10 +960,12 @@ if (object.isBoxModelObject() || object.isSVG()) { updatePaintOffsetTranslation(object, context); updateTransform(object, context); - updateEffect(object, context); + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) + updateEffect(object, context); updateCssClip(object, context); updateLocalBorderBoxContext(object, context); - updateScrollbarPaintOffset(object, context); + if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) + updateScrollbarPaintOffset(object, context); } if (object.needsPaintPropertyUpdate() || context.forceSubtreeUpdate) {
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h index 91f465b09..4108cf3 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.h +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -193,7 +193,7 @@ DataRef<SVGComputedStyle> m_svgStyle; // !START SYNC!: Keep this in sync with the copy constructor in - // ComputedStyle.cpp and implicitlyInherited() in StyleResolver.cpp + // ComputedStyle.cpp. // inherit struct InheritedData {
diff --git a/third_party/WebKit/Source/devtools/BUILD.gn b/third_party/WebKit/Source/devtools/BUILD.gn index 3c0cd9c..319b7fc 100644 --- a/third_party/WebKit/Source/devtools/BUILD.gn +++ b/third_party/WebKit/Source/devtools/BUILD.gn
@@ -486,6 +486,7 @@ "front_end/source_frame/UISourceCodeFrame.js", "front_end/sources/AddSourceMapURLDialog.js", "front_end/sources/AdvancedSearchView.js", + "front_end/sources/callStackSidebarPane.css", "front_end/sources/CallStackSidebarPane.js", "front_end/sources/CSSSourceFrame.js", "front_end/sources/dialog.css",
diff --git a/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js b/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js index 592c1df..ce77984 100644 --- a/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js +++ b/third_party/WebKit/Source/devtools/front_end/audits/AuditRules.js
@@ -599,7 +599,7 @@ var urls = []; for (var i = 0; i < requestCount; ++i) { if (requestCheckFunction.call(this, requests[i])) - urls.push(requests[i].url); + urls.push(requests[i].url()); } if (urls.length) { var entry = result.addChild(messageText, true); @@ -743,7 +743,7 @@ true); result.violationCount += requests.length; for (var i = 0; i < requests.length; ++i) - entry.addURL(requests[i].url); + entry.addURL(requests[i].url()); } } @@ -1330,7 +1330,7 @@ if (!requests) return; for (var i = 0; i < requests.length; ++i) { - if (SDK.Cookies.cookieMatchesResourceURL(cookie, requests[i].url)) + if (SDK.Cookies.cookieMatchesResourceURL(cookie, requests[i].url())) callback(requests[i], cookie); } }
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js index 4dee913..fe3f432 100644 --- a/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js +++ b/third_party/WebKit/Source/devtools/front_end/bindings/BlackboxManager.js
@@ -19,6 +19,9 @@ Common.moduleSetting('skipStackFramesPattern').addChangeListener(this._patternChanged.bind(this)); Common.moduleSetting('skipContentScripts').addChangeListener(this._patternChanged.bind(this)); + /** @type {!Set<function()>} */ + this._listeners = new Set(); + /** @type {!Map<!SDK.DebuggerModel, !Map<string, !Array<!Protocol.Debugger.ScriptPosition>>>} */ this._debuggerModelData = new Map(); /** @type {!Map<string, boolean>} */ @@ -28,19 +31,17 @@ } /** - * @param {function(!Common.Event)} listener - * @param {!Object=} thisObject + * @param {function()} listener */ - addChangeListener(listener, thisObject) { - Common.moduleSetting('skipStackFramesPattern').addChangeListener(listener, thisObject); + addChangeListener(listener) { + this._listeners.add(listener); } /** - * @param {function(!Common.Event)} listener - * @param {!Object=} thisObject + * @param {function()} listener */ - removeChangeListener(listener, thisObject) { - Common.moduleSetting('skipStackFramesPattern').removeChangeListener(listener, thisObject); + removeChangeListener(listener) { + this._listeners.delete(listener); } /** @@ -285,7 +286,12 @@ promises.push(this._addScript(script).then(loadSourceMap.bind(this, script))); } } - Promise.all(promises).then(this._patternChangeFinishedForTests.bind(this)); + Promise.all(promises).then(() => { + var listeners = Array.from(this._listeners); + for (var listener of listeners) + listener(); + this._patternChangeFinishedForTests(); + }); /** * @param {!SDK.Script} script
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js index b969bd7..380e726 100644 --- a/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js +++ b/third_party/WebKit/Source/devtools/front_end/elements/ComputedStyleWidget.js
@@ -214,6 +214,8 @@ * @return {number} */ function propertySorter(a, b) { + if (a.startsWith('--') ^ b.startsWith('--')) + return a.startsWith('--') ? 1 : -1; if (a.startsWith('-webkit') ^ b.startsWith('-webkit')) return a.startsWith('-webkit') ? 1 : -1; var canonical1 = SDK.cssMetadata().canonicalPropertyName(a);
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js index 6bed81d0..3c4027a 100644 --- a/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js +++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkDataGridNode.js
@@ -844,11 +844,14 @@ Network.NetworkGroupNode = class extends Network.NetworkNode { /** * @param {!Network.NetworkLogView} parentView - * @param {string} name + * @param {string} displayName + * @param {string=} sortKey */ - constructor(parentView, name) { + constructor(parentView, displayName, sortKey) { super(parentView); - this._name = name; + this._displayName = displayName; + // TODO(allada) This is here because you can always sort by _name. This class deserves it's own sorting functions. + this._name = sortKey; } /** @@ -869,7 +872,7 @@ var cell = this.createTD(columnIdentifier); if (columnIdentifier === 'name') { cell.classList.add('disclosure'); - this._setTextAndTitle(cell, this._name); + this._setTextAndTitle(cell, this._displayName); } return cell; }
diff --git a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js index 2db3eee9..329097f 100644 --- a/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js +++ b/third_party/WebKit/Source/devtools/front_end/network/NetworkLogView.js
@@ -782,9 +782,9 @@ this._timeCalculator.updateBoundariesForEventTime(this._mainRequestDOMContentLoadedTime); this._durationCalculator.updateBoundariesForEventTime(this._mainRequestDOMContentLoadedTime); - /** @type {!Array<!Network.NetworkRequestNode> } */ - var nodesToInsert = []; - /** @type {!Array<!Network.NetworkRequestNode> } */ + /** @type {!Map<!Network.NetworkNode, !Network.NetworkNode>} */ + var nodesToInsert = new Map(); + /** @type {!Array<!Network.NetworkNode>} */ var nodesToRefresh = []; for (var requestId in this._staleRequestIds) { var node = this._nodesByRequestId.get(requestId); @@ -793,27 +793,44 @@ var isFilteredOut = !this._applyFilter(node); if (isFilteredOut && node === this._hoveredNode) this._setHoveredNode(null); - if (node[Network.NetworkLogView._isFilteredOutSymbol] !== isFilteredOut) { - if (!node[Network.NetworkLogView._isFilteredOutSymbol]) - node.parent.removeChild(node); - node[Network.NetworkLogView._isFilteredOutSymbol] = isFilteredOut; - - if (!node[Network.NetworkLogView._isFilteredOutSymbol]) - nodesToInsert.push(node); - } if (!isFilteredOut) nodesToRefresh.push(node); var request = node.request(); this._timeCalculator.updateBoundaries(request); this._durationCalculator.updateBoundaries(request); + + if (node[Network.NetworkLogView._isFilteredOutSymbol] === isFilteredOut) + continue; + + node[Network.NetworkLogView._isFilteredOutSymbol] = isFilteredOut; + var newParent = this._parentNodeForInsert(node); + var removeFromParent = node.parent && (isFilteredOut || node.parent !== newParent); + if (removeFromParent) { + var parent = node.parent; + parent.removeChild(node); + while (parent && !parent.hasChildren() && parent.dataGrid && parent.dataGrid.rootNode() !== parent) { + var grandparent = parent.parent; + grandparent.removeChild(parent); + parent = grandparent; + } + } + + if (isFilteredOut) + continue; + + if (!newParent.dataGrid && !nodesToInsert.has(newParent)) { + nodesToInsert.set(newParent, this._dataGrid.rootNode()); + nodesToRefresh.push(newParent); + } + nodesToInsert.set(node, newParent); } - for (var i = 0; i < nodesToInsert.length; ++i) { - var node = nodesToInsert[i]; + for (var node of nodesToInsert.keys()) { + var parent = nodesToInsert.get(node); var request = node.request(); - node[Network.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(request); - var parent = this._parentNodeForInsert(node); + if (request) + node[Network.NetworkLogView._isMatchingSearchQuerySymbol] = this._matchRequest(request); parent.appendChild(node); } @@ -839,13 +856,17 @@ var request = node.request(); // TODO(allada) Make this dynamic and allow multiple grouping types. - var groupKey = request.domain; + var groupKey = request.connectionId; var group = this._nodeGroups.get(groupKey); if (group) return group; - group = new Network.NetworkGroupNode(this, groupKey); + + var parsedURL = request.url().asParsedURL(); + var host = ''; + if (parsedURL) + host = parsedURL.host; + group = new Network.NetworkGroupNode(this, host + ' - ' + groupKey); this._nodeGroups.set(groupKey, group); - this._dataGrid.rootNode().appendChild(group); return group; }
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js index 179e5292..9695e4b 100644 --- a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js +++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
@@ -698,9 +698,8 @@ context.fillText(text, barX + textPadding, barY + textBaseHeight); } - context.restore(); - this._drawGroupHeaders(width, height); + context.restore(); this._drawMarkers(); const headerHeight = this._rulerEnabled ? PerfUI.FlameChart.HeaderHeight : 0; PerfUI.TimelineGrid.drawCanvasGrid(context, this._calculator, 3, headerHeight); @@ -876,7 +875,7 @@ var timeWindowRight = this._timeWindowRight; var timeWindowLeft = this._timeWindowLeft - this._paddingLeft / this._timeToPixel; var context = /** @type {!CanvasRenderingContext2D} */ (this._canvas.getContext('2d')); - var barHeight = this._barHeight - 2; + var barHeight = this._barHeight - 1; var entryStartTimes = this._rawTimelineData.entryStartTimes; var entryTotalTimes = this._rawTimelineData.entryTotalTimes; @@ -903,9 +902,9 @@ const barWidth = endBarX - barX; context.beginPath(); context.fillStyle = color; - context.fillRect(barX, y, barWidth, barHeight - 1); + context.fillRect(barX, y, barWidth, barHeight); this._dataProvider.decorateEntry( - entryIndex, context, '', barX, y, barWidth, barHeight, unclippedBarX, this._timeToPixel); + entryIndex, context, '', barX, y, barWidth, this._barHeight, unclippedBarX, this._timeToPixel); continue; } range.append(new Common.Segment(barX, endBarX, color));
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css b/third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css index fd35038..2ef347e3 100644 --- a/third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css +++ b/third_party/WebKit/Source/devtools/front_end/profiler/profilesPanel.css
@@ -172,7 +172,7 @@ } .js_profiler.panel select.chrome-select, -.heap_profiler.panel select.chrome-select, +.heap_profiler.panel select.chrome-select { font-size: 12px; width: 150px;
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js index 8add4b5..6a76d028 100644 --- a/third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js +++ b/third_party/WebKit/Source/devtools/front_end/sdk/CSSMetadata.js
@@ -180,7 +180,8 @@ */ isPropertyInherited(propertyName) { propertyName = propertyName.toLowerCase(); - return this._inherited.has(this.canonicalPropertyName(propertyName)) || this._inherited.has(propertyName); + return propertyName.startsWith('--') || this._inherited.has(this.canonicalPropertyName(propertyName)) || + this._inherited.has(propertyName); } /**
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js index 30e7076..f4c19d1 100644 --- a/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js +++ b/third_party/WebKit/Source/devtools/front_end/sources/CallStackSidebarPane.js
@@ -22,21 +22,33 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + /** * @implements {UI.ContextFlavorListener} + * @implements {UI.ListDelegate<!Sources.CallStackSidebarPane.Item>} * @unrestricted */ Sources.CallStackSidebarPane = class extends UI.SimpleView { constructor() { - super(Common.UIString('Call Stack')); - this.callFrameList = new Sources.UIList(); - this.callFrameList.show(this.element); - this._linkifier = new Components.Linkifier(); - Common.moduleSetting('enableAsyncStackTraces').addChangeListener(this._asyncStackTracesStateChanged, this); - Common.moduleSetting('skipStackFramesPattern').addChangeListener(this._update, this); - /** @type {!Array<!Sources.CallStackSidebarPane.CallFrame>} */ - this.callFrames = []; + super(Common.UIString('Call Stack'), true); + this.registerRequiredCSS('sources/callStackSidebarPane.css'); + + this._blackboxedMessageElement = this._createBlackboxedMessageElement(); + this.contentElement.appendChild(this._blackboxedMessageElement); + + this._notPausedMessageElement = this.contentElement.createChild('div', 'gray-info-message'); + this._notPausedMessageElement.textContent = Common.UIString('Not Paused'); + + /** @type {!UI.ListControl<!Sources.CallStackSidebarPane.Item>} */ + this._list = new UI.ListControl(this, UI.ListMode.NonViewport); + this.contentElement.appendChild(this._list.element); + this._list.element.addEventListener('contextmenu', this._onContextMenu.bind(this), false); + this._list.element.addEventListener('click', this._onClick.bind(this), false); + + this._showBlackboxed = false; + Bindings.blackboxManager.addChangeListener(this._update.bind(this)); this._locationPool = new Bindings.LiveLocationPool(); + this._update(); } @@ -45,35 +57,39 @@ * @param {?Object} object */ flavorChanged(object) { + this._showBlackboxed = false; this._update(); } _update() { - var details = UI.context.flavor(SDK.DebuggerPausedDetails); - - this.callFrameList.detach(); - this.callFrameList.clear(); - this._linkifier.reset(); - this.element.removeChildren(); this._locationPool.disposeAll(); - this.callFrameList.show(this.element); - delete this._hiddenCallFramesMessageElement; - this.callFrames = []; - this._hiddenCallFrames = 0; - + var details = UI.context.flavor(SDK.DebuggerPausedDetails); if (!details) { - var infoElement = this.element.createChild('div', 'gray-info-message'); - infoElement.textContent = Common.UIString('Not Paused'); + this._notPausedMessageElement.classList.remove('hidden'); + this._blackboxedMessageElement.classList.add('hidden'); + this._list.replaceAllItems([]); + this._debuggerModel = null; UI.context.setFlavor(SDK.DebuggerModel.CallFrame, null); return; } + this._debuggerModel = details.debuggerModel; + this._notPausedMessageElement.classList.add('hidden'); + + var showBlackboxed = this._showBlackboxed || + details.callFrames.every(frame => Bindings.blackboxManager.isBlackboxedRawLocation(frame.location())); + + var hiddenCallFramesCount = 0; + var items = details.callFrames.map(frame => ({debuggerCallFrame: frame})); + if (!showBlackboxed) { + items = items.filter( + item => !Bindings.blackboxManager.isBlackboxedRawLocation( + /** @type {!SDK.DebuggerModel.Location} */ (this._itemLocation(item)))); + hiddenCallFramesCount += details.callFrames.length - items.length; + } + var asyncStackTrace = details.asyncStackTrace; - - this._appendSidebarCallFrames(this._callFramesFromDebugger(details.callFrames)); - var topStackHidden = (this._hiddenCallFrames === this.callFrames.length); - var peviousStackTrace = details.callFrames; while (asyncStackTrace) { var title = ''; @@ -86,151 +102,194 @@ } else { title = UI.asyncStackTraceLabel(asyncStackTrace.description); } - var asyncCallFrame = new Sources.UIList.Item(title, '', true); - asyncCallFrame.setHoverable(false); - asyncCallFrame.element.addEventListener( - 'contextmenu', this._asyncCallFrameContextMenu.bind(this, this.callFrames.length), true); - this._appendSidebarCallFrames( - this._callFramesFromRuntime(asyncStackTrace.callFrames, asyncCallFrame), asyncCallFrame); + + var asyncItems = asyncStackTrace.callFrames.map(frame => ({runtimeCallFrame: frame})); + if (!showBlackboxed) { + asyncItems = asyncItems.filter( + item => !Bindings.blackboxManager.isBlackboxedRawLocation( + /** @type {!SDK.DebuggerModel.Location} */ (this._itemLocation(item)))); + hiddenCallFramesCount += asyncStackTrace.callFrames.length - asyncItems.length; + } + if (asyncItems.length) { + items.push({asyncStackHeader: title}); + items = items.concat(asyncItems); + } + peviousStackTrace = asyncStackTrace.callFrames; asyncStackTrace = asyncStackTrace.parent; } - if (topStackHidden) - this._revealHiddenCallFrames(); - if (this._hiddenCallFrames) { - var element = createElementWithClass('div', 'hidden-callframes-message'); - if (this._hiddenCallFrames === 1) - element.textContent = Common.UIString('1 stack frame is hidden (black-boxed).'); - else - element.textContent = Common.UIString('%d stack frames are hidden (black-boxed).', this._hiddenCallFrames); - element.createTextChild(' '); - var showAllLink = element.createChild('span', 'link'); - showAllLink.textContent = Common.UIString('Show'); - showAllLink.addEventListener('click', this._revealHiddenCallFrames.bind(this), false); - this.element.insertBefore(element, this.element.firstChild); - this._hiddenCallFramesMessageElement = element; - } - this._selectNextVisibleCallFrame(0); - } - - /** - * @param {!Array.<!SDK.DebuggerModel.CallFrame>} callFrames - * @return {!Array<!Sources.CallStackSidebarPane.CallFrame>} - */ - _callFramesFromDebugger(callFrames) { - var callFrameItems = []; - for (var i = 0, n = callFrames.length; i < n; ++i) { - var callFrame = callFrames[i]; - var callFrameItem = new Sources.CallStackSidebarPane.CallFrame( - callFrame.functionName, callFrame.location(), this._linkifier, callFrame, this._locationPool); - callFrameItem.element.addEventListener('click', this._callFrameSelected.bind(this, callFrameItem), false); - callFrameItems.push(callFrameItem); - } - return callFrameItems; - } - - /** - * @param {!Array<!Protocol.Runtime.CallFrame>} callFrames - * @param {!Sources.UIList.Item} asyncCallFrameItem - * @return {!Array<!Sources.CallStackSidebarPane.CallFrame>} - */ - _callFramesFromRuntime(callFrames, asyncCallFrameItem) { - var callFrameItems = []; - for (var i = 0, n = callFrames.length; i < n; ++i) { - var callFrame = callFrames[i]; - var location = new SDK.DebuggerModel.Location( - this._debuggerModel, callFrame.scriptId, callFrame.lineNumber, callFrame.columnNumber); - var callFrameItem = new Sources.CallStackSidebarPane.CallFrame( - callFrame.functionName, location, this._linkifier, null, this._locationPool, asyncCallFrameItem); - callFrameItem.element.addEventListener('click', this._asyncCallFrameClicked.bind(this, callFrameItem), false); - callFrameItems.push(callFrameItem); - } - return callFrameItems; - } - - /** - * @param {!Array.<!Sources.CallStackSidebarPane.CallFrame>} callFrames - * @param {!Sources.UIList.Item=} asyncCallFrameItem - */ - _appendSidebarCallFrames(callFrames, asyncCallFrameItem) { - if (asyncCallFrameItem) - this.callFrameList.addItem(asyncCallFrameItem); - - var allCallFramesHidden = true; - for (var i = 0, n = callFrames.length; i < n; ++i) { - var callFrameItem = callFrames[i]; - callFrameItem.element.addEventListener('contextmenu', this._callFrameContextMenu.bind(this, callFrameItem), true); - this.callFrames.push(callFrameItem); - - if (Bindings.blackboxManager.isBlackboxedRawLocation(callFrameItem._location)) { - callFrameItem.setHidden(true); - callFrameItem.setDimmed(true); - ++this._hiddenCallFrames; + if (!hiddenCallFramesCount) { + this._blackboxedMessageElement.classList.add('hidden'); + } else { + if (hiddenCallFramesCount === 1) { + this._blackboxedMessageElement.firstChild.textContent = + Common.UIString('1 stack frame is hidden (black-boxed).'); } else { - this.callFrameList.addItem(callFrameItem); - allCallFramesHidden = false; + this._blackboxedMessageElement.firstChild.textContent = + Common.UIString('%d stack frames are hidden (black-boxed).', hiddenCallFramesCount); } + this._blackboxedMessageElement.classList.remove('hidden'); } - if (allCallFramesHidden && asyncCallFrameItem) { - asyncCallFrameItem.setHidden(true); - asyncCallFrameItem.element.remove(); - } - } - _revealHiddenCallFrames() { - if (!this._hiddenCallFrames) - return; - this._hiddenCallFrames = 0; - this.callFrameList.clear(); - for (var i = 0; i < this.callFrames.length; ++i) { - var callFrame = this.callFrames[i]; - if (callFrame._asyncCallFrame) { - callFrame._asyncCallFrame.setHidden(false); - if (i && callFrame._asyncCallFrame !== this.callFrames[i - 1]._asyncCallFrame) - this.callFrameList.addItem(callFrame._asyncCallFrame); - } - callFrame.setHidden(false); - this.callFrameList.addItem(callFrame); - } - if (this._hiddenCallFramesMessageElement) { - this._hiddenCallFramesMessageElement.remove(); - delete this._hiddenCallFramesMessageElement; - } + this._list.replaceAllItems(items); + this._list.selectNextItem(true /* canWrap */, false /* center */); } /** - * @param {!Sources.CallStackSidebarPane.CallFrame} callFrame + * @override + * @param {!Sources.CallStackSidebarPane.Item} item + * @return {!Element} + */ + createElementForItem(item) { + var element = createElementWithClass('div', 'call-frame-item'); + element.createChild('div', 'call-frame-item-title').textContent = this._itemTitle(item); + if (item.asyncStackHeader) + element.classList.add('async-header'); + + var location = this._itemLocation(item); + if (location) { + if (Bindings.blackboxManager.isBlackboxedRawLocation(location)) + element.classList.add('blackboxed-call-frame'); + + /** + * @param {!Bindings.LiveLocation} liveLocation + */ + function updateLocation(liveLocation) { + var uiLocation = liveLocation.uiLocation(); + if (!uiLocation) + return; + var text = uiLocation.linkText(); + linkElement.textContent = text.trimMiddle(30); + linkElement.title = text; + } + + var linkElement = element.createChild('div', 'call-frame-location'); + Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation(location, updateLocation, this._locationPool); + } + + element.appendChild(UI.Icon.create('smallicon-thick-right-arrow', 'selected-call-frame-icon')); + return element; + } + + /** + * @override + * @param {!Sources.CallStackSidebarPane.Item} item + * @return {number} + */ + heightForItem(item) { + console.assert(false); // Should not be called. + return 0; + } + + /** + * @override + * @param {!Sources.CallStackSidebarPane.Item} item + * @return {boolean} + */ + isItemSelectable(item) { + return !!item.debuggerCallFrame; + } + + /** + * @override + * @param {?Sources.CallStackSidebarPane.Item} from + * @param {?Sources.CallStackSidebarPane.Item} to + * @param {?Element} fromElement + * @param {?Element} toElement + */ + selectedItemChanged(from, to, fromElement, toElement) { + if (fromElement) + fromElement.classList.remove('selected'); + if (toElement) + toElement.classList.add('selected'); + + if (!to) + return; + + var oldCallFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame); + if (oldCallFrame === to.debuggerCallFrame) { + var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(oldCallFrame.location()); + Common.Revealer.reveal(uiLocation); + return; + } + + UI.context.setFlavor(SDK.DebuggerModel.CallFrame, to.debuggerCallFrame); + this._debuggerModel.setSelectedCallFrame(to.debuggerCallFrame); + } + + /** + * @param {!Sources.CallStackSidebarPane.Item} item + * @return {string} + */ + _itemTitle(item) { + if (item.debuggerCallFrame) + return UI.beautifyFunctionName(item.debuggerCallFrame.functionName); + if (item.runtimeCallFrame) + return UI.beautifyFunctionName(item.runtimeCallFrame.functionName); + return item.asyncStackHeader || ''; + } + + /** + * @param {!Sources.CallStackSidebarPane.Item} item + * @return {?SDK.DebuggerModel.Location} + */ + _itemLocation(item) { + if (item.debuggerCallFrame) + return item.debuggerCallFrame.location(); + if (item.runtimeCallFrame) { + return new SDK.DebuggerModel.Location( + this._debuggerModel, item.runtimeCallFrame.scriptId, item.runtimeCallFrame.lineNumber, + item.runtimeCallFrame.columnNumber); + } + return null; + } + + /** + * @return {!Element} + */ + _createBlackboxedMessageElement() { + var element = createElementWithClass('div', 'blackboxed-message'); + element.createChild('span'); + var showAllLink = element.createChild('span', 'link'); + showAllLink.textContent = Common.UIString('Show'); + showAllLink.addEventListener('click', () => { + this._showBlackboxed = true; + this._update(); + }, false); + return element; + } + + /** * @param {!Event} event */ - _callFrameContextMenu(callFrame, event) { + _onContextMenu(event) { + var item = this._list.itemForNode(/** @type {?Node} */ (event.target)); + if (!item) + return; var contextMenu = new UI.ContextMenu(event); - var debuggerCallFrame = callFrame._debuggerCallFrame; - if (debuggerCallFrame) { - contextMenu.appendItem( - Common.UIString.capitalize('Restart ^frame'), debuggerCallFrame.restart.bind(debuggerCallFrame)); - } - + if (item.debuggerCallFrame) + contextMenu.appendItem(Common.UIString.capitalize('Restart ^frame'), () => item.debuggerCallFrame.restart()); contextMenu.appendItem(Common.UIString.capitalize('Copy ^stack ^trace'), this._copyStackTrace.bind(this)); - - var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(callFrame._location); - this.appendBlackboxURLContextMenuItems(contextMenu, uiLocation.uiSourceCode); - + var location = this._itemLocation(item); + if (location) { + var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location); + this.appendBlackboxURLContextMenuItems(contextMenu, uiLocation.uiSourceCode); + } contextMenu.show(); } /** - * @param {number} index * @param {!Event} event */ - _asyncCallFrameContextMenu(index, event) { - for (; index < this.callFrames.length; ++index) { - var callFrame = this.callFrames[index]; - if (!callFrame.isHidden()) { - this._callFrameContextMenu(callFrame, event); - break; - } - } + _onClick(event) { + var item = this._list.itemForNode(/** @type {?Node} */ (event.target)); + if (!item || !item.runtimeCallFrame) + return; + var location = this._itemLocation(item); + if (!location) + return; + Common.Revealer.reveal(Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location)); } /** @@ -271,130 +330,33 @@ } } - _asyncStackTracesStateChanged() { - var enabled = Common.moduleSetting('enableAsyncStackTraces').get(); - if (!enabled && this.callFrames) - this._removeAsyncCallFrames(); - } - - _removeAsyncCallFrames() { - var shouldSelectTopFrame = false; - var lastSyncCallFrameIndex = -1; - for (var i = 0; i < this.callFrames.length; ++i) { - var callFrame = this.callFrames[i]; - if (callFrame._asyncCallFrame) { - if (callFrame.isSelected()) - shouldSelectTopFrame = true; - callFrame._asyncCallFrame.element.remove(); - callFrame.element.remove(); - } else { - lastSyncCallFrameIndex = i; - } - } - this.callFrames.length = lastSyncCallFrameIndex + 1; - if (shouldSelectTopFrame) - this._selectNextVisibleCallFrame(0); - } - /** * @return {boolean} */ _selectNextCallFrameOnStack() { - var index = this._selectedCallFrameIndex(); - if (index === -1) - return false; - return this._selectNextVisibleCallFrame(index + 1); + return this._list.selectNextItem(false /* canWrap */, false /* center */); } /** * @return {boolean} */ _selectPreviousCallFrameOnStack() { - var index = this._selectedCallFrameIndex(); - if (index === -1) - return false; - return this._selectNextVisibleCallFrame(index - 1, true); - } - - /** - * @param {number} index - * @param {boolean=} backward - * @return {boolean} - */ - _selectNextVisibleCallFrame(index, backward) { - while (0 <= index && index < this.callFrames.length) { - var callFrame = this.callFrames[index]; - if (!callFrame.isHidden() && !callFrame.isLabel() && !callFrame._asyncCallFrame) { - this._callFrameSelected(callFrame); - return true; - } - index += backward ? -1 : 1; - } - return false; - } - - /** - * @return {number} - */ - _selectedCallFrameIndex() { - if (!this._debuggerModel) - return -1; - var selectedCallFrame = this._debuggerModel.selectedCallFrame(); - if (!selectedCallFrame) - return -1; - for (var i = 0; i < this.callFrames.length; ++i) { - if (this.callFrames[i]._debuggerCallFrame === selectedCallFrame) - return i; - } - return -1; - } - - /** - * @param {!Sources.CallStackSidebarPane.CallFrame} callFrameItem - */ - _asyncCallFrameClicked(callFrameItem) { - var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(callFrameItem._location); - Common.Revealer.reveal(uiLocation); - } - - /** - * @param {!Sources.CallStackSidebarPane.CallFrame} selectedCallFrame - */ - _callFrameSelected(selectedCallFrame) { - selectedCallFrame.element.scrollIntoViewIfNeeded(); - var callFrame = selectedCallFrame._debuggerCallFrame; - - for (var i = 0; i < this.callFrames.length; ++i) { - var callFrameItem = this.callFrames[i]; - callFrameItem.setSelected(callFrameItem === selectedCallFrame); - if (callFrameItem.isSelected() && callFrameItem.isHidden()) - this._revealHiddenCallFrames(); - } - - var oldCallFrame = UI.context.flavor(SDK.DebuggerModel.CallFrame); - if (oldCallFrame === callFrame) { - var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(callFrame.location()); - Common.Revealer.reveal(uiLocation); - return; - } - - UI.context.setFlavor(SDK.DebuggerModel.CallFrame, callFrame); - callFrame.debuggerModel.setSelectedCallFrame(callFrame); + return this._list.selectPreviousItem(false /* canWrap */, false /* center */); } _copyStackTrace() { - var text = ''; - var lastCallFrame = null; - for (var i = 0; i < this.callFrames.length; ++i) { - var callFrame = this.callFrames[i]; - if (callFrame.isHidden()) - continue; - if (lastCallFrame && callFrame._asyncCallFrame !== lastCallFrame._asyncCallFrame) - text += callFrame._asyncCallFrame.title() + '\n'; - text += callFrame.title() + ' (' + callFrame.subtitle() + ')\n'; - lastCallFrame = callFrame; + var text = []; + for (var i = 0; i < this._list.length(); i++) { + var item = this._list.itemAtIndex(i); + var itemText = this._itemTitle(item); + var location = this._itemLocation(item); + if (location) { + var uiLocation = Bindings.debuggerWorkspaceBinding.rawLocationToUILocation(location); + itemText += ' (' + uiLocation.linkText() + ')'; + } + text.push(itemText); } - InspectorFrontendHost.copyText(text); + InspectorFrontendHost.copyText(text.join('\n')); } /** @@ -409,34 +371,10 @@ }; /** - * @unrestricted + * @typedef {{ + * debuggerCallFrame: (SDK.DebuggerModel.CallFrame|undefined), + * asyncStackHeader: (string|undefined), + * runtimeCallFrame: (Protocol.Runtime.CallFrame|undefined) + * }} */ -Sources.CallStackSidebarPane.CallFrame = class extends Sources.UIList.Item { - /** - * @param {string} functionName - * @param {!SDK.DebuggerModel.Location} location - * @param {!Components.Linkifier} linkifier - * @param {?SDK.DebuggerModel.CallFrame} debuggerCallFrame - * @param {!Bindings.LiveLocationPool} locationPool - * @param {!Sources.UIList.Item=} asyncCallFrame - */ - constructor(functionName, location, linkifier, debuggerCallFrame, locationPool, asyncCallFrame) { - super(UI.beautifyFunctionName(functionName), ''); - this._location = location; - this._debuggerCallFrame = debuggerCallFrame; - this._asyncCallFrame = asyncCallFrame; - Bindings.debuggerWorkspaceBinding.createCallFrameLiveLocation(location, this._update.bind(this), locationPool); - } - - /** - * @param {!Bindings.LiveLocation} liveLocation - */ - _update(liveLocation) { - var uiLocation = liveLocation.uiLocation(); - if (!uiLocation) - return; - var text = uiLocation.linkText(); - this.setSubtitle(text.trimMiddle(30)); - this.subtitleElement.title = text; - } -}; +Sources.CallStackSidebarPane.Item;
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/callStackSidebarPane.css b/third_party/WebKit/Source/devtools/front_end/sources/callStackSidebarPane.css new file mode 100644 index 0000000..6190422 --- /dev/null +++ b/third_party/WebKit/Source/devtools/front_end/sources/callStackSidebarPane.css
@@ -0,0 +1,86 @@ +/* + * 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. + */ + +.blackboxed-message { + text-align: center; + font-style: italic; + padding: 4px; + color: #888; + background-color: #FFFFC2; +} + +.blackboxed-message > .link { + margin-left: 5px; +} + +.call-frame-item { + padding: 3px 8px 3px 20px; + position: relative; + min-height: 18px; + line-height: 15px; + display: flex; + flex-wrap: wrap; +} + +.call-frame-item:not(.async-header) { + border-top: 1px solid #efefef; +} + +.call-frame-item:not(.async-header):hover { + background-color: #eee; +} + +.async-header + .call-frame-item { + border-top: 0; +} + +.call-frame-item-title, +.call-frame-location { + text-overflow: ellipsis; + overflow: hidden; + white-space: nowrap; +} + +.call-frame-location { + color: #888; + margin-left: auto; + padding: 0 10px 0 10px; +} + +.async-header::before { + content: " "; + width: 100%; + border-top: 1px solid #d8d8d8; + margin-top: 8px; + position: absolute; + z-index: -1; + left: 0; +} + +.async-header .call-frame-item-title { + font-weight: bold; + color: #999; + background-color: white; + margin-left: -5px; + padding: 0 5px; +} + +.blackboxed-call-frame { + opacity: 0.6; + font-style: italic; +} + +.selected-call-frame-icon { + display: none; + position: absolute; + top: 5px; + left: 4px; +} + +.call-frame-item.selected .selected-call-frame-icon { + display: block; +} +
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/module.json b/third_party/WebKit/Source/devtools/front_end/sources/module.json index 3cb285ee..ee10edb1 100644 --- a/third_party/WebKit/Source/devtools/front_end/sources/module.json +++ b/third_party/WebKit/Source/devtools/front_end/sources/module.json
@@ -655,6 +655,7 @@ "ObjectEventListenersSidebarPane.js" ], "resources": [ + "callStackSidebarPane.css", "uiList.css", "debuggerPausedMessage.css", "eventListenerBreakpoints.css",
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/sourcesPanel.css b/third_party/WebKit/Source/devtools/front_end/sources/sourcesPanel.css index d71133b..ca91f1f 100644 --- a/third_party/WebKit/Source/devtools/front_end/sources/sourcesPanel.css +++ b/third_party/WebKit/Source/devtools/front_end/sources/sourcesPanel.css
@@ -254,14 +254,6 @@ flex: none; } -.hidden-callframes-message { - text-align: center; - font-style: italic; - padding: 4px; - color: #888; - background-color: #FFFFC2; -} - .event-listeners-sidebar-pane .toolbar { border-bottom: 1px solid #eee; }
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js index 5cd522b6..6d00b467 100644 --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineFlameChartView.js
@@ -146,7 +146,8 @@ this._networkView.addEventListener(PerfUI.FlameChart.Events.EntrySelected, this._onNetworkEntrySelected, this); this._nextExtensionIndex = 0; - Bindings.blackboxManager.addChangeListener(this.refreshRecords, this); + this._boundRefresh = this.refreshRecords.bind(this); + Bindings.blackboxManager.addChangeListener(this._boundRefresh); } /** @@ -155,7 +156,7 @@ dispose() { this._mainView.removeEventListener(PerfUI.FlameChart.Events.EntrySelected, this._onMainEntrySelected, this); this._networkView.removeEventListener(PerfUI.FlameChart.Events.EntrySelected, this._onNetworkEntrySelected, this); - Bindings.blackboxManager.removeChangeListener(this.refreshRecords, this); + Bindings.blackboxManager.removeChangeListener(this._boundRefresh); } /** @@ -305,7 +306,7 @@ resizeToPreferredHeights() { this._splitWidget.setSidebarSize( this._networkDataProvider.preferredHeight() + this._splitResizer.clientHeight + PerfUI.FlameChart.HeaderHeight + - 2); + 3); } };
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js index e18543b8..4d79488 100644 --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineNetworkFlameChart.js
@@ -26,7 +26,7 @@ useDecoratorsForOverview: true, shareHeaderLine: false }; - this._group = {startLevel: 0, name: Common.UIString('Network'), expanded: true, style: this._style}; + this._group = {startLevel: 0, name: Common.UIString('Network'), expanded: false, style: this._style}; } /**
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js index 1d5ba2b..17940ae 100644 --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelinePanel.js
@@ -105,7 +105,7 @@ SDK.targetManager.addEventListener(SDK.TargetManager.Events.Load, this._loadEventFired, this); // Create top level properties splitter. - this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState'); + this._detailsSplitWidget = new UI.SplitWidget(false, true, 'timelinePanelDetailsSplitViewState', 400); this._detailsSplitWidget.element.classList.add('timeline-details-split'); this._detailsView = new Timeline.TimelineDetailsView(this._model, this._frameModel, this._filmStripModel, this._filters, this);
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js index 01c4be17..221b59e 100644 --- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js +++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineTreeView.js
@@ -32,26 +32,27 @@ this._filters = filters.slice(); - var columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([]); + const columns = /** @type {!Array<!DataGrid.DataGrid.ColumnDescriptor>} */ ([]); this._populateColumns(columns); - var mainView = new UI.VBox(); + this._splitWidget = new UI.SplitWidget(true, true, 'timelineTreeViewDetailsSplitWidget'); + const mainView = new UI.VBox(); this._populateToolbar(mainView.element); + this._dataGrid = new DataGrid.SortableDataGrid(columns); this._dataGrid.addEventListener(DataGrid.DataGrid.Events.SortingChanged, this._sortingChanged, this); this._dataGrid.element.addEventListener('mousemove', this._onMouseMove.bind(this), true); this._dataGrid.setResizeMethod(DataGrid.DataGrid.ResizeMethod.Last); this._dataGrid.setRowContextMenuCallback(this._onContextMenu.bind(this)); this._dataGrid.asWidget().show(mainView.element); - - this._splitWidget = new UI.SplitWidget(true, true, 'timelineTreeViewDetailsSplitWidget'); - this._splitWidget.show(this.element); - this._splitWidget.setMainWidget(mainView); + this._dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this._updateDetailsForSelection, this); this._detailsView = new UI.VBox(); this._detailsView.element.classList.add('timeline-details-view', 'timeline-details-view-body'); + this._splitWidget.setMainWidget(mainView); this._splitWidget.setSidebarWidget(this._detailsView); - this._dataGrid.addEventListener(DataGrid.DataGrid.Events.SelectedNode, this._updateDetailsForSelection, this); + this._splitWidget.hideSidebar(); + this._splitWidget.show(this.element); /** @type {?TimelineModel.TimelineProfileTree.Node|undefined} */ this._lastSelectedNode; @@ -563,6 +564,8 @@ addGroupingOption.call(this, Common.UIString('Group by URL'), groupBy.URL); addGroupingOption.call(this, Common.UIString('Group by Frame'), groupBy.Frame); panelToolbar.appendToolbarItem(this._groupByCombobox); + panelToolbar.appendSpacer(); + panelToolbar.appendToolbarItem(this._splitWidget.createShowHideSidebarButton(Common.UIString('heaviest stack'))); } /**
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css b/third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css index 64855e5c..9b0dfba68 100644 --- a/third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css +++ b/third_party/WebKit/Source/devtools/front_end/timeline/timelinePanel.css
@@ -39,7 +39,7 @@ #timeline-overview-panel { flex: none; position: relative; - border-bottom: 1px solid rgb(140, 140, 140); + border-bottom: 1px solid #bbb; } #timeline-overview-panel .timeline-graph-bar {
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ListControl.js b/third_party/WebKit/Source/devtools/front_end/ui/ListControl.js index f05dd175..532a4d8 100644 --- a/third_party/WebKit/Source/devtools/front_end/ui/ListControl.js +++ b/third_party/WebKit/Source/devtools/front_end/ui/ListControl.js
@@ -200,10 +200,15 @@ } /** - * @param {!Element} element + * @param {?Node} node * @return {?T} */ - itemForElement(element) { + itemForNode(node) { + while (node && node.parentNodeOrShadowHost() !== this.element) + node = node.parentNodeOrShadowHost(); + if (!node) + return null; + var element = /** @type {!Element} */ (node); var index = this._items.findIndex(item => this._itemToElement.get(item) === element); return index !== -1 ? this._items[index] : null; } @@ -344,14 +349,8 @@ * @param {!Event} event */ _onClick(event) { - var node = event.target; - while (node && node.parentNodeOrShadowHost() !== this.element) - node = node.parentNodeOrShadowHost(); - if (!node) - return; - var element = /** @type {!Element} */ (node); - var item = this.itemForElement(element); - if (item) + var item = this.itemForNode(/** @type {?Node} */ (event.target)); + if (item && this._delegate.isItemSelectable(item)) this.selectItem(item); }
diff --git a/third_party/WebKit/Source/modules/OWNERS b/third_party/WebKit/Source/modules/OWNERS index 2904ddc..710055d 100644 --- a/third_party/WebKit/Source/modules/OWNERS +++ b/third_party/WebKit/Source/modules/OWNERS
@@ -8,3 +8,6 @@ pfeldman@chromium.org per-file modules.gypi=* + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals>Modularization
diff --git a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in index 5b82500..1ceee62 100644 --- a/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in +++ b/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in
@@ -112,7 +112,7 @@ FileAPIBlobClose status=experimental FileSystem status=stable ForeignFetch status=experimental, origin_trial_feature_name=ForeignFetch -FramebustingNeedsSameOriginOrUserGesture status=experimental, settable_from_internals=True +FramebustingNeedsSameOriginOrUserGesture status=stable, settable_from_internals=True FullscreenUnprefixed status=test, settable_from_internals=True FrameTimingSupport status=experimental GamepadExtensions status=test, origin_trial_feature_name=WebVR
diff --git a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp index 0653e51..65a560a1 100644 --- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp +++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -7,6 +7,7 @@ #include "base/metrics/histogram_macros.h" #include "platform/graphics/BitmapImageMetrics.h" #include "third_party/skia/include/core/SkICC.h" +#include "ui/gfx/icc_profile.h" #include "wtf/SpinLock.h" namespace blink { @@ -21,7 +22,7 @@ // static void ColorBehavior::setGlobalTargetColorProfile( - const WebVector<char>& profile) { + const gfx::ICCProfile& profile) { // Take a lock around initializing and accessing the global device color // profile. SpinLock::Guard guard(gTargetColorSpaceLock); @@ -31,10 +32,11 @@ return; // Attempt to convert the ICC profile to an SkColorSpace. - if (!profile.isEmpty()) { + if (!(profile == gfx::ICCProfile())) { + const std::vector<char>& data = profile.GetData(); gTargetColorSpace = - SkColorSpace::MakeICC(profile.data(), profile.size()).release(); - sk_sp<SkICC> skICC = SkICC::Make(profile.data(), profile.size()); + SkColorSpace::MakeICC(data.data(), data.size()).release(); + sk_sp<SkICC> skICC = SkICC::Make(data.data(), data.size()); if (skICC) { SkMatrix44 toXYZD50; bool toXYZD50Result = skICC->toXYZD50(&toXYZD50);
diff --git a/third_party/WebKit/Source/platform/graphics/ColorBehavior.h b/third_party/WebKit/Source/platform/graphics/ColorBehavior.h index b4086ad..993afb6 100644 --- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.h +++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.h
@@ -12,6 +12,10 @@ class SkColorSpace; +namespace gfx { +class ICCProfile; +} + namespace blink { class PLATFORM_EXPORT ColorBehavior { @@ -48,7 +52,7 @@ // Set the target color profile into which all images with embedded color // profiles should be converted. Note that only the first call to this // function in this process has any effect. - static void setGlobalTargetColorProfile(const WebVector<char>&); + static void setGlobalTargetColorProfile(const gfx::ICCProfile&); static void setGlobalTargetColorSpaceForTesting(const sk_sp<SkColorSpace>&); static sk_sp<SkColorSpace> globalTargetColorSpace();
diff --git a/third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp b/third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp index 9ed264d..87c1ea2 100644 --- a/third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp +++ b/third_party/WebKit/Source/platform/graphics/CompositorMutableState.cpp
@@ -58,8 +58,7 @@ m_scrollLayer->layer_tree_impl() ->property_trees() ->scroll_tree.OnScrollOffsetAnimated( - m_scrollLayer->id(), m_scrollLayer->transform_tree_index(), - m_scrollLayer->scroll_tree_index(), offset, + m_scrollLayer->id(), m_scrollLayer->scroll_tree_index(), offset, m_scrollLayer->layer_tree_impl()); m_mutation->setScrollLeft(scrollLeft); } @@ -76,8 +75,7 @@ m_scrollLayer->layer_tree_impl() ->property_trees() ->scroll_tree.OnScrollOffsetAnimated( - m_scrollLayer->id(), m_scrollLayer->transform_tree_index(), - m_scrollLayer->scroll_tree_index(), offset, + m_scrollLayer->id(), m_scrollLayer->scroll_tree_index(), offset, m_scrollLayer->layer_tree_impl()); m_mutation->setScrollTop(scrollTop); }
diff --git a/third_party/WebKit/Source/platform/heap/OWNERS b/third_party/WebKit/Source/platform/heap/OWNERS index 4a47a3ae..4dab994 100644 --- a/third_party/WebKit/Source/platform/heap/OWNERS +++ b/third_party/WebKit/Source/platform/heap/OWNERS
@@ -2,3 +2,6 @@ haraken@chromium.org kouhei@chromium.org sigbjornf@opera.com + +# TEAM: oilpan-reviews@chromium.org +# COMPONENT: Blink>MemoryAllocator>GarbageCollection
diff --git a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp index 466ef4b..f1521f2e 100644 --- a/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp +++ b/third_party/WebKit/Source/platform/testing/ImageDecodeBench.cpp
@@ -256,7 +256,7 @@ if (argc >= 2 && strcmp(argv[1], "--color-correct") == 0) { applyColorCorrection = (--argc, ++argv, true); gfx::ICCProfile profile = gfx::ICCProfileForTestingColorSpin(); - ColorBehavior::setGlobalTargetColorProfile(profile.GetData()); + ColorBehavior::setGlobalTargetColorProfile(profile); } if (argc < 2) {
diff --git a/third_party/WebKit/Source/platform/text/hyphenation/HyphenationMinikin.cpp b/third_party/WebKit/Source/platform/text/hyphenation/HyphenationMinikin.cpp index 18d4e204..ab972fc6 100644 --- a/third_party/WebKit/Source/platform/text/hyphenation/HyphenationMinikin.cpp +++ b/third_party/WebKit/Source/platform/text/hyphenation/HyphenationMinikin.cpp
@@ -6,7 +6,7 @@ #include "base/files/file.h" #include "base/files/memory_mapped_file.h" -#include "base/metrics/histogram.h" +#include "base/metrics/histogram_macros.h" #include "base/timer/elapsed_timer.h" #include "platform/LayoutLocale.h" #include "platform/text/hyphenation/HyphenatorAOSP.h"
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp index 01b2c84..63ed2e9 100644 --- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp +++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.cpp
@@ -998,4 +998,9 @@ return m_webFrame->client()->overrideFlashEmbedWithHTML(WebURL(url)); } +void FrameLoaderClientImpl::setHasReceivedUserGesture() { + if (m_webFrame->client()) + m_webFrame->client()->setHasReceivedUserGesture(); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h index 646ffc0..43fa72f 100644 --- a/third_party/WebKit/Source/web/FrameLoaderClientImpl.h +++ b/third_party/WebKit/Source/web/FrameLoaderClientImpl.h
@@ -219,6 +219,8 @@ KURL overrideFlashEmbedWithHTML(const KURL&) override; + void setHasReceivedUserGesture() override; + private: explicit FrameLoaderClientImpl(WebLocalFrameImpl*);
diff --git a/third_party/WebKit/Source/web/OWNERS b/third_party/WebKit/Source/web/OWNERS index b9f715ee..d584e52 100644 --- a/third_party/WebKit/Source/web/OWNERS +++ b/third_party/WebKit/Source/web/OWNERS
@@ -20,3 +20,6 @@ # Page load metrics per-file WebPerformance.cpp=bmcquade@chromium.org per-file WebPerformance.cpp=csharrison@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals>Modularization
diff --git a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp index c4a072a..ab45a4f 100644 --- a/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp +++ b/third_party/WebKit/Source/web/RemoteFrameClientImpl.cpp
@@ -190,8 +190,4 @@ m_webFrame->client()->visibilityChanged(visible); } -void RemoteFrameClientImpl::setHasReceivedUserGesture() { - m_webFrame->client()->setHasReceivedUserGesture(); -} - } // namespace blink
diff --git a/third_party/WebKit/Source/web/RemoteFrameClientImpl.h b/third_party/WebKit/Source/web/RemoteFrameClientImpl.h index 8fb019a6..5073d2a 100644 --- a/third_party/WebKit/Source/web/RemoteFrameClientImpl.h +++ b/third_party/WebKit/Source/web/RemoteFrameClientImpl.h
@@ -41,7 +41,6 @@ void updateRemoteViewportIntersection(const IntRect&) override; void advanceFocus(WebFocusType, LocalFrame*) override; void visibilityChanged(bool visible) override; - void setHasReceivedUserGesture() override; WebRemoteFrameImpl* webFrame() const { return m_webFrame; }
diff --git a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp index a2afce29..d3f7b2871 100644 --- a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp +++ b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp
@@ -31,6 +31,7 @@ #include "web/WebAssociatedURLLoaderImpl.h" #include "core/dom/ContextLifecycleObserver.h" +#include "core/dom/TaskRunnerHelper.h" #include "core/fetch/CrossOriginAccessControl.h" #include "core/fetch/FetchUtils.h" #include "core/loader/DocumentThreadableLoader.h" @@ -92,7 +93,8 @@ static std::unique_ptr<ClientAdapter> create( WebAssociatedURLLoaderImpl*, WebAssociatedURLLoaderClient*, - const WebAssociatedURLLoaderOptions&); + const WebAssociatedURLLoaderOptions&, + RefPtr<WebTaskRunner>); // ThreadableLoaderClient void didSendData(unsigned long long /*bytesSent*/, @@ -133,7 +135,8 @@ private: ClientAdapter(WebAssociatedURLLoaderImpl*, WebAssociatedURLLoaderClient*, - const WebAssociatedURLLoaderOptions&); + const WebAssociatedURLLoaderOptions&, + RefPtr<WebTaskRunner>); void notifyError(TimerBase*); @@ -142,7 +145,7 @@ WebAssociatedURLLoaderOptions m_options; WebURLError m_error; - Timer<ClientAdapter> m_errorTimer; + TaskRunnerTimer<ClientAdapter> m_errorTimer; bool m_enableErrorNotifications; bool m_didFail; }; @@ -151,18 +154,21 @@ WebAssociatedURLLoaderImpl::ClientAdapter::create( WebAssociatedURLLoaderImpl* loader, WebAssociatedURLLoaderClient* client, - const WebAssociatedURLLoaderOptions& options) { - return WTF::wrapUnique(new ClientAdapter(loader, client, options)); + const WebAssociatedURLLoaderOptions& options, + RefPtr<WebTaskRunner> taskRunner) { + return WTF::wrapUnique( + new ClientAdapter(loader, client, options, taskRunner)); } WebAssociatedURLLoaderImpl::ClientAdapter::ClientAdapter( WebAssociatedURLLoaderImpl* loader, WebAssociatedURLLoaderClient* client, - const WebAssociatedURLLoaderOptions& options) + const WebAssociatedURLLoaderOptions& options, + RefPtr<WebTaskRunner> taskRunner) : m_loader(loader), m_client(client), m_options(options), - m_errorTimer(this, &ClientAdapter::notifyError), + m_errorTimer(std::move(taskRunner), this, &ClientAdapter::notifyError), m_enableErrorNotifications(false), m_didFail(false) { DCHECK(m_loader); @@ -382,8 +388,12 @@ } } + RefPtr<WebTaskRunner> taskRunner = TaskRunnerHelper::get( + TaskType::UnspecedLoading, + m_observer ? toDocument(m_observer->lifecycleContext()) : nullptr); m_client = client; - m_clientAdapter = ClientAdapter::create(this, client, m_options); + m_clientAdapter = + ClientAdapter::create(this, client, m_options, std::move(taskRunner)); if (allowLoad) { ThreadableLoaderOptions options;
diff --git a/third_party/WebKit/Source/web/WebFrame.cpp b/third_party/WebKit/Source/web/WebFrame.cpp index e7625d2..a12cb5d 100644 --- a/third_party/WebKit/Source/web/WebFrame.cpp +++ b/third_party/WebKit/Source/web/WebFrame.cpp
@@ -105,6 +105,9 @@ uniqueName); } + if (oldFrame->hasReceivedUserGesture()) + frame->toImplBase()->frame()->setDocumentHasReceivedUserGesture(); + frame->toImplBase()->frame()->getWindowProxyManager()->setGlobals(globals); m_parent = nullptr;
diff --git a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp index 4f686427..c0e69a2d 100644 --- a/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp +++ b/third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp
@@ -651,8 +651,10 @@ } void WebFrameWidgetImpl::willCloseLayerTreeView() { - if (m_layerTreeView) - page()->willCloseLayerTreeView(*m_layerTreeView); + if (m_layerTreeView) { + page()->willCloseLayerTreeView(*m_layerTreeView, + m_localRoot->frame()->view()); + } setIsAcceleratedCompositingActive(false); m_mutator = nullptr; @@ -996,8 +998,10 @@ devTools->layerTreeViewChanged(m_layerTreeView); page()->settings().setAcceleratedCompositingEnabled(m_layerTreeView); - if (m_layerTreeView) - page()->layerTreeViewInitialized(*m_layerTreeView); + if (m_layerTreeView) { + page()->layerTreeViewInitialized(*m_layerTreeView, + m_localRoot->frame()->view()); + } // FIXME: only unittests, click to play, Android priting, and printing (for // headers and footers) make this assert necessary. We should make them not
diff --git a/third_party/WebKit/Source/web/WebLeakDetector.cpp b/third_party/WebKit/Source/web/WebLeakDetector.cpp index 755a7640..9775d1fc 100644 --- a/third_party/WebKit/Source/web/WebLeakDetector.cpp +++ b/third_party/WebKit/Source/web/WebLeakDetector.cpp
@@ -39,6 +39,8 @@ #include "modules/compositorworker/AbstractAnimationWorkletThread.h" #include "platform/InstanceCounters.h" #include "platform/Timer.h" +#include "public/platform/Platform.h" +#include "public/platform/WebThread.h" #include "public/web/WebFrame.h" #include "web/WebLocalFrameImpl.h" @@ -52,9 +54,14 @@ public: explicit WebLeakDetectorImpl(WebLeakDetectorClient* client) : m_client(client), - m_delayedGCAndReportTimer(this, - &WebLeakDetectorImpl::delayedGCAndReport), - m_delayedReportTimer(this, &WebLeakDetectorImpl::delayedReport), + m_delayedGCAndReportTimer( + Platform::current()->currentThread()->getWebTaskRunner(), + this, + &WebLeakDetectorImpl::delayedGCAndReport), + m_delayedReportTimer( + Platform::current()->currentThread()->getWebTaskRunner(), + this, + &WebLeakDetectorImpl::delayedReport), m_numberOfGCNeeded(0) { DCHECK(m_client); } @@ -69,8 +76,8 @@ void delayedReport(TimerBase*); WebLeakDetectorClient* m_client; - Timer<WebLeakDetectorImpl> m_delayedGCAndReportTimer; - Timer<WebLeakDetectorImpl> m_delayedReportTimer; + TaskRunnerTimer<WebLeakDetectorImpl> m_delayedGCAndReportTimer; + TaskRunnerTimer<WebLeakDetectorImpl> m_delayedReportTimer; int m_numberOfGCNeeded; };
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp index 0ab358f..16f6adb4 100644 --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -2042,7 +2042,7 @@ void WebLocalFrameImpl::setHasReceivedUserGesture() { if (frame()) - frame()->document()->setHasReceivedUserGesture(); + frame()->setDocumentHasReceivedUserGesture(); } void WebLocalFrameImpl::sendOrientationChangeEvent() {
diff --git a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp index 7e1d2c3d..ef30de3 100644 --- a/third_party/WebKit/Source/web/WebPagePopupImpl.cpp +++ b/third_party/WebKit/Source/web/WebPagePopupImpl.cpp
@@ -395,7 +395,12 @@ m_isAcceleratedCompositingActive = true; m_animationHost = WTF::makeUnique<CompositorAnimationHost>( m_layerTreeView->compositorAnimationHost()); - m_page->layerTreeViewInitialized(*m_layerTreeView); + m_page->layerTreeViewInitialized(*m_layerTreeView, + m_popupClient->ownerElement() + .document() + .frame() + ->localFrameRoot() + ->view()); } else { m_isAcceleratedCompositingActive = false; m_animationHost = nullptr; @@ -412,8 +417,14 @@ } void WebPagePopupImpl::willCloseLayerTreeView() { - if (m_page && m_layerTreeView) - m_page->willCloseLayerTreeView(*m_layerTreeView); + if (m_page && m_layerTreeView) { + m_page->willCloseLayerTreeView(*m_layerTreeView, + m_popupClient->ownerElement() + .document() + .frame() + ->localFrameRoot() + ->view()); + } setIsAcceleratedCompositingActive(false); m_layerTreeView = nullptr;
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp index ba6c90b..4d5220c 100644 --- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -520,6 +520,10 @@ Fullscreen::RequestType::PrefixedForCrossProcessDescendant); } +void WebRemoteFrameImpl::setHasReceivedUserGesture() { + frame()->setDocumentHasReceivedUserGesture(); +} + WebRemoteFrameImpl::WebRemoteFrameImpl(WebTreeScopeType scope, WebRemoteFrameClient* client) : WebRemoteFrame(scope),
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h index 8b2c590..64a5077 100644 --- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h +++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
@@ -163,6 +163,8 @@ void willEnterFullscreen() override; + void setHasReceivedUserGesture() override; + DECLARE_TRACE(); private:
diff --git a/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp b/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp index 9e206ee..0ad2930f 100644 --- a/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp +++ b/third_party/WebKit/Source/web/WebUserGestureIndicator.cpp
@@ -53,8 +53,7 @@ bool WebUserGestureIndicator::processedUserGestureSinceLoad( WebLocalFrame* frame) { - Document* document = toWebLocalFrameImpl(frame)->frame()->document(); - return document->hasReceivedUserGesture(); + return toWebLocalFrameImpl(frame)->frame()->hasReceivedUserGesture(); } WebUserGestureToken WebUserGestureIndicator::currentUserGestureToken() {
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp index 00c8ca2..20a7668e 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.cpp +++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -442,7 +442,7 @@ WebViewImpl::UserGestureNotifier::~UserGestureNotifier() { if (!*m_userGestureObserved && m_frame && - m_frame->frame()->document()->hasReceivedUserGesture()) { + m_frame->frame()->hasReceivedUserGesture()) { *m_userGestureObserved = true; if (m_frame && m_frame->autofillClient()) m_frame->autofillClient()->firstUserGestureObserved(); @@ -2515,7 +2515,7 @@ } if (m_layerTreeView) - page()->willCloseLayerTreeView(*m_layerTreeView); + page()->willCloseLayerTreeView(*m_layerTreeView, nullptr); setRootLayer(nullptr); m_animationHost = nullptr; @@ -3022,7 +3022,7 @@ setZoomLevel(m_zoomLevel); } -void WebViewImpl::setDeviceColorProfile(const WebVector<char>& colorProfile) { +void WebViewImpl::setDeviceColorProfile(const gfx::ICCProfile& colorProfile) { ColorBehavior::setGlobalTargetColorProfile(colorProfile); } @@ -3956,7 +3956,7 @@ m_page->settings().setAcceleratedCompositingEnabled(m_layerTreeView); if (m_layerTreeView) - m_page->layerTreeViewInitialized(*m_layerTreeView); + m_page->layerTreeViewInitialized(*m_layerTreeView, nullptr); // FIXME: only unittests, click to play, Android printing, and printing (for // headers and footers) make this assert necessary. We should make them not
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h index e4ad02f..a8bb92c 100644 --- a/third_party/WebKit/Source/web/WebViewImpl.h +++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -224,7 +224,7 @@ void setDeviceScaleFactor(float) override; void setZoomFactorForDeviceScaleFactor(float) override; - void setDeviceColorProfile(const WebVector<char>&) override; + void setDeviceColorProfile(const gfx::ICCProfile&) override; void enableAutoResizeMode(const WebSize& minSize, const WebSize& maxSize) override;
diff --git a/third_party/WebKit/Source/wtf/OWNERS b/third_party/WebKit/Source/wtf/OWNERS index 042c059d..45bef0a 100644 --- a/third_party/WebKit/Source/wtf/OWNERS +++ b/third_party/WebKit/Source/wtf/OWNERS
@@ -7,3 +7,6 @@ thakis@chromium.org tkent@chromium.org yutak@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals>WTF
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py index 13c8edf..0fdc2c8 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
@@ -152,6 +152,9 @@ def kill_process(self, pid): pass + def interrupt(self, pid): + pass + def popen(self, args, cwd=None, env=None, **_): assert all(isinstance(arg, basestring) for arg in args) self.calls.append(args)
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py index 5642450..c0efd2a0 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/servers/wptserve.py
@@ -6,9 +6,13 @@ import datetime import logging + from webkitpy.layout_tests.servers import server_base +_log = logging.getLogger(__name__) + + class WPTServe(server_base.ServerBase): def __init__(self, port_obj, output_dir): @@ -57,3 +61,34 @@ 'Pre-generated keys and certificates are going to be expired at %s.' ' Please re-generate them by following steps in %s/README.chromium.' % (expiration_date.strftime('%b %d %Y'), path_to_wpt_support)) + + def _stop_running_server(self): + self._wait_for_action(self._check_and_kill_wptserve) + if self._filesystem.exists(self._pid_file): + self._filesystem.remove(self._pid_file) + + def _check_and_kill_wptserve(self): + """Tries to kill wptserve. + + Returns True if it appears to be not running. Or, if it appears to be + running, tries to kill the process and returns False. + """ + if not (self._pid and self._executive.check_running_pid(self._pid)): + _log.debug('pid %d is not running', self._pid) + return True + + _log.debug('pid %d is running, killing it', self._pid) + + # Executive.kill_process appears to not to effectively kill the + # wptserve processes on Linux (and presumably other platforms). + if self._platform.is_win(): + self._executive.kill_process(self._pid) + else: + self._executive.interrupt(self._pid) + + # According to Popen.wait(), this can deadlock when using stdout=PIPE or + # stderr=PIPE. We're using DEVNULL for both so that should not occur. + if self._process is not None: + self._process.wait() + + return False
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py index e1745e3..0f39593b 100644 --- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py +++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py
@@ -197,6 +197,7 @@ if revision is not None: _log.info('Checking out %s', revision) self.run(['git', 'checkout', revision], cwd=temp_repo_path) + self.run(['git', 'submodule', 'update', '--init', '--recursive'], cwd=temp_repo_path) _log.info('Noting the revision we are importing.') @@ -257,7 +258,7 @@ _log.debug('Running command: %s', ' '.join(cmd)) cwd = cwd or self.finder.webkit_base() - proc = self.executive.popen(cmd, stdout=self.executive.PIPE, stderr=self.executive.PIPE, stdin=self.executive.PIPE) + proc = self.executive.popen(cmd, stdout=self.executive.PIPE, stderr=self.executive.PIPE, stdin=self.executive.PIPE, cwd=cwd) out, err = proc.communicate(stdin) if proc.returncode or self.verbose: _log.info('# ret> %d', proc.returncode)
diff --git a/third_party/WebKit/public/OWNERS b/third_party/WebKit/public/OWNERS index 3699304..9d79eb736 100644 --- a/third_party/WebKit/public/OWNERS +++ b/third_party/WebKit/public/OWNERS
@@ -19,5 +19,5 @@ # structural changes, please get a review from a reviewer in this file. per-file blink_headers.gypi=* -# TEAM: blink-dev@chromium.org -# COMPONENT: Blink +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals>Modularization
diff --git a/third_party/WebKit/public/web/WebFrameClient.h b/third_party/WebKit/public/web/WebFrameClient.h index 561057b..5349ba3 100644 --- a/third_party/WebKit/public/web/WebFrameClient.h +++ b/third_party/WebKit/public/web/WebFrameClient.h
@@ -252,6 +252,9 @@ const WebVector<WebString>& newlyMatchingSelectors, const WebVector<WebString>& stoppedMatchingSelectors) {} + // Called the first time this frame is the target of a user gesture. + virtual void setHasReceivedUserGesture() {} + // Console messages ---------------------------------------------------- // Whether or not we should report a detailed message for the given source.
diff --git a/third_party/WebKit/public/web/WebRemoteFrame.h b/third_party/WebKit/public/web/WebRemoteFrame.h index 28f973f..385f2bd 100644 --- a/third_party/WebKit/public/web/WebRemoteFrame.h +++ b/third_party/WebKit/public/web/WebRemoteFrame.h
@@ -95,6 +95,8 @@ // owner. virtual void willEnterFullscreen() = 0; + virtual void setHasReceivedUserGesture() = 0; + // Temporary method to allow embedders to get the script context of a // remote frame. This should only be used by legacy code that has not yet // migrated over to the new OOPI infrastructure.
diff --git a/third_party/WebKit/public/web/WebRemoteFrameClient.h b/third_party/WebKit/public/web/WebRemoteFrameClient.h index dc0394e5..4cf7118d 100644 --- a/third_party/WebKit/public/web/WebRemoteFrameClient.h +++ b/third_party/WebKit/public/web/WebRemoteFrameClient.h
@@ -47,8 +47,6 @@ virtual void visibilityChanged(bool visible) {} - virtual void setHasReceivedUserGesture() {} - // This frame updated its opener to another frame. virtual void didChangeOpener(WebFrame* opener) {}
diff --git a/third_party/WebKit/public/web/WebView.h b/third_party/WebKit/public/web/WebView.h index 061f017..a08cf28 100644 --- a/third_party/WebKit/public/web/WebView.h +++ b/third_party/WebKit/public/web/WebView.h
@@ -40,6 +40,10 @@ #include "../platform/WebVector.h" #include "WebWidget.h" +namespace gfx { +class ICCProfile; +} + namespace blink { class WebAXObject; @@ -317,7 +321,7 @@ virtual void setZoomFactorForDeviceScaleFactor(float) = 0; // Set and reset the device color profile. - virtual void setDeviceColorProfile(const WebVector<char>&) = 0; + virtual void setDeviceColorProfile(const gfx::ICCProfile&) = 0; // Resize the view at the same time as changing the state of the top // controls. If |browserControlsShrinkLayout| is true, the embedder shrunk the
diff --git a/third_party/closure_compiler/externs/system_display.js b/third_party/closure_compiler/externs/system_display.js index a6357385..a37c094 100644 --- a/third_party/closure_compiler/externs/system_display.js +++ b/third_party/closure_compiler/externs/system_display.js
@@ -238,35 +238,45 @@ chrome.system.display.overscanCalibrationComplete = function(id) {}; /** - * Starts touch calibration for a display. This will show an overlay on the - * screen and initialize the UX for touch calibration. If touch calibration for - * display |id| is in progress this will reset calibration. + * Starts native touch calibration for a display. This will show an overlay on + * the screen and initialize the UX for touch calibration. If another native + * touch calibration is already in progress this will throw an error. * @param {string} id The display's unique identifier. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationStart + * @see https://developer.chrome.com/extensions/system.display#method-showNativeTouchCalibration */ -chrome.system.display.touchCalibrationStart = function(id) {}; +chrome.system.display.showNativeTouchCalibration = function(id) {}; + +/** + * Starts custom touch calibration for a display. This should be called when + * using a custom UX for collecting calibration data. If another touch + * calibration is already in progress this will throw an error. + * @param {string} id The display's unique identifier. + * @see https://developer.chrome.com/extensions/system.display#method-startCustomTouchCalibration + */ +chrome.system.display.startCustomTouchCalibration = function(id) {}; /** * Sets the touch calibration pairs for a display. These |pairs| would be used - * to calibrate the touch screen for display |id|. If touch calibration for - * display |id| is in progress this will do nothing. - * @param {string} id The display's unique identifier. + * to calibrate the touch screen for display with |id| called in + * startCustomTouchCalibration(). Always call |startCustomTouchCalibration| + * before calling this method. If another touch calibration is already in + * progress this will throw an error. * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of * point used to calibrate the display. * @param {!chrome.system.display.Bounds} bounds Bounds of the display when the * touch calibration was performed. |bounds.left| and |bounds.top| - * values are no-op. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationSet + * values are ignored. + * @see https://developer.chrome.com/extensions/system.display#method-completeCustomTouchCalibration */ -chrome.system.display.touchCalibrationSet = function(id, pairs, bounds) {}; +chrome.system.display.completeCustomTouchCalibration = function(pairs, bounds) {}; /** * Resets the touch calibration for the display and removes the saved * calibration data. * @param {string} id The display's unique identifier. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationReset + * @see https://developer.chrome.com/extensions/system.display#method-clearTouchCalibration */ -chrome.system.display.touchCalibrationReset = function(id) {}; +chrome.system.display.clearTouchCalibration = function(id) {}; /** * Fired when anything changes to the display configuration.
diff --git a/third_party/closure_compiler/interfaces/system_display_interface.js b/third_party/closure_compiler/interfaces/system_display_interface.js index 683e7d8..845422642 100644 --- a/third_party/closure_compiler/interfaces/system_display_interface.js +++ b/third_party/closure_compiler/interfaces/system_display_interface.js
@@ -96,35 +96,45 @@ overscanCalibrationComplete: assertNotReached, /** - * Starts touch calibration for a display. This will show an overlay on the - * screen and initialize the UX for touch calibration. If touch calibration - * for display |id| is in progress this will reset calibration. + * Starts native touch calibration for a display. This will show an overlay on + * the screen and initialize the UX for touch calibration. If another native + * touch calibration is already in progress this will throw an error. * @param {string} id The display's unique identifier. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationStart + * @see https://developer.chrome.com/extensions/system.display#method-showNativeTouchCalibration */ - touchCalibrationStart: assertNotReached, + showNativeTouchCalibration: assertNotReached, + + /** + * Starts custom touch calibration for a display. This should be called when + * using a custom UX for collecting calibration data. If another touch + * calibration is already in progress this will throw an error. + * @param {string} id The display's unique identifier. + * @see https://developer.chrome.com/extensions/system.display#method-startCustomTouchCalibration + */ + startCustomTouchCalibration: assertNotReached, /** * Sets the touch calibration pairs for a display. These |pairs| would be used - * to calibrate the touch screen for display |id|. If touch calibration for - * display |id| is in progress this will do nothing. - * @param {string} id The display's unique identifier. + * to calibrate the touch screen for display with |id| called in + * startCustomTouchCalibration(). Always call |startCustomTouchCalibration| + * before calling this method. If another touch calibration is already in + * progress this will throw an error. * @param {!chrome.system.display.TouchCalibrationPairQuad} pairs The pairs of * point used to calibrate the display. * @param {!chrome.system.display.Bounds} bounds Bounds of the display when - * the touch calibration was performed. |bounds.left| and |bounds.top| - * values are no-op. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationSet + * the touch calibration was performed. |bounds.left| and |bounds.top| + * values are ignored. + * @see https://developer.chrome.com/extensions/system.display#method-completeCustomTouchCalibration */ - touchCalibrationSet: assertNotReached, + completeCustomTouchCalibration: assertNotReached, /** * Resets the touch calibration for the display and removes the saved * calibration data. * @param {string} id The display's unique identifier. - * @see https://developer.chrome.com/extensions/system.display#method-touchCalibrationReset + * @see https://developer.chrome.com/extensions/system.display#method-clearTouchCalibration */ - touchCalibrationReset: assertNotReached, + clearTouchCalibration: assertNotReached, }; /**
diff --git a/third_party/jinja2/OWNERS b/third_party/jinja2/OWNERS index 8edbdf8..ee2bec9 100644 --- a/third_party/jinja2/OWNERS +++ b/third_party/jinja2/OWNERS
@@ -1,3 +1,6 @@ timloh@chromium.org haraken@chromium.org nbarth@chromium.org + +# TEAM: platform-architecture-dev@chromium.org +# COMPONENT: Blink>Internals
diff --git a/third_party/markupsafe/OWNERS b/third_party/markupsafe/OWNERS index 8edbdf8..6a57e5d 100644 --- a/third_party/markupsafe/OWNERS +++ b/third_party/markupsafe/OWNERS
@@ -1,3 +1,5 @@ timloh@chromium.org haraken@chromium.org nbarth@chromium.org + +# COMPONENT: Internals
diff --git a/tools/checkteamtags/extract_components.py b/tools/checkteamtags/extract_components.py new file mode 100755 index 0000000..a96fa039 --- /dev/null +++ b/tools/checkteamtags/extract_components.py
@@ -0,0 +1,100 @@ +#!/usr/bin/env python +# Copyright (c) 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Parses OWNERS recursively and generates a machine readable component mapping. + +OWNERS files are expected to contain a well-formatted pair of tags as shown +below. A presubmit check exists that validates this. + +This script finds lines in the OWNERS files such as: + `# TEAM: team@chromium.org` and + `# COMPONENT: Tools>Test>Findit` +and dumps this information into a json file. + +Refer to crbug.com/667952 +""" + +import json +import optparse +import os +import sys + +from owners_file_tags import aggregate_components_from_owners + + +_DEFAULT_SRC_LOCATION = os.path.join( + os.path.dirname(__file__), os.pardir, os.pardir) + +_README = """ +This file is generated by src/tools/checkteamtags/extract_components.py +by parsing the contents of OWNERS files throughout the chromium source code and +extracting `# TEAM:` and `# COMPONENT:` tags. + +Manual edits of this file will be overwritten by an automated process. +""".splitlines() + + +def write_results(filename, data): + """Write data to the named file, or the default location.""" + if not filename: + filename = 'component_map.json' + with open(filename, 'w') as f: + f.write(data) + + +def main(argv): + usage = """Usage: python %prog [options] [<root_dir>] + root_dir specifies the topmost directory to traverse looking for OWNERS + files, defaults to two levels up from this file's directory. + i.e. where src/ is expected to be. + +Examples: + python %prog + python %prog /b/build/src + python %prog -v /b/build/src + python %prog -w /b/build/src + python %prog -o ~/components.json /b/build/src + """ + parser = optparse.OptionParser(usage=usage) + parser.add_option('-w', '--write', action='store_true', + help='If no errors occur, write the mappings to disk.') + parser.add_option('-v', '--verbose', action='store_true', + help='Print warnings.') + parser.add_option('-f', '--force_print', action='store_true', + help='Print the mappings despite errors.') + parser.add_option('-o', '--output_file', help='Specify file to write the ' + 'mappings to instead of the default: <CWD>/' + 'component_map.json (implies -w)') + options, args = parser.parse_args(argv[1:]) + if args: + root = args[0] + else: + root = _DEFAULT_SRC_LOCATION + + mappings, warnings, errors = aggregate_components_from_owners(root) + if options.verbose: + for w in warnings: + print w + + for e in errors: + print e + + mappings['AAA-README']= _README + mapping_file_contents = json.dumps(mappings, sort_keys=True, indent=2) + if options.write or options.output_file: + if errors: + print 'Not writing to file due to errors' + if options.force_print: + print mapping_file_contents + else: + write_results(options.output_file, mapping_file_contents) + else: + print mapping_file_contents + + return len(errors) + + +if __name__ == '__main__': + sys.exit(main(sys.argv))
diff --git a/tools/checkteamtags/extract_components_test.py b/tools/checkteamtags/extract_components_test.py new file mode 100644 index 0000000..b9111659 --- /dev/null +++ b/tools/checkteamtags/extract_components_test.py
@@ -0,0 +1,126 @@ +# 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 json +import os +import sys +import unittest + +from StringIO import StringIO + +import extract_components + +SRC = os.path.join(os.path.dirname(__file__), os.path.pardir, os.path.pardir) +sys.path.append(os.path.join(SRC, 'third_party', 'pymock')) + +import mock + +def mock_file_tree(tree): + os_walk_mocks = [] + file_mocks = {} + for path in tree: + os_walk_mocks.append((path, ('ignored'), ('OWNERS', 'dummy.cc'))) + file_mocks[os.path.join(path, 'OWNERS')] = tree[path] + + def custom_mock_open(files_data): + def inner_open(path, mode='r'): + ret_val = mock.MagicMock() + if path in files_data and mode == 'r': + + class mock_opened_file(object): + def __enter__(self, *args, **kwargs): + return self + + def __iter__(self, *args, **kwargs): + return iter(files_data[path].splitlines()) + + def __exit__(self, *args, **kwargs): + pass + + ret_val = mock_opened_file() + return ret_val + return inner_open + + def wrapper(func): + @mock.patch('owners_file_tags.open', custom_mock_open(file_mocks), + create=True) + @mock.patch('os.walk', mock.MagicMock(return_value=os_walk_mocks)) + def inner(*args, **kwargs): + return func(*args, **kwargs) + return inner + return wrapper + + + +class ExtractComponentsTest(unittest.TestCase): + + @mock_file_tree({ + 'src': 'boss@chromium.org\n', + 'src/dummydir1': 'dummy@chromium.org\n' + '# TEAM: dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir2': 'dummy2@chromium.org\n' + '# TEAM: other-dummy-team@chromium.org\n' + '# COMPONENT: Components>Component2', + 'src/dummydir1/innerdir1': 'dummy@chromium.org\n' + '# TEAM: dummy-specialist-team@chromium.org\n' + '# COMPONENT: Dummy>Component>Subcomponent'}) + def testBaseCase(self): + saved_output = StringIO() + with mock.patch('sys.stdout', saved_output): + error_code = extract_components.main(['%prog']) + self.assertEqual(0, error_code) + result_minus_readme = json.loads(saved_output.getvalue()) + del result_minus_readme['AAA-README'] + self.assertEqual(result_minus_readme, { + 'component-to-team': { + 'Components>Component2': 'other-dummy-team@chromium.org', + 'Dummy>Component': 'dummy-team@chromium.org', + 'Dummy>Component>Subcomponent': 'dummy-specialist-team@chromium.org' + }, + 'dir-to-component': { + 'tools/checkteamtags/src/dummydir1': 'Dummy>Component', + 'tools/checkteamtags/src/dummydir1/innerdir1': + 'Dummy>Component>Subcomponent', + 'tools/checkteamtags/src/dummydir2': 'Components>Component2' + }}) + + @mock_file_tree({ + 'src': 'boss@chromium.org\n', + 'src/dummydir1': 'dummy@chromium.org\n' + '# TEAM: dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir2': 'dummy2@chromium.org\n' + '# TEAM: other-dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir1/innerdir1': 'dummy@chromium.org\n' + '# TEAM: dummy-specialist-team@chromium.org\n' + '# COMPONENT: Dummy>Component>Subcomponent'}) + def testMultipleTeamsOneComponent(self): + saved_output = StringIO() + with mock.patch('sys.stdout', saved_output): + error_code = extract_components.main(['%prog', '-w']) + self.assertNotEqual(0, error_code) + output = saved_output.getvalue() + self.assertIn('has more than one team assigned to it', output) + self.assertIn('Not writing to file', output) + + @mock_file_tree({ + 'src': 'boss@chromium.org\n', + 'src/dummydir1': 'dummy@chromium.org\n' + '# TEAM: dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir2': 'dummy2@chromium.org\n' + '# TEAM: other-dummy-team@chromium.org\n' + '# COMPONENT: Dummy>Component', + 'src/dummydir1/innerdir1': 'dummy@chromium.org\n' + '# TEAM: dummy-specialist-team@chromium.org\n' + '# COMPONENT: Dummy>Component>Subcomponent'}) + def testVerbose(self): + saved_output = StringIO() + with mock.patch('sys.stdout', saved_output): + extract_components.main(['%prog', '-v']) + output = saved_output.getvalue() + self.assertIn('src/OWNERS has no COMPONENT tag', output) +
diff --git a/tools/checkteamtags/owners_file_tags.py b/tools/checkteamtags/owners_file_tags.py new file mode 100644 index 0000000..fc8d1f5 --- /dev/null +++ b/tools/checkteamtags/owners_file_tags.py
@@ -0,0 +1,85 @@ +# 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. + +import os +import re + +from collections import defaultdict + + +def parse(filename): + """Searches the file for lines that start with `# TEAM:` or `# COMPONENT:`. + + Args: + filename (str): path to the file to parse. + Returns: + (team (str), component(str)): The team and component found in the file, the + last one of each if multiple, None if missing. + """ + team = None + component = None + team_regex = re.compile('\s*#\s*TEAM\s*:\s*(\S+)') + component_regex = re.compile('\s*#\s*COMPONENT\s*:\s*(\S+)') + with open(filename) as f: + for line in f: + team_matches = team_regex.match(line) + if team_matches: + team = team_matches.group(1) + component_matches = component_regex.match(line) + if component_matches: + component = component_matches.group(1) + return team, component + + +def aggregate_components_from_owners(root): + """Traverses the given dir and parse OWNERS files for team and component tags. + + Args: + root (str): the path to the src directory. + + Returns: + A pair (data, warnings) where data is a dict of the form + {'component-to-team': {'Component1': 'team1@chr...', ...}, + 'dir-to-component': {'/path/to/1': 'Component1', ...}} + and warnings is a list of strings. + """ + warnings = [] + component_to_team = defaultdict(set) + dir_to_component = {} + for dirname, _, files in os.walk(root): + # Proofing against windows casing oddities. + owners_file_names = [f for f in files if f.upper() == 'OWNERS'] + if owners_file_names: + owners_full_path = os.path.join(dirname, owners_file_names[0]) + owners_rel_path = os.path.relpath(owners_full_path, root) + team, component = parse(owners_full_path) + if component: + dir_to_component[os.path.relpath(dirname, root)] = component + if team: + component_to_team[component].add(team) + else: + warnings.append('%s has no COMPONENT tag' % owners_rel_path) + mappings = {'component-to-team': component_to_team, + 'dir-to-component': dir_to_component} + errors = validate_one_team_per_component(mappings) + return unwrap(mappings), warnings, errors + + +def validate_one_team_per_component(m): + """Validates that each component is associated with at most 1 team.""" + errors = [] + # TODO(robertocn): Validate the component names: crbug.com/679540 + component_to_team = m['component-to-team'] + for c in component_to_team: + if len(component_to_team[c]) > 1: + errors.append('Component %s has more than one team assigned to it: %s' % ( + c, ', '.join(list(component_to_team[c])))) + return errors + + +def unwrap(mappings): + """Remove the set() wrapper around values in component-to-team mapping.""" + for c in mappings['component-to-team']: + mappings['component-to-team'][c] = mappings['component-to-team'][c].pop() + return mappings
diff --git a/tools/clang/blink_gc_plugin/OWNERS b/tools/clang/blink_gc_plugin/OWNERS index 789d7ef..c39a6b06 100644 --- a/tools/clang/blink_gc_plugin/OWNERS +++ b/tools/clang/blink_gc_plugin/OWNERS
@@ -2,3 +2,6 @@ kouhei@chromium.org tkent@chromium.org sigbjornf@opera.com + +# TEAM: oilpan-reviews@chromium.org +# COMPONENT: Blink>MemoryAllocator>GarbageCollection
diff --git a/tools/idl_parser/OWNERS b/tools/idl_parser/OWNERS index c5e87c09..afc0d893 100644 --- a/tools/idl_parser/OWNERS +++ b/tools/idl_parser/OWNERS
@@ -1,3 +1,6 @@ bashi@chromium.org haraken@chromium.org yukishiino@chromium.org + +# TEAM: blink-bindings-reviews@chromium.org +# COMPONENT: Blink>Bindings
diff --git a/tools/luci-go/linux64/isolate.sha1 b/tools/luci-go/linux64/isolate.sha1 index d0b8f6c..b8593a7 100644 --- a/tools/luci-go/linux64/isolate.sha1 +++ b/tools/luci-go/linux64/isolate.sha1
@@ -1 +1 @@ -0bc14f6977e9c033abe1c2fe612128accdac4b1b +3c0fbcab83730c86bbd5a09e760388dcb7053bc4
diff --git a/tools/luci-go/mac64/isolate.sha1 b/tools/luci-go/mac64/isolate.sha1 index 885db74..bf7e1c1dd 100644 --- a/tools/luci-go/mac64/isolate.sha1 +++ b/tools/luci-go/mac64/isolate.sha1
@@ -1 +1 @@ -a1b6aa3e545ee371ff1e488ac4a83fb5dce3c349 +d37a2f34eff58e1fb04038bd52381001479d4aa1
diff --git a/tools/luci-go/win64/isolate.exe.sha1 b/tools/luci-go/win64/isolate.exe.sha1 index 8ff73f6..c575f970 100644 --- a/tools/luci-go/win64/isolate.exe.sha1 +++ b/tools/luci-go/win64/isolate.exe.sha1
@@ -1 +1 @@ -4e4bcb96b7bd4828e625d523e9b9984e1fc499d5 +d4b894493b1ee5c04ec5bc88e6ea286426540770
diff --git a/tools/metrics/histograms/OWNERS b/tools/metrics/histograms/OWNERS index 49cb40f..8dcc2789 100644 --- a/tools/metrics/histograms/OWNERS +++ b/tools/metrics/histograms/OWNERS
@@ -9,3 +9,5 @@ # APAC-based reviewers for UseCounter histogram changes only. per-file histograms.xml=ericwilligers@chromium.org per-file histograms.xml=haraken@chromium.org + +# COMPONENT: Internals>Metrics
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 46a024a..7c1c2b2 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -30398,6 +30398,14 @@ </summary> </histogram> +<histogram name="Net.Certificate.IgnoreErrors" enum="BooleanEnabled"> + <owner>martinkr@google.com</owner> + <summary> + Whether certificate validation was disabled because the + --ignore-certificate-errors switch was set on startup. + </summary> +</histogram> + <histogram name="Net.Certificate.SHA1.MainFrame" enum="SHA1Status"> <owner>rsleevi@chromium.org</owner> <summary> @@ -35921,6 +35929,15 @@ </summary> </histogram> +<histogram name="Net.SSLSessionConcurrentLookupCount"> + <owner>nharper@chromium.org</owner> + <summary> + For each SSL connection where we resume a session and negotiate HTTP/2, the + simulated minimum number of sessions retained per host it would have + required with TLS 1.3 single-use sessions. See https://crbug.com/631988. + </summary> +</histogram> + <histogram name="Net.SSLSessionVersionMatch" enum="BooleanMatched"> <obsolete> Removed on 2015-11-10. @@ -82220,7 +82237,18 @@ <enum name="CrashpadMacExceptionCodes" type="int"> <int value="1" label="EXC_BAD_ACCESS"/> <int value="2" label="EXC_BAD_INSTRUCTION"/> + <int value="3" label="EXC_ARITHMETIC"/> + <int value="4" label="EXC_EMULATION"/> + <int value="5" label="EXC_SOFTWARE"/> + <int value="6" label="EXC_BREAKPOINT"/> + <int value="7" label="EXC_SYSCALL"/> + <int value="8" label="EXC_MACH_SYSCALL"/> + <int value="9" label="EXC_RPC_ALERT"/> <int value="10" label="EXC_CRASH"/> + <int value="11" label="EXC_RESOURCE"/> + <int value="12" label="EXC_GUARD"/> + <int value="13" label="EXC_CORPSE_NOTIFY"/> + <int value="1129345912" label="kMachExceptionSimulated"/> </enum> <enum name="CrashpadReportPending" type="int"> @@ -85240,6 +85268,7 @@ <int value="358" label="Enable the creation of roaming copies for Chrome profiles."/> <int value="359" label="Set the roaming profile directory."/> + <int value="360" label="Configure the New Tab page URL."/> </enum> <enum name="EnterprisePolicyInvalidations" type="int"> @@ -87223,9 +87252,9 @@ <int value="1146" label="LANGUAGESETTINGSPRIVATE_DISABLELANGUAGE"/> <int value="1147" label="FILEMANAGERPRIVATEINTERNAL_GETDIRECTORYSIZE"/> <int value="1148" label="BLUETOOTHLOWENERGY_SETADVERTISINGINTERVAL"/> - <int value="1149" label="SYSTEM_DISPLAY_TOUCHCALIBRATIONSTART"/> - <int value="1150" label="SYSTEM_DISPLAY_TOUCHCALIBRATIONSET"/> - <int value="1151" label="SYSTEM_DISPLAY_TOUCHCALIBRATIONRESET"/> + <int value="1149" label="SYSTEM_DISPLAY_SHOWNATIVETOUCHCALIBRATION"/> + <int value="1150" label="SYSTEM_DISPLAY_COMPLETECUSTOMTOUCHCALIBRATION"/> + <int value="1151" label="SYSTEM_DISPLAY_CLEARTOUCHCALIBRATION"/> <int value="1152" label="CERTIFICATEPROVIDER_REQUESTPIN"/> <int value="1153" label="CERTIFICATEPROVIDER_STOPPINREQUEST"/> <int value="1154" label="QUICKUNLOCKPRIVATE_CHECKCREDENTIAL"/> @@ -87233,6 +87262,7 @@ <int value="1156" label="CLIPBOARD_SETIMAGEDATA"/> <int value="1157" label="NETWORKINGPRIVATE_GETGLOBALPOLICY"/> <int value="1158" label="DIAL_FETCHDEVICEDESCRIPTION"/> + <int value="1159" label="SYSTEM_DISPLAY_STARTCUSTOMTOUCHCALIBRATION"/> </enum> <enum name="ExtensionIconState" type="int">
diff --git a/tools/perf/docs/apk_size_regressions.md b/tools/perf/docs/apk_size_regressions.md index 3ce3a94f..d7d258f 100644 --- a/tools/perf/docs/apk_size_regressions.md +++ b/tools/perf/docs/apk_size_regressions.md
@@ -67,10 +67,9 @@ ``` ### Option 2: Download artifacts from perf jobs (Googlers only)** - 1. Find the archive hash by looking at the `zip_build_product`. Replace the bolded part of the following URL with your build number: - * https://luci-logdog.appspot.com/v/?s=chrome%2Fbb%2Fchromium.perf%2FAndroid_Builder%2F**134505**%2F%2B%2Frecipes%2Fsteps%2Fgsutil_upload_build_product%2F0%2Fstdout - 2. Download using the following: - * https://storage.cloud.google.com/chrome-perf/Android%20Builder/full-build-linux_**ARCHIVE_HASH**.zip + 1. Replace the bolded part of the following URL with your build number: + [https://luci-milo.appspot.com/buildbot/chromium.perf/Android%20Builder/**131325**](https://luci-milo.appspot.com/buildbot/chromium.perf/Android%20Builder/131325) + 2. Click the **gsutil.upload** link in the **gsutil upload_build_product** step ## Step 3: Analyze
diff --git a/ui/gfx/icc_profile.cc b/ui/gfx/icc_profile.cc index 6a1bead8..c5e84d1 100644 --- a/ui/gfx/icc_profile.cc +++ b/ui/gfx/icc_profile.cc
@@ -56,6 +56,10 @@ return false; } +bool ICCProfile::operator!=(const ICCProfile& other) const { + return !(*this == other); +} + // static ICCProfile ICCProfile::FromData(const char* data, size_t size) { ICCProfile icc_profile;
diff --git a/ui/gfx/icc_profile.h b/ui/gfx/icc_profile.h index 8d72d08e..e719c16 100644 --- a/ui/gfx/icc_profile.h +++ b/ui/gfx/icc_profile.h
@@ -40,6 +40,7 @@ ICCProfile& operator=(const ICCProfile& other); ~ICCProfile(); bool operator==(const ICCProfile& other) const; + bool operator!=(const ICCProfile& other) const; // Returns the color profile of the monitor that can best represent color. // This profile should be used for creating content that does not know on