diff --git a/DEPS b/DEPS index 8f6cd04..3d9315a 100644 --- a/DEPS +++ b/DEPS
@@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': '4a7b232d00ccf95393c58640c139723542df573e', + 'catapult_revision': '487c2d0050eb9d13f8438ac9a701acc4d3f30d56', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other.
diff --git a/ash/common/wm_shell.cc b/ash/common/wm_shell.cc index 9f140c18..5635d75 100644 --- a/ash/common/wm_shell.cc +++ b/ash/common/wm_shell.cc
@@ -275,8 +275,8 @@ // Can be null in tests. if (!delegate_->GetShellConnector()) return; - delegate_->GetShellConnector()->ConnectToInterface(prefs::mojom::kServiceName, - &pref_manager_ptr); + delegate_->GetShellConnector()->BindInterface(prefs::mojom::kServiceName, + &pref_manager_ptr); pref_store_ = new preferences::PrefObserverStore(std::move(pref_manager_ptr)); }
diff --git a/ash/mus/accelerators/accelerator_controller_delegate_mus.cc b/ash/mus/accelerators/accelerator_controller_delegate_mus.cc index b92ada3b..5dd823a 100644 --- a/ash/mus/accelerators/accelerator_controller_delegate_mus.cc +++ b/ash/mus/accelerators/accelerator_controller_delegate_mus.cc
@@ -129,8 +129,8 @@ #if defined(OS_CHROMEOS) case DEV_ADD_REMOVE_DISPLAY: { display::mojom::TestDisplayControllerPtr test_display_controller; - window_manager_->connector()->ConnectToInterface( - ui::mojom::kServiceName, &test_display_controller); + window_manager_->connector()->BindInterface(ui::mojom::kServiceName, + &test_display_controller); test_display_controller->ToggleAddRemoveDisplay(); break; } @@ -138,8 +138,8 @@ // TODO(crbug.com/657816): This is hack. I'm just stealing the shortcut // key to toggle display size in mus. This should be removed by launch. display::mojom::TestDisplayControllerPtr test_display_controller; - window_manager_->connector()->ConnectToInterface( - ui::mojom::kServiceName, &test_display_controller); + window_manager_->connector()->BindInterface(ui::mojom::kServiceName, + &test_display_controller); test_display_controller->ToggleDisplayResolution(); break; } @@ -153,8 +153,7 @@ } case TOUCH_HUD_PROJECTION_TOGGLE: { mash::mojom::LaunchablePtr launchable; - window_manager_->connector()->ConnectToInterface("touch_hud", - &launchable); + window_manager_->connector()->BindInterface("touch_hud", &launchable); launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT); break;
diff --git a/ash/mus/accessibility_delegate_mus.cc b/ash/mus/accessibility_delegate_mus.cc index 08e7ece10..186d804 100644 --- a/ash/mus/accessibility_delegate_mus.cc +++ b/ash/mus/accessibility_delegate_mus.cc
@@ -17,10 +17,9 @@ ui::mojom::AccessibilityManager* AccessibilityDelegateMus::GetAccessibilityManager() { - if (!accessibility_manager_ptr_.is_bound()) { - connector_->ConnectToInterface(ui::mojom::kServiceName, - &accessibility_manager_ptr_); - } + if (!accessibility_manager_ptr_.is_bound()) + connector_->BindInterface(ui::mojom::kServiceName, + &accessibility_manager_ptr_); return accessibility_manager_ptr_.get(); }
diff --git a/ash/mus/app_launch_unittest.cc b/ash/mus/app_launch_unittest.cc index 86a0cd8..7cf67d0 100644 --- a/ash/mus/app_launch_unittest.cc +++ b/ash/mus/app_launch_unittest.cc
@@ -37,7 +37,7 @@ connector()->Connect(mash::quick_launch::mojom::kServiceName); ui::mojom::WindowServerTestPtr test_interface; - connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); + connector()->BindInterface(ui::mojom::kServiceName, &test_interface); base::RunLoop run_loop; bool success = false;
diff --git a/ash/mus/keyboard_ui_mus.cc b/ash/mus/keyboard_ui_mus.cc index 9b728f61..2f745aa 100644 --- a/ash/mus/keyboard_ui_mus.cc +++ b/ash/mus/keyboard_ui_mus.cc
@@ -15,8 +15,7 @@ : is_enabled_(false), observer_binding_(this) { if (connector) { // TODO(sky): should be something like mojo:keyboard, but need mapping. - connector->ConnectToInterface(content::mojom::kBrowserServiceName, - &keyboard_); + connector->BindInterface(content::mojom::kBrowserServiceName, &keyboard_); keyboard_->AddObserver(observer_binding_.CreateInterfacePtrAndBind()); } }
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc index a2630f2..5479714 100644 --- a/ash/mus/window_manager.cc +++ b/ash/mus/window_manager.cc
@@ -108,10 +108,8 @@ aura::Env::GetInstance()->AddObserver(this); // |connector_| will be null in some tests. - if (connector_) { - connector_->ConnectToInterface(ui::mojom::kServiceName, - &display_controller_); - } + if (connector_) + connector_->BindInterface(ui::mojom::kServiceName, &display_controller_); screen_ = base::MakeUnique<ScreenMus>(); display::Screen::SetScreenInstance(screen_.get());
diff --git a/chrome/VERSION b/chrome/VERSION index 3a0c887..fa6ea3b 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=57 MINOR=0 -BUILD=2975 +BUILD=2976 PATCH=0
diff --git a/chrome/browser/chromeos/accessibility/accessibility_manager.cc b/chrome/browser/chromeos/accessibility/accessibility_manager.cc index 263482da..1650a437 100644 --- a/chrome/browser/chromeos/accessibility/accessibility_manager.cc +++ b/chrome/browser/chromeos/accessibility/accessibility_manager.cc
@@ -646,7 +646,7 @@ service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); mash::mojom::LaunchablePtr launchable; - connector->ConnectToInterface("accessibility_autoclick", &launchable); + connector->BindInterface("accessibility_autoclick", &launchable); launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT); return; } @@ -683,8 +683,7 @@ service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); ash::autoclick::mojom::AutoclickControllerPtr autoclick_controller; - connector->ConnectToInterface("accessibility_autoclick", - &autoclick_controller); + connector->BindInterface("accessibility_autoclick", &autoclick_controller); autoclick_controller->SetAutoclickDelay( autoclick_delay_ms_.InMilliseconds()); return;
diff --git a/chrome/browser/chromeos/locale_change_guard.cc b/chrome/browser/chromeos/locale_change_guard.cc index c7950b6..e3eeecf 100644 --- a/chrome/browser/chromeos/locale_change_guard.cc +++ b/chrome/browser/chromeos/locale_change_guard.cc
@@ -72,8 +72,8 @@ if (!connector) return; - connector->ConnectToInterface(ash_util::GetAshServiceName(), - ¬ification_controller_); + connector->BindInterface(ash_util::GetAshServiceName(), + ¬ification_controller_); } void LocaleChangeGuard::RevertLocaleChange() {
diff --git a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc index b1dae54c..479ba1c9 100644 --- a/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc +++ b/chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.cc
@@ -204,8 +204,8 @@ return; ash::mojom::WallpaperControllerPtr wallpaper_controller; - connector->ConnectToInterface(ash_util::GetAshServiceName(), - &wallpaper_controller); + connector->BindInterface(ash_util::GetAshServiceName(), + &wallpaper_controller); // TODO(crbug.com/655875): Optimize ash wallpaper transport; avoid sending // large bitmaps over Mojo; use shared memory like BitmapUploader, etc. wallpaper_controller->SetWallpaper(*image.bitmap(), layout); @@ -887,8 +887,8 @@ if (connection && connection->GetConnector()) { // Connect to the wallpaper controller interface in the ash service. ash::mojom::WallpaperControllerPtr wallpaper_controller_ptr; - connection->GetConnector()->ConnectToInterface( - ash_util::GetAshServiceName(), &wallpaper_controller_ptr); + connection->GetConnector()->BindInterface(ash_util::GetAshServiceName(), + &wallpaper_controller_ptr); // Register this object as the wallpaper picker. wallpaper_controller_ptr->SetWallpaperPicker( binding_.CreateInterfacePtrAndBind());
diff --git a/chrome/browser/chromeos/settings/shutdown_policy_forwarder.cc b/chrome/browser/chromeos/settings/shutdown_policy_forwarder.cc index 2d618575..f48aae0 100644 --- a/chrome/browser/chromeos/settings/shutdown_policy_forwarder.cc +++ b/chrome/browser/chromeos/settings/shutdown_policy_forwarder.cc
@@ -25,7 +25,7 @@ ash::mojom::ShutdownControllerPtr shutdown_controller; content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), &shutdown_controller); + ->BindInterface(ash_util::GetAshServiceName(), &shutdown_controller); // Forward the setting to ash. shutdown_controller->SetRebootOnShutdown(reboot_on_shutdown);
diff --git a/chrome/browser/image_decoder.cc b/chrome/browser/image_decoder.cc index 93360b70..12306d8 100644 --- a/chrome/browser/image_decoder.cc +++ b/chrome/browser/image_decoder.cc
@@ -48,7 +48,7 @@ } content::ServiceManagerConnection::GetForProcess()->GetConnector() - ->BindRequest(std::move(request)); + ->BindConnectorRequest(std::move(request)); } void RunDecodeCallbackOnTaskRunner(
diff --git a/chrome/browser/resources/settings/controls/settings_checkbox.html b/chrome/browser/resources/settings/controls/settings_checkbox.html index 047c015cb..bda1045 100644 --- a/chrome/browser/resources/settings/controls/settings_checkbox.html +++ b/chrome/browser/resources/settings/controls/settings_checkbox.html
@@ -17,7 +17,7 @@ min-height: var(--settings-row-min-height); } - paper-checkbox:not([disabled]) { + paper-checkbox { width: 100%; }
diff --git a/chrome/browser/resources/settings/privacy_page/privacy_page.html b/chrome/browser/resources/settings/privacy_page/privacy_page.html index 8d8f4267..d315b07 100644 --- a/chrome/browser/resources/settings/privacy_page/privacy_page.html +++ b/chrome/browser/resources/settings/privacy_page/privacy_page.html
@@ -38,12 +38,7 @@ background-image: url(../images/help_outline.svg); } - /* TODO(dbeam): this is similar to a 1 line checkbox. Worth somehow - * combining? */ - #metricsReporting, - #safeBrowsingExtendedReporting { - align-items: center; - display: flex; + .settings-row-min-height { min-height: var(--settings-row-min-height); } @@ -52,7 +47,7 @@ display: inline-block; } - #metricsReportingCheckbox:not([disabled]), + #metricsReportingCheckbox, #safeBrowsingExtendedReportingCheckbox { width: 100%; } @@ -66,7 +61,6 @@ } #restart { - flex: 1; text-align: end; } </style> @@ -90,7 +84,7 @@ label="$i18n{networkPredictionEnabled}" hidden="[[!pageVisibility.networkPrediction]]"> </settings-checkbox> - <div id="safeBrowsingExtendedReporting"> + <div class="layout horizontal center settings-row-min-height"> <paper-checkbox id="safeBrowsingExtendedReportingCheckbox" on-tap="onSafeBrowsingExtendedReportingCheckboxTap_" checked="[[safeBrowsingExtendedReportingEnabled_]]"> @@ -107,7 +101,7 @@ </settings-checkbox> </if><!-- chromeos --> <if expr="not chromeos"> - <div id="metricsReporting"> + <div class="layout horizontal center settings-row-min-height"> <paper-checkbox id="metricsReportingCheckbox" on-tap="onMetricsReportingCheckboxTap_" checked="[[metricsReporting_.enabled]]" @@ -122,7 +116,7 @@ </paper-tooltip> </template> <template is="dom-if" if="[[showRestart_]]" restamp> - <div id="restart"> + <div id="restart" class="flex"> <paper-button on-tap="onRestartTap_"> $i18n{restart} </paper-button>
diff --git a/chrome/browser/ui/ash/app_list/app_list_presenter_service.cc b/chrome/browser/ui/ash/app_list/app_list_presenter_service.cc index aed941a..1a706fb 100644 --- a/chrome/browser/ui/ash/app_list/app_list_presenter_service.cc +++ b/chrome/browser/ui/ash/app_list/app_list_presenter_service.cc
@@ -16,8 +16,8 @@ if (connection && connection->GetConnector()) { // Connect to the app list interface in the ash service. app_list::mojom::AppListPtr app_list_ptr; - connection->GetConnector()->ConnectToInterface( - ash_util::GetAshServiceName(), &app_list_ptr); + connection->GetConnector()->BindInterface(ash_util::GetAshServiceName(), + &app_list_ptr); // Register this object as the app list presenter. app_list_ptr->SetAppListPresenter(binding_.CreateInterfacePtrAndBind()); // Pass the interface pointer to the presenter to report visibility changes.
diff --git a/chrome/browser/ui/ash/cast_config_client_media_router.cc b/chrome/browser/ui/ash/cast_config_client_media_router.cc index 114e292..333ca46 100644 --- a/chrome/browser/ui/ash/cast_config_client_media_router.cc +++ b/chrome/browser/ui/ash/cast_config_client_media_router.cc
@@ -150,7 +150,7 @@ // client. content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), &cast_config_); + ->BindInterface(ash_util::GetAshServiceName(), &cast_config_); // Register this object as the client interface implementation. ash::mojom::CastConfigClientAssociatedPtrInfo ptr_info;
diff --git a/chrome/browser/ui/ash/chrome_new_window_client.cc b/chrome/browser/ui/ash/chrome_new_window_client.cc index 6f2d4507..27f1ecb4 100644 --- a/chrome/browser/ui/ash/chrome_new_window_client.cc +++ b/chrome/browser/ui/ash/chrome_new_window_client.cc
@@ -47,8 +47,8 @@ ChromeNewWindowClient::ChromeNewWindowClient() : binding_(this) { service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); - connector->ConnectToInterface(ash_util::GetAshServiceName(), - &new_window_controller_); + connector->BindInterface(ash_util::GetAshServiceName(), + &new_window_controller_); // Register this object as the client interface implementation. ash::mojom::NewWindowClientAssociatedPtrInfo ptr_info;
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc index bf25719..5a9ada198 100644 --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc
@@ -60,8 +60,7 @@ if (!connector) return false; - connector->ConnectToInterface(ash_util::GetAshServiceName(), - &shelf_controller_); + connector->BindInterface(ash_util::GetAshServiceName(), &shelf_controller_); return true; }
diff --git a/chrome/browser/ui/ash/media_client.cc b/chrome/browser/ui/ash/media_client.cc index 1f16ac27..5234dd0 100644 --- a/chrome/browser/ui/ash/media_client.cc +++ b/chrome/browser/ui/ash/media_client.cc
@@ -133,8 +133,7 @@ service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); - connector->ConnectToInterface(ash_util::GetAshServiceName(), - &media_controller_); + connector->BindInterface(ash_util::GetAshServiceName(), &media_controller_); // Register this object as the client interface implementation. ash::mojom::MediaClientAssociatedPtrInfo ptr_info;
diff --git a/chrome/browser/ui/ash/session_controller_client.cc b/chrome/browser/ui/ash/session_controller_client.cc index 372cf90..df61bb96 100644 --- a/chrome/browser/ui/ash/session_controller_client.cc +++ b/chrome/browser/ui/ash/session_controller_client.cc
@@ -246,7 +246,7 @@ void SessionControllerClient::ConnectToSessionControllerAndSetClient() { content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), &session_controller_); + ->BindInterface(ash_util::GetAshServiceName(), &session_controller_); // Set as |session_controller_|'s client. session_controller_->SetClient(binding_.CreateInterfacePtrAndBind());
diff --git a/chrome/browser/ui/ash/system_tray_client.cc b/chrome/browser/ui/ash/system_tray_client.cc index 518118c0..475ed22 100644 --- a/chrome/browser/ui/ash/system_tray_client.cc +++ b/chrome/browser/ui/ash/system_tray_client.cc
@@ -87,7 +87,7 @@ SystemTrayClient::SystemTrayClient() : binding_(this) { content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), &system_tray_); + ->BindInterface(ash_util::GetAshServiceName(), &system_tray_); // Register this object as the client interface implementation. system_tray_->SetClient(binding_.CreateInterfacePtrAndBind());
diff --git a/chrome/browser/ui/ash/volume_controller.cc b/chrome/browser/ui/ash/volume_controller.cc index 3447be83..ea9eda2 100644 --- a/chrome/browser/ui/ash/volume_controller.cc +++ b/chrome/browser/ui/ash/volume_controller.cc
@@ -42,8 +42,8 @@ service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); ash::mojom::AcceleratorControllerPtr accelerator_controller_ptr; - connector->ConnectToInterface(ash_util::GetAshServiceName(), - &accelerator_controller_ptr); + connector->BindInterface(ash_util::GetAshServiceName(), + &accelerator_controller_ptr); // Register this object as the volume controller. accelerator_controller_ptr->SetVolumeController(
diff --git a/chrome/browser/ui/ash/vpn_list_forwarder.cc b/chrome/browser/ui/ash/vpn_list_forwarder.cc index e3696881..d0559ec 100644 --- a/chrome/browser/ui/ash/vpn_list_forwarder.cc +++ b/chrome/browser/ui/ash/vpn_list_forwarder.cc
@@ -46,7 +46,7 @@ ash::mojom::VpnListPtr vpn_list; content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), &vpn_list); + ->BindInterface(ash_util::GetAshServiceName(), &vpn_list); return vpn_list; }
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc index de78ca8..0d947e9 100644 --- a/chrome/browser/ui/browser_command_controller.cc +++ b/chrome/browser/ui/browser_command_controller.cc
@@ -633,7 +633,7 @@ service_manager::Connector* connector = content::ServiceManagerConnection::GetForProcess()->GetConnector(); mash::mojom::LaunchablePtr launchable; - connector->ConnectToInterface("touch_hud", &launchable); + connector->BindInterface("touch_hud", &launchable); launchable->Launch(mash::mojom::kWindow, mash::mojom::LaunchMode::DEFAULT); } else {
diff --git a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm index f45e014..30745de 100644 --- a/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm +++ b/chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.mm
@@ -5,7 +5,9 @@ #import "chrome/browser/ui/cocoa/autofill/autofill_popup_view_cocoa.h" #include "base/logging.h" +#include "base/mac/mac_util.h" #include "base/strings/sys_string_conversions.h" +#include "base/strings/utf_string_conversions.h" #include "chrome/browser/ui/autofill/autofill_popup_controller.h" #include "chrome/browser/ui/autofill/autofill_popup_layout_model.h" #include "chrome/browser/ui/autofill/popup_constants.h" @@ -16,10 +18,14 @@ #include "third_party/skia/include/core/SkColor.h" #include "ui/base/cocoa/window_size_constants.h" #include "ui/base/resource/resource_bundle.h" +#include "ui/gfx/color_palette.h" #include "ui/gfx/font_list.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/rect.h" #include "ui/gfx/image/image.h" +#include "ui/gfx/image/image_skia_util_mac.h" +#include "ui/gfx/paint_vector_icon.h" +#include "ui/gfx/vector_icons_public.h" using autofill::AutofillPopupView; using autofill::AutofillPopupLayoutModel; @@ -153,6 +159,10 @@ bounds:(NSRect)bounds selected:(BOOL)isSelected textYOffset:(CGFloat)textYOffset { + BOOL isHTTPWarning = + (controller_->GetSuggestionAt(index).frontend_id == + autofill::POPUP_ITEM_ID_HTTP_NOT_SECURE_WARNING_MESSAGE); + // If this row is selected, highlight it with this mac system color. // Otherwise the controller may have a specific background color for this // entry. @@ -173,6 +183,9 @@ // Draw left side if isRTL == NO, right side if isRTL == YES. CGFloat x = isRTL ? rightX : leftX; + if (isHTTPWarning) { + x = [self drawIconAtIndex:index atX:x rightAlign:isRTL bounds:bounds]; + } [self drawName:name atX:x index:index @@ -182,7 +195,9 @@ // Draw right side if isRTL == NO, left side if isRTL == YES. x = isRTL ? leftX : rightX; - x = [self drawIconAtIndex:index atX:x rightAlign:!isRTL bounds:bounds]; + if (!isHTTPWarning) { + x = [self drawIconAtIndex:index atX:x rightAlign:!isRTL bounds:bounds]; + } [self drawSubtext:subtext atX:x index:index @@ -263,10 +278,27 @@ } - (NSImage*)iconAtIndex:(size_t)index { + const int kHttpWarningIconWidth = 16; const base::string16& icon = controller_->GetSuggestionAt(index).icon; if (icon.empty()) return nil; + // For the Form-Not-Secure warning about password/credit card fields on HTTP + // pages, reuse the omnibox vector icons. + if (icon == base::ASCIIToUTF16("httpWarning")) { + return NSImageFromImageSkiaWithColorSpace( + gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTP, + kHttpWarningIconWidth, gfx::kChromeIconGrey), + base::mac::GetSRGBColorSpace()); + } + + if (icon == base::ASCIIToUTF16("httpsInvalid")) { + return NSImageFromImageSkiaWithColorSpace( + gfx::CreateVectorIcon(gfx::VectorIconId::LOCATION_BAR_HTTPS_INVALID, + kHttpWarningIconWidth, gfx::kGoogleRed700), + base::mac::GetSRGBColorSpace()); + } + int iconId = delegate_->GetIconResourceID(icon); DCHECK_NE(-1, iconId);
diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc index d8fcaf3..c3ae265 100644 --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
@@ -110,8 +110,7 @@ input_device_client_.reset(new ui::InputDeviceClient()); ui::mojom::InputDeviceServerPtr server; - connection->GetConnector()->ConnectToInterface(ui::mojom::kServiceName, - &server); + connection->GetConnector()->BindInterface(ui::mojom::kServiceName, &server); input_device_client_->Connect(std::move(server)); // WMState is owned as a member, so don't have MusClient create it.
diff --git a/chrome/browser/ui/views/ime_driver/ime_driver_mus.cc b/chrome/browser/ui/views/ime_driver/ime_driver_mus.cc index 7c497d3c..5ce2fb3a 100644 --- a/chrome/browser/ui/views/ime_driver/ime_driver_mus.cc +++ b/chrome/browser/ui/views/ime_driver/ime_driver_mus.cc
@@ -34,7 +34,7 @@ ui::mojom::IMERegistrarPtr ime_registrar; content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ui::mojom::kServiceName, &ime_registrar); + ->BindInterface(ui::mojom::kServiceName, &ime_registrar); ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); }
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc index a0c72de2..de96fb09 100644 --- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc +++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -297,8 +297,7 @@ content::ServiceManagerConnection::GetForProcess() ->GetConnector() - ->ConnectToInterface(ash_util::GetAshServiceName(), - &touch_view_manager_ptr_); + ->BindInterface(ash_util::GetAshServiceName(), &touch_view_manager_ptr_); touch_view_manager_ptr_->AddObserver( touch_view_binding_.CreateInterfacePtrAndBind()); }
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index b2180f2..ce414eb 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -258,39 +258,6 @@ # TODO(GYP_GONE): Delete this after we've converted everything to GN. # The _run targets exist only for compatibility w/ GYP. -group("telemetry_gpu_test_run") { - testonly = true - deps = [ - ":telemetry_gpu_test", - ] -} - -group("telemetry_gpu_test") { - testonly = true - deps = [ - "//tools/perf/chrome_telemetry_build:telemetry_chrome_test", - ] - - data = [ - # For isolate contract. - "//testing/scripts/common.py", - "//testing/xvfb.py", - "//testing/scripts/run_telemetry_benchmark_as_googletest.py", - - "//content/test/gpu/", - "//content/test/data/gpu/", - - # For GpuProcess.video - "//content/test/data/media/bear.ogv", - - # For webgl_conformance - "//third_party/webgl/", - "//content/test/gpu/run_gpu_test.py", - ] -} - -# TODO(GYP_GONE): Delete this after we've converted everything to GN. -# The _run targets exist only for compatibility w/ GYP. group("telemetry_gpu_integration_test_run") { testonly = true deps = [
diff --git a/chrome/test/data/webui/settings/metrics_reporting_tests.js b/chrome/test/data/webui/settings/metrics_reporting_tests.js index 2f0e3d5..37ff7d68 100644 --- a/chrome/test/data/webui/settings/metrics_reporting_tests.js +++ b/chrome/test/data/webui/settings/metrics_reporting_tests.js
@@ -50,7 +50,7 @@ Polymer.dom.flush(); // Restart button should be hidden by default (in any state). - assertFalse(!!page.$$('#metricsReporting paper-button')); + assertFalse(!!page.$$('#restart')); // Simulate toggling via policy. cr.webUIListenerCallback('metrics-reporting-change', { @@ -60,7 +60,7 @@ Polymer.dom.flush(); // No restart button should show because the value is managed. - assertFalse(!!page.$$('#metricsReporting paper-button')); + assertFalse(!!page.$$('#restart')); cr.webUIListenerCallback('metrics-reporting-change', { enabled: true, @@ -70,7 +70,7 @@ // Changes in policy should not show the restart button because the value // is still managed. - assertFalse(!!page.$$('#metricsReporting paper-button')); + assertFalse(!!page.$$('#restart')); // Remove the policy and toggle the value. cr.webUIListenerCallback('metrics-reporting-change', { @@ -80,7 +80,7 @@ Polymer.dom.flush(); // Now the restart button should be showing. - assertTrue(!!page.$$('#metricsReporting paper-button')); + assertTrue(!!page.$$('#restart')); // Receiving the same values should have no effect. cr.webUIListenerCallback('metrics-reporting-change', { @@ -88,7 +88,7 @@ managed: false, }); Polymer.dom.flush(); - assertTrue(!!page.$$('#metricsReporting paper-button')); + assertTrue(!!page.$$('#restart')); }); }); });
diff --git a/components/filesystem/files_test_base.cc b/components/filesystem/files_test_base.cc index c738890..facb600b 100644 --- a/components/filesystem/files_test_base.cc +++ b/components/filesystem/files_test_base.cc
@@ -21,7 +21,7 @@ void FilesTestBase::SetUp() { ServiceTest::SetUp(); - connector()->ConnectToInterface("filesystem", &files_); + connector()->BindInterface("filesystem", &files_); } void FilesTestBase::GetTemporaryRoot(mojom::DirectoryPtr* directory) {
diff --git a/components/filesystem/public/cpp/prefs/pref_service_factory.cc b/components/filesystem/public/cpp/prefs/pref_service_factory.cc index a1374783e..e9ca2b9 100644 --- a/components/filesystem/public/cpp/prefs/pref_service_factory.cc +++ b/components/filesystem/public/cpp/prefs/pref_service_factory.cc
@@ -27,7 +27,7 @@ service_manager::Connector* connector, PrefRegistry* pref_registry) { filesystem::mojom::FileSystemPtr filesystem; - connector->ConnectToInterface("filesystem", &filesystem); + connector->BindInterface("filesystem", &filesystem); scoped_refptr<FilesystemJsonPrefStore> user_prefs = new FilesystemJsonPrefStore("preferences.json", std::move(filesystem),
diff --git a/components/font_service/public/cpp/font_loader.cc b/components/font_service/public/cpp/font_loader.cc index a830164..877adb4 100644 --- a/components/font_service/public/cpp/font_loader.cc +++ b/components/font_service/public/cpp/font_loader.cc
@@ -15,7 +15,7 @@ FontLoader::FontLoader(service_manager::Connector* connector) { mojom::FontServicePtr font_service; - connector->ConnectToInterface("font_service", &font_service); + connector->BindInterface("font_service", &font_service); thread_ = new internal::FontServiceThread(std::move(font_service)); }
diff --git a/components/leveldb/leveldb_service_unittest.cc b/components/leveldb/leveldb_service_unittest.cc index 0e52786..0f75079 100644 --- a/components/leveldb/leveldb_service_unittest.cc +++ b/components/leveldb/leveldb_service_unittest.cc
@@ -112,8 +112,8 @@ // Overridden from mojo::test::ApplicationTestBase: void SetUp() override { ServiceTest::SetUp(); - connector()->ConnectToInterface("filesystem", &files_); - connector()->ConnectToInterface("leveldb", &leveldb_); + connector()->BindInterface("filesystem", &files_); + connector()->BindInterface("leveldb", &leveldb_); } void TearDown() override {
diff --git a/components/leveldb/remote_iterator_unittest.cc b/components/leveldb/remote_iterator_unittest.cc index 1807bf6..99b7571 100644 --- a/components/leveldb/remote_iterator_unittest.cc +++ b/components/leveldb/remote_iterator_unittest.cc
@@ -48,7 +48,7 @@ // Overridden from mojo::test::ApplicationTestBase: void SetUp() override { ServiceTest::SetUp(); - connector()->ConnectToInterface("leveldb", &leveldb_); + connector()->BindInterface("leveldb", &leveldb_); mojom::DatabaseError error; base::RunLoop run_loop;
diff --git a/content/browser/browser_context.cc b/content/browser/browser_context.cc index a5728e2..6abd6c2 100644 --- a/content/browser/browser_context.cc +++ b/content/browser/browser_context.cc
@@ -440,7 +440,7 @@ service_manager::mojom::PIDReceiverPtr pid_receiver; service_manager::Identity identity(mojom::kBrowserServiceName, new_id); - service_manager_connection->GetConnector()->Start( + service_manager_connection->GetConnector()->StartService( identity, std::move(service), mojo::MakeRequest(&pid_receiver)); pid_receiver->SetPID(base::GetCurrentProcId());
diff --git a/content/browser/media/media_interface_proxy.cc b/content/browser/media/media_interface_proxy.cc index 8dd7c169..0c9342d 100644 --- a/content/browser/media/media_interface_proxy.cc +++ b/content/browser/media/media_interface_proxy.cc
@@ -126,7 +126,7 @@ media::mojom::MediaServicePtr media_service; service_manager::Connector* connector = ServiceManagerConnection::GetForProcess()->GetConnector(); - connector->ConnectToInterface("media", &media_service); + connector->BindInterface("media", &media_service); media_service->CreateInterfaceFactory(MakeRequest(&interface_factory_ptr_), std::move(interfaces)); interface_factory_ptr_.set_connection_error_handler(base::Bind(
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc index 4f3c2aa..7c6dfda 100644 --- a/content/child/blink_platform_impl.cc +++ b/content/child/blink_platform_impl.cc
@@ -794,7 +794,7 @@ ChildThreadImpl::current() ->GetServiceManagerConnection() ->GetConnector() - ->BindRequest(std::move(chromium_request)); + ->BindConnectorRequest(std::move(chromium_request)); } size_t BlinkPlatformImpl::actualMemoryUsageMB() {
diff --git a/content/common/service_manager/child_connection.cc b/content/common/service_manager/child_connection.cc index 68d4466..b5f0bfe 100644 --- a/content/common/service_manager/child_connection.cc +++ b/content/common/service_manager/child_connection.cc
@@ -95,9 +95,9 @@ &pid_receiver_); if (connector) { - connector->Start(child_identity, - std::move(service), - std::move(pid_receiver_request)); + connector->StartService(child_identity, + std::move(service), + std::move(pid_receiver_request)); connection_ = connector->Connect(child_identity); } }
diff --git a/content/ppapi_plugin/ppapi_thread.cc b/content/ppapi_plugin/ppapi_thread.cc index 46402e2a..7aa89dd 100644 --- a/content/ppapi_plugin/ppapi_thread.cc +++ b/content/ppapi_plugin/ppapi_thread.cc
@@ -144,7 +144,7 @@ discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; if (IsRunningInMash()) { #if defined(USE_AURA) - GetServiceManagerConnection()->GetConnector()->ConnectToInterface( + GetServiceManagerConnection()->GetConnector()->BindInterface( ui::mojom::kServiceName, &manager_ptr); #else NOTREACHED();
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 5f63dba..f8369a3 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -882,7 +882,7 @@ discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; if (IsRunningInMash()) { #if defined(USE_AURA) - GetServiceManagerConnection()->GetConnector()->ConnectToInterface( + GetServiceManagerConnection()->GetConnector()->BindInterface( ui::mojom::kServiceName, &manager_ptr); #else NOTREACHED();
diff --git a/content/test/gpu/generate_buildbot_json.py b/content/test/gpu/generate_buildbot_json.py index f158e02..65240c5 100755 --- a/content/test/gpu/generate_buildbot_json.py +++ b/content/test/gpu/generate_buildbot_json.py
@@ -1114,28 +1114,8 @@ } } -TELEMETRY_TESTS = { - 'maps_pixel_test': { - 'target_name': 'maps', - 'args': [ - '--os-type', - '${os_type}', - '--build-revision', - '${got_revision}', - '--test-machine-name', - '${buildername}', - ], - 'tester_configs': [ - { - 'allow_on_android': True, - }, - ], - }, -} - -# These tests use Telemetry's new, simpler, browser_test_runner. -# Eventually all of the Telemetry based tests above will be ported to -# this harness, and the old harness will be deleted. +# These tests use Telemetry's new browser_test_runner, which is a much +# simpler harness for correctness testing. TELEMETRY_GPU_INTEGRATION_TESTS = { 'context_lost': { 'tester_configs': [ @@ -1166,6 +1146,22 @@ }, ], }, + 'maps_pixel_test': { + 'target_name': 'maps', + 'args': [ + '--os-type', + '${os_type}', + '--build-revision', + '${got_revision}', + '--test-machine-name', + '${buildername}', + ], + 'tester_configs': [ + { + 'allow_on_android': True, + }, + ], + }, 'pixel_test': { 'target_name': 'pixel', 'args': [ @@ -1520,8 +1516,7 @@ return result def generate_telemetry_test(tester_name, tester_config, - test, test_config, is_fyi, - use_gpu_integration_test_harness): + test, test_config, is_fyi): if not should_run_on_tester(tester_name, tester_config, test_config, is_fyi): return None test_args = ['-v'] @@ -1565,14 +1560,9 @@ swarming.update(test_config['swarming']) result = { 'args': prefix_args + test_args, - 'isolate_name': ( - 'telemetry_gpu_integration_test' if use_gpu_integration_test_harness - else 'telemetry_gpu_test'), + 'isolate_name': 'telemetry_gpu_integration_test', 'name': step_name, - 'override_compile_targets': [ - ('telemetry_gpu_integration_test_run' if use_gpu_integration_test_harness - else 'telemetry_gpu_test_run') - ], + 'override_compile_targets': ['telemetry_gpu_integration_test_run'], 'swarming': swarming, } if 'non_precommit_args' in test_config: @@ -1597,13 +1587,11 @@ return gtests def generate_telemetry_tests(tester_name, tester_config, - test_dictionary, is_fyi, - use_gpu_integration_test_harness): + test_dictionary, is_fyi): isolated_scripts = [] for test_name, test_config in sorted(test_dictionary.iteritems()): test = generate_telemetry_test( - tester_name, tester_config, test_name, test_config, is_fyi, - use_gpu_integration_test_harness) + tester_name, tester_config, test_name, test_config, is_fyi) if test: isolated_scripts.append(test) return isolated_scripts @@ -1615,9 +1603,8 @@ for name, config in waterfall['testers'].iteritems(): gtests = generate_gtests(name, config, COMMON_GTESTS, is_fyi) isolated_scripts = \ - generate_telemetry_tests(name, config, TELEMETRY_TESTS, is_fyi, False) + \ - generate_telemetry_tests(name, config, TELEMETRY_GPU_INTEGRATION_TESTS, - is_fyi, True) + generate_telemetry_tests( + name, config, TELEMETRY_GPU_INTEGRATION_TESTS, is_fyi) tests[name] = { 'gtest_tests': sorted(gtests, key=lambda x: x['test']), 'isolated_scripts': sorted(isolated_scripts, key=lambda x: x['name'])
diff --git a/content/test/gpu/gpu_tests/cloud_storage_test_base.py b/content/test/gpu/gpu_tests/cloud_storage_test_base.py deleted file mode 100644 index 418d091c..0000000 --- a/content/test/gpu/gpu_tests/cloud_storage_test_base.py +++ /dev/null
@@ -1,309 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Base classes for a test and validator which upload results -(reference images, error images) to cloud storage.""" - -import logging -import os -import re -import tempfile - -from py_utils import cloud_storage -from telemetry.page import legacy_page_test -from telemetry.util import image_util -from telemetry.util import rgba_color - -from gpu_tests import gpu_test_base - -test_data_dir = os.path.abspath(os.path.join( - os.path.dirname(__file__), '..', '..', 'data', 'gpu')) - -default_generated_data_dir = os.path.join(test_data_dir, 'generated') - -error_image_cloud_storage_bucket = 'chromium-browser-gpu-tests' - -def _CompareScreenshotSamples(tab, screenshot, expectations, device_pixel_ratio, - test_machine_name): - # First scan through the expectations and see if there are any scale - # factor overrides that would preempt the device pixel ratio. This - # is mainly a workaround for complex tests like the Maps test. - for expectation in expectations: - if 'scale_factor_overrides' in expectation: - for override in expectation['scale_factor_overrides']: - # Require exact matches to avoid confusion, because some - # machine models and names might be subsets of others - # (e.g. Nexus 5 vs Nexus 5X). - if ('device_type' in override and - (tab.browser.platform.GetDeviceTypeName() == - override['device_type'])): - logging.warning('Overriding device_pixel_ratio ' + - str(device_pixel_ratio) + ' with scale factor ' + - str(override['scale_factor']) + ' for device type ' + - override['device_type']) - device_pixel_ratio = override['scale_factor'] - break - if (test_machine_name and 'machine_name' in override and - override["machine_name"] == test_machine_name): - logging.warning('Overriding device_pixel_ratio ' + - str(device_pixel_ratio) + ' with scale factor ' + - str(override['scale_factor']) + ' for machine name ' + - test_machine_name) - device_pixel_ratio = override['scale_factor'] - break - # Only support one "scale_factor_overrides" in the expectation format. - break - for expectation in expectations: - if "scale_factor_overrides" in expectation: - continue - location = expectation["location"] - size = expectation["size"] - x0 = int(location[0] * device_pixel_ratio) - x1 = int((location[0] + size[0]) * device_pixel_ratio) - y0 = int(location[1] * device_pixel_ratio) - y1 = int((location[1] + size[1]) * device_pixel_ratio) - for x in range(x0, x1): - for y in range(y0, y1): - if (x < 0 or y < 0 or x >= image_util.Width(screenshot) or - y >= image_util.Height(screenshot)): - raise legacy_page_test.Failure( - ('Expected pixel location [%d, %d] is out of range on ' + - '[%d, %d] image') % - (x, y, image_util.Width(screenshot), - image_util.Height(screenshot))) - - actual_color = image_util.GetPixelColor(screenshot, x, y) - expected_color = rgba_color.RgbaColor( - expectation["color"][0], - expectation["color"][1], - expectation["color"][2]) - if not actual_color.IsEqual(expected_color, expectation["tolerance"]): - raise legacy_page_test.Failure('Expected pixel at ' + str(location) + - ' (actual pixel (' + str(x) + ', ' + str(y) + ')) ' + - ' to be ' + - str(expectation["color"]) + " but got [" + - str(actual_color.r) + ", " + - str(actual_color.g) + ", " + - str(actual_color.b) + "]") - -class ValidatorBase(gpu_test_base.ValidatorBase): - def __init__(self): - super(ValidatorBase, self).__init__() - # Parameters for cloud storage reference images. - self.vendor_id = None - self.device_id = None - self.vendor_string = None - self.device_string = None - self.msaa = False - self.model_name = None - - ### - ### Routines working with the local disk (only used for local - ### testing without a cloud storage account -- the bots do not use - ### this code path). - ### - - def _UrlToImageName(self, url): - image_name = re.sub(r'^(http|https|file)://(/*)', '', url) - image_name = re.sub(r'\.\./', '', image_name) - image_name = re.sub(r'(\.|/|-)', '_', image_name) - return image_name - - def _WriteImage(self, image_path, png_image): - output_dir = os.path.dirname(image_path) - if not os.path.exists(output_dir): - os.makedirs(output_dir) - image_util.WritePngFile(png_image, image_path) - - def _WriteErrorImages(self, img_dir, img_name, screenshot, ref_png): - full_image_name = img_name + '_' + str(self.options.build_revision) - full_image_name = full_image_name + '.png' - - # Always write the failing image. - self._WriteImage( - os.path.join(img_dir, 'FAIL_' + full_image_name), screenshot) - - if ref_png is not None: - # Save the reference image. - # This ensures that we get the right revision number. - self._WriteImage( - os.path.join(img_dir, full_image_name), ref_png) - - # Save the difference image. - diff_png = image_util.Diff(screenshot, ref_png) - self._WriteImage( - os.path.join(img_dir, 'DIFF_' + full_image_name), diff_png) - - ### - ### Cloud storage code path -- the bots use this. - ### - - def _ComputeGpuInfo(self, tab): - if ((self.vendor_id and self.device_id) or - (self.vendor_string and self.device_string)): - return - browser = tab.browser - if not browser.supports_system_info: - raise Exception('System info must be supported by the browser') - system_info = browser.GetSystemInfo() - if not system_info.gpu: - raise Exception('GPU information was absent') - device = system_info.gpu.devices[0] - if device.vendor_id and device.device_id: - self.vendor_id = device.vendor_id - self.device_id = device.device_id - elif device.vendor_string and device.device_string: - self.vendor_string = device.vendor_string - self.device_string = device.device_string - else: - raise Exception('GPU device information was incomplete') - # TODO(senorblanco): This should probably be checking - # for the presence of the extensions in system_info.gpu_aux_attributes - # in order to check for MSAA, rather than sniffing the blacklist. - self.msaa = not ( - ('disable_chromium_framebuffer_multisample' in - system_info.gpu.driver_bug_workarounds) or - ('disable_multisample_render_to_texture' in - system_info.gpu.driver_bug_workarounds)) - self.model_name = system_info.model_name - - def _FormatGpuInfo(self, tab): - self._ComputeGpuInfo(tab) - msaa_string = '_msaa' if self.msaa else '_non_msaa' - if self.vendor_id: - return '%s_%04x_%04x%s' % ( - self.options.os_type, self.vendor_id, self.device_id, msaa_string) - else: - # This is the code path for Android devices. Include the model - # name (e.g. "Nexus 9") in the GPU string to disambiguate - # multiple devices on the waterfall which might have the same - # device string ("NVIDIA Tegra") but different screen - # resolutions and device pixel ratios. - return '%s_%s_%s_%s%s' % ( - self.options.os_type, self.vendor_string, self.device_string, - self.model_name, msaa_string) - - def _FormatReferenceImageName(self, img_name, page, tab): - return '%s_v%s_%s.png' % ( - img_name, - page.revision, - self._FormatGpuInfo(tab)) - - def _UploadBitmapToCloudStorage(self, bucket, name, bitmap, public=False): - # This sequence of steps works on all platforms to write a temporary - # PNG to disk, following the pattern in bitmap_unittest.py. The key to - # avoiding PermissionErrors seems to be to not actually try to write to - # the temporary file object, but to re-open its name for all operations. - temp_file = tempfile.NamedTemporaryFile(suffix='.png').name - image_util.WritePngFile(bitmap, temp_file) - cloud_storage.Insert(bucket, name, temp_file, publicly_readable=public) - - def _ConditionallyUploadToCloudStorage(self, img_name, page, tab, screenshot): - """Uploads the screenshot to cloud storage as the reference image - for this test, unless it already exists. Returns True if the - upload was actually performed.""" - if not self.options.refimg_cloud_storage_bucket: - raise Exception('--refimg-cloud-storage-bucket argument is required') - cloud_name = self._FormatReferenceImageName(img_name, page, tab) - if not cloud_storage.Exists(self.options.refimg_cloud_storage_bucket, - cloud_name): - self._UploadBitmapToCloudStorage(self.options.refimg_cloud_storage_bucket, - cloud_name, - screenshot) - return True - return False - - def _DownloadFromCloudStorage(self, img_name, page, tab): - """Downloads the reference image for the given test from cloud - storage, returning it as a Telemetry Bitmap object.""" - # TODO(kbr): there's a race condition between the deletion of the - # temporary file and gsutil's overwriting it. - if not self.options.refimg_cloud_storage_bucket: - raise Exception('--refimg-cloud-storage-bucket argument is required') - temp_file = tempfile.NamedTemporaryFile(suffix='.png').name - cloud_storage.Get(self.options.refimg_cloud_storage_bucket, - self._FormatReferenceImageName(img_name, page, tab), - temp_file) - return image_util.FromPngFile(temp_file) - - def _UploadErrorImagesToCloudStorage(self, image_name, screenshot, ref_img): - """For a failing run, uploads the failing image, reference image (if - supplied), and diff image (if reference image was supplied) to cloud - storage. This subsumes the functionality of the - archive_gpu_pixel_test_results.py script.""" - machine_name = re.sub(r'\W+', '_', self.options.test_machine_name) - upload_dir = '%s_%s_telemetry' % (self.options.build_revision, machine_name) - base_bucket = '%s/runs/%s' % (error_image_cloud_storage_bucket, upload_dir) - image_name_with_revision = '%s_%s.png' % ( - image_name, self.options.build_revision) - self._UploadBitmapToCloudStorage( - base_bucket + '/gen', image_name_with_revision, screenshot, - public=True) - if ref_img is not None: - self._UploadBitmapToCloudStorage( - base_bucket + '/ref', image_name_with_revision, ref_img, public=True) - diff_img = image_util.Diff(screenshot, ref_img) - self._UploadBitmapToCloudStorage( - base_bucket + '/diff', image_name_with_revision, diff_img, - public=True) - print ('See http://%s.commondatastorage.googleapis.com/' - 'view_test_results.html?%s for this run\'s test results') % ( - error_image_cloud_storage_bucket, upload_dir) - - def _ValidateScreenshotSamples(self, tab, url, - screenshot, expectations, device_pixel_ratio): - """Samples the given screenshot and verifies pixel color values. - The sample locations and expected color values are given in expectations. - In case any of the samples do not match the expected color, it raises - a Failure and dumps the screenshot locally or cloud storage depending on - what machine the test is being run.""" - try: - _CompareScreenshotSamples(tab, screenshot, expectations, - device_pixel_ratio, - self.options.test_machine_name) - except legacy_page_test.Failure: - image_name = self._UrlToImageName(url) - if self.options.test_machine_name: - self._UploadErrorImagesToCloudStorage(image_name, screenshot, None) - else: - self._WriteErrorImages(self.options.generated_dir, image_name, - screenshot, None) - raise - - -class CloudStorageTestBase(gpu_test_base.TestBase): - @classmethod - def AddBenchmarkCommandLineArgs(cls, group): - group.add_option('--build-revision', - help='Chrome revision being tested.', - default="unknownrev") - group.add_option('--upload-refimg-to-cloud-storage', - dest='upload_refimg_to_cloud_storage', - action='store_true', default=False, - help='Upload resulting images to cloud storage as reference images') - group.add_option('--download-refimg-from-cloud-storage', - dest='download_refimg_from_cloud_storage', - action='store_true', default=False, - help='Download reference images from cloud storage') - group.add_option('--refimg-cloud-storage-bucket', - help='Name of the cloud storage bucket to use for reference images; ' - 'required with --upload-refimg-to-cloud-storage and ' - '--download-refimg-from-cloud-storage. Example: ' - '"chromium-gpu-archive/reference-images"') - group.add_option('--os-type', - help='Type of operating system on which the pixel test is being run, ' - 'used only to distinguish different operating systems with the same ' - 'graphics card. Any value is acceptable, but canonical values are ' - '"win", "mac", and "linux", and probably, eventually, "chromeos" ' - 'and "android").', - default='') - group.add_option('--test-machine-name', - help='Name of the test machine. Specifying this argument causes this ' - 'script to upload failure images and diffs to cloud storage directly, ' - 'instead of relying on the archive_gpu_pixel_test_results.py script.', - default='') - group.add_option('--generated-dir', - help='Overrides the default on-disk location for generated test images ' - '(only used for local testing without a cloud storage account)', - default=default_generated_data_dir)
diff --git a/content/test/gpu/gpu_tests/context_lost_integration_test.py b/content/test/gpu/gpu_tests/context_lost_integration_test.py index 5e9fa06..c5c4950 100644 --- a/content/test/gpu/gpu_tests/context_lost_integration_test.py +++ b/content/test/gpu/gpu_tests/context_lost_integration_test.py
@@ -9,8 +9,8 @@ from gpu_tests import context_lost_expectations from gpu_tests import path_util +import py_utils from telemetry.core import exceptions -from telemetry.core import util data_path = os.path.join( path_util.GetChromiumSrcDir(), 'content', 'test', 'data', 'gpu') @@ -106,7 +106,7 @@ def _WaitForPageToFinish(self, tab): try: - util.WaitFor(lambda: tab.EvaluateJavaScript( + py_utils.WaitFor(lambda: tab.EvaluateJavaScript( 'window.domAutomationController._finished'), wait_timeout) return True except exceptions.TimeoutException: @@ -128,7 +128,7 @@ # If we're running the GPU process crash test, we need the test # to have fully reset before crashing the GPU process. if check_crash_count: - util.WaitFor(lambda: tab.EvaluateJavaScript( + py_utils.WaitFor(lambda: tab.EvaluateJavaScript( 'window.domAutomationController._finished'), wait_timeout) # Crash the GPU process.
diff --git a/content/test/gpu/gpu_tests/maps.py b/content/test/gpu/gpu_tests/maps.py deleted file mode 100644 index 51926a69..0000000 --- a/content/test/gpu/gpu_tests/maps.py +++ /dev/null
@@ -1,151 +0,0 @@ -# Copyright 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Runs a Google Maps pixel test. -Performs several common navigation actions on the map (pan, zoom, rotate) then -captures a screenshot and compares selected pixels against expected values""" - -import json -import os - -from gpu_tests import cloud_storage_test_base -from gpu_tests import gpu_test_base -from gpu_tests import maps_expectations -from gpu_tests import path_util - -from telemetry.core import util -from telemetry.page import legacy_page_test -from telemetry import story as story_module -from telemetry.story import story_set as story_set_module - - -class MapsValidator(cloud_storage_test_base.ValidatorBase): - def __init__(self): - super(MapsValidator, self).__init__() - - def CustomizeBrowserOptions(self, options): - # --test-type=gpu is used only to suppress the "Google API Keys are missing" - # infobar, which causes flakiness in tests. - options.AppendExtraBrowserArgs(['--enable-gpu-benchmarking', - '--test-type=gpu']) - - def ValidateAndMeasurePage(self, page, tab, results): - # TODO: This should not be necessary, but it's not clear if the test is - # failing on the bots in it's absence. Remove once we can verify that it's - # safe to do so. - MapsValidator.SpinWaitOnRAF(tab, 3) - - if not tab.screenshot_supported: - raise legacy_page_test.Failure( - 'Browser does not support screenshot capture') - screenshot = tab.Screenshot(5) - if screenshot is None: - raise legacy_page_test.Failure('Could not capture screenshot') - - dpr = tab.EvaluateJavaScript('window.devicePixelRatio') - print 'Maps\' devicePixelRatio is ' + str(dpr) - # Even though the Maps test uses a fixed devicePixelRatio so that - # it fetches all of the map tiles at the same resolution, on two - # different devices with the same devicePixelRatio (a Retina - # MacBook Pro and a Nexus 9), different scale factors of the final - # screenshot are observed. Hack around this by specifying a scale - # factor for these bots in the test expectations. This relies on - # the test-machine-name argument being specified on the command - # line. - expected = self._ReadPixelExpectations(page) - self._ValidateScreenshotSamples( - tab, page.display_name, screenshot, expected, dpr) - - @staticmethod - def SpinWaitOnRAF(tab, iterations, timeout=60): - waitScript = r""" - window.__spinWaitOnRAFDone = false; - var iterationsLeft = %d; - - function spin() { - iterationsLeft--; - if (iterationsLeft == 0) { - window.__spinWaitOnRAFDone = true; - return; - } - window.requestAnimationFrame(spin); - } - window.requestAnimationFrame(spin); - """ % iterations - - def IsWaitComplete(): - return tab.EvaluateJavaScript('window.__spinWaitOnRAFDone') - - tab.ExecuteJavaScript(waitScript) - util.WaitFor(IsWaitComplete, timeout) - - def _ReadPixelExpectations(self, page): - expectations_path = os.path.join(page._base_dir, page.pixel_expectations) - with open(expectations_path, 'r') as f: - json_contents = json.load(f) - return json_contents - - -class MapsPage(gpu_test_base.PageBase): - def __init__(self, story_set, base_dir, expectations): - super(MapsPage, self).__init__( - url='http://map-test/performance.html', - page_set=story_set, - base_dir=base_dir, - name='Maps.maps_004', - make_javascript_deterministic=False, - expectations=expectations) - self.pixel_expectations = 'data/maps_004_expectations.json' - - def RunNavigateSteps(self, action_runner): - super(MapsPage, self).RunNavigateSteps(action_runner) - action_runner.WaitForJavaScriptCondition( - 'window.testDone', timeout_in_seconds=180) - - -class Maps(cloud_storage_test_base.CloudStorageTestBase): - """Google Maps pixel tests. - - Note: the WPR for this test was recorded from the smoothness.maps - benchmark's similar page. The Maps team gave us a build of their - test. The only modification to the test was to config.js, where the - width and height query args were set to 800 by 600. The WPR was - recorded with: - - tools/perf/record_wpr smoothness_maps --browser=system - - This would produce maps_???.wpr and maps.json were copied from - tools/perf/page_sets/data into content/test/gpu/page_sets/data. - It worths noting that telemetry no longer allows replaying URL that has form - of local host. If the recording was created for locahost URL, ones can update - the host name by running: - web-page-replay/httparchive.py remap-host maps_004.wpr \ - localhost:10020 map-test - (web-page-replay/ can be found in third_party/catapult/telemetry/third_party/) - After update the host name in WPR archive, please remember to update the host - URL in content/test/gpu/gpu_tests/maps.py as well. - - To upload the maps_???.wpr to cloud storage, one would run: - depot_tools/upload_to_google_storage.py --bucket=chromium-telemetry \ - maps_???.wpr - The same sha1 file and json file need to be copied into both of these - directories in any CL which updates the recording.""" - test = MapsValidator - - @classmethod - def Name(cls): - return 'maps' - - def _CreateExpectations(self): - return maps_expectations.MapsExpectations() - - def CreateStorySet(self, options): - story_set_path = os.path.join( - path_util.GetChromiumSrcDir(), 'content', 'test', 'gpu', 'page_sets') - ps = story_set_module.StorySet( - archive_data_file='data/maps.json', - base_dir=story_set_path, - cloud_storage_bucket=story_module.PUBLIC_BUCKET) - ps.AddStory(MapsPage(ps, ps.base_dir, self.GetExpectations())) - return ps
diff --git a/content/test/gpu/gpu_tests/maps_integration_test.py b/content/test/gpu/gpu_tests/maps_integration_test.py new file mode 100644 index 0000000..f3fb80b4 --- /dev/null +++ b/content/test/gpu/gpu_tests/maps_integration_test.py
@@ -0,0 +1,140 @@ +# 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 + +from gpu_tests import cloud_storage_integration_test_base +from gpu_tests import maps_expectations +from gpu_tests import path_util + +import py_utils +from py_utils import cloud_storage + +data_path = os.path.join(path_util.GetChromiumSrcDir(), + 'content', 'test', 'gpu', 'page_sets', 'data') + +class MapsIntegrationTest( + cloud_storage_integration_test_base.CloudStorageIntegrationTestBase): + """Google Maps pixel tests. + + Note: the WPR for this test was recorded from the smoothness.maps + benchmark's similar page. The Maps team gave us a build of their test. The + only modification to the test was to config.js, where the width and height + query args were set to 800 by 600. The WPR was recorded with: + + tools/perf/record_wpr smoothness_maps --browser=system + + This produced maps_???.wpr and maps.json, which were copied from + tools/perf/page_sets/data into content/test/gpu/page_sets/data. + + It's worth noting that telemetry no longer allows replaying a URL that + refers to localhost. If the recording was created for the locahost URL, one + can update the host name by running: + + web-page-replay/httparchive.py remap-host maps_004.wpr \ + localhost:10020 map-test + + (web-page-replay/ can be found in third_party/catapult/telemetry/third_party/) + + After updating the host name in the WPR archive, please remember to update + the host URL in content/test/gpu/gpu_tests/maps_integration_test.py as well. + + To upload the maps_???.wpr to cloud storage, one would run: + + depot_tools/upload_to_google_storage.py --bucket=chromium-telemetry \ + maps_???.wpr + + The same sha1 file and json file need to be copied into both of these + directories in any CL which updates the recording. + """ + + @classmethod + def Name(cls): + return 'maps' + + @classmethod + def _CreateExpectations(cls): + return maps_expectations.MapsExpectations() + + @classmethod + def setUpClass(cls): + super(cls, MapsIntegrationTest).setUpClass() + cls.SetBrowserOptions(cls._finder_options) + cls.StartWPRServer(os.path.join(data_path, 'maps_004.wpr.updated'), + cloud_storage.PUBLIC_BUCKET) + cls.StartBrowser() + + @classmethod + def tearDownClass(cls): + super(cls, MapsIntegrationTest).tearDownClass() + cls.StopWPRServer() + + @classmethod + def GenerateGpuTests(cls, options): + cls.SetParsedCommandLineOptions(options) + yield('Maps_maps_004', + 'http://map-test/performance.html', + ('maps_004_expectations.json')) + + def _ReadPixelExpectations(self, expectations_file): + expectations_path = os.path.join(data_path, expectations_file) + with open(expectations_path, 'r') as f: + json_contents = json.load(f) + return json_contents + + def _SpinWaitOnRAF(self, iterations, timeout=60): + tab = self.tab + waitScript = r""" + window.__spinWaitOnRAFDone = false; + var iterationsLeft = %d; + + function spin() { + iterationsLeft--; + if (iterationsLeft == 0) { + window.__spinWaitOnRAFDone = true; + return; + } + window.requestAnimationFrame(spin); + } + window.requestAnimationFrame(spin); + """ % iterations + + def IsWaitComplete(): + return tab.EvaluateJavaScript('window.__spinWaitOnRAFDone') + + tab.ExecuteJavaScript(waitScript) + py_utils.WaitFor(IsWaitComplete, timeout) + + def RunActualGpuTest(self, url, *args): + tab = self.tab + pixel_expectations_file = args[0] + action_runner = tab.action_runner + action_runner.Navigate(url) + action_runner.WaitForJavaScriptCondition( + 'window.testDone', timeout_in_seconds=180) + + # TODO(kbr): This should not be necessary, but it's not clear if the test + # is failing on the bots in its absence. Remove once we can verify that + # it's safe to do so. + self._SpinWaitOnRAF(3) + + if not tab.screenshot_supported: + self.fail('Browser does not support screenshot capture') + screenshot = tab.Screenshot(5) + if screenshot is None: + self.fail('Could not capture screenshot') + + dpr = tab.EvaluateJavaScript('window.devicePixelRatio') + print 'Maps\' devicePixelRatio is ' + str(dpr) + # Even though the Maps test uses a fixed devicePixelRatio so that + # it fetches all of the map tiles at the same resolution, on two + # different devices with the same devicePixelRatio (a Retina + # MacBook Pro and a Nexus 9), different scale factors of the final + # screenshot are observed. Hack around this by specifying a scale + # factor for these bots in the test expectations. This relies on + # the test-machine-name argument being specified on the command + # line. + expected = self._ReadPixelExpectations(pixel_expectations_file) + self._ValidateScreenshotSamples(tab, url, screenshot, expected, dpr)
diff --git a/content/test/gpu/run_gpu_test.py b/content/test/gpu/run_gpu_test.py deleted file mode 100755 index aab3f8d5..0000000 --- a/content/test/gpu/run_gpu_test.py +++ /dev/null
@@ -1,97 +0,0 @@ -#!/usr/bin/env python -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import re -import subprocess -import sys - -from gpu_tests import path_util - -path_util.SetupTelemetryPaths() - -from telemetry import benchmark_runner - -import gpu_project_config - - -def _LaunchDBus(): - """Launches DBus to work around a bug in GLib. - - Works around a bug in GLib where it performs operations which aren't - async-signal-safe (in particular, memory allocations) between fork and exec - when it spawns subprocesses. This causes threads inside Chrome's browser and - utility processes to get stuck, and this harness to hang waiting for those - processes, which will never terminate. This doesn't happen on users' - machines, because they have an active desktop session and the - DBUS_SESSION_BUS_ADDRESS environment variable set, but it does happen on the - bots. See crbug.com/309093 for more details. - - Returns: - True if it actually spawned DBus. - """ - import platform - if (platform.uname()[0].lower() != 'linux' or - 'DBUS_SESSION_BUS_ADDRESS' in os.environ): - return False - - # Only start DBus on systems that are actually running X. Using DISPLAY - # variable is not reliable, because is it set by the /etc/init.d/buildbot - # script for all slaves. - # TODO(sergiyb): When all GPU slaves are migrated to swarming, we can remove - # assignment of the DISPLAY from /etc/init.d/buildbot because this hack was - # used to run GPU tests on buildbot. After it is removed, we can use DISPLAY - # variable here to check if we are running X. - if subprocess.call(['pidof', 'X'], stdout=subprocess.PIPE) == 0: - try: - print 'DBUS_SESSION_BUS_ADDRESS env var not found, starting dbus-launch' - dbus_output = subprocess.check_output(['dbus-launch']).split('\n') - for line in dbus_output: - m = re.match(r'([^=]+)\=(.+)', line) - if m: - os.environ[m.group(1)] = m.group(2) - print ' setting %s to %s' % (m.group(1), m.group(2)) - return True - except (subprocess.CalledProcessError, OSError) as e: - print 'Exception while running dbus_launch: %s' % e - return False - - -def _ShutdownDBus(): - """Manually kills the previously-launched DBus daemon. - - It appears that passing --exit-with-session to dbus-launch in - _LaunchDBus(), above, doesn't cause the launched dbus-daemon to shut - down properly. Manually kill the sub-process using the PID it gave - us at launch time. - - This function is called when the flag --spawn-dbus is given, and if - _LaunchDBus(), above, actually spawned the dbus-daemon. - """ - import signal - if 'DBUS_SESSION_BUS_PID' in os.environ: - dbus_pid = os.environ['DBUS_SESSION_BUS_PID'] - try: - os.kill(int(dbus_pid), signal.SIGTERM) - print ' killed dbus-daemon with PID %s' % dbus_pid - except OSError as e: - print ' error killing dbus-daemon with PID %s: %s' % (dbus_pid, e) - # Try to clean up any stray DBUS_SESSION_BUS_ADDRESS environment - # variable too. Some of the bots seem to re-invoke runtest.py in a - # way that this variable sticks around from run to run. - if 'DBUS_SESSION_BUS_ADDRESS' in os.environ: - del os.environ['DBUS_SESSION_BUS_ADDRESS'] - print ' cleared DBUS_SESSION_BUS_ADDRESS environment variable' - - -if __name__ == '__main__': - did_launch_dbus = _LaunchDBus() - try: - retcode = benchmark_runner.main(gpu_project_config.CONFIG) - finally: - if did_launch_dbus: - _ShutdownDBus() - - sys.exit(retcode)
diff --git a/mash/browser/browser.cc b/mash/browser/browser.cc index 5e9d2c97..840d917 100644 --- a/mash/browser/browser.cc +++ b/mash/browser/browser.cc
@@ -874,8 +874,8 @@ std::unique_ptr<navigation::View> Browser::CreateView() { navigation::mojom::ViewFactoryPtr factory; - context()->connector()->ConnectToInterface( - content::mojom::kBrowserServiceName, &factory); + context()->connector()->BindInterface(content::mojom::kBrowserServiceName, + &factory); return base::MakeUnique<navigation::View>(std::move(factory)); }
diff --git a/mash/catalog_viewer/catalog_viewer.cc b/mash/catalog_viewer/catalog_viewer.cc index 5cc5a36..a0be96f 100644 --- a/mash/catalog_viewer/catalog_viewer.cc +++ b/mash/catalog_viewer/catalog_viewer.cc
@@ -240,8 +240,7 @@ return; } catalog::mojom::CatalogPtr catalog; - context()->connector()->ConnectToInterface(catalog::mojom::kServiceName, - &catalog); + context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog); views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( new CatalogViewerContents(this, std::move(catalog)), nullptr,
diff --git a/mash/quick_launch/quick_launch.cc b/mash/quick_launch/quick_launch.cc index 1eb5a16c..18cacff1 100644 --- a/mash/quick_launch/quick_launch.cc +++ b/mash/quick_launch/quick_launch.cc
@@ -190,8 +190,7 @@ return; } catalog::mojom::CatalogPtr catalog; - context()->connector()->ConnectToInterface(catalog::mojom::kServiceName, - &catalog); + context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog); views::Widget* window = views::Widget::CreateWindowWithContextAndBounds( new QuickLaunchUI(this, context()->connector(), std::move(catalog)),
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc index 30025d44..740ee359 100644 --- a/mash/task_viewer/task_viewer.cc +++ b/mash/task_viewer/task_viewer.cc
@@ -314,16 +314,15 @@ } service_manager::mojom::ServiceManagerPtr service_manager; - context()->connector()->ConnectToInterface( - service_manager::mojom::kServiceName, &service_manager); + context()->connector()->BindInterface(service_manager::mojom::kServiceName, + &service_manager); service_manager::mojom::ServiceManagerListenerPtr listener; service_manager::mojom::ServiceManagerListenerRequest request(&listener); service_manager->AddListener(std::move(listener)); catalog::mojom::CatalogPtr catalog; - context()->connector()->ConnectToInterface(catalog::mojom::kServiceName, - &catalog); + context()->connector()->BindInterface(catalog::mojom::kServiceName, &catalog); TaskViewerContents* task_viewer = new TaskViewerContents( this, std::move(request), std::move(catalog));
diff --git a/mash/webtest/webtest.cc b/mash/webtest/webtest.cc index b311e2ae..0c38ff9f 100644 --- a/mash/webtest/webtest.cc +++ b/mash/webtest/webtest.cc
@@ -189,7 +189,7 @@ } navigation::mojom::ViewFactoryPtr view_factory; - context()->connector()->ConnectToInterface("navigation", &view_factory); + context()->connector()->BindInterface("navigation", &view_factory); navigation::mojom::ViewPtr view; navigation::mojom::ViewClientPtr view_client; navigation::mojom::ViewClientRequest view_client_request(&view_client);
diff --git a/media/test/pipeline_integration_test.cc b/media/test/pipeline_integration_test.cc index 8e42a038..b2599ee 100644 --- a/media/test/pipeline_integration_test.cc +++ b/media/test/pipeline_integration_test.cc
@@ -687,7 +687,7 @@ std::unique_ptr<Renderer> CreateRenderer( ScopedVector<VideoDecoder> prepend_video_decoders, ScopedVector<AudioDecoder> prepend_audio_decoders) override { - connector()->ConnectToInterface("media", &media_interface_factory_); + connector()->BindInterface("media", &media_interface_factory_); mojom::RendererPtr mojo_renderer; media_interface_factory_->CreateRenderer(std::string(),
diff --git a/mojo/public/cpp/bindings/tests/versioning_apptest.cc b/mojo/public/cpp/bindings/tests/versioning_apptest.cc index 89fd88a3..95a89c0 100644 --- a/mojo/public/cpp/bindings/tests/versioning_apptest.cc +++ b/mojo/public/cpp/bindings/tests/versioning_apptest.cc
@@ -24,8 +24,7 @@ void SetUp() override { ApplicationTestBase::SetUp(); - connector()->ConnectToInterface("versioning_test_service", - &database_); + connector()->BindInterface("versioning_test_service", &database_); } HumanResourceDatabasePtr database_;
diff --git a/services/image_decoder/public/cpp/decode.cc b/services/image_decoder/public/cpp/decode.cc index d120059..71eea29 100644 --- a/services/image_decoder/public/cpp/decode.cc +++ b/services/image_decoder/public/cpp/decode.cc
@@ -37,7 +37,7 @@ uint64_t max_size_in_bytes, const mojom::ImageDecoder::DecodeImageCallback& callback) { mojom::ImageDecoderPtr decoder; - connector->ConnectToInterface(mojom::kServiceName, &decoder); + connector->BindInterface(mojom::kServiceName, &decoder); decoder.set_connection_error_handler( base::Bind(&OnConnectionError, callback)); mojom::ImageDecoder* raw_decoder = decoder.get();
diff --git a/services/navigation/navigation_unittest.cc b/services/navigation/navigation_unittest.cc index e16865478..5dfc8adb 100644 --- a/services/navigation/navigation_unittest.cc +++ b/services/navigation/navigation_unittest.cc
@@ -74,7 +74,7 @@ // See crbug.com/619523 TEST_F(NavigationTest, DISABLED_Navigate) { mojom::ViewFactoryPtr view_factory; - connector()->ConnectToInterface("navigation", &view_factory); + connector()->BindInterface("navigation", &view_factory); mojom::ViewPtr view; view_factory->CreateView(GetViewClient(), MakeRequest(&view));
diff --git a/services/service_manager/background/tests/background_service_manager_unittest.cc b/services/service_manager/background/tests/background_service_manager_unittest.cc index 95a271a..ce13f6c 100644 --- a/services/service_manager/background/tests/background_service_manager_unittest.cc +++ b/services/service_manager/background/tests/background_service_manager_unittest.cc
@@ -60,7 +60,7 @@ base::MakeUnique<ServiceImpl>(), background_service_manager.CreateServiceRequest(kTestName)); mojom::TestServicePtr test_service; - service_context.connector()->ConnectToInterface(kAppName, &test_service); + service_context.connector()->BindInterface(kAppName, &test_service); base::RunLoop run_loop; bool got_result = false; test_service->Test(
diff --git a/services/service_manager/connect_util.cc b/services/service_manager/connect_util.cc index d873621..2ac6ec4 100644 --- a/services/service_manager/connect_util.cc +++ b/services/service_manager/connect_util.cc
@@ -12,7 +12,7 @@ namespace service_manager { -mojo::ScopedMessagePipeHandle ConnectToInterfaceByName( +mojo::ScopedMessagePipeHandle BindInterface( ServiceManager* service_manager, const Identity& source, const Identity& target,
diff --git a/services/service_manager/connect_util.h b/services/service_manager/connect_util.h index d6cf0d1..c31f037 100644 --- a/services/service_manager/connect_util.h +++ b/services/service_manager/connect_util.h
@@ -14,7 +14,7 @@ class ServiceManager; -mojo::ScopedMessagePipeHandle ConnectToInterfaceByName( +mojo::ScopedMessagePipeHandle BindInterface( ServiceManager* service_manager, const Identity& source, const Identity& target, @@ -23,22 +23,21 @@ // Must only be used by Service Manager internals and test code as it does not // forward capability filters. Runs |name| with a permissive capability filter. template <typename Interface> -inline void ConnectToInterface(ServiceManager* service_manager, +inline void BindInterface(ServiceManager* service_manager, const Identity& source, const Identity& target, mojo::InterfacePtr<Interface>* ptr) { mojo::ScopedMessagePipeHandle service_handle = - ConnectToInterfaceByName(service_manager, source, target, - Interface::Name_); + BindInterface(service_manager, source, target, Interface::Name_); ptr->Bind(mojo::InterfacePtrInfo<Interface>(std::move(service_handle), 0u)); } template <typename Interface> -inline void ConnectToInterface(ServiceManager* service_manager, +inline void BindInterface(ServiceManager* service_manager, const Identity& source, const std::string& name, mojo::InterfacePtr<Interface>* ptr) { - mojo::ScopedMessagePipeHandle service_handle = ConnectToInterfaceByName( + mojo::ScopedMessagePipeHandle service_handle = BindInterface( service_manager, source, Identity(name, mojom::kInheritUserID), Interface::Name_); ptr->Bind(mojo::InterfacePtrInfo<Interface>(std::move(service_handle), 0u));
diff --git a/services/service_manager/public/cpp/connector.h b/services/service_manager/public/cpp/connector.h index 73560d3e..b2829c1 100644 --- a/services/service_manager/public/cpp/connector.h +++ b/services/service_manager/public/cpp/connector.h
@@ -43,7 +43,7 @@ // Creates an instance of a service for |identity| in a process started by the // client (or someone else). Must be called before Connect() may be called to // |identity|. - virtual void Start( + virtual void StartService( const Identity& identity, mojom::ServicePtr service, mojom::PIDReceiverRequest pid_receiver_request) = 0; @@ -56,20 +56,22 @@ virtual std::unique_ptr<Connection> Connect(const std::string& name) = 0; virtual std::unique_ptr<Connection> Connect(const Identity& target) = 0; - // Connect to |target| & request to bind |Interface|. Does not retain a - // connection to |target|. + // Connect to |target| & request to bind |Interface|. template <typename Interface> - void ConnectToInterface(const Identity& target, - mojo::InterfacePtr<Interface>* ptr) { - std::unique_ptr<Connection> connection = Connect(target); - if (connection) - connection->GetInterface(ptr); + void BindInterface(const Identity& target, + mojo::InterfacePtr<Interface>* ptr) { + mojo::MessagePipe pipe; + ptr->Bind(mojo::InterfacePtrInfo<Interface>(std::move(pipe.handle0), 0u)); + BindInterface(target, Interface::Name_, std::move(pipe.handle1)); } template <typename Interface> - void ConnectToInterface(const std::string& name, - mojo::InterfacePtr<Interface>* ptr) { - return ConnectToInterface(Identity(name, mojom::kInheritUserID), ptr); + void BindInterface(const std::string& name, + mojo::InterfacePtr<Interface>* ptr) { + return BindInterface(Identity(name, mojom::kInheritUserID), ptr); } + virtual void BindInterface(const Identity& target, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle interface_pipe) = 0; // Creates a new instance of this class which may be passed to another thread. // The returned object may be passed multiple times until Connect() is called, @@ -77,7 +79,7 @@ virtual std::unique_ptr<Connector> Clone() = 0; // Binds a Connector request to the other end of this Connector. - virtual void BindRequest(mojom::ConnectorRequest request) = 0; + virtual void BindConnectorRequest(mojom::ConnectorRequest request) = 0; }; } // namespace service_manager
diff --git a/services/service_manager/public/cpp/lib/connector_impl.cc b/services/service_manager/public/cpp/lib/connector_impl.cc index ab30195b..b9c1811 100644 --- a/services/service_manager/public/cpp/lib/connector_impl.cc +++ b/services/service_manager/public/cpp/lib/connector_impl.cc
@@ -10,6 +10,10 @@ namespace service_manager { +namespace { +void EmptyBindCallback(mojom::ConnectResult, const std::string&) {} +} + ConnectorImpl::ConnectorImpl(mojom::ConnectorPtrInfo unbound_state) : unbound_state_(std::move(unbound_state)) { thread_checker_.DetachFromThread(); @@ -28,17 +32,17 @@ connector_.reset(); } -void ConnectorImpl::Start( +void ConnectorImpl::StartService( const Identity& identity, mojom::ServicePtr service, mojom::PIDReceiverRequest pid_receiver_request) { - if (!BindIfNecessary()) + if (!BindConnectorIfNecessary()) return; DCHECK(service.is_bound() && pid_receiver_request.is_pending()); - connector_->Start(identity, - service.PassInterface().PassHandle(), - std::move(pid_receiver_request)); + connector_->StartService(identity, + service.PassInterface().PassHandle(), + std::move(pid_receiver_request)); } std::unique_ptr<Connection> ConnectorImpl::Connect(const std::string& name) { @@ -46,7 +50,7 @@ } std::unique_ptr<Connection> ConnectorImpl::Connect(const Identity& target) { - if (!BindIfNecessary()) + if (!BindConnectorIfNecessary()) return nullptr; DCHECK(thread_checker_.CalledOnValidThread()); @@ -65,8 +69,19 @@ return std::move(connection); } +void ConnectorImpl::BindInterface( + const Identity& target, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle interface_pipe) { + if (!BindConnectorIfNecessary()) + return; + + connector_->BindInterface(target, interface_name, std::move(interface_pipe), + base::Bind(&EmptyBindCallback)); +} + std::unique_ptr<Connector> ConnectorImpl::Clone() { - if (!BindIfNecessary()) + if (!BindConnectorIfNecessary()) return nullptr; mojom::ConnectorPtr connector; @@ -75,13 +90,13 @@ return base::MakeUnique<ConnectorImpl>(connector.PassInterface()); } -void ConnectorImpl::BindRequest(mojom::ConnectorRequest request) { - if (!BindIfNecessary()) +void ConnectorImpl::BindConnectorRequest(mojom::ConnectorRequest request) { + if (!BindConnectorIfNecessary()) return; connector_->Clone(std::move(request)); } -bool ConnectorImpl::BindIfNecessary() { +bool ConnectorImpl::BindConnectorIfNecessary() { // Bind this object to the current thread the first time it is used to // connect. if (!connector_.is_bound()) {
diff --git a/services/service_manager/public/cpp/lib/connector_impl.h b/services/service_manager/public/cpp/lib/connector_impl.h index 14a1d77..7c719a84 100644 --- a/services/service_manager/public/cpp/lib/connector_impl.h +++ b/services/service_manager/public/cpp/lib/connector_impl.h
@@ -24,15 +24,18 @@ void OnConnectionError(); // Connector: - void Start(const Identity& identity, - mojom::ServicePtr service, - mojom::PIDReceiverRequest pid_receiver_request) override; + void StartService(const Identity& identity, + mojom::ServicePtr service, + mojom::PIDReceiverRequest pid_receiver_request) override; std::unique_ptr<Connection> Connect(const std::string& name) override; std::unique_ptr<Connection> Connect(const Identity& target) override; + void BindInterface(const Identity& target, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle interface_pipe) override; std::unique_ptr<Connector> Clone() override; - void BindRequest(mojom::ConnectorRequest request) override; + void BindConnectorRequest(mojom::ConnectorRequest request) override; - bool BindIfNecessary(); + bool BindConnectorIfNecessary(); mojom::ConnectorPtrInfo unbound_state_; mojom::ConnectorPtr connector_;
diff --git a/services/service_manager/public/interfaces/connector.mojom b/services/service_manager/public/interfaces/connector.mojom index bff2cf0..3c759cbb 100644 --- a/services/service_manager/public/interfaces/connector.mojom +++ b/services/service_manager/public/interfaces/connector.mojom
@@ -88,9 +88,9 @@ // the process it created (the pid isn't supplied directly here as the // process may not have been launched by the time Connect() is called.) // - Start(Identity name, - handle<message_pipe> service, - PIDReceiver& pid_receiver_request); + StartService(Identity name, + handle<message_pipe> service, + PIDReceiver& pid_receiver_request); // Requests a connection with another service. The service originating the // request is referred to as the "source" and the one receiving the "target". @@ -129,6 +129,15 @@ Connect(Identity target, InterfaceProvider&? remote_interfaces) => (ConnectResult result, string user_id); + // Variant of Connect() above. Will (gradually) replace it. Think of this like + // a combination of Connect() and InterfaceProvider::GetInteface() - requests + // a connection to a service and binds an interface in one step. + // TODO(beng): Update this comment once the implementation is complete. + BindInterface(Identity target, + string interface_name, + handle<message_pipe> interface_pipe) => + (ConnectResult result, string user_id); + // Clones this Connector so it can be passed to another thread. Clone(Connector& request); };
diff --git a/services/service_manager/service_manager.cc b/services/service_manager/service_manager.cc index a32333f..f242114 100644 --- a/services/service_manager/service_manager.cc +++ b/services/service_manager/service_manager.cc
@@ -228,7 +228,7 @@ }; // mojom::Connector implementation: - void Start( + void StartService( const Identity& target, mojo::ScopedMessagePipeHandle service_handle, mojom::PIDReceiverRequest pid_receiver_request) override { @@ -251,6 +251,25 @@ mojom::PIDReceiverRequest(), callback); } + void BindInterface(const service_manager::Identity& target, + const std::string& interface_name, + mojo::ScopedMessagePipeHandle interface_pipe, + const BindInterfaceCallback& callback) override { + mojom::InterfaceProviderPtr remote_interfaces; + ConnectImpl( + target, + MakeRequest(&remote_interfaces), + mojom::ServicePtr(), + mojom::PIDReceiverRequest(), + base::Bind( + &service_manager::ServiceManager::Instance::BindCallbackWrapper, + weak_factory_.GetWeakPtr(), + callback)); + remote_interfaces->GetInterface(interface_name, std::move(interface_pipe)); + // TODO(beng): Rather than just forwarding thru to InterfaceProvider, do + // manifest policy intersection here. + } + void ConnectImpl(const service_manager::Identity& in_target, mojom::InterfaceProviderRequest remote_interfaces, mojom::ServicePtr service, @@ -452,6 +471,11 @@ void EmptyConnectCallback(mojom::ConnectResult result, const std::string& user_id) {} + void BindCallbackWrapper(const BindInterfaceCallback& wrapped, + mojom::ConnectResult result, + const std::string& user_id) { + wrapped.Run(result, user_id); + } service_manager::ServiceManager* const service_manager_; @@ -636,7 +660,7 @@ return iter->second.get(); mojom::ResolverPtr resolver_ptr; - ConnectToInterface(this, identity, CreateCatalogIdentity(), &resolver_ptr); + BindInterface(this, identity, CreateCatalogIdentity(), &resolver_ptr); mojom::Resolver* resolver = resolver_ptr.get(); identity_to_resolver_[identity] = std::move(resolver_ptr); return resolver; @@ -814,8 +838,7 @@ Identity source_identity(service_manager::mojom::kServiceName, mojom::kInheritUserID); mojom::ServiceFactoryPtr factory; - ConnectToInterface(this, source_identity, service_factory_identity, - &factory); + BindInterface(this, source_identity, service_factory_identity, &factory); mojom::ServiceFactory* factory_interface = factory.get(); factory.set_connection_error_handler( base::Bind(&service_manager::ServiceManager::OnServiceFactoryLost,
diff --git a/services/service_manager/standalone/context.cc b/services/service_manager/standalone/context.cc index f8f604f..4ab116c 100644 --- a/services/service_manager/standalone/context.cc +++ b/services/service_manager/standalone/context.cc
@@ -201,22 +201,22 @@ Identity source_identity = CreateServiceManagerIdentity(); Identity tracing_identity(tracing::mojom::kServiceName, mojom::kRootUserID); tracing::mojom::FactoryPtr factory; - ConnectToInterface(service_manager(), source_identity, tracing_identity, - &factory); + BindInterface(service_manager(), source_identity, tracing_identity, + &factory); provider_.InitializeWithFactory(&factory); if (command_line.HasSwitch(tracing::kTraceStartup)) { tracing::mojom::CollectorPtr coordinator; - ConnectToInterface(service_manager(), source_identity, tracing_identity, - &coordinator); + BindInterface(service_manager(), source_identity, tracing_identity, + &coordinator); tracer_.StartCollectingFromTracingService(std::move(coordinator)); } // Record the service manager startup metrics used for performance testing. if (enable_stats_collection_bindings) { tracing::mojom::StartupPerformanceDataCollectorPtr collector; - ConnectToInterface(service_manager(), source_identity, tracing_identity, - &collector); + BindInterface(service_manager(), source_identity, tracing_identity, + &collector); #if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) // CurrentProcessInfo::CreationTime is only defined on some platforms. const base::Time creation_time = base::CurrentProcessInfo::CreationTime();
diff --git a/services/service_manager/tests/connect/connect_test_app.cc b/services/service_manager/tests/connect/connect_test_app.cc index 7e3c4e3..ad0a26e6 100644 --- a/services/service_manager/tests/connect/connect_test_app.cc +++ b/services/service_manager/tests/connect/connect_test_app.cc
@@ -76,7 +76,7 @@ state->initialize_local_name = context()->identity().name(); state->initialize_userid = context()->identity().user_id(); - context()->connector()->ConnectToInterface(remote_info.identity, &caller_); + context()->connector()->BindInterface(remote_info.identity, &caller_); caller_->ConnectionAccepted(std::move(state)); return true;
diff --git a/services/service_manager/tests/connect/connect_test_package.cc b/services/service_manager/tests/connect/connect_test_package.cc index 6c142da8..596774e1 100644 --- a/services/service_manager/tests/connect/connect_test_package.cc +++ b/services/service_manager/tests/connect/connect_test_package.cc
@@ -74,7 +74,7 @@ state->initialize_local_name = context()->identity().name(); state->initialize_userid = context()->identity().user_id(); - context()->connector()->ConnectToInterface(remote_info.identity, &caller_); + context()->connector()->BindInterface(remote_info.identity, &caller_); caller_->ConnectionAccepted(std::move(state)); return true;
diff --git a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc index 1f383a9..1e2c9a1 100644 --- a/services/service_manager/tests/lifecycle/lifecycle_unittest.cc +++ b/services/service_manager/tests/lifecycle/lifecycle_unittest.cc
@@ -159,7 +159,7 @@ test::mojom::LifecycleControlPtr ConnectTo(const std::string& name) { test::mojom::LifecycleControlPtr lifecycle; - connector()->ConnectToInterface(name, &lifecycle); + connector()->BindInterface(name, &lifecycle); PingPong(lifecycle.get()); return lifecycle; } @@ -195,8 +195,8 @@ private: std::unique_ptr<InstanceState> TrackInstances() { mojom::ServiceManagerPtr service_manager; - connector()->ConnectToInterface(service_manager::mojom::kServiceName, - &service_manager); + connector()->BindInterface(service_manager::mojom::kServiceName, + &service_manager); mojom::ServiceManagerListenerPtr listener; base::RunLoop loop; InstanceState* state = new InstanceState(MakeRequest(&listener), &loop);
diff --git a/services/service_manager/tests/service_manager/service_manager_unittest.cc b/services/service_manager/tests/service_manager/service_manager_unittest.cc index 052ee6e..39a21eca 100644 --- a/services/service_manager/tests/service_manager/service_manager_unittest.cc +++ b/services/service_manager/tests/service_manager/service_manager_unittest.cc
@@ -105,8 +105,8 @@ void AddListenerAndWaitForApplications() { mojom::ServiceManagerPtr service_manager; - connector()->ConnectToInterface(service_manager::mojom::kServiceName, - &service_manager); + connector()->BindInterface(service_manager::mojom::kServiceName, + &service_manager); service_manager->AddListener(binding_.CreateInterfacePtrAndBind()); @@ -184,7 +184,8 @@ service_manager::Identity target("service_manager_unittest_target", service_manager::mojom::kInheritUserID); - connector()->Start(target, std::move(client), MakeRequest(&receiver)); + connector()->StartService(target, std::move(client), + MakeRequest(&receiver)); std::unique_ptr<service_manager::Connection> connection = connector()->Connect(target); connection->AddConnectionCompletedClosure(
diff --git a/services/service_manager/tests/service_manager/target.cc b/services/service_manager/tests/service_manager/target.cc index 02d12ec2..a381813 100644 --- a/services/service_manager/tests/service_manager/target.cc +++ b/services/service_manager/tests/service_manager/target.cc
@@ -27,8 +27,8 @@ // service_manager::Service: void OnStart() override { CreateInstanceTestPtr service; - context()->connector()->ConnectToInterface( - "service_manager_unittest", &service); + context()->connector()->BindInterface("service_manager_unittest", + &service); service->SetTargetIdentity(context()->identity()); }
diff --git a/services/service_manager/tests/shutdown/shutdown_client_app.cc b/services/service_manager/tests/shutdown/shutdown_client_app.cc index 6db1bd8..9dd6942 100644 --- a/services/service_manager/tests/shutdown/shutdown_client_app.cc +++ b/services/service_manager/tests/shutdown/shutdown_client_app.cc
@@ -42,8 +42,7 @@ // mojom::ShutdownTestClientController: void ConnectAndWait(const ConnectAndWaitCallback& callback) override { mojom::ShutdownTestServicePtr service; - context()->connector()->ConnectToInterface( - "shutdown_service", &service); + context()->connector()->BindInterface("shutdown_service", &service); mojo::Binding<mojom::ShutdownTestClient> client_binding(this);
diff --git a/services/service_manager/tests/shutdown/shutdown_unittest.cc b/services/service_manager/tests/shutdown/shutdown_unittest.cc index 780672c..d83ecc6 100644 --- a/services/service_manager/tests/shutdown/shutdown_unittest.cc +++ b/services/service_manager/tests/shutdown/shutdown_unittest.cc
@@ -26,11 +26,11 @@ // working as intended. mojom::ShutdownTestClientControllerPtr control; - connector()->ConnectToInterface("shutdown_client", &control); + connector()->BindInterface("shutdown_client", &control); // Connect to shutdown_service and immediately request that it shut down. mojom::ShutdownTestServicePtr service; - connector()->ConnectToInterface("shutdown_service", &service); + connector()->BindInterface("shutdown_service", &service); service->ShutDown(); // Tell shutdown_client to connect to an interface on shutdown_service and
diff --git a/services/service_manager/tests/util.cc b/services/service_manager/tests/util.cc index b15abd1..98bc47de 100644 --- a/services/service_manager/tests/util.cc +++ b/services/service_manager/tests/util.cc
@@ -74,7 +74,7 @@ std::move(pipe), 0u)); service_manager::mojom::PIDReceiverPtr receiver; - connector->Start(target, std::move(client), MakeRequest(&receiver)); + connector->StartService(target, std::move(client), MakeRequest(&receiver)); std::unique_ptr<service_manager::Connection> connection = connector->Connect(target); {
diff --git a/services/tracing/public/cpp/provider.cc b/services/tracing/public/cpp/provider.cc index 852f5d6..12e27bbb 100644 --- a/services/tracing/public/cpp/provider.cc +++ b/services/tracing/public/cpp/provider.cc
@@ -76,7 +76,7 @@ g_tracing_singleton_created = true; } mojom::FactoryPtr factory; - connector->ConnectToInterface(tracing::mojom::kServiceName, &factory); + connector->BindInterface(tracing::mojom::kServiceName, &factory); InitializeWithFactoryInternal(&factory); // This will only set the name for the first app in a loaded mojo file. It's // up to something like CoreServices to name its own child threads.
diff --git a/services/ui/clipboard/clipboard_unittest.cc b/services/ui/clipboard/clipboard_unittest.cc index 542c59a3..676c5858de 100644 --- a/services/ui/clipboard/clipboard_unittest.cc +++ b/services/ui/clipboard/clipboard_unittest.cc
@@ -36,7 +36,7 @@ void SetUp() override { ServiceTest::SetUp(); - connector()->ConnectToInterface(ui::mojom::kServiceName, &clipboard_); + connector()->BindInterface(ui::mojom::kServiceName, &clipboard_); ASSERT_TRUE(clipboard_); }
diff --git a/services/ui/demo/mus_demo_unittests.cc b/services/ui/demo/mus_demo_unittests.cc index 6f05aeda6..9fdb810 100644 --- a/services/ui/demo/mus_demo_unittests.cc +++ b/services/ui/demo/mus_demo_unittests.cc
@@ -43,7 +43,7 @@ connector()->Connect("mus_demo"); ::ui::mojom::WindowServerTestPtr test_interface; - connector()->ConnectToInterface(ui::mojom::kServiceName, &test_interface); + connector()->BindInterface(ui::mojom::kServiceName, &test_interface); base::RunLoop run_loop; bool success = false;
diff --git a/services/ui/ime/ime_server_impl.cc b/services/ui/ime/ime_server_impl.cc index 9cae996..0731d02 100644 --- a/services/ui/ime/ime_server_impl.cc +++ b/services/ui/ime/ime_server_impl.cc
@@ -17,7 +17,7 @@ void IMEServerImpl::Init(service_manager::Connector* connector, bool is_test_config) { connector_ = connector; - connector_->ConnectToInterface(catalog::mojom::kServiceName, &catalog_); + connector_->BindInterface(catalog::mojom::kServiceName, &catalog_); // TODO(moshayedi): crbug.com/664264. The catalog service should provide // different set of entries for test and non-test. Once that is implemented, // we won't need this check here.
diff --git a/services/ui/ime/ime_unittest.cc b/services/ui/ime/ime_unittest.cc index 79d6c34b..121cdc1 100644 --- a/services/ui/ime/ime_unittest.cc +++ b/services/ui/ime/ime_unittest.cc
@@ -57,7 +57,7 @@ ServiceTest::SetUp(); // test_ime_driver will register itself as the current IMEDriver. connector()->Connect("test_ime_driver"); - connector()->ConnectToInterface(ui::mojom::kServiceName, &ime_server_); + connector()->BindInterface(ui::mojom::kServiceName, &ime_server_); } bool ProcessKeyEvent(ui::mojom::InputMethodPtr* input_method,
diff --git a/services/ui/ime/test_ime_driver/test_ime_application.cc b/services/ui/ime/test_ime_driver/test_ime_application.cc index 1357dfd..6804ee4 100644 --- a/services/ui/ime/test_ime_driver/test_ime_application.cc +++ b/services/ui/ime/test_ime_driver/test_ime_application.cc
@@ -25,8 +25,8 @@ MakeRequest(&ime_driver_ptr)); ui::mojom::IMERegistrarPtr ime_registrar; - context()->connector()->ConnectToInterface(ui::mojom::kServiceName, - &ime_registrar); + context()->connector()->BindInterface(ui::mojom::kServiceName, + &ime_registrar); ime_registrar->RegisterDriver(std::move(ime_driver_ptr)); }
diff --git a/services/ui/public/cpp/gpu/gpu.cc b/services/ui/public/cpp/gpu/gpu.cc index d2adfda..06238988 100644 --- a/services/ui/public/cpp/gpu/gpu.cc +++ b/services/ui/public/cpp/gpu/gpu.cc
@@ -30,7 +30,7 @@ DCHECK(connector_ || interface_provider_); mojom::GpuPtr gpu_ptr; if (connector_) - connector_->ConnectToInterface(ui::mojom::kServiceName, &gpu_ptr); + connector_->BindInterface(ui::mojom::kServiceName, &gpu_ptr); else interface_provider_->GetInterface(&gpu_ptr); gpu_memory_buffer_manager_ = @@ -101,7 +101,7 @@ return; if (connector_) - connector_->ConnectToInterface(ui::mojom::kServiceName, &gpu_); + connector_->BindInterface(ui::mojom::kServiceName, &gpu_); else interface_provider_->GetInterface(&gpu_); gpu_->EstablishGpuChannel( @@ -117,7 +117,7 @@ mojo::ScopedMessagePipeHandle channel_handle; gpu::GPUInfo gpu_info; if (connector_) - connector_->ConnectToInterface(ui::mojom::kServiceName, &gpu_); + connector_->BindInterface(ui::mojom::kServiceName, &gpu_); else interface_provider_->GetInterface(&gpu_);
diff --git a/services/ui/public/cpp/window_tree_client.cc b/services/ui/public/cpp/window_tree_client.cc index b8478673..e0dbb982 100644 --- a/services/ui/public/cpp/window_tree_client.cc +++ b/services/ui/public/cpp/window_tree_client.cc
@@ -151,7 +151,7 @@ client_id_ = 101; mojom::WindowTreeFactoryPtr factory; - connector->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector->BindInterface(ui::mojom::kServiceName, &factory); mojom::WindowTreePtr window_tree; factory->CreateWindowTree(MakeRequest(&window_tree), binding_.CreateInterfacePtrAndBind()); @@ -163,7 +163,7 @@ DCHECK(window_manager_delegate_); mojom::WindowManagerWindowTreeFactoryPtr factory; - connector->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector->BindInterface(ui::mojom::kServiceName, &factory); mojom::WindowTreePtr window_tree; factory->CreateWindowTree(MakeRequest(&window_tree), binding_.CreateInterfacePtrAndBind());
diff --git a/services/ui/public/cpp/window_tree_host_factory.cc b/services/ui/public/cpp/window_tree_host_factory.cc index 0fb45fd5..c6ae6ff 100644 --- a/services/ui/public/cpp/window_tree_host_factory.cc +++ b/services/ui/public/cpp/window_tree_host_factory.cc
@@ -31,7 +31,7 @@ mojom::WindowTreeHostPtr* host, WindowManagerDelegate* window_manager_delegate) { mojom::WindowTreeHostFactoryPtr factory; - connector->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector->BindInterface(ui::mojom::kServiceName, &factory); return CreateWindowTreeHost(factory.get(), delegate, host, window_manager_delegate); }
diff --git a/services/ui/service.cc b/services/ui/service.cc index 7139d26f..2e7f078a 100644 --- a/services/ui/service.cc +++ b/services/ui/service.cc
@@ -109,7 +109,7 @@ catalog::ResourceLoader loader; filesystem::mojom::DirectoryPtr directory; - connector->ConnectToInterface(catalog::mojom::kServiceName, &directory); + connector->BindInterface(catalog::mojom::kServiceName, &directory); CHECK(loader.OpenFiles(std::move(directory), resource_paths)); ui::RegisterPathProvider();
diff --git a/services/ui/ws/gpu_host.cc b/services/ui/ws/gpu_host.cc index ac2c22fa6..78304942 100644 --- a/services/ui/ws/gpu_host.cc +++ b/services/ui/ws/gpu_host.cc
@@ -104,7 +104,7 @@ main_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()), gpu_host_binding_(this) { // TODO(sad): Once GPU process is split, this would look like: - // connector->ConnectToInterface("gpu", &gpu_main_); + // connector->BindInterface("gpu", &gpu_main_); gpu_main_impl_ = base::MakeUnique<GpuMain>(MakeRequest(&gpu_main_)); gpu_main_impl_->OnStart(); gpu_main_->CreateGpuService(MakeRequest(&gpu_service_),
diff --git a/services/ui/ws/window_manager_client_unittest.cc b/services/ui/ws/window_manager_client_unittest.cc index 237a489..03cd375 100644 --- a/services/ui/ws/window_manager_client_unittest.cc +++ b/services/ui/ws/window_manager_client_unittest.cc
@@ -285,7 +285,7 @@ // WindowTreeClient. ui::mojom::WindowTreeClientPtr ConnectAndGetWindowServerClient() { ui::mojom::WindowTreeClientPtr client; - connector()->ConnectToInterface(test_name(), &client); + connector()->BindInterface(test_name(), &client); return client; }
diff --git a/services/ui/ws/window_tree_client_unittest.cc b/services/ui/ws/window_tree_client_unittest.cc index b051a4b..678d33e9 100644 --- a/services/ui/ws/window_tree_client_unittest.cc +++ b/services/ui/ws/window_tree_client_unittest.cc
@@ -69,7 +69,7 @@ base::RunLoop run_loop; { mojom::WindowTreeClientPtr client; - connector->ConnectToInterface(url, &client); + connector->BindInterface(url, &client); const uint32_t embed_flags = 0; tree->Embed(root_id, std::move(client), embed_flags, base::Bind(&EmbedCallbackImpl, &run_loop, &result)); @@ -651,7 +651,7 @@ WindowServerServiceTestBase::SetUp(); mojom::WindowTreeHostFactoryPtr factory; - connector()->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector()->BindInterface(ui::mojom::kServiceName, &factory); mojom::WindowTreeClientPtr tree_client_ptr; wt_client1_ = base::MakeUnique<TestWindowTreeClient>();
diff --git a/services/video_capture/test/service_test.cc b/services/video_capture/test/service_test.cc index 3276975..60f18ce 100644 --- a/services/video_capture/test/service_test.cc +++ b/services/video_capture/test/service_test.cc
@@ -13,7 +13,7 @@ void ServiceTest::SetUp() { service_manager::test::ServiceTest::SetUp(); - connector()->ConnectToInterface("video_capture", &service_); + connector()->BindInterface("video_capture", &service_); service_->ConnectToFakeDeviceFactory(mojo::MakeRequest(&factory_)); }
diff --git a/testing/buildbot/chromium.gpu.fyi.json b/testing/buildbot/chromium.gpu.fyi.json index dc5ad3a..a722ed8 100644 --- a/testing/buildbot/chromium.gpu.fyi.json +++ b/testing/buildbot/chromium.gpu.fyi.json
@@ -204,10 +204,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -605,10 +605,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -936,10 +936,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1293,10 +1293,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1619,10 +1619,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1945,10 +1945,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2294,10 +2294,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2648,10 +2648,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3015,10 +3015,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3408,10 +3408,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -3801,10 +3801,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4194,10 +4194,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -4647,10 +4647,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5066,10 +5066,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5472,10 +5472,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -5803,10 +5803,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6147,10 +6147,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6520,10 +6520,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -6887,10 +6887,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -7250,10 +7250,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -7636,10 +7636,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8070,10 +8070,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8467,10 +8467,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -8830,10 +8830,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -9911,10 +9911,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10348,10 +10348,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -10801,10 +10801,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11277,10 +11277,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -11740,10 +11740,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12154,10 +12154,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -12591,10 +12591,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13001,10 +13001,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13495,10 +13495,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -13948,10 +13948,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -14401,10 +14401,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -14972,10 +14972,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -15448,10 +15448,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -15888,10 +15888,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -16376,10 +16376,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true,
diff --git a/testing/buildbot/chromium.gpu.json b/testing/buildbot/chromium.gpu.json index 6a92e98..d9d5bee 100644 --- a/testing/buildbot/chromium.gpu.json +++ b/testing/buildbot/chromium.gpu.json
@@ -166,10 +166,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -464,10 +464,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -746,10 +746,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1044,10 +1044,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1333,10 +1333,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1644,10 +1644,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -1931,10 +1931,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true, @@ -2229,10 +2229,10 @@ "--test-machine-name", "${buildername}" ], - "isolate_name": "telemetry_gpu_test", + "isolate_name": "telemetry_gpu_integration_test", "name": "maps_pixel_test", "override_compile_targets": [ - "telemetry_gpu_test_run" + "telemetry_gpu_integration_test_run" ], "swarming": { "can_use_on_swarming_builders": true,
diff --git a/testing/buildbot/gn_isolate_map.pyl b/testing/buildbot/gn_isolate_map.pyl index 67280c5..c547174f 100644 --- a/testing/buildbot/gn_isolate_map.pyl +++ b/testing/buildbot/gn_isolate_map.pyl
@@ -795,14 +795,6 @@ "../../content/test/gpu/run_gpu_integration_test.py", ], }, - "telemetry_gpu_test": { - "label": "//chrome/test:telemetry_gpu_test", - "type": "script", - "script": "//testing/scripts/run_telemetry_benchmark_as_googletest.py", - "args": [ - "../../content/test/gpu/run_gpu_test.py", - ], - }, "telemetry_gpu_unittests": { "label": "//chrome/test:telemetry_gpu_unittests", "type": "script",
diff --git a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py index 7698f78d..4fa0677 100755 --- a/third_party/WebKit/Source/build/scripts/make_computed_style_base.py +++ b/third_party/WebKit/Source/build/scripts/make_computed_style_base.py
@@ -83,7 +83,7 @@ if property['keyword_only'] and property['field_storage_type'] is None: enum_name = property['type_name'] # From the Blink style guide: Enum members should use InterCaps with an initial capital letter. [names-enum-members] - enum_values = [camel_case(k) for k in property['keywords']] + enum_values = [('k' + camel_case(k)) for k in property['keywords']] self._computed_enums[enum_name] = enum_values # A list of all the fields to be generated. @@ -114,7 +114,7 @@ assert property['initial_keyword'] is not None, \ ('MakeComputedStyleBase requires an initial keyword for keyword_only values, none specified ' 'for property ' + property['name']) - default_value = type_name + '::' + camel_case(property['initial_keyword']) + default_value = type_name + '::k' + camel_case(property['initial_keyword']) # If the property is independent, add the single-bit sized isInherited flag # to the list of Fields as well.
diff --git a/third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp index 8f7fb6dd3c..54cb2e98 100644 --- a/third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp +++ b/third_party/WebKit/Source/core/animation/CSSVisibilityInterpolationType.cpp
@@ -30,8 +30,8 @@ return m_start; if (fraction >= 1) return m_end; - if (m_start == EVisibility::Visible || m_end == EVisibility::Visible) - return EVisibility::Visible; + if (m_start == EVisibility::kVisible || m_end == EVisibility::kVisible) + return EVisibility::kVisible; return fraction < 0.5 ? m_start : m_end; } @@ -118,7 +118,7 @@ InterpolationValue CSSVisibilityInterpolationType::maybeConvertInitial( const StyleResolverState&, ConversionCheckers&) const { - return createVisibilityValue(EVisibility::Visible); + return createVisibilityValue(EVisibility::kVisible); } InterpolationValue CSSVisibilityInterpolationType::maybeConvertInherit(
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp index 493dd50..7e249d24 100644 --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelper.cpp
@@ -147,14 +147,14 @@ void PrintTo(const AnimatableVisibility& animVisibility, ::std::ostream* os) { *os << "AnimatableVisibility("; switch (animVisibility.visibility()) { - case EVisibility::Visible: - *os << "EVisibility::Visible"; + case EVisibility::kVisible: + *os << "EVisibility::kVisible"; break; - case EVisibility::Hidden: - *os << "EVisibility::Hidden"; + case EVisibility::kHidden: + *os << "EVisibility::kHidden"; break; - case EVisibility::Collapse: - *os << "EVisibility::Collapse"; + case EVisibility::kCollapse: + *os << "EVisibility::kCollapse"; break; default: *os << "Unknown Visibility - update switch in "
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp index 8f46c5d..9f77d710 100644 --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableValueTestHelperTest.cpp
@@ -76,8 +76,8 @@ PrintToString(AnimatableUnknown::create( CSSIdentifierValue::create(CSSValueNone)))); - EXPECT_EQ(::std::string("AnimatableVisibility(EVisibility::Visible)"), - PrintToString(AnimatableVisibility::create(EVisibility::Visible))); + EXPECT_EQ(::std::string("AnimatableVisibility(EVisibility::kVisible)"), + PrintToString(AnimatableVisibility::create(EVisibility::kVisible))); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.cpp b/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.cpp index 577dc1b..0f7f049f 100644 --- a/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.cpp +++ b/third_party/WebKit/Source/core/animation/animatable/AnimatableVisibility.cpp
@@ -36,7 +36,7 @@ const AnimatableValue* value) const { EVisibility from = m_visibility; EVisibility to = toAnimatableVisibility(value)->m_visibility; - return from != EVisibility::Visible && to != EVisibility::Visible; + return from != EVisibility::kVisible && to != EVisibility::kVisible; } PassRefPtr<AnimatableValue> AnimatableVisibility::interpolateTo( @@ -44,13 +44,13 @@ double fraction) const { EVisibility from = m_visibility; EVisibility to = toAnimatableVisibility(value)->m_visibility; - if (from != EVisibility::Visible && to != EVisibility::Visible) + if (from != EVisibility::kVisible && to != EVisibility::kVisible) return defaultInterpolateTo(this, value, fraction); if (fraction <= 0) return takeConstRef(this); if (fraction >= 1) return takeConstRef(value); - return takeConstRef(from == EVisibility::Visible ? this : value); + return takeConstRef(from == EVisibility::kVisible ? this : value); } bool AnimatableVisibility::equalTo(const AnimatableValue* value) const {
diff --git a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h index 75086fd..fffe65f 100644 --- a/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h +++ b/third_party/WebKit/Source/core/css/CSSPrimitiveValueMappings.h
@@ -198,10 +198,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(EPrintColorAdjust value) : CSSValue(IdentifierClass) { switch (value) { - case EPrintColorAdjust::Exact: + case EPrintColorAdjust::kExact: m_valueID = CSSValueExact; break; - case EPrintColorAdjust::Economy: + case EPrintColorAdjust::kEconomy: m_valueID = CSSValueEconomy; break; } @@ -211,15 +211,15 @@ inline EPrintColorAdjust CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueEconomy: - return EPrintColorAdjust::Economy; + return EPrintColorAdjust::kEconomy; case CSSValueExact: - return EPrintColorAdjust::Exact; + return EPrintColorAdjust::kExact; default: break; } ASSERT_NOT_REACHED(); - return EPrintColorAdjust::Economy; + return EPrintColorAdjust::kEconomy; } template <> @@ -840,10 +840,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(EBoxDirection e) : CSSValue(IdentifierClass) { switch (e) { - case EBoxDirection::Normal: + case EBoxDirection::kNormal: m_valueID = CSSValueNormal; break; - case EBoxDirection::Reverse: + case EBoxDirection::kReverse: m_valueID = CSSValueReverse; break; } @@ -853,15 +853,15 @@ inline EBoxDirection CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueNormal: - return EBoxDirection::Normal; + return EBoxDirection::kNormal; case CSSValueReverse: - return EBoxDirection::Reverse; + return EBoxDirection::kReverse; default: break; } ASSERT_NOT_REACHED(); - return EBoxDirection::Normal; + return EBoxDirection::kNormal; } template <> @@ -926,16 +926,16 @@ inline CSSIdentifierValue::CSSIdentifierValue(ECaptionSide e) : CSSValue(IdentifierClass) { switch (e) { - case ECaptionSide::Left: + case ECaptionSide::kLeft: m_valueID = CSSValueLeft; break; - case ECaptionSide::Right: + case ECaptionSide::kRight: m_valueID = CSSValueRight; break; - case ECaptionSide::Top: + case ECaptionSide::kTop: m_valueID = CSSValueTop; break; - case ECaptionSide::Bottom: + case ECaptionSide::kBottom: m_valueID = CSSValueBottom; break; } @@ -945,19 +945,19 @@ inline ECaptionSide CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueLeft: - return ECaptionSide::Left; + return ECaptionSide::kLeft; case CSSValueRight: - return ECaptionSide::Right; + return ECaptionSide::kRight; case CSSValueTop: - return ECaptionSide::Top; + return ECaptionSide::kTop; case CSSValueBottom: - return ECaptionSide::Bottom; + return ECaptionSide::kBottom; default: break; } ASSERT_NOT_REACHED(); - return ECaptionSide::Top; + return ECaptionSide::kTop; } template <> @@ -1329,10 +1329,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(EEmptyCells e) : CSSValue(IdentifierClass) { switch (e) { - case EEmptyCells::Show: + case EEmptyCells::kShow: m_valueID = CSSValueShow; break; - case EEmptyCells::Hide: + case EEmptyCells::kHide: m_valueID = CSSValueHide; break; } @@ -1342,15 +1342,15 @@ inline EEmptyCells CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueShow: - return EEmptyCells::Show; + return EEmptyCells::kShow; case CSSValueHide: - return EEmptyCells::Hide; + return EEmptyCells::kHide; default: break; } ASSERT_NOT_REACHED(); - return EEmptyCells::Show; + return EEmptyCells::kShow; } template <> @@ -1428,13 +1428,13 @@ inline CSSIdentifierValue::CSSIdentifierValue(EFloat e) : CSSValue(IdentifierClass) { switch (e) { - case EFloat::None: + case EFloat::kNone: m_valueID = CSSValueNone; break; - case EFloat::Left: + case EFloat::kLeft: m_valueID = CSSValueLeft; break; - case EFloat::Right: + case EFloat::kRight: m_valueID = CSSValueRight; break; } @@ -1444,17 +1444,17 @@ inline EFloat CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueLeft: - return EFloat::Left; + return EFloat::kLeft; case CSSValueRight: - return EFloat::Right; + return EFloat::kRight; case CSSValueNone: - return EFloat::None; + return EFloat::kNone; default: break; } ASSERT_NOT_REACHED(); - return EFloat::None; + return EFloat::kNone; } template <> @@ -1537,10 +1537,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(EListStylePosition e) : CSSValue(IdentifierClass) { switch (e) { - case EListStylePosition::Outside: + case EListStylePosition::kOutside: m_valueID = CSSValueOutside; break; - case EListStylePosition::Inside: + case EListStylePosition::kInside: m_valueID = CSSValueInside; break; } @@ -1550,187 +1550,187 @@ inline EListStylePosition CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueOutside: - return EListStylePosition::Outside; + return EListStylePosition::kOutside; case CSSValueInside: - return EListStylePosition::Inside; + return EListStylePosition::kInside; default: break; } ASSERT_NOT_REACHED(); - return EListStylePosition::Outside; + return EListStylePosition::kOutside; } template <> inline CSSIdentifierValue::CSSIdentifierValue(EListStyleType e) : CSSValue(IdentifierClass) { switch (e) { - case EListStyleType::ArabicIndic: + case EListStyleType::kArabicIndic: m_valueID = CSSValueArabicIndic; break; - case EListStyleType::Armenian: + case EListStyleType::kArmenian: m_valueID = CSSValueArmenian; break; - case EListStyleType::Bengali: + case EListStyleType::kBengali: m_valueID = CSSValueBengali; break; - case EListStyleType::Cambodian: + case EListStyleType::kCambodian: m_valueID = CSSValueCambodian; break; - case EListStyleType::Circle: + case EListStyleType::kCircle: m_valueID = CSSValueCircle; break; - case EListStyleType::CjkEarthlyBranch: + case EListStyleType::kCjkEarthlyBranch: m_valueID = CSSValueCjkEarthlyBranch; break; - case EListStyleType::CjkHeavenlyStem: + case EListStyleType::kCjkHeavenlyStem: m_valueID = CSSValueCjkHeavenlyStem; break; - case EListStyleType::CjkIdeographic: + case EListStyleType::kCjkIdeographic: m_valueID = CSSValueCjkIdeographic; break; - case EListStyleType::DecimalLeadingZero: + case EListStyleType::kDecimalLeadingZero: m_valueID = CSSValueDecimalLeadingZero; break; - case EListStyleType::Decimal: + case EListStyleType::kDecimal: m_valueID = CSSValueDecimal; break; - case EListStyleType::Devanagari: + case EListStyleType::kDevanagari: m_valueID = CSSValueDevanagari; break; - case EListStyleType::Disc: + case EListStyleType::kDisc: m_valueID = CSSValueDisc; break; - case EListStyleType::EthiopicHalehame: + case EListStyleType::kEthiopicHalehame: m_valueID = CSSValueEthiopicHalehame; break; - case EListStyleType::EthiopicHalehameAm: + case EListStyleType::kEthiopicHalehameAm: m_valueID = CSSValueEthiopicHalehameAm; break; - case EListStyleType::EthiopicHalehameTiEt: + case EListStyleType::kEthiopicHalehameTiEt: m_valueID = CSSValueEthiopicHalehameTiEt; break; - case EListStyleType::EthiopicHalehameTiEr: + case EListStyleType::kEthiopicHalehameTiEr: m_valueID = CSSValueEthiopicHalehameTiEr; break; - case EListStyleType::Georgian: + case EListStyleType::kGeorgian: m_valueID = CSSValueGeorgian; break; - case EListStyleType::Gujarati: + case EListStyleType::kGujarati: m_valueID = CSSValueGujarati; break; - case EListStyleType::Gurmukhi: + case EListStyleType::kGurmukhi: m_valueID = CSSValueGurmukhi; break; - case EListStyleType::Hangul: + case EListStyleType::kHangul: m_valueID = CSSValueHangul; break; - case EListStyleType::HangulConsonant: + case EListStyleType::kHangulConsonant: m_valueID = CSSValueHangulConsonant; break; - case EListStyleType::KoreanHangulFormal: + case EListStyleType::kKoreanHangulFormal: m_valueID = CSSValueKoreanHangulFormal; break; - case EListStyleType::KoreanHanjaFormal: + case EListStyleType::kKoreanHanjaFormal: m_valueID = CSSValueKoreanHanjaFormal; break; - case EListStyleType::KoreanHanjaInformal: + case EListStyleType::kKoreanHanjaInformal: m_valueID = CSSValueKoreanHanjaInformal; break; - case EListStyleType::Hebrew: + case EListStyleType::kHebrew: m_valueID = CSSValueHebrew; break; - case EListStyleType::Hiragana: + case EListStyleType::kHiragana: m_valueID = CSSValueHiragana; break; - case EListStyleType::HiraganaIroha: + case EListStyleType::kHiraganaIroha: m_valueID = CSSValueHiraganaIroha; break; - case EListStyleType::Kannada: + case EListStyleType::kKannada: m_valueID = CSSValueKannada; break; - case EListStyleType::Katakana: + case EListStyleType::kKatakana: m_valueID = CSSValueKatakana; break; - case EListStyleType::KatakanaIroha: + case EListStyleType::kKatakanaIroha: m_valueID = CSSValueKatakanaIroha; break; - case EListStyleType::Khmer: + case EListStyleType::kKhmer: m_valueID = CSSValueKhmer; break; - case EListStyleType::Lao: + case EListStyleType::kLao: m_valueID = CSSValueLao; break; - case EListStyleType::LowerAlpha: + case EListStyleType::kLowerAlpha: m_valueID = CSSValueLowerAlpha; break; - case EListStyleType::LowerArmenian: + case EListStyleType::kLowerArmenian: m_valueID = CSSValueLowerArmenian; break; - case EListStyleType::LowerGreek: + case EListStyleType::kLowerGreek: m_valueID = CSSValueLowerGreek; break; - case EListStyleType::LowerLatin: + case EListStyleType::kLowerLatin: m_valueID = CSSValueLowerLatin; break; - case EListStyleType::LowerRoman: + case EListStyleType::kLowerRoman: m_valueID = CSSValueLowerRoman; break; - case EListStyleType::Malayalam: + case EListStyleType::kMalayalam: m_valueID = CSSValueMalayalam; break; - case EListStyleType::Mongolian: + case EListStyleType::kMongolian: m_valueID = CSSValueMongolian; break; - case EListStyleType::Myanmar: + case EListStyleType::kMyanmar: m_valueID = CSSValueMyanmar; break; - case EListStyleType::None: + case EListStyleType::kNone: m_valueID = CSSValueNone; break; - case EListStyleType::Oriya: + case EListStyleType::kOriya: m_valueID = CSSValueOriya; break; - case EListStyleType::Persian: + case EListStyleType::kPersian: m_valueID = CSSValuePersian; break; - case EListStyleType::SimpChineseFormal: + case EListStyleType::kSimpChineseFormal: m_valueID = CSSValueSimpChineseFormal; break; - case EListStyleType::SimpChineseInformal: + case EListStyleType::kSimpChineseInformal: m_valueID = CSSValueSimpChineseInformal; break; - case EListStyleType::Square: + case EListStyleType::kSquare: m_valueID = CSSValueSquare; break; - case EListStyleType::Telugu: + case EListStyleType::kTelugu: m_valueID = CSSValueTelugu; break; - case EListStyleType::Thai: + case EListStyleType::kThai: m_valueID = CSSValueThai; break; - case EListStyleType::Tibetan: + case EListStyleType::kTibetan: m_valueID = CSSValueTibetan; break; - case EListStyleType::TradChineseFormal: + case EListStyleType::kTradChineseFormal: m_valueID = CSSValueTradChineseFormal; break; - case EListStyleType::TradChineseInformal: + case EListStyleType::kTradChineseInformal: m_valueID = CSSValueTradChineseInformal; break; - case EListStyleType::UpperAlpha: + case EListStyleType::kUpperAlpha: m_valueID = CSSValueUpperAlpha; break; - case EListStyleType::UpperArmenian: + case EListStyleType::kUpperArmenian: m_valueID = CSSValueUpperArmenian; break; - case EListStyleType::UpperLatin: + case EListStyleType::kUpperLatin: m_valueID = CSSValueUpperLatin; break; - case EListStyleType::UpperRoman: + case EListStyleType::kUpperRoman: m_valueID = CSSValueUpperRoman; break; - case EListStyleType::Urdu: + case EListStyleType::kUrdu: m_valueID = CSSValueUrdu; break; } @@ -1740,123 +1740,123 @@ inline EListStyleType CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueNone: - return EListStyleType::None; + return EListStyleType::kNone; case CSSValueArabicIndic: - return EListStyleType::ArabicIndic; + return EListStyleType::kArabicIndic; case CSSValueArmenian: - return EListStyleType::Armenian; + return EListStyleType::kArmenian; case CSSValueBengali: - return EListStyleType::Bengali; + return EListStyleType::kBengali; case CSSValueCambodian: - return EListStyleType::Cambodian; + return EListStyleType::kCambodian; case CSSValueCircle: - return EListStyleType::Circle; + return EListStyleType::kCircle; case CSSValueCjkEarthlyBranch: - return EListStyleType::CjkEarthlyBranch; + return EListStyleType::kCjkEarthlyBranch; case CSSValueCjkHeavenlyStem: - return EListStyleType::CjkHeavenlyStem; + return EListStyleType::kCjkHeavenlyStem; case CSSValueCjkIdeographic: - return EListStyleType::CjkIdeographic; + return EListStyleType::kCjkIdeographic; case CSSValueDecimalLeadingZero: - return EListStyleType::DecimalLeadingZero; + return EListStyleType::kDecimalLeadingZero; case CSSValueDecimal: - return EListStyleType::Decimal; + return EListStyleType::kDecimal; case CSSValueDevanagari: - return EListStyleType::Devanagari; + return EListStyleType::kDevanagari; case CSSValueDisc: - return EListStyleType::Disc; + return EListStyleType::kDisc; case CSSValueEthiopicHalehame: - return EListStyleType::EthiopicHalehame; + return EListStyleType::kEthiopicHalehame; case CSSValueEthiopicHalehameAm: - return EListStyleType::EthiopicHalehameAm; + return EListStyleType::kEthiopicHalehameAm; case CSSValueEthiopicHalehameTiEt: - return EListStyleType::EthiopicHalehameTiEt; + return EListStyleType::kEthiopicHalehameTiEt; case CSSValueEthiopicHalehameTiEr: - return EListStyleType::EthiopicHalehameTiEr; + return EListStyleType::kEthiopicHalehameTiEr; case CSSValueGeorgian: - return EListStyleType::Georgian; + return EListStyleType::kGeorgian; case CSSValueGujarati: - return EListStyleType::Gujarati; + return EListStyleType::kGujarati; case CSSValueGurmukhi: - return EListStyleType::Gurmukhi; + return EListStyleType::kGurmukhi; case CSSValueHangul: - return EListStyleType::Hangul; + return EListStyleType::kHangul; case CSSValueHangulConsonant: - return EListStyleType::HangulConsonant; + return EListStyleType::kHangulConsonant; case CSSValueKoreanHangulFormal: - return EListStyleType::KoreanHangulFormal; + return EListStyleType::kKoreanHangulFormal; case CSSValueKoreanHanjaFormal: - return EListStyleType::KoreanHanjaFormal; + return EListStyleType::kKoreanHanjaFormal; case CSSValueKoreanHanjaInformal: - return EListStyleType::KoreanHanjaInformal; + return EListStyleType::kKoreanHanjaInformal; case CSSValueHebrew: - return EListStyleType::Hebrew; + return EListStyleType::kHebrew; case CSSValueHiragana: - return EListStyleType::Hiragana; + return EListStyleType::kHiragana; case CSSValueHiraganaIroha: - return EListStyleType::HiraganaIroha; + return EListStyleType::kHiraganaIroha; case CSSValueKannada: - return EListStyleType::Kannada; + return EListStyleType::kKannada; case CSSValueKatakana: - return EListStyleType::Katakana; + return EListStyleType::kKatakana; case CSSValueKatakanaIroha: - return EListStyleType::KatakanaIroha; + return EListStyleType::kKatakanaIroha; case CSSValueKhmer: - return EListStyleType::Khmer; + return EListStyleType::kKhmer; case CSSValueLao: - return EListStyleType::Lao; + return EListStyleType::kLao; case CSSValueLowerAlpha: - return EListStyleType::LowerAlpha; + return EListStyleType::kLowerAlpha; case CSSValueLowerArmenian: - return EListStyleType::LowerArmenian; + return EListStyleType::kLowerArmenian; case CSSValueLowerGreek: - return EListStyleType::LowerGreek; + return EListStyleType::kLowerGreek; case CSSValueLowerLatin: - return EListStyleType::LowerLatin; + return EListStyleType::kLowerLatin; case CSSValueLowerRoman: - return EListStyleType::LowerRoman; + return EListStyleType::kLowerRoman; case CSSValueMalayalam: - return EListStyleType::Malayalam; + return EListStyleType::kMalayalam; case CSSValueMongolian: - return EListStyleType::Mongolian; + return EListStyleType::kMongolian; case CSSValueMyanmar: - return EListStyleType::Myanmar; + return EListStyleType::kMyanmar; case CSSValueOriya: - return EListStyleType::Oriya; + return EListStyleType::kOriya; case CSSValuePersian: - return EListStyleType::Persian; + return EListStyleType::kPersian; case CSSValueSimpChineseFormal: - return EListStyleType::SimpChineseFormal; + return EListStyleType::kSimpChineseFormal; case CSSValueSimpChineseInformal: - return EListStyleType::SimpChineseInformal; + return EListStyleType::kSimpChineseInformal; case CSSValueSquare: - return EListStyleType::Square; + return EListStyleType::kSquare; case CSSValueTelugu: - return EListStyleType::Telugu; + return EListStyleType::kTelugu; case CSSValueThai: - return EListStyleType::Thai; + return EListStyleType::kThai; case CSSValueTibetan: - return EListStyleType::Tibetan; + return EListStyleType::kTibetan; case CSSValueTradChineseFormal: - return EListStyleType::TradChineseFormal; + return EListStyleType::kTradChineseFormal; case CSSValueTradChineseInformal: - return EListStyleType::TradChineseInformal; + return EListStyleType::kTradChineseInformal; case CSSValueUpperAlpha: - return EListStyleType::UpperAlpha; + return EListStyleType::kUpperAlpha; case CSSValueUpperArmenian: - return EListStyleType::UpperArmenian; + return EListStyleType::kUpperArmenian; case CSSValueUpperLatin: - return EListStyleType::UpperLatin; + return EListStyleType::kUpperLatin; case CSSValueUpperRoman: - return EListStyleType::UpperRoman; + return EListStyleType::kUpperRoman; case CSSValueUrdu: - return EListStyleType::Urdu; + return EListStyleType::kUrdu; default: break; } NOTREACHED(); - return EListStyleType::None; + return EListStyleType::kNone; } template <> @@ -2134,31 +2134,31 @@ inline CSSIdentifierValue::CSSIdentifierValue(ETextAlign e) : CSSValue(IdentifierClass) { switch (e) { - case ETextAlign::Start: + case ETextAlign::kStart: m_valueID = CSSValueStart; break; - case ETextAlign::End: + case ETextAlign::kEnd: m_valueID = CSSValueEnd; break; - case ETextAlign::Left: + case ETextAlign::kLeft: m_valueID = CSSValueLeft; break; - case ETextAlign::Right: + case ETextAlign::kRight: m_valueID = CSSValueRight; break; - case ETextAlign::Center: + case ETextAlign::kCenter: m_valueID = CSSValueCenter; break; - case ETextAlign::Justify: + case ETextAlign::kJustify: m_valueID = CSSValueJustify; break; - case ETextAlign::WebkitLeft: + case ETextAlign::kWebkitLeft: m_valueID = CSSValueWebkitLeft; break; - case ETextAlign::WebkitRight: + case ETextAlign::kWebkitRight: m_valueID = CSSValueWebkitRight; break; - case ETextAlign::WebkitCenter: + case ETextAlign::kWebkitCenter: m_valueID = CSSValueWebkitCenter; break; } @@ -2169,27 +2169,27 @@ switch (m_valueID) { case CSSValueWebkitAuto: // Legacy -webkit-auto. Eqiuvalent to start. case CSSValueStart: - return ETextAlign::Start; + return ETextAlign::kStart; case CSSValueEnd: - return ETextAlign::End; + return ETextAlign::kEnd; case CSSValueCenter: case CSSValueInternalCenter: - return ETextAlign::Center; + return ETextAlign::kCenter; case CSSValueLeft: - return ETextAlign::Left; + return ETextAlign::kLeft; case CSSValueRight: - return ETextAlign::Right; + return ETextAlign::kRight; case CSSValueJustify: - return ETextAlign::Justify; + return ETextAlign::kJustify; case CSSValueWebkitLeft: - return ETextAlign::WebkitLeft; + return ETextAlign::kWebkitLeft; case CSSValueWebkitRight: - return ETextAlign::WebkitRight; + return ETextAlign::kWebkitRight; case CSSValueWebkitCenter: - return ETextAlign::WebkitCenter; + return ETextAlign::kWebkitCenter; default: NOTREACHED(); - return ETextAlign::Left; + return ETextAlign::kLeft; } } @@ -2415,16 +2415,16 @@ inline CSSIdentifierValue::CSSIdentifierValue(ETextTransform e) : CSSValue(IdentifierClass) { switch (e) { - case ETextTransform::Capitalize: + case ETextTransform::kCapitalize: m_valueID = CSSValueCapitalize; break; - case ETextTransform::Uppercase: + case ETextTransform::kUppercase: m_valueID = CSSValueUppercase; break; - case ETextTransform::Lowercase: + case ETextTransform::kLowercase: m_valueID = CSSValueLowercase; break; - case ETextTransform::None: + case ETextTransform::kNone: m_valueID = CSSValueNone; break; } @@ -2434,19 +2434,19 @@ inline ETextTransform CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueCapitalize: - return ETextTransform::Capitalize; + return ETextTransform::kCapitalize; case CSSValueUppercase: - return ETextTransform::Uppercase; + return ETextTransform::kUppercase; case CSSValueLowercase: - return ETextTransform::Lowercase; + return ETextTransform::kLowercase; case CSSValueNone: - return ETextTransform::None; + return ETextTransform::kNone; default: break; } ASSERT_NOT_REACHED(); - return ETextTransform::None; + return ETextTransform::kNone; } template <> @@ -2672,13 +2672,13 @@ inline CSSIdentifierValue::CSSIdentifierValue(EVisibility e) : CSSValue(IdentifierClass) { switch (e) { - case EVisibility::Visible: + case EVisibility::kVisible: m_valueID = CSSValueVisible; break; - case EVisibility::Hidden: + case EVisibility::kHidden: m_valueID = CSSValueHidden; break; - case EVisibility::Collapse: + case EVisibility::kCollapse: m_valueID = CSSValueCollapse; break; } @@ -2688,39 +2688,39 @@ inline EVisibility CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueHidden: - return EVisibility::Hidden; + return EVisibility::kHidden; case CSSValueVisible: - return EVisibility::Visible; + return EVisibility::kVisible; case CSSValueCollapse: - return EVisibility::Collapse; + return EVisibility::kCollapse; default: break; } ASSERT_NOT_REACHED(); - return EVisibility::Visible; + return EVisibility::kVisible; } template <> inline CSSIdentifierValue::CSSIdentifierValue(EWhiteSpace e) : CSSValue(IdentifierClass) { switch (e) { - case EWhiteSpace::Normal: + case EWhiteSpace::kNormal: m_valueID = CSSValueNormal; break; - case EWhiteSpace::Pre: + case EWhiteSpace::kPre: m_valueID = CSSValuePre; break; - case EWhiteSpace::PreWrap: + case EWhiteSpace::kPreWrap: m_valueID = CSSValuePreWrap; break; - case EWhiteSpace::PreLine: + case EWhiteSpace::kPreLine: m_valueID = CSSValuePreLine; break; - case EWhiteSpace::Nowrap: + case EWhiteSpace::kNowrap: m_valueID = CSSValueNowrap; break; - case EWhiteSpace::WebkitNowrap: + case EWhiteSpace::kWebkitNowrap: m_valueID = CSSValueWebkitNowrap; break; } @@ -2730,23 +2730,23 @@ inline EWhiteSpace CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueWebkitNowrap: - return EWhiteSpace::WebkitNowrap; + return EWhiteSpace::kWebkitNowrap; case CSSValueNowrap: - return EWhiteSpace::Nowrap; + return EWhiteSpace::kNowrap; case CSSValuePre: - return EWhiteSpace::Pre; + return EWhiteSpace::kPre; case CSSValuePreWrap: - return EWhiteSpace::PreWrap; + return EWhiteSpace::kPreWrap; case CSSValuePreLine: - return EWhiteSpace::PreLine; + return EWhiteSpace::kPreLine; case CSSValueNormal: - return EWhiteSpace::Normal; + return EWhiteSpace::kNormal; default: break; } ASSERT_NOT_REACHED(); - return EWhiteSpace::Normal; + return EWhiteSpace::kNormal; } template <> @@ -2852,10 +2852,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(TextDirection e) : CSSValue(IdentifierClass) { switch (e) { - case TextDirection::Ltr: + case TextDirection::kLtr: m_valueID = CSSValueLtr; break; - case TextDirection::Rtl: + case TextDirection::kRtl: m_valueID = CSSValueRtl; break; } @@ -2865,28 +2865,28 @@ inline TextDirection CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueLtr: - return TextDirection::Ltr; + return TextDirection::kLtr; case CSSValueRtl: - return TextDirection::Rtl; + return TextDirection::kRtl; default: break; } ASSERT_NOT_REACHED(); - return TextDirection::Ltr; + return TextDirection::kLtr; } template <> inline CSSIdentifierValue::CSSIdentifierValue(WritingMode e) : CSSValue(IdentifierClass) { switch (e) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: m_valueID = CSSValueHorizontalTb; break; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: m_valueID = CSSValueVerticalRl; break; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: m_valueID = CSSValueVerticalLr; break; } @@ -2900,19 +2900,19 @@ case CSSValueLrTb: case CSSValueRl: case CSSValueRlTb: - return WritingMode::HorizontalTb; + return WritingMode::kHorizontalTb; case CSSValueVerticalRl: case CSSValueTb: case CSSValueTbRl: - return WritingMode::VerticalRl; + return WritingMode::kVerticalRl; case CSSValueVerticalLr: - return WritingMode::VerticalLr; + return WritingMode::kVerticalLr; default: break; } ASSERT_NOT_REACHED(); - return WritingMode::HorizontalTb; + return WritingMode::kHorizontalTb; } template <> @@ -3146,37 +3146,37 @@ inline CSSIdentifierValue::CSSIdentifierValue(EPointerEvents e) : CSSValue(IdentifierClass) { switch (e) { - case EPointerEvents::None: + case EPointerEvents::kNone: m_valueID = CSSValueNone; break; - case EPointerEvents::Stroke: + case EPointerEvents::kStroke: m_valueID = CSSValueStroke; break; - case EPointerEvents::Fill: + case EPointerEvents::kFill: m_valueID = CSSValueFill; break; - case EPointerEvents::Painted: + case EPointerEvents::kPainted: m_valueID = CSSValuePainted; break; - case EPointerEvents::Visible: + case EPointerEvents::kVisible: m_valueID = CSSValueVisible; break; - case EPointerEvents::VisibleStroke: + case EPointerEvents::kVisibleStroke: m_valueID = CSSValueVisibleStroke; break; - case EPointerEvents::VisibleFill: + case EPointerEvents::kVisibleFill: m_valueID = CSSValueVisibleFill; break; - case EPointerEvents::VisiblePainted: + case EPointerEvents::kVisiblePainted: m_valueID = CSSValueVisiblePainted; break; - case EPointerEvents::Auto: + case EPointerEvents::kAuto: m_valueID = CSSValueAuto; break; - case EPointerEvents::All: + case EPointerEvents::kAll: m_valueID = CSSValueAll; break; - case EPointerEvents::BoundingBox: + case EPointerEvents::kBoundingBox: m_valueID = CSSValueBoundingBox; break; } @@ -3186,33 +3186,33 @@ inline EPointerEvents CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueAll: - return EPointerEvents::All; + return EPointerEvents::kAll; case CSSValueAuto: - return EPointerEvents::Auto; + return EPointerEvents::kAuto; case CSSValueNone: - return EPointerEvents::None; + return EPointerEvents::kNone; case CSSValueVisiblePainted: - return EPointerEvents::VisiblePainted; + return EPointerEvents::kVisiblePainted; case CSSValueVisibleFill: - return EPointerEvents::VisibleFill; + return EPointerEvents::kVisibleFill; case CSSValueVisibleStroke: - return EPointerEvents::VisibleStroke; + return EPointerEvents::kVisibleStroke; case CSSValueVisible: - return EPointerEvents::Visible; + return EPointerEvents::kVisible; case CSSValuePainted: - return EPointerEvents::Painted; + return EPointerEvents::kPainted; case CSSValueFill: - return EPointerEvents::Fill; + return EPointerEvents::kFill; case CSSValueStroke: - return EPointerEvents::Stroke; + return EPointerEvents::kStroke; case CSSValueBoundingBox: - return EPointerEvents::BoundingBox; + return EPointerEvents::kBoundingBox; default: break; } ASSERT_NOT_REACHED(); - return EPointerEvents::All; + return EPointerEvents::kAll; } template <> @@ -3911,10 +3911,10 @@ inline CSSIdentifierValue::CSSIdentifierValue(EBorderCollapse e) : CSSValue(IdentifierClass) { switch (e) { - case EBorderCollapse::Separate: + case EBorderCollapse::kSeparate: m_valueID = CSSValueSeparate; break; - case EBorderCollapse::Collapse: + case EBorderCollapse::kCollapse: m_valueID = CSSValueCollapse; break; } @@ -3924,15 +3924,15 @@ inline EBorderCollapse CSSIdentifierValue::convertTo() const { switch (m_valueID) { case CSSValueSeparate: - return EBorderCollapse::Separate; + return EBorderCollapse::kSeparate; case CSSValueCollapse: - return EBorderCollapse::Collapse; + return EBorderCollapse::kCollapse; default: break; } ASSERT_NOT_REACHED(); - return EBorderCollapse::Separate; + return EBorderCollapse::kSeparate; } template <>
diff --git a/third_party/WebKit/Source/core/css/CSSProperty.cpp b/third_party/WebKit/Source/core/css/CSSProperty.cpp index 54fb6514..b6740a8 100644 --- a/third_party/WebKit/Source/core/css/CSSProperty.cpp +++ b/third_party/WebKit/Source/core/css/CSSProperty.cpp
@@ -53,7 +53,7 @@ WritingMode writingMode, LogicalBoxSide logicalSide, const StylePropertyShorthand& shorthand) { - if (direction == TextDirection::Ltr) { + if (direction == TextDirection::kLtr) { if (isHorizontalWritingMode(writingMode)) { // The common case. The logical and physical box sides match. // Left = Start, Right = End, Before = Top, After = Bottom
diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp index b6bddae..7801d79 100644 --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp
@@ -1482,7 +1482,7 @@ CSSCustomIdentValue::create(counter->identifier()); CSSStringValue* separator = CSSStringValue::create(counter->separator()); CSSValueID listStyleIdent = CSSValueNone; - if (counter->listStyle() != EListStyleType::None) { + if (counter->listStyle() != EListStyleType::kNone) { // TODO(sashab): Change this to use a converter instead of // CSSPrimitiveValueMappings. listStyleIdent = @@ -2114,7 +2114,7 @@ return list; } case CSSPropertyBorderCollapse: - if (style.borderCollapse() == EBorderCollapse::Collapse) + if (style.borderCollapse() == EBorderCollapse::kCollapse) return CSSIdentifierValue::create(CSSValueCollapse); return CSSIdentifierValue::create(CSSValueSeparate); case CSSPropertyBorderSpacing: {
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp index 282d838..2f7cbde 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleAdjuster.cpp
@@ -138,12 +138,12 @@ if (style.userModify() != READ_WRITE_PLAINTEXT_ONLY) return; // Collapsing whitespace is harmful in plain-text editing. - if (style.whiteSpace() == EWhiteSpace::Normal) - style.setWhiteSpace(EWhiteSpace::PreWrap); - else if (style.whiteSpace() == EWhiteSpace::Nowrap) - style.setWhiteSpace(EWhiteSpace::Pre); - else if (style.whiteSpace() == EWhiteSpace::PreLine) - style.setWhiteSpace(EWhiteSpace::PreWrap); + if (style.whiteSpace() == EWhiteSpace::kNormal) + style.setWhiteSpace(EWhiteSpace::kPreWrap); + else if (style.whiteSpace() == EWhiteSpace::kNowrap) + style.setWhiteSpace(EWhiteSpace::kPre); + else if (style.whiteSpace() == EWhiteSpace::kPreLine) + style.setWhiteSpace(EWhiteSpace::kPreWrap); } static void adjustStyleForFirstLetter(ComputedStyle& style) { @@ -196,14 +196,14 @@ return; if (isHTMLTableCellElement(element)) { - if (style.whiteSpace() == EWhiteSpace::WebkitNowrap) { + if (style.whiteSpace() == EWhiteSpace::kWebkitNowrap) { // Figure out if we are really nowrapping or if we should just // use normal instead. If the width of the cell is fixed, then // we don't actually use NOWRAP. if (style.width().isFixed()) - style.setWhiteSpace(EWhiteSpace::Normal); + style.setWhiteSpace(EWhiteSpace::kNormal); else - style.setWhiteSpace(EWhiteSpace::Nowrap); + style.setWhiteSpace(EWhiteSpace::kNowrap); } return; } @@ -211,10 +211,10 @@ if (isHTMLTableElement(element)) { // Tables never support the -webkit-* values for text-align and will reset // back to the default. - if (style.textAlign() == ETextAlign::WebkitLeft || - style.textAlign() == ETextAlign::WebkitCenter || - style.textAlign() == ETextAlign::WebkitRight) - style.setTextAlign(ETextAlign::Start); + if (style.textAlign() == ETextAlign::kWebkitLeft || + style.textAlign() == ETextAlign::kWebkitCenter || + style.textAlign() == ETextAlign::kWebkitRight) + style.setTextAlign(ETextAlign::kStart); return; } @@ -239,7 +239,7 @@ // Ruby text does not support float or position. This might change with // evolution of the specification. style.setPosition(StaticPosition); - style.setFloating(EFloat::None); + style.setFloating(EFloat::kNone); return; } @@ -363,13 +363,13 @@ // FIXME: Since we don't support block-flow on flexible boxes yet, disallow // setting of block-flow to anything other than TopToBottomWritingMode. // https://bugs.webkit.org/show_bug.cgi?id=46418 - Flexible box support. - if (style.getWritingMode() != WritingMode::HorizontalTb && + if (style.getWritingMode() != WritingMode::kHorizontalTb && (style.display() == EDisplay::WebkitBox || style.display() == EDisplay::WebkitInlineBox)) - style.setWritingMode(WritingMode::HorizontalTb); + style.setWritingMode(WritingMode::kHorizontalTb); if (parentStyle.isDisplayFlexibleOrGridBox()) { - style.setFloating(EFloat::None); + style.setFloating(EFloat::kNone); style.setDisplay(equivalentBlockDisplay(style.display())); // We want to count vertical percentage paddings/margins on flex items
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp index af61d7d..2baa7e91 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -475,14 +475,14 @@ state.style()->setTextAlign(state.parentStyle()->textAlign()); else state.style()->setTextAlign(identValue.convertTo<ETextAlign>()); - } else if (state.parentStyle()->textAlign() == ETextAlign::Start) { + } else if (state.parentStyle()->textAlign() == ETextAlign::kStart) { state.style()->setTextAlign(state.parentStyle()->isLeftToRightDirection() - ? ETextAlign::Left - : ETextAlign::Right); - } else if (state.parentStyle()->textAlign() == ETextAlign::End) { + ? ETextAlign::kLeft + : ETextAlign::kRight); + } else if (state.parentStyle()->textAlign() == ETextAlign::kEnd) { state.style()->setTextAlign(state.parentStyle()->isLeftToRightDirection() - ? ETextAlign::Right - : ETextAlign::Left); + ? ETextAlign::kRight + : ETextAlign::kLeft); } else { state.style()->setTextAlign(state.parentStyle()->textAlign()); } @@ -758,7 +758,7 @@ ContentData::create(state.styleImage(CSSPropertyContent, *item)); } else if (item->isCounterValue()) { const CSSCounterValue* counterValue = toCSSCounterValue(item.get()); - EListStyleType listStyleType = EListStyleType::None; + EListStyleType listStyleType = EListStyleType::kNone; CSSValueID listStyleIdent = counterValue->listStyle(); if (listStyleIdent != CSSValueNone) listStyleType =
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp index 0fd4216e..81148bff 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolver.cpp
@@ -480,7 +480,7 @@ ->directionalityIfhasDirAutoAttribute(isAuto); if (isAuto) { state.setHasDirAutoAttribute(true); - collector.addElementStyleProperties(textDirection == TextDirection::Ltr + collector.addElementStyleProperties(textDirection == TextDirection::kLtr ? leftToRightDeclaration() : rightToLeftDeclaration()); }
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp index 15bb79a..f42226205 100644 --- a/third_party/WebKit/Source/core/dom/Document.cpp +++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -2265,7 +2265,7 @@ bool Document::isPageBoxVisible(int pageIndex) { return styleForPage(pageIndex)->visibility() != - EVisibility::Hidden; // display property doesn't apply to @page. + EVisibility::kHidden; // display property doesn't apply to @page. } void Document::pageSizeAndMarginsInPixels(int pageIndex,
diff --git a/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp b/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp index d66c171c..2989cc4 100644 --- a/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp +++ b/third_party/WebKit/Source/core/dom/DocumentStatisticsCollector.cpp
@@ -64,7 +64,7 @@ if (!style) return false; return (style->display() != EDisplay::None && - style->visibility() != EVisibility::Hidden && style->opacity() != 0); + style->visibility() != EVisibility::kHidden && style->opacity() != 0); } bool matchAttributes(const Element& element, const Vector<String>& words) {
diff --git a/third_party/WebKit/Source/core/dom/Element.cpp b/third_party/WebKit/Source/core/dom/Element.cpp index 52d40e4..846bc7e2 100644 --- a/third_party/WebKit/Source/core/dom/Element.cpp +++ b/third_party/WebKit/Source/core/dom/Element.cpp
@@ -239,14 +239,14 @@ DCHECK(canvas); return canvas->layoutObject() && canvas->layoutObject()->style()->visibility() == - EVisibility::Visible; + EVisibility::kVisible; } // FIXME: Even if we are not visible, we might have a child that is visible. // Hyatt wants to fix that some day with a "has visible content" flag or the // like. return layoutObject() && - layoutObject()->style()->visibility() == EVisibility::Visible; + layoutObject()->style()->visibility() == EVisibility::kVisible; } Node* Element::cloneNode(bool deep) {
diff --git a/third_party/WebKit/Source/core/dom/Text.cpp b/third_party/WebKit/Source/core/dom/Text.cpp index e6bae08..a105811 100644 --- a/third_party/WebKit/Source/core/dom/Text.cpp +++ b/third_party/WebKit/Source/core/dom/Text.cpp
@@ -273,7 +273,7 @@ return false; // pre-wrap in SVG never makes layoutObject. - if (style.whiteSpace() == EWhiteSpace::PreWrap && parent.isSVG()) + if (style.whiteSpace() == EWhiteSpace::kPreWrap && parent.isSVG()) return false; // pre/pre-wrap/pre-line always make layoutObjects.
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp index 3d52f33..cee6af42 100644 --- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp +++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -956,9 +956,10 @@ position.computeContainerNode()), CannotCrossEditingBoundary); if (!enclosingBlockElement) - return TextDirection::Ltr; + return TextDirection::kLtr; LayoutObject* layoutObject = enclosingBlockElement->layoutObject(); - return layoutObject ? layoutObject->style()->direction() : TextDirection::Ltr; + return layoutObject ? layoutObject->style()->direction() + : TextDirection::kLtr; } TextDirection directionOfEnclosingBlock(const Position& position) { @@ -971,7 +972,7 @@ } TextDirection primaryDirectionOf(const Node& node) { - TextDirection primaryDirection = TextDirection::Ltr; + TextDirection primaryDirection = TextDirection::kLtr; for (const LayoutObject* r = node.layoutObject(); r; r = r->parent()) { if (r->isLayoutBlockFlow()) { primaryDirection = r->style()->direction(); @@ -1593,7 +1594,7 @@ if (!layoutObject) return false; - return layoutObject->style()->visibility() == EVisibility::Visible; + return layoutObject->style()->visibility() == EVisibility::kVisible; } // return first preceding DOM position rendered at a different location, or
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp index 1e90530d..fe7cd07 100644 --- a/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp +++ b/third_party/WebKit/Source/core/editing/EditingUtilitiesTest.cpp
@@ -21,8 +21,8 @@ setShadowContent(shadowContent, "host"); Node* one = document().getElementById("one"); - EXPECT_EQ(TextDirection::Ltr, directionOfEnclosingBlock(Position(one, 0))); - EXPECT_EQ(TextDirection::Rtl, + EXPECT_EQ(TextDirection::kLtr, directionOfEnclosingBlock(Position(one, 0))); + EXPECT_EQ(TextDirection::kRtl, directionOfEnclosingBlock(PositionInFlatTree(one, 0))); }
diff --git a/third_party/WebKit/Source/core/editing/SelectionModifier.cpp b/third_party/WebKit/Source/core/editing/SelectionModifier.cpp index 325e9df..81fb057 100644 --- a/third_party/WebKit/Source/core/editing/SelectionModifier.cpp +++ b/third_party/WebKit/Source/core/editing/SelectionModifier.cpp
@@ -100,7 +100,7 @@ } else { switch (direction) { case DirectionRight: - if (directionOfSelection() == TextDirection::Ltr) + if (directionOfSelection() == TextDirection::kLtr) baseIsStart = true; else baseIsStart = false; @@ -109,7 +109,7 @@ baseIsStart = true; break; case DirectionLeft: - if (directionOfSelection() == TextDirection::Ltr) + if (directionOfSelection() == TextDirection::kLtr) baseIsStart = false; else baseIsStart = true; @@ -202,19 +202,19 @@ // block is RTL direction. switch (granularity) { case CharacterGranularity: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = nextPositionOf(pos, CanSkipOverEditingBoundary); else pos = previousPositionOf(pos, CanSkipOverEditingBoundary); break; case WordGranularity: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = nextWordPositionForPlatform(pos); else pos = previousWordPosition(pos); break; case LineBoundary: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = modifyExtendingForward(granularity); else pos = modifyExtendingBackward(granularity); @@ -230,7 +230,7 @@ break; } adjustPositionForUserSelectAll( - pos, directionOfEnclosingBlock() == TextDirection::Ltr); + pos, directionOfEnclosingBlock() == TextDirection::kLtr); return pos; } @@ -274,7 +274,7 @@ break; } adjustPositionForUserSelectAll( - pos, directionOfEnclosingBlock() == TextDirection::Ltr); + pos, directionOfEnclosingBlock() == TextDirection::kLtr); return pos; } @@ -284,7 +284,7 @@ switch (granularity) { case CharacterGranularity: if (m_selection.isRange()) { - if (directionOfSelection() == TextDirection::Ltr) + if (directionOfSelection() == TextDirection::kLtr) pos = createVisiblePosition(m_selection.end(), m_selection.affinity()); else @@ -390,19 +390,19 @@ // block is RTL direction. switch (granularity) { case CharacterGranularity: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = previousPositionOf(pos, CanSkipOverEditingBoundary); else pos = nextPositionOf(pos, CanSkipOverEditingBoundary); break; case WordGranularity: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = previousWordPosition(pos); else pos = nextWordPositionForPlatform(pos); break; case LineBoundary: - if (directionOfEnclosingBlock() == TextDirection::Ltr) + if (directionOfEnclosingBlock() == TextDirection::kLtr) pos = modifyExtendingBackward(granularity); else pos = modifyExtendingForward(granularity); @@ -417,7 +417,7 @@ break; } adjustPositionForUserSelectAll( - pos, !(directionOfEnclosingBlock() == TextDirection::Ltr)); + pos, !(directionOfEnclosingBlock() == TextDirection::kLtr)); return pos; } @@ -466,7 +466,7 @@ break; } adjustPositionForUserSelectAll( - pos, !(directionOfEnclosingBlock() == TextDirection::Ltr)); + pos, !(directionOfEnclosingBlock() == TextDirection::kLtr)); return pos; } @@ -476,7 +476,7 @@ switch (granularity) { case CharacterGranularity: if (m_selection.isRange()) { - if (directionOfSelection() == TextDirection::Ltr) + if (directionOfSelection() == TextDirection::kLtr) pos = createVisiblePosition(m_selection.start(), m_selection.affinity()); else @@ -685,9 +685,10 @@ } else { TextDirection textDirection = directionOfEnclosingBlock(); if (direction == DirectionForward || - (textDirection == TextDirection::Ltr && + (textDirection == TextDirection::kLtr && direction == DirectionRight) || - (textDirection == TextDirection::Rtl && direction == DirectionLeft)) + (textDirection == TextDirection::kRtl && + direction == DirectionLeft)) setSelectionEnd(&m_selection, position); else setSelectionStart(&m_selection, position);
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp index 57dbb38e..948c7dd 100644 --- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp +++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -707,8 +707,8 @@ bool isWordBreak; bool boxHasSameDirectionalityAsBlock = box->direction() == blockDirection; bool movingBackward = - (direction == MoveLeft && box->direction() == TextDirection::Ltr) || - (direction == MoveRight && box->direction() == TextDirection::Rtl); + (direction == MoveLeft && box->direction() == TextDirection::kLtr) || + (direction == MoveRight && box->direction() == TextDirection::kRtl); if ((skipsSpaceWhenMovingRight && boxHasSameDirectionalityAsBlock) || (!skipsSpaceWhenMovingRight && movingBackward)) { bool logicalStartInLayoutObject = @@ -745,7 +745,7 @@ isEditablePosition(visiblePosition.deepEquivalent())) { TextDirection blockDirection = directionOfEnclosingBlock(visiblePosition.deepEquivalent()); - leftWordBreak = blockDirection == TextDirection::Ltr + leftWordBreak = blockDirection == TextDirection::kLtr ? startOfEditableContent(visiblePosition) : endOfEditableContent(visiblePosition); } @@ -765,7 +765,7 @@ isEditablePosition(visiblePosition.deepEquivalent())) { TextDirection blockDirection = directionOfEnclosingBlock(visiblePosition.deepEquivalent()); - rightWordBreak = blockDirection == TextDirection::Ltr + rightWordBreak = blockDirection == TextDirection::kLtr ? endOfEditableContent(visiblePosition) : startOfEditableContent(visiblePosition); } @@ -1789,7 +1789,7 @@ continue; } const ComputedStyle& style = layoutItem.styleRef(); - if (style.visibility() != EVisibility::Visible) { + if (style.visibility() != EVisibility::kVisible) { prevousNodeIterator = Strategy::previousPostOrder(*prevousNodeIterator, startBlock); continue; @@ -1902,7 +1902,7 @@ continue; } const ComputedStyle& style = layoutObject->styleRef(); - if (style.visibility() != EVisibility::Visible) { + if (style.visibility() != EVisibility::kVisible) { nextNodeItreator = Strategy::next(*nextNodeItreator, startBlock); continue; } @@ -2213,15 +2213,15 @@ VisiblePosition leftBoundaryOfLine(const VisiblePosition& c, TextDirection direction) { DCHECK(c.isValid()) << c; - return direction == TextDirection::Ltr ? logicalStartOfLine(c) - : logicalEndOfLine(c); + return direction == TextDirection::kLtr ? logicalStartOfLine(c) + : logicalEndOfLine(c); } VisiblePosition rightBoundaryOfLine(const VisiblePosition& c, TextDirection direction) { DCHECK(c.isValid()) << c; - return direction == TextDirection::Ltr ? logicalEndOfLine(c) - : logicalStartOfLine(c); + return direction == TextDirection::kLtr ? logicalEndOfLine(c) + : logicalStartOfLine(c); } static bool isNonTextLeafChild(LayoutObject* object) { @@ -2828,7 +2828,7 @@ LayoutObject* layoutObject = associatedLayoutObjectOf(*currentNode, currentPos.offsetInLeafNode()); if (!layoutObject || - layoutObject->style()->visibility() != EVisibility::Visible) + layoutObject->style()->visibility() != EVisibility::kVisible) continue; if (rule == CanCrossEditingBoundary && boundaryCrossed) { @@ -2892,7 +2892,7 @@ ->layoutObject(); if (firstLetterLayoutObject && firstLetterLayoutObject->style()->visibility() == - EVisibility::Visible) + EVisibility::kVisible) return currentPos.computePosition(); } continue; @@ -3012,7 +3012,7 @@ LayoutObject* layoutObject = associatedLayoutObjectOf(*currentNode, currentPos.offsetInLeafNode()); if (!layoutObject || - layoutObject->style()->visibility() != EVisibility::Visible) + layoutObject->style()->visibility() != EVisibility::kVisible) continue; if (rule == CanCrossEditingBoundary && boundaryCrossed) { @@ -3149,7 +3149,7 @@ if (!layoutObject) return false; - if (layoutObject->style()->visibility() != EVisibility::Visible) + if (layoutObject->style()->visibility() != EVisibility::kVisible) return false; if (layoutObject->isBR()) { @@ -3335,7 +3335,7 @@ InlineBox* box = boxPosition.inlineBox; int offset = boxPosition.offsetInBox; if (!box) - return primaryDirection == TextDirection::Ltr + return primaryDirection == TextDirection::kLtr ? previousVisuallyDistinctCandidate(deepPosition) : nextVisuallyDistinctCandidate(deepPosition); @@ -3351,7 +3351,7 @@ if (!lineLayoutItem.node()) { box = box->prevLeafChild(); if (!box) - return primaryDirection == TextDirection::Ltr + return primaryDirection == TextDirection::kLtr ? previousVisuallyDistinctCandidate(deepPosition) : nextVisuallyDistinctCandidate(deepPosition); lineLayoutItem = box->getLineLayoutItem(); @@ -3375,7 +3375,7 @@ InlineBox* prevBox = box->prevLeafChildIgnoringLineBreak(); if (!prevBox) { PositionTemplate<Strategy> positionOnLeft = - primaryDirection == TextDirection::Ltr + primaryDirection == TextDirection::kLtr ? previousVisuallyDistinctCandidate( visiblePosition.deepEquivalent()) : nextVisuallyDistinctCandidate( @@ -3407,12 +3407,12 @@ if (box->direction() == primaryDirection) { if (!prevBox) { InlineBox* logicalStart = 0; - if (primaryDirection == TextDirection::Ltr + if (primaryDirection == TextDirection::kLtr ? box->root().getLogicalStartBoxWithNode(logicalStart) : box->root().getLogicalEndBoxWithNode(logicalStart)) { box = logicalStart; lineLayoutItem = box->getLineLayoutItem(); - offset = primaryDirection == TextDirection::Ltr + offset = primaryDirection == TextDirection::kLtr ? box->caretMinOffset() : box->caretMaxOffset(); } @@ -3476,8 +3476,9 @@ level = box->bidiLevel(); } lineLayoutItem = box->getLineLayoutItem(); - offset = primaryDirection == TextDirection::Ltr ? box->caretMinOffset() - : box->caretMaxOffset(); + offset = primaryDirection == TextDirection::kLtr + ? box->caretMinOffset() + : box->caretMaxOffset(); } break; } @@ -3507,7 +3508,7 @@ const VisiblePositionTemplate<Strategy> left = createVisiblePosition(pos); DCHECK_NE(left.deepEquivalent(), visiblePosition.deepEquivalent()); - return directionOfEnclosingBlock(left.deepEquivalent()) == TextDirection::Ltr + return directionOfEnclosingBlock(left.deepEquivalent()) == TextDirection::kLtr ? honorEditingBoundaryAtOrBefore(left, visiblePosition.deepEquivalent()) : honorEditingBoundaryAtOrAfter(left, @@ -3544,7 +3545,7 @@ InlineBox* box = boxPosition.inlineBox; int offset = boxPosition.offsetInBox; if (!box) - return primaryDirection == TextDirection::Ltr + return primaryDirection == TextDirection::kLtr ? nextVisuallyDistinctCandidate(deepPosition) : previousVisuallyDistinctCandidate(deepPosition); @@ -3561,7 +3562,7 @@ if (!layoutObject->node()) { box = box->nextLeafChild(); if (!box) - return primaryDirection == TextDirection::Ltr + return primaryDirection == TextDirection::kLtr ? nextVisuallyDistinctCandidate(deepPosition) : previousVisuallyDistinctCandidate(deepPosition); layoutObject = @@ -3586,7 +3587,7 @@ InlineBox* nextBox = box->nextLeafChildIgnoringLineBreak(); if (!nextBox) { PositionTemplate<Strategy> positionOnRight = - primaryDirection == TextDirection::Ltr + primaryDirection == TextDirection::kLtr ? nextVisuallyDistinctCandidate(deepPosition) : previousVisuallyDistinctCandidate(deepPosition); if (positionOnRight.isNull()) @@ -3618,13 +3619,13 @@ if (box->direction() == primaryDirection) { if (!nextBox) { InlineBox* logicalEnd = 0; - if (primaryDirection == TextDirection::Ltr + if (primaryDirection == TextDirection::kLtr ? box->root().getLogicalEndBoxWithNode(logicalEnd) : box->root().getLogicalStartBoxWithNode(logicalEnd)) { box = logicalEnd; layoutObject = LineLayoutAPIShim::layoutObjectFrom(box->getLineLayoutItem()); - offset = primaryDirection == TextDirection::Ltr + offset = primaryDirection == TextDirection::kLtr ? box->caretMaxOffset() : box->caretMinOffset(); } @@ -3695,8 +3696,9 @@ } layoutObject = LineLayoutAPIShim::layoutObjectFrom(box->getLineLayoutItem()); - offset = primaryDirection == TextDirection::Ltr ? box->caretMaxOffset() - : box->caretMinOffset(); + offset = primaryDirection == TextDirection::kLtr + ? box->caretMaxOffset() + : box->caretMinOffset(); } break; } @@ -3726,7 +3728,8 @@ const VisiblePositionTemplate<Strategy> right = createVisiblePosition(pos); DCHECK_NE(right.deepEquivalent(), visiblePosition.deepEquivalent()); - return directionOfEnclosingBlock(right.deepEquivalent()) == TextDirection::Ltr + return directionOfEnclosingBlock(right.deepEquivalent()) == + TextDirection::kLtr ? honorEditingBoundaryAtOrAfter(right, visiblePosition.deepEquivalent()) : honorEditingBoundaryAtOrBefore(right,
diff --git a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp index e85c1cec..32b953c7 100644 --- a/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp +++ b/third_party/WebKit/Source/core/editing/iterators/SimplifiedBackwardsTextIterator.cpp
@@ -162,12 +162,12 @@ if (layoutObject && layoutObject->isText() && m_node->getNodeType() == Node::kTextNode) { // FIXME: What about kCdataSectionNode? - if (layoutObject->style()->visibility() == EVisibility::Visible && + if (layoutObject->style()->visibility() == EVisibility::kVisible && m_offset > 0) m_handledNode = handleTextNode(); } else if (layoutObject && (layoutObject->isLayoutPart() || TextIterator::supportsAltText(m_node))) { - if (layoutObject->style()->visibility() == EVisibility::Visible && + if (layoutObject->style()->visibility() == EVisibility::kVisible && m_offset > 0) m_handledNode = handleReplacedElement(); } else {
diff --git a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp index e435441f..69bc785 100644 --- a/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp +++ b/third_party/WebKit/Source/core/editing/iterators/TextIterator.cpp
@@ -532,7 +532,7 @@ } static bool hasVisibleTextNode(LayoutText* layoutObject) { - if (layoutObject->style()->visibility() == EVisibility::Visible) + if (layoutObject->style()->visibility() == EVisibility::kVisible) return true; if (!layoutObject->isTextFragment()) @@ -547,7 +547,7 @@ fragment->firstLetterPseudoElement()->layoutObject(); return pseudoElementLayoutObject && pseudoElementLayoutObject->style()->visibility() == - EVisibility::Visible; + EVisibility::kVisible; } template <typename Strategy> @@ -592,7 +592,7 @@ return false; } } - if (layoutObject->style()->visibility() != EVisibility::Visible && + if (layoutObject->style()->visibility() != EVisibility::kVisible && !ignoresStyleVisibility()) return false; int strLength = str.length(); @@ -616,7 +616,7 @@ if (!layoutObject->firstTextBox() && str.length() > 0 && !shouldHandleFirstLetter) { - if (layoutObject->style()->visibility() != EVisibility::Visible && + if (layoutObject->style()->visibility() != EVisibility::kVisible && !ignoresStyleVisibility()) return false; m_lastTextNodeEndedWithCollapsedSpace = @@ -698,7 +698,7 @@ ? m_firstLetterText : toLayoutText(m_node->layoutObject()); - if (layoutObject->style()->visibility() != EVisibility::Visible && + if (layoutObject->style()->visibility() != EVisibility::kVisible && !ignoresStyleVisibility()) { m_textBox = nullptr; } else { @@ -767,7 +767,7 @@ if (str[runStart] == '\n') { // We need to preserve new lines in case of PreLine. // See bug crbug.com/317365. - if (layoutObject->style()->whiteSpace() == EWhiteSpace::PreLine) + if (layoutObject->style()->whiteSpace() == EWhiteSpace::kPreLine) spliceBuffer('\n', m_node, 0, runStart, runStart); else spliceBuffer(spaceCharacter, m_node, 0, runStart, runStart + 1); @@ -832,7 +832,7 @@ return; LayoutObject* pseudoLayoutObject = firstLetterElement->layoutObject(); - if (pseudoLayoutObject->style()->visibility() != EVisibility::Visible && + if (pseudoLayoutObject->style()->visibility() != EVisibility::kVisible && !ignoresStyleVisibility()) return; @@ -866,7 +866,7 @@ return false; LayoutObject* layoutObject = m_node->layoutObject(); - if (layoutObject->style()->visibility() != EVisibility::Visible && + if (layoutObject->style()->visibility() != EVisibility::kVisible && !ignoresStyleVisibility()) return false; @@ -1083,7 +1083,7 @@ // unrendered content, we would create VisiblePositions on every call to this // function without this check. if (!m_node->layoutObject() || - m_node->layoutObject()->style()->visibility() != EVisibility::Visible || + m_node->layoutObject()->style()->visibility() != EVisibility::kVisible || (m_node->layoutObject()->isLayoutBlockFlow() && !toLayoutBlock(m_node->layoutObject())->size().height() && !isHTMLBodyElement(*m_node)))
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp index d1c191d..b66f20f 100644 --- a/third_party/WebKit/Source/core/frame/FrameView.cpp +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -1986,10 +1986,10 @@ } selection.start.isTextDirectionRTL |= primaryDirectionOf(*visibleSelection.start().anchorNode()) == - TextDirection::Rtl; + TextDirection::kRtl; selection.end.isTextDirectionRTL |= primaryDirectionOf(*visibleSelection.end().anchorNode()) == - TextDirection::Rtl; + TextDirection::kRtl; return true; }
diff --git a/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp b/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp index cb99daec1..595484f 100644 --- a/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLAreaElement.cpp
@@ -197,7 +197,7 @@ bool HTMLAreaElement::layoutObjectIsFocusable() const { HTMLImageElement* image = imageElement(); if (!image || !image->layoutObject() || - image->layoutObject()->style()->visibility() != EVisibility::Visible) + image->layoutObject()->style()->visibility() != EVisibility::kVisible) return false; return supportsFocus() && Element::tabIndex() >= 0;
diff --git a/third_party/WebKit/Source/core/html/HTMLElement.cpp b/third_party/WebKit/Source/core/html/HTMLElement.cpp index d51c8af1..9755528 100644 --- a/third_party/WebKit/Source/core/html/HTMLElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLElement.cpp
@@ -810,7 +810,7 @@ bool& isAuto) const { isAuto = hasDirectionAuto(); if (!isAuto) - return TextDirection::Ltr; + return TextDirection::kLtr; return directionality(); } @@ -864,7 +864,7 @@ } if (strongDirectionalityTextNode) *strongDirectionalityTextNode = 0; - return TextDirection::Ltr; + return TextDirection::kLtr; } bool HTMLElement::selfOrAncestorHasDirAutoAttribute() const {
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp index fe11455..8daaf65 100644 --- a/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElement.cpp
@@ -471,8 +471,8 @@ m_hasValidationMessage = true; ValidationMessageClient* client = &page->validationMessageClient(); - TextDirection messageDir = TextDirection::Ltr; - TextDirection subMessageDir = TextDirection::Ltr; + TextDirection messageDir = TextDirection::kLtr; + TextDirection subMessageDir = TextDirection::kLtr; String subMessage = validationSubMessage().stripWhiteSpace(); if (message.isEmpty()) client->hideValidationMessage(*this);
diff --git a/third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp index e050925..191f857b 100644 --- a/third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp +++ b/third_party/WebKit/Source/core/html/HTMLFormControlElementTest.cpp
@@ -52,35 +52,35 @@ String message = input->validationMessage().stripWhiteSpace(); String subMessage = input->validationSubMessage().stripWhiteSpace(); - TextDirection messageDir = TextDirection::Rtl; - TextDirection subMessageDir = TextDirection::Ltr; + TextDirection messageDir = TextDirection::kRtl; + TextDirection subMessageDir = TextDirection::kLtr; input->findCustomValidationMessageTextDirection(message, messageDir, subMessage, subMessageDir); - EXPECT_EQ(TextDirection::Rtl, messageDir); - EXPECT_EQ(TextDirection::Ltr, subMessageDir); + EXPECT_EQ(TextDirection::kRtl, messageDir); + EXPECT_EQ(TextDirection::kLtr, subMessageDir); - input->layoutObject()->mutableStyleRef().setDirection(TextDirection::Rtl); + input->layoutObject()->mutableStyleRef().setDirection(TextDirection::kRtl); input->findCustomValidationMessageTextDirection(message, messageDir, subMessage, subMessageDir); - EXPECT_EQ(TextDirection::Rtl, messageDir); - EXPECT_EQ(TextDirection::Ltr, subMessageDir); + EXPECT_EQ(TextDirection::kRtl, messageDir); + EXPECT_EQ(TextDirection::kLtr, subMessageDir); input->setCustomValidity(String::fromUTF8("Main message.")); message = input->validationMessage().stripWhiteSpace(); subMessage = input->validationSubMessage().stripWhiteSpace(); input->findCustomValidationMessageTextDirection(message, messageDir, subMessage, subMessageDir); - EXPECT_EQ(TextDirection::Ltr, messageDir); - EXPECT_EQ(TextDirection::Ltr, subMessageDir); + EXPECT_EQ(TextDirection::kLtr, messageDir); + EXPECT_EQ(TextDirection::kLtr, subMessageDir); input->setCustomValidity(String()); message = input->validationMessage().stripWhiteSpace(); subMessage = input->validationSubMessage().stripWhiteSpace(); input->findCustomValidationMessageTextDirection(message, messageDir, subMessage, subMessageDir); - EXPECT_EQ(TextDirection::Ltr, messageDir); - EXPECT_EQ(TextDirection::Rtl, subMessageDir); + EXPECT_EQ(TextDirection::kLtr, messageDir); + EXPECT_EQ(TextDirection::kRtl, subMessageDir); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp b/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp index 1ff6278a..cbf51fa 100644 --- a/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp +++ b/third_party/WebKit/Source/core/html/HTMLImageFallbackHelper.cpp
@@ -116,8 +116,8 @@ // image for the element's writing direction. brokenImage->setInlineStyleProperty( CSSPropertyFloat, - AtomicString(newStyle->direction() == TextDirection::Ltr ? "left" - : "right")); + AtomicString(newStyle->direction() == TextDirection::kLtr ? "left" + : "right")); // This is an <img> with no attributes, so don't display anything. if (noImageSourceSpecified(element) &&
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp index 31e1445..970cf1f 100644 --- a/third_party/WebKit/Source/core/html/HTMLInputElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLInputElement.cpp
@@ -1820,7 +1820,7 @@ document().view()->contentsToScreen(pixelSnappedBoundingBox()); parameters.doubleValue = m_inputType->valueAsDouble(); parameters.isAnchorElementRTL = - m_inputTypeView->computedTextDirection() == TextDirection::Rtl; + m_inputTypeView->computedTextDirection() == TextDirection::kRtl; if (HTMLDataListElement* dataList = this->dataList()) { HTMLDataListOptionsCollection* options = dataList->options(); for (unsigned i = 0; HTMLOptionElement* option = options->item(i); ++i) {
diff --git a/third_party/WebKit/Source/core/html/TextControlElement.cpp b/third_party/WebKit/Source/core/html/TextControlElement.cpp index e4a8490..804cf7b 100644 --- a/third_party/WebKit/Source/core/html/TextControlElement.cpp +++ b/third_party/WebKit/Source/core/html/TextControlElement.cpp
@@ -890,7 +890,7 @@ bool isAuto; TextDirection textDirection = element->directionalityIfhasDirAutoAttribute(isAuto); - return textDirection == TextDirection::Rtl ? "rtl" : "ltr"; + return textDirection == TextDirection::kRtl ? "rtl" : "ltr"; } }
diff --git a/third_party/WebKit/Source/core/html/forms/InputType.cpp b/third_party/WebKit/Source/core/html/forms/InputType.cpp index f508efe..d336e71 100644 --- a/third_party/WebKit/Source/core/html/forms/InputType.cpp +++ b/third_party/WebKit/Source/core/html/forms/InputType.cpp
@@ -553,7 +553,7 @@ const String& value) const { // Don't warn if the value is set in Modernizr. const ComputedStyle* style = element().computedStyle(); - if (style && style->visibility() != EVisibility::Hidden) + if (style && style->visibility() != EVisibility::kHidden) warnIfValueIsInvalid(value); } @@ -862,7 +862,7 @@ void InputType::countUsageIfVisible(UseCounter::Feature feature) const { if (const ComputedStyle* style = element().computedStyle()) { - if (style->visibility() != EVisibility::Hidden) + if (style->visibility() != EVisibility::kHidden) UseCounter::count(element().document(), feature); } }
diff --git a/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp b/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp index 308ff95..1248a65 100644 --- a/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp +++ b/third_party/WebKit/Source/core/html/forms/MultipleFieldsTemporalInputTypeView.cpp
@@ -624,7 +624,7 @@ } TextDirection MultipleFieldsTemporalInputTypeView::computedTextDirection() { - return element().locale().isRTL() ? TextDirection::Rtl : TextDirection::Ltr; + return element().locale().isRTL() ? TextDirection::kRtl : TextDirection::kLtr; } AXObject* MultipleFieldsTemporalInputTypeView::popupRootAXObject() {
diff --git a/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp b/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp index 2279094..92e36eb 100644 --- a/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp +++ b/third_party/WebKit/Source/core/html/forms/RadioInputType.cpp
@@ -106,7 +106,7 @@ Document& document = element().document(); if (isSpatialNavigationEnabled(document.frame())) return; - bool forward = computedTextDirection() == TextDirection::Rtl + bool forward = computedTextDirection() == TextDirection::kRtl ? (key == "ArrowDown" || key == "ArrowLeft") : (key == "ArrowDown" || key == "ArrowRight");
diff --git a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp index 39d4d01..0ca1bd5 100644 --- a/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp +++ b/third_party/WebKit/Source/core/html/forms/RangeInputType.cpp
@@ -190,7 +190,7 @@ const Decimal bigStep = std::max((stepRange.maximum() - stepRange.minimum()) / 10, step); - TextDirection dir = TextDirection::Ltr; + TextDirection dir = TextDirection::kLtr; bool isVertical = false; if (element().layoutObject()) { dir = computedTextDirection(); @@ -204,11 +204,11 @@ } else if (key == "ArrowDown") { newValue = current - step; } else if (key == "ArrowLeft") { - newValue = (isVertical || dir == TextDirection::Rtl) ? current + step - : current - step; + newValue = (isVertical || dir == TextDirection::kRtl) ? current + step + : current - step; } else if (key == "ArrowRight") { - newValue = (isVertical || dir == TextDirection::Rtl) ? current - step - : current + step; + newValue = (isVertical || dir == TextDirection::kRtl) ? current - step + : current + step; } else if (key == "PageUp") { newValue = current + bigStep; } else if (key == "PageDown") {
diff --git a/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp b/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp index 9eebf289..7ba751e3 100644 --- a/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp +++ b/third_party/WebKit/Source/core/html/shadow/TextControlInnerElements.cpp
@@ -82,7 +82,7 @@ style->setFlexGrow(1); style->setMinWidth(Length(0, Fixed)); style->setDisplay(EDisplay::Block); - style->setDirection(TextDirection::Ltr); + style->setDirection(TextDirection::kLtr); // We don't want the shadow dom to be editable, so we set this block to // read-only in case the input itself is editable.
diff --git a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp index 516b7bd5..b8ed066 100644 --- a/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp +++ b/third_party/WebKit/Source/core/html/track/vtt/VTTCue.cpp
@@ -546,7 +546,7 @@ bool& hasStrongDirectionality) { TextRun run(value); BidiResolver<VTTTextRunIterator, BidiCharacterRun> bidiResolver; - bidiResolver.setStatus(BidiStatus(TextDirection::Ltr, false)); + bidiResolver.setStatus(BidiStatus(TextDirection::kLtr, false)); bidiResolver.setPositionIgnoringNestedIsolates(VTTTextRunIterator(&run, 0)); return bidiResolver.determineDirectionality(&hasStrongDirectionality); } @@ -558,7 +558,7 @@ // concatenation of the values of each WebVTT Text Object in nodes, in a // pre-order, depth-first traversal, excluding WebVTT Ruby Text Objects and // their descendants. - TextDirection textDirection = TextDirection::Ltr; + TextDirection textDirection = TextDirection::kLtr; Node* node = NodeTraversal::next(*vttRoot); while (node) { DCHECK(node->isDescendantOf(vttRoot));
diff --git a/third_party/WebKit/Source/core/layout/FloatingObjects.cpp b/third_party/WebKit/Source/core/layout/FloatingObjects.cpp index 1c425fb7..096621c 100644 --- a/third_party/WebKit/Source/core/layout/FloatingObjects.cpp +++ b/third_party/WebKit/Source/core/layout/FloatingObjects.cpp
@@ -61,10 +61,10 @@ #endif { EFloat type = layoutObject->style()->floating(); - DCHECK_NE(type, EFloat::None); - if (type == EFloat::Left) + DCHECK_NE(type, EFloat::kNone); + if (type == EFloat::kLeft) m_type = FloatLeft; - else if (type == EFloat::Right) + else if (type == EFloat::kRight) m_type = FloatRight; }
diff --git a/third_party/WebKit/Source/core/layout/HitTestResult.cpp b/third_party/WebKit/Source/core/layout/HitTestResult.cpp index 7b2db7cf..76f4cd95 100644 --- a/third_party/WebKit/Source/core/layout/HitTestResult.cpp +++ b/third_party/WebKit/Source/core/layout/HitTestResult.cpp
@@ -236,7 +236,7 @@ } String HitTestResult::title(TextDirection& dir) const { - dir = TextDirection::Ltr; + dir = TextDirection::kLtr; // Find the title in the nearest enclosing DOM node. // For <area> tags in image maps, walk the tree for the <area>, not the <img> // using it.
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp index 2956c416..2c7f1e6 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -1296,7 +1296,7 @@ static inline bool isChildHitTestCandidate(LayoutBox* box) { return box->size().height() && - box->style()->visibility() == EVisibility::Visible && + box->style()->visibility() == EVisibility::kVisible && !box->isFloatingOrOutOfFlowPositioned() && !box->isLayoutFlowThread(); } @@ -1473,7 +1473,7 @@ LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const { const ComputedStyle& styleToUse = styleRef(); - bool nowrap = styleToUse.whiteSpace() == EWhiteSpace::Nowrap; + bool nowrap = styleToUse.whiteSpace() == EWhiteSpace::kNowrap; LayoutObject* child = firstChild(); LayoutBlock* containingBlock = this->containingBlock(); @@ -1556,7 +1556,7 @@ } if (child->isFloating()) { - if (childStyle->floating() == EFloat::Left) + if (childStyle->floating() == EFloat::kLeft) floatLeftWidth += w; else floatRightWidth += w;
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp index 560d6a8..57a5aa1 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp
@@ -631,7 +631,7 @@ // edge or any positive margin push it out. // If the child is being centred then the margin calculated to do that has // factored in any offset required to avoid floats, so use it if necessary. - if (style()->textAlign() == ETextAlign::WebkitCenter || + if (style()->textAlign() == ETextAlign::kWebkitCenter || child.style()->marginStartUsing(style()).isAuto()) newPosition = std::max(newPosition, positionToAvoidFloats + childMarginStart); @@ -3471,7 +3471,7 @@ bool insideFlowThread = flowThreadContainingBlock(); - if (childBox->style()->floating() == EFloat::Left) { + if (childBox->style()->floating() == EFloat::kLeft) { LayoutUnit heightRemainingLeft = LayoutUnit(1); LayoutUnit heightRemainingRight = LayoutUnit(1); floatLogicalLeft = logicalLeftOffsetForPositioningFloat(
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp index 613d64e5..7ee88a8 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBlockFlowLine.cpp
@@ -99,7 +99,7 @@ RELEASE_ASSERT(opportunitiesInRun <= m_totalOpportunities); // Don't justify for white-space: pre. - if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::Pre) { + if (r->m_lineLayoutItem.style()->whiteSpace() != EWhiteSpace::kPre) { InlineTextBox* textBox = toInlineTextBox(r->m_box); RELEASE_ASSERT(m_totalOpportunities); int expansion = ((availableLogicalWidth - totalLogicalWidth) * @@ -363,20 +363,20 @@ TextAlignLast alignmentLast = style()->getTextAlignLast(); switch (alignmentLast) { case TextAlignLastStart: - return ETextAlign::Start; + return ETextAlign::kStart; case TextAlignLastEnd: - return ETextAlign::End; + return ETextAlign::kEnd; case TextAlignLastLeft: - return ETextAlign::Left; + return ETextAlign::kLeft; case TextAlignLastRight: - return ETextAlign::Right; + return ETextAlign::kRight; case TextAlignLastCenter: - return ETextAlign::Center; + return ETextAlign::kCenter; case TextAlignLastJustify: - return ETextAlign::Justify; + return ETextAlign::kJustify; case TextAlignLastAuto: - if (alignment == ETextAlign::Justify) - return ETextAlign::Start; + if (alignment == ETextAlign::kJustify) + return ETextAlign::kStart; return alignment; } @@ -670,25 +670,25 @@ // position the objects horizontally. The total width of the line can be // increased if we end up justifying text. switch (textAlign) { - case ETextAlign::Left: - case ETextAlign::WebkitLeft: + case ETextAlign::kLeft: + case ETextAlign::kWebkitLeft: updateLogicalWidthForLeftAlignedBlock( style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); break; - case ETextAlign::Right: - case ETextAlign::WebkitRight: + case ETextAlign::kRight: + case ETextAlign::kWebkitRight: updateLogicalWidthForRightAlignedBlock( style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); break; - case ETextAlign::Center: - case ETextAlign::WebkitCenter: + case ETextAlign::kCenter: + case ETextAlign::kWebkitCenter: updateLogicalWidthForCenterAlignedBlock( style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); break; - case ETextAlign::Justify: + case ETextAlign::kJustify: adjustInlineDirectionLineBounds(expansionOpportunityCount, logicalLeft, availableLogicalWidth); if (expansionOpportunityCount) { @@ -699,8 +699,8 @@ break; } // Fall through - case ETextAlign::Start: - if (direction == TextDirection::Ltr) + case ETextAlign::kStart: + if (direction == TextDirection::kLtr) updateLogicalWidthForLeftAlignedBlock( style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); @@ -709,8 +709,8 @@ style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); break; - case ETextAlign::End: - if (direction == TextDirection::Ltr) + case ETextAlign::kEnd: + if (direction == TextDirection::kLtr) updateLogicalWidthForRightAlignedBlock( style()->isLeftToRightDirection(), trailingSpaceRun, logicalLeft, totalLogicalWidth, availableLogicalWidth); @@ -820,7 +820,7 @@ } if (r->m_lineLayoutItem.isText()) { LineLayoutText rt(r->m_lineLayoutItem); - if (textAlign == ETextAlign::Justify && r != trailingSpaceRun && + if (textAlign == ETextAlign::kJustify && r != trailingSpaceRun && textJustify != TextJustifyNone) { if (!isAfterExpansion) toInlineTextBox(r->m_box)->setCanHaveLeadingExpansion(true); @@ -1140,7 +1140,7 @@ } else { VisualDirectionOverride override = (styleToUse.rtlOrdering() == EOrder::Visual - ? (styleToUse.direction() == TextDirection::Ltr + ? (styleToUse.direction() == TextDirection::kLtr ? VisualLeftToRightOverride : VisualRightToLeftOverride) : NoVisualOverride); @@ -1672,9 +1672,9 @@ const ComputedStyle& childStyle = child->styleRef(); clearPreviousFloat = (prevFloat && - ((prevFloat->styleRef().floating() == EFloat::Left && + ((prevFloat->styleRef().floating() == EFloat::kLeft && (childStyle.clear() & ClearLeft)) || - (prevFloat->styleRef().floating() == EFloat::Right && + (prevFloat->styleRef().floating() == EFloat::kRight && (childStyle.clear() & ClearRight)))); prevFloat = child; } else { @@ -2357,7 +2357,7 @@ const Font& firstLineFont = firstLineStyle()->font(); // FIXME: We should probably not hard-code the direction here. // https://crbug.com/333004 - TextDirection ellipsisDirection = TextDirection::Ltr; + TextDirection ellipsisDirection = TextDirection::kLtr; float firstLineEllipsisWidth = 0; float ellipsisWidth = 0; @@ -2470,15 +2470,15 @@ bool applyIndentText; switch (textAlign) { // FIXME: Handle TAEND here - case ETextAlign::Left: - case ETextAlign::WebkitLeft: + case ETextAlign::kLeft: + case ETextAlign::kWebkitLeft: applyIndentText = style()->isLeftToRightDirection(); break; - case ETextAlign::Right: - case ETextAlign::WebkitRight: + case ETextAlign::kRight: + case ETextAlign::kWebkitRight: applyIndentText = !style()->isLeftToRightDirection(); break; - case ETextAlign::Start: + case ETextAlign::kStart: applyIndentText = true; break; default:
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp index bec7b915..57b0a062 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -1534,7 +1534,7 @@ if (childStyle.position() != StaticPosition && childBox.containingBlock() != childBox.parent()) return false; - if (childStyle.visibility() != EVisibility::Visible || + if (childStyle.visibility() != EVisibility::kVisible || childStyle.shapeOutside()) return false; if (childBox.size().isZero()) @@ -2286,7 +2286,7 @@ } LayoutRect LayoutBox::localVisualRect() const { - if (style()->visibility() != EVisibility::Visible) + if (style()->visibility() != EVisibility::kVisible) return LayoutRect(); if (hasMask() && !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) @@ -2855,7 +2855,7 @@ const ComputedStyle& containingBlockStyle = containingBlock->styleRef(); if ((marginStartLength.isAuto() && marginEndLength.isAuto()) || (!marginStartLength.isAuto() && !marginEndLength.isAuto() && - containingBlockStyle.textAlign() == ETextAlign::WebkitCenter)) { + containingBlockStyle.textAlign() == ETextAlign::kWebkitCenter)) { // Other browsers center the margin box for align=center elements so we // match them here. LayoutUnit centeredMarginBoxStart = std::max( @@ -2869,9 +2869,9 @@ // Adjust margins for the align attribute if ((!containingBlockStyle.isLeftToRightDirection() && - containingBlockStyle.textAlign() == ETextAlign::WebkitLeft) || + containingBlockStyle.textAlign() == ETextAlign::kWebkitLeft) || (containingBlockStyle.isLeftToRightDirection() && - containingBlockStyle.textAlign() == ETextAlign::WebkitRight)) { + containingBlockStyle.textAlign() == ETextAlign::kWebkitRight)) { if (containingBlockStyle.isLeftToRightDirection() != styleRef().isLeftToRightDirection()) { if (!marginStartLength.isAuto()) @@ -3732,7 +3732,7 @@ // FIXME: The static distance computation has not been patched for mixed // writing modes yet. - if (child->parent()->style()->direction() == TextDirection::Ltr) { + if (child->parent()->style()->direction() == TextDirection::kLtr) { LayoutUnit staticPosition = child->layer()->staticInlinePosition() - containerBlock->borderLogicalLeft(); for (LayoutObject* curr = child->parent(); curr && curr != containerBlock; @@ -4030,7 +4030,7 @@ } else { // Use the containing block's direction rather than the parent block's // per CSS 2.1 reference test abspos-non-replaced-width-margin-000. - if (containerDirection == TextDirection::Ltr) { + if (containerDirection == TextDirection::kLtr) { marginLogicalLeftValue = LayoutUnit(); marginLogicalRightValue = availableSpace; // will be negative } else { @@ -4057,7 +4057,7 @@ // Use the containing block's direction rather than the parent block's // per CSS 2.1 reference test abspos-non-replaced-width-margin-000. - if (containerDirection == TextDirection::Rtl) + if (containerDirection == TextDirection::kRtl) logicalLeftValue = (availableSpace + logicalLeftValue) - marginLogicalLeftValue - marginLogicalRightValue; } @@ -4620,7 +4620,7 @@ layoutObject = layoutObject->nextSibling()) { if ((!layoutObject->slowFirstChild() && !layoutObject->isInline() && !layoutObject->isLayoutBlockFlow()) || - layoutObject->style()->visibility() != EVisibility::Visible) + layoutObject->style()->visibility() != EVisibility::kVisible) continue; if (!layoutObject->isBox())
diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp index f2bc1ae..b5148bae 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
@@ -1133,23 +1133,23 @@ CaretAlignment alignment = AlignLeft; switch (currentStyle.textAlign()) { - case ETextAlign::Left: - case ETextAlign::WebkitLeft: + case ETextAlign::kLeft: + case ETextAlign::kWebkitLeft: break; - case ETextAlign::Center: - case ETextAlign::WebkitCenter: + case ETextAlign::kCenter: + case ETextAlign::kWebkitCenter: alignment = AlignCenter; break; - case ETextAlign::Right: - case ETextAlign::WebkitRight: + case ETextAlign::kRight: + case ETextAlign::kWebkitRight: alignment = AlignRight; break; - case ETextAlign::Justify: - case ETextAlign::Start: + case ETextAlign::kJustify: + case ETextAlign::kStart: if (!currentStyle.isLeftToRightDirection()) alignment = AlignRight; break; - case ETextAlign::End: + case ETextAlign::kEnd: if (currentStyle.isLeftToRightDirection()) alignment = AlignRight; break;
diff --git a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp index 0baef96..a0602ae9 100644 --- a/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutDeprecatedFlexibleBox.cpp
@@ -43,9 +43,9 @@ : m_box(parent), m_largestOrdinal(1) { if (m_box->style()->boxOrient() == HORIZONTAL && !m_box->style()->isLeftToRightDirection()) - m_forward = m_box->style()->boxDirection() != EBoxDirection::Normal; + m_forward = m_box->style()->boxDirection() != EBoxDirection::kNormal; else - m_forward = m_box->style()->boxDirection() == EBoxDirection::Normal; + m_forward = m_box->style()->boxDirection() == EBoxDirection::kNormal; if (!m_forward) { // No choice, since we're going backwards, we have to find out the highest // ordinal up front. @@ -139,7 +139,7 @@ int lineCount, bool includeBottom, int& count) { - if (blockFlow->style()->visibility() != EVisibility::Visible) + if (blockFlow->style()->visibility() != EVisibility::kVisible) return -1; if (blockFlow->childrenInline()) { for (RootInlineBox* box = blockFlow->firstRootBox(); box; @@ -181,7 +181,7 @@ static RootInlineBox* lineAtIndex(const LayoutBlockFlow* blockFlow, int i) { ASSERT(i >= 0); - if (blockFlow->style()->visibility() != EVisibility::Visible) + if (blockFlow->style()->visibility() != EVisibility::kVisible) return nullptr; if (blockFlow->childrenInline()) { @@ -209,7 +209,7 @@ static int lineCount(const LayoutBlockFlow* blockFlow, const RootInlineBox* stopRootInlineBox = nullptr, bool* found = nullptr) { - if (blockFlow->style()->visibility() != EVisibility::Visible) + if (blockFlow->style()->visibility() != EVisibility::kVisible) return 0; int count = 0; if (blockFlow->childrenInline()) { @@ -243,7 +243,7 @@ } static void clearTruncation(LayoutBlockFlow* blockFlow) { - if (blockFlow->style()->visibility() != EVisibility::Visible) + if (blockFlow->style()->visibility() != EVisibility::kVisible) return; if (blockFlow->childrenInline() && blockFlow->hasMarkupTruncation()) { blockFlow->setHasMarkupTruncation(false); @@ -297,7 +297,7 @@ static bool childDoesNotAffectWidthOrFlexing(LayoutObject* child) { // Positioned children and collapsed children don't affect the min/max width. return child->isOutOfFlowPositioned() || - child->style()->visibility() == EVisibility::Collapse; + child->style()->visibility() == EVisibility::kCollapse; } static LayoutUnit contentWidthForChild(LayoutBox* child) { @@ -548,7 +548,7 @@ continue; } - if (child->style()->visibility() == EVisibility::Collapse) { + if (child->style()->visibility() == EVisibility::kCollapse) { // visibility: collapsed children do not participate in our positioning. // But we need to lay them down. child->layoutIfNeeded(); @@ -672,7 +672,7 @@ for (LayoutBox* child = iterator.first(); child && spaceAvailableThisPass && totalFlex; child = iterator.next()) { - if (child->style()->visibility() == EVisibility::Collapse) + if (child->style()->visibility() == EVisibility::kCollapse) continue; if (allowedChildFlex(child, expanding, i)) { @@ -834,7 +834,7 @@ child->style()->height().isPercentOrCalc())))) layoutScope.setChildNeedsLayout(child); - if (child->style()->visibility() == EVisibility::Collapse) { + if (child->style()->visibility() == EVisibility::kCollapse) { // visibility: collapsed children do not participate in our positioning. // But we need to lay them down. child->layoutIfNeeded(); @@ -1137,7 +1137,7 @@ child->forceChildLayout(); // FIXME: For now don't support RTL. - if (style()->direction() != TextDirection::Ltr) + if (style()->direction() != TextDirection::kLtr) continue; // Get the last line
diff --git a/third_party/WebKit/Source/core/layout/LayoutDetailsMarker.cpp b/third_party/WebKit/Source/core/layout/LayoutDetailsMarker.cpp index e58624e..125d77b 100644 --- a/third_party/WebKit/Source/core/layout/LayoutDetailsMarker.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutDetailsMarker.cpp
@@ -34,15 +34,15 @@ LayoutDetailsMarker::Orientation LayoutDetailsMarker::getOrientation() const { switch (style()->getWritingMode()) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: if (style()->isLeftToRightDirection()) return isOpen() ? Down : Right; return isOpen() ? Down : Left; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: if (style()->isLeftToRightDirection()) return isOpen() ? Left : Down; return isOpen() ? Left : Up; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: if (style()->isLeftToRightDirection()) return isOpen() ? Right : Down; return isOpen() ? Right : Up;
diff --git a/third_party/WebKit/Source/core/layout/LayoutFieldset.cpp b/third_party/WebKit/Source/core/layout/LayoutFieldset.cpp index c1a37a6d..087b0fc 100644 --- a/third_party/WebKit/Source/core/layout/LayoutFieldset.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutFieldset.cpp
@@ -69,10 +69,10 @@ LayoutUnit logicalLeft; if (style()->isLeftToRightDirection()) { switch (legend->style()->textAlign()) { - case ETextAlign::Center: + case ETextAlign::kCenter: logicalLeft = (logicalWidth() - logicalWidthForChild(*legend)) / 2; break; - case ETextAlign::Right: + case ETextAlign::kRight: logicalLeft = logicalWidth() - borderEnd() - paddingEnd() - logicalWidthForChild(*legend); break; @@ -83,10 +83,10 @@ } } else { switch (legend->style()->textAlign()) { - case ETextAlign::Left: + case ETextAlign::kLeft: logicalLeft = borderStart() + paddingStart(); break; - case ETextAlign::Center: { + case ETextAlign::kCenter: { // Make sure that the extra pixel goes to the end side in RTL (since // it went to the end side in LTR). LayoutUnit centeredWidth =
diff --git a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp index 20d7cde..80694bd 100644 --- a/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutFlexibleBox.cpp
@@ -269,7 +269,7 @@ WritingMode writingMode = style()->getWritingMode(); if (flexDirection == FlowRow) { - if (textDirection == TextDirection::Rtl) { + if (textDirection == TextDirection::kRtl) { if (blink::isHorizontalWritingMode(writingMode)) size.expand(adjustmentWidth, 0); else @@ -278,7 +278,7 @@ if (isFlippedBlocksWritingMode(writingMode)) size.expand(adjustmentWidth, 0); } else if (flexDirection == FlowRowReverse) { - if (textDirection == TextDirection::Ltr) { + if (textDirection == TextDirection::kLtr) { if (blink::isHorizontalWritingMode(writingMode)) size.expand(adjustmentWidth, 0); else @@ -611,23 +611,23 @@ WritingMode mode = style()->getWritingMode(); if (!isColumnFlow()) { static_assert( - static_cast<TransformedWritingMode>(WritingMode::HorizontalTb) == + static_cast<TransformedWritingMode>(WritingMode::kHorizontalTb) == TransformedWritingMode::TopToBottomWritingMode && - static_cast<TransformedWritingMode>(WritingMode::VerticalLr) == + static_cast<TransformedWritingMode>(WritingMode::kVerticalLr) == TransformedWritingMode::LeftToRightWritingMode && - static_cast<TransformedWritingMode>(WritingMode::VerticalRl) == + static_cast<TransformedWritingMode>(WritingMode::kVerticalRl) == TransformedWritingMode::RightToLeftWritingMode, "WritingMode and TransformedWritingMode must match values."); return static_cast<TransformedWritingMode>(mode); } switch (mode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return style()->isLeftToRightDirection() ? TransformedWritingMode::LeftToRightWritingMode : TransformedWritingMode::RightToLeftWritingMode; - case WritingMode::VerticalLr: - case WritingMode::VerticalRl: + case WritingMode::kVerticalLr: + case WritingMode::kVerticalRl: return style()->isLeftToRightDirection() ? TransformedWritingMode::TopToBottomWritingMode : TransformedWritingMode::BottomToTopWritingMode;
diff --git a/third_party/WebKit/Source/core/layout/LayoutInline.cpp b/third_party/WebKit/Source/core/layout/LayoutInline.cpp index d8abdb0..462ca0465 100644 --- a/third_party/WebKit/Source/core/layout/LayoutInline.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutInline.cpp
@@ -1156,7 +1156,7 @@ if (!alwaysCreateLineBoxes()) return LayoutRect(); - if (style()->visibility() != EVisibility::Visible) + if (style()->visibility() != EVisibility::kVisible) return LayoutRect(); return visualOverflowRect(); @@ -1484,7 +1484,7 @@ void LayoutInline::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions) { // Convert the style regions to absolute coordinates. - if (style()->visibility() != EVisibility::Visible) + if (style()->visibility() != EVisibility::kVisible) return; if (style()->getDraggableRegionMode() == DraggableRegionNone)
diff --git a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp index d2193b7..66fb816 100644 --- a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
@@ -52,7 +52,7 @@ LayoutBlockFlow::styleDidChange(diff, oldStyle); StyleImage* currentImage = style()->listStyleImage(); - if (style()->listStyleType() != EListStyleType::None || + if (style()->listStyleType() != EListStyleType::kNone || (currentImage && !currentImage->errorOccurred())) { if (!m_marker) m_marker = LayoutListMarker::createAnonymous(this);
diff --git a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp index 91eec1f..4f8c400 100644 --- a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
@@ -370,64 +370,64 @@ LayoutListMarker::ListStyleCategory LayoutListMarker::getListStyleCategory() const { switch (style()->listStyleType()) { - case EListStyleType::None: + case EListStyleType::kNone: return ListStyleCategory::None; - case EListStyleType::Disc: - case EListStyleType::Circle: - case EListStyleType::Square: + case EListStyleType::kDisc: + case EListStyleType::kCircle: + case EListStyleType::kSquare: return ListStyleCategory::Symbol; - case EListStyleType::ArabicIndic: - case EListStyleType::Armenian: - case EListStyleType::Bengali: - case EListStyleType::Cambodian: - case EListStyleType::CjkIdeographic: - case EListStyleType::CjkEarthlyBranch: - case EListStyleType::CjkHeavenlyStem: - case EListStyleType::DecimalLeadingZero: - case EListStyleType::Decimal: - case EListStyleType::Devanagari: - case EListStyleType::EthiopicHalehame: - case EListStyleType::EthiopicHalehameAm: - case EListStyleType::EthiopicHalehameTiEr: - case EListStyleType::EthiopicHalehameTiEt: - case EListStyleType::Georgian: - case EListStyleType::Gujarati: - case EListStyleType::Gurmukhi: - case EListStyleType::Hangul: - case EListStyleType::HangulConsonant: - case EListStyleType::Hebrew: - case EListStyleType::Hiragana: - case EListStyleType::HiraganaIroha: - case EListStyleType::Kannada: - case EListStyleType::Katakana: - case EListStyleType::KatakanaIroha: - case EListStyleType::Khmer: - case EListStyleType::KoreanHangulFormal: - case EListStyleType::KoreanHanjaFormal: - case EListStyleType::KoreanHanjaInformal: - case EListStyleType::Lao: - case EListStyleType::LowerAlpha: - case EListStyleType::LowerArmenian: - case EListStyleType::LowerGreek: - case EListStyleType::LowerLatin: - case EListStyleType::LowerRoman: - case EListStyleType::Malayalam: - case EListStyleType::Mongolian: - case EListStyleType::Myanmar: - case EListStyleType::Oriya: - case EListStyleType::Persian: - case EListStyleType::SimpChineseFormal: - case EListStyleType::SimpChineseInformal: - case EListStyleType::Telugu: - case EListStyleType::Thai: - case EListStyleType::Tibetan: - case EListStyleType::TradChineseFormal: - case EListStyleType::TradChineseInformal: - case EListStyleType::UpperAlpha: - case EListStyleType::UpperArmenian: - case EListStyleType::UpperLatin: - case EListStyleType::UpperRoman: - case EListStyleType::Urdu: + case EListStyleType::kArabicIndic: + case EListStyleType::kArmenian: + case EListStyleType::kBengali: + case EListStyleType::kCambodian: + case EListStyleType::kCjkIdeographic: + case EListStyleType::kCjkEarthlyBranch: + case EListStyleType::kCjkHeavenlyStem: + case EListStyleType::kDecimalLeadingZero: + case EListStyleType::kDecimal: + case EListStyleType::kDevanagari: + case EListStyleType::kEthiopicHalehame: + case EListStyleType::kEthiopicHalehameAm: + case EListStyleType::kEthiopicHalehameTiEr: + case EListStyleType::kEthiopicHalehameTiEt: + case EListStyleType::kGeorgian: + case EListStyleType::kGujarati: + case EListStyleType::kGurmukhi: + case EListStyleType::kHangul: + case EListStyleType::kHangulConsonant: + case EListStyleType::kHebrew: + case EListStyleType::kHiragana: + case EListStyleType::kHiraganaIroha: + case EListStyleType::kKannada: + case EListStyleType::kKatakana: + case EListStyleType::kKatakanaIroha: + case EListStyleType::kKhmer: + case EListStyleType::kKoreanHangulFormal: + case EListStyleType::kKoreanHanjaFormal: + case EListStyleType::kKoreanHanjaInformal: + case EListStyleType::kLao: + case EListStyleType::kLowerAlpha: + case EListStyleType::kLowerArmenian: + case EListStyleType::kLowerGreek: + case EListStyleType::kLowerLatin: + case EListStyleType::kLowerRoman: + case EListStyleType::kMalayalam: + case EListStyleType::kMongolian: + case EListStyleType::kMyanmar: + case EListStyleType::kOriya: + case EListStyleType::kPersian: + case EListStyleType::kSimpChineseFormal: + case EListStyleType::kSimpChineseInformal: + case EListStyleType::kTelugu: + case EListStyleType::kThai: + case EListStyleType::kTibetan: + case EListStyleType::kTradChineseFormal: + case EListStyleType::kTradChineseInformal: + case EListStyleType::kUpperAlpha: + case EListStyleType::kUpperArmenian: + case EListStyleType::kUpperLatin: + case EListStyleType::kUpperRoman: + case EListStyleType::kUrdu: return ListStyleCategory::Language; default: ASSERT_NOT_REACHED(); @@ -437,7 +437,7 @@ bool LayoutListMarker::isInside() const { return m_listItem->notInList() || - style()->listStylePosition() == EListStylePosition::Inside; + style()->listStylePosition() == EListStylePosition::kInside; } IntRect LayoutListMarker::getRelativeMarkerRect() const {
diff --git a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp index 8cd2373..605e02ec1 100644 --- a/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutMenuList.cpp
@@ -102,10 +102,12 @@ Length paddingEnd = Length(LayoutTheme::theme().popupInternalPaddingEnd( frameView()->getHostWindow(), styleRef()), Fixed); - innerStyle.setPaddingLeft( - styleRef().direction() == TextDirection::Ltr ? paddingStart : paddingEnd); - innerStyle.setPaddingRight( - styleRef().direction() == TextDirection::Ltr ? paddingEnd : paddingStart); + innerStyle.setPaddingLeft(styleRef().direction() == TextDirection::kLtr + ? paddingStart + : paddingEnd); + innerStyle.setPaddingRight(styleRef().direction() == TextDirection::kLtr + ? paddingEnd + : paddingStart); innerStyle.setPaddingTop( Length(LayoutTheme::theme().popupInternalPaddingTop(styleRef()), Fixed)); innerStyle.setPaddingBottom(Length( @@ -117,8 +119,8 @@ m_innerBlock->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation( LayoutInvalidationReason::StyleChange); innerStyle.setTextAlign(style()->isLeftToRightDirection() - ? ETextAlign::Left - : ETextAlign::Right); + ? ETextAlign::kLeft + : ETextAlign::kRight); innerStyle.setDirection(m_optionStyle->direction()); innerStyle.setUnicodeBidi(m_optionStyle->unicodeBidi()); }
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp index ee0f4999..b5e23dc 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -326,7 +326,7 @@ } if (newChild->isText() && - newChild->style()->textTransform() == ETextTransform::Capitalize) + newChild->style()->textTransform() == ETextTransform::kCapitalize) toLayoutText(newChild)->transformText(); // SVG creates layoutObjects for <g display="none">, as SVG requires children @@ -2677,8 +2677,8 @@ // If |this| is visible but this object was not, tell the layer it has some // visible content that needs to be drawn and layer visibility optimization // can't be used - if (parent()->style()->visibility() != EVisibility::Visible && - style()->visibility() == EVisibility::Visible && !hasLayer()) { + if (parent()->style()->visibility() != EVisibility::kVisible && + style()->visibility() == EVisibility::kVisible && !hasLayer()) { if (!layer) layer = parent()->enclosingLayer(); if (layer) @@ -2736,8 +2736,8 @@ // If we remove a visible child from an invisible parent, we don't know the // layer visibility any more. PaintLayer* layer = nullptr; - if (parent()->style()->visibility() != EVisibility::Visible && - style()->visibility() == EVisibility::Visible && !hasLayer()) { + if (parent()->style()->visibility() != EVisibility::kVisible && + style()->visibility() == EVisibility::kVisible && !hasLayer()) { layer = parent()->enclosingLayer(); if (layer) layer->dirtyVisibleContentStatus(); @@ -3117,7 +3117,7 @@ void LayoutObject::addAnnotatedRegions(Vector<AnnotatedRegionValue>& regions) { // Convert the style regions to absolute coordinates. - if (style()->visibility() != EVisibility::Visible || !isBox()) + if (style()->visibility() != EVisibility::kVisible || !isBox()) return; if (style()->getDraggableRegionMode() == DraggableRegionNone) @@ -3136,7 +3136,7 @@ bool LayoutObject::willRenderImage() { // Without visibility we won't render (and therefore don't care about // animation). - if (style()->visibility() != EVisibility::Visible) + if (style()->visibility() != EVisibility::kVisible) return false; // We will not render a new image when SuspendableObjects is suspended
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h index d73574c..830f3d9 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.h +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -1476,9 +1476,9 @@ } bool visibleToHitTestRequest(const HitTestRequest& request) const { - return style()->visibility() == EVisibility::Visible && + return style()->visibility() == EVisibility::kVisible && (request.ignorePointerEventsNone() || - style()->pointerEvents() != EPointerEvents::None) && + style()->pointerEvents() != EPointerEvents::kNone) && !isInert(); }
diff --git a/third_party/WebKit/Source/core/layout/LayoutPart.cpp b/third_party/WebKit/Source/core/layout/LayoutPart.cpp index a1ad4e07..5d6eba6 100644 --- a/third_party/WebKit/Source/core/layout/LayoutPart.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutPart.cpp
@@ -242,7 +242,7 @@ if (widget && widget->isFrameView()) toFrameView(widget)->recalculateCustomScrollbarStyle(); - if (style()->visibility() != EVisibility::Visible) { + if (style()->visibility() != EVisibility::kVisible) { widget->hide(); } else { widget->show(); @@ -296,7 +296,7 @@ if (!needsLayout()) updateWidgetGeometryInternal(); - if (style()->visibility() != EVisibility::Visible) { + if (style()->visibility() != EVisibility::kVisible) { widget->hide(); } else { widget->show();
diff --git a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp index 68cdcc53..9f10ae5 100644 --- a/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutReplaced.cpp
@@ -301,7 +301,7 @@ } else { // Use the containing block's direction rather than the parent block's // per CSS 2.1 reference test abspos-replaced-width-margin-000. - if (containerDirection == TextDirection::Ltr) { + if (containerDirection == TextDirection::kLtr) { marginLogicalLeftAlias = LayoutUnit(); marginLogicalRightAlias = difference; // will be negative } else { @@ -366,7 +366,7 @@ logicalLeftValue = valueForLength(logicalLeft, containerLogicalWidth); // If the containing block is right-to-left, then push the left position as // far to the right as possible - if (containerDirection == TextDirection::Rtl) { + if (containerDirection == TextDirection::kRtl) { int totalLogicalWidth = (computedValues.m_extent + logicalLeftValue + logicalRightValue + marginLogicalLeftAlias + marginLogicalRightAlias)
diff --git a/third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp b/third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp index 75b53295..a60916d 100644 --- a/third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutRubyBase.cpp
@@ -134,7 +134,7 @@ ETextAlign LayoutRubyBase::textAlignmentForLine( bool /* endsWithSoftBreak */) const { - return ETextAlign::Justify; + return ETextAlign::kJustify; } void LayoutRubyBase::adjustInlineDirectionLineBounds(
diff --git a/third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp b/third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp index 83349d05..c45d4bd 100644 --- a/third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutRubyRun.cpp
@@ -183,7 +183,7 @@ RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWithDisplay(styleRef(), EDisplay::Block); - newStyle->setTextAlign(ETextAlign::Center); // FIXME: use WEBKIT_CENTER? + newStyle->setTextAlign(ETextAlign::kCenter); // FIXME: use WEBKIT_CENTER? layoutObject->setStyle(newStyle.release()); return layoutObject; }
diff --git a/third_party/WebKit/Source/core/layout/LayoutRubyText.cpp b/third_party/WebKit/Source/core/layout/LayoutRubyText.cpp index ca4075e..a6cd75e6 100644 --- a/third_party/WebKit/Source/core/layout/LayoutRubyText.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutRubyText.cpp
@@ -50,7 +50,7 @@ // The default behavior is to allow ruby text to expand if it is shorter than // the ruby base. - return ETextAlign::Justify; + return ETextAlign::kJustify; } void LayoutRubyText::adjustInlineDirectionLineBounds(
diff --git a/third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp b/third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp index 7499188..db63b142 100644 --- a/third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutSliderContainer.cpp
@@ -105,7 +105,7 @@ // FIXME: Work around rounding issues in RTL vertical sliders. We want them // to render identically to LTR vertical sliders. We can remove this work // around when subpixel rendering is enabled on all ports. - mutableStyleRef().setDirection(TextDirection::Ltr); + mutableStyleRef().setDirection(TextDirection::kLtr); } Element* thumbElement = input->userAgentShadowRoot()->getElementById(
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.cpp b/third_party/WebKit/Source/core/layout/LayoutTable.cpp index fbcca36..a42be72 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTable.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTable.cpp
@@ -589,7 +589,7 @@ // Lay out top captions. // FIXME: Collapse caption margin. for (unsigned i = 0; i < m_captions.size(); i++) { - if (m_captions[i]->style()->captionSide() == ECaptionSide::Bottom) + if (m_captions[i]->style()->captionSide() == ECaptionSide::kBottom) continue; layoutCaption(*m_captions[i], layouter); } @@ -713,7 +713,7 @@ // Lay out bottom captions. for (unsigned i = 0; i < m_captions.size(); i++) { - if (m_captions[i]->style()->captionSide() != ECaptionSide::Bottom) + if (m_captions[i]->style()->captionSide() != ECaptionSide::kBottom) continue; layoutCaption(*m_captions[i], layouter); } @@ -825,7 +825,7 @@ m_captions[i]->marginBefore() + m_captions[i]->marginAfter(); bool captionIsBefore = - (m_captions[i]->style()->captionSide() != ECaptionSide::Bottom) ^ + (m_captions[i]->style()->captionSide() != ECaptionSide::kBottom) ^ style()->isFlippedBlocksWritingMode(); if (style()->isHorizontalWritingMode()) { rect.setHeight(rect.height() - captionLogicalHeight);
diff --git a/third_party/WebKit/Source/core/layout/LayoutTable.h b/third_party/WebKit/Source/core/layout/LayoutTable.h index 1a98e177..6b684321 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTable.h +++ b/third_party/WebKit/Source/core/layout/LayoutTable.h
@@ -145,7 +145,7 @@ int vBorderSpacing() const { return m_vSpacing; } bool collapseBorders() const { - return style()->borderCollapse() == EBorderCollapse::Collapse; + return style()->borderCollapse() == EBorderCollapse::kCollapse; } int borderStart() const override { return m_borderStart; }
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp index c156ca1..0e2a831 100644 --- a/third_party/WebKit/Source/core/layout/LayoutText.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -204,7 +204,7 @@ const ComputedStyle& newStyle = styleRef(); ETextTransform oldTransform = - oldStyle ? oldStyle->textTransform() : ETextTransform::None; + oldStyle ? oldStyle->textTransform() : ETextTransform::kNone; ETextSecurity oldSecurity = oldStyle ? oldStyle->textSecurity() : TSNONE; if (oldTransform != newStyle.textTransform() || oldSecurity != newStyle.textSecurity()) @@ -774,20 +774,20 @@ bool rightAligned = false; switch (cbStyle.textAlign()) { - case ETextAlign::Right: - case ETextAlign::WebkitRight: + case ETextAlign::kRight: + case ETextAlign::kWebkitRight: rightAligned = true; break; - case ETextAlign::Left: - case ETextAlign::WebkitLeft: - case ETextAlign::Center: - case ETextAlign::WebkitCenter: + case ETextAlign::kLeft: + case ETextAlign::kWebkitLeft: + case ETextAlign::kCenter: + case ETextAlign::kWebkitCenter: break; - case ETextAlign::Justify: - case ETextAlign::Start: + case ETextAlign::kJustify: + case ETextAlign::kStart: rightAligned = !cbStyle.isLeftToRightDirection(); break; - case ETextAlign::End: + case ETextAlign::kEnd: rightAligned = cbStyle.isLeftToRightDirection(); break; } @@ -1094,7 +1094,7 @@ BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; BidiCharacterRun* run; TextDirection textDirection = styleToUse.direction(); - if ((is8Bit() && textDirection == TextDirection::Ltr) || + if ((is8Bit() && textDirection == TextDirection::kLtr) || isOverride(styleToUse.unicodeBidi())) { run = 0; } else { @@ -1356,7 +1356,7 @@ if (!styleToUse.autoWrap()) m_minWidth = m_maxWidth; - if (styleToUse.whiteSpace() == EWhiteSpace::Pre) { + if (styleToUse.whiteSpace() == EWhiteSpace::kPre) { if (firstLine) m_firstLineMinWidth = m_maxWidth; m_lastLineLineMinWidth = currMaxWidth; @@ -1598,15 +1598,15 @@ return; switch (style->textTransform()) { - case ETextTransform::None: + case ETextTransform::kNone: break; - case ETextTransform::Capitalize: + case ETextTransform::kCapitalize: makeCapitalized(&text, previousCharacter); break; - case ETextTransform::Uppercase: + case ETextTransform::kUppercase: text = text.upper(style->locale()); break; - case ETextTransform::Lowercase: + case ETextTransform::kLowercase: text = text.lower(style->locale()); break; } @@ -1865,7 +1865,7 @@ } LayoutRect LayoutText::localVisualRect() const { - if (style()->visibility() != EVisibility::Visible) + if (style()->visibility() != EVisibility::kVisible) return LayoutRect(); return unionRect(visualOverflowRect(), localSelectionRect());
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp index 9912a1d..dcf9c0f 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp
@@ -301,7 +301,7 @@ textBlockStyle->inheritFrom(startStyle); adjustInnerEditorStyle(*textBlockStyle); - textBlockStyle->setWhiteSpace(EWhiteSpace::Pre); + textBlockStyle->setWhiteSpace(EWhiteSpace::kPre); textBlockStyle->setOverflowWrap(NormalOverflowWrap); textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllipsis : TextOverflowClip);
diff --git a/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp b/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp index affb1c0..33ef811 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTextTest.cpp
@@ -30,20 +30,20 @@ TEST_F(LayoutTextTest, WidthZeroFromZeroLength) { setBasicBody(kTacoText); - ASSERT_EQ(0, getBasicText()->width(0u, 0u, LayoutUnit(), TextDirection::Ltr, + ASSERT_EQ(0, getBasicText()->width(0u, 0u, LayoutUnit(), TextDirection::kLtr, false)); } TEST_F(LayoutTextTest, WidthMaxFromZeroLength) { setBasicBody(kTacoText); ASSERT_EQ(0, getBasicText()->width(std::numeric_limits<unsigned>::max(), 0u, - LayoutUnit(), TextDirection::Ltr, false)); + LayoutUnit(), TextDirection::kLtr, false)); } TEST_F(LayoutTextTest, WidthZeroFromMaxLength) { setBasicBody(kTacoText); float width = getBasicText()->width(0u, std::numeric_limits<unsigned>::max(), - LayoutUnit(), TextDirection::Ltr, false); + LayoutUnit(), TextDirection::kLtr, false); // Width may vary by platform and we just want to make sure it's something // roughly reasonable. ASSERT_GE(width, 100.f); @@ -54,7 +54,7 @@ setBasicBody(kTacoText); ASSERT_EQ(0, getBasicText()->width(std::numeric_limits<unsigned>::max(), std::numeric_limits<unsigned>::max(), - LayoutUnit(), TextDirection::Ltr, false)); + LayoutUnit(), TextDirection::kLtr, false)); } TEST_F(LayoutTextTest, WidthWithHugeLengthAvoidsOverflow) { @@ -73,14 +73,14 @@ // Width may vary by platform and we just want to make sure it's something // roughly reasonable. const float width = getBasicText()->width( - 23u, 4294967282u, LayoutUnit(2.59375), TextDirection::Rtl, false); + 23u, 4294967282u, LayoutUnit(2.59375), TextDirection::kRtl, false); ASSERT_GE(width, 100.f); ASSERT_LE(width, 300.f); } TEST_F(LayoutTextTest, WidthFromBeyondLength) { setBasicBody("x"); - ASSERT_EQ(0u, getBasicText()->width(1u, 1u, LayoutUnit(), TextDirection::Ltr, + ASSERT_EQ(0u, getBasicText()->width(1u, 1u, LayoutUnit(), TextDirection::kLtr, false)); } @@ -89,7 +89,7 @@ // Width may vary by platform and we just want to make sure it's something // roughly reasonable. const float width = - getBasicText()->width(0u, 2u, LayoutUnit(), TextDirection::Ltr, false); + getBasicText()->width(0u, 2u, LayoutUnit(), TextDirection::kLtr, false); ASSERT_GE(width, 4.f); ASSERT_LE(width, 20.f); }
diff --git a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp index 08d148e..c42b215 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTheme.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTheme.cpp
@@ -166,7 +166,7 @@ // Whitespace if (m_platformTheme->controlRequiresPreWhiteSpace(part)) - style.setWhiteSpace(EWhiteSpace::Pre); + style.setWhiteSpace(EWhiteSpace::kPre); // Width / Height // The width and height here are affected by the zoom.
diff --git a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm index 909ecb83..a0dec32d9 100644 --- a/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm +++ b/third_party/WebKit/Source/core/layout/LayoutThemeMac.mm
@@ -485,7 +485,7 @@ return true; // NSPopUpButtonCell on macOS 10.9 doesn't support // NSUserInterfaceLayoutDirectionRightToLeft. - if (IsOS10_9() && style.direction() == TextDirection::Rtl) + if (IsOS10_9() && style.direction() == TextDirection::kRtl) return true; } // Some other cells don't work well when scaled. @@ -718,7 +718,7 @@ style.setHeight(Length(Auto)); // White-space is locked to pre. - style.setWhiteSpace(EWhiteSpace::Pre); + style.setWhiteSpace(EWhiteSpace::kPre); // Set the foreground color to black or gray when we have the aqua look. // Cast to RGB32 is to work around a compiler bug. @@ -820,7 +820,7 @@ updatePressedState(popupButton, object); popupButton.userInterfaceLayoutDirection = - object.styleRef().direction() == TextDirection::Ltr + object.styleRef().direction() == TextDirection::kLtr ? NSUserInterfaceLayoutDirectionLeftToRight : NSUserInterfaceLayoutDirectionRightToLeft; }
diff --git a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp index 6c5b1c0..715f84c 100644 --- a/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutTreeAsText.cpp
@@ -579,7 +579,7 @@ writeIndent(ts, indent); - if (layer.layoutObject()->style()->visibility() == EVisibility::Hidden) + if (layer.layoutObject()->style()->visibility() == EVisibility::kHidden) ts << "hidden "; ts << "layer ";
diff --git a/third_party/WebKit/Source/core/layout/ListMarkerText.cpp b/third_party/WebKit/Source/core/layout/ListMarkerText.cpp index a0ff14a..c01bbeb 100644 --- a/third_party/WebKit/Source/core/layout/ListMarkerText.cpp +++ b/third_party/WebKit/Source/core/layout/ListMarkerText.cpp
@@ -462,68 +462,68 @@ // Note, the following switch statement has been explicitly grouped // by list-style-type ordinal range. switch (type) { - case EListStyleType::ArabicIndic: - case EListStyleType::Bengali: - case EListStyleType::Cambodian: - case EListStyleType::Circle: - case EListStyleType::DecimalLeadingZero: - case EListStyleType::Decimal: - case EListStyleType::Devanagari: - case EListStyleType::Disc: - case EListStyleType::Gujarati: - case EListStyleType::Gurmukhi: - case EListStyleType::Kannada: - case EListStyleType::Khmer: - case EListStyleType::Lao: - case EListStyleType::Malayalam: - case EListStyleType::Mongolian: - case EListStyleType::Myanmar: - case EListStyleType::None: - case EListStyleType::Oriya: - case EListStyleType::Persian: - case EListStyleType::Square: - case EListStyleType::Telugu: - case EListStyleType::Thai: - case EListStyleType::Tibetan: - case EListStyleType::Urdu: - case EListStyleType::KoreanHangulFormal: - case EListStyleType::KoreanHanjaFormal: - case EListStyleType::KoreanHanjaInformal: - case EListStyleType::CjkIdeographic: - case EListStyleType::SimpChineseFormal: - case EListStyleType::SimpChineseInformal: - case EListStyleType::TradChineseFormal: - case EListStyleType::TradChineseInformal: + case EListStyleType::kArabicIndic: + case EListStyleType::kBengali: + case EListStyleType::kCambodian: + case EListStyleType::kCircle: + case EListStyleType::kDecimalLeadingZero: + case EListStyleType::kDecimal: + case EListStyleType::kDevanagari: + case EListStyleType::kDisc: + case EListStyleType::kGujarati: + case EListStyleType::kGurmukhi: + case EListStyleType::kKannada: + case EListStyleType::kKhmer: + case EListStyleType::kLao: + case EListStyleType::kMalayalam: + case EListStyleType::kMongolian: + case EListStyleType::kMyanmar: + case EListStyleType::kNone: + case EListStyleType::kOriya: + case EListStyleType::kPersian: + case EListStyleType::kSquare: + case EListStyleType::kTelugu: + case EListStyleType::kThai: + case EListStyleType::kTibetan: + case EListStyleType::kUrdu: + case EListStyleType::kKoreanHangulFormal: + case EListStyleType::kKoreanHanjaFormal: + case EListStyleType::kKoreanHanjaInformal: + case EListStyleType::kCjkIdeographic: + case EListStyleType::kSimpChineseFormal: + case EListStyleType::kSimpChineseInformal: + case EListStyleType::kTradChineseFormal: + case EListStyleType::kTradChineseInformal: return type; // Can represent all ordinals. - case EListStyleType::Armenian: - case EListStyleType::LowerArmenian: - case EListStyleType::UpperArmenian: - return (count < 1 || count > 99999999) ? EListStyleType::Decimal : type; - case EListStyleType::Georgian: - return (count < 1 || count > 19999) ? EListStyleType::Decimal : type; - case EListStyleType::Hebrew: - return (count < 0 || count > 999999) ? EListStyleType::Decimal : type; - case EListStyleType::LowerRoman: - case EListStyleType::UpperRoman: - return (count < 1 || count > 3999) ? EListStyleType::Decimal : type; - case EListStyleType::CjkEarthlyBranch: - case EListStyleType::CjkHeavenlyStem: - case EListStyleType::EthiopicHalehameAm: - case EListStyleType::EthiopicHalehame: - case EListStyleType::EthiopicHalehameTiEr: - case EListStyleType::EthiopicHalehameTiEt: - case EListStyleType::Hangul: - case EListStyleType::HangulConsonant: - case EListStyleType::Hiragana: - case EListStyleType::HiraganaIroha: - case EListStyleType::Katakana: - case EListStyleType::KatakanaIroha: - case EListStyleType::LowerAlpha: - case EListStyleType::LowerGreek: - case EListStyleType::LowerLatin: - case EListStyleType::UpperAlpha: - case EListStyleType::UpperLatin: - return (count < 1) ? EListStyleType::Decimal : type; + case EListStyleType::kArmenian: + case EListStyleType::kLowerArmenian: + case EListStyleType::kUpperArmenian: + return (count < 1 || count > 99999999) ? EListStyleType::kDecimal : type; + case EListStyleType::kGeorgian: + return (count < 1 || count > 19999) ? EListStyleType::kDecimal : type; + case EListStyleType::kHebrew: + return (count < 0 || count > 999999) ? EListStyleType::kDecimal : type; + case EListStyleType::kLowerRoman: + case EListStyleType::kUpperRoman: + return (count < 1 || count > 3999) ? EListStyleType::kDecimal : type; + case EListStyleType::kCjkEarthlyBranch: + case EListStyleType::kCjkHeavenlyStem: + case EListStyleType::kEthiopicHalehameAm: + case EListStyleType::kEthiopicHalehame: + case EListStyleType::kEthiopicHalehameTiEr: + case EListStyleType::kEthiopicHalehameTiEt: + case EListStyleType::kHangul: + case EListStyleType::kHangulConsonant: + case EListStyleType::kHiragana: + case EListStyleType::kHiraganaIroha: + case EListStyleType::kKatakana: + case EListStyleType::kKatakanaIroha: + case EListStyleType::kLowerAlpha: + case EListStyleType::kLowerGreek: + case EListStyleType::kLowerLatin: + case EListStyleType::kUpperAlpha: + case EListStyleType::kUpperLatin: + return (count < 1) ? EListStyleType::kDecimal : type; } ASSERT_NOT_REACHED(); @@ -539,65 +539,65 @@ // Note, the following switch statement has been explicitly // grouped by list-style-type suffix. switch (effectiveType) { - case EListStyleType::Circle: - case EListStyleType::Disc: - case EListStyleType::None: - case EListStyleType::Square: + case EListStyleType::kCircle: + case EListStyleType::kDisc: + case EListStyleType::kNone: + case EListStyleType::kSquare: return ' '; - case EListStyleType::EthiopicHalehame: - case EListStyleType::EthiopicHalehameAm: - case EListStyleType::EthiopicHalehameTiEr: - case EListStyleType::EthiopicHalehameTiEt: + case EListStyleType::kEthiopicHalehame: + case EListStyleType::kEthiopicHalehameAm: + case EListStyleType::kEthiopicHalehameTiEr: + case EListStyleType::kEthiopicHalehameTiEt: return ethiopicPrefaceColonCharacter; - case EListStyleType::Armenian: - case EListStyleType::ArabicIndic: - case EListStyleType::Bengali: - case EListStyleType::Cambodian: - case EListStyleType::CjkIdeographic: - case EListStyleType::CjkEarthlyBranch: - case EListStyleType::CjkHeavenlyStem: - case EListStyleType::DecimalLeadingZero: - case EListStyleType::Decimal: - case EListStyleType::Devanagari: - case EListStyleType::Georgian: - case EListStyleType::Gujarati: - case EListStyleType::Gurmukhi: - case EListStyleType::Hangul: - case EListStyleType::HangulConsonant: - case EListStyleType::Hebrew: - case EListStyleType::Hiragana: - case EListStyleType::HiraganaIroha: - case EListStyleType::Kannada: - case EListStyleType::Katakana: - case EListStyleType::KatakanaIroha: - case EListStyleType::Khmer: - case EListStyleType::Lao: - case EListStyleType::LowerAlpha: - case EListStyleType::LowerArmenian: - case EListStyleType::LowerGreek: - case EListStyleType::LowerLatin: - case EListStyleType::LowerRoman: - case EListStyleType::Malayalam: - case EListStyleType::Mongolian: - case EListStyleType::Myanmar: - case EListStyleType::Oriya: - case EListStyleType::Persian: - case EListStyleType::Telugu: - case EListStyleType::Thai: - case EListStyleType::Tibetan: - case EListStyleType::UpperAlpha: - case EListStyleType::UpperArmenian: - case EListStyleType::UpperLatin: - case EListStyleType::UpperRoman: - case EListStyleType::Urdu: + case EListStyleType::kArmenian: + case EListStyleType::kArabicIndic: + case EListStyleType::kBengali: + case EListStyleType::kCambodian: + case EListStyleType::kCjkIdeographic: + case EListStyleType::kCjkEarthlyBranch: + case EListStyleType::kCjkHeavenlyStem: + case EListStyleType::kDecimalLeadingZero: + case EListStyleType::kDecimal: + case EListStyleType::kDevanagari: + case EListStyleType::kGeorgian: + case EListStyleType::kGujarati: + case EListStyleType::kGurmukhi: + case EListStyleType::kHangul: + case EListStyleType::kHangulConsonant: + case EListStyleType::kHebrew: + case EListStyleType::kHiragana: + case EListStyleType::kHiraganaIroha: + case EListStyleType::kKannada: + case EListStyleType::kKatakana: + case EListStyleType::kKatakanaIroha: + case EListStyleType::kKhmer: + case EListStyleType::kLao: + case EListStyleType::kLowerAlpha: + case EListStyleType::kLowerArmenian: + case EListStyleType::kLowerGreek: + case EListStyleType::kLowerLatin: + case EListStyleType::kLowerRoman: + case EListStyleType::kMalayalam: + case EListStyleType::kMongolian: + case EListStyleType::kMyanmar: + case EListStyleType::kOriya: + case EListStyleType::kPersian: + case EListStyleType::kTelugu: + case EListStyleType::kThai: + case EListStyleType::kTibetan: + case EListStyleType::kUpperAlpha: + case EListStyleType::kUpperArmenian: + case EListStyleType::kUpperLatin: + case EListStyleType::kUpperRoman: + case EListStyleType::kUrdu: return '.'; - case EListStyleType::SimpChineseFormal: - case EListStyleType::SimpChineseInformal: - case EListStyleType::TradChineseFormal: - case EListStyleType::TradChineseInformal: - case EListStyleType::KoreanHangulFormal: - case EListStyleType::KoreanHanjaFormal: - case EListStyleType::KoreanHanjaInformal: + case EListStyleType::kSimpChineseFormal: + case EListStyleType::kSimpChineseInformal: + case EListStyleType::kTradChineseFormal: + case EListStyleType::kTradChineseInformal: + case EListStyleType::kKoreanHangulFormal: + case EListStyleType::kKoreanHanjaFormal: + case EListStyleType::kKoreanHanjaInformal: return 0x3001; } @@ -610,143 +610,143 @@ // outside its ordinal range then we fallback to some list style that can // represent |count|. switch (effectiveListMarkerType(type, count)) { - case EListStyleType::None: + case EListStyleType::kNone: return ""; // We use the same characters for text security. // See LayoutText::setInternalString. - case EListStyleType::Circle: + case EListStyleType::kCircle: return String(&whiteBulletCharacter, 1); - case EListStyleType::Disc: + case EListStyleType::kDisc: return String(&bulletCharacter, 1); - case EListStyleType::Square: + case EListStyleType::kSquare: // The CSS 2.1 test suite uses U+25EE BLACK MEDIUM SMALL SQUARE // instead, but I think this looks better. return String(&blackSquareCharacter, 1); - case EListStyleType::Decimal: + case EListStyleType::kDecimal: return String::number(count); - case EListStyleType::DecimalLeadingZero: + case EListStyleType::kDecimalLeadingZero: if (count < -9 || count > 9) return String::number(count); if (count < 0) return "-0" + String::number(-count); // -01 to -09 return "0" + String::number(count); // 00 to 09 - case EListStyleType::ArabicIndic: { + case EListStyleType::kArabicIndic: { static const UChar arabicIndicNumerals[10] = { 0x0660, 0x0661, 0x0662, 0x0663, 0x0664, 0x0665, 0x0666, 0x0667, 0x0668, 0x0669}; return toNumeric(count, arabicIndicNumerals); } - case EListStyleType::Bengali: { + case EListStyleType::kBengali: { static const UChar bengaliNumerals[10] = {0x09E6, 0x09E7, 0x09E8, 0x09E9, 0x09EA, 0x09EB, 0x09EC, 0x09ED, 0x09EE, 0x09EF}; return toNumeric(count, bengaliNumerals); } - case EListStyleType::Cambodian: - case EListStyleType::Khmer: { + case EListStyleType::kCambodian: + case EListStyleType::kKhmer: { static const UChar khmerNumerals[10] = {0x17E0, 0x17E1, 0x17E2, 0x17E3, 0x17E4, 0x17E5, 0x17E6, 0x17E7, 0x17E8, 0x17E9}; return toNumeric(count, khmerNumerals); } - case EListStyleType::Devanagari: { + case EListStyleType::kDevanagari: { static const UChar devanagariNumerals[10] = { 0x0966, 0x0967, 0x0968, 0x0969, 0x096A, 0x096B, 0x096C, 0x096D, 0x096E, 0x096F}; return toNumeric(count, devanagariNumerals); } - case EListStyleType::Gujarati: { + case EListStyleType::kGujarati: { static const UChar gujaratiNumerals[10] = {0x0AE6, 0x0AE7, 0x0AE8, 0x0AE9, 0x0AEA, 0x0AEB, 0x0AEC, 0x0AED, 0x0AEE, 0x0AEF}; return toNumeric(count, gujaratiNumerals); } - case EListStyleType::Gurmukhi: { + case EListStyleType::kGurmukhi: { static const UChar gurmukhiNumerals[10] = {0x0A66, 0x0A67, 0x0A68, 0x0A69, 0x0A6A, 0x0A6B, 0x0A6C, 0x0A6D, 0x0A6E, 0x0A6F}; return toNumeric(count, gurmukhiNumerals); } - case EListStyleType::Kannada: { + case EListStyleType::kKannada: { static const UChar kannadaNumerals[10] = {0x0CE6, 0x0CE7, 0x0CE8, 0x0CE9, 0x0CEA, 0x0CEB, 0x0CEC, 0x0CED, 0x0CEE, 0x0CEF}; return toNumeric(count, kannadaNumerals); } - case EListStyleType::Lao: { + case EListStyleType::kLao: { static const UChar laoNumerals[10] = {0x0ED0, 0x0ED1, 0x0ED2, 0x0ED3, 0x0ED4, 0x0ED5, 0x0ED6, 0x0ED7, 0x0ED8, 0x0ED9}; return toNumeric(count, laoNumerals); } - case EListStyleType::Malayalam: { + case EListStyleType::kMalayalam: { static const UChar malayalamNumerals[10] = { 0x0D66, 0x0D67, 0x0D68, 0x0D69, 0x0D6A, 0x0D6B, 0x0D6C, 0x0D6D, 0x0D6E, 0x0D6F}; return toNumeric(count, malayalamNumerals); } - case EListStyleType::Mongolian: { + case EListStyleType::kMongolian: { static const UChar mongolianNumerals[10] = { 0x1810, 0x1811, 0x1812, 0x1813, 0x1814, 0x1815, 0x1816, 0x1817, 0x1818, 0x1819}; return toNumeric(count, mongolianNumerals); } - case EListStyleType::Myanmar: { + case EListStyleType::kMyanmar: { static const UChar myanmarNumerals[10] = {0x1040, 0x1041, 0x1042, 0x1043, 0x1044, 0x1045, 0x1046, 0x1047, 0x1048, 0x1049}; return toNumeric(count, myanmarNumerals); } - case EListStyleType::Oriya: { + case EListStyleType::kOriya: { static const UChar oriyaNumerals[10] = {0x0B66, 0x0B67, 0x0B68, 0x0B69, 0x0B6A, 0x0B6B, 0x0B6C, 0x0B6D, 0x0B6E, 0x0B6F}; return toNumeric(count, oriyaNumerals); } - case EListStyleType::Persian: - case EListStyleType::Urdu: { + case EListStyleType::kPersian: + case EListStyleType::kUrdu: { static const UChar urduNumerals[10] = {0x06F0, 0x06F1, 0x06F2, 0x06F3, 0x06F4, 0x06F5, 0x06F6, 0x06F7, 0x06F8, 0x06F9}; return toNumeric(count, urduNumerals); } - case EListStyleType::Telugu: { + case EListStyleType::kTelugu: { static const UChar teluguNumerals[10] = {0x0C66, 0x0C67, 0x0C68, 0x0C69, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C6F}; return toNumeric(count, teluguNumerals); } - case EListStyleType::Tibetan: { + case EListStyleType::kTibetan: { static const UChar tibetanNumerals[10] = {0x0F20, 0x0F21, 0x0F22, 0x0F23, 0x0F24, 0x0F25, 0x0F26, 0x0F27, 0x0F28, 0x0F29}; return toNumeric(count, tibetanNumerals); } - case EListStyleType::Thai: { + case EListStyleType::kThai: { static const UChar thaiNumerals[10] = {0x0E50, 0x0E51, 0x0E52, 0x0E53, 0x0E54, 0x0E55, 0x0E56, 0x0E57, 0x0E58, 0x0E59}; return toNumeric(count, thaiNumerals); } - case EListStyleType::LowerAlpha: - case EListStyleType::LowerLatin: { + case EListStyleType::kLowerAlpha: + case EListStyleType::kLowerLatin: { static const LChar lowerLatinAlphabet[26] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'}; return toAlphabetic(count, lowerLatinAlphabet); } - case EListStyleType::UpperAlpha: - case EListStyleType::UpperLatin: { + case EListStyleType::kUpperAlpha: + case EListStyleType::kUpperLatin: { static const LChar upperLatinAlphabet[26] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'}; return toAlphabetic(count, upperLatinAlphabet); } - case EListStyleType::LowerGreek: { + case EListStyleType::kLowerGreek: { static const UChar lowerGreekAlphabet[24] = { 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA, 0x03BB, 0x03BC, 0x03BD, 0x03BE, 0x03BF, 0x03C0, @@ -754,7 +754,7 @@ return toAlphabetic(count, lowerGreekAlphabet); } - case EListStyleType::Hiragana: { + case EListStyleType::kHiragana: { // FIXME: This table comes from the CSS3 draft, and is probably // incorrect, given the comments in that draft. static const UChar hiraganaAlphabet[48] = { @@ -766,7 +766,7 @@ 0x308B, 0x308C, 0x308D, 0x308F, 0x3090, 0x3091, 0x3092, 0x3093}; return toAlphabetic(count, hiraganaAlphabet); } - case EListStyleType::HiraganaIroha: { + case EListStyleType::kHiraganaIroha: { // FIXME: This table comes from the CSS3 draft, and is probably // incorrect, given the comments in that draft. static const UChar hiraganaIrohaAlphabet[47] = { @@ -778,7 +778,7 @@ 0x307F, 0x3057, 0x3091, 0x3072, 0x3082, 0x305B, 0x3059}; return toAlphabetic(count, hiraganaIrohaAlphabet); } - case EListStyleType::Katakana: { + case EListStyleType::kKatakana: { // FIXME: This table comes from the CSS3 draft, and is probably // incorrect, given the comments in that draft. static const UChar katakanaAlphabet[48] = { @@ -790,7 +790,7 @@ 0x30EB, 0x30EC, 0x30ED, 0x30EF, 0x30F0, 0x30F1, 0x30F2, 0x30F3}; return toAlphabetic(count, katakanaAlphabet); } - case EListStyleType::KatakanaIroha: { + case EListStyleType::kKatakanaIroha: { // FIXME: This table comes from the CSS3 draft, and is probably // incorrect, given the comments in that draft. static const UChar katakanaIrohaAlphabet[47] = { @@ -803,31 +803,31 @@ return toAlphabetic(count, katakanaIrohaAlphabet); } - case EListStyleType::CjkEarthlyBranch: { + case EListStyleType::kCjkEarthlyBranch: { static const UChar cjkEarthlyBranchAlphabet[12] = { 0x5B50, 0x4E11, 0x5BC5, 0x536F, 0x8FB0, 0x5DF3, 0x5348, 0x672A, 0x7533, 0x9149, 0x620C, 0x4EA5}; return toAlphabetic(count, cjkEarthlyBranchAlphabet); } - case EListStyleType::CjkHeavenlyStem: { + case EListStyleType::kCjkHeavenlyStem: { static const UChar cjkHeavenlyStemAlphabet[10] = { 0x7532, 0x4E59, 0x4E19, 0x4E01, 0x620A, 0x5DF1, 0x5E9A, 0x8F9B, 0x58EC, 0x7678}; return toAlphabetic(count, cjkHeavenlyStemAlphabet); } - case EListStyleType::HangulConsonant: { + case EListStyleType::kHangulConsonant: { static const UChar hangulConsonantAlphabet[14] = { 0x3131, 0x3134, 0x3137, 0x3139, 0x3141, 0x3142, 0x3145, 0x3147, 0x3148, 0x314A, 0x314B, 0x314C, 0x314D, 0x314E}; return toAlphabetic(count, hangulConsonantAlphabet); } - case EListStyleType::Hangul: { + case EListStyleType::kHangul: { static const UChar hangulAlphabet[14] = { 0xAC00, 0xB098, 0xB2E4, 0xB77C, 0xB9C8, 0xBC14, 0xC0AC, 0xC544, 0xC790, 0xCC28, 0xCE74, 0xD0C0, 0xD30C, 0xD558}; return toAlphabetic(count, hangulAlphabet); } - case EListStyleType::EthiopicHalehame: { + case EListStyleType::kEthiopicHalehame: { static const UChar ethiopicHalehameGezAlphabet[26] = { 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1240, 0x1260, 0x1270, 0x1280, 0x1290, 0x12A0, 0x12A8, @@ -835,7 +835,7 @@ 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; return toAlphabetic(count, ethiopicHalehameGezAlphabet); } - case EListStyleType::EthiopicHalehameAm: { + case EListStyleType::kEthiopicHalehameAm: { static const UChar ethiopicHalehameAmAlphabet[33] = { 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, 0x1260, 0x1270, 0x1278, 0x1280, 0x1290, @@ -844,7 +844,7 @@ 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; return toAlphabetic(count, ethiopicHalehameAmAlphabet); } - case EListStyleType::EthiopicHalehameTiEr: { + case EListStyleType::kEthiopicHalehameTiEr: { static const UChar ethiopicHalehameTiErAlphabet[31] = { 0x1200, 0x1208, 0x1210, 0x1218, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250, 0x1260, 0x1270, 0x1278, 0x1290, 0x1298, 0x12A0, 0x12A8, @@ -852,7 +852,7 @@ 0x1308, 0x1320, 0x1328, 0x1330, 0x1338, 0x1348, 0x1350}; return toAlphabetic(count, ethiopicHalehameTiErAlphabet); } - case EListStyleType::EthiopicHalehameTiEt: { + case EListStyleType::kEthiopicHalehameTiEt: { static const UChar ethiopicHalehameTiEtAlphabet[34] = { 0x1200, 0x1208, 0x1210, 0x1218, 0x1220, 0x1228, 0x1230, 0x1238, 0x1240, 0x1250, 0x1260, 0x1270, 0x1278, 0x1280, @@ -861,7 +861,7 @@ 0x1328, 0x1330, 0x1338, 0x1340, 0x1348, 0x1350}; return toAlphabetic(count, ethiopicHalehameTiEtAlphabet); } - case EListStyleType::KoreanHangulFormal: { + case EListStyleType::kKoreanHangulFormal: { static const UChar koreanHangulFormalTable[26] = { Korean, 0xB9CC, 0x0000, 0xC5B5, 0x0000, 0xC870, 0x0000, 0xC2ED, 0xBC31, 0xCC9C, 0xC601, 0xC77C, 0xC774, 0xC0BC, @@ -869,7 +869,7 @@ 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; return toCJKIdeographic(count, koreanHangulFormalTable, Formal); } - case EListStyleType::KoreanHanjaFormal: { + case EListStyleType::kKoreanHanjaFormal: { static const UChar koreanHanjaFormalTable[26] = { Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x62FE, 0x767E, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3, @@ -877,7 +877,7 @@ 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; return toCJKIdeographic(count, koreanHanjaFormalTable, Formal); } - case EListStyleType::KoreanHanjaInformal: { + case EListStyleType::kKoreanHanjaInformal: { static const UChar koreanHanjaInformalTable[26] = { Korean, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x5341, 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, @@ -885,29 +885,29 @@ 0xC774, 0xB108, 0xC2A4, 0x0020, 0x0000}; return toCJKIdeographic(count, koreanHanjaInformalTable, Informal); } - case EListStyleType::CjkIdeographic: - case EListStyleType::TradChineseInformal: { + case EListStyleType::kCjkIdeographic: + case EListStyleType::kTradChineseInformal: { static const UChar traditionalChineseInformalTable[22] = { Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x5341, 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8CA0, 0x0000}; return toCJKIdeographic(count, traditionalChineseInformalTable, Informal); } - case EListStyleType::SimpChineseInformal: { + case EListStyleType::kSimpChineseInformal: { static const UChar simpleChineseInformalTable[22] = { Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x5341, 0x767E, 0x5343, 0x96F6, 0x4E00, 0x4E8C, 0x4E09, 0x56DB, 0x4E94, 0x516D, 0x4E03, 0x516B, 0x4E5D, 0x8D1F, 0x0000}; return toCJKIdeographic(count, simpleChineseInformalTable, Informal); } - case EListStyleType::TradChineseFormal: { + case EListStyleType::kTradChineseFormal: { static const UChar traditionalChineseFormalTable[22] = { Chinese, 0x842C, 0x0000, 0x5104, 0x0000, 0x5146, 0x0000, 0x62FE, 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8CB3, 0x53C3, 0x8086, 0x4F0D, 0x9678, 0x67D2, 0x634C, 0x7396, 0x8CA0, 0x0000}; return toCJKIdeographic(count, traditionalChineseFormalTable, Formal); } - case EListStyleType::SimpChineseFormal: { + case EListStyleType::kSimpChineseFormal: { static const UChar simpleChineseFormalTable[22] = { Chinese, 0x4E07, 0x0000, 0x4EBF, 0x0000, 0x4E07, 0x4EBF, 0x62FE, 0x4F70, 0x4EDF, 0x96F6, 0x58F9, 0x8D30, 0x53C1, 0x8086, 0x4F0D, @@ -915,22 +915,22 @@ return toCJKIdeographic(count, simpleChineseFormalTable, Formal); } - case EListStyleType::LowerRoman: + case EListStyleType::kLowerRoman: return toRoman(count, false); - case EListStyleType::UpperRoman: + case EListStyleType::kUpperRoman: return toRoman(count, true); - case EListStyleType::Armenian: - case EListStyleType::UpperArmenian: + case EListStyleType::kArmenian: + case EListStyleType::kUpperArmenian: // CSS3 says "armenian" means "lower-armenian". // But the CSS2.1 test suite contains uppercase test results for // "armenian", so we'll match the test suite. return toArmenian(count, true); - case EListStyleType::LowerArmenian: + case EListStyleType::kLowerArmenian: return toArmenian(count, false); - case EListStyleType::Georgian: + case EListStyleType::kGeorgian: return toGeorgian(count); - case EListStyleType::Hebrew: + case EListStyleType::kHebrew: return toHebrew(count); }
diff --git a/third_party/WebKit/Source/core/layout/PointerEventsHitRules.cpp b/third_party/WebKit/Source/core/layout/PointerEventsHitRules.cpp index 5f80f45..fc60bd0 100644 --- a/third_party/WebKit/Source/core/layout/PointerEventsHitRules.cpp +++ b/third_party/WebKit/Source/core/layout/PointerEventsHitRules.cpp
@@ -41,82 +41,82 @@ canHitFill(false), canHitBoundingBox(false) { if (request.svgClipContent()) - pointerEvents = EPointerEvents::Fill; + pointerEvents = EPointerEvents::kFill; if (hitTesting == SVG_GEOMETRY_HITTESTING) { switch (pointerEvents) { - case EPointerEvents::BoundingBox: + case EPointerEvents::kBoundingBox: canHitBoundingBox = true; break; - case EPointerEvents::VisiblePainted: - case EPointerEvents::Auto: // "auto" is like "visiblePainted" when in - // SVG content + case EPointerEvents::kVisiblePainted: + case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in + // SVG content requireFill = true; requireStroke = true; - case EPointerEvents::Visible: + case EPointerEvents::kVisible: requireVisible = true; canHitFill = true; canHitStroke = true; break; - case EPointerEvents::VisibleFill: + case EPointerEvents::kVisibleFill: requireVisible = true; canHitFill = true; break; - case EPointerEvents::VisibleStroke: + case EPointerEvents::kVisibleStroke: requireVisible = true; canHitStroke = true; break; - case EPointerEvents::Painted: + case EPointerEvents::kPainted: requireFill = true; requireStroke = true; - case EPointerEvents::All: + case EPointerEvents::kAll: canHitFill = true; canHitStroke = true; break; - case EPointerEvents::Fill: + case EPointerEvents::kFill: canHitFill = true; break; - case EPointerEvents::Stroke: + case EPointerEvents::kStroke: canHitStroke = true; break; - case EPointerEvents::None: + case EPointerEvents::kNone: // nothing to do here, defaults are all false. break; } } else { switch (pointerEvents) { - case EPointerEvents::BoundingBox: + case EPointerEvents::kBoundingBox: canHitBoundingBox = true; break; - case EPointerEvents::VisiblePainted: - case EPointerEvents::Auto: // "auto" is like "visiblePainted" when in - // SVG content + case EPointerEvents::kVisiblePainted: + case EPointerEvents::kAuto: // "auto" is like "visiblePainted" when in + // SVG content requireVisible = true; requireFill = true; requireStroke = true; canHitFill = true; canHitStroke = true; break; - case EPointerEvents::VisibleFill: - case EPointerEvents::VisibleStroke: - case EPointerEvents::Visible: + case EPointerEvents::kVisibleFill: + case EPointerEvents::kVisibleStroke: + case EPointerEvents::kVisible: requireVisible = true; canHitFill = true; canHitStroke = true; break; - case EPointerEvents::Painted: + case EPointerEvents::kPainted: requireFill = true; requireStroke = true; canHitFill = true; canHitStroke = true; break; - case EPointerEvents::Fill: - case EPointerEvents::Stroke: - case EPointerEvents::All: + case EPointerEvents::kFill: + case EPointerEvents::kStroke: + case EPointerEvents::kAll: canHitFill = true; canHitStroke = true; break; - case EPointerEvents::None: + case EPointerEvents::kNone: // nothing to do here, defaults are all false. break; }
diff --git a/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp b/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp index 3985417..ce2f8a7 100644 --- a/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp +++ b/third_party/WebKit/Source/core/layout/TextRunConstructor.cpp
@@ -129,7 +129,7 @@ TextRunFlags flags) { return constructTextRun(font, string, style, string.isEmpty() || string.is8Bit() - ? TextDirection::Ltr + ? TextDirection::kLtr : determineDirectionality(string), flags); } @@ -142,15 +142,15 @@ ASSERT(offset + length <= text.textLength()); if (text.hasEmptyText()) { return constructTextRunInternal(font, static_cast<const LChar*>(nullptr), 0, - style, TextDirection::Ltr); + style, TextDirection::kLtr); } if (text.is8Bit()) { return constructTextRunInternal(font, text.characters8() + offset, length, - style, TextDirection::Ltr); + style, TextDirection::kLtr); } TextRun run = constructTextRunInternal(font, text.characters16() + offset, - length, style, TextDirection::Ltr); + length, style, TextDirection::kLtr); run.setDirection(directionForRun(run)); return run; }
diff --git a/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp b/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp index 0f681b5..c726e40 100644 --- a/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp +++ b/third_party/WebKit/Source/core/layout/line/AbstractInlineTextBox.cpp
@@ -115,11 +115,11 @@ return LeftToRight; if (m_lineLayoutItem.style()->isHorizontalWritingMode()) { - return (m_inlineTextBox->direction() == TextDirection::Rtl ? RightToLeft - : LeftToRight); + return (m_inlineTextBox->direction() == TextDirection::kRtl ? RightToLeft + : LeftToRight); } - return (m_inlineTextBox->direction() == TextDirection::Rtl ? BottomToTop - : TopToBottom); + return (m_inlineTextBox->direction() == TextDirection::kRtl ? BottomToTop + : TopToBottom); } void AbstractInlineTextBox::characterWidths(Vector<float>& widths) const {
diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContext.cpp b/third_party/WebKit/Source/core/layout/line/BreakingContext.cpp index fbb93d0..f680ad1 100644 --- a/third_party/WebKit/Source/core/layout/line/BreakingContext.cpp +++ b/third_party/WebKit/Source/core/layout/line/BreakingContext.cpp
@@ -31,7 +31,8 @@ (!m_lineBreak.getLineLayoutItem() || !m_lineBreak.getLineLayoutItem().isBR())) { // we just add as much as possible - if (m_blockStyle->whiteSpace() == EWhiteSpace::Pre && !m_current.offset()) { + if (m_blockStyle->whiteSpace() == EWhiteSpace::kPre && + !m_current.offset()) { m_lineBreak.moveTo(m_lastObject, m_lastObject.isText() ? m_lastObject.length() : 0); } else if (m_lineBreak.getLineLayoutItem()) {
diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h index ebebad9..27c44facd 100644 --- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h +++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
@@ -73,8 +73,8 @@ m_lineInfo(inLineInfo), m_layoutTextInfo(inLayoutTextInfo), m_width(lineWidth), - m_currWS(EWhiteSpace::Normal), - m_lastWS(EWhiteSpace::Normal), + m_currWS(EWhiteSpace::kNormal), + m_lastWS(EWhiteSpace::kNormal), m_preservesNewline(false), m_atStart(true), m_ignoringSpaces(false), @@ -146,7 +146,7 @@ InlineIterator handleEndOfLine(); void clearLineBreakIfFitsOnLine() { - if (m_width.fitsOnLine() || m_lastWS == EWhiteSpace::Nowrap) + if (m_width.fitsOnLine() || m_lastWS == EWhiteSpace::kNowrap) m_lineBreak.clear(); } @@ -243,7 +243,7 @@ // set to 'pre-wrap', UAs may visually collapse them. return style.collapseWhiteSpace() || (whitespacePosition == TrailingWhitespace && - style.whiteSpace() == EWhiteSpace::PreWrap && + style.whiteSpace() == EWhiteSpace::kPreWrap && (!lineInfo.isEmpty() || !lineInfo.previousLineBrokeCleanly())); } @@ -671,8 +671,8 @@ textDirectionFromUnicode(WTF::Unicode::CharDirection direction) { return direction == WTF::Unicode::RightToLeft || direction == WTF::Unicode::RightToLeftArabic - ? TextDirection::Rtl - : TextDirection::Ltr; + ? TextDirection::kRtl + : TextDirection::kLtr; } ALWAYS_INLINE float textWidth( @@ -943,7 +943,7 @@ // on the line, that is, if |w| is zero. bool breakWords = m_currentStyle->breakWords() && ((m_autoWrap && !m_width.committedWidth()) || - m_currWS == EWhiteSpace::Pre); + m_currWS == EWhiteSpace::kPre); bool midWordBreak = false; bool breakAll = m_currentStyle->wordBreak() == BreakAllWordBreak && m_autoWrap; @@ -1033,7 +1033,7 @@ int nextBreakablePosition = m_current.nextBreakablePosition(); bool betweenWords = c == newlineCharacter || - (m_currWS != EWhiteSpace::Pre && !m_atStart && + (m_currWS != EWhiteSpace::kPre && !m_atStart && m_layoutTextInfo.m_lineBreakIterator.isBreakable( m_current.offset(), nextBreakablePosition, lineBreakType) && (!disableSoftHyphen || @@ -1453,7 +1453,7 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded() { bool checkForBreak = m_autoWrap; if (m_width.committedWidth() && !m_width.fitsOnLine() && - m_lineBreak.getLineLayoutItem() && m_currWS == EWhiteSpace::Nowrap) { + m_lineBreak.getLineLayoutItem() && m_currWS == EWhiteSpace::kNowrap) { if (m_width.fitsOnLine(0, ExcludeWhitespace)) { m_width.commit(); m_lineBreak.moveToStartOf(m_nextObject);
diff --git a/third_party/WebKit/Source/core/layout/line/InlineBox.h b/third_party/WebKit/Source/core/layout/line/InlineBox.h index a55b061..244049e 100644 --- a/third_party/WebKit/Source/core/layout/line/InlineBox.h +++ b/third_party/WebKit/Source/core/layout/line/InlineBox.h
@@ -301,10 +301,10 @@ m_bitfields.setBidiEmbeddingLevel(level); } TextDirection direction() const { - return bidiLevel() % 2 ? TextDirection::Rtl : TextDirection::Ltr; + return bidiLevel() % 2 ? TextDirection::kRtl : TextDirection::kLtr; } bool isLeftToRightDirection() const { - return direction() == TextDirection::Ltr; + return direction() == TextDirection::kLtr; } int caretLeftmostOffset() const { return isLeftToRightDirection() ? caretMinOffset() : caretMaxOffset();
diff --git a/third_party/WebKit/Source/core/layout/line/InlineIterator.h b/third_party/WebKit/Source/core/layout/line/InlineIterator.h index eb5fab1b..4c17835d 100644 --- a/third_party/WebKit/Source/core/layout/line/InlineIterator.h +++ b/third_party/WebKit/Source/core/layout/line/InlineIterator.h
@@ -147,10 +147,10 @@ EUnicodeBidi unicodeBidi) { using namespace WTF::Unicode; if (unicodeBidi == Embed) { - return dir == TextDirection::Rtl ? RightToLeftEmbedding - : LeftToRightEmbedding; + return dir == TextDirection::kRtl ? RightToLeftEmbedding + : LeftToRightEmbedding; } - return dir == TextDirection::Rtl ? RightToLeftOverride : LeftToRightOverride; + return dir == TextDirection::kRtl ? RightToLeftOverride : LeftToRightOverride; } static inline bool treatAsIsolated(const ComputedStyle& style) { @@ -595,7 +595,7 @@ BidiRun* newTrailingRun = new BidiRun( context->override(), context->level(), start, stop, run->m_lineLayoutItem, WTF::Unicode::OtherNeutral, context->dir()); - if (direction == TextDirection::Ltr) + if (direction == TextDirection::kLtr) runs.addRun(newTrailingRun); else runs.prependRun(newTrailingRun);
diff --git a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp index be759d6d..16fd0e9 100644 --- a/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp +++ b/third_party/WebKit/Source/core/layout/line/InlineTextBox.cpp
@@ -381,7 +381,7 @@ LayoutUnit widthOfVisibleText(getLineLayoutItem().width( ltr == flowIsLTR ? m_start : m_start + offset, ltr == flowIsLTR ? offset : m_len - offset, textPos(), - flowIsLTR ? TextDirection::Ltr : TextDirection::Rtl, + flowIsLTR ? TextDirection::kLtr : TextDirection::kRtl, isFirstLineStyle())); // The ellipsis needs to be placed just after the last visible character.
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc index 22653a0..98f327e 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils.cc
@@ -85,7 +85,7 @@ margin_right = LayoutUnit(); DCHECK(child_minmax.has_value()); width = child_minmax->ShrinkToFit(container_size.width); - if (space.Direction() == TextDirection::Ltr) { + if (space.Direction() == TextDirection::kLtr) { left = static_position.LeftPosition(container_size.width, *width, *margin_left, *margin_right); } else { @@ -103,7 +103,7 @@ margin_right = margin_space / 2; } else { // Margins are negative. - if (space.Direction() == TextDirection::Ltr) { + if (space.Direction() == TextDirection::kLtr) { margin_left = LayoutUnit(); margin_right = margin_space; } else { @@ -119,7 +119,7 @@ // Are values overconstrained? if (*margin_left + *margin_right != margin_space) { // Relax the end. - if (space.Direction() == TextDirection::Ltr) + if (space.Direction() == TextDirection::kLtr) right = *right - *margin_left + *margin_right - margin_space; else left = *left - *margin_left + *margin_right - margin_space; @@ -142,7 +142,7 @@ } else if (!left && !right) { // Rule 2. DCHECK(width.has_value()); - if (space.Direction() == TextDirection::Ltr) + if (space.Direction() == TextDirection::kLtr) left = static_position.LeftPosition(container_size.width, *width, *margin_left, *margin_right); else
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc index 81093f4..ed1efd1 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_absolute_utils_test.cc
@@ -28,16 +28,16 @@ NGConstraintSpaceBuilder builder(kHorizontalTopBottom); builder.SetAvailableSize(container_size_); ltr_space_ = builder.SetWritingMode(kHorizontalTopBottom) - .SetTextDirection(TextDirection::Ltr) + .SetTextDirection(TextDirection::kLtr) .ToConstraintSpace(); rtl_space_ = builder.SetWritingMode(kHorizontalTopBottom) - .SetTextDirection(TextDirection::Rtl) + .SetTextDirection(TextDirection::kRtl) .ToConstraintSpace(); vertical_lr_space_ = builder.SetWritingMode(kVerticalLeftRight) - .SetTextDirection(TextDirection::Ltr) + .SetTextDirection(TextDirection::kLtr) .ToConstraintSpace(); vertical_rl_space_ = builder.SetWritingMode(kVerticalLeftRight) - .SetTextDirection(TextDirection::Ltr) + .SetTextDirection(TextDirection::kLtr) .ToConstraintSpace(); }
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc b/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc index 44ef541..4f81ef3a 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_bidi_paragraph.cc
@@ -23,8 +23,8 @@ ubidi_, text.characters16(), text.length(), block_style->unicodeBidi() == Plaintext ? UBIDI_DEFAULT_LTR - : (block_style->direction() == TextDirection::Rtl ? UBIDI_RTL - : UBIDI_LTR), + : (block_style->direction() == TextDirection::kRtl ? UBIDI_RTL + : UBIDI_LTR), nullptr, &error); if (U_FAILURE(error)) { NOTREACHED();
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc index 4116155..b4962d6 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm.cc
@@ -505,7 +505,7 @@ NGExclusion::Type exclusion_type = NGExclusion::kFloatLeft; // Calculate the float offset if needed. LayoutUnit float_offset; - if (CurrentChildStyle().floating() == EFloat::Right) { + if (CurrentChildStyle().floating() == EFloat::kRight) { float_offset = opportunity.size.inline_size - fragment.InlineSize(); exclusion_type = NGExclusion::kFloatRight; }
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc index 4f17239725..0adf233d 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_block_layout_algorithm_test.cc
@@ -55,7 +55,7 @@ // The constraint space is not used for min/max computation, but we need // it to create the algorithm. NGConstraintSpace* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(), LayoutUnit())); NGBlockLayoutAlgorithm algorithm(style_.get(), first_child, space); MinAndMaxContentSizes sizes; @@ -78,7 +78,7 @@ style_->setHeight(Length(40, Fixed)); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, nullptr); @@ -108,7 +108,7 @@ first_child->SetNextSibling(second_child); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, first_child); @@ -141,20 +141,20 @@ const int kMarginLeft = 100; RefPtr<ComputedStyle> div1_style = ComputedStyle::create(); - div1_style->setWritingMode(WritingMode::VerticalLr); + div1_style->setWritingMode(WritingMode::kVerticalLr); NGBlockNode* div1 = new NGBlockNode(div1_style.get()); RefPtr<ComputedStyle> div2_style = ComputedStyle::create(); div2_style->setHeight(Length(kHeight, Fixed)); div2_style->setWidth(Length(kWidth, Fixed)); - div1_style->setWritingMode(WritingMode::HorizontalTb); + div1_style->setWritingMode(WritingMode::kHorizontalTb); div2_style->setMarginLeft(Length(kMarginLeft, Fixed)); NGBlockNode* div2 = new NGBlockNode(div2_style.get()); div1->SetFirstChild(div2); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(500), LayoutUnit(500))); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -202,7 +202,7 @@ .SetAvailableSize(NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)) .SetPercentageResolutionSize( NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)) - .SetTextDirection(TextDirection::Ltr) + .SetTextDirection(TextDirection::kLtr) .SetIsNewFormattingContext(true) .ToConstraintSpace(); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -277,7 +277,7 @@ div6->SetNextSibling(div7); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -326,7 +326,7 @@ div1->SetFirstChild(div2); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -375,7 +375,7 @@ div1->SetFirstChild(div2); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -414,7 +414,7 @@ style_->setWidth(Length(500, Fixed)); style_->setHeight(Length(500, Fixed)); - style_->setWritingMode(WritingMode::VerticalLr); + style_->setWritingMode(WritingMode::kVerticalLr); // Vertical DIV RefPtr<ComputedStyle> vertical_style = ComputedStyle::create(); @@ -425,13 +425,13 @@ // Horizontal DIV RefPtr<ComputedStyle> horizontal_style = ComputedStyle::create(); horizontal_style->setMarginLeft(Length(kHorizontalDivMarginLeft, Fixed)); - horizontal_style->setWritingMode(WritingMode::HorizontalTb); + horizontal_style->setWritingMode(WritingMode::kHorizontalTb); NGBlockNode* horizontal_div = new NGBlockNode(horizontal_style.get()); vertical_div->SetNextSibling(horizontal_div); auto* space = - ConstructConstraintSpace(kVerticalLeftRight, TextDirection::Ltr, + ConstructConstraintSpace(kVerticalLeftRight, TextDirection::kLtr, NGLogicalSize(LayoutUnit(500), LayoutUnit(500))); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, vertical_div); @@ -469,7 +469,7 @@ RefPtr<ComputedStyle> div1_style = ComputedStyle::create(); div1_style->setWidth(Length(kWidth, Fixed)); div1_style->setHeight(Length(kHeight, Fixed)); - div1_style->setWritingMode(WritingMode::VerticalRl); + div1_style->setWritingMode(WritingMode::kVerticalRl); div1_style->setMarginBottom(Length(kMarginBottom, Fixed)); NGBlockNode* div1 = new NGBlockNode(div1_style.get()); @@ -489,7 +489,7 @@ div1->SetNextSibling(div3); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(500), LayoutUnit(500))); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -552,7 +552,7 @@ div1->SetFirstChild(div2); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(1000), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); @@ -586,7 +586,7 @@ NGBlockNode* first_child = new NGBlockNode(first_style.get()); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, first_child); @@ -614,7 +614,7 @@ NGBlockNode* first_child = new NGBlockNode(first_style.get()); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite)); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, first_child); @@ -665,7 +665,7 @@ RefPtr<ComputedStyle> div1_style = ComputedStyle::create(); div1_style->setWidth(Length(kDiv1Size, Fixed)); div1_style->setHeight(Length(kDiv1Size, Fixed)); - div1_style->setFloating(EFloat::Left); + div1_style->setFloating(EFloat::kLeft); div1_style->setMarginTop(Length(kDiv1TopMargin, Fixed)); NGBlockNode* div1 = new NGBlockNode(div1_style.get()); @@ -679,7 +679,7 @@ RefPtr<ComputedStyle> div3_style = ComputedStyle::create(); div3_style->setWidth(Length(kDiv3Size, Fixed)); div3_style->setHeight(Length(kDiv3Size, Fixed)); - div3_style->setFloating(EFloat::Right); + div3_style->setFloating(EFloat::kRight); NGBlockNode* div3 = new NGBlockNode(div3_style.get()); // DIV4 @@ -687,7 +687,7 @@ div4_style->setWidth(Length(kDiv4Size, Fixed)); div4_style->setHeight(Length(kDiv4Size, Fixed)); div4_style->setMarginLeft(Length(kDiv4LeftMargin, Fixed)); - div4_style->setFloating(EFloat::Left); + div4_style->setFloating(EFloat::kLeft); NGBlockNode* div4 = new NGBlockNode(div4_style.get()); div1->SetNextSibling(div2); @@ -695,7 +695,7 @@ div3->SetNextSibling(div4); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize))); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); ASSERT_EQ(frag->Children().size(), 4UL); @@ -749,7 +749,7 @@ RefPtr<ComputedStyle> div1_style = ComputedStyle::create(); div1_style->setWidth(Length(kDiv1Size, Fixed)); div1_style->setHeight(Length(kDiv1Size, Fixed)); - div1_style->setFloating(EFloat::Left); + div1_style->setFloating(EFloat::kLeft); NGBlockNode* div1 = new NGBlockNode(div1_style.get()); // DIV2 @@ -757,7 +757,7 @@ div2_style->setWidth(Length(kDiv2Size, Fixed)); div2_style->setHeight(Length(kDiv2Size, Fixed)); div2_style->setClear(EClear::ClearLeft); - div2_style->setFloating(EFloat::Right); + div2_style->setFloating(EFloat::kRight); NGBlockNode* div2 = new NGBlockNode(div2_style.get()); // DIV3 @@ -772,7 +772,7 @@ // clear: left; div3_style->setClear(EClear::ClearLeft); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize))); NGPhysicalBoxFragment* frag = RunBlockLayoutAlgorithm(space, div1); const NGPhysicalFragment* child3 = frag->Children()[2]; @@ -781,7 +781,7 @@ // clear: right; div3_style->setClear(EClear::ClearRight); space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize))); frag = RunBlockLayoutAlgorithm(space, div1); child3 = frag->Children()[2]; @@ -790,11 +790,11 @@ // clear: both; div3_style->setClear(EClear::ClearBoth); space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize))); frag = RunBlockLayoutAlgorithm(space, div1); space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(kParentSize), LayoutUnit(kParentSize))); child3 = frag->Children()[2]; EXPECT_EQ(kDiv1Size + kDiv2Size, child3->TopOffset()); @@ -840,7 +840,7 @@ first_child->SetNextSibling(second_child); auto* space = ConstructConstraintSpace( - kHorizontalTopBottom, TextDirection::Ltr, + kHorizontalTopBottom, TextDirection::kLtr, NGLogicalSize(LayoutUnit(100), NGSizeIndefinite), true); NGPhysicalFragment* frag = RunBlockLayoutAlgorithm(space, first_child);
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc index 33c52f6..9d72ce9 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_builder.cc
@@ -32,7 +32,7 @@ is_block_direction_triggers_scrollbar_(false), fragmentation_type_(kFragmentNone), is_new_fc_(false), - text_direction_(static_cast<unsigned>(TextDirection::Ltr)), + text_direction_(static_cast<unsigned>(TextDirection::kLtr)), exclusions_(new NGExclusions()) {} NGConstraintSpaceBuilder& NGConstraintSpaceBuilder::SetAvailableSize(
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc index 0c16832..8a6fe311 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_constraint_space_test.cc
@@ -35,7 +35,7 @@ size.inline_size = LayoutUnit(600); size.block_size = LayoutUnit(400); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); auto* iterator = space->LayoutOpportunities(); EXPECT_EQ("0,0 600x400", OpportunityToString(iterator->Next())); EXPECT_EQ("(empty)", OpportunityToString(iterator->Next())); @@ -47,7 +47,7 @@ size.block_size = LayoutUnit(400); // Create a space with a 100x100 exclusion in the top right corner. auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); NGExclusion exclusion; exclusion.rect.size = {/* inline_size */ LayoutUnit(100), /* block_size */ LayoutUnit(100)}; @@ -69,7 +69,7 @@ size.block_size = LayoutUnit(400); // Create a space with a 100x100 exclusion in the top left corner. auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); NGExclusion exclusion; exclusion.rect.size = {/* inline_size */ LayoutUnit(100), /* block_size */ LayoutUnit(100)}; @@ -113,7 +113,7 @@ size.inline_size = LayoutUnit(600); size.block_size = LayoutUnit(400); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); // Add exclusions NGExclusion exclusion1; exclusion1.rect.size = {/* inline_size */ LayoutUnit(100), @@ -161,7 +161,7 @@ size.inline_size = LayoutUnit(600); size.block_size = LayoutUnit(400); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); // Add exclusions NGExclusion exclusion1; exclusion1.rect.size = {/* inline_size */ LayoutUnit(100), @@ -210,7 +210,7 @@ size.inline_size = LayoutUnit(600); size.block_size = LayoutUnit(100); auto* space = - ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::Ltr, size); + ConstructConstraintSpace(kHorizontalTopBottom, TextDirection::kLtr, size); NGExclusion exclusion; exclusion.rect.size = {/* inline_size */ LayoutUnit(100), /* block_size */ LayoutUnit(100)};
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc index 2d7ff3d..3dafd316 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_fragment_builder.cc
@@ -14,7 +14,7 @@ NGFragmentBuilder::NGFragmentBuilder(NGPhysicalFragment::NGFragmentType type) : type_(type), writing_mode_(kHorizontalTopBottom), - direction_(TextDirection::Ltr) {} + direction_(TextDirection::kLtr) {} NGFragmentBuilder& NGFragmentBuilder::SetWritingMode( NGWritingMode writing_mode) {
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_node.h b/third_party/WebKit/Source/core/layout/ng/ng_inline_node.h index 6dad8b6..d0b6c0d 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_inline_node.h +++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_node.h
@@ -100,7 +100,7 @@ unsigned StartOffset() const { return start_offset_; } unsigned EndOffset() const { return end_offset_; } TextDirection Direction() const { - return bidi_level_ & 1 ? TextDirection::Rtl : TextDirection::Ltr; + return bidi_level_ & 1 ? TextDirection::kRtl : TextDirection::kLtr; } UBiDiLevel BidiLevel() const { return bidi_level_; } UScriptCode Script() const { return script_; }
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc index 5bebe45a..8769b77 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_inline_node_test.cc
@@ -90,7 +90,7 @@ node->SegmentText(); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(1u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 5u, TextDirection::Ltr); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 5u, TextDirection::kLtr); } TEST_F(NGInlineNodeTest, SegmentHebrew) { @@ -100,7 +100,7 @@ ASSERT_EQ(1u, node->Items().size()); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(1u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 5u, TextDirection::Rtl); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 5u, TextDirection::kRtl); } TEST_F(NGInlineNodeTest, SegmentSplit1To2) { @@ -110,8 +110,8 @@ ASSERT_EQ(2u, node->Items().size()); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(2u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[1], 6u, 11u, TextDirection::Rtl); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[1], 6u, 11u, TextDirection::kRtl); } TEST_F(NGInlineNodeTest, SegmentSplit3To4) { @@ -122,10 +122,10 @@ node->SegmentText(); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(4u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 3u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[1], 3u, 6u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[2], 6u, 7u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[3], 7u, 11u, TextDirection::Rtl); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 3u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[1], 3u, 6u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[2], 6u, 7u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[3], 7u, 11u, TextDirection::kRtl); } TEST_F(NGInlineNodeTest, SegmentBidiOverride) { @@ -137,10 +137,10 @@ node->SegmentText(); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(4u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[1], 6u, 7u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[2], 7u, 10u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[3], 10u, 11u, TextDirection::Ltr); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[1], 6u, 7u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[2], 7u, 10u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[3], 10u, 11u, TextDirection::kLtr); } static NGInlineNodeForTest* CreateBidiIsolateNode(const ComputedStyle* style) { @@ -162,15 +162,15 @@ NGInlineNodeForTest* node = CreateBidiIsolateNode(style_.get()); Vector<NGLayoutInlineItem>& items = node->Items(); ASSERT_EQ(9u, items.size()); - TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[1], 6u, 7u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[2], 7u, 13u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[3], 13u, 14u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[4], 14u, 15u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[5], 15u, 16u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[6], 16u, 21u, TextDirection::Rtl); - TEST_ITEM_OFFSET_DIR(items[7], 21u, 22u, TextDirection::Ltr); - TEST_ITEM_OFFSET_DIR(items[8], 22u, 28u, TextDirection::Ltr); + TEST_ITEM_OFFSET_DIR(items[0], 0u, 6u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[1], 6u, 7u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[2], 7u, 13u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[3], 13u, 14u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[4], 14u, 15u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[5], 15u, 16u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[6], 16u, 21u, TextDirection::kRtl); + TEST_ITEM_OFFSET_DIR(items[7], 21u, 22u, TextDirection::kLtr); + TEST_ITEM_OFFSET_DIR(items[8], 22u, 28u, TextDirection::kLtr); } #define TEST_TEXT_FRAGMENT(fragment, node, start_index, end_index, dir) \ @@ -184,11 +184,11 @@ HeapVector<Member<const NGPhysicalTextFragment>> fragments; CreateLine(node, &fragments); ASSERT_EQ(5u, fragments.size()); - TEST_TEXT_FRAGMENT(fragments[0], node, 0u, 1u, TextDirection::Ltr); - TEST_TEXT_FRAGMENT(fragments[1], node, 6u, 7u, TextDirection::Rtl); - TEST_TEXT_FRAGMENT(fragments[2], node, 4u, 5u, TextDirection::Ltr); - TEST_TEXT_FRAGMENT(fragments[3], node, 2u, 3u, TextDirection::Rtl); - TEST_TEXT_FRAGMENT(fragments[4], node, 8u, 9u, TextDirection::Ltr); + TEST_TEXT_FRAGMENT(fragments[0], node, 0u, 1u, TextDirection::kLtr); + TEST_TEXT_FRAGMENT(fragments[1], node, 6u, 7u, TextDirection::kRtl); + TEST_TEXT_FRAGMENT(fragments[2], node, 4u, 5u, TextDirection::kLtr); + TEST_TEXT_FRAGMENT(fragments[3], node, 2u, 3u, TextDirection::kRtl); + TEST_TEXT_FRAGMENT(fragments[4], node, 8u, 9u, TextDirection::kLtr); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder.cc b/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder.cc index ceb680c..1ac3a1d 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder.cc
@@ -198,7 +198,7 @@ UChar ltr, UChar rtl) { AppendAsOpaqueToSpaceCollapsing( - style->direction() == TextDirection::Rtl ? rtl : ltr); + style->direction() == TextDirection::kRtl ? rtl : ltr); } void NGLayoutInlineItemsBuilder::EnterBlock(const ComputedStyle* style) {
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder_test.cc index 8f409f74..e058369 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_layout_inline_items_builder_test.cc
@@ -57,33 +57,33 @@ TEST_F(NGLayoutInlineItemsBuilderTest, CollapseSpaces) { String input("text text text text"); String collapsed("text text text text"); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Normal); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Nowrap); - TestWhitespaceValue(collapsed, input, EWhiteSpace::WebkitNowrap); - TestWhitespaceValue(collapsed, input, EWhiteSpace::PreLine); - TestWhitespaceValue(input, input, EWhiteSpace::Pre); - TestWhitespaceValue(input, input, EWhiteSpace::PreWrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNormal); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNowrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kWebkitNowrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kPreLine); + TestWhitespaceValue(input, input, EWhiteSpace::kPre); + TestWhitespaceValue(input, input, EWhiteSpace::kPreWrap); } TEST_F(NGLayoutInlineItemsBuilderTest, CollapseTabs) { String input("text\ttext\t text \t text"); String collapsed("text text text text"); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Normal); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Nowrap); - TestWhitespaceValue(collapsed, input, EWhiteSpace::WebkitNowrap); - TestWhitespaceValue(collapsed, input, EWhiteSpace::PreLine); - TestWhitespaceValue(input, input, EWhiteSpace::Pre); - TestWhitespaceValue(input, input, EWhiteSpace::PreWrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNormal); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNowrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kWebkitNowrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kPreLine); + TestWhitespaceValue(input, input, EWhiteSpace::kPre); + TestWhitespaceValue(input, input, EWhiteSpace::kPreWrap); } TEST_F(NGLayoutInlineItemsBuilderTest, CollapseNewLines) { String input("text\ntext \n text"); String collapsed("text text text"); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Normal); - TestWhitespaceValue(collapsed, input, EWhiteSpace::Nowrap); - TestWhitespaceValue("text\ntext\ntext", input, EWhiteSpace::PreLine); - TestWhitespaceValue(input, input, EWhiteSpace::Pre); - TestWhitespaceValue(input, input, EWhiteSpace::PreWrap); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNormal); + TestWhitespaceValue(collapsed, input, EWhiteSpace::kNowrap); + TestWhitespaceValue("text\ntext\ntext", input, EWhiteSpace::kPreLine); + TestWhitespaceValue(input, input, EWhiteSpace::kPre); + TestWhitespaceValue(input, input, EWhiteSpace::kPreWrap); } TEST_F(NGLayoutInlineItemsBuilderTest, CollapseAcrossElements) { @@ -96,7 +96,7 @@ } TEST_F(NGLayoutInlineItemsBuilderTest, CollapseBeforeAndAfterNewline) { - SetWhiteSpace(EWhiteSpace::PreLine); + SetWhiteSpace(EWhiteSpace::kPreLine); EXPECT_EQ("text\ntext", TestAppend("text \n text")) << "Spaces before and after newline are removed."; } @@ -104,7 +104,7 @@ TEST_F(NGLayoutInlineItemsBuilderTest, CollapsibleSpaceAfterNonCollapsibleSpaceAcrossElements) { NGLayoutInlineItemsBuilder builder(&items_); - RefPtr<ComputedStyle> pre_wrap(CreateWhitespaceStyle(EWhiteSpace::PreWrap)); + RefPtr<ComputedStyle> pre_wrap(CreateWhitespaceStyle(EWhiteSpace::kPreWrap)); builder.Append("text ", pre_wrap.get()); builder.Append(" text", style_.get()); EXPECT_EQ("text text", builder.ToString()) @@ -187,7 +187,7 @@ NGLayoutInlineItemsBuilder builder(&items); RefPtr<ComputedStyle> block_style(ComputedStyle::create()); block_style->setUnicodeBidi(Override); - block_style->setDirection(TextDirection::Rtl); + block_style->setDirection(TextDirection::kRtl); builder.EnterBlock(block_style.get()); builder.Append("Hello", style_.get()); builder.ExitBlock(); @@ -216,7 +216,7 @@ std::unique_ptr<LayoutInline> isolateRTL( createLayoutInline([](ComputedStyle* style) { style->setUnicodeBidi(Isolate); - style->setDirection(TextDirection::Rtl); + style->setDirection(TextDirection::kRtl); })); builder.EnterInline(isolateRTL.get()); builder.Append(u"\u05E2\u05D1\u05E8\u05D9\u05EA", style_.get()); @@ -240,7 +240,7 @@ std::unique_ptr<LayoutInline> isolateOverrideRTL( createLayoutInline([](ComputedStyle* style) { style->setUnicodeBidi(IsolateOverride); - style->setDirection(TextDirection::Rtl); + style->setDirection(TextDirection::kRtl); })); builder.EnterInline(isolateOverrideRTL.get()); builder.Append(u"\u05E2\u05D1\u05E8\u05D9\u05EA", style_.get());
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc index 5f5e867..ab82b08a 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_length_utils_test.cc
@@ -344,8 +344,8 @@ NGConstraintSpace* constraintSpace(ConstructConstraintSpace(200, 300)); - NGBoxStrut margins = ComputeMargins(*constraintSpace, *style_, - kHorizontalTopBottom, TextDirection::Ltr); + NGBoxStrut margins = ComputeMargins( + *constraintSpace, *style_, kHorizontalTopBottom, TextDirection::kLtr); EXPECT_EQ(LayoutUnit(20), margins.block_start); EXPECT_EQ(LayoutUnit(52), margins.inline_end); @@ -362,7 +362,7 @@ style_->setBorderRightStyle(BorderStyleSolid); style_->setBorderBottomStyle(BorderStyleSolid); style_->setBorderLeftStyle(BorderStyleSolid); - style_->setWritingMode(WritingMode::VerticalLr); + style_->setWritingMode(WritingMode::kVerticalLr); NGBoxStrut borders = ComputeBorders(*style_); @@ -377,7 +377,7 @@ style_->setPaddingRight(Length(52, Fixed)); style_->setPaddingBottom(Length(Auto)); style_->setPaddingLeft(Length(11, Percent)); - style_->setWritingMode(WritingMode::VerticalRl); + style_->setWritingMode(WritingMode::kVerticalRl); NGConstraintSpace* constraintSpace(ConstructConstraintSpace(200, 300)); @@ -397,7 +397,7 @@ builder.SetInlineSize(LayoutUnit(150)); NGPhysicalBoxFragment* physical_fragment = builder.ToBoxFragment(); NGBoxFragment* fragment = new NGBoxFragment( - kHorizontalTopBottom, TextDirection::Ltr, physical_fragment); + kHorizontalTopBottom, TextDirection::kLtr, physical_fragment); NGConstraintSpace* constraint_space(ConstructConstraintSpace(200, 300));
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units.cc b/third_party/WebKit/Source/core/layout/ng/ng_units.cc index fc94812..4db0bc8 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_units.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_units.cc
@@ -62,14 +62,14 @@ NGPhysicalSize inner_size) const { switch (mode) { case kHorizontalTopBottom: - if (direction == TextDirection::Ltr) + if (direction == TextDirection::kLtr) return NGPhysicalOffset(inline_offset, block_offset); else return NGPhysicalOffset( outer_size.width - inline_offset - inner_size.width, block_offset); case kVerticalRightLeft: case kSidewaysRightLeft: - if (direction == TextDirection::Ltr) + if (direction == TextDirection::kLtr) return NGPhysicalOffset( outer_size.width - block_offset - inner_size.width, inline_offset); else @@ -77,14 +77,14 @@ outer_size.width - block_offset - inner_size.width, outer_size.height - inline_offset - inner_size.height); case kVerticalLeftRight: - if (direction == TextDirection::Ltr) + if (direction == TextDirection::kLtr) return NGPhysicalOffset(block_offset, inline_offset); else return NGPhysicalOffset( block_offset, outer_size.height - inline_offset - inner_size.height); case kSidewaysLeftRight: - if (direction == TextDirection::Ltr) + if (direction == TextDirection::kLtr) return NGPhysicalOffset( block_offset, outer_size.height - inline_offset - inner_size.height); @@ -187,7 +187,7 @@ strut = {bottom, top, left, right}; break; } - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) std::swap(strut.inline_start, strut.inline_end); return strut; } @@ -282,20 +282,20 @@ position.offset = offset; switch (writing_mode) { case kHorizontalTopBottom: - position.type = (direction == TextDirection::Ltr) ? kTopLeft : kTopRight; + position.type = (direction == TextDirection::kLtr) ? kTopLeft : kTopRight; break; case kVerticalRightLeft: case kSidewaysRightLeft: position.type = - (direction == TextDirection::Ltr) ? kTopRight : kBottomRight; + (direction == TextDirection::kLtr) ? kTopRight : kBottomRight; break; case kVerticalLeftRight: position.type = - (direction == TextDirection::Ltr) ? kTopLeft : kBottomLeft; + (direction == TextDirection::kLtr) ? kTopLeft : kBottomLeft; break; case kSidewaysLeftRight: position.type = - (direction == TextDirection::Ltr) ? kBottomLeft : kTopLeft; + (direction == TextDirection::kLtr) ? kBottomLeft : kTopLeft; break; } return position;
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_units_test.cc b/third_party/WebKit/Source/core/layout/ng/ng_units_test.cc index f5a7b94..17c3fa70 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_units_test.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_units_test.cc
@@ -17,52 +17,52 @@ NGPhysicalOffset offset; offset = logical_offset.ConvertToPhysical( - kHorizontalTopBottom, TextDirection::Ltr, outer_size, inner_size); + kHorizontalTopBottom, TextDirection::kLtr, outer_size, inner_size); EXPECT_EQ(LayoutUnit(20), offset.left); EXPECT_EQ(LayoutUnit(30), offset.top); offset = logical_offset.ConvertToPhysical( - kHorizontalTopBottom, TextDirection::Rtl, outer_size, inner_size); + kHorizontalTopBottom, TextDirection::kRtl, outer_size, inner_size); EXPECT_EQ(LayoutUnit(275), offset.left); EXPECT_EQ(LayoutUnit(30), offset.top); offset = logical_offset.ConvertToPhysical( - kVerticalRightLeft, TextDirection::Ltr, outer_size, inner_size); + kVerticalRightLeft, TextDirection::kLtr, outer_size, inner_size); EXPECT_EQ(LayoutUnit(265), offset.left); EXPECT_EQ(LayoutUnit(20), offset.top); offset = logical_offset.ConvertToPhysical( - kVerticalRightLeft, TextDirection::Rtl, outer_size, inner_size); + kVerticalRightLeft, TextDirection::kRtl, outer_size, inner_size); EXPECT_EQ(LayoutUnit(265), offset.left); EXPECT_EQ(LayoutUnit(315), offset.top); offset = logical_offset.ConvertToPhysical( - kSidewaysRightLeft, TextDirection::Ltr, outer_size, inner_size); + kSidewaysRightLeft, TextDirection::kLtr, outer_size, inner_size); EXPECT_EQ(LayoutUnit(265), offset.left); EXPECT_EQ(LayoutUnit(20), offset.top); offset = logical_offset.ConvertToPhysical( - kSidewaysRightLeft, TextDirection::Rtl, outer_size, inner_size); + kSidewaysRightLeft, TextDirection::kRtl, outer_size, inner_size); EXPECT_EQ(LayoutUnit(265), offset.left); EXPECT_EQ(LayoutUnit(315), offset.top); offset = logical_offset.ConvertToPhysical( - kVerticalLeftRight, TextDirection::Ltr, outer_size, inner_size); + kVerticalLeftRight, TextDirection::kLtr, outer_size, inner_size); EXPECT_EQ(LayoutUnit(30), offset.left); EXPECT_EQ(LayoutUnit(20), offset.top); offset = logical_offset.ConvertToPhysical( - kVerticalLeftRight, TextDirection::Rtl, outer_size, inner_size); + kVerticalLeftRight, TextDirection::kRtl, outer_size, inner_size); EXPECT_EQ(LayoutUnit(30), offset.left); EXPECT_EQ(LayoutUnit(315), offset.top); offset = logical_offset.ConvertToPhysical( - kSidewaysLeftRight, TextDirection::Ltr, outer_size, inner_size); + kSidewaysLeftRight, TextDirection::kLtr, outer_size, inner_size); EXPECT_EQ(LayoutUnit(30), offset.left); EXPECT_EQ(LayoutUnit(315), offset.top); offset = logical_offset.ConvertToPhysical( - kSidewaysLeftRight, TextDirection::Rtl, outer_size, inner_size); + kSidewaysLeftRight, TextDirection::kRtl, outer_size, inner_size); EXPECT_EQ(LayoutUnit(30), offset.left); EXPECT_EQ(LayoutUnit(20), offset.top); } @@ -74,27 +74,28 @@ NGPhysicalBoxStrut physical{left, right, top, bottom}; NGBoxStrut logical = - physical.ConvertToLogical(kHorizontalTopBottom, TextDirection::Ltr); + physical.ConvertToLogical(kHorizontalTopBottom, TextDirection::kLtr); EXPECT_EQ(left, logical.inline_start); EXPECT_EQ(top, logical.block_start); - logical = physical.ConvertToLogical(kHorizontalTopBottom, TextDirection::Rtl); + logical = + physical.ConvertToLogical(kHorizontalTopBottom, TextDirection::kRtl); EXPECT_EQ(right, logical.inline_start); EXPECT_EQ(top, logical.block_start); - logical = physical.ConvertToLogical(kVerticalLeftRight, TextDirection::Ltr); + logical = physical.ConvertToLogical(kVerticalLeftRight, TextDirection::kLtr); EXPECT_EQ(top, logical.inline_start); EXPECT_EQ(left, logical.block_start); - logical = physical.ConvertToLogical(kVerticalLeftRight, TextDirection::Rtl); + logical = physical.ConvertToLogical(kVerticalLeftRight, TextDirection::kRtl); EXPECT_EQ(bottom, logical.inline_start); EXPECT_EQ(left, logical.block_start); - logical = physical.ConvertToLogical(kVerticalRightLeft, TextDirection::Ltr); + logical = physical.ConvertToLogical(kVerticalRightLeft, TextDirection::kLtr); EXPECT_EQ(top, logical.inline_start); EXPECT_EQ(right, logical.block_start); - logical = physical.ConvertToLogical(kVerticalRightLeft, TextDirection::Rtl); + logical = physical.ConvertToLogical(kVerticalRightLeft, TextDirection::kRtl); EXPECT_EQ(bottom, logical.inline_start); EXPECT_EQ(right, logical.block_start); }
diff --git a/third_party/WebKit/Source/core/layout/ng/ng_writing_mode.cc b/third_party/WebKit/Source/core/layout/ng/ng_writing_mode.cc index 8a9fef3..c9b65792 100644 --- a/third_party/WebKit/Source/core/layout/ng/ng_writing_mode.cc +++ b/third_party/WebKit/Source/core/layout/ng/ng_writing_mode.cc
@@ -10,11 +10,11 @@ NGWritingMode FromPlatformWritingMode(WritingMode mode) { switch (mode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return kHorizontalTopBottom; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return kVerticalRightLeft; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return kVerticalLeftRight; default: NOTREACHED();
diff --git a/third_party/WebKit/Source/core/layout/shapes/BoxShapeTest.cpp b/third_party/WebKit/Source/core/layout/shapes/BoxShapeTest.cpp index 9267fa5..1e3a708 100644 --- a/third_party/WebKit/Source/core/layout/shapes/BoxShapeTest.cpp +++ b/third_party/WebKit/Source/core/layout/shapes/BoxShapeTest.cpp
@@ -41,7 +41,7 @@ std::unique_ptr<Shape> createBoxShape(const FloatRoundedRect& bounds, float shapeMargin) { - return Shape::createLayoutBoxShape(bounds, WritingMode::HorizontalTb, + return Shape::createLayoutBoxShape(bounds, WritingMode::kHorizontalTb, shapeMargin); } };
diff --git a/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.cpp b/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.cpp index f67685c..400674b4 100644 --- a/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.cpp +++ b/third_party/WebKit/Source/core/layout/shapes/ShapeOutsideInfo.cpp
@@ -226,11 +226,11 @@ inline LayoutUnit borderBeforeInWritingMode(const LayoutBox& layoutBox, WritingMode writingMode) { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return LayoutUnit(layoutBox.borderTop()); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return LayoutUnit(layoutBox.borderLeft()); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return LayoutUnit(layoutBox.borderRight()); } @@ -242,11 +242,11 @@ const LayoutBox& layoutBox, WritingMode writingMode) { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return layoutBox.borderTop() + layoutBox.paddingTop(); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return layoutBox.borderLeft() + layoutBox.paddingLeft(); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return layoutBox.borderRight() + layoutBox.paddingRight(); }
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp index e24927b..e5839cc3 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
@@ -202,7 +202,7 @@ // pointer-events: bounding-box makes it possible for containers to be direct // targets. - if (style()->pointerEvents() == EPointerEvents::BoundingBox) { + if (style()->pointerEvents() == EPointerEvents::kBoundingBox) { // Check for a valid bounding box because it will be invalid for empty // containers. if (isObjectBoundingBoxValid() &&
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp index d95b556..ccd206be 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
@@ -165,7 +165,7 @@ PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_IMAGE_HITTESTING, result.hitTestRequest(), style()->pointerEvents()); - bool isVisible = (style()->visibility() == EVisibility::Visible); + bool isVisible = (style()->visibility() == EVisibility::kVisible); if (isVisible || !hitRules.requireVisible) { FloatPoint localPoint; if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp index f5f7ad34..1158e20 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInlineText.cpp
@@ -68,9 +68,9 @@ updateScaledFont(); bool newPreserves = - style() ? style()->whiteSpace() == EWhiteSpace::Pre : false; + style() ? style()->whiteSpace() == EWhiteSpace::kPre : false; bool oldPreserves = - oldStyle ? oldStyle->whiteSpace() == EWhiteSpace::Pre : false; + oldStyle ? oldStyle->whiteSpace() == EWhiteSpace::kPre : false; if (oldPreserves != newPreserves) { setText(originalText(), true); return; @@ -299,7 +299,7 @@ const float cachedFontHeight = fontData->getFontMetrics().floatHeight() / m_scalingFactor; - const bool preserveWhiteSpace = styleRef().whiteSpace() == EWhiteSpace::Pre; + const bool preserveWhiteSpace = styleRef().whiteSpace() == EWhiteSpace::kPre; const unsigned runLength = run.length(); // TODO(pdr): Character-based iteration is ambiguous and error-prone. It @@ -335,7 +335,7 @@ BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; BidiRunList<BidiCharacterRun>& bidiRuns = bidiResolver.runs(); bool bidiOverride = isOverride(styleRef().unicodeBidi()); - BidiStatus status(TextDirection::Ltr, bidiOverride); + BidiStatus status(TextDirection::kLtr, bidiOverride); if (run.is8Bit() || bidiOverride) { WTF::Unicode::CharDirection direction = WTF::Unicode::LeftToRight; // If BiDi override is in effect, use the specified direction.
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp index be03d5a..dbbcc32 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp
@@ -52,7 +52,7 @@ return ClipStrategy::None; const ComputedStyle& style = layoutObject->styleRef(); if (style.display() == EDisplay::None || - style.visibility() != EVisibility::Visible) + style.visibility() != EVisibility::kVisible) return ClipStrategy::None; ClipStrategy strategy = ClipStrategy::None; // Only shapes, paths and texts are allowed for clipping.
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp index c560c61..2e544acd 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -379,7 +379,7 @@ // LayoutSVGRootTest.VisualRectMappingWithViewportClipWithoutBorder). // Return early for any cases where we don't actually paint. - if (style()->visibility() != EVisibility::Visible && + if (style()->visibility() != EVisibility::kVisible && !enclosingLayer()->hasVisibleContent()) return LayoutRect();
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp index fbcb6a77b..e523e35d 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
@@ -278,7 +278,7 @@ bool LayoutSVGShape::nodeAtFloatPointInternal(const HitTestRequest& request, const FloatPoint& localPoint, PointerEventsHitRules hitRules) { - bool isVisible = (style()->visibility() == EVisibility::Visible); + bool isVisible = (style()->visibility() == EVisibility::kVisible); if (isVisible || !hitRules.requireVisible) { const SVGComputedStyle& svgStyle = style()->svgStyle(); WindRule fillRule = svgStyle.fillRule();
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp index f3cf24c..d0026cc 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
@@ -288,7 +288,7 @@ PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_TEXT_HITTESTING, result.hitTestRequest(), style()->pointerEvents()); - bool isVisible = (style()->visibility() == EVisibility::Visible); + bool isVisible = (style()->visibility() == EVisibility::kVisible); if (isVisible || !hitRules.requireVisible) { if ((hitRules.canHitBoundingBox && !objectBoundingBox().isEmpty()) || (hitRules.canHitStroke &&
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp index f7019f8..f3d53286 100644 --- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp +++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
@@ -61,7 +61,7 @@ DCHECK(!object.isSVGRoot()); // Return early for any cases where we don't actually paint - if (object.styleRef().visibility() != EVisibility::Visible && + if (object.styleRef().visibility() != EVisibility::kVisible && !object.enclosingLayer()->hasVisibleContent()) return FloatRect();
diff --git a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp index 2c9c5dc..573fcad 100644 --- a/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp +++ b/third_party/WebKit/Source/core/layout/svg/line/SVGInlineTextBox.cpp
@@ -290,7 +290,7 @@ result.hitTestRequest(), getLineLayoutItem().style()->pointerEvents()); bool isVisible = - getLineLayoutItem().style()->visibility() == EVisibility::Visible; + getLineLayoutItem().style()->visibility() == EVisibility::kVisible; if (isVisible || !hitRules.requireVisible) { if (hitRules.canHitBoundingBox || (hitRules.canHitStroke &&
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.cpp b/third_party/WebKit/Source/core/page/ChromeClient.cpp index 0722386..a8727006 100644 --- a/third_party/WebKit/Source/core/page/ChromeClient.cpp +++ b/third_party/WebKit/Source/core/page/ChromeClient.cpp
@@ -182,7 +182,7 @@ // implementations don't use text direction information for // ChromeClient::setToolTip. We'll work on tooltip text // direction during bidi cleanup in form inputs. - toolTipDirection = TextDirection::Ltr; + toolTipDirection = TextDirection::kLtr; } } } @@ -198,7 +198,7 @@ void ChromeClient::clearToolTip(LocalFrame& frame) { // Do not check m_lastToolTip* and do not update them intentionally. // We don't want to show tooltips with same content after clearToolTip(). - setToolTip(frame, String(), TextDirection::Ltr); + setToolTip(frame, String(), TextDirection::kLtr); } bool ChromeClient::print(LocalFrame* frame) {
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp index f4c99ed..c17939e1 100644 --- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp +++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -78,7 +78,7 @@ const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (m_layoutBlock.hasOverflowClip() && - m_layoutBlock.style()->visibility() == EVisibility::Visible && + m_layoutBlock.style()->visibility() == EVisibility::kVisible && shouldPaintSelfBlockBackground(paintInfo.phase) && !paintInfo.paintRootBackgroundOnly()) { Optional<ClipRecorder> clipRecorder; @@ -170,7 +170,7 @@ const PaintPhase paintPhase = paintInfo.phase; if (shouldPaintSelfBlockBackground(paintPhase)) { - if (m_layoutBlock.style()->visibility() == EVisibility::Visible && + if (m_layoutBlock.style()->visibility() == EVisibility::kVisible && m_layoutBlock.hasBoxDecorationBackground()) m_layoutBlock.paintBoxDecorationBackground(paintInfo, paintOffset); // We're done. We don't bother painting any children. @@ -182,13 +182,13 @@ return; if (paintPhase == PaintPhaseMask && - m_layoutBlock.style()->visibility() == EVisibility::Visible) { + m_layoutBlock.style()->visibility() == EVisibility::kVisible) { m_layoutBlock.paintMask(paintInfo, paintOffset); return; } if (paintPhase == PaintPhaseClippingMask && - m_layoutBlock.style()->visibility() == EVisibility::Visible) { + m_layoutBlock.style()->visibility() == EVisibility::kVisible) { BoxPainter(m_layoutBlock).paintClippingMask(paintInfo, paintOffset); return; }
diff --git a/third_party/WebKit/Source/core/paint/BoxPainter.cpp b/third_party/WebKit/Source/core/paint/BoxPainter.cpp index faa7b562..a58f9ca8 100644 --- a/third_party/WebKit/Source/core/paint/BoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/BoxPainter.cpp
@@ -798,7 +798,7 @@ void BoxPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutBox.style()->visibility() != EVisibility::Visible || + if (m_layoutBox.style()->visibility() != EVisibility::kVisible || paintInfo.phase != PaintPhaseMask) return; @@ -857,7 +857,7 @@ const LayoutPoint& paintOffset) { DCHECK(paintInfo.phase == PaintPhaseClippingMask); - if (m_layoutBox.style()->visibility() != EVisibility::Visible) + if (m_layoutBox.style()->visibility() != EVisibility::kVisible) return; if (!m_layoutBox.layer() || @@ -1084,7 +1084,7 @@ const ComputedStyle& style, const Document& document) { return document.printing() && - style.printColorAdjust() == EPrintColorAdjust::Economy && + style.printColorAdjust() == EPrintColorAdjust::kEconomy && (!document.settings() || !document.settings()->getShouldPrintBackgrounds()); }
diff --git a/third_party/WebKit/Source/core/paint/DetailsMarkerPainter.cpp b/third_party/WebKit/Source/core/paint/DetailsMarkerPainter.cpp index da1a3551..d41d8697 100644 --- a/third_party/WebKit/Source/core/paint/DetailsMarkerPainter.cpp +++ b/third_party/WebKit/Source/core/paint/DetailsMarkerPainter.cpp
@@ -16,7 +16,7 @@ void DetailsMarkerPainter::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (paintInfo.phase != PaintPhaseForeground || - m_layoutDetailsMarker.style()->visibility() != EVisibility::Visible) { + m_layoutDetailsMarker.style()->visibility() != EVisibility::kVisible) { BlockPainter(m_layoutDetailsMarker).paint(paintInfo, paintOffset); return; }
diff --git a/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp b/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp index f2b826f..3ec0d17 100644 --- a/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp +++ b/third_party/WebKit/Source/core/paint/FieldsetPainter.cpp
@@ -94,7 +94,7 @@ void FieldsetPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutFieldset.style()->visibility() != EVisibility::Visible || + if (m_layoutFieldset.style()->visibility() != EVisibility::kVisible || paintInfo.phase != PaintPhaseMask) return;
diff --git a/third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp b/third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp index 0dab0a9..9ef6246 100644 --- a/third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp +++ b/third_party/WebKit/Source/core/paint/FileUploadControlPainter.cpp
@@ -18,7 +18,7 @@ void FileUploadControlPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutFileUploadControl.style()->visibility() != EVisibility::Visible) + if (m_layoutFileUploadControl.style()->visibility() != EVisibility::kVisible) return; // Push a clip.
diff --git a/third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp index 335d1705..ee6bf7a 100644 --- a/third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/InlineFlowBoxPainter.cpp
@@ -181,7 +181,7 @@ // off. LayoutUnit logicalOffsetOnLine; LayoutUnit totalLogicalWidth; - if (direction == TextDirection::Ltr) { + if (direction == TextDirection::kLtr) { for (const InlineFlowBox* curr = m_inlineFlowBox.prevLineBox(); curr; curr = curr->prevLineBox()) logicalOffsetOnLine += curr->logicalWidth(); @@ -245,7 +245,7 @@ const LayoutRect& cullRect) { DCHECK(paintInfo.phase == PaintPhaseForeground); if (m_inlineFlowBox.getLineLayoutItem().style()->visibility() != - EVisibility::Visible) + EVisibility::kVisible) return; // You can use p::first-line to specify a background. If so, the root line @@ -316,7 +316,7 @@ // obviously not right, but it isn't even clear how this should work at // all. LayoutRect imageStripPaintRect = paintRectForImageStrip( - adjustedPaintOffset, frameRect.size(), TextDirection::Ltr); + adjustedPaintOffset, frameRect.size(), TextDirection::kLtr); GraphicsContextStateSaver stateSaver(paintInfo.context); paintInfo.context.clip(adjustedClipRect); BoxPainter::paintBorder( @@ -332,7 +332,7 @@ void InlineFlowBoxPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (m_inlineFlowBox.getLineLayoutItem().style()->visibility() != - EVisibility::Visible || + EVisibility::kVisible || paintInfo.phase != PaintPhaseMask) return; @@ -402,7 +402,7 @@ // FIXME: What the heck do we do with RTL here? The math we're using is // obviously not right, but it isn't even clear how this should work at all. LayoutRect imageStripPaintRect = paintRectForImageStrip( - adjustedPaintOffset, frameRect.size(), TextDirection::Ltr); + adjustedPaintOffset, frameRect.size(), TextDirection::kLtr); FloatRect clipRect(clipRectForNinePieceImageStrip( m_inlineFlowBox, maskNinePieceImage, paintRect)); GraphicsContextStateSaver stateSaver(paintInfo.context);
diff --git a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp index 2b15321b..c963f48 100644 --- a/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/InlineTextBoxPainter.cpp
@@ -663,7 +663,7 @@ // expect PaintPhaseSelection. The existing haveSelection logic in paint() // tests for != PaintPhaseTextClip. if (m_inlineTextBox.getLineLayoutItem().style()->visibility() != - EVisibility::Visible || + EVisibility::kVisible || m_inlineTextBox.truncation() == cFullTruncation || !m_inlineTextBox.len()) return false; return true; @@ -1056,7 +1056,7 @@ ltr == flowIsLTR ? m_inlineTextBox.truncation() : m_inlineTextBox.len() - m_inlineTextBox.truncation(), m_inlineTextBox.textPos(), - flowIsLTR ? TextDirection::Ltr : TextDirection::Rtl, + flowIsLTR ? TextDirection::kLtr : TextDirection::kRtl, m_inlineTextBox.isFirstLineStyle())); if (!flowIsLTR) localOrigin.move(m_inlineTextBox.logicalWidth() - width, LayoutUnit()); @@ -1167,8 +1167,8 @@ : m_inlineTextBox.getLineLayoutItem().width( m_inlineTextBox.start(), paintStart - m_inlineTextBox.start(), m_inlineTextBox.textPos(), - m_inlineTextBox.isLeftToRightDirection() ? TextDirection::Ltr - : TextDirection::Rtl, + m_inlineTextBox.isLeftToRightDirection() ? TextDirection::kLtr + : TextDirection::kRtl, m_inlineTextBox.isFirstLineStyle()); // how much line to draw float width; @@ -1186,7 +1186,7 @@ : m_inlineTextBox.start() + m_inlineTextBox.len() - paintEnd; width = m_inlineTextBox.getLineLayoutItem().width( paintFrom, paintLength, LayoutUnit(m_inlineTextBox.textPos() + start), - flowIsLTR ? TextDirection::Ltr : TextDirection::Rtl, + flowIsLTR ? TextDirection::kLtr : TextDirection::kRtl, m_inlineTextBox.isFirstLineStyle()); } // In RTL mode, start and width are computed from the right end of the text
diff --git a/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp b/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp index 206982c2..b718930 100644 --- a/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp +++ b/third_party/WebKit/Source/core/paint/ListMarkerPainter.cpp
@@ -25,13 +25,13 @@ context.setStrokeStyle(SolidStroke); context.setStrokeThickness(1.0f); switch (listStyle) { - case EListStyleType::Disc: + case EListStyleType::kDisc: context.fillEllipse(marker); break; - case EListStyleType::Circle: + case EListStyleType::kCircle: context.strokeEllipse(marker); break; - case EListStyleType::Square: + case EListStyleType::kSquare: context.fillRect(marker); break; default: @@ -45,7 +45,7 @@ if (paintInfo.phase != PaintPhaseForeground) return; - if (m_layoutListMarker.style()->visibility() != EVisibility::Visible) + if (m_layoutListMarker.style()->visibility() != EVisibility::kVisible) return; if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(
diff --git a/third_party/WebKit/Source/core/paint/MultiColumnSetPainter.cpp b/third_party/WebKit/Source/core/paint/MultiColumnSetPainter.cpp index bb89345..f0d9e22 100644 --- a/third_party/WebKit/Source/core/paint/MultiColumnSetPainter.cpp +++ b/third_party/WebKit/Source/core/paint/MultiColumnSetPainter.cpp
@@ -16,7 +16,7 @@ void MultiColumnSetPainter::paintObject(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutMultiColumnSet.style()->visibility() != EVisibility::Visible) + if (m_layoutMultiColumnSet.style()->visibility() != EVisibility::kVisible) return; BlockPainter(m_layoutMultiColumnSet).paintObject(paintInfo, paintOffset);
diff --git a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp index f716d17..d34c512 100644 --- a/third_party/WebKit/Source/core/paint/ObjectPainter.cpp +++ b/third_party/WebKit/Source/core/paint/ObjectPainter.cpp
@@ -223,7 +223,7 @@ const ComputedStyle& styleToUse = m_layoutObject.styleRef(); if (!styleToUse.hasOutline() || - styleToUse.visibility() != EVisibility::Visible) + styleToUse.visibility() != EVisibility::kVisible) return; // Only paint the focus ring by hand if the theme isn't able to draw the focus @@ -304,7 +304,7 @@ DCHECK(paintInfo.isPrinting()); if (m_layoutObject.isElementContinuation() || !m_layoutObject.node() || !m_layoutObject.node()->isLink() || - m_layoutObject.styleRef().visibility() != EVisibility::Visible) + m_layoutObject.styleRef().visibility() != EVisibility::kVisible) return; KURL url = toElement(m_layoutObject.node())->hrefURL();
diff --git a/third_party/WebKit/Source/core/paint/PaintLayer.cpp b/third_party/WebKit/Source/core/paint/PaintLayer.cpp index c55db95b..d41f3916 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayer.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayer.cpp
@@ -698,14 +698,14 @@ } bool previouslyHasVisibleContent = m_hasVisibleContent; - if (layoutObject()->style()->visibility() == EVisibility::Visible) { + if (layoutObject()->style()->visibility() == EVisibility::kVisible) { m_hasVisibleContent = true; } else { // layer may be hidden but still have some visible content, check for this m_hasVisibleContent = false; LayoutObject* r = layoutObject()->slowFirstChild(); while (r) { - if (r->style()->visibility() == EVisibility::Visible && + if (r->style()->visibility() == EVisibility::kVisible && (!r->hasLayer() || !r->enclosingLayer()->isSelfPaintingLayer())) { m_hasVisibleContent = true; break; @@ -1275,7 +1275,7 @@ oldChild->stackingNode()->dirtyStackingContextZOrderLists(); } - if (layoutObject()->style()->visibility() != EVisibility::Visible) + if (layoutObject()->style()->visibility() != EVisibility::kVisible) dirtyVisibleContentStatus(); oldChild->setPreviousSibling(0); @@ -2709,7 +2709,7 @@ // We can't use hasVisibleContent(), because that will be true if our // layoutObject is hidden, but some child is visible and that child doesn't // cover the entire rect. - if (layoutObject()->style()->visibility() != EVisibility::Visible) + if (layoutObject()->style()->visibility() != EVisibility::kVisible) return false; if (paintsWithFilters() &&
diff --git a/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp b/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp index 62583a91..b1378a2 100644 --- a/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp +++ b/third_party/WebKit/Source/core/paint/ReplacedPainter.cpp
@@ -31,7 +31,7 @@ LayoutRect borderRect(adjustedPaintOffset, m_layoutReplaced.size()); - if (m_layoutReplaced.style()->visibility() == EVisibility::Visible && + if (m_layoutReplaced.style()->visibility() == EVisibility::kVisible && m_layoutReplaced.hasBoxDecorationBackground() && (paintInfo.phase == PaintPhaseForeground || paintInfo.phase == PaintPhaseSelection)) @@ -137,7 +137,7 @@ // But if it's an SVG root, there can be children, so we'll check visibility // later. if (!m_layoutReplaced.isSVGRoot() && - m_layoutReplaced.style()->visibility() != EVisibility::Visible) + m_layoutReplaced.style()->visibility() != EVisibility::kVisible) return false; LayoutRect paintRect(m_layoutReplaced.visualOverflowRect());
diff --git a/third_party/WebKit/Source/core/paint/RootInlineBoxPainter.cpp b/third_party/WebKit/Source/core/paint/RootInlineBoxPainter.cpp index 0709766..0e98482 100644 --- a/third_party/WebKit/Source/core/paint/RootInlineBoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/RootInlineBoxPainter.cpp
@@ -17,7 +17,7 @@ LayoutUnit lineBottom) const { if (m_rootInlineBox.hasEllipsisBox() && m_rootInlineBox.getLineLayoutItem().style()->visibility() == - EVisibility::Visible && + EVisibility::kVisible && paintInfo.phase == PaintPhaseForeground) m_rootInlineBox.ellipsisBox()->paint(paintInfo, paintOffset, lineTop, lineBottom);
diff --git a/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp b/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp index 449f044d..1384067d 100644 --- a/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp +++ b/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp
@@ -72,7 +72,7 @@ return; if (m_layoutSVGContainer.style()->outlineWidth() && - m_layoutSVGContainer.style()->visibility() == EVisibility::Visible) { + m_layoutSVGContainer.style()->visibility() == EVisibility::kVisible) { PaintInfo outlinePaintInfo(paintInfoBeforeFiltering); outlinePaintInfo.phase = PaintPhaseSelfOutlineOnly; ObjectPainter(m_layoutSVGContainer)
diff --git a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp index b4519adc..29db58a4 100644 --- a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp +++ b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
@@ -20,7 +20,7 @@ void SVGImagePainter::paint(const PaintInfo& paintInfo) { if (paintInfo.phase != PaintPhaseForeground || - m_layoutSVGImage.style()->visibility() != EVisibility::Visible || + m_layoutSVGImage.style()->visibility() != EVisibility::kVisible || !m_layoutSVGImage.imageResource()->hasImage()) return;
diff --git a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp index c0e66f75a4..dcc31c7 100644 --- a/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp +++ b/third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp
@@ -84,7 +84,7 @@ DCHECK(m_svgInlineTextBox.truncation() == cNoTruncation); if (m_svgInlineTextBox.getLineLayoutItem().style()->visibility() != - EVisibility::Visible || + EVisibility::kVisible || !m_svgInlineTextBox.len()) return; @@ -214,7 +214,7 @@ void SVGInlineTextBoxPainter::paintSelectionBackground( const PaintInfo& paintInfo) { if (m_svgInlineTextBox.getLineLayoutItem().style()->visibility() != - EVisibility::Visible) + EVisibility::kVisible) return; DCHECK(!paintInfo.isPrinting()); @@ -317,7 +317,7 @@ findLayoutObjectDefininingTextDecoration(m_svgInlineTextBox.parent()); const ComputedStyle& decorationStyle = decorationLayoutObject->styleRef(); - if (decorationStyle.visibility() != EVisibility::Visible) + if (decorationStyle.visibility() != EVisibility::kVisible) return; float scalingFactor = 1;
diff --git a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp index 550622e..3bdd569d 100644 --- a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp +++ b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
@@ -45,7 +45,7 @@ void SVGShapePainter::paint(const PaintInfo& paintInfo) { if (paintInfo.phase != PaintPhaseForeground || - m_layoutSVGShape.style()->visibility() != EVisibility::Visible || + m_layoutSVGShape.style()->visibility() != EVisibility::kVisible || m_layoutSVGShape.isShapeEmpty()) return;
diff --git a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp index 3ac8ce1d..5aa8690c 100644 --- a/third_party/WebKit/Source/core/paint/TableCellPainter.cpp +++ b/third_party/WebKit/Source/core/paint/TableCellPainter.cpp
@@ -81,7 +81,7 @@ const PaintInfo& paintInfo, const LayoutPoint& paintOffset, const CollapsedBorderValue& currentBorderValue) { - if (m_layoutTableCell.style()->visibility() != EVisibility::Visible) + if (m_layoutTableCell.style()->visibility() != EVisibility::kVisible) return; LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableCell.location(); @@ -181,7 +181,7 @@ DisplayItem::Type type) { DCHECK(backgroundObject != m_layoutTableCell); - if (m_layoutTableCell.style()->visibility() != EVisibility::Visible) + if (m_layoutTableCell.style()->visibility() != EVisibility::kVisible) return; LayoutPoint adjustedPaintOffset = paintOffset + m_layoutTableCell.location(); @@ -191,7 +191,7 @@ LayoutTable* table = m_layoutTableCell.table(); if (!table->collapseBorders() && - m_layoutTableCell.style()->emptyCells() == EEmptyCells::Hide && + m_layoutTableCell.style()->emptyCells() == EEmptyCells::kHide && !m_layoutTableCell.firstChild()) return; @@ -240,7 +240,7 @@ const LayoutPoint& paintOffset) { LayoutTable* table = m_layoutTableCell.table(); const ComputedStyle& style = m_layoutTableCell.styleRef(); - if (!table->collapseBorders() && style.emptyCells() == EEmptyCells::Hide && + if (!table->collapseBorders() && style.emptyCells() == EEmptyCells::kHide && !m_layoutTableCell.firstChild()) return; @@ -277,13 +277,13 @@ void TableCellPainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutTableCell.style()->visibility() != EVisibility::Visible || + if (m_layoutTableCell.style()->visibility() != EVisibility::kVisible || paintInfo.phase != PaintPhaseMask) return; LayoutTable* tableElt = m_layoutTableCell.table(); if (!tableElt->collapseBorders() && - m_layoutTableCell.style()->emptyCells() == EEmptyCells::Hide && + m_layoutTableCell.style()->emptyCells() == EEmptyCells::kHide && !m_layoutTableCell.firstChild()) return;
diff --git a/third_party/WebKit/Source/core/paint/TablePainter.cpp b/third_party/WebKit/Source/core/paint/TablePainter.cpp index 16f910484..321c0d3 100644 --- a/third_party/WebKit/Source/core/paint/TablePainter.cpp +++ b/third_party/WebKit/Source/core/paint/TablePainter.cpp
@@ -46,7 +46,7 @@ if (m_layoutTable.collapseBorders() && shouldPaintDescendantBlockBackgrounds(paintPhase) && - m_layoutTable.style()->visibility() == EVisibility::Visible) { + m_layoutTable.style()->visibility() == EVisibility::kVisible) { // Using our cached sorted styles, we then do individual passes, // painting each style of border from lowest precedence to highest // precedence. @@ -73,7 +73,7 @@ const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { if (!m_layoutTable.hasBoxDecorationBackground() || - m_layoutTable.style()->visibility() != EVisibility::Visible) + m_layoutTable.style()->visibility() != EVisibility::kVisible) return; LayoutRect rect(paintOffset, m_layoutTable.size()); @@ -84,7 +84,7 @@ void TablePainter::paintMask(const PaintInfo& paintInfo, const LayoutPoint& paintOffset) { - if (m_layoutTable.style()->visibility() != EVisibility::Visible || + if (m_layoutTable.style()->visibility() != EVisibility::kVisible || paintInfo.phase != PaintPhaseMask) return;
diff --git a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp index 57004b2..e0aee2a6 100644 --- a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp +++ b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
@@ -304,7 +304,7 @@ 2 * extraPadding; // |arrowX| is the middle position for mock theme engine. extraParams.menuList.arrowX = - (box.styleRef().direction() == TextDirection::Rtl) + (box.styleRef().direction() == TextDirection::kRtl) ? rect.x() + extraPadding + (arrowSize / 2) : right - (arrowSize / 2) - extraPadding; extraParams.menuList.arrowSize = arrowSize; @@ -314,7 +314,7 @@ // Put the 6px arrow at the center of paddingForArrow area. // |arrowX| is the left position for Aura theme engine. extraParams.menuList.arrowX = - (box.styleRef().direction() == TextDirection::Rtl) + (box.styleRef().direction() == TextDirection::kRtl) ? left + (arrowBoxWidth - arrowSize) / 2 : right - (arrowBoxWidth + arrowSize) / 2; extraParams.menuList.arrowSize = arrowSize;
diff --git a/third_party/WebKit/Source/core/paint/ThemePainterMac.mm b/third_party/WebKit/Source/core/paint/ThemePainterMac.mm index 54f9b7e..bc90261 100644 --- a/third_party/WebKit/Source/core/paint/ThemePainterMac.mm +++ b/third_party/WebKit/Source/core/paint/ThemePainterMac.mm
@@ -135,7 +135,7 @@ CGFloat minX = CGRectGetMinX(cgr); CGFloat minY = CGRectGetMinY(cgr); CGFloat heightScale = r.height() / kSquareSize; - const bool isRTL = o.styleRef().direction() == TextDirection::Rtl; + const bool isRTL = o.styleRef().direction() == TextDirection::kRtl; CGAffineTransform transform = CGAffineTransformMake(heightScale, 0, // A B 0, heightScale, // C D @@ -283,7 +283,7 @@ float scaledPaddingEnd = LayoutThemeMac::menuListArrowPaddingEnd * o.styleRef().effectiveZoom(); float leftEdge; - if (o.styleRef().direction() == TextDirection::Ltr) { + if (o.styleRef().direction() == TextDirection::kLtr) { leftEdge = bounds.maxX() - scaledPaddingEnd - arrowWidth; } else { leftEdge = bounds.x() + scaledPaddingEnd;
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp index db2929cb..e6a194c 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -836,7 +836,7 @@ // In the collapsing border model, 'hidden' suppresses other borders, while // 'none' does not, so these style differences can be width differences. - if ((borderCollapse() == EBorderCollapse::Collapse) && + if ((borderCollapse() == EBorderCollapse::kCollapse) && ((borderTopStyle() == BorderStyleHidden && other.borderTopStyle() == BorderStyleNone) || (borderTopStyle() == BorderStyleNone && @@ -860,8 +860,8 @@ return true; } - if ((visibility() == EVisibility::Collapse) != - (other.visibility() == EVisibility::Collapse)) + if ((visibility() == EVisibility::kCollapse) != + (other.visibility() == EVisibility::kCollapse)) return true; if (hasPseudoStyle(PseudoIdScrollbar) != @@ -2169,11 +2169,11 @@ const BorderValue& ComputedStyle::borderBefore() const { switch (getWritingMode()) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return borderTop(); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return borderLeft(); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return borderRight(); } ASSERT_NOT_REACHED(); @@ -2182,11 +2182,11 @@ const BorderValue& ComputedStyle::borderAfter() const { switch (getWritingMode()) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return borderBottom(); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return borderRight(); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return borderLeft(); } ASSERT_NOT_REACHED(); @@ -2207,11 +2207,11 @@ int ComputedStyle::borderBeforeWidth() const { switch (getWritingMode()) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return borderTopWidth(); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return borderLeftWidth(); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return borderRightWidth(); } ASSERT_NOT_REACHED(); @@ -2220,11 +2220,11 @@ int ComputedStyle::borderAfterWidth() const { switch (getWritingMode()) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return borderBottomWidth(); - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return borderRightWidth(); - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return borderLeftWidth(); } ASSERT_NOT_REACHED();
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h index 4ed124a..1ad4dc9 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.h +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -3267,7 +3267,7 @@ bool includeLogicalRightEdge) const; // Float utility functions. - bool isFloating() const { return floating() != EFloat::None; } + bool isFloating() const { return floating() != EFloat::kNone; } // Mix-blend-mode utility functions. bool hasBlendMode() const { return blendMode() != WebBlendModeNormal; } @@ -3279,7 +3279,7 @@ // Direction utility functions. bool isLeftToRightDirection() const { - return direction() == TextDirection::Ltr; + return direction() == TextDirection::kLtr; } // Perspective utility functions. @@ -3423,8 +3423,8 @@ // Visibility utility functions. bool visibleToHitTesting() const { - return visibility() == EVisibility::Visible && - pointerEvents() != EPointerEvents::None; + return visibility() == EVisibility::kVisible && + pointerEvents() != EPointerEvents::kNone; } // Animation utility functions. @@ -3568,21 +3568,21 @@ // Whitespace utility functions. static bool autoWrap(EWhiteSpace ws) { // Nowrap and pre don't automatically wrap. - return ws != EWhiteSpace::Nowrap && ws != EWhiteSpace::Pre; + return ws != EWhiteSpace::kNowrap && ws != EWhiteSpace::kPre; } bool autoWrap() const { return autoWrap(whiteSpace()); } static bool preserveNewline(EWhiteSpace ws) { // Normal and nowrap do not preserve newlines. - return ws != EWhiteSpace::Normal && ws != EWhiteSpace::Nowrap; + return ws != EWhiteSpace::kNormal && ws != EWhiteSpace::kNowrap; } bool preserveNewline() const { return preserveNewline(whiteSpace()); } static bool collapseWhiteSpace(EWhiteSpace ws) { // Pre and prewrap do not collapse whitespace. - return ws != EWhiteSpace::Pre && ws != EWhiteSpace::PreWrap; + return ws != EWhiteSpace::kPre && ws != EWhiteSpace::kPreWrap; } bool collapseWhiteSpace() const { return collapseWhiteSpace(whiteSpace()); } @@ -3598,15 +3598,15 @@ return false; } bool breakOnlyAfterWhiteSpace() const { - return whiteSpace() == EWhiteSpace::PreWrap || + return whiteSpace() == EWhiteSpace::kPreWrap || getLineBreak() == LineBreakAfterWhiteSpace; } bool breakWords() const { return (wordBreak() == BreakWordBreak || overflowWrap() == BreakOverflowWrap) && - whiteSpace() != EWhiteSpace::Pre && - whiteSpace() != EWhiteSpace::Nowrap; + whiteSpace() != EWhiteSpace::kPre && + whiteSpace() != EWhiteSpace::kNowrap; } // Text direction utility functions.
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp index 1bf13cc..1a81386 100644 --- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp +++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -321,7 +321,7 @@ LayoutObject* layoutObject = element.layoutObject(); ASSERT(!layoutObject || layoutObject->style()); if (!layoutObject || - layoutObject->style()->pointerEvents() == EPointerEvents::None) + layoutObject->style()->pointerEvents() == EPointerEvents::kNone) return false; if (!isIntersectionOrEnclosureTarget(layoutObject))
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index ff9af2cd..fb62a43 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -2650,7 +2650,7 @@ return false; const ComputedStyle* itemStyle = select.itemComputedStyle(*select.listItems()[itemIndex]); - return itemStyle && itemStyle->direction() == TextDirection::Rtl; + return itemStyle && itemStyle->direction() == TextDirection::kRtl; } int Internals::selectPopupItemStyleFontHeight(Node* node, int itemIndex) {
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp index d7dd831..de42787 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -487,7 +487,7 @@ return IgnoreObject; } - if (m_layoutObject->style()->visibility() != EVisibility::Visible) { + if (m_layoutObject->style()->visibility() != EVisibility::kVisible) { // aria-hidden is meant to override visibility as the determinant in AX // hierarchy inclusion. if (equalIgnoringCase(getAttribute(aria_hiddenAttr), "false")) @@ -989,16 +989,16 @@ if (style->isHorizontalWritingMode()) { switch (style->direction()) { - case TextDirection::Ltr: + case TextDirection::kLtr: return AccessibilityTextDirectionLTR; - case TextDirection::Rtl: + case TextDirection::kRtl: return AccessibilityTextDirectionRTL; } } else { switch (style->direction()) { - case TextDirection::Ltr: + case TextDirection::kLtr: return AccessibilityTextDirectionTTB; - case TextDirection::Rtl: + case TextDirection::kRtl: return AccessibilityTextDirectionBTT; } }
diff --git a/third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp b/third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp index 28c861f7..a2ca2f2 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXMediaControls.cpp
@@ -221,7 +221,7 @@ bool AccessibilityMediaControl::computeAccessibilityIsIgnored( IgnoredReasons* ignoredReasons) const { if (!m_layoutObject || !m_layoutObject->style() || - m_layoutObject->style()->visibility() != EVisibility::Visible || + m_layoutObject->style()->visibility() != EVisibility::kVisible || controlType() == MediaTimelineContainer) return true; @@ -367,7 +367,7 @@ bool AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored( IgnoredReasons* ignoredReasons) const { if (!m_layoutObject || !m_layoutObject->style() || - m_layoutObject->style()->visibility() != EVisibility::Visible) + m_layoutObject->style()->visibility() != EVisibility::kVisible) return true; if (!m_layoutObject->style()->width().value())
diff --git a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp index 4371c90..f61d69c 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
@@ -709,7 +709,7 @@ return false; if (getLayoutObject()) - return getLayoutObject()->style()->visibility() != EVisibility::Visible; + return getLayoutObject()->style()->visibility() != EVisibility::kVisible; // This is an obscure corner case: if a node has no LayoutObject, that means // it's not rendered, but we still may be exploring it as part of a text @@ -722,7 +722,7 @@ RefPtr<ComputedStyle> style = doc->ensureStyleResolver().styleForElement(toElement(getNode())); return style->display() == EDisplay::None || - style->visibility() != EVisibility::Visible; + style->visibility() != EVisibility::kVisible; } return false;
diff --git a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp index a2e93e0..af68f1a4 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXTable.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXTable.cpp
@@ -242,7 +242,7 @@ continue; // If the empty-cells style is set, we'll call it a data table. - if (computedStyle->emptyCells() == EEmptyCells::Hide) + if (computedStyle->emptyCells() == EEmptyCells::kHide) return true; // If a cell has matching bordered sides, call it a (fully) bordered cell.
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp index e8e968a..dd593643 100644 --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp
@@ -676,20 +676,21 @@ *computedStyle = style; switch (direction) { case CanvasRenderingContext2DState::DirectionInherit: - return style ? style->direction() : TextDirection::Ltr; + return style ? style->direction() : TextDirection::kLtr; case CanvasRenderingContext2DState::DirectionRTL: - return TextDirection::Rtl; + return TextDirection::kRtl; case CanvasRenderingContext2DState::DirectionLTR: - return TextDirection::Ltr; + return TextDirection::kLtr; } ASSERT_NOT_REACHED(); - return TextDirection::Ltr; + return TextDirection::kLtr; } String CanvasRenderingContext2D::direction() const { if (state().getDirection() == CanvasRenderingContext2DState::DirectionInherit) canvas()->document().updateStyleAndLayoutTreeForNode(canvas()); - return toTextDirection(state().getDirection(), canvas()) == TextDirection::Rtl + return toTextDirection(state().getDirection(), canvas()) == + TextDirection::kRtl ? rtlDirectionString : ltrDirectionString; } @@ -845,7 +846,7 @@ const ComputedStyle* computedStyle = 0; TextDirection direction = toTextDirection(state().getDirection(), canvas(), &computedStyle); - bool isRTL = direction == TextDirection::Rtl; + bool isRTL = direction == TextDirection::kRtl; bool override = computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;
diff --git a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp index ece11f5..55c60c4 100644 --- a/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp +++ b/third_party/WebKit/Source/modules/plugins/PluginOcclusionSupport.cpp
@@ -120,7 +120,7 @@ return renderer->absoluteBoundingBoxRectIgnoringTransforms().intersects( rect) && (!renderer->style() || - renderer->style()->visibility() == EVisibility::Visible); + renderer->style()->visibility() == EVisibility::kVisible); } static void addToOcclusions(const LayoutBox* renderer,
diff --git a/third_party/WebKit/Source/platform/DragImage.cpp b/third_party/WebKit/Source/platform/DragImage.cpp index 2521f81c..ff09513 100644 --- a/third_party/WebKit/Source/platform/DragImage.cpp +++ b/third_party/WebKit/Source/platform/DragImage.cpp
@@ -291,7 +291,7 @@ IntPoint textPos( kDragLabelBorderX, kDragLabelBorderY + labelFont.getFontDescription().computedPixelSize()); - if (hasStrongDirectionality && textRun.direction() == TextDirection::Rtl) { + if (hasStrongDirectionality && textRun.direction() == TextDirection::kRtl) { float textWidth = labelFont.width(textRun); int availableWidth = imageSize.width() - kDragLabelBorderX * 2; textPos.setX(availableWidth - ceilf(textWidth));
diff --git a/third_party/WebKit/Source/platform/LengthBox.cpp b/third_party/WebKit/Source/platform/LengthBox.cpp index 372a6a1c..b7dd0e4 100644 --- a/third_party/WebKit/Source/platform/LengthBox.cpp +++ b/third_party/WebKit/Source/platform/LengthBox.cpp
@@ -42,11 +42,11 @@ const Length& LengthBox::before(WritingMode writingMode) const { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return m_top; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return m_left; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return m_right; } ASSERT_NOT_REACHED(); @@ -55,11 +55,11 @@ const Length& LengthBox::after(WritingMode writingMode) const { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return m_bottom; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return m_right; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return m_left; } ASSERT_NOT_REACHED();
diff --git a/third_party/WebKit/Source/platform/exported/WebTextRun.cpp b/third_party/WebKit/Source/platform/exported/WebTextRun.cpp index f0246faa..f7045f5 100644 --- a/third_party/WebKit/Source/platform/exported/WebTextRun.cpp +++ b/third_party/WebKit/Source/platform/exported/WebTextRun.cpp
@@ -36,7 +36,7 @@ WebTextRun::operator TextRun() const { return TextRun(text, 0, 0, TextRun::AllowTrailingExpansion, - rtl ? TextDirection::Rtl : TextDirection::Ltr, + rtl ? TextDirection::kRtl : TextDirection::kLtr, directionalOverride); }
diff --git a/third_party/WebKit/Source/platform/fonts/Font.cpp b/third_party/WebKit/Source/platform/fonts/Font.cpp index 48e3e286..a14562f 100644 --- a/third_party/WebKit/Source/platform/fonts/Font.cpp +++ b/third_party/WebKit/Source/platform/fonts/Font.cpp
@@ -180,7 +180,7 @@ TextRun subrun = run.subRun(bidiRun->start(), bidiRun->stop() - bidiRun->start()); bool isRTL = bidiRun->level() % 2; - subrun.setDirection(isRTL ? TextDirection::Rtl : TextDirection::Ltr); + subrun.setDirection(isRTL ? TextDirection::kRtl : TextDirection::kLtr); subrun.setDirectionalOverride(bidiRun->dirOverride(false)); TextRunPaintInfo subrunInfo(subrun);
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp index d94a8e4..733586e 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp +++ b/third_party/WebKit/Source/platform/fonts/shaping/CachingWordShaperTest.cpp
@@ -138,7 +138,7 @@ // "[] []" with an accent mark over the last square bracket. const UChar str[] = {0x5B, 0x5D, 0x20, 0x5B, 0x301, 0x5D, 0x0}; TextRun textRun(str, 6); - textRun.setDirection(TextDirection::Rtl); + textRun.setDirection(TextDirection::kRtl); CachingWordShaper shaper(cache.get()); GlyphBuffer glyphBuffer;
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp index cc20e397..82d77dd 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp +++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp
@@ -108,8 +108,8 @@ !fontData->isTextOrientationFallback() ? HB_DIRECTION_TTB : HB_DIRECTION_LTR; - return dir == TextDirection::Rtl ? HB_DIRECTION_REVERSE(harfBuzzDirection) - : harfBuzzDirection; + return dir == TextDirection::kRtl ? HB_DIRECTION_REVERSE(harfBuzzDirection) + : harfBuzzDirection; } inline bool shapeRange(hb_buffer_t* harfBuzzBuffer,
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp index f7ec35c..9b9ec10 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp +++ b/third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp
@@ -43,7 +43,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsLatin) { String latinCommon = to16Bit("ABC DEF.", 8); - HarfBuzzShaper shaper(latinCommon.characters16(), 8, TextDirection::Ltr); + HarfBuzzShaper shaper(latinCommon.characters16(), 8, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(1u, testInfo(result)->numberOfRunsForTesting()); @@ -56,7 +56,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsLeadingCommon) { String leadingCommon = to16Bit("... test", 8); - HarfBuzzShaper shaper(leadingCommon.characters16(), 8, TextDirection::Ltr); + HarfBuzzShaper shaper(leadingCommon.characters16(), 8, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(1u, testInfo(result)->numberOfRunsForTesting()); @@ -81,7 +81,7 @@ {"Not-defined Variants", {0x41, 0xDB40, 0xDDEF}, 3, HB_SCRIPT_LATIN}, }; for (auto& test : testlist) { - HarfBuzzShaper shaper(test.string, test.length, TextDirection::Ltr); + HarfBuzzShaper shaper(test.string, test.length, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); EXPECT_EQ(1u, testInfo(result)->numberOfRunsForTesting()) << test.name; @@ -110,7 +110,7 @@ UChar devanagariCommonString[] = {0x915, 0x94d, 0x930, 0x28, 0x20, 0x29}; String devanagariCommonLatin(devanagariCommonString, 6); HarfBuzzShaper shaper(devanagariCommonLatin.characters16(), 6, - TextDirection::Ltr); + TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(2u, testInfo(result)->numberOfRunsForTesting()); @@ -130,7 +130,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsDevanagariCommonLatinCommon) { UChar devanagariCommonLatinString[] = {0x915, 0x94d, 0x930, 0x20, 0x61, 0x62, 0x2E}; - HarfBuzzShaper shaper(devanagariCommonLatinString, 7, TextDirection::Ltr); + HarfBuzzShaper shaper(devanagariCommonLatinString, 7, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(3u, testInfo(result)->numberOfRunsForTesting()); @@ -155,7 +155,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsArabicThaiHanLatin) { UChar mixedString[] = {0x628, 0x64A, 0x629, 0xE20, 0x65E5, 0x62}; - HarfBuzzShaper shaper(mixedString, 6, TextDirection::Ltr); + HarfBuzzShaper shaper(mixedString, 6, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(4u, testInfo(result)->numberOfRunsForTesting()); @@ -186,7 +186,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsArabicThaiHanLatinTwice) { UChar mixedString[] = {0x628, 0x64A, 0x629, 0xE20, 0x65E5, 0x62}; - HarfBuzzShaper shaper(mixedString, 6, TextDirection::Ltr); + HarfBuzzShaper shaper(mixedString, 6, TextDirection::kLtr); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(4u, testInfo(result)->numberOfRunsForTesting()); @@ -198,7 +198,7 @@ TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsArabic) { UChar arabicString[] = {0x628, 0x64A, 0x629}; - HarfBuzzShaper shaper(arabicString, 3, TextDirection::Rtl); + HarfBuzzShaper shaper(arabicString, 3, TextDirection::kRtl); RefPtr<ShapeResult> result = shaper.shapeResult(&font); ASSERT_EQ(1u, testInfo(result)->numberOfRunsForTesting());
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h b/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h index 0b6b7d2f..bf7efa8 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h +++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeCache.h
@@ -59,11 +59,11 @@ SmallStringKey() : m_length(s_emptyValueLength), - m_direction(static_cast<unsigned>(TextDirection::Ltr)) {} + m_direction(static_cast<unsigned>(TextDirection::kLtr)) {} SmallStringKey(WTF::HashTableDeletedValueType) : m_length(s_deletedValueLength), - m_direction(static_cast<unsigned>(TextDirection::Ltr)) {} + m_direction(static_cast<unsigned>(TextDirection::kLtr)) {} template <typename CharacterType> SmallStringKey(CharacterType* characters, @@ -188,7 +188,7 @@ uint32_t key = run[0]; // All current codepointsin UTF-32 are bewteen 0x0 and 0x10FFFF, // as such use bit 32 to indicate direction. - if (run.direction() == TextDirection::Rtl) + if (run.direction() == TextDirection::kRtl) key |= (1u << 31); SingleCharMap::AddResult addResult = m_singleCharMap.add(key, entry); isNewEntry = addResult.isNewEntry;
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h index 5b7774e..911cb8a 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h +++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResult.h
@@ -68,7 +68,7 @@ unsigned numCharacters() const { return m_numCharacters; } void fallbackFonts(HashSet<const SimpleFontData*>*) const; bool rtl() const { - return static_cast<TextDirection>(m_direction) == TextDirection::Rtl; + return static_cast<TextDirection>(m_direction) == TextDirection::kRtl; } bool hasVerticalOffsets() const { return m_hasVerticalOffsets; }
diff --git a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp index 70ab66cb..7ae5401e 100644 --- a/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp +++ b/third_party/WebKit/Source/platform/fonts/shaping/ShapeResultBuffer.cpp
@@ -106,12 +106,12 @@ const HarfBuzzRunGlyphData& glyphData = run->m_glyphData[i]; uint16_t currentCharacterIndex = run->m_startIndex + glyphData.characterIndex + runOffset; - if ((direction == TextDirection::Rtl && currentCharacterIndex >= to) || - (direction == TextDirection::Ltr && currentCharacterIndex < from)) { + if ((direction == TextDirection::kRtl && currentCharacterIndex >= to) || + (direction == TextDirection::kLtr && currentCharacterIndex < from)) { advanceSoFar += glyphData.advance; - } else if ((direction == TextDirection::Rtl && + } else if ((direction == TextDirection::kRtl && currentCharacterIndex >= from) || - (direction == TextDirection::Ltr && + (direction == TextDirection::kLtr && currentCharacterIndex < to)) { addGlyphToBuffer(glyphBuffer, advanceSoFar, run->m_direction, run->m_fontData.get(), glyphData, textRun, @@ -150,7 +150,7 @@ // linearly split the sum of corresponding glyph advances by the number of // grapheme clusters in order to find positions for emphasis mark drawing. uint16_t clusterStart = static_cast<uint16_t>( - direction == TextDirection::Rtl + direction == TextDirection::kRtl ? run->m_startIndex + run->m_numCharacters + runOffset : run->glyphToCharacterIndex(0) + runOffset); @@ -165,10 +165,10 @@ isRunEnd || (run->glyphToCharacterIndex(i + 1) + runOffset != currentCharacterIndex); - if ((direction == TextDirection::Rtl && currentCharacterIndex >= to) || - (direction != TextDirection::Rtl && currentCharacterIndex < from)) { + if ((direction == TextDirection::kRtl && currentCharacterIndex >= to) || + (direction != TextDirection::kRtl && currentCharacterIndex < from)) { advanceSoFar += glyphData.advance; - direction == TextDirection::Rtl ? --clusterStart : ++clusterStart; + direction == TextDirection::kRtl ? --clusterStart : ++clusterStart; continue; } @@ -183,7 +183,7 @@ advanceSoFar += glyphAdvanceX; } else if (isClusterEnd) { uint16_t clusterEnd; - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) clusterEnd = currentCharacterIndex; else clusterEnd = static_cast<uint16_t>( @@ -267,7 +267,7 @@ unsigned resolvedIndex = m_results.size() - 1 - j; const RefPtr<const ShapeResult>& wordResult = m_results[resolvedIndex]; for (unsigned i = 0; i < wordResult->m_runs.size(); i++) { - advance += fillGlyphBufferForRun<TextDirection::Rtl>( + advance += fillGlyphBufferForRun<TextDirection::kRtl>( glyphBuffer, wordResult->m_runs[i].get(), textRun, advance, from, to, wordOffset - wordResult->numCharacters()); } @@ -278,7 +278,7 @@ for (unsigned j = 0; j < m_results.size(); j++) { const RefPtr<const ShapeResult>& wordResult = m_results[j]; for (unsigned i = 0; i < wordResult->m_runs.size(); i++) { - advance += fillGlyphBufferForRun<TextDirection::Ltr>( + advance += fillGlyphBufferForRun<TextDirection::kLtr>( glyphBuffer, wordResult->m_runs[i].get(), textRun, advance, from, to, wordOffset); } @@ -324,7 +324,7 @@ bool foundFromX = false; bool foundToX = false; - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) currentX = totalWidth; // The absoluteFrom and absoluteTo arguments represent the start/end offset @@ -336,7 +336,7 @@ unsigned totalNumCharacters = 0; for (unsigned j = 0; j < m_results.size(); j++) { const RefPtr<const ShapeResult> result = m_results[j]; - if (direction == TextDirection::Rtl) { + if (direction == TextDirection::kRtl) { // Convert logical offsets to visual offsets, because results are in // logical order while runs are in visual order. if (!foundFromX && from >= 0 && @@ -350,7 +350,7 @@ for (unsigned i = 0; i < result->m_runs.size(); i++) { if (!result->m_runs[i]) continue; - DCHECK_EQ(direction == TextDirection::Rtl, result->m_runs[i]->rtl()); + DCHECK_EQ(direction == TextDirection::kRtl, result->m_runs[i]->rtl()); int numCharacters = result->m_runs[i]->m_numCharacters; if (!foundFromX && from >= 0 && from < numCharacters) { fromX = @@ -373,24 +373,24 @@ break; currentX += result->m_runs[i]->m_width; } - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) currentX -= result->width(); totalNumCharacters += result->numCharacters(); } // The position in question might be just after the text. if (!foundFromX && absoluteFrom == totalNumCharacters) { - fromX = direction == TextDirection::Rtl ? 0 : totalWidth; + fromX = direction == TextDirection::kRtl ? 0 : totalWidth; foundFromX = true; } if (!foundToX && absoluteTo == totalNumCharacters) { - toX = direction == TextDirection::Rtl ? 0 : totalWidth; + toX = direction == TextDirection::kRtl ? 0 : totalWidth; foundToX = true; } if (!foundFromX) fromX = 0; if (!foundToX) - toX = direction == TextDirection::Rtl ? 0 : totalWidth; + toX = direction == TextDirection::kRtl ? 0 : totalWidth; // None of our runs is part of the selection, possibly invalid arguments. if (!foundToX && !foundFromX) @@ -425,18 +425,18 @@ TextDirection direction, float totalWidth) const { Vector<CharacterRange> ranges; - float currentX = direction == TextDirection::Rtl ? totalWidth : 0; + float currentX = direction == TextDirection::kRtl ? totalWidth : 0; for (const RefPtr<const ShapeResult> result : m_results) { - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) currentX -= result->width(); unsigned runCount = result->m_runs.size(); for (unsigned index = 0; index < runCount; index++) { unsigned runIndex = - direction == TextDirection::Rtl ? runCount - 1 - index : index; + direction == TextDirection::kRtl ? runCount - 1 - index : index; addRunInfoRanges(*result->m_runs[runIndex], currentX, ranges); currentX += result->m_runs[runIndex]->m_width; } - if (direction == TextDirection::Rtl) + if (direction == TextDirection::kRtl) currentX -= result->width(); } return ranges;
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.cpp b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.cpp index ac2802d1..79a137a 100644 --- a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.cpp +++ b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsets.cpp
@@ -68,11 +68,11 @@ LayoutUnit LayoutRectOutsets::before(WritingMode writingMode) const { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return m_top; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return m_left; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return m_right; } ASSERT_NOT_REACHED(); @@ -81,11 +81,11 @@ LayoutUnit LayoutRectOutsets::after(WritingMode writingMode) const { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: return m_bottom; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: return m_right; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: return m_left; } ASSERT_NOT_REACHED(); @@ -116,13 +116,13 @@ void LayoutRectOutsets::setBefore(WritingMode writingMode, LayoutUnit value) { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: m_top = value; break; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: m_left = value; break; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: m_right = value; break; default: @@ -133,13 +133,13 @@ void LayoutRectOutsets::setAfter(WritingMode writingMode, LayoutUnit value) { switch (writingMode) { - case WritingMode::HorizontalTb: + case WritingMode::kHorizontalTb: m_bottom = value; break; - case WritingMode::VerticalLr: + case WritingMode::kVerticalLr: m_right = value; break; - case WritingMode::VerticalRl: + case WritingMode::kVerticalRl: m_left = value; break; default:
diff --git a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp index 55676bb8..35c400d 100644 --- a/third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp +++ b/third_party/WebKit/Source/platform/geometry/LayoutRectOutsetsTest.cpp
@@ -12,25 +12,25 @@ TEST(LayoutRectOutsetsTest, LogicalOutsets_Horizontal) { LayoutRectOutsets outsets(1, 2, 3, 4); EXPECT_EQ(LayoutRectOutsets(1, 2, 3, 4), - outsets.logicalOutsets(WritingMode::HorizontalTb)); + outsets.logicalOutsets(WritingMode::kHorizontalTb)); } TEST(LayoutRectOutsetsTest, LogicalOutsets_Vertical) { LayoutRectOutsets outsets(1, 2, 3, 4); EXPECT_EQ(LayoutRectOutsets(4, 3, 2, 1), - outsets.logicalOutsets(WritingMode::VerticalLr)); + outsets.logicalOutsets(WritingMode::kVerticalLr)); EXPECT_EQ(LayoutRectOutsets(4, 3, 2, 1), - outsets.logicalOutsets(WritingMode::VerticalRl)); + outsets.logicalOutsets(WritingMode::kVerticalRl)); } TEST(LayoutRectOutsetsTest, LogicalOutsetsWithFlippedLines) { LayoutRectOutsets outsets(1, 2, 3, 4); EXPECT_EQ(LayoutRectOutsets(1, 2, 3, 4), - outsets.logicalOutsetsWithFlippedLines(WritingMode::HorizontalTb)); + outsets.logicalOutsetsWithFlippedLines(WritingMode::kHorizontalTb)); EXPECT_EQ(LayoutRectOutsets(2, 3, 4, 1), - outsets.logicalOutsetsWithFlippedLines(WritingMode::VerticalLr)); + outsets.logicalOutsetsWithFlippedLines(WritingMode::kVerticalLr)); EXPECT_EQ(LayoutRectOutsets(4, 3, 2, 1), - outsets.logicalOutsetsWithFlippedLines(WritingMode::VerticalRl)); + outsets.logicalOutsetsWithFlippedLines(WritingMode::kVerticalRl)); } } // namespace
diff --git a/third_party/WebKit/Source/platform/text/BidiCharacterRun.h b/third_party/WebKit/Source/platform/text/BidiCharacterRun.h index 8fb7162..95306b4 100644 --- a/third_party/WebKit/Source/platform/text/BidiCharacterRun.h +++ b/third_party/WebKit/Source/platform/text/BidiCharacterRun.h
@@ -74,7 +74,7 @@ return m_override || visuallyOrdered; } TextDirection direction() const { - return reversed(false) ? TextDirection::Rtl : TextDirection::Ltr; + return reversed(false) ? TextDirection::kRtl : TextDirection::kLtr; } BidiCharacterRun* next() const { return m_next; }
diff --git a/third_party/WebKit/Source/platform/text/BidiResolver.h b/third_party/WebKit/Source/platform/text/BidiResolver.h index a670e23c..fafb6c288 100644 --- a/third_party/WebKit/Source/platform/text/BidiResolver.h +++ b/third_party/WebKit/Source/platform/text/BidiResolver.h
@@ -130,11 +130,11 @@ // direction. Uses TextDirection as it only has two possibilities instead of // WTF::Unicode::Direction which has 19. BidiStatus(TextDirection textDirection, bool isOverride) { - WTF::Unicode::CharDirection direction = textDirection == TextDirection::Ltr + WTF::Unicode::CharDirection direction = textDirection == TextDirection::kLtr ? WTF::Unicode::LeftToRight : WTF::Unicode::RightToLeft; eor = lastStrong = last = direction; - context = BidiContext::create(textDirection == TextDirection::Ltr ? 0 : 1, + context = BidiContext::create(textDirection == TextDirection::kLtr ? 0 : 1, direction, isOverride); } @@ -153,7 +153,7 @@ bool isOverride, unsigned char level) { WTF::Unicode::CharDirection direction; - if (textDirection == TextDirection::Rtl) { + if (textDirection == TextDirection::kRtl) { level = nextGreaterOddLevel(level); direction = WTF::Unicode::RightToLeft; } else { @@ -256,8 +256,8 @@ ASSERT(s.context); m_status = s; m_paragraphDirectionality = s.context->dir() == WTF::Unicode::LeftToRight - ? TextDirection::Ltr - : TextDirection::Rtl; + ? TextDirection::kLtr + : TextDirection::kRtl; } MidpointState<Iterator>& midpointState() { return m_midpointState; } @@ -553,7 +553,7 @@ return; bool shouldReorder = - trailingSpaceRun != (m_paragraphDirectionality == TextDirection::Ltr + trailingSpaceRun != (m_paragraphDirectionality == TextDirection::kLtr ? runs.lastRun() : runs.firstRun()); if (firstSpace != trailingSpaceRun->start()) { @@ -573,7 +573,7 @@ return; } - if (m_paragraphDirectionality == TextDirection::Ltr) { + if (m_paragraphDirectionality == TextDirection::kLtr) { runs.moveRunToEnd(trailingSpaceRun); trailingSpaceRun->m_level = 0; } else { @@ -752,19 +752,19 @@ if (charDirection == WTF::Unicode::LeftToRight) { if (hasStrongDirectionality) *hasStrongDirectionality = true; - return TextDirection::Ltr; + return TextDirection::kLtr; } if (charDirection == WTF::Unicode::RightToLeft || charDirection == WTF::Unicode::RightToLeftArabic) { if (hasStrongDirectionality) *hasStrongDirectionality = true; - return TextDirection::Rtl; + return TextDirection::kRtl; } increment(); } if (hasStrongDirectionality) *hasStrongDirectionality = false; - return TextDirection::Ltr; + return TextDirection::kLtr; } inline TextDirection directionForCharacter(UChar32 character) { @@ -772,8 +772,8 @@ WTF::Unicode::direction(character); if (charDirection == WTF::Unicode::RightToLeft || charDirection == WTF::Unicode::RightToLeftArabic) - return TextDirection::Rtl; - return TextDirection::Ltr; + return TextDirection::kRtl; + return TextDirection::kLtr; } template <class Iterator, class Run, class IsolatedRun>
diff --git a/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp b/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp index 5be771a..a1dea2b2 100644 --- a/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp +++ b/third_party/WebKit/Source/platform/text/BidiResolverTest.cpp
@@ -48,14 +48,14 @@ TextDirection direction = bidiResolver.determineParagraphDirectionality(&hasStrongDirectionality); EXPECT_TRUE(hasStrongDirectionality); - EXPECT_EQ(TextDirection::Ltr, direction); + EXPECT_EQ(TextDirection::kLtr, direction); } TextDirection determineParagraphDirectionality( const TextRun& textRun, bool* hasStrongDirectionality = 0) { BidiResolver<TextRunIterator, BidiCharacterRun> resolver; - resolver.setStatus(BidiStatus(TextDirection::Ltr, false)); + resolver.setStatus(BidiStatus(TextDirection::kLtr, false)); resolver.setPositionIgnoringNestedIsolates(TextRunIterator(&textRun, 0)); return resolver.determineParagraphDirectionality(hasStrongDirectionality); } @@ -81,31 +81,31 @@ const TestData testData[] = { // Test strong RTL, non-BMP. (U+10858 Imperial // Aramaic number one, strong RTL) - {{0xD802, 0xDC58}, 2, TextDirection::Rtl, true}, + {{0xD802, 0xDC58}, 2, TextDirection::kRtl, true}, // Test strong LTR, non-BMP. (U+1D15F Musical // symbol quarter note, strong LTR) - {{0xD834, 0xDD5F}, 2, TextDirection::Ltr, true}, + {{0xD834, 0xDD5F}, 2, TextDirection::kLtr, true}, // Test broken surrogate: valid leading, invalid // trail. (Lead of U+10858, space) - {{0xD802, ' '}, 2, TextDirection::Ltr, false}, + {{0xD802, ' '}, 2, TextDirection::kLtr, false}, // Test broken surrogate: invalid leading. (Trail // of U+10858, U+05D0 Hebrew Alef) - {{0xDC58, 0x05D0}, 2, TextDirection::Rtl, true}, + {{0xDC58, 0x05D0}, 2, TextDirection::kRtl, true}, // Test broken surrogate: valid leading, invalid // trail/valid lead, valid trail. - {{0xD802, 0xD802, 0xDC58}, 3, TextDirection::Rtl, true}, + {{0xD802, 0xD802, 0xDC58}, 3, TextDirection::kRtl, true}, // Test broken surrogate: valid leading, no trail // (string too short). (Lead of U+10858) - {{0xD802, 0xDC58}, 1, TextDirection::Ltr, false}, + {{0xD802, 0xDC58}, 1, TextDirection::kLtr, false}, // Test broken surrogate: trail appearing before // lead. (U+10858 units reversed) - {{0xDC58, 0xD802}, 2, TextDirection::Ltr, false}}; + {{0xDC58, 0xD802}, 2, TextDirection::kLtr, false}}; for (size_t i = 0; i < WTF_ARRAY_LENGTH(testData); ++i) testDirectionality(testData[i]); } @@ -185,10 +185,10 @@ textRun.setDirection(determineParagraphDirectionality(textRun)); break; case bidi_test::DirectionLTR: - textRun.setDirection(TextDirection::Ltr); + textRun.setDirection(TextDirection::kLtr); break; case bidi_test::DirectionRTL: - textRun.setDirection(TextDirection::Rtl); + textRun.setDirection(TextDirection::kRtl); break; } BidiResolver<TextRunIterator, BidiCharacterRun> resolver;
diff --git a/third_party/WebKit/Source/platform/text/BidiTextRun.cpp b/third_party/WebKit/Source/platform/text/BidiTextRun.cpp index 3caf3bf..e5018864 100644 --- a/third_party/WebKit/Source/platform/text/BidiTextRun.cpp +++ b/third_party/WebKit/Source/platform/text/BidiTextRun.cpp
@@ -39,7 +39,7 @@ if (!hasStrongDirectionality) { // 8bit is Latin-1 and therefore is always LTR. if (run.is8Bit()) - return TextDirection::Ltr; + return TextDirection::kLtr; // length == 1 for more than 90% of cases of width() for CJK text. if (run.length() == 1 && U16_IS_SINGLE(run.characters16()[0]))
diff --git a/third_party/WebKit/Source/platform/text/Character.cpp b/third_party/WebKit/Source/platform/text/Character.cpp index 57fe4e7..7bd0fe5 100644 --- a/third_party/WebKit/Source/platform/text/Character.cpp +++ b/third_party/WebKit/Source/platform/text/Character.cpp
@@ -136,7 +136,7 @@ return length; } - if (direction == TextDirection::Ltr) { + if (direction == TextDirection::kLtr) { for (size_t i = 0; i < length; ++i) { if (treatAsSpace(characters[i])) { count++; @@ -165,7 +165,7 @@ bool& isAfterExpansion, const TextJustify textJustify) { unsigned count = 0; - if (direction == TextDirection::Ltr) { + if (direction == TextDirection::kLtr) { for (size_t i = 0; i < length; ++i) { UChar32 character = characters[i]; if (treatAsSpace(character)) {
diff --git a/third_party/WebKit/Source/platform/text/TextDirection.h b/third_party/WebKit/Source/platform/text/TextDirection.h index e67698a..efdc2b3c 100644 --- a/third_party/WebKit/Source/platform/text/TextDirection.h +++ b/third_party/WebKit/Source/platform/text/TextDirection.h
@@ -28,10 +28,10 @@ namespace blink { -enum class TextDirection : unsigned { Rtl, Ltr }; +enum class TextDirection : unsigned { kRtl, kLtr }; inline bool isLeftToRightDirection(TextDirection direction) { - return direction == TextDirection::Ltr; + return direction == TextDirection::kLtr; } }
diff --git a/third_party/WebKit/Source/platform/text/TextRun.h b/third_party/WebKit/Source/platform/text/TextRun.h index da248e4f..c6c78ce 100644 --- a/third_party/WebKit/Source/platform/text/TextRun.h +++ b/third_party/WebKit/Source/platform/text/TextRun.h
@@ -69,7 +69,7 @@ float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, - TextDirection direction = TextDirection::Ltr, + TextDirection direction = TextDirection::kLtr, bool directionalOverride = false) : m_charactersLength(len), m_len(len), @@ -94,7 +94,7 @@ float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, - TextDirection direction = TextDirection::Ltr, + TextDirection direction = TextDirection::kLtr, bool directionalOverride = false) : m_charactersLength(len), m_len(len), @@ -118,7 +118,7 @@ float expansion = 0, ExpansionBehavior expansionBehavior = AllowTrailingExpansion | ForbidLeadingExpansion, - TextDirection direction = TextDirection::Ltr, + TextDirection direction = TextDirection::kLtr, bool directionalOverride = false) : m_charactersLength(string.length()), m_len(string.length()), @@ -249,8 +249,8 @@ TextDirection direction() const { return static_cast<TextDirection>(m_direction); } - bool rtl() const { return direction() == TextDirection::Rtl; } - bool ltr() const { return direction() == TextDirection::Ltr; } + bool rtl() const { return direction() == TextDirection::kRtl; } + bool ltr() const { return direction() == TextDirection::kLtr; } bool directionalOverride() const { return m_directionalOverride; } bool spacingDisabled() const { return m_disableSpacing; }
diff --git a/third_party/WebKit/Source/platform/text/WritingMode.h b/third_party/WebKit/Source/platform/text/WritingMode.h index b18c4602..2e0163eb0 100644 --- a/third_party/WebKit/Source/platform/text/WritingMode.h +++ b/third_party/WebKit/Source/platform/text/WritingMode.h
@@ -37,22 +37,22 @@ // horizontal-tb, vertical-rl and vertical-lr. // Since these names aren't very self-explanatory, where possible use the // inline utility functions below. -enum class WritingMode : unsigned { HorizontalTb, VerticalRl, VerticalLr }; +enum class WritingMode : unsigned { kHorizontalTb, kVerticalRl, kVerticalLr }; // Lines have horizontal orientation; modes horizontal-tb. inline bool isHorizontalWritingMode(WritingMode writingMode) { - return writingMode == WritingMode::HorizontalTb; + return writingMode == WritingMode::kHorizontalTb; } // Bottom of the line occurs earlier in the block; modes vertical-lr. inline bool isFlippedLinesWritingMode(WritingMode writingMode) { - return writingMode == WritingMode::VerticalLr; + return writingMode == WritingMode::kVerticalLr; } // Block progression increases in the opposite direction to normal; modes // vertical-rl. inline bool isFlippedBlocksWritingMode(WritingMode writingMode) { - return writingMode == WritingMode::VerticalRl; + return writingMode == WritingMode::kVerticalRl; } } // namespace blink
diff --git a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp index 58da87fd..15347306 100644 --- a/third_party/WebKit/Source/web/ExternalPopupMenu.cpp +++ b/third_party/WebKit/Source/web/ExternalPopupMenu.cpp
@@ -267,7 +267,7 @@ static_cast<int>(menuStyle.font().getFontDescription().computedSize()); info.selectedIndex = toExternalPopupMenuItemIndex( ownerElement.selectedListIndex(), ownerElement); - info.rightAligned = menuStyle.direction() == TextDirection::Rtl; + info.rightAligned = menuStyle.direction() == TextDirection::kRtl; info.allowMultipleSelection = ownerElement.isMultiple(); if (count < itemCount) items.shrink(count);
diff --git a/third_party/WebKit/Source/web/PopupMenuImpl.cpp b/third_party/WebKit/Source/web/PopupMenuImpl.cpp index c7c38399..61cfe93 100644 --- a/third_party/WebKit/Source/web/PopupMenuImpl.cpp +++ b/third_party/WebKit/Source/web/PopupMenuImpl.cpp
@@ -74,13 +74,13 @@ const char* textTransformToString(ETextTransform transform) { switch (transform) { - case ETextTransform::Capitalize: + case ETextTransform::kCapitalize: return "capitalize"; - case ETextTransform::Uppercase: + case ETextTransform::kUppercase: return "uppercase"; - case ETextTransform::Lowercase: + case ETextTransform::kLowercase: return "lowercase"; - case ETextTransform::None: + case ETextTransform::kNone: return "none"; } NOTREACHED(); @@ -315,7 +315,7 @@ // TODO(tkent): We generate unnecessary "style: {\n},\n" even if no // additional style. PagePopupClient::addString("style: {\n", data); - if (style->visibility() == EVisibility::Hidden) + if (style->visibility() == EVisibility::kHidden) addProperty("visibility", String("hidden"), data); if (style->display() == EDisplay::None) addProperty("display", String("none"), data); @@ -323,7 +323,8 @@ if (baseStyle.direction() != style->direction()) { addProperty( "direction", - String(style->direction() == TextDirection::Rtl ? "rtl" : "ltr"), data); + String(style->direction() == TextDirection::kRtl ? "rtl" : "ltr"), + data); } if (isOverride(style->unicodeBidi())) addProperty("unicodeBidi", String("bidi-override"), data);
diff --git a/third_party/WebKit/Source/web/WebFormControlElement.cpp b/third_party/WebKit/Source/web/WebFormControlElement.cpp index 9dd3ae31..1e9fd835 100644 --- a/third_party/WebKit/Source/web/WebFormControlElement.cpp +++ b/third_party/WebKit/Source/web/WebFormControlElement.cpp
@@ -179,9 +179,9 @@ WebString WebFormControlElement::alignmentForFormData() const { if (const ComputedStyle* style = constUnwrap<HTMLFormControlElement>()->computedStyle()) { - if (style->textAlign() == ETextAlign::Right) + if (style->textAlign() == ETextAlign::kRight) return WebString::fromUTF8("right"); - if (style->textAlign() == ETextAlign::Left) + if (style->textAlign() == ETextAlign::kLeft) return WebString::fromUTF8("left"); } return WebString();
diff --git a/third_party/WebKit/Source/web/WebFrameContentDumper.cpp b/third_party/WebKit/Source/web/WebFrameContentDumper.cpp index 8877991..5700e7e9 100644 --- a/third_party/WebKit/Source/web/WebFrameContentDumper.cpp +++ b/third_party/WebKit/Source/web/WebFrameContentDumper.cpp
@@ -72,7 +72,7 @@ (contentLayoutItem.location().y() + contentLayoutItem.size().height() <= 0) || (!ownerLayoutItem.isNull() && ownerLayoutItem.style() && - ownerLayoutItem.style()->visibility() != EVisibility::Visible)) { + ownerLayoutItem.style()->visibility() != EVisibility::kVisible)) { continue; }
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp index 1172e4b1..0cb62fd8 100644 --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -605,7 +605,7 @@ bool WebLocalFrameImpl::hasVisibleContent() const { LayoutPartItem layoutItem = frame()->ownerLayoutItem(); if (!layoutItem.isNull() && - layoutItem.style()->visibility() != EVisibility::Visible) { + layoutItem.style()->visibility() != EVisibility::kVisible) { return false; }
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp index a30ee26..2b214bdc 100644 --- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -497,7 +497,7 @@ if (!owner || !owner->layoutObject()) return false; return owner->layoutObject()->style()->pointerEvents() == - EPointerEvents::None; + EPointerEvents::kNone; } void WebRemoteFrameImpl::willEnterFullscreen() {
diff --git a/third_party/WebKit/public/web/WebTextDirection.h b/third_party/WebKit/public/web/WebTextDirection.h index 0600ef5..bfa08e4 100644 --- a/third_party/WebKit/public/web/WebTextDirection.h +++ b/third_party/WebKit/public/web/WebTextDirection.h
@@ -48,9 +48,9 @@ #if BLINK_IMPLEMENTATION inline WebTextDirection toWebTextDirection(TextDirection direction) { switch (direction) { - case TextDirection::Ltr: + case TextDirection::kLtr: return WebTextDirectionLeftToRight; - case TextDirection::Rtl: + case TextDirection::kRtl: return WebTextDirectionRightToLeft; } ASSERT_NOT_REACHED();
diff --git a/ui/aura/mus/input_method_mus.cc b/ui/aura/mus/input_method_mus.cc index d1872c4..da9b27b0f 100644 --- a/ui/aura/mus/input_method_mus.cc +++ b/ui/aura/mus/input_method_mus.cc
@@ -35,7 +35,7 @@ void InputMethodMus::Init(service_manager::Connector* connector) { if (connector) - connector->ConnectToInterface(ui::mojom::kServiceName, &ime_server_); + connector->BindInterface(ui::mojom::kServiceName, &ime_server_); } void InputMethodMus::DispatchKeyEvent(
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc index d64b5c2..e29f226 100644 --- a/ui/aura/mus/window_tree_client.cc +++ b/ui/aura/mus/window_tree_client.cc
@@ -205,7 +205,7 @@ client_id_ = 101; ui::mojom::WindowTreeFactoryPtr factory; - connector_->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector_->BindInterface(ui::mojom::kServiceName, &factory); ui::mojom::WindowTreePtr window_tree; factory->CreateWindowTree(MakeRequest(&window_tree), binding_.CreateInterfacePtrAndBind()); @@ -216,7 +216,7 @@ DCHECK(window_manager_delegate_); ui::mojom::WindowManagerWindowTreeFactoryPtr factory; - connector_->ConnectToInterface(ui::mojom::kServiceName, &factory); + connector_->BindInterface(ui::mojom::kServiceName, &factory); ui::mojom::WindowTreePtr window_tree; factory->CreateWindowTree(MakeRequest(&window_tree), binding_.CreateInterfacePtrAndBind());
diff --git a/ui/ozone/platform/drm/cursor_proxy_mojo.cc b/ui/ozone/platform/drm/cursor_proxy_mojo.cc index ff24d4ad..a0918fc 100644 --- a/ui/ozone/platform/drm/cursor_proxy_mojo.cc +++ b/ui/ozone/platform/drm/cursor_proxy_mojo.cc
@@ -11,12 +11,12 @@ CursorProxyMojo::CursorProxyMojo(service_manager::Connector* connector) : connector_(connector->Clone()) { - connector->ConnectToInterface(ui::mojom::kServiceName, &main_cursor_ptr_); + connector->BindInterface(ui::mojom::kServiceName, &main_cursor_ptr_); } void CursorProxyMojo::InitializeOnEvdev() { evdev_ref_ = base::PlatformThread::CurrentRef(); - connector_->ConnectToInterface(ui::mojom::kServiceName, &evdev_cursor_ptr_); + connector_->BindInterface(ui::mojom::kServiceName, &evdev_cursor_ptr_); } CursorProxyMojo::~CursorProxyMojo() {}
diff --git a/ui/views/mus/aura_init.cc b/ui/views/mus/aura_init.cc index 4fbf1f1..eff8317e 100644 --- a/ui/views/mus/aura_init.cc +++ b/ui/views/mus/aura_init.cc
@@ -105,7 +105,7 @@ catalog::ResourceLoader loader; filesystem::mojom::DirectoryPtr directory; - connector->ConnectToInterface(catalog::mojom::kServiceName, &directory); + connector->BindInterface(catalog::mojom::kServiceName, &directory); CHECK(loader.OpenFiles(std::move(directory), resource_paths)); ui::RegisterPathProvider(); base::File pak_file = loader.TakeFile(resource_file_);
diff --git a/ui/views/mus/clipboard_mus.cc b/ui/views/mus/clipboard_mus.cc index a2e3e38..0886507c 100644 --- a/ui/views/mus/clipboard_mus.cc +++ b/ui/views/mus/clipboard_mus.cc
@@ -47,7 +47,7 @@ ClipboardMus::~ClipboardMus() {} void ClipboardMus::Init(service_manager::Connector* connector) { - connector->ConnectToInterface(ui::mojom::kServiceName, &clipboard_); + connector->BindInterface(ui::mojom::kServiceName, &clipboard_); } // TODO(erg): This isn't optimal. It would be better to move the entire
diff --git a/ui/views/mus/mus_client.cc b/ui/views/mus/mus_client.cc index ff6fc50..62cd075 100644 --- a/ui/views/mus/mus_client.cc +++ b/ui/views/mus/mus_client.cc
@@ -82,7 +82,7 @@ wm_state_ = base::MakeUnique<wm::WMState>(); discardable_memory::mojom::DiscardableSharedMemoryManagerPtr manager_ptr; - connector->ConnectToInterface(ui::mojom::kServiceName, &manager_ptr); + connector->BindInterface(ui::mojom::kServiceName, &manager_ptr); discardable_shared_memory_manager_ = base::MakeUnique< discardable_memory::ClientDiscardableSharedMemoryManager>(
diff --git a/ui/views/mus/screen_mus.cc b/ui/views/mus/screen_mus.cc index 17777aa..023b29c 100644 --- a/ui/views/mus/screen_mus.cc +++ b/ui/views/mus/screen_mus.cc
@@ -47,7 +47,7 @@ } void ScreenMus::Init(service_manager::Connector* connector) { - connector->ConnectToInterface(ui::mojom::kServiceName, &display_manager_); + connector->BindInterface(ui::mojom::kServiceName, &display_manager_); display_manager_->AddObserver( display_manager_observer_binding_.CreateInterfacePtrAndBind());