diff --git a/android_webview/common/crash_reporter/crash_keys.cc b/android_webview/common/crash_reporter/crash_keys.cc index d56a8ab..8924532e 100644 --- a/android_webview/common/crash_reporter/crash_keys.cc +++ b/android_webview/common/crash_reporter/crash_keys.cc
@@ -20,6 +20,11 @@ const char kShutdownType[] = "shutdown-type"; const char kBrowserUnpinTrace[] = "browser-unpin-trace"; +const char kAppPackageName[] = "app-package-name"; +const char kAppPackageVersionCode[] = "app-package-version-code"; + +const char kAndroidSdkInt[] = "android-sdk-int"; + const char kGPUDriverVersion[] = "gpu-driver"; const char kGPUPixelShaderVersion[] = "gpu-psver"; const char kGPUVertexShaderVersion[] = "gpu-vsver"; @@ -48,6 +53,9 @@ {kGPUVertexShaderVersion, kSmallSize}, {kGPUVendor, kSmallSize}, {kGPURenderer, kSmallSize}, + {kAppPackageName, kSmallSize}, + {kAppPackageVersionCode, kSmallSize}, + {kAndroidSdkInt, kSmallSize}, // content/: {"bad_message_reason", kSmallSize}, @@ -147,6 +155,9 @@ kGPUVertexShaderVersion, kGPUVendor, kGPURenderer, + kAppPackageName, + kAppPackageVersionCode, + kAndroidSdkInt, // content/: "bad_message_reason",
diff --git a/android_webview/common/crash_reporter/crash_keys.h b/android_webview/common/crash_reporter/crash_keys.h index f922a3e..aedfdfc 100644 --- a/android_webview/common/crash_reporter/crash_keys.h +++ b/android_webview/common/crash_reporter/crash_keys.h
@@ -28,6 +28,11 @@ extern const char kGPUVendor[]; extern const char kGPURenderer[]; +// Application information. +extern const char kAppPackageName[]; +extern const char kAppPackageVersionCode[]; + +extern const char kAndroidSdkInt[]; } // namespace crash_keys } // namespace android_webview
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc index b356d27..cce1d6b 100644 --- a/android_webview/lib/main/aw_main_delegate.cc +++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -16,6 +16,7 @@ #include "android_webview/common/aw_paths.h" #include "android_webview/common/aw_switches.h" #include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" +#include "android_webview/common/crash_reporter/crash_keys.h" #include "android_webview/gpu/aw_content_gpu_client.h" #include "android_webview/native/aw_locale_manager_impl.h" #include "android_webview/native/aw_media_url_interceptor.h" @@ -24,11 +25,14 @@ #include "android_webview/native/aw_web_preferences_populater_impl.h" #include "android_webview/renderer/aw_content_renderer_client.h" #include "base/android/apk_assets.h" +#include "base/android/build_info.h" #include "base/command_line.h" #include "base/cpu.h" +#include "base/debug/crash_logging.h" #include "base/i18n/icu_util.h" #include "base/lazy_instance.h" #include "base/logging.h" +#include "base/strings/string_number_conversions.h" #include "base/threading/thread_restrictions.h" #include "cc/base/switches.h" #include "components/crash/content/app/breakpad_linux.h" @@ -210,6 +214,16 @@ } crash_reporter::EnableCrashReporter(process_type, crash_signal_fd); + + base::android::BuildInfo* android_build_info = + base::android::BuildInfo::GetInstance(); + base::debug::SetCrashKeyValue(crash_keys::kAppPackageName, + android_build_info->package_name()); + base::debug::SetCrashKeyValue(crash_keys::kAppPackageVersionCode, + android_build_info->package_version_code()); + base::debug::SetCrashKeyValue( + crash_keys::kAndroidSdkInt, + base::IntToString(android_build_info->sdk_int())); } int AwMainDelegate::RunProcess(
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 2e4cfd7f..e774b20a 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn
@@ -112,9 +112,6 @@ if (is_ubsan || is_ubsan_null || is_ubsan_vptr || is_ubsan_security) { defines += [ "UNDEFINED_SANITIZER" ] } - if (use_external_popup_menu) { - defines += [ "USE_EXTERNAL_POPUP_MENU=1" ] - } if (!enable_nacl) { defines += [ "DISABLE_NACL" ] }
diff --git a/build/config/features.gni b/build/config/features.gni index 1287024..441bd210 100644 --- a/build/config/features.gni +++ b/build/config/features.gni
@@ -67,9 +67,6 @@ use_gconf = is_linux && !is_chromeos && !is_chromecast use_gio = is_linux && !is_chromeos && !is_chromecast - - # Whether or not to use external popup menu. - use_external_popup_menu = is_android || is_mac } # # =============================================
diff --git a/build/sanitizers/sanitizer_options.cc b/build/sanitizers/sanitizer_options.cc index 46f70d2..1f425011 100644 --- a/build/sanitizers/sanitizer_options.cc +++ b/build/sanitizers/sanitizer_options.cc
@@ -66,7 +66,7 @@ const char kAsanDefaultOptions[] = "legacy_pthread_cond=1 malloc_context_size=5 " "symbolize=1 check_printf=1 use_sigaltstack=1 detect_leaks=0 " - "strip_path_prefix=/../../ fast_unwind_on_fatal=1" + "strip_path_prefix=/../../ fast_unwind_on_fatal=1 " "allow_user_segv_handler=1 "; #else // Default AddressSanitizer options for buildbots and non-official builds.
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java index 3b3bb882..e338b42 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/NewTabPage.java
@@ -87,7 +87,6 @@ private final TileGroup.Delegate mTileGroupDelegate; private TabObserver mTabObserver; - private LogoBridge mLogoBridge; private boolean mSearchProviderHasLogo; private FakeboxDelegate mFakeboxDelegate; private SnippetsBridge mSnippetsBridge; @@ -378,7 +377,6 @@ } }; mTab.addObserver(mTabObserver); - mLogoBridge = new LogoBridge(profile); updateSearchProviderHasLogo(); LayoutInflater inflater = LayoutInflater.from(activity); @@ -561,10 +559,6 @@ .isAttachedToWindow(getView()) : "Destroy called before removed from window"; if (mIsLoaded && !mTab.isHidden()) recordNTPInteractionTime(); - if (mLogoBridge != null) { - mLogoBridge.destroy(); - mLogoBridge = null; - } if (mSnippetsBridge != null) { mSnippetsBridge.onDestroy(); mSnippetsBridge = null;
diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h index 358c624..4edae603 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.h +++ b/chrome/browser/browsing_data/browsing_data_remover.h
@@ -64,16 +64,30 @@ DATA_TYPE_SERVICE_WORKERS = 1 << 5, DATA_TYPE_CACHE_STORAGE = 1 << 6, + // Used to request the deletion of embedder-specific storage datatypes. + DATA_TYPE_EMBEDDER_DOM_STORAGE = 1 << 7, + + // DOM-accessible storage (https://www.w3.org/TR/clear-site-data/#storage). + // Has the same effect as selecting all storage datatypes listed above + // and ones defined by the embedder. + DATA_TYPE_DOM_STORAGE = DATA_TYPE_APP_CACHE | DATA_TYPE_FILE_SYSTEMS | + DATA_TYPE_INDEXED_DB | + DATA_TYPE_LOCAL_STORAGE | + DATA_TYPE_WEB_SQL | + DATA_TYPE_SERVICE_WORKERS | + DATA_TYPE_CACHE_STORAGE | + DATA_TYPE_EMBEDDER_DOM_STORAGE, + // Other datatypes. - DATA_TYPE_COOKIES = 1 << 7, - DATA_TYPE_CHANNEL_IDS = 1 << 8, - DATA_TYPE_CACHE = 1 << 9, - DATA_TYPE_DOWNLOADS = 1 << 10, - DATA_TYPE_MEDIA_LICENSES = 1 << 11, + DATA_TYPE_COOKIES = 1 << 8, + DATA_TYPE_CHANNEL_IDS = 1 << 9, + DATA_TYPE_CACHE = 1 << 10, + DATA_TYPE_DOWNLOADS = 1 << 11, + DATA_TYPE_MEDIA_LICENSES = 1 << 12, // REMOVE_NOCHECKS intentionally does not check if the browser context is // prohibited from deleting history or downloads. - DATA_TYPE_NO_CHECKS = 1 << 12, + DATA_TYPE_NO_CHECKS = 1 << 13, // Embedders can add more datatypes beyond this point. DATA_TYPE_CONTENT_END = DATA_TYPE_NO_CHECKS,
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc index a5522a5..e03e934 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate.cc
@@ -343,6 +343,12 @@ DCHECK(((remove_mask & ~FILTERABLE_DATA_TYPES) == 0) || filter_builder.IsEmptyBlacklist()); + // Embedder-defined DOM-accessible storage currently contains only + // one datatype, which is the durable storage permission. + if (remove_mask & BrowsingDataRemover::DATA_TYPE_EMBEDDER_DOM_STORAGE) { + remove_mask |= DATA_TYPE_DURABLE_PERMISSION; + } + if (origin_type_mask & BrowsingDataRemover::ORIGIN_TYPE_UNPROTECTED_WEB) { content::RecordAction( UserMetricsAction("ClearBrowsingData_MaskContainsUnprotectedWeb"));
diff --git a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc index 2212e4d4..709249b 100644 --- a/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc +++ b/chrome/browser/browsing_data/chrome_browsing_data_remover_delegate_unittest.cc
@@ -1610,6 +1610,31 @@ EXPECT_EQ(CONTENT_SETTING_ASK, host_settings[1].setting); } +TEST_F(ChromeBrowsingDataRemoverDelegateTest, + DurablePermissionIsPartOfEmbedderDOMStorage) { + HostContentSettingsMap* host_content_settings_map = + HostContentSettingsMapFactory::GetForProfile(GetProfile()); + DurableStoragePermissionContext durable_permission(GetProfile()); + durable_permission.UpdateContentSetting(kOrigin1, GURL(), + CONTENT_SETTING_ALLOW); + ContentSettingsForOneType host_settings; + host_content_settings_map->GetSettingsForOneType( + CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, std::string(), &host_settings); + EXPECT_EQ(2u, host_settings.size()); + + BlockUntilBrowsingDataRemoved( + base::Time(), base::Time::Max(), + BrowsingDataRemover::DATA_TYPE_EMBEDDER_DOM_STORAGE, false); + + // After the deletion, only the wildcard should remain. + host_content_settings_map->GetSettingsForOneType( + CONTENT_SETTINGS_TYPE_DURABLE_STORAGE, std::string(), &host_settings); + EXPECT_EQ(1u, host_settings.size()); + EXPECT_EQ(ContentSettingsPattern::Wildcard(), + host_settings[0].primary_pattern) + << host_settings[0].primary_pattern.ToString(); +} + // Test that removing passwords clears HTTP auth data. TEST_F(ChromeBrowsingDataRemoverDelegateTest, ClearHttpAuthCache_RemovePasswords) {
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index 1926ea7..cc303c1d 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -2787,12 +2787,8 @@ // Delete origin-scoped data. int remove_mask = 0; - if (remove_storage) { - remove_mask |= ChromeBrowsingDataRemoverDelegate::DATA_TYPE_SITE_DATA & - ~BrowsingDataRemover::DATA_TYPE_COOKIES & - ~BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS & - ~ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA; - } + if (remove_storage) + remove_mask |= BrowsingDataRemover::DATA_TYPE_DOM_STORAGE; if (remove_cache) remove_mask |= BrowsingDataRemover::DATA_TYPE_CACHE;
diff --git a/chrome/browser/chrome_content_browser_client_unittest.cc b/chrome/browser/chrome_content_browser_client_unittest.cc index 95736423..8c58ceee 100644 --- a/chrome/browser/chrome_content_browser_client_unittest.cc +++ b/chrome/browser/chrome_content_browser_client_unittest.cc
@@ -392,27 +392,26 @@ BrowsingDataRemover::DATA_TYPE_COOKIES | BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS | ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA}, - {false, true, false, - ChromeBrowsingDataRemoverDelegate::DATA_TYPE_SITE_DATA & - ~BrowsingDataRemover::DATA_TYPE_COOKIES & - ~BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS & - ~ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA}, + {false, true, false, BrowsingDataRemover::DATA_TYPE_DOM_STORAGE}, {false, false, true, BrowsingDataRemover::DATA_TYPE_CACHE}, {true, true, false, - ChromeBrowsingDataRemoverDelegate::DATA_TYPE_SITE_DATA}, + BrowsingDataRemover::DATA_TYPE_COOKIES | + BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS | + ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA | + BrowsingDataRemover::DATA_TYPE_DOM_STORAGE}, {true, false, true, BrowsingDataRemover::DATA_TYPE_COOKIES | BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS | ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA | BrowsingDataRemover::DATA_TYPE_CACHE}, {false, true, true, - BrowsingDataRemover::DATA_TYPE_CACHE | - (ChromeBrowsingDataRemoverDelegate::DATA_TYPE_SITE_DATA & - ~BrowsingDataRemover::DATA_TYPE_COOKIES & - ~BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS & - ~ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA)}, + BrowsingDataRemover::DATA_TYPE_DOM_STORAGE | + BrowsingDataRemover::DATA_TYPE_CACHE}, {true, true, true, - ChromeBrowsingDataRemoverDelegate::DATA_TYPE_SITE_DATA | + BrowsingDataRemover::DATA_TYPE_COOKIES | + BrowsingDataRemover::DATA_TYPE_CHANNEL_IDS | + ChromeBrowsingDataRemoverDelegate::DATA_TYPE_PLUGIN_DATA | + BrowsingDataRemover::DATA_TYPE_DOM_STORAGE | BrowsingDataRemover::DATA_TYPE_CACHE}, };
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.h b/chrome/browser/ui/cocoa/browser_window_controller.h index 3fc7c95a..5281cbf 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.h +++ b/chrome/browser/ui/cocoa/browser_window_controller.h
@@ -65,6 +65,9 @@ class Command; } +constexpr const gfx::Size kMinCocoaTabbedWindowSize(400, 272); +constexpr const gfx::Size kMinCocoaPopupWindowSize(100, 122); + @interface BrowserWindowController : TabWindowController<BookmarkBarControllerDelegate, ViewResizer,
diff --git a/chrome/browser/ui/cocoa/browser_window_controller.mm b/chrome/browser/ui/cocoa/browser_window_controller.mm index bed90c3..65249707 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller.mm
@@ -244,11 +244,11 @@ [[window contentView] setWantsLayer:YES]; windowShim_.reset(new BrowserWindowCocoa(browser, self)); - // Set different minimum sizes on tabbed windows vs non-tabbed, e.g. popups. // This has to happen before -enforceMinWindowSize: is called further down. - NSSize minSize = [self isTabbedWindow] ? - NSMakeSize(400, 272) : NSMakeSize(100, 122); - [[self window] setMinSize:minSize]; + [[self window] + setMinSize:(browser->is_type_tabbed() ? kMinCocoaTabbedWindowSize + : kMinCocoaPopupWindowSize) + .ToCGSize()]; // Lion will attempt to automagically save and restore the UI. This // functionality appears to be leaky (or at least interacts badly with our @@ -1361,6 +1361,7 @@ downloadShelfController_.reset([[DownloadShelfController alloc] initWithBrowser:browser_.get() resizeDelegate:self]); [self.chromeContentView addSubview:[downloadShelfController_ view]]; + [self layoutSubviews]; } }
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm index b99bc47..64404c0f 100644 --- a/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm +++ b/chrome/browser/ui/cocoa/browser_window_controller_unittest.mm
@@ -151,19 +151,47 @@ ASSERT_TRUE([controller isTabbedWindow]); BrowserWindow* browser_window = [controller browserWindow]; EXPECT_EQ(browser_window, browser->window()); - gfx::Rect bounds = browser_window->GetBounds(); - EXPECT_EQ(400, bounds.width()); - EXPECT_EQ(272, bounds.height()); + EXPECT_EQ(browser_window->GetBounds().size(), kMinCocoaTabbedWindowSize); // Try to set the bounds smaller than the minimum. browser_window->SetBounds(gfx::Rect(0, 0, 50, 50)); - bounds = browser_window->GetBounds(); - EXPECT_EQ(400, bounds.width()); - EXPECT_EQ(272, bounds.height()); + EXPECT_EQ(browser_window->GetBounds().size(), kMinCocoaTabbedWindowSize); [controller close]; } +// https://crbug.com/667698 - When Auto Layout is in use, adding the download +// shelf without ever showing it shouldn't prevent the window from being +// resized to its minimum width. +TEST_F(BrowserWindowControllerTest, TestSetBoundsWithDownloadShelf) { + BrowserWindow* browser_window = [controller_ browserWindow]; + browser_window->SetBounds(gfx::Rect(0, 0, 1000, 50)); + + // Auto Layout only acts on the window if it's visible. + browser_window->ShowInactive(); + + // The browser window should lazily create the download shelf when requested. + EXPECT_NE(nullptr, browser_window->GetDownloadShelf()); + + // The controller should now have a download shelf, which should have a view. + EXPECT_NE(nil, [[controller_ downloadShelf] view]); + + // But, just requesting the download shelf shouldn't make it visible. + EXPECT_FALSE([controller_ isDownloadShelfVisible]); + + browser_window->SetBounds(gfx::Rect(0, 0, 50, 50)); + + // When linking against an SDK >= 10.11, AppKit may lay out the window + // asynchronously (CFExecutableLinkedOnOrAfter check in -[NSThemeFrame + // handleSetFrameCommonRedisplay]). Do layout now instead. + [[controller_ window] layoutIfNeeded]; + + // The window should have returned to its minimum size. + EXPECT_EQ(browser_window->GetBounds().size(), kMinCocoaTabbedWindowSize); + + browser_window->Close(); +} + TEST_F(BrowserWindowControllerTest, TestSetBoundsPopup) { // Create a popup with bounds smaller than the minimum. Browser::CreateParams params(Browser::TYPE_POPUP, profile(), true);
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc index a282dea..f3c9034 100644 --- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc +++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller.cc
@@ -29,6 +29,7 @@ #include "components/autofill/core/common/autofill_clock.h" #include "components/autofill/core/common/autofill_constants.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_spec.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" #include "ui/native_theme/native_theme.h" @@ -123,7 +124,7 @@ constexpr gfx::Size kCardIconSize = gfx::Size(30, 18); for (const std::string& supported_network : - request()->supported_card_networks()) { + request()->spec()->supported_card_networks()) { const std::string autofill_card_type = autofill::data_util::GetCardTypeForBasicCardPaymentType( supported_network); @@ -189,7 +190,7 @@ return false; // Add the card (will not add a duplicate). - request()->personal_data_manager()->AddCreditCard(credit_card); + request()->GetPersonalDataManager()->AddCreditCard(credit_card); return true; } @@ -203,7 +204,7 @@ CreditCardEditorViewController::CreditCardValidationDelegate>( field, this, field.type == autofill::CREDIT_CARD_NUMBER - ? request()->supported_card_networks() + ? request()->spec()->supported_card_networks() : std::vector<std::string>()); }
diff --git a/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc index 6d4bb54..c6323bce 100644 --- a/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc +++ b/chrome/browser/ui/views/payments/credit_card_editor_view_controller_browsertest.cc
@@ -14,6 +14,7 @@ #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/test_autofill_clock.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_spec.h" #include "components/strings/grit/components_strings.h" #include "content/public/test/browser_test_utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -324,7 +325,7 @@ GetPaymentRequests(GetActiveWebContents()); EXPECT_EQ(1u, requests.size()); std::vector<std::string> supported_card_networks = - requests[0]->supported_card_networks(); + requests[0]->spec()->supported_card_networks(); EXPECT_EQ(2u, supported_card_networks.size()); // The networks appear in the order in which they were specified by the // merchant. @@ -342,7 +343,7 @@ GetPaymentRequests(GetActiveWebContents()); EXPECT_EQ(1u, requests.size()); std::vector<std::string> supported_card_networks = - requests[0]->supported_card_networks(); + requests[0]->spec()->supported_card_networks(); // The default ordering is alphabetical. EXPECT_EQ(8u, supported_card_networks.size()); EXPECT_EQ("amex", supported_card_networks[0]); @@ -370,7 +371,7 @@ GetPaymentRequests(GetActiveWebContents()); EXPECT_EQ(1u, requests.size()); std::vector<std::string> supported_card_networks = - requests[0]->supported_card_networks(); + requests[0]->spec()->supported_card_networks(); // 'mastercard' is first because it was explicitely specified first. The rest // is alphabetical. EXPECT_EQ(8u, supported_card_networks.size()); @@ -397,7 +398,7 @@ GetPaymentRequests(GetActiveWebContents()); EXPECT_EQ(1u, requests.size()); std::vector<std::string> supported_card_networks = - requests[0]->supported_card_networks(); + requests[0]->spec()->supported_card_networks(); // 'visa' is first because it was explicitely specified first. The rest // is alphabetical. EXPECT_EQ(8u, supported_card_networks.size()); @@ -429,7 +430,7 @@ GetPaymentRequests(GetActiveWebContents()); EXPECT_EQ(1u, requests.size()); std::vector<std::string> supported_card_networks = - requests[0]->supported_card_networks(); + requests[0]->spec()->supported_card_networks(); EXPECT_EQ(3u, supported_card_networks.size()); EXPECT_EQ("mastercard", supported_card_networks[0]); EXPECT_EQ("visa", supported_card_networks[1]);
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.cc b/chrome/browser/ui/views/payments/order_summary_view_controller.cc index 15503c24..47b61d71 100644 --- a/chrome/browser/ui/views/payments/order_summary_view_controller.cc +++ b/chrome/browser/ui/views/payments/order_summary_view_controller.cc
@@ -16,6 +16,8 @@ #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" #include "chrome/browser/ui/views/payments/payment_request_views_util.h" #include "chrome/grit/generated_resources.h" +#include "components/payments/content/payment_request_spec.h" +#include "components/payments/content/payment_request_state.h" #include "components/payments/core/currency_formatter.h" #include "components/strings/grit/components_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -86,11 +88,11 @@ PaymentRequest* request, PaymentRequestDialogView* dialog) : PaymentRequestSheetController(request, dialog), pay_button_(nullptr) { - request->AddObserver(this); + request->state()->AddObserver(this); } OrderSummaryViewController::~OrderSummaryViewController() { - request()->RemoveObserver(this); + request()->state()->RemoveObserver(this); } std::unique_ptr<views::View> OrderSummaryViewController::CreateView() { @@ -108,28 +110,31 @@ DialogViewID::ORDER_SUMMARY_LINE_ITEM_1, DialogViewID::ORDER_SUMMARY_LINE_ITEM_2, DialogViewID::ORDER_SUMMARY_LINE_ITEM_3}; - for (size_t i = 0; i < request()->details()->display_items.size(); i++) { + for (size_t i = 0; i < request()->spec()->details().display_items.size(); + i++) { DialogViewID view_id = i < line_items.size() ? line_items[i] : DialogViewID::VIEW_ID_NONE; content_view->AddChildView( CreateLineItemView( - base::UTF8ToUTF16(request()->details()->display_items[i]->label), + base::UTF8ToUTF16( + request()->spec()->details().display_items[i]->label), request()->GetFormattedCurrencyAmount( - request()->details()->display_items[i]->amount->value), + request()->spec()->details().display_items[i]->amount->value), false, view_id) .release()); } base::string16 total_label_value = l10n_util::GetStringFUTF16( IDS_PAYMENT_REQUEST_ORDER_SUMMARY_SHEET_TOTAL_FORMAT, - base::UTF8ToUTF16(request()->details()->total->amount->currency), + base::UTF8ToUTF16(request()->spec()->details().total->amount->currency), request()->GetFormattedCurrencyAmount( - request()->details()->total->amount->value)); + request()->spec()->details().total->amount->value)); content_view->AddChildView( - CreateLineItemView(base::UTF8ToUTF16(request()->details()->total->label), - total_label_value, true, - DialogViewID::ORDER_SUMMARY_TOTAL_AMOUNT_LABEL) + CreateLineItemView( + base::UTF8ToUTF16(request()->spec()->details().total->label), + total_label_value, true, + DialogViewID::ORDER_SUMMARY_TOTAL_AMOUNT_LABEL) .release()); return CreatePaymentView( @@ -148,12 +153,12 @@ button->set_tag(static_cast<int>(PaymentRequestCommonTags::PAY_BUTTON_TAG)); button->set_id(static_cast<int>(DialogViewID::PAY_BUTTON)); pay_button_ = button.get(); - UpdatePayButtonState(request()->is_ready_to_pay()); + UpdatePayButtonState(request()->state()->is_ready_to_pay()); return button; } void OrderSummaryViewController::OnSelectedInformationChanged() { - UpdatePayButtonState(request()->is_ready_to_pay()); + UpdatePayButtonState(request()->state()->is_ready_to_pay()); } void OrderSummaryViewController::UpdatePayButtonState(bool enabled) {
diff --git a/chrome/browser/ui/views/payments/order_summary_view_controller.h b/chrome/browser/ui/views/payments/order_summary_view_controller.h index 7f60238..59081241 100644 --- a/chrome/browser/ui/views/payments/order_summary_view_controller.h +++ b/chrome/browser/ui/views/payments/order_summary_view_controller.h
@@ -8,6 +8,7 @@ #include "base/macros.h" #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_state.h" namespace payments { @@ -17,7 +18,7 @@ // The PaymentRequestSheetController subtype for the Order Summary screen of the // Payment Request flow. class OrderSummaryViewController : public PaymentRequestSheetController, - public PaymentRequest::Observer { + public PaymentRequestState::Observer { public: // Does not take ownership of the arguments, which should outlive this object. OrderSummaryViewController(PaymentRequest* request, @@ -28,7 +29,7 @@ std::unique_ptr<views::View> CreateView() override; std::unique_ptr<views::Button> CreatePrimaryButton() override; - // PaymentRequest::Observer: + // PaymentRequestState::Observer: void OnSelectedInformationChanged() override; private:
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller.cc b/chrome/browser/ui/views/payments/payment_method_view_controller.cc index 6120a7c..e208a9c 100644 --- a/chrome/browser/ui/views/payments/payment_method_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_method_view_controller.cc
@@ -17,6 +17,7 @@ #include "components/autofill/core/browser/autofill_type.h" #include "components/autofill/core/browser/credit_card.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_state.h" #include "components/strings/grit/components_strings.h" #include "third_party/skia/include/core/SkColor.h" #include "ui/base/l10n/l10n_util.h" @@ -125,7 +126,7 @@ if (checkmark_) checkmark_->SetVisible(selected()); - request()->SetSelectedCreditCard(card_); + request()->state()->SetSelectedCreditCard(card_); } // views::ButtonListener: @@ -157,13 +158,13 @@ PaymentRequestDialogView* dialog) : PaymentRequestSheetController(request, dialog) { const std::vector<autofill::CreditCard*>& available_cards = - request->credit_cards(); + request->state()->credit_cards(); for (autofill::CreditCard* card : available_cards) { std::unique_ptr<PaymentMethodListItem> item = base::MakeUnique<PaymentMethodListItem>( card, request, &payment_method_list_, - card == request->selected_credit_card()); + card == request->state()->selected_credit_card()); payment_method_list_.AddItem(std::move(item)); } }
diff --git a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc index 9d1e111..4cd3feb 100644 --- a/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc +++ b/chrome/browser/ui/views/payments/payment_method_view_controller_browsertest.cc
@@ -7,6 +7,7 @@ #include "components/autofill/core/browser/autofill_test_utils.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_state.h" #include "testing/gtest/include/gtest/gtest.h" namespace payments { @@ -39,14 +40,14 @@ OpenPaymentMethodScreen(); PaymentRequest* request = GetPaymentRequests(GetActiveWebContents())[0]; - EXPECT_EQ(1U, request->credit_cards().size()); + EXPECT_EQ(1U, request->state()->credit_cards().size()); views::View* list_view = dialog_view()->GetViewByID( static_cast<int>(DialogViewID::PAYMENT_METHOD_SHEET_LIST_VIEW)); EXPECT_TRUE(list_view); EXPECT_EQ(1, list_view->child_count()); - EXPECT_EQ(card, *request->selected_credit_card()); + EXPECT_EQ(card, *request->state()->selected_credit_card()); views::View* checkmark_view = list_view->child_at(0)->GetViewByID( static_cast<int>(DialogViewID::CHECKMARK_VIEW)); EXPECT_TRUE(checkmark_view->visible()); @@ -67,15 +68,15 @@ OpenPaymentMethodScreen(); PaymentRequest* request = GetPaymentRequests(GetActiveWebContents())[0]; - EXPECT_EQ(2U, request->credit_cards().size()); - EXPECT_EQ(card1, *request->selected_credit_card()); + EXPECT_EQ(2U, request->state()->credit_cards().size()); + EXPECT_EQ(card1, *request->state()->selected_credit_card()); views::View* list_view = dialog_view()->GetViewByID( static_cast<int>(DialogViewID::PAYMENT_METHOD_SHEET_LIST_VIEW)); EXPECT_TRUE(list_view); EXPECT_EQ(2, list_view->child_count()); - EXPECT_EQ(card1, *request->selected_credit_card()); + EXPECT_EQ(card1, *request->state()->selected_credit_card()); views::View* checkmark_view = list_view->child_at(0)->GetViewByID( static_cast<int>(DialogViewID::CHECKMARK_VIEW)); EXPECT_TRUE(checkmark_view->visible()); @@ -87,14 +88,14 @@ // Simulate selecting the second card. ClickOnDialogViewAndWait(list_view->child_at(1)); - EXPECT_EQ(card2, *request->selected_credit_card()); + EXPECT_EQ(card2, *request->state()->selected_credit_card()); EXPECT_FALSE(checkmark_view->visible()); EXPECT_TRUE(checkmark_view2->visible()); // Clicking on the second card again should not modify any state. ClickOnDialogViewAndWait(list_view->child_at(1)); - EXPECT_EQ(card2, *request->selected_credit_card()); + EXPECT_EQ(card2, *request->state()->selected_credit_card()); EXPECT_FALSE(checkmark_view->visible()); EXPECT_TRUE(checkmark_view2->visible()); }
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc index 52d3f1c..384a00b 100644 --- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc +++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.cc
@@ -27,6 +27,8 @@ #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/browser/personal_data_manager.h" +#include "components/payments/content/payment_request_spec.h" +#include "components/payments/content/payment_request_state.h" #include "components/payments/core/currency_formatter.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/web_contents.h" @@ -193,11 +195,11 @@ : PaymentRequestSheetController(request, dialog), pay_button_(nullptr), widest_name_column_view_width_(ComputeWidestNameColumnViewWidth()) { - request->AddObserver(this); + request->state()->AddObserver(this); } PaymentSheetViewController::~PaymentSheetViewController() { - request()->RemoveObserver(this); + request()->state()->RemoveObserver(this); } std::unique_ptr<views::View> PaymentSheetViewController::CreateView() { @@ -213,7 +215,7 @@ layout->StartRow(0, 0); layout->AddView(CreatePaymentSheetSummaryRow().release()); - if (request()->request_shipping()) { + if (request()->spec()->request_shipping()) { layout->StartRow(0, 0); layout->AddView(CreateShippingRow().release()); layout->StartRow(0, 0); @@ -221,8 +223,9 @@ } layout->StartRow(0, 0); layout->AddView(CreatePaymentMethodRow().release()); - if (request()->request_payer_name() || request()->request_payer_email() || - request()->request_payer_phone()) { + if (request()->spec()->request_payer_name() || + request()->spec()->request_payer_email() || + request()->spec()->request_payer_phone()) { layout->StartRow(0, 0); layout->AddView(CreateContactInfoRow().release()); } @@ -236,7 +239,7 @@ } void PaymentSheetViewController::OnSelectedInformationChanged() { - UpdatePayButtonState(request()->is_ready_to_pay()); + UpdatePayButtonState(request()->state()->is_ready_to_pay()); } std::unique_ptr<views::Button> @@ -247,7 +250,7 @@ button->set_tag(static_cast<int>(PaymentRequestCommonTags::PAY_BUTTON_TAG)); button->set_id(static_cast<int>(DialogViewID::PAY_BUTTON)); pay_button_ = button.get(); - UpdatePayButtonState(request()->is_ready_to_pay()); + UpdatePayButtonState(request()->state()->is_ready_to_pay()); return button; } @@ -337,7 +340,7 @@ /* trailing =*/true); const std::vector<mojom::PaymentItemPtr>& items = - request()->details()->display_items; + request()->spec()->details().display_items; // The inline items section contains the first 2 display items of the // request's details, followed by a label indicating "N more items..." if // there are more than 2 items in the details. The total label and amount @@ -370,7 +373,8 @@ item_summaries_layout->StartRow(0, 0); item_summaries_layout->AddView( - CreateBoldLabel(base::ASCIIToUTF16(request()->details()->total->label)) + CreateBoldLabel( + base::ASCIIToUTF16(request()->spec()->details().total->label)) .release()); item_amounts_layout->StartRow(0, 0); @@ -380,7 +384,7 @@ IDS_PAYMENT_REQUEST_ORDER_SUMMARY_SHEET_TOTAL_FORMAT, base::UTF8ToUTF16(request()->GetFormattedCurrencyCode()), request()->GetFormattedCurrencyAmount( - request()->details()->total->amount->value))) + request()->spec()->details().total->amount->value))) .release()); item_summaries->SetLayoutManager(item_summaries_layout.release()); @@ -400,10 +404,11 @@ std::unique_ptr<views::View> PaymentSheetViewController::CreateShippingSectionContent() { - auto* profile = request()->selected_shipping_profile(); + auto* profile = request()->state()->selected_shipping_profile(); return profile ? payments::GetShippingAddressLabel( - AddressStyleType::SUMMARY, request()->locale(), *profile) + AddressStyleType::SUMMARY, + request()->GetApplicationLocale(), *profile) : base::MakeUnique<views::Label>(base::string16()); } @@ -417,7 +422,8 @@ std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingRow() { std::unique_ptr<views::Button> section = CreatePaymentSheetRow( this, - GetShippingAddressSectionString(request()->options()->shipping_type), + GetShippingAddressSectionString( + request()->spec()->options().shipping_type), CreateShippingSectionContent(), std::unique_ptr<views::View>(nullptr), widest_name_column_view_width_); section->set_tag( @@ -436,7 +442,8 @@ // +----------------------------------------------+ std::unique_ptr<views::Button> PaymentSheetViewController::CreatePaymentMethodRow() { - autofill::CreditCard* selected_card = request()->selected_credit_card(); + autofill::CreditCard* selected_card = + request()->state()->selected_credit_card(); std::unique_ptr<views::View> content_view; std::unique_ptr<views::ImageView> card_icon_view; @@ -477,14 +484,15 @@ std::unique_ptr<views::View> PaymentSheetViewController::CreateContactInfoSectionContent() { - auto* profile = request()->selected_contact_profile(); + auto* profile = request()->state()->selected_contact_profile(); - return profile ? payments::GetContactInfoLabel( - AddressStyleType::SUMMARY, request()->locale(), *profile, - request()->request_payer_name(), - request()->request_payer_phone(), - request()->request_payer_email()) - : base::MakeUnique<views::Label>(base::string16()); + return profile + ? payments::GetContactInfoLabel( + AddressStyleType::SUMMARY, request()->GetApplicationLocale(), + *profile, request()->spec()->request_payer_name(), + request()->spec()->request_payer_phone(), + request()->spec()->request_payer_email()) + : base::MakeUnique<views::Label>(base::string16()); } // Creates the Contact Info row, which contains a "Contact info" label; the @@ -511,13 +519,15 @@ std::unique_ptr<views::Button> PaymentSheetViewController::CreateShippingOptionRow() { payments::mojom::PaymentShippingOption* selected_option = - request()->selected_shipping_option(); + request()->state()->selected_shipping_option(); std::unique_ptr<views::View> option_label = CreateShippingOptionLabel( selected_option, selected_option ? request()->GetFormattedCurrencyAmount( selected_option->amount->value) : base::ASCIIToUTF16("")); std::unique_ptr<views::Button> section = CreatePaymentSheetRow( - this, GetShippingOptionSectionString(request()->options()->shipping_type), + this, + GetShippingOptionSectionString( + request()->spec()->options().shipping_type), std::move(option_label), std::unique_ptr<views::View>(nullptr), widest_name_column_view_width_); section->set_tag(static_cast<int>(
diff --git a/chrome/browser/ui/views/payments/payment_sheet_view_controller.h b/chrome/browser/ui/views/payments/payment_sheet_view_controller.h index 1c3a499..ca1d41ec 100644 --- a/chrome/browser/ui/views/payments/payment_sheet_view_controller.h +++ b/chrome/browser/ui/views/payments/payment_sheet_view_controller.h
@@ -10,6 +10,7 @@ #include "base/macros.h" #include "chrome/browser/ui/views/payments/payment_request_sheet_controller.h" #include "components/payments/content/payment_request.h" +#include "components/payments/content/payment_request_state.h" namespace payments { @@ -19,7 +20,7 @@ // The PaymentRequestSheetController subtype for the Payment Sheet screen of the // Payment Request dialog. class PaymentSheetViewController : public PaymentRequestSheetController, - public PaymentRequest::Observer { + public PaymentRequestState::Observer { public: // Does not take ownership of the arguments, which should outlive this object. PaymentSheetViewController(PaymentRequest* request, @@ -29,7 +30,7 @@ // PaymentRequestSheetController: std::unique_ptr<views::View> CreateView() override; - // PaymentRequest::Observer: + // PaymentRequestState::Observer: void OnSelectedInformationChanged() override; private: @@ -46,7 +47,6 @@ std::unique_ptr<views::Button> CreatePaymentMethodRow(); std::unique_ptr<views::View> CreateContactInfoSectionContent(); std::unique_ptr<views::Button> CreateContactInfoRow(); - std::unique_ptr<views::View> CreateShippingOptionContent(); std::unique_ptr<views::Button> CreateShippingOptionRow(); views::Button* pay_button_;
diff --git a/chrome/browser/ui/views/payments/profile_list_view_controller.cc b/chrome/browser/ui/views/payments/profile_list_view_controller.cc index b9cba9e..931635c 100644 --- a/chrome/browser/ui/views/payments/profile_list_view_controller.cc +++ b/chrome/browser/ui/views/payments/profile_list_view_controller.cc
@@ -94,15 +94,16 @@ std::unique_ptr<views::View> GetLabel( autofill::AutofillProfile* profile) override { return GetShippingAddressLabel(AddressStyleType::DETAILED, - request_->locale(), *profile); + request()->GetApplicationLocale(), *profile); } std::vector<autofill::AutofillProfile*> GetProfiles() override { - return request_->shipping_profiles(); + return request()->state()->shipping_profiles(); } base::string16 GetHeaderString() override { - return GetShippingAddressSectionString(request_->options()->shipping_type); + return GetShippingAddressSectionString( + request()->spec()->options().shipping_type); } private: @@ -120,14 +121,15 @@ // ProfileListViewController: std::unique_ptr<views::View> GetLabel( autofill::AutofillProfile* profile) override { - return GetContactInfoLabel(AddressStyleType::DETAILED, request_->locale(), - *profile, request_->request_payer_name(), - request_->request_payer_phone(), - request_->request_payer_email()); + return GetContactInfoLabel(AddressStyleType::DETAILED, + request()->GetApplicationLocale(), *profile, + request()->spec()->request_payer_name(), + request()->spec()->request_payer_phone(), + request()->spec()->request_payer_email()); } std::vector<autofill::AutofillProfile*> GetProfiles() override { - return request_->contact_profiles(); + return request()->state()->contact_profiles(); } base::string16 GetHeaderString() override { @@ -160,13 +162,13 @@ ProfileListViewController::ProfileListViewController( PaymentRequest* request, PaymentRequestDialogView* dialog) - : PaymentRequestSheetController(request, dialog), request_(request) {} + : PaymentRequestSheetController(request, dialog) {} ProfileListViewController::~ProfileListViewController() {} std::unique_ptr<views::View> ProfileListViewController::CreateView() { autofill::AutofillProfile* selected_profile = - request()->selected_shipping_profile(); + request()->state()->selected_shipping_profile(); // This must be done at Create-time, rather than construct-time, because // the subclass method GetProfiles can't be called in the ctor.
diff --git a/chrome/browser/ui/views/payments/profile_list_view_controller.h b/chrome/browser/ui/views/payments/profile_list_view_controller.h index b3838425..a02ebb3 100644 --- a/chrome/browser/ui/views/payments/profile_list_view_controller.h +++ b/chrome/browser/ui/views/payments/profile_list_view_controller.h
@@ -64,9 +64,6 @@ // Returns the string displayed at the top of the view. virtual base::string16 GetHeaderString() = 0; - // Not owned. Never null. Outlives this object. - PaymentRequest* request_; - private: std::unique_ptr<views::Button> CreateRow(autofill::AutofillProfile* profile); PaymentRequestItemList list_;
diff --git a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc index fdceffe..ad68373 100644 --- a/chrome/browser/ui/views/payments/shipping_option_view_controller.cc +++ b/chrome/browser/ui/views/payments/shipping_option_view_controller.cc
@@ -42,10 +42,10 @@ PaymentRequest* request, PaymentRequestDialogView* dialog) : PaymentRequestSheetController(request, dialog) { - for (const auto& option : request->details()->shipping_options) { + for (const auto& option : request->spec()->details().shipping_options) { shipping_option_list_.AddItem(base::MakeUnique<ShippingOptionItem>( option.get(), request, &shipping_option_list_, - option.get() == request->selected_shipping_option())); + option.get() == request->state()->selected_shipping_option())); } } @@ -55,10 +55,10 @@ std::unique_ptr<views::View> list_view = shipping_option_list_.CreateListView(); return CreatePaymentView( - CreateSheetHeaderView( - true, - GetShippingOptionSectionString(request()->options()->shipping_type), - this), + CreateSheetHeaderView(true, + GetShippingOptionSectionString( + request()->spec()->options().shipping_type), + this), std::move(list_view)); }
diff --git a/components/payments/content/BUILD.gn b/components/payments/content/BUILD.gn index e58ff00..bc33a0f 100644 --- a/components/payments/content/BUILD.gn +++ b/components/payments/content/BUILD.gn
@@ -27,6 +27,10 @@ "payment_request.h", "payment_request_delegate.h", "payment_request_dialog.h", + "payment_request_spec.cc", + "payment_request_spec.h", + "payment_request_state.cc", + "payment_request_state.h", "payment_request_web_contents_manager.cc", "payment_request_web_contents_manager.h", ] @@ -67,14 +71,19 @@ source_set("unit_tests") { testonly = true sources = [ + "payment_request_spec_unittest.cc", + "payment_request_state_unittest.cc", "payments_validators_unittest.cc", ] deps = [ + ":payment_request", + ":payment_request_impl", ":payment_validation", "//base", "//base/test:test_support", "//components/autofill/core/browser", + "//components/autofill/core/browser:test_support", "//testing/gtest", "//third_party/icu", "//third_party/libaddressinput:test_support",
diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc index fe5827b0..89a424f4 100644 --- a/components/payments/content/payment_request.cc +++ b/components/payments/content/payment_request.cc
@@ -4,29 +4,18 @@ #include "components/payments/content/payment_request.h" -#include <algorithm> -#include <set> -#include <unordered_map> #include <utility> #include "base/memory/ptr_util.h" -#include "components/autofill/core/browser/autofill_data_util.h" -#include "components/autofill/core/browser/field_types.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/payments/content/payment_details_validation.h" #include "components/payments/content/payment_request_web_contents_manager.h" -#include "components/payments/core/autofill_payment_instrument.h" #include "components/payments/core/currency_formatter.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/web_contents.h" namespace payments { -namespace { -// Identifier for the basic card payment method in the PaymentMethodData. -static const char* const kBasicCardMethodName = "basic-card"; -} // namespace - PaymentRequest::PaymentRequest( content::WebContents* web_contents, std::unique_ptr<PaymentRequestDelegate> delegate, @@ -35,12 +24,7 @@ : web_contents_(web_contents), delegate_(std::move(delegate)), manager_(manager), - binding_(this, std::move(request)), - is_ready_to_pay_(false), - selected_shipping_profile_(nullptr), - selected_contact_profile_(nullptr), - selected_credit_card_(nullptr), - selected_shipping_option_(nullptr) { + binding_(this, std::move(request)) { // OnConnectionTerminated will be called when the Mojo pipe is closed. This // will happen as a result of many renderer-side events (both successful and // erroneous in nature). @@ -65,12 +49,9 @@ return; } client_ = std::move(client); - details_ = std::move(details); - options_ = std::move(options); - PopulateValidatedMethodData(method_data); - PopulateProfileCache(); - SetDefaultProfileSelections(); - UpdateSelectedShippingOptionFromDetails(); + spec_ = base::MakeUnique<PaymentRequestSpec>( + std::move(options), std::move(details), std::move(method_data), this); + state_ = base::MakeUnique<PaymentRequestState>(spec_.get(), this); } void PaymentRequest::Show() { @@ -106,12 +87,21 @@ client_->OnCanMakePayment(mojom::CanMakePaymentQueryResult::CAN_MAKE_PAYMENT); } -void PaymentRequest::OnInstrumentDetailsReady( - const std::string& method_name, - const std::string& stringified_details) { - payment_response_->method_name = method_name; - payment_response_->stringified_details = stringified_details; - client_->OnPaymentResponse(std::move(payment_response_)); +void PaymentRequest::OnInvalidSpecProvided() { + OnConnectionTerminated(); +} + +const std::string& PaymentRequest::GetApplicationLocale() { + return delegate_->GetApplicationLocale(); +} + +autofill::PersonalDataManager* PaymentRequest::GetPersonalDataManager() { + return delegate_->GetPersonalDataManager(); +} + +void PaymentRequest::OnPaymentResponseAvailable( + mojom::PaymentResponsePtr response) { + client_->OnPaymentResponse(std::move(response)); } void PaymentRequest::UserCancelled() { @@ -142,30 +132,9 @@ } void PaymentRequest::Pay() { - DCHECK(is_ready_to_pay_); + DCHECK(state_->is_ready_to_pay()); - // TODO(mathp): Fill other fields in the PaymentResponsePtr object. - payment_response_ = mojom::PaymentResponse::New(); - - // TODO(mathp): PaymentRequest should know about the currently selected - // instrument, and not |selected_credit_card_| which is too specific. - // TODO(mathp): The method_name should reflect what the merchant asked, and - // not necessarily basic-card. - selected_payment_instrument_.reset(new AutofillPaymentInstrument( - kBasicCardMethodName, *selected_credit_card_, shipping_profiles_, - delegate_->GetApplicationLocale())); - // Fetch the instrument details, will call back into - // PaymentRequest::OnInstrumentsDetailsReady. - selected_payment_instrument_->InvokePaymentApp(this); -} - -void PaymentRequest::AddObserver(Observer* observer) { - CHECK(observer); - observers_.AddObserver(observer); -} - -void PaymentRequest::RemoveObserver(Observer* observer) { - observers_.RemoveObserver(observer); + state_->GeneratePaymentResponse(); } CurrencyFormatter* PaymentRequest::GetOrCreateCurrencyFormatter( @@ -181,228 +150,18 @@ base::string16 PaymentRequest::GetFormattedCurrencyAmount( const std::string& amount) { - CurrencyFormatter* formatter = - GetOrCreateCurrencyFormatter(details()->total->amount->currency, - details()->total->amount->currency_system, - delegate_->GetApplicationLocale()); + CurrencyFormatter* formatter = GetOrCreateCurrencyFormatter( + spec_->details().total->amount->currency, + spec_->details().total->amount->currency_system, GetApplicationLocale()); return formatter->Format(amount); } std::string PaymentRequest::GetFormattedCurrencyCode() { - CurrencyFormatter* formatter = - GetOrCreateCurrencyFormatter(details()->total->amount->currency, - details()->total->amount->currency_system, - delegate_->GetApplicationLocale()); + CurrencyFormatter* formatter = GetOrCreateCurrencyFormatter( + spec_->details().total->amount->currency, + spec_->details().total->amount->currency_system, GetApplicationLocale()); return formatter->formatted_currency_code(); } -void PaymentRequest::SetSelectedShippingProfile( - autofill::AutofillProfile* profile) { - selected_shipping_profile_ = profile; - UpdateIsReadyToPayAndNotifyObservers(); -} - -void PaymentRequest::SetSelectedContactProfile( - autofill::AutofillProfile* profile) { - selected_contact_profile_ = profile; - UpdateIsReadyToPayAndNotifyObservers(); -} - -void PaymentRequest::SetSelectedCreditCard(autofill::CreditCard* card) { - selected_credit_card_ = card; - UpdateIsReadyToPayAndNotifyObservers(); -} - -void PaymentRequest::PopulateProfileCache() { - std::vector<autofill::AutofillProfile*> profiles = - personal_data_manager()->GetProfilesToSuggest(); - - // PaymentRequest may outlive the Profiles returned by the Data Manager. - // Thus, we store copies, and return a vector of pointers to these copies - // whenever Profiles are requested. The same is true for credit cards. - for (size_t i = 0; i < profiles.size(); i++) { - profile_cache_.push_back( - base::MakeUnique<autofill::AutofillProfile>(*profiles[i])); - - // TODO(tmartino): Implement deduplication rules specific to shipping and - // contact profiles. - shipping_profiles_.push_back(profile_cache_[i].get()); - contact_profiles_.push_back(profile_cache_[i].get()); - } - - const std::vector<autofill::CreditCard*>& cards = - personal_data_manager()->GetCreditCardsToSuggest(); - for (autofill::CreditCard* card : cards) { - card_cache_.push_back(base::MakeUnique<autofill::CreditCard>(*card)); - credit_cards_.push_back(card_cache_.back().get()); - } -} - -void PaymentRequest::SetDefaultProfileSelections() { - if (!shipping_profiles().empty()) - selected_shipping_profile_ = shipping_profiles()[0]; - - if (!contact_profiles().empty()) - selected_contact_profile_ = contact_profiles()[0]; - - // TODO(anthonyvd): Change this code to prioritize server cards and implement - // a way to modify this function's return value. - const std::vector<autofill::CreditCard*> cards = credit_cards(); - auto first_complete_card = - std::find_if(cards.begin(), cards.end(), - [](autofill::CreditCard* card) { return card->IsValid(); }); - - selected_credit_card_ = - first_complete_card == cards.end() ? nullptr : *first_complete_card; - - UpdateIsReadyToPayAndNotifyObservers(); -} - -void PaymentRequest::PopulateValidatedMethodData( - const std::vector<payments::mojom::PaymentMethodDataPtr>& method_data) { - if (method_data.empty()) { - LOG(ERROR) << "Invalid payment methods or data"; - OnConnectionTerminated(); - return; - } - - std::set<std::string> card_networks{"amex", "diners", "discover", - "jcb", "mastercard", "mir", - "unionpay", "visa"}; - for (const payments::mojom::PaymentMethodDataPtr& method_data_entry : - method_data) { - std::vector<std::string> supported_methods = - method_data_entry->supported_methods; - if (supported_methods.empty()) { - LOG(ERROR) << "Invalid payment methods or data"; - OnConnectionTerminated(); - return; - } - - for (const std::string& method : supported_methods) { - if (method.empty()) - continue; - - // If a card network is specified right in "supportedMethods", add it. - auto card_it = card_networks.find(method); - if (card_it != card_networks.end()) { - supported_card_networks_.push_back(method); - // |method| removed from |card_networks| so that it is not doubly added - // to |supported_card_networks_| if "basic-card" is specified with no - // supported networks. - card_networks.erase(card_it); - } else if (method == kBasicCardMethodName) { - // For the "basic-card" method, check "supportedNetworks". - if (method_data_entry->supported_networks.empty()) { - // Empty |supported_networks| means all networks are supported. - supported_card_networks_.insert(supported_card_networks_.end(), - card_networks.begin(), - card_networks.end()); - // Clear the set so that no further networks are added to - // |supported_card_networks_|. - card_networks.clear(); - } else { - // The merchant has specified a few basic card supported networks. Use - // the mapping to transform to known basic-card types. - using ::payments::mojom::BasicCardNetwork; - std::unordered_map<BasicCardNetwork, std::string> networks = { - {BasicCardNetwork::AMEX, "amex"}, - {BasicCardNetwork::DINERS, "diners"}, - {BasicCardNetwork::DISCOVER, "discover"}, - {BasicCardNetwork::JCB, "jcb"}, - {BasicCardNetwork::MASTERCARD, "mastercard"}, - {BasicCardNetwork::MIR, "mir"}, - {BasicCardNetwork::UNIONPAY, "unionpay"}, - {BasicCardNetwork::VISA, "visa"}}; - for (const BasicCardNetwork& supported_network : - method_data_entry->supported_networks) { - // Make sure that the network was not already added to - // |supported_card_networks_|. - auto card_it = card_networks.find(networks[supported_network]); - if (card_it != card_networks.end()) { - supported_card_networks_.push_back(networks[supported_network]); - card_networks.erase(card_it); - } - } - } - } - } - } -} - -void PaymentRequest::UpdateIsReadyToPayAndNotifyObservers() { - is_ready_to_pay_ = - ArePaymentDetailsSatisfied() && ArePaymentOptionsSatisfied(); - NotifyOnSelectedInformationChanged(); -} - -void PaymentRequest::NotifyOnSelectedInformationChanged() { - for (auto& observer : observers_) - observer.OnSelectedInformationChanged(); -} - -bool PaymentRequest::ArePaymentDetailsSatisfied() { - // TODO(mathp): A masked card may not satisfy IsValid(). - if (selected_credit_card_ == nullptr || !selected_credit_card_->IsValid()) - return false; - - const std::string basic_card_payment_type = - autofill::data_util::GetPaymentRequestData(selected_credit_card_->type()) - .basic_card_payment_type; - return !supported_card_networks_.empty() && - std::find(supported_card_networks_.begin(), - supported_card_networks_.end(), - basic_card_payment_type) != supported_card_networks_.end(); -} - -bool PaymentRequest::ArePaymentOptionsSatisfied() { - // TODO(mathp): Have a measure of shipping address completeness. - if (request_shipping() && selected_shipping_profile_ == nullptr) - return false; - - // TODO(mathp): Make an encompassing class to validate contact info. - const std::string& app_locale = delegate_->GetApplicationLocale(); - if (request_payer_name() && - (selected_contact_profile_ == nullptr || - selected_contact_profile_ - ->GetInfo(autofill::AutofillType(autofill::NAME_FULL), app_locale) - .empty())) { - return false; - } - if (request_payer_email() && - (selected_contact_profile_ == nullptr || - selected_contact_profile_ - ->GetInfo(autofill::AutofillType(autofill::EMAIL_ADDRESS), - app_locale) - .empty())) { - return false; - } - if (request_payer_phone() && - (selected_contact_profile_ == nullptr || - selected_contact_profile_ - ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), - app_locale) - .empty())) { - return false; - } - - return true; -} - -void PaymentRequest::UpdateSelectedShippingOptionFromDetails() { - selected_shipping_option_ = nullptr; - - // As per the spec, the selected shipping option should initially be the last - // one in the array that has its selected field set to true. - auto selected_shipping_option_it = std::find_if( - details()->shipping_options.rbegin(), details()->shipping_options.rend(), - [](const payments::mojom::PaymentShippingOptionPtr& element) { - return element->selected; - }); - if (selected_shipping_option_it != details()->shipping_options.rend()) { - selected_shipping_option_ = selected_shipping_option_it->get(); - } -} - } // namespace payments
diff --git a/components/payments/content/payment_request.h b/components/payments/content/payment_request.h index 08799d1..ca56c8e6 100644 --- a/components/payments/content/payment_request.h +++ b/components/payments/content/payment_request.h
@@ -10,16 +10,14 @@ #include <vector> #include "base/macros.h" -#include "base/observer_list.h" #include "components/payments/content/payment_request.mojom.h" #include "components/payments/content/payment_request_delegate.h" -#include "components/payments/core/payment_instrument.h" +#include "components/payments/content/payment_request_spec.h" +#include "components/payments/content/payment_request_state.h" #include "mojo/public/cpp/bindings/binding.h" #include "mojo/public/cpp/bindings/interface_request.h" namespace autofill { -class AutofillProfile; -class CreditCard; class PersonalDataManager; } @@ -32,19 +30,16 @@ class CurrencyFormatter; class PaymentRequestWebContentsManager; +// This class manages the interaction between the renderer (through the +// PaymentRequestClient and Mojo stub implementation) and the UI (through the +// PaymentRequestDelegate). The API user (merchant) specification (supported +// payment methods, required information, order details) is stored in +// PaymentRequestSpec, and the current user selection state (and related data) +// is stored in PaymentRequestSpec. class PaymentRequest : public mojom::PaymentRequest, - public PaymentInstrument::Delegate { + public PaymentRequestSpec::Observer, + public PaymentRequestState::Delegate { public: - class Observer { - public: - // Called when the information (payment method, address/contact info, - // shipping option) changes. - virtual void OnSelectedInformationChanged() = 0; - - protected: - virtual ~Observer() {} - }; - PaymentRequest(content::WebContents* web_contents, std::unique_ptr<PaymentRequestDelegate> delegate, PaymentRequestWebContentsManager* manager, @@ -62,11 +57,13 @@ void Complete(mojom::PaymentComplete result) override; void CanMakePayment() override; - // PaymentInstrument::Delegate: - void OnInstrumentDetailsReady( - const std::string& method_name, - const std::string& stringified_details) override; - void OnInstrumentDetailsError() override {} + // PaymentRequestSpec::Observer: + void OnInvalidSpecProvided() override; + + // PaymentRequestState::Delegate: + const std::string& GetApplicationLocale() override; + autofill::PersonalDataManager* GetPersonalDataManager() override; + void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override; // Called when the user explicitely cancelled the flow. Will send a message // to the renderer which will indirectly destroy this object (through @@ -82,9 +79,6 @@ // Called when the user clicks on the "Pay" button. void Pay(); - void AddObserver(Observer* observer); - void RemoveObserver(Observer* observer); - // Returns the CurrencyFormatter instance for this PaymentRequest. // |locale_name| should be the result of the browser's GetApplicationLocale(). // Note: Having multiple currencies per PaymentRequest is not supported; hence @@ -102,126 +96,22 @@ // request's currency. std::string GetFormattedCurrencyCode(); - // Returns the appropriate Autofill Profiles for this user. On the first - // invocation of either getter, the profiles are fetched from the - // PersonalDataManager; on subsequent invocations, a cached version is - // returned. The profiles returned are owned by the request object. - const std::vector<autofill::AutofillProfile*>& shipping_profiles() { - return shipping_profiles_; - } - const std::vector<autofill::AutofillProfile*>& contact_profiles() { - return contact_profiles_; - } - const std::vector<autofill::CreditCard*>& credit_cards() { - return credit_cards_; - } - - // Gets the Autofill Profile representing the shipping address or contact - // information currently selected for this PaymentRequest flow. Can return - // null. - autofill::AutofillProfile* selected_shipping_profile() const { - return selected_shipping_profile_; - } - autofill::AutofillProfile* selected_contact_profile() const { - return selected_contact_profile_; - } - // Returns the currently selected credit card for this PaymentRequest flow. - // It's not guaranteed to be complete. Returns nullptr if there is no selected - // card. - autofill::CreditCard* selected_credit_card() { return selected_credit_card_; } - - payments::mojom::PaymentShippingOption* selected_shipping_option() { - return selected_shipping_option_; - } - - // Sets the |profile| to be the selected one and will update state and notify - // observers. - void SetSelectedShippingProfile(autofill::AutofillProfile* profile); - void SetSelectedContactProfile(autofill::AutofillProfile* profile); - void SetSelectedCreditCard(autofill::CreditCard* card); - - autofill::PersonalDataManager* personal_data_manager() { - return delegate_->GetPersonalDataManager(); - } - const std::string& locale() { return delegate_->GetApplicationLocale(); } - - mojom::PaymentDetails* details() { return details_.get(); } - mojom::PaymentOptions* options() { return options_.get(); } - const std::vector<std::string>& supported_card_networks() { - return supported_card_networks_; - } content::WebContents* web_contents() { return web_contents_; } - bool request_shipping() const { return options_->request_shipping; } - bool request_payer_name() const { return options_->request_payer_name; } - bool request_payer_phone() const { return options_->request_payer_phone; } - bool request_payer_email() const { return options_->request_payer_email; } - - bool is_ready_to_pay() { return is_ready_to_pay_; } + PaymentRequestSpec* spec() { return spec_.get(); } + PaymentRequestState* state() { return state_.get(); } private: - // Fetches the Autofill Profiles for this user from the PersonalDataManager, - // and stores copies of them, owned by this Request, in profile_cache_. - void PopulateProfileCache(); - - // Sets the default values for the selected Shipping and Contact profiles, as - // well as the selected Credit Card. - void SetDefaultProfileSelections(); - - // Validates the |method_data| and fills |supported_card_networks_|. - void PopulateValidatedMethodData( - const std::vector<mojom::PaymentMethodDataPtr>& method_data); - - // Updates |is_ready_to_pay_| with the current state, by validating that all - // the required information is available and notify observers. - void UpdateIsReadyToPayAndNotifyObservers(); - - // Notifies all observers that selected information has changed. - void NotifyOnSelectedInformationChanged(); - - // Returns whether the selected data satisfies the PaymentDetails requirements - // (payment methods). - bool ArePaymentDetailsSatisfied(); - // Returns whether the selected data satisfies the PaymentOptions requirements - // (contact info, shipping address). - bool ArePaymentOptionsSatisfied(); - - // Updates the selected_shipping_option based on the data passed to this - // payment request by the website. This will set selected_shipping_option_ to - // the last option marked selected in the options array. - void UpdateSelectedShippingOptionFromDetails(); - content::WebContents* web_contents_; std::unique_ptr<PaymentRequestDelegate> delegate_; // |manager_| owns this PaymentRequest. PaymentRequestWebContentsManager* manager_; mojo::Binding<mojom::PaymentRequest> binding_; mojom::PaymentRequestClientPtr client_; - mojom::PaymentDetailsPtr details_; - mojom::PaymentOptionsPtr options_; std::unique_ptr<CurrencyFormatter> currency_formatter_; - // A set of supported basic card networks. - std::vector<std::string> supported_card_networks_; - bool is_ready_to_pay_; - std::unique_ptr<PaymentInstrument> selected_payment_instrument_; - mojom::PaymentResponsePtr payment_response_; - base::ObserverList<Observer> observers_; - - // Profiles may change due to (e.g.) sync events, so profiles are cached after - // loading and owned here. They are populated once only, and ordered by - // frecency. - std::vector<std::unique_ptr<autofill::AutofillProfile>> profile_cache_; - std::vector<autofill::AutofillProfile*> shipping_profiles_; - std::vector<autofill::AutofillProfile*> contact_profiles_; - autofill::AutofillProfile* selected_shipping_profile_; - autofill::AutofillProfile* selected_contact_profile_; - std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; - std::vector<autofill::CreditCard*> credit_cards_; - autofill::CreditCard* selected_credit_card_; - // This is owned by |details_|, which is owned by this object and lives until - // |this| is destructed so it's safe to keep this raw pointer. - payments::mojom::PaymentShippingOption* selected_shipping_option_; + std::unique_ptr<PaymentRequestSpec> spec_; + std::unique_ptr<PaymentRequestState> state_; DISALLOW_COPY_AND_ASSIGN(PaymentRequest); };
diff --git a/components/payments/content/payment_request_spec.cc b/components/payments/content/payment_request_spec.cc new file mode 100644 index 0000000..7509a76 --- /dev/null +++ b/components/payments/content/payment_request_spec.cc
@@ -0,0 +1,115 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/payments/content/payment_request_spec.h" + +#include <utility> + +#include "base/logging.h" + +namespace payments { + +namespace { +// Identifier for the basic card payment method in the PaymentMethodData. +static const char* const kBasicCardMethodName = "basic-card"; +} // namespace + +PaymentRequestSpec::PaymentRequestSpec( + mojom::PaymentOptionsPtr options, + mojom::PaymentDetailsPtr details, + std::vector<mojom::PaymentMethodDataPtr> method_data, + Observer* observer) + : options_(std::move(options)), details_(std::move(details)) { + if (observer) + AddObserver(observer); + PopulateValidatedMethodData(method_data); +} +PaymentRequestSpec::~PaymentRequestSpec() {} + +void PaymentRequestSpec::AddObserver(Observer* observer) { + CHECK(observer); + observers_.AddObserver(observer); +} + +void PaymentRequestSpec::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +void PaymentRequestSpec::PopulateValidatedMethodData( + const std::vector<mojom::PaymentMethodDataPtr>& method_data) { + if (method_data.empty()) { + LOG(ERROR) << "Invalid payment methods or data"; + NotifyOnInvalidSpecProvided(); + return; + } + + std::set<std::string> card_networks{"amex", "diners", "discover", + "jcb", "mastercard", "mir", + "unionpay", "visa"}; + for (const mojom::PaymentMethodDataPtr& method_data_entry : method_data) { + std::vector<std::string> supported_methods = + method_data_entry->supported_methods; + if (supported_methods.empty()) { + LOG(ERROR) << "Invalid payment methods or data"; + NotifyOnInvalidSpecProvided(); + return; + } + + for (const std::string& method : supported_methods) { + if (method.empty()) + continue; + + // If a card network is specified right in "supportedMethods", add it. + auto card_it = card_networks.find(method); + if (card_it != card_networks.end()) { + supported_card_networks_.push_back(method); + // |method| removed from |card_networks| so that it is not doubly added + // to |supported_card_networks_| if "basic-card" is specified with no + // supported networks. + card_networks.erase(card_it); + } else if (method == kBasicCardMethodName) { + // For the "basic-card" method, check "supportedNetworks". + if (method_data_entry->supported_networks.empty()) { + // Empty |supported_networks| means all networks are supported. + supported_card_networks_.insert(supported_card_networks_.end(), + card_networks.begin(), + card_networks.end()); + // Clear the set so that no further networks are added to + // |supported_card_networks_|. + card_networks.clear(); + } else { + // The merchant has specified a few basic card supported networks. Use + // the mapping to transform to known basic-card types. + using mojom::BasicCardNetwork; + std::unordered_map<BasicCardNetwork, std::string> networks = { + {BasicCardNetwork::AMEX, "amex"}, + {BasicCardNetwork::DINERS, "diners"}, + {BasicCardNetwork::DISCOVER, "discover"}, + {BasicCardNetwork::JCB, "jcb"}, + {BasicCardNetwork::MASTERCARD, "mastercard"}, + {BasicCardNetwork::MIR, "mir"}, + {BasicCardNetwork::UNIONPAY, "unionpay"}, + {BasicCardNetwork::VISA, "visa"}}; + for (const BasicCardNetwork& supported_network : + method_data_entry->supported_networks) { + // Make sure that the network was not already added to + // |supported_card_networks_|. + auto card_it = card_networks.find(networks[supported_network]); + if (card_it != card_networks.end()) { + supported_card_networks_.push_back(networks[supported_network]); + card_networks.erase(card_it); + } + } + } + } + } + } +} + +void PaymentRequestSpec::NotifyOnInvalidSpecProvided() { + for (auto& observer : observers_) + observer.OnInvalidSpecProvided(); +} + +} // namespace payments
diff --git a/components/payments/content/payment_request_spec.h b/components/payments/content/payment_request_spec.h new file mode 100644 index 0000000..dbefd2b --- /dev/null +++ b/components/payments/content/payment_request_spec.h
@@ -0,0 +1,76 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_SPEC_H_ +#define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_SPEC_H_ + +#include <string> +#include <vector> + +#include "base/macros.h" +#include "base/observer_list.h" +#include "components/payments/content/payment_request.mojom.h" + +namespace payments { + +// The spec contains all the options that the merchant has specified about this +// Payment Request. It's a (mostly) read-only view, which can be updated in +// certain occasions by the merchant (see API). +class PaymentRequestSpec { + public: + // Any class call add itself as Observer via AddObserver() and receive + // notification about spec events. + class Observer { + public: + // Called when the provided spec (details, options, method_data) is invalid. + virtual void OnInvalidSpecProvided() = 0; + + protected: + virtual ~Observer() {} + }; + + PaymentRequestSpec(mojom::PaymentOptionsPtr options, + mojom::PaymentDetailsPtr details, + std::vector<mojom::PaymentMethodDataPtr> method_data, + PaymentRequestSpec::Observer* observer); + ~PaymentRequestSpec(); + + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + bool request_shipping() const { return options_->request_shipping; } + bool request_payer_name() const { return options_->request_payer_name; } + bool request_payer_phone() const { return options_->request_payer_phone; } + bool request_payer_email() const { return options_->request_payer_email; } + + const std::vector<std::string>& supported_card_networks() { + return supported_card_networks_; + } + + const mojom::PaymentDetails& details() const { return *details_.get(); } + const mojom::PaymentOptions& options() const { return *options_.get(); } + + private: + // Validates the |method_data| and fills |supported_card_networks_|. + void PopulateValidatedMethodData( + const std::vector<mojom::PaymentMethodDataPtr>& method_data); + + // Will notify all observers that the spec is invalid. + void NotifyOnInvalidSpecProvided(); + + mojom::PaymentOptionsPtr options_; + mojom::PaymentDetailsPtr details_; + + // A list of supported basic card networks, in order that they were specified + // by the merchant. + std::vector<std::string> supported_card_networks_; + + base::ObserverList<Observer> observers_; + + DISALLOW_COPY_AND_ASSIGN(PaymentRequestSpec); +}; + +} // namespace payments + +#endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_SPEC_H_
diff --git a/components/payments/content/payment_request_spec_unittest.cc b/components/payments/content/payment_request_spec_unittest.cc new file mode 100644 index 0000000..b1230e9e --- /dev/null +++ b/components/payments/content/payment_request_spec_unittest.cc
@@ -0,0 +1,212 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/payments/content/payment_request_spec.h" + +#include <utility> + +#include "base/memory/weak_ptr.h" +#include "components/payments/content/payment_request.mojom.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace payments { + +class PaymentRequestSpecTest : public testing::Test, + public PaymentRequestSpec::Observer { + protected: + ~PaymentRequestSpecTest() override {} + + void OnInvalidSpecProvided() override { + on_invalid_spec_provided_called_ = true; + } + + void RecreateSpecWithMethodData( + std::vector<payments::mojom::PaymentMethodDataPtr> method_data) { + spec_ = base::MakeUnique<PaymentRequestSpec>(nullptr, nullptr, + std::move(method_data), this); + } + + PaymentRequestSpec* spec() { return spec_.get(); } + bool on_invalid_spec_provided_called() { + return on_invalid_spec_provided_called_; + } + + private: + std::unique_ptr<PaymentRequestSpec> spec_; + bool on_invalid_spec_provided_called_ = false; +}; + +// Test that empty method data notifies observers of an invalid spec. +TEST_F(PaymentRequestSpecTest, EmptyMethodData) { + std::vector<mojom::PaymentMethodDataPtr> method_data; + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_TRUE(on_invalid_spec_provided_called()); + + // No supported card networks. + EXPECT_EQ(0u, spec()->supported_card_networks().size()); +} + +// Test that parsing supported methods (with invalid values and duplicates) +// works as expected. +TEST_F(PaymentRequestSpecTest, SupportedMethods) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("visa"); + entry->supported_methods.push_back("mastercard"); + entry->supported_methods.push_back("invalid"); + entry->supported_methods.push_back(""); + entry->supported_methods.push_back("visa"); + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + // Only "visa" and "mastercard" remain, in order. + EXPECT_EQ(2u, spec()->supported_card_networks().size()); + EXPECT_EQ("visa", spec()->supported_card_networks()[0]); + EXPECT_EQ("mastercard", spec()->supported_card_networks()[1]); +} + +// Test that parsing supported methods in different method data entries (with +// invalid values and duplicates) works as expected. +TEST_F(PaymentRequestSpecTest, SupportedMethods_MultipleEntries) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("visa"); + mojom::PaymentMethodDataPtr entry2 = mojom::PaymentMethodData::New(); + entry2->supported_methods.push_back("mastercard"); + mojom::PaymentMethodDataPtr entry3 = mojom::PaymentMethodData::New(); + entry3->supported_methods.push_back("invalid"); + + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + method_data.push_back(std::move(entry2)); + method_data.push_back(std::move(entry3)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + // Only "visa" and "mastercard" remain, in order. + EXPECT_EQ(2u, spec()->supported_card_networks().size()); + EXPECT_EQ("visa", spec()->supported_card_networks()[0]); + EXPECT_EQ("mastercard", spec()->supported_card_networks()[1]); +} + +// Test that parsing supported methods in different method data entries fails as +// soon as one entry doesn't specify anything in supported_methods. +TEST_F(PaymentRequestSpecTest, SupportedMethods_MultipleEntries_OneEmpty) { + // First entry is valid. + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("visa"); + // Empty method data entry. + mojom::PaymentMethodDataPtr entry2 = mojom::PaymentMethodData::New(); + // Valid one follows the empty. + mojom::PaymentMethodDataPtr entry3 = mojom::PaymentMethodData::New(); + entry3->supported_methods.push_back("mastercard"); + + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + method_data.push_back(std::move(entry2)); + method_data.push_back(std::move(entry3)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_TRUE(on_invalid_spec_provided_called()); + + // Visa was parsed, but not mastercard. + EXPECT_EQ(1u, spec()->supported_card_networks().size()); + EXPECT_EQ("visa", spec()->supported_card_networks()[0]); +} + +// Test that only specifying basic-card means that all are supported. +TEST_F(PaymentRequestSpecTest, SupportedMethods_OnlyBasicCard) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("basic-card"); + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + // All of the basic card networks are supported. + EXPECT_EQ(8u, spec()->supported_card_networks().size()); + EXPECT_EQ("amex", spec()->supported_card_networks()[0]); + EXPECT_EQ("diners", spec()->supported_card_networks()[1]); + EXPECT_EQ("discover", spec()->supported_card_networks()[2]); + EXPECT_EQ("jcb", spec()->supported_card_networks()[3]); + EXPECT_EQ("mastercard", spec()->supported_card_networks()[4]); + EXPECT_EQ("mir", spec()->supported_card_networks()[5]); + EXPECT_EQ("unionpay", spec()->supported_card_networks()[6]); + EXPECT_EQ("visa", spec()->supported_card_networks()[7]); +} + +// Test that specifying a method AND basic-card means that all are supported, +// but with the method as first. +TEST_F(PaymentRequestSpecTest, SupportedMethods_BasicCard_WithSpecificMethod) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("jcb"); + entry->supported_methods.push_back("basic-card"); + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + // All of the basic card networks are supported, but JCB is first because it + // was specified first. + EXPECT_EQ(8u, spec()->supported_card_networks().size()); + EXPECT_EQ("jcb", spec()->supported_card_networks()[0]); + EXPECT_EQ("amex", spec()->supported_card_networks()[1]); + EXPECT_EQ("diners", spec()->supported_card_networks()[2]); + EXPECT_EQ("discover", spec()->supported_card_networks()[3]); + EXPECT_EQ("mastercard", spec()->supported_card_networks()[4]); + EXPECT_EQ("mir", spec()->supported_card_networks()[5]); + EXPECT_EQ("unionpay", spec()->supported_card_networks()[6]); + EXPECT_EQ("visa", spec()->supported_card_networks()[7]); +} + +// Test that specifying basic-card with a supported network (with previous +// supported methods) will work as expected +TEST_F(PaymentRequestSpecTest, SupportedMethods_BasicCard_Overlap) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("mastercard"); + entry->supported_methods.push_back("visa"); + // Visa and mastercard are repeated, but in reverse order. + mojom::PaymentMethodDataPtr entry2 = mojom::PaymentMethodData::New(); + entry2->supported_methods.push_back("basic-card"); + entry2->supported_networks.push_back(mojom::BasicCardNetwork::VISA); + entry2->supported_networks.push_back(mojom::BasicCardNetwork::MASTERCARD); + entry2->supported_networks.push_back(mojom::BasicCardNetwork::UNIONPAY); + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + method_data.push_back(std::move(entry2)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + EXPECT_EQ(3u, spec()->supported_card_networks().size()); + EXPECT_EQ("mastercard", spec()->supported_card_networks()[0]); + EXPECT_EQ("visa", spec()->supported_card_networks()[1]); + EXPECT_EQ("unionpay", spec()->supported_card_networks()[2]); +} + +// Test that specifying basic-card with supported networks after specifying +// some methods +TEST_F(PaymentRequestSpecTest, + SupportedMethods_BasicCard_WithSupportedNetworks) { + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("basic-card"); + entry->supported_networks.push_back(mojom::BasicCardNetwork::VISA); + entry->supported_networks.push_back(mojom::BasicCardNetwork::UNIONPAY); + std::vector<mojom::PaymentMethodDataPtr> method_data; + method_data.push_back(std::move(entry)); + + RecreateSpecWithMethodData(std::move(method_data)); + EXPECT_FALSE(on_invalid_spec_provided_called()); + + // Only the specified networks are supported. + EXPECT_EQ(2u, spec()->supported_card_networks().size()); + EXPECT_EQ("visa", spec()->supported_card_networks()[0]); + EXPECT_EQ("unionpay", spec()->supported_card_networks()[1]); +} + +} // namespace payments
diff --git a/components/payments/content/payment_request_state.cc b/components/payments/content/payment_request_state.cc new file mode 100644 index 0000000..9c0c9253c --- /dev/null +++ b/components/payments/content/payment_request_state.cc
@@ -0,0 +1,209 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/payments/content/payment_request_state.h" + +#include "components/autofill/core/browser/autofill_data_util.h" +#include "components/autofill/core/browser/autofill_profile.h" +#include "components/autofill/core/browser/credit_card.h" +#include "components/payments/content/payment_request_spec.h" +#include "components/payments/core/autofill_payment_instrument.h" + +namespace payments { + +namespace { +// Identifier for the basic card payment method in the PaymentMethodData. +static const char* const kBasicCardMethodName = "basic-card"; +} // namespace + +PaymentRequestState::PaymentRequestState(PaymentRequestSpec* spec, + Delegate* delegate) + : is_ready_to_pay_(false), + spec_(spec), + delegate_(delegate), + selected_shipping_profile_(nullptr), + selected_contact_profile_(nullptr), + selected_credit_card_(nullptr), + selected_shipping_option_(nullptr) { + PopulateProfileCache(); + UpdateSelectedShippingOption(); + SetDefaultProfileSelections(); +} + +void PaymentRequestState::AddObserver(Observer* observer) { + CHECK(observer); + observers_.AddObserver(observer); +} +PaymentRequestState::~PaymentRequestState() {} + +void PaymentRequestState::RemoveObserver(Observer* observer) { + observers_.RemoveObserver(observer); +} + +void PaymentRequestState::OnInstrumentDetailsReady( + const std::string& method_name, + const std::string& stringified_details) { + // TODO(mathp): Fill other fields in the PaymentResponsePtr object. + mojom::PaymentResponsePtr payment_response = mojom::PaymentResponse::New(); + + payment_response->method_name = method_name; + payment_response->stringified_details = stringified_details; + delegate_->OnPaymentResponseAvailable(std::move(payment_response)); +} + +void PaymentRequestState::GeneratePaymentResponse() { + // TODO(mathp): PaymentRequest should know about the currently selected + // instrument, and not |selected_credit_card_| which is too specific. + // TODO(mathp): The method_name should reflect what the merchant asked, and + // not necessarily basic-card. + selected_payment_instrument_.reset(new AutofillPaymentInstrument( + kBasicCardMethodName, *selected_credit_card_, shipping_profiles_, + delegate_->GetApplicationLocale())); + // Fetch the instrument details, will call back into + // PaymentRequest::OnInstrumentsDetailsReady. + selected_payment_instrument_->InvokePaymentApp(this); +} + +void PaymentRequestState::SetSelectedShippingProfile( + autofill::AutofillProfile* profile) { + selected_shipping_profile_ = profile; + UpdateIsReadyToPayAndNotifyObservers(); +} + +void PaymentRequestState::SetSelectedContactProfile( + autofill::AutofillProfile* profile) { + selected_contact_profile_ = profile; + UpdateIsReadyToPayAndNotifyObservers(); +} + +void PaymentRequestState::SetSelectedCreditCard(autofill::CreditCard* card) { + selected_credit_card_ = card; + UpdateIsReadyToPayAndNotifyObservers(); +} + +void PaymentRequestState::PopulateProfileCache() { + autofill::PersonalDataManager* personal_data_manager = + delegate_->GetPersonalDataManager(); + DCHECK(personal_data_manager); + std::vector<autofill::AutofillProfile*> profiles = + personal_data_manager->GetProfilesToSuggest(); + + // PaymentRequest may outlive the Profiles returned by the Data Manager. + // Thus, we store copies, and return a vector of pointers to these copies + // whenever Profiles are requested. The same is true for credit cards. + for (size_t i = 0; i < profiles.size(); i++) { + profile_cache_.push_back( + base::MakeUnique<autofill::AutofillProfile>(*profiles[i])); + + // TODO(tmartino): Implement deduplication rules specific to shipping and + // contact profiles. + shipping_profiles_.push_back(profile_cache_[i].get()); + contact_profiles_.push_back(profile_cache_[i].get()); + } + + const std::vector<autofill::CreditCard*>& cards = + personal_data_manager->GetCreditCardsToSuggest(); + for (autofill::CreditCard* card : cards) { + card_cache_.push_back(base::MakeUnique<autofill::CreditCard>(*card)); + credit_cards_.push_back(card_cache_.back().get()); + } +} + +void PaymentRequestState::SetDefaultProfileSelections() { + if (!shipping_profiles().empty()) + selected_shipping_profile_ = shipping_profiles()[0]; + + if (!contact_profiles().empty()) + selected_contact_profile_ = contact_profiles()[0]; + + // TODO(anthonyvd): Change this code to prioritize server cards and implement + // a way to modify this function's return value. + const std::vector<autofill::CreditCard*> cards = credit_cards(); + auto first_complete_card = + std::find_if(cards.begin(), cards.end(), + [](autofill::CreditCard* card) { return card->IsValid(); }); + + selected_credit_card_ = + first_complete_card == cards.end() ? nullptr : *first_complete_card; + + UpdateIsReadyToPayAndNotifyObservers(); +} + +void PaymentRequestState::UpdateIsReadyToPayAndNotifyObservers() { + is_ready_to_pay_ = + ArePaymentDetailsSatisfied() && ArePaymentOptionsSatisfied(); + NotifyOnSelectedInformationChanged(); +} + +void PaymentRequestState::NotifyOnSelectedInformationChanged() { + for (auto& observer : observers_) + observer.OnSelectedInformationChanged(); +} + +bool PaymentRequestState::ArePaymentDetailsSatisfied() { + // TODO(mathp): A masked card may not satisfy IsValid(). + if (selected_credit_card_ == nullptr || !selected_credit_card_->IsValid()) + return false; + + const std::string basic_card_payment_type = + autofill::data_util::GetPaymentRequestData(selected_credit_card_->type()) + .basic_card_payment_type; + return !spec_->supported_card_networks().empty() && + std::find(spec_->supported_card_networks().begin(), + spec_->supported_card_networks().end(), + basic_card_payment_type) != + spec_->supported_card_networks().end(); +} + +bool PaymentRequestState::ArePaymentOptionsSatisfied() { + // TODO(mathp): Have a measure of shipping address completeness. + if (spec_->request_shipping() && selected_shipping_profile_ == nullptr) + return false; + + // TODO(mathp): Make an encompassing class to validate contact info. + const std::string& app_locale = delegate_->GetApplicationLocale(); + if (spec_->request_payer_name() && + (selected_contact_profile_ == nullptr || + selected_contact_profile_ + ->GetInfo(autofill::AutofillType(autofill::NAME_FULL), app_locale) + .empty())) { + return false; + } + if (spec_->request_payer_email() && + (selected_contact_profile_ == nullptr || + selected_contact_profile_ + ->GetInfo(autofill::AutofillType(autofill::EMAIL_ADDRESS), + app_locale) + .empty())) { + return false; + } + if (spec_->request_payer_phone() && + (selected_contact_profile_ == nullptr || + selected_contact_profile_ + ->GetInfo(autofill::AutofillType(autofill::PHONE_HOME_WHOLE_NUMBER), + app_locale) + .empty())) { + return false; + } + + return true; +} + +void PaymentRequestState::UpdateSelectedShippingOption() { + selected_shipping_option_ = nullptr; + + // As per the spec, the selected shipping option should initially be the last + // one in the array that has its selected field set to true. + auto selected_shipping_option_it = std::find_if( + spec_->details().shipping_options.rbegin(), + spec_->details().shipping_options.rend(), + [](const payments::mojom::PaymentShippingOptionPtr& element) { + return element->selected; + }); + if (selected_shipping_option_it != spec_->details().shipping_options.rend()) { + selected_shipping_option_ = selected_shipping_option_it->get(); + } +} + +} // namespace payments
diff --git a/components/payments/content/payment_request_state.h b/components/payments/content/payment_request_state.h new file mode 100644 index 0000000..536ec8d5 --- /dev/null +++ b/components/payments/content/payment_request_state.h
@@ -0,0 +1,170 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ +#define COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_ + +#include "base/macros.h" +#include "base/observer_list.h" +#include "components/autofill/core/browser/personal_data_manager.h" +#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/core/payment_instrument.h" + +namespace autofill { +class AutofillProfile; +class CreditCard; +} // namespace autofill + +namespace payments { + +class PaymentRequestSpec; + +// Keeps track of the information currently selected by the user and whether the +// user is ready to pay. Uses information from the PaymentRequestSpec, which is +// what the merchant has specified, as input into the "is ready to pay" +// computation. +class PaymentRequestState : public PaymentInstrument::Delegate { + public: + // Any class call add itself as Observer via AddObserver() and receive + // notification about the state changing. + class Observer { + public: + // Called when the information (payment method, address/contact info, + // shipping option) changes. + virtual void OnSelectedInformationChanged() = 0; + + protected: + virtual ~Observer() {} + }; + + class Delegate { + public: + virtual const std::string& GetApplicationLocale() = 0; + // Used to get the user's data. + virtual autofill::PersonalDataManager* GetPersonalDataManager() = 0; + // Called when the PaymentResponse is available. + virtual void OnPaymentResponseAvailable( + mojom::PaymentResponsePtr response) = 0; + + protected: + virtual ~Delegate() {} + }; + + PaymentRequestState(PaymentRequestSpec* spec, Delegate* delegate); + ~PaymentRequestState() override; + + void AddObserver(Observer* observer); + void RemoveObserver(Observer* observer); + + // PaymentInstrument::Delegate: + void OnInstrumentDetailsReady( + const std::string& method_name, + const std::string& stringified_details) override; + void OnInstrumentDetailsError() override {} + + // Initiates the generation of the PaymentResponse. Callers should check + // |is_ready_to_pay|, which is inexpensive. + void GeneratePaymentResponse(); + + // Gets the Autofill Profile representing the shipping address or contact + // information currently selected for this PaymentRequest flow. Can return + // null. + autofill::AutofillProfile* selected_shipping_profile() const { + return selected_shipping_profile_; + } + autofill::AutofillProfile* selected_contact_profile() const { + return selected_contact_profile_; + } + // Returns the currently selected credit card for this PaymentRequest flow. + // It's not guaranteed to be complete. Returns nullptr if there is no selected + // card. + autofill::CreditCard* selected_credit_card() const { + return selected_credit_card_; + } + mojom::PaymentShippingOption* selected_shipping_option() { + return selected_shipping_option_; + } + + // Returns the appropriate Autofill Profiles for this user. The profiles + // returned are owned by the PaymentRequestState. + const std::vector<autofill::AutofillProfile*>& shipping_profiles() { + return shipping_profiles_; + } + const std::vector<autofill::AutofillProfile*>& contact_profiles() { + return contact_profiles_; + } + const std::vector<autofill::CreditCard*>& credit_cards() { + return credit_cards_; + } + + // Setters to change the selected information. Will have the side effect of + // recomputing "is ready to pay" and notify observers. + void SetSelectedShippingProfile(autofill::AutofillProfile* profile); + void SetSelectedContactProfile(autofill::AutofillProfile* profile); + void SetSelectedCreditCard(autofill::CreditCard* card); + + bool is_ready_to_pay() { return is_ready_to_pay_; } + + private: + // Fetches the Autofill Profiles for this user from the PersonalDataManager, + // and stores copies of them, owned by this PaymentRequestState, in + // profile_cache_. + void PopulateProfileCache(); + + // Sets the initial selections for credit card and profiles, and notifies + // observers. + void SetDefaultProfileSelections(); + + // Uses the user-selected information as well as the merchant spec to update + // |is_ready_to_pay_| with the current state, by validating that all the + // required information is available. Will notify observers. + void UpdateIsReadyToPayAndNotifyObservers(); + + // Notifies all observers that selected information has changed. + void NotifyOnSelectedInformationChanged(); + + // Returns whether the selected data satisfies the PaymentDetails requirements + // (payment methods). + bool ArePaymentDetailsSatisfied(); + // Returns whether the selected data satisfies the PaymentOptions requirements + // (contact info, shipping address). + bool ArePaymentOptionsSatisfied(); + + // Updates the selected_shipping_option based on the data passed to this + // payment request by the website. This will set selected_shipping_option_ to + // the last option marked selected in the options array. + void UpdateSelectedShippingOption(); + + bool is_ready_to_pay_; + + // Not owned. Never null. Both outlive this object. + PaymentRequestSpec* spec_; + Delegate* delegate_; + + autofill::AutofillProfile* selected_shipping_profile_; + autofill::AutofillProfile* selected_contact_profile_; + autofill::CreditCard* selected_credit_card_; + // The shipping options (and thus this pointer) are owned by |spec_| which + // outlives this object. + mojom::PaymentShippingOption* selected_shipping_option_; + + std::unique_ptr<PaymentInstrument> selected_payment_instrument_; + + // Profiles may change due to (e.g.) sync events, so profiles are cached after + // loading and owned here. They are populated once only, and ordered by + // frecency. + std::vector<std::unique_ptr<autofill::AutofillProfile>> profile_cache_; + std::vector<autofill::AutofillProfile*> shipping_profiles_; + std::vector<autofill::AutofillProfile*> contact_profiles_; + std::vector<std::unique_ptr<autofill::CreditCard>> card_cache_; + std::vector<autofill::CreditCard*> credit_cards_; + + base::ObserverList<Observer> observers_; + + DISALLOW_COPY_AND_ASSIGN(PaymentRequestState); +}; + +} // namespace payments + +#endif // COMPONENTS_PAYMENTS_CONTENT_PAYMENT_REQUEST_STATE_H_
diff --git a/components/payments/content/payment_request_state_unittest.cc b/components/payments/content/payment_request_state_unittest.cc new file mode 100644 index 0000000..2af1af0 --- /dev/null +++ b/components/payments/content/payment_request_state_unittest.cc
@@ -0,0 +1,218 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "components/payments/content/payment_request_state.h" + +#include <utility> + +#include "base/memory/weak_ptr.h" +#include "components/autofill/core/browser/autofill_profile.h" +#include "components/autofill/core/browser/autofill_test_utils.h" +#include "components/autofill/core/browser/credit_card.h" +#include "components/autofill/core/browser/test_personal_data_manager.h" +#include "components/payments/content/payment_request.mojom.h" +#include "components/payments/content/payment_request_spec.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace payments { + +class PaymentRequestStateTest : public testing::Test, + public PaymentRequestState::Observer, + public PaymentRequestState::Delegate { + protected: + PaymentRequestStateTest() + : num_on_selected_information_changed_called_(0), + locale_("en-US"), + address_(autofill::test::GetFullProfile()), + credit_card_(autofill::test::GetCreditCard()) { + test_personal_data_manager_.AddTestingProfile(&address_); + credit_card_.set_billing_address_id(address_.guid()); + test_personal_data_manager_.AddTestingCreditCard(&credit_card_); + } + ~PaymentRequestStateTest() override {} + + // PaymentRequestState::Observer: + void OnSelectedInformationChanged() override { + num_on_selected_information_changed_called_++; + } + + // PaymentRequestState::Delegate: + const std::string& GetApplicationLocale() override { return locale_; }; + autofill::PersonalDataManager* GetPersonalDataManager() override { + return &test_personal_data_manager_; + } + void OnPaymentResponseAvailable(mojom::PaymentResponsePtr response) override { + payment_response_ = std::move(response); + }; + + void RecreateStateWithOptionsAndDetails( + mojom::PaymentOptionsPtr options, + mojom::PaymentDetailsPtr details, + std::vector<mojom::PaymentMethodDataPtr> method_data) { + // The spec will be based on the |options| and |details| passed in. + spec_ = base::MakeUnique<PaymentRequestSpec>( + std::move(options), std::move(details), std::move(method_data), + nullptr); + state_ = base::MakeUnique<PaymentRequestState>(spec_.get(), this); + state_->AddObserver(this); + } + + // Convenience method to create a PaymentRequestState with default details + // (one shipping option) and method data (only supports visa). + void RecreateStateWithOptions(mojom::PaymentOptionsPtr options) { + // Create dummy PaymentDetails with a single shipping option. + std::vector<mojom::PaymentShippingOptionPtr> shipping_options; + mojom::PaymentShippingOptionPtr option = + mojom::PaymentShippingOption::New(); + option->id = "option:1"; + shipping_options.push_back(std::move(option)); + mojom::PaymentDetailsPtr details = mojom::PaymentDetails::New(); + details->shipping_options = std::move(shipping_options); + + RecreateStateWithOptionsAndDetails(std::move(options), std::move(details), + GetMethodDataForVisa()); + } + + // Convenience method that returns MethodData that supports Visa. + std::vector<mojom::PaymentMethodDataPtr> GetMethodDataForVisa() { + std::vector<mojom::PaymentMethodDataPtr> method_data; + mojom::PaymentMethodDataPtr entry = mojom::PaymentMethodData::New(); + entry->supported_methods.push_back("visa"); + method_data.push_back(std::move(entry)); + return method_data; + } + + PaymentRequestState* state() { return state_.get(); } + const mojom::PaymentResponsePtr& response() { return payment_response_; } + int num_on_selected_information_changed_called() { + return num_on_selected_information_changed_called_; + } + + autofill::AutofillProfile* test_address() { return &address_; } + autofill::CreditCard* test_credit_card() { return &credit_card_; } + + private: + std::unique_ptr<PaymentRequestState> state_; + std::unique_ptr<PaymentRequestSpec> spec_; + int num_on_selected_information_changed_called_; + std::string locale_; + mojom::PaymentResponsePtr payment_response_; + autofill::TestPersonalDataManager test_personal_data_manager_; + + // Test data. + autofill::AutofillProfile address_; + autofill::CreditCard credit_card_; +}; + +// Test that the last shipping option is selected. +TEST_F(PaymentRequestStateTest, ShippingOptionsSelection) { + std::vector<mojom::PaymentShippingOptionPtr> shipping_options; + mojom::PaymentShippingOptionPtr option = mojom::PaymentShippingOption::New(); + option->id = "option:1"; + option->selected = false; + shipping_options.push_back(std::move(option)); + mojom::PaymentShippingOptionPtr option2 = mojom::PaymentShippingOption::New(); + option2->id = "option:2"; + option2->selected = true; + shipping_options.push_back(std::move(option2)); + mojom::PaymentDetailsPtr details = mojom::PaymentDetails::New(); + details->shipping_options = std::move(shipping_options); + + mojom::PaymentOptionsPtr options = mojom::PaymentOptions::New(); + options->request_shipping = true; + RecreateStateWithOptionsAndDetails(std::move(options), std::move(details), + GetMethodDataForVisa()); + + EXPECT_EQ("option:2", state()->selected_shipping_option()->id); +} + +TEST_F(PaymentRequestStateTest, ReadyToPay_DefaultSelections) { + mojom::PaymentOptionsPtr options = mojom::PaymentOptions::New(); + options->request_shipping = true; + options->request_payer_name = true; + options->request_payer_phone = true; + options->request_payer_email = true; + RecreateStateWithOptions(std::move(options)); + + EXPECT_TRUE(state()->is_ready_to_pay()); +} + +// Testing that the card is supported when determining "is ready to pay". In +// this test the merchant only supports Visa. +TEST_F(PaymentRequestStateTest, ReadyToPay_SelectUnsupportedCard) { + // Default options. + RecreateStateWithOptions(mojom::PaymentOptions::New()); + + // Ready to pay because the default card is selected and supported. + EXPECT_TRUE(state()->is_ready_to_pay()); + + autofill::CreditCard amex_card = autofill::test::GetCreditCard2(); // Amex. + state()->SetSelectedCreditCard(&amex_card); + EXPECT_EQ(1, num_on_selected_information_changed_called()); + + // Not ready to pay because the card is not supported. + EXPECT_FALSE(state()->is_ready_to_pay()); + + // Go back to the Visa card. + state()->SetSelectedCreditCard(test_credit_card()); // Visa card. + EXPECT_EQ(2, num_on_selected_information_changed_called()); + + // Visa card is supported by the merchant. + EXPECT_TRUE(state()->is_ready_to_pay()); +} + +// Test selecting a contact info profile will make the user ready to pay. +TEST_F(PaymentRequestStateTest, ReadyToPay_ContactInfo) { + mojom::PaymentOptionsPtr options = mojom::PaymentOptions::New(); + options->request_payer_name = true; + options->request_payer_phone = true; + options->request_payer_email = true; + RecreateStateWithOptions(std::move(options)); + + // Ready to pay because of default selections. + EXPECT_TRUE(state()->is_ready_to_pay()); + + // Unselecting contact profile. + state()->SetSelectedContactProfile(nullptr); + EXPECT_EQ(1, num_on_selected_information_changed_called()); + + EXPECT_FALSE(state()->is_ready_to_pay()); + + state()->SetSelectedContactProfile(test_address()); + EXPECT_EQ(2, num_on_selected_information_changed_called()); + + // Ready to pay! + EXPECT_TRUE(state()->is_ready_to_pay()); +} + +// Test generating a PaymentResponse. +TEST_F(PaymentRequestStateTest, GeneratePaymentResponse) { + // Default options (no shipping, no contact info). + RecreateStateWithOptions(mojom::PaymentOptions::New()); + state()->SetSelectedCreditCard(test_credit_card()); + EXPECT_EQ(1, num_on_selected_information_changed_called()); + EXPECT_TRUE(state()->is_ready_to_pay()); + + // TODO(mathp): Currently synchronous, when async will need a RunLoop. + state()->GeneratePaymentResponse(); + EXPECT_EQ("basic-card", response()->method_name); + EXPECT_EQ( + "{\"billingAddress\":" + "{\"addressLine\":[\"666 Erebus St.\",\"Apt 8\"]," + "\"city\":\"Elysium\"," + "\"country\":\"US\"," + "\"organization\":\"Underworld\"," + "\"phone\":\"16502111111\"," + "\"postalCode\":\"91111\"," + "\"recipient\":\"John H. Doe\"," + "\"region\":\"CA\"}," + "\"cardNumber\":\"4111111111111111\"," + "\"cardSecurityCode\":\"123\"," + "\"cardholderName\":\"Test User\"," + "\"expiryMonth\":\"11\"," + "\"expiryYear\":\"2017\"}", + response()->stringified_details); +} + +} // namespace payments
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index b5ada72d..9ecbeea 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn
@@ -63,6 +63,7 @@ "//content/browser/service_worker:service_worker_proto", "//content/browser/speech/proto", "//content/common", + "//content/common:features", "//content/public/common:common_sources", "//crypto", "//device/battery",
diff --git a/content/browser/frame_host/interstitial_page_impl.cc b/content/browser/frame_host/interstitial_page_impl.cc index 5edd393..abe1b5f 100644 --- a/content/browser/frame_host/interstitial_page_impl.cc +++ b/content/browser/frame_host/interstitial_page_impl.cc
@@ -33,6 +33,7 @@ #include "content/browser/site_instance_impl.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/browser/web_contents/web_contents_view.h" +#include "content/common/features.h" #include "content/common/frame_messages.h" #include "content/common/input_messages.h" #include "content/common/view_messages.h" @@ -63,7 +64,7 @@ explicit InterstitialPageRVHDelegateView(InterstitialPageImpl* page); // RenderViewHostDelegateView implementation: -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void ShowPopupMenu(RenderFrameHost* render_frame_host, const gfx::Rect& bounds, int item_height, @@ -879,7 +880,7 @@ : interstitial_page_(page) { } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void InterstitialPageImpl::InterstitialPageRVHDelegateView::ShowPopupMenu( RenderFrameHost* render_frame_host, const gfx::Rect& bounds,
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc index a308aae..29517e0 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -758,7 +758,7 @@ IPC_MESSAGE_HANDLER(FrameHostMsg_FocusedNodeChanged, OnFocusedNodeChanged) IPC_MESSAGE_HANDLER(FrameHostMsg_SetHasReceivedUserGesture, OnSetHasReceivedUserGesture) -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) IPC_MESSAGE_HANDLER(FrameHostMsg_ShowPopup, OnShowPopup) IPC_MESSAGE_HANDLER(FrameHostMsg_HidePopup, OnHidePopup) #endif @@ -2248,7 +2248,7 @@ frame_tree_node_->OnSetHasReceivedUserGesture(); } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void RenderFrameHostImpl::OnShowPopup( const FrameHostMsg_ShowPopup_Params& params) { RenderViewHostDelegateView* view = @@ -3097,7 +3097,7 @@ renderer_info_.identity, renderer_spec); } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) void RenderFrameHostImpl::DidSelectPopupMenuItem(int selected_index) {
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h index c59708b..4b10798 100644 --- a/content/browser/frame_host/render_frame_host_impl.h +++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -33,6 +33,7 @@ #include "content/common/content_export.h" #include "content/common/content_security_policy/content_security_policy.h" #include "content/common/download/mhtml_save_status.h" +#include "content/common/features.h" #include "content/common/frame.mojom.h" #include "content/common/frame_message_enums.h" #include "content/common/frame_replication_state.h" @@ -61,7 +62,7 @@ struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; struct FrameHostMsg_OpenURL_Params; struct FrameMsg_TextTrackSettings_Params; -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) struct FrameHostMsg_ShowPopup_Params; #endif @@ -516,7 +517,7 @@ no_create_browser_accessibility_manager_for_testing_ = flag; } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) // Select popup menu related methods (for external popup menus). void DidSelectPopupMenuItem(int selected_index); @@ -764,7 +765,7 @@ const gfx::Rect& bounds_in_frame_widget); void OnSetHasReceivedUserGesture(); -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void OnShowPopup(const FrameHostMsg_ShowPopup_Params& params); void OnHidePopup(); #endif
diff --git a/content/browser/renderer_host/render_view_host_delegate_view.h b/content/browser/renderer_host/render_view_host_delegate_view.h index 1f7b7a6..03bb3eb8 100644 --- a/content/browser/renderer_host/render_view_host_delegate_view.h +++ b/content/browser/renderer_host/render_view_host_delegate_view.h
@@ -11,6 +11,7 @@ #include "build/build_config.h" #include "content/common/content_export.h" #include "content/common/drag_event_source_info.h" +#include "content/common/features.h" #include "third_party/WebKit/public/platform/WebDragOperation.h" namespace gfx { @@ -65,7 +66,7 @@ // retrieved by doing a Shift-Tab. virtual void TakeFocus(bool reverse) {} -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // Shows a popup menu with the specified items. // This method should call RenderFrameHost::DidSelectPopupMenuItem[s]() or // RenderFrameHost::DidCancelPopupMenu() based on the user action.
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc index 1bfef2c9..27e78bd 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -1327,7 +1327,7 @@ web_contents_->UpdateWebContentsVisibility(visible); } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void WebContentsViewAura::ShowPopupMenu(RenderFrameHost* render_frame_host, const gfx::Rect& bounds, int item_height,
diff --git a/content/browser/web_contents/web_contents_view_aura.h b/content/browser/web_contents/web_contents_view_aura.h index ed3641c..fc703087 100644 --- a/content/browser/web_contents/web_contents_view_aura.h +++ b/content/browser/web_contents/web_contents_view_aura.h
@@ -17,6 +17,7 @@ #include "content/browser/renderer_host/render_view_host_delegate_view.h" #include "content/browser/web_contents/web_contents_view.h" #include "content/common/content_export.h" +#include "content/common/features.h" #include "ui/aura/client/drag_drop_delegate.h" #include "ui/aura/window_delegate.h" #include "ui/aura/window_observer.h" @@ -137,7 +138,7 @@ void UpdateDragCursor(blink::WebDragOperation operation) override; void GotFocus() override; void TakeFocus(bool reverse) override; -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void ShowPopupMenu(RenderFrameHost* render_frame_host, const gfx::Rect& bounds, int item_height,
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn index c0dedb9..4a7001d 100644 --- a/content/common/BUILD.gn +++ b/content/common/BUILD.gn
@@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("features.gni") +import("//build/buildflag_header.gni") import("//build/config/features.gni") import("//build/config/ui.gni") import("//media/media_options.gni") @@ -13,6 +15,14 @@ import("//build/config/mac/mac_sdk.gni") } +# For feature flags internal to content. See content/public/common:features +# for feature flags that clients of contents need to know about. +buildflag_header("features") { + header = "features.h" + + flags = [ "USE_EXTERNAL_POPUP_MENU=$use_external_popup_menu" ] +} + source_set("common") { # Targets external to content should always link to the public API. # In addition, targets outside of the content component (shell and tests) @@ -356,6 +366,7 @@ "//third_party/WebKit/public:blink_headers", ] deps = [ + ":features", "//base", "//base/third_party/dynamic_annotations", "//build/util:webkit_version",
diff --git a/content/common/features.gni b/content/common/features.gni new file mode 100644 index 0000000..c43056a --- /dev/null +++ b/content/common/features.gni
@@ -0,0 +1,8 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + # Whether or not to use external popup menu. + use_external_popup_menu = is_android || is_mac +}
diff --git a/content/common/frame_messages.h b/content/common/frame_messages.h index e47289f..404ce37 100644 --- a/content/common/frame_messages.h +++ b/content/common/frame_messages.h
@@ -22,6 +22,7 @@ #include "content/common/content_security_policy/content_security_policy.h" #include "content/common/content_security_policy_header.h" #include "content/common/download/mhtml_save_status.h" +#include "content/common/features.h" #include "content/common/frame_message_enums.h" #include "content/common/frame_owner_properties.h" #include "content/common/frame_replication_state.h" @@ -599,7 +600,7 @@ IPC_STRUCT_TRAITS_MEMBER(requestor) IPC_STRUCT_TRAITS_END() -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // This message is used for supporting popup menus on Mac OS X and Android using // native controls. See the FrameHostMsg_ShowPopup message. IPC_STRUCT_BEGIN(FrameHostMsg_ShowPopup_Params) @@ -868,7 +869,7 @@ IPC_MESSAGE_ROUTED1(FrameMsg_FindMatchRects, int /* current_version */) #endif -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) IPC_MESSAGE_ROUTED1(FrameMsg_SelectPopupMenuItem, int /* selected index, -1 means no selection */) @@ -1582,7 +1583,7 @@ // FrameMsg_RunFileChooserResponse message. IPC_MESSAGE_ROUTED1(FrameHostMsg_RunFileChooser, content::FileChooserParams) -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // Message to show/hide a popup menu using native controls. IPC_MESSAGE_ROUTED1(FrameHostMsg_ShowPopup,
diff --git a/content/common/native_types.typemap b/content/common/native_types.typemap index 9d0b405..7321bd1 100644 --- a/content/common/native_types.typemap +++ b/content/common/native_types.typemap
@@ -25,6 +25,7 @@ # transitive allowance, so those targets' own public_deps aren't included in # the set of implied dependencies. "//cc/ipc", + "//content/common:features", "//media", "//media/base/ipc", "//net",
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index f2a9aa5d..eca7dc87 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn
@@ -6,6 +6,7 @@ import("//build/config/features.gni") import("//build/config/ui.gni") import("//build/split_static_library.gni") +import("//content/common/features.gni") import("//media/media_options.gni") import("//ppapi/features/features.gni") import("//printing/features/features.gni") @@ -428,6 +429,7 @@ "//content:resources", "//content/child", "//content/common", + "//content/common:features", "//content/gpu:gpu_sources", "//content/public/child:child_sources", "//content/public/common:common_sources",
diff --git a/content/renderer/external_popup_menu.cc b/content/renderer/external_popup_menu.cc index 95b41a7..c600a3e9 100644 --- a/content/renderer/external_popup_menu.cc +++ b/content/renderer/external_popup_menu.cc
@@ -63,7 +63,7 @@ // |this| was deleted. } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) void ExternalPopupMenu::DidSelectItem(int index) { if (!popup_menu_client_)
diff --git a/content/renderer/external_popup_menu.h b/content/renderer/external_popup_menu.h index 0158f99..fe7c8a14 100644 --- a/content/renderer/external_popup_menu.h +++ b/content/renderer/external_popup_menu.h
@@ -9,6 +9,7 @@ #include "base/macros.h" #include "build/build_config.h" +#include "content/common/features.h" #include "third_party/WebKit/public/web/WebExternalPopupMenu.h" #include "third_party/WebKit/public/web/WebPopupMenuInfo.h" #include "ui/gfx/geometry/point_f.h" @@ -31,7 +32,7 @@ void SetOriginScaleAndOffsetForEmulation( float scale, const gfx::PointF& offset); -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) // Called when the user has selected an item. |selected_item| is -1 if the // user canceled the popup.
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc index 6c053bb..6a3f713f 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc
@@ -1475,7 +1475,7 @@ return RenderThread::Get()->Send(message); } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void RenderFrameImpl::DidHideExternalPopupMenu() { // We need to clear external_popup_menu_ as soon as ExternalPopupMenu::close // is called. Otherwise, createExternalPopupMenu() for new popup will fail. @@ -1602,7 +1602,7 @@ IPC_MESSAGE_HANDLER(FrameMsg_FindMatchRects, OnFindMatchRects) #endif -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(FrameMsg_SelectPopupMenuItem, OnSelectPopupMenuItem) #else @@ -2960,7 +2960,7 @@ WebExternalPopupMenu* RenderFrameImpl::createExternalPopupMenu( const WebPopupMenuInfo& popup_menu_info, WebExternalPopupMenuClient* popup_menu_client) { -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // An IPC message is sent to the browser to build and display the actual // popup. The user could have time to click a different select by the time // the popup is shown. In that case external_popup_menu_ is non NULL. @@ -5785,7 +5785,7 @@ } #endif -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) void RenderFrameImpl::OnSelectPopupMenuItem(int selected_index) { if (external_popup_menu_ == NULL)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h index d5f7360..d287b604 100644 --- a/content/renderer/render_frame_impl.h +++ b/content/renderer/render_frame_impl.h
@@ -29,6 +29,7 @@ #include "content/common/accessibility_mode.h" #include "content/common/associated_interface_registry_impl.h" #include "content/common/download/mhtml_save_status.h" +#include "content/common/features.h" #include "content/common/frame.mojom.h" #include "content/common/frame_message_enums.h" #include "content/common/host_zoom.mojom.h" @@ -398,7 +399,7 @@ void ScriptedPrint(bool user_initiated); -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void DidHideExternalPopupMenu(); #endif @@ -923,7 +924,7 @@ void OnFindMatchRects(int current_version); #endif -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) #if defined(OS_MACOSX) void OnSelectPopupMenuItem(int selected_index); #else @@ -1344,7 +1345,7 @@ struct PendingFileChooser; std::deque<std::unique_ptr<PendingFileChooser>> file_chooser_completions_; -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // The external popup for the currently showing select popup. std::unique_ptr<ExternalPopupMenu> external_popup_menu_; #endif
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index e5ecf2c2..14a8e11 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc
@@ -70,6 +70,7 @@ #include "content/common/child_process_messages.h" #include "content/common/content_constants_internal.h" #include "content/common/dom_storage/dom_storage_messages.h" +#include "content/common/features.h" #include "content/common/frame_messages.h" #include "content/common/frame_owner_properties.h" #include "content/common/render_process_messages.h" @@ -614,7 +615,7 @@ base::PlatformThread::CurrentId(), kTraceEventRendererMainThreadSortIndex); -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) // On Mac and Android Java UI, the select popups are rendered by the browser. blink::WebView::setUseExternalPopupMenus(true); #endif
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index b3a44e0a..6b10975 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc
@@ -577,7 +577,7 @@ return anchor; } -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( ExternalPopupMenu* popup, RenderWidgetScreenMetricsEmulator* emulator) {
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h index e43cd4d..291b5b6430 100644 --- a/content/renderer/render_widget.h +++ b/content/renderer/render_widget.h
@@ -27,6 +27,7 @@ #include "content/common/cursors/webcursor.h" #include "content/common/drag_event_source_info.h" #include "content/common/edit_command.h" +#include "content/common/features.h" #include "content/common/input/synthetic_gesture_params.h" #include "content/public/common/drop_data.h" #include "content/public/common/screen_info.h" @@ -467,7 +468,7 @@ // Used to force the size of a window when running layout tests. void SetWindowRectSynchronously(const gfx::Rect& new_window_rect); -#if defined(USE_EXTERNAL_POPUP_MENU) +#if BUILDFLAG(USE_EXTERNAL_POPUP_MENU) void SetExternalPopupOriginAdjustmentsForEmulation( ExternalPopupMenu* popup, RenderWidgetScreenMetricsEmulator* emulator);
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json index 197f0b5..20f7ef4 100644 --- a/testing/variations/fieldtrial_testing_config.json +++ b/testing/variations/fieldtrial_testing_config.json
@@ -2871,7 +2871,10 @@ ], "experiments": [ { - "name": "Future" + "name": "Future", + "enable_features": [ + "V8Future" + ] } ] }
diff --git a/third_party/WebKit/LayoutTests/LeakExpectations b/third_party/WebKit/LayoutTests/LeakExpectations index 5b775b2..3dc29fe0 100644 --- a/third_party/WebKit/LayoutTests/LeakExpectations +++ b/third_party/WebKit/LayoutTests/LeakExpectations
@@ -25,7 +25,6 @@ # FIXME: The below tests fails when the leak detector is disabled. crbug.com/366029 compositing/fixed-body-background-positioned.html [ Failure Pass ] -crbug.com/366029 virtual/disable-spinvalidation/compositing/fixed-body-background-positioned.html [ Failure Pass ] # FIXME: The below tests crashes when the leak detector is run on debug builds crbug.com/366043 [ Debug ] fast/history/history-traversal-is-asynchronous.html [ Crash ]
diff --git a/third_party/WebKit/LayoutTests/SlowTests b/third_party/WebKit/LayoutTests/SlowTests index a47077a1..4485b557 100644 --- a/third_party/WebKit/LayoutTests/SlowTests +++ b/third_party/WebKit/LayoutTests/SlowTests
@@ -14,8 +14,6 @@ crbug.com/24182 editing/selection/modify_move/move-by-word-visually-multi-line.html [ Slow ] crbug.com/24182 compositing/culling/filter-occlusion-blur-large.html [ Slow ] crbug.com/24182 compositing/video-frame-size-change.html [ Slow ] -crbug.com/24182 virtual/disable-spinvalidation/compositing/culling/filter-occlusion-blur-large.html [ Slow ] -crbug.com/24182 virtual/disable-spinvalidation/compositing/video-frame-size-change.html [ Slow ] crbug.com/24182 css3/filters/effect-reference-hidpi-hw.html [ Slow ] crbug.com/24182 css3/filters/filter-change-repaint-composited.html [ Slow ] crbug.com/24182 editing/selection/caret-at-bidi-boundary.html [ Slow ] @@ -304,7 +302,6 @@ crbug.com/528419 inspector/elements/styles-2/pseudo-elements.html [ Slow ] crbug.com/529345 [ Win10 ] paint/masks/fieldset-mask.html [ Slow ] -crbug.com/529345 [ Win10 ] virtual/disable-spinvalidation/paint/masks/fieldset-mask.html [ Slow ] crbug.com/552556 [ Win Linux ] virtual/threaded/fast/scroll-behavior/overflow-scroll-root-frame-animates.html [ Slow ] crbug.com/552556 [ Win Linux ] virtual/threaded/fast/scroll-behavior/overflow-scroll-animates.html [ Slow ] crbug.com/570656 [ Mac ] fast/writing-mode/Kusa-Makura-background-canvas.html [ Slow ] @@ -357,7 +354,6 @@ crbug.com/614910 virtual/gpu-rasterization/images/color-profile-filter.html [ Slow ] crbug.com/623798 paint/images/animated-gif-last-frame-crash.html [ Slow ] -crbug.com/623798 virtual/disable-spinvalidation/paint/images/animated-gif-last-frame-crash.html [ Slow ] crbug.com/606649 fast/dom/gc-dom-tree-lifetime.html [ Slow ] @@ -371,8 +367,6 @@ # bots running tests on real hardware or maybe when using SwiftShader. crbug.com/646528 compositing/lots-of-img-layers.html [ Slow ] crbug.com/646528 compositing/lots-of-img-layers-with-opacity.html [ Slow ] -crbug.com/646528 virtual/disable-spinvalidation/compositing/lots-of-img-layers.html [ Slow ] -crbug.com/646528 virtual/disable-spinvalidation/compositing/lots-of-img-layers-with-opacity.html [ Slow ] # IDB Observer tests require multiple browsing contexts/workers interacting with # IndexedDB, which can be slow.
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index ccaa8063..33b333c 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -50,7 +50,6 @@ # --- End SPV2 Tests --- crbug.com/309675 compositing/gestures/gesture-tapHighlight-simple-longPress.html [ Failure ] -crbug.com/309675 virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-simple-longPress.html [ Failure ] # TODO(schenney) For some reason these tests are failing to get correct baselines with rebaseline-cl. # They may be flaky or it may be something else. Investigate and rebaseline manually or with the bot. @@ -70,7 +69,6 @@ crbug.com/349985 [ Win ] fast/table/backgr_position-table-column-group-collapsed-border.html [ Failure ] crbug.com/504613 crbug.com/524248 paint/images/image-backgrounds-not-antialiased.html [ Skip ] -crbug.com/504613 crbug.com/524248 virtual/disable-spinvalidation/paint/images/image-backgrounds-not-antialiased.html [ Skip ] crbug.com/517449 [ Android ] images/optimize-contrast-image.html [ Failure ] @@ -83,7 +81,6 @@ crbug.com/549742 [ Linux Mac Win ] virtual/gpu/fast/canvas/canvas-drawImage-video-imageSmoothingEnabled.html [ Failure ] crbug.com/591500 [ Win10 ] compositing/squashing/squashing-print.html [ Failure ] -crbug.com/591500 [ Win10 ] virtual/disable-spinvalidation/compositing/squashing/squashing-print.html [ Failure ] crbug.com/602110 hittesting/border-hittest-with-image-fallback.html [ Failure ] @@ -134,7 +131,6 @@ crbug.com/683339 virtual/disable-spinvalidation/paint/invalidation/paged-with-overflowing-block-rl.html [ Failure ] crbug.com/646010 paint/selection/text-selection-newline-rtl-double-linebreak.html [ Failure ] -crbug.com/646010 virtual/disable-spinvalidation/paint/selection/text-selection-newline-rtl-double-linebreak.html [ Failure ] crbug.com/646015 paint/invalidation/hover-invalidation-table.html [ Failure ] crbug.com/646015 virtual/disable-spinvalidation/paint/invalidation/hover-invalidation-table.html [ Failure ] crbug.com/646016 paint/invalidation/selected-replaced.html [ Failure ] @@ -155,11 +151,9 @@ # Added 2016-12-14 crbug.com/674396 [ Win ] compositing/reflections/nested-reflection-transition.html [ Pass Failure ] -crbug.com/674396 [ Win ] virtual/disable-spinvalidation/compositing/reflections/nested-reflection-transition.html [ Pass Failure ] # Added 2016-12-15 crbug.com/674468 [ Trusty ] compositing/reflections/nested-reflection-transition.html [ Pass Failure ] -crbug.com/674468 [ Trusty ] virtual/disable-spinvalidation/compositing/reflections/nested-reflection-transition.html [ Pass Failure ] # Added 2016-12-16 crbug.com/674858 [ Linux ] virtual/threaded/printing/offscreencanvas-2d-printing.html [ Pass Failure Crash ] @@ -168,8 +162,6 @@ # Added 2017-02-20 crbug.com/693510 compositing/reflections/nested-reflection-anchor-point.html [ Failure Pass ] crbug.com/693510 compositing/reflections/nested-reflection-animated.html [ Failure Pass ] -crbug.com/693510 virtual/disable-spinvalidation/compositing/reflections/nested-reflection-anchor-point.html [ Failure Pass ] -crbug.com/693510 virtual/disable-spinvalidation/compositing/reflections/nested-reflection-animated.html [ Failure Pass ] crbug.com/667045 paint/invalidation/table/composited-cell-collapsed-border-add-anonymous.html [ Crash ] crbug.com/667045 virtual/disable-spinvalidation/paint/invalidation/table/composited-cell-collapsed-border-add-anonymous.html [ Crash ] @@ -1809,7 +1801,6 @@ crbug.com/487344 paint/invalidation/video-paint-invalidation.html [ Failure ] crbug.com/487344 virtual/disable-spinvalidation/paint/invalidation/video-paint-invalidation.html [ Failure ] crbug.com/487344 [ Win ] compositing/video/video-controls-layer-creation.html [ Pass Failure ] -crbug.com/487344 [ Win ] virtual/disable-spinvalidation/compositing/video/video-controls-layer-creation.html [ Pass Failure ] crbug.com/487344 fast/hidpi/video-controls-in-hidpi.html [ Failure ] crbug.com/487344 fast/layers/video-layer.html [ Failure ] crbug.com/487344 media/audio-controls-rendering.html [ Failure ] @@ -2628,20 +2619,14 @@ crbug.com/697971 [ Mac10.12 ] svg/zoom/page/zoom-background-images.html [ Failure ] crbug.com/697971 [ Mac10.12 ] transforms/2d/zoom-menulist.html [ Failure ] crbug.com/697971 [ Mac10.12 ] transforms/svg-vs-css.xhtml [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/compositing/overflow/border-radius-styles-with-composited-child.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/compositing/overflow/theme-affects-visual-overflow.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/button-checkbox-click-method-repaint.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/caret-invalidation-in-overflow-scroll.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/forms/button-reset-focus-by-mouse-then-keydown.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/forms/submit-focus-by-mouse-then-keydown.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/resize-iframe-text.html [ Failure ] +crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/search-field-cancel.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/subtree-root-skipped.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/invalidation/textarea-caret.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/selection/text-selection-inline-block-rtl.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/selection/text-selection-inline-block.html [ Failure ] -crbug.com/697971 [ Mac10.12 ] virtual/disable-spinvalidation/paint/spellmarkers/document-markers-zoom-150.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/gpu-rasterization/images/12-55.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/gpu-rasterization/images/182.html [ Failure ] crbug.com/697971 [ Mac10.12 ] virtual/gpu-rasterization/images/2-dht.html [ Failure ] @@ -2976,6 +2961,3 @@ # Sheriff failures 2017-03-13 crbug.com/701140 inspector-protocol/css/css-get-rule-list.html [ Failure Pass ] - -crbug.com/349985 [ Win7 ] fast/table/border-collapsing/001-vertical.html [ NeedsRebaseline ] -crbug.com/349985 [ Win7 ] fast/table/border-collapsing/001.html [ NeedsRebaseline ]
diff --git a/third_party/WebKit/LayoutTests/VirtualTestSuites b/third_party/WebKit/LayoutTests/VirtualTestSuites index bacc904..ee2cf64 100644 --- a/third_party/WebKit/LayoutTests/VirtualTestSuites +++ b/third_party/WebKit/LayoutTests/VirtualTestSuites
@@ -105,12 +105,7 @@ }, { "prefix": "disable-spinvalidation", - "base": "compositing", - "args": ["--disable-slimming-paint-invalidation"] - }, - { - "prefix": "disable-spinvalidation", - "base": "paint", + "base": "paint/invalidation", "args": ["--disable-slimming-paint-invalidation"] }, {
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item-expected.txt b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item-expected.txt new file mode 100644 index 0000000..467a1336 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item-expected.txt
@@ -0,0 +1,5 @@ +crbug.com/700383 - [css-grid] Grid layouts go mostly blank + +This test has PASSED if it does not CRASH on debug. + +item
diff --git a/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item.html b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item.html new file mode 100644 index 0000000..c5afdf09 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-crash-remove-positioned-item.html
@@ -0,0 +1,21 @@ +<!DOCTYPE html> +<script> + if (window.testRunner) + testRunner.dumpAsText(); +</script> +<p>crbug.com/700383 - [css-grid] Grid layouts go mostly blank</p> +<p>This test has PASSED if it does not CRASH on debug.</p> +<div id="grid" style="display: grid;"> + <!-- This grid item with some text is needed, + otherwise LayoutGrid::paintChildren() won't be called + after removing the positioned item. --> + <div>item</div> +</div> +<script> + var abspositem = document.createElement("div"); + abspositem.style.position = "absolute"; + var grid = document.getElementById("grid"); + grid.appendChild(abspositem); + document.body.offsetLeft; + grid.removeChild(abspositem); +</script>
diff --git a/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.png b/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.png index 2b29f147..b3cc173 100644 --- a/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.txt b/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.txt index 3b90d50..795fd7d 100644 --- a/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/lists/inline-before-content-after-list-marker-expected.txt
@@ -7,8 +7,8 @@ LayoutBlockFlow (anonymous) at (0,0) size 784x40 LayoutListMarker (anonymous) at (-1,0) size 13x40: bullet LayoutInline {<pseudo:before>} at (0,0) size 80x40 - LayoutTextFragment (anonymous) at (72,0) size 80x40 - text run at (72,0) width 80: "PA" - LayoutText {#text} at (152,0) size 80x40 - text run at (152,0) width 80: "SS" + LayoutTextFragment (anonymous) at (52,0) size 80x40 + text run at (52,0) width 80: "PA" + LayoutText {#text} at (132,0) size 80x40 + text run at (132,0) width 80: "SS" LayoutBlockFlow {DIV} at (0,40) size 784x0
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect-expected.txt b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect-expected.txt new file mode 100644 index 0000000..6c3b169 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect-expected.txt
@@ -0,0 +1,16 @@ +This page was requested with the HTTP method GET. + +Parameters: + +Http headers: + +HTTP_CACHE_CONTROL = max-age=0 +HTTP_CONNECTION = keep-alive +HTTP_HOST = 127.0.0.1:8000 +HTTP_REFERER = http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect.html +HTTP_UPGRADE_INSECURE_REQUESTS = 1 + +============== Back Forward List ============== + http://127.0.0.1:8000/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect.html +curr-> http://127.0.0.1:8000/navigation/resources/form-target.pl +===============================================
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect.html new file mode 100644 index 0000000..34c28486 --- /dev/null +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-leak-path-on-redirect.html
@@ -0,0 +1,33 @@ +<!DOCTYPE html> +<html> +<head> +<meta http-equiv="Content-Security-Policy" content="form-action 127.0.0.1:8000/resources/redirection-response.php"> +<script> + if (window.testRunner) { + testRunner.dumpAsText(); + testRunner.waitUntilDone(); + testRunner.clearBackForwardList(); + testRunner.dumpBackForwardList(); + } + + window.addEventListener('load', function() { + setTimeout(function() { + document.getElementById('submit').click(); + }, 0); + }); +</script> +</head> +<body> + <form + action="/resources/redirection-response.php?status=302&target=/navigation/resources/form-target.pl" + id='theform' + method='post'> + <input type='text' name='fieldname' value='fieldvalue'> + <input type='submit' id='submit' value='submit'> + </form> + + <p>Tests that on a redirect, the form-action directive doesn't force the + path to match the one of the source-expression. If this test passes, you + will see a page indicating a form was POSTed. </p> +</body> +</html>
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.png index 8f9fccc..cf3bd14 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.txt index bc24f9241..27118d1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/css1/classification/list_style_position-expected.txt
@@ -23,8 +23,8 @@ LayoutBlockFlow {UL} at (0,171) size 784x40 LayoutListItem {LI} at (40,0) size 744x40 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 719x39 - text run at (31,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + LayoutText {#text} at (22,0) size 710x39 + text run at (22,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," text run at (0,20) width 263: "leaving no blank space beneath the bullet." LayoutTable {TABLE} at (0,227) size 784x150 [border: (1px outset #808080)] LayoutTableSection {TBODY} at (1,1) size 782x148 @@ -47,6 +47,6 @@ LayoutBlockFlow {UL} at (4,60) size 762x40 LayoutListItem {LI} at (40,0) size 722x40 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 719x39 - text run at (31,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + LayoutText {#text} at (22,0) size 710x39 + text run at (22,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," text run at (0,20) width 263: "leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.png index f08e3aa..d561698b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.txt index 8633000..dcc2405 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/css/001-expected.txt
@@ -6,8 +6,8 @@ LayoutBlockFlow {UL} at (0,0) size 784x40 LayoutListItem {LI} at (40,0) size 744x40 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 264x19 - text run at (31,0) width 264: "This list item should have an inside bullet." - LayoutBR {BR} at (295,15) size 0x0 + LayoutText {#text} at (22,0) size 264x19 + text run at (22,0) width 264: "This list item should have an inside bullet." + LayoutBR {BR} at (286,15) size 0x0 LayoutText {#text} at (0,20) size 246x19 text run at (0,20) width 246: "This line should begin under the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.png index 2202f2f..e5432a0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.txt index f6faaf8..04f3267 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/004-expected.txt
@@ -3,13 +3,13 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutTable {TABLE} at (0,0) size 70x26 [border: (2px outset #808080)] - LayoutTableSection {TBODY} at (2,2) size 66x22 - LayoutTableRow {TR} at (0,0) size 66x22 - LayoutTableCell {TD} at (0,0) size 33x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] - LayoutListItem {LI} at (1,1) size 31x20 + LayoutTable {TABLE} at (0,0) size 61x26 [border: (2px outset #808080)] + LayoutTableSection {TBODY} at (2,2) size 57x22 + LayoutTableRow {TR} at (0,0) size 57x22 + LayoutTableCell {TD} at (0,0) size 24x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] + LayoutListItem {LI} at (1,1) size 22x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutImage {IMG} at (31,15) size 0x0 - LayoutTableCell {TD} at (33,0) size 33x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] + LayoutImage {IMG} at (22,15) size 0x0 + LayoutTableCell {TD} at (24,0) size 33x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] LayoutText {#text} at (1,1) size 31x19 text run at (1,1) width 31: "hello"
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.png index df38391..63aa4ff5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.txt index 576da8fc..245b041 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (0,316) size 182x162 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 140x40 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x19: bullet - LayoutText {#text} at (41,10) size 59x19 - text run at (41,10) width 59: "First item" + LayoutText {#text} at (32,10) size 59x19 + text run at (32,10) width 59: "First item" LayoutListItem {LI} at (41,41) size 140x80 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x19: bullet - LayoutText {#text} at (41,10) size 105x59 - text run at (41,10) width 74: "Second and" + LayoutText {#text} at (32,10) size 96x59 + text run at (32,10) width 74: "Second and" text run at (10,30) width 92: "very very long" text run at (10,50) width 27: "item" LayoutListItem {LI} at (41,121) size 140x40 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x19: bullet - LayoutText {#text} at (41,10) size 66x19 - text run at (41,10) width 66: "Third item" + LayoutText {#text} at (32,10) size 66x19 + text run at (32,10) width 66: "Third item" LayoutBlockFlow {UL} at (0,494) size 182x162 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 140x40 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (124,10) size 7x19: bullet - LayoutText {#text} at (40,10) size 59x19 - text run at (40,10) width 59: "First item" + LayoutText {#text} at (49,10) size 59x19 + text run at (49,10) width 59: "First item" LayoutListItem {LI} at (1,41) size 140x80 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (124,10) size 7x19: bullet - LayoutText {#text} at (25,10) size 105x59 - text run at (25,10) width 74: "Second and" + LayoutText {#text} at (34,10) size 96x59 + text run at (34,10) width 74: "Second and" text run at (38,30) width 92: "very very long" text run at (103,50) width 27: "item" LayoutListItem {LI} at (1,121) size 140x40 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (124,10) size 7x19: bullet - LayoutText {#text} at (33,10) size 66x19 - text run at (33,10) width 66: "Third item" + LayoutText {#text} at (42,10) size 66x19 + text run at (42,10) width 66: "Third item" LayoutBlockFlow {UL} at (0,672) size 182x142 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 140x40 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (-17,15) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.png index 10b4bef..956f004 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.txt index bb66992..2e3dc04 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/008-vertical-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (316,0) size 162x182 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 40x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 19x7: bullet - LayoutText {#text} at (10,41) size 19x59 - text run at (10,41) width 59: "First item" + LayoutText {#text} at (10,32) size 19x59 + text run at (10,32) width 59: "First item" LayoutListItem {LI} at (41,41) size 80x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 19x7: bullet - LayoutText {#text} at (10,41) size 59x105 - text run at (10,41) width 74: "Second and" + LayoutText {#text} at (10,32) size 59x96 + text run at (10,32) width 74: "Second and" text run at (30,10) width 92: "very very long" text run at (50,10) width 27: "item" LayoutListItem {LI} at (121,41) size 40x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 19x7: bullet - LayoutText {#text} at (10,41) size 19x66 - text run at (10,41) width 66: "Third item" + LayoutText {#text} at (10,32) size 19x66 + text run at (10,32) width 66: "Third item" LayoutBlockFlow {UL} at (494,0) size 162x182 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 40x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,124) size 19x7: bullet - LayoutText {#text} at (10,40) size 19x59 - text run at (10,40) width 59: "First item" + LayoutText {#text} at (10,49) size 19x59 + text run at (10,49) width 59: "First item" LayoutListItem {LI} at (41,1) size 80x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,124) size 19x7: bullet - LayoutText {#text} at (10,25) size 59x105 - text run at (10,25) width 74: "Second and" + LayoutText {#text} at (10,34) size 59x96 + text run at (10,34) width 74: "Second and" text run at (30,38) width 92: "very very long" text run at (50,103) width 27: "item" LayoutListItem {LI} at (121,1) size 40x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,124) size 19x7: bullet - LayoutText {#text} at (10,33) size 19x66 - text run at (10,33) width 66: "Third item" + LayoutText {#text} at (10,42) size 19x66 + text run at (10,42) width 66: "Third item" LayoutBlockFlow {UL} at (672,0) size 142x182 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 40x140 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (14,-17) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.png b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.png index 3391a30..8dd034b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.txt index e9af249..b463eec 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/fast/lists/markers-in-selection-expected.txt
@@ -30,8 +30,8 @@ LayoutBlockFlow {UL} at (0,126) size 784x20 LayoutListItem {LI} at (40,0) size 744x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 149x19 - text run at (31,0) width 149: "Item with inside marker" + LayoutText {#text} at (22,0) size 149x19 + text run at (22,0) width 149: "Item with inside marker" LayoutBlockFlow {UL} at (0,162) size 784x20 LayoutListItem {LI} at (40,0) size 744x20 LayoutListMarker (anonymous) at (-17,5) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.png index e674003c..7745e41 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.txt index 56088f8..5489d20 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/list-marker-expected.txt
@@ -27,8 +27,8 @@ LayoutListItem {LI} at (40,0) size 744x20 LayoutBlockFlow (anonymous) at (0,0) size 744x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 20x19 - text run at (31,0) width 20: "bar" + LayoutText {#text} at (22,0) size 20x19 + text run at (22,0) width 20: "bar" LayoutBlockFlow {DIV} at (10,30) size 724x0 LayoutBlockFlow {UL} at (0,128) size 784x20 LayoutListItem {LI} at (0,0) size 744x20 @@ -41,6 +41,6 @@ LayoutListItem {LI} at (0,0) size 744x20 LayoutBlockFlow (anonymous) at (0,0) size 744x20 LayoutListMarker (anonymous) at (738,0) size 7x19: bullet - LayoutText {#text} at (693,0) size 20x19 - text run at (693,0) width 20: "bar" + LayoutText {#text} at (702,0) size 20x19 + text run at (702,0) width 20: "bar" LayoutBlockFlow {DIV} at (10,30) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.png index 7ac46b3..4610ec34 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.txt index a0c551a3..ee23a1a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (488,15) size 0x0 LayoutListItem {LI} at (0,20) size 784x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 260x19 - text run at (31,0) width 260: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 260x19 + text run at (22,0) width 260: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,40) size 784x492 LayoutBlockFlow (anonymous) at (0,0) size 784x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 180x19 - text run at (31,0) width 180: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 180x19 + text run at (22,0) width 180: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,28) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,38) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png index e674003c..7745e41 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt index 56088f8..5489d20 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt
@@ -27,8 +27,8 @@ LayoutListItem {LI} at (40,0) size 744x20 LayoutBlockFlow (anonymous) at (0,0) size 744x20 LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet - LayoutText {#text} at (31,0) size 20x19 - text run at (31,0) width 20: "bar" + LayoutText {#text} at (22,0) size 20x19 + text run at (22,0) width 20: "bar" LayoutBlockFlow {DIV} at (10,30) size 724x0 LayoutBlockFlow {UL} at (0,128) size 784x20 LayoutListItem {LI} at (0,0) size 744x20 @@ -41,6 +41,6 @@ LayoutListItem {LI} at (0,0) size 744x20 LayoutBlockFlow (anonymous) at (0,0) size 744x20 LayoutListMarker (anonymous) at (738,0) size 7x19: bullet - LayoutText {#text} at (693,0) size 20x19 - text run at (693,0) width 20: "bar" + LayoutText {#text} at (702,0) size 20x19 + text run at (702,0) width 20: "bar" LayoutBlockFlow {DIV} at (10,30) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png deleted file mode 100644 index 5060e32..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.txt deleted file mode 100644 index b0717317..0000000 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/disable-spinvalidation/paint/selection/text-selection-newline-mixed-ltr-rtl-expected.txt +++ /dev/null
@@ -1,17 +0,0 @@ -layer at (0,0) size 800x600 - LayoutView at (0,0) size 800x600 -layer at (0,0) size 800x136 - LayoutBlockFlow {HTML} at (0,0) size 800x136 - LayoutBlockFlow {BODY} at (8,16) size 784x112 - LayoutBlockFlow {P} at (0,0) size 784x20 - LayoutText {#text} at (0,0) size 339x19 - text run at (0,0) width 339: "Passes if there are no overpainted selection highlights." - LayoutBlockFlow (anonymous) at (0,36) size 784x76 - LayoutInline {SPAN} at (0,0) size 189x73 - LayoutText {#text} at (0,1) size 189x73 - text run at (0,1) width 96: "text" - text run at (96,1) width 93 RTL: "\x{645}\x{62A}\x{646}:" - LayoutText {#text} at (0,0) size 0x0 - LayoutText {#text} at (0,0) size 0x0 -selection start: position 5 of child 0 {#text} of child 2 {SPAN} of body -selection end: position 13 of child 0 {#text} of child 2 {SPAN} of body
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.png new file mode 100644 index 0000000..cf3bd14 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.txt new file mode 100644 index 0000000..27118d1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/mojo-loading/css1/classification/list_style_position-expected.txt
@@ -0,0 +1,52 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC] + LayoutBlockFlow {P} at (0,0) size 784x20 + LayoutText {#text} at (0,0) size 355x19 + text run at (0,0) width 355: "The style declarations which apply to the text below are:" + LayoutBlockFlow {PRE} at (0,36) size 784x48 + LayoutText {#text} at (0,0) size 288x48 + text run at (0,0) width 288: ".one {list-style-position: outside;}" + text run at (288,0) width 0: " " + text run at (0,16) width 280: ".two {list-style-position: inside;}" + text run at (280,16) width 0: " " + text run at (0,32) width 0: " " + LayoutBlockFlow {HR} at (0,97) size 784x2 [border: (1px inset #EEEEEE)] + LayoutBlockFlow {UL} at (0,115) size 784x40 + LayoutListItem {LI} at (40,0) size 744x40 + LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet + LayoutText {#text} at (0,0) size 725x39 + text run at (0,0) width 725: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving blank" + text run at (0,20) width 154: "space beneath the bullet." + LayoutBlockFlow {UL} at (0,171) size 784x40 + LayoutListItem {LI} at (40,0) size 744x40 + LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet + LayoutText {#text} at (22,0) size 710x39 + text run at (22,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + text run at (0,20) width 263: "leaving no blank space beneath the bullet." + LayoutTable {TABLE} at (0,227) size 784x150 [border: (1px outset #808080)] + LayoutTableSection {TBODY} at (1,1) size 782x148 + LayoutTableRow {TR} at (0,0) size 782x28 + LayoutTableCell {TD} at (0,0) size 782x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2] + LayoutInline {STRONG} at (0,0) size 161x19 + LayoutText {#text} at (4,4) size 161x19 + text run at (4,4) width 161: "TABLE Testing Section" + LayoutTableRow {TR} at (0,28) size 782x120 + LayoutTableCell {TD} at (0,74) size 12x28 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1] + LayoutText {#text} at (4,4) size 4x19 + text run at (4,4) width 4: " " + LayoutTableCell {TD} at (12,28) size 770x120 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1] + LayoutBlockFlow {UL} at (4,4) size 762x40 + LayoutListItem {LI} at (40,0) size 722x40 + LayoutListMarker (anonymous) at (-18,0) size 7x19: bullet + LayoutText {#text} at (0,0) size 686x39 + text run at (0,0) width 686: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving" + text run at (0,20) width 193: "blank space beneath the bullet." + LayoutBlockFlow {UL} at (4,60) size 762x40 + LayoutListItem {LI} at (40,0) size 722x40 + LayoutListMarker (anonymous) at (-1,0) size 7x19: bullet + LayoutText {#text} at (22,0) size 710x39 + text run at (22,0) width 688: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + text run at (0,20) width 263: "leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/css1/classification/list_style_position-expected.png index e5b2ca06..81130c79a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/css1/classification/list_style_position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.png index 62af317..903edc7d0 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.txt index 2ca53ff..0416f77 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 265x18 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x18 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 183x18 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x18 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png deleted file mode 100644 index 94fef2a..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png deleted file mode 100644 index 7e37300..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png deleted file mode 100644 index 0cea47d..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/mojo-loading/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/mojo-loading/css1/classification/list_style_position-expected.png new file mode 100644 index 0000000..81130c79a --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/mojo-loading/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.png index 723437da..080230b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.txt index fb6b805..951737b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 265x18 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x18 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 183x18 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x18 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt deleted file mode 100644 index 8c243ca..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true, - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inner-editor'", - "rect": [12, 45, 113, 13], - "reason": "forced by layout" - }, - { - "object": "LayoutText #text", - "rect": [12, 45, 51, 13], - "reason": "layoutObject insertion" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inner-editor'", - "reason": "forced by layout" - }, - { - "object": "RootInlineBox", - "reason": "forced by layout" - }, - { - "object": "LayoutText #text", - "reason": "layoutObject insertion" - }, - { - "object": "InlineTextBox 'some text'", - "reason": "layoutObject insertion" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/lists/008-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/lists/008-expected.png index 2bfc872..8fd16410 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/lists/008-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/fast/lists/008-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.png index ffe64b8..758956d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.txt index f0ed568..394331c2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.9/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 265x18 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x18 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 183x18 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x18 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.png index 723437da..080230b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.txt index fb6b805..951737b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-retina/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 265x18 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x18 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 183x18 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x18 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt deleted file mode 100644 index 8c243ca..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt +++ /dev/null
@@ -1,41 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true, - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inner-editor'", - "rect": [12, 45, 113, 13], - "reason": "forced by layout" - }, - { - "object": "LayoutText #text", - "rect": [12, 45, 51, 13], - "reason": "layoutObject insertion" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='inner-editor'", - "reason": "forced by layout" - }, - { - "object": "RootInlineBox", - "reason": "forced by layout" - }, - { - "object": "LayoutText #text", - "reason": "layoutObject insertion" - }, - { - "object": "InlineTextBox 'some text'", - "reason": "layoutObject insertion" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.png index c1c8f95..8ec70df 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.txt index 5bf888a7..f60174b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/css1/classification/list_style_position-expected.txt
@@ -23,8 +23,8 @@ LayoutBlockFlow {UL} at (0,162) size 784x36 LayoutListItem {LI} at (40,0) size 744x36 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 735x36 - text run at (30,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + LayoutText {#text} at (22,0) size 727x36 + text run at (22,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," text run at (0,18) width 268: "leaving no blank space beneath the bullet." LayoutTable {TABLE} at (0,214) size 784x140 [border: (1px outset #808080)] LayoutTableSection {TBODY} at (1,1) size 782x138 @@ -47,6 +47,6 @@ LayoutBlockFlow {UL} at (4,56) size 762x36 LayoutListItem {LI} at (40,0) size 722x36 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 682x36 - text run at (30,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" + LayoutText {#text} at (22,0) size 674x36 + text run at (22,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" text run at (0,18) width 321: "margin, leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.png index 381163c..373fde4d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.txt index 9d4fcf9..f263a935 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/css/001-expected.txt
@@ -6,8 +6,8 @@ LayoutBlockFlow {UL} at (0,0) size 784x36 LayoutListItem {LI} at (40,0) size 744x36 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 272x18 - text run at (30,0) width 272: "This list item should have an inside bullet." - LayoutBR {BR} at (301,14) size 1x0 + LayoutText {#text} at (22,0) size 272x18 + text run at (22,0) width 272: "This list item should have an inside bullet." + LayoutBR {BR} at (293,14) size 1x0 LayoutText {#text} at (0,18) size 252x18 text run at (0,18) width 252: "This line should begin under the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.png index 730fe95..01c7e6cc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.txt index 33d0946..d21afe82 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/004-expected.txt
@@ -3,13 +3,13 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutTable {TABLE} at (0,0) size 70x24 [border: (2px outset #808080)] - LayoutTableSection {TBODY} at (2,2) size 66x20 - LayoutTableRow {TR} at (0,0) size 66x20 - LayoutTableCell {TD} at (0,0) size 32x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] - LayoutListItem {LI} at (1,1) size 30x18 + LayoutTable {TABLE} at (0,0) size 62x24 [border: (2px outset #808080)] + LayoutTableSection {TBODY} at (2,2) size 58x20 + LayoutTableRow {TR} at (0,0) size 58x20 + LayoutTableCell {TD} at (0,0) size 24x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] + LayoutListItem {LI} at (1,1) size 22x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutImage {IMG} at (30,14) size 0x0 - LayoutTableCell {TD} at (32,0) size 34x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] + LayoutImage {IMG} at (22,14) size 0x0 + LayoutTableCell {TD} at (24,0) size 34x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] LayoutText {#text} at (1,1) size 32x18 text run at (1,1) width 32: "hello"
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.png index 1f83bc2f..c86b9ada 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.txt index bba9d615..3613bb9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (0,300) size 185.59x152 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 143.59x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x18: bullet - LayoutText {#text} at (40,10) size 62x18 - text run at (40,10) width 62: "First item" + LayoutText {#text} at (32,10) size 62x18 + text run at (32,10) width 62: "First item" LayoutListItem {LI} at (41,39) size 143.59x74 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x18: bullet - LayoutText {#text} at (40,10) size 105x54 - text run at (40,10) width 75: "Second and" + LayoutText {#text} at (32,10) size 97x54 + text run at (32,10) width 75: "Second and" text run at (10,28) width 94: "very very long" text run at (10,46) width 29: "item" LayoutListItem {LI} at (41,113) size 143.59x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x18: bullet - LayoutText {#text} at (40,10) size 68x18 - text run at (40,10) width 68: "Third item" + LayoutText {#text} at (32,10) size 68x18 + text run at (32,10) width 68: "Third item" LayoutBlockFlow {UL} at (0,468) size 185.59x152 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 143.59x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.59,10) size 7x18: bullet - LayoutText {#text} at (41,10) size 63x18 - text run at (41,10) width 63: "First item" + LayoutText {#text} at (49,10) size 63x18 + text run at (49,10) width 63: "First item" LayoutListItem {LI} at (1,39) size 143.59x74 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.59,10) size 7x18: bullet - LayoutText {#text} at (29,10) size 105x54 - text run at (29,10) width 75: "Second and" + LayoutText {#text} at (37,10) size 97x54 + text run at (37,10) width 75: "Second and" text run at (40,28) width 94: "very very long" text run at (105,46) width 29: "item" LayoutListItem {LI} at (1,113) size 143.59x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.59,10) size 7x18: bullet - LayoutText {#text} at (35,10) size 69x18 - text run at (35,10) width 69: "Third item" + LayoutText {#text} at (43,10) size 69x18 + text run at (43,10) width 69: "Third item" LayoutBlockFlow {UL} at (0,636) size 185.59x134 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 143.59x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (-17,14) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.png index de95f5c1..2cdc060 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.txt index f3b845b..bbd44cb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/008-vertical-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (300,0) size 152x185.59 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 38x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 18x7: bullet - LayoutText {#text} at (10,40) size 18x62 - text run at (10,40) width 62: "First item" + LayoutText {#text} at (10,32) size 18x62 + text run at (10,32) width 62: "First item" LayoutListItem {LI} at (39,41) size 74x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 18x7: bullet - LayoutText {#text} at (10,40) size 54x105 - text run at (10,40) width 75: "Second and" + LayoutText {#text} at (10,32) size 54x97 + text run at (10,32) width 75: "Second and" text run at (28,10) width 94: "very very long" text run at (46,10) width 29: "item" LayoutListItem {LI} at (113,41) size 38x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 18x7: bullet - LayoutText {#text} at (10,40) size 18x68 - text run at (10,40) width 68: "Third item" + LayoutText {#text} at (10,32) size 18x68 + text run at (10,32) width 68: "Third item" LayoutBlockFlow {UL} at (468,0) size 152x185.59 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 38x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.59) size 18x7: bullet - LayoutText {#text} at (10,41) size 18x63 - text run at (10,41) width 62: "First item" + LayoutText {#text} at (10,49) size 18x63 + text run at (10,49) width 62: "First item" LayoutListItem {LI} at (39,1) size 74x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.59) size 18x7: bullet - LayoutText {#text} at (10,29) size 54x105 - text run at (10,29) width 75: "Second and" + LayoutText {#text} at (10,37) size 54x97 + text run at (10,37) width 75: "Second and" text run at (28,40) width 94: "very very long" text run at (46,105) width 29: "item" LayoutListItem {LI} at (113,1) size 38x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.59) size 18x7: bullet - LayoutText {#text} at (10,35) size 18x69 - text run at (10,35) width 68: "Third item" + LayoutText {#text} at (10,43) size 18x69 + text run at (10,43) width 68: "Third item" LayoutBlockFlow {UL} at (636,0) size 134x185.59 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 38x143.59 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (14,-17) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.png b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.png index d1d0aa8c..94c92d39 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.txt index b8a5b8f..8e8dcdb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/fast/lists/markers-in-selection-expected.txt
@@ -30,8 +30,8 @@ LayoutBlockFlow {UL} at (0,120) size 784x18 LayoutListItem {LI} at (40,0) size 744x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 154x18 - text run at (30,0) width 154: "Item with inside marker" + LayoutText {#text} at (22,0) size 154x18 + text run at (22,0) width 154: "Item with inside marker" LayoutBlockFlow {UL} at (0,154) size 784x18 LayoutListItem {LI} at (40,0) size 744x18 LayoutListMarker (anonymous) at (-17,4) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.png index c947df3..f0e934f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.txt index f53479f..d3ec300 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/list-marker-expected.txt
@@ -27,8 +27,8 @@ LayoutListItem {LI} at (40,0) size 744x18 LayoutBlockFlow (anonymous) at (0,0) size 744x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 21x18 - text run at (30,0) width 21: "bar" + LayoutText {#text} at (22,0) size 21x18 + text run at (22,0) width 21: "bar" LayoutBlockFlow {DIV} at (10,28) size 724x0 LayoutBlockFlow {UL} at (0,120) size 784x18 LayoutListItem {LI} at (0,0) size 744x18 @@ -41,6 +41,6 @@ LayoutListItem {LI} at (0,0) size 744x18 LayoutBlockFlow (anonymous) at (0,0) size 744x18 LayoutListMarker (anonymous) at (738,0) size 7x18: bullet - LayoutText {#text} at (693,0) size 21x18 - text run at (693,0) width 21: "bar" + LayoutText {#text} at (701,0) size 21x18 + text run at (701,0) width 21: "bar" LayoutBlockFlow {DIV} at (10,28) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.png index 42e4f5dc..4149641 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt index d6f792cf..6cfa41f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 265x18 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x18 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet - LayoutText {#text} at (30,0) size 183x18 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x18 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png deleted file mode 100644 index 75f290f..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-div-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png deleted file mode 100644 index 46bb1ca1..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-rotated-link-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png deleted file mode 100644 index a7f6587d..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-pixel-transparent-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-skew-matrix-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-skew-matrix-expected.png deleted file mode 100644 index 8a9e6c7..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-skew-matrix-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png deleted file mode 100644 index e2a4f44..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-box-shadow-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-squashing-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-squashing-expected.png deleted file mode 100644 index b8c2c24..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/compositing/gestures/gesture-tapHighlight-with-squashing-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png index c947df3..f0e934f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt new file mode 100644 index 0000000..d3ec300 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt
@@ -0,0 +1,46 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (8,8) size 784x576 + LayoutBlockFlow {P} at (0,0) size 784x36 + LayoutText {#text} at (0,0) size 54x18 + text run at (0,0) width 54: "Test for " + LayoutInline {I} at (0,0) size 739x36 + LayoutInline {A} at (0,0) size 305x18 [color=#0000EE] + LayoutText {#text} at (53,0) size 305x18 + text run at (53,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=12910" + LayoutText {#text} at (357,0) size 739x36 + text run at (357,0) width 5: " " + text run at (361,0) width 378: "REGRESSION (r18756-r18765): list-bullet doesn't redraw" + text run at (0,18) width 375: "properly when changing the list's content using JavaScript" + LayoutText {#text} at (374,18) size 5x18 + text run at (374,18) width 5: "." + LayoutBlockFlow {UL} at (0,52) size 784x18 + LayoutListItem {LI} at (40,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet + LayoutText {#text} at (0,0) size 22x18 + text run at (0,0) width 22: "foo" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,86) size 784x18 + LayoutListItem {LI} at (40,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet + LayoutText {#text} at (22,0) size 21x18 + text run at (22,0) width 21: "bar" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,120) size 784x18 + LayoutListItem {LI} at (0,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (754,0) size 7x18: bullet + LayoutText {#text} at (722,0) size 22x18 + text run at (722,0) width 22: "foo" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,154) size 784x18 + LayoutListItem {LI} at (0,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (738,0) size 7x18: bullet + LayoutText {#text} at (701,0) size 21x18 + text run at (701,0) width 21: "bar" + LayoutBlockFlow {DIV} at (10,28) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt index 49e1ed89..8c243ca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/disable-spinvalidation/paint/invalidation/search-field-cancel-expected.txt
@@ -13,7 +13,7 @@ }, { "object": "LayoutText #text", - "rect": [12, 45, 52, 13], + "rect": [12, 45, 51, 13], "reason": "layoutObject insertion" } ]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.png new file mode 100644 index 0000000..8ec70df --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.txt new file mode 100644 index 0000000..f60174b --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/mojo-loading/css1/classification/list_style_position-expected.txt
@@ -0,0 +1,52 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC] + LayoutBlockFlow {P} at (0,0) size 784x18 + LayoutText {#text} at (0,0) size 363x18 + text run at (0,0) width 363: "The style declarations which apply to the text below are:" + LayoutBlockFlow {PRE} at (0,34) size 784x45 + LayoutText {#text} at (0,0) size 281x45 + text run at (0,0) width 281: ".one {list-style-position: outside;}" + text run at (280,0) width 1: " " + text run at (0,15) width 274: ".two {list-style-position: inside;}" + text run at (273,15) width 1: " " + text run at (0,30) width 0: " " + LayoutBlockFlow {HR} at (0,92) size 784x2 [border: (1px inset #EEEEEE)] + LayoutBlockFlow {UL} at (0,110) size 784x36 + LayoutListItem {LI} at (40,0) size 744x36 + LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet + LayoutText {#text} at (0,0) size 743x36 + text run at (0,0) width 743: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving blank" + text run at (0,18) width 158: "space beneath the bullet." + LayoutBlockFlow {UL} at (0,162) size 784x36 + LayoutListItem {LI} at (40,0) size 744x36 + LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet + LayoutText {#text} at (22,0) size 727x36 + text run at (22,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + text run at (0,18) width 268: "leaving no blank space beneath the bullet." + LayoutTable {TABLE} at (0,214) size 784x140 [border: (1px outset #808080)] + LayoutTableSection {TBODY} at (1,1) size 782x138 + LayoutTableRow {TR} at (0,0) size 782x26 + LayoutTableCell {TD} at (0,0) size 782x26 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2] + LayoutInline {STRONG} at (0,0) size 161x18 + LayoutText {#text} at (4,4) size 161x18 + text run at (4,4) width 161: "TABLE Testing Section" + LayoutTableRow {TR} at (0,26) size 782x112 + LayoutTableCell {TD} at (0,69) size 12x26 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1] + LayoutText {#text} at (4,4) size 4x18 + text run at (4,4) width 4: " " + LayoutTableCell {TD} at (12,26) size 770x112 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1] + LayoutBlockFlow {UL} at (4,4) size 762x36 + LayoutListItem {LI} at (40,0) size 722x36 + LayoutListMarker (anonymous) at (-17,0) size 7x18: bullet + LayoutText {#text} at (0,0) size 704x36 + text run at (0,0) width 704: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving" + text run at (0,18) width 197: "blank space beneath the bullet." + LayoutBlockFlow {UL} at (4,56) size 762x36 + LayoutListItem {LI} at (40,0) size 722x36 + LayoutListMarker (anonymous) at (-1,0) size 7x18: bullet + LayoutText {#text} at (22,0) size 674x36 + text run at (22,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" + text run at (0,18) width 321: "margin, leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.png index 3dd97fc..9fd54420 100644 --- a/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.txt index c9a96ae..deac66536 100644 --- a/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/css1/classification/list_style_position-expected.txt
@@ -23,8 +23,8 @@ LayoutBlockFlow {UL} at (0,165) size 784x36 LayoutListItem {LI} at (40,0) size 744x36 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 735x35 - text run at (30,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + LayoutText {#text} at (22,0) size 727x35 + text run at (22,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," text run at (0,18) width 268: "leaving no blank space beneath the bullet." LayoutTable {TABLE} at (0,217) size 784x140 [border: (1px outset #808080)] LayoutTableSection {TBODY} at (1,1) size 782x138 @@ -47,6 +47,6 @@ LayoutBlockFlow {UL} at (4,56) size 762x36 LayoutListItem {LI} at (40,0) size 722x36 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 682x35 - text run at (30,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" + LayoutText {#text} at (22,0) size 674x35 + text run at (22,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" text run at (0,18) width 321: "margin, leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.png index 990d6ad..44242416 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.txt index 76dda2d..085533e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/css/001-expected.txt
@@ -6,8 +6,8 @@ LayoutBlockFlow {UL} at (0,0) size 784x36 LayoutListItem {LI} at (40,0) size 744x36 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 272x17 - text run at (30,0) width 272: "This list item should have an inside bullet." - LayoutBR {BR} at (301,14) size 1x0 + LayoutText {#text} at (22,0) size 272x17 + text run at (22,0) width 272: "This list item should have an inside bullet." + LayoutBR {BR} at (293,14) size 1x0 LayoutText {#text} at (0,18) size 252x17 text run at (0,18) width 252: "This line should begin under the bullet."
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.png index 78335b31..18206b4 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.txt index 22697ef..e9178f49 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/004-expected.txt
@@ -3,13 +3,13 @@ layer at (0,0) size 800x600 LayoutBlockFlow {HTML} at (0,0) size 800x600 LayoutBlockFlow {BODY} at (8,8) size 784x584 - LayoutTable {TABLE} at (0,0) size 70x24 [border: (2px outset #808080)] - LayoutTableSection {TBODY} at (2,2) size 66x20 - LayoutTableRow {TR} at (0,0) size 66x20 - LayoutTableCell {TD} at (0,0) size 32x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] - LayoutListItem {LI} at (1,1) size 30x18 + LayoutTable {TABLE} at (0,0) size 62x24 [border: (2px outset #808080)] + LayoutTableSection {TBODY} at (2,2) size 58x20 + LayoutTableRow {TR} at (0,0) size 58x20 + LayoutTableCell {TD} at (0,0) size 24x20 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1] + LayoutListItem {LI} at (1,1) size 22x18 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutImage {IMG} at (30,14) size 0x0 - LayoutTableCell {TD} at (32,0) size 34x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] + LayoutImage {IMG} at (22,14) size 0x0 + LayoutTableCell {TD} at (24,0) size 34x20 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1] LayoutText {#text} at (1,1) size 32x17 text run at (1,1) width 32: "hello"
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.png index f17379b..d23e9866 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.txt index c1213fc..229e922 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (0,300) size 185.13x152 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 143.13x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x17: bullet - LayoutText {#text} at (40,10) size 62x17 - text run at (40,10) width 62: "First item" + LayoutText {#text} at (32,10) size 62x17 + text run at (32,10) width 62: "First item" LayoutListItem {LI} at (41,39) size 143.13x74 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x17: bullet - LayoutText {#text} at (40,10) size 105x53 - text run at (40,10) width 75: "Second and" + LayoutText {#text} at (32,10) size 97x53 + text run at (32,10) width 75: "Second and" text run at (10,28) width 94: "very very long" text run at (10,46) width 29: "item" LayoutListItem {LI} at (41,113) size 143.13x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (9,10) size 7x17: bullet - LayoutText {#text} at (40,10) size 68x17 - text run at (40,10) width 68: "Third item" + LayoutText {#text} at (32,10) size 68x17 + text run at (32,10) width 68: "Third item" LayoutBlockFlow {UL} at (0,468) size 185.13x152 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 143.13x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.13,10) size 7x17: bullet - LayoutText {#text} at (41,10) size 63x17 - text run at (41,10) width 63: "First item" + LayoutText {#text} at (49,10) size 63x17 + text run at (49,10) width 63: "First item" LayoutListItem {LI} at (1,39) size 143.13x74 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.13,10) size 7x17: bullet - LayoutText {#text} at (28,10) size 106x53 - text run at (28,10) width 76: "Second and" + LayoutText {#text} at (36,10) size 98x53 + text run at (36,10) width 76: "Second and" text run at (39,28) width 95: "very very long" text run at (104,46) width 30: "item" LayoutListItem {LI} at (1,113) size 143.13x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (127.13,10) size 7x17: bullet - LayoutText {#text} at (35,10) size 69x17 - text run at (35,10) width 69: "Third item" + LayoutText {#text} at (43,10) size 69x17 + text run at (43,10) width 69: "Third item" LayoutBlockFlow {UL} at (0,636) size 185.13x134 [border: (1px solid #0000FF)] LayoutListItem {LI} at (41,1) size 143.13x38 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (-17,14) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.png index 0e660bf..7f541f5 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.txt index 93ea8ee..c72cee5 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/008-vertical-expected.txt
@@ -34,33 +34,33 @@ LayoutBlockFlow {UL} at (300,0) size 152x185.13 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 38x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 17x7: bullet - LayoutText {#text} at (10,40) size 17x62 - text run at (10,40) width 62: "First item" + LayoutText {#text} at (10,32) size 17x62 + text run at (10,32) width 62: "First item" LayoutListItem {LI} at (39,41) size 74x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 17x7: bullet - LayoutText {#text} at (10,40) size 53x105 - text run at (10,40) width 75: "Second and" + LayoutText {#text} at (10,32) size 53x97 + text run at (10,32) width 75: "Second and" text run at (28,10) width 94: "very very long" text run at (46,10) width 29: "item" LayoutListItem {LI} at (113,41) size 38x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,9) size 17x7: bullet - LayoutText {#text} at (10,40) size 17x68 - text run at (10,40) width 68: "Third item" + LayoutText {#text} at (10,32) size 17x68 + text run at (10,32) width 68: "Third item" LayoutBlockFlow {UL} at (468,0) size 152x185.13 [border: (1px solid #FF0000)] LayoutListItem {LI} at (1,1) size 38x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.13) size 17x7: bullet - LayoutText {#text} at (10,41) size 17x63 - text run at (10,41) width 62: "First item" + LayoutText {#text} at (10,49) size 17x63 + text run at (10,49) width 62: "First item" LayoutListItem {LI} at (39,1) size 74x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.13) size 17x7: bullet - LayoutText {#text} at (10,28) size 53x106 - text run at (10,28) width 75: "Second and" + LayoutText {#text} at (10,36) size 53x98 + text run at (10,36) width 75: "Second and" text run at (28,39) width 94: "very very long" text run at (46,104) width 29: "item" LayoutListItem {LI} at (113,1) size 38x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (10,127.13) size 17x7: bullet - LayoutText {#text} at (10,35) size 17x69 - text run at (10,35) width 68: "Third item" + LayoutText {#text} at (10,43) size 17x69 + text run at (10,43) width 68: "Third item" LayoutBlockFlow {UL} at (636,0) size 134x185.13 [border: (1px solid #0000FF)] LayoutListItem {LI} at (1,41) size 38x143.13 [border: (5px solid #FFA500)] LayoutListMarker (anonymous) at (13,-17) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.png b/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.png index 28f0628..1a42393f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.txt b/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.txt index 5006ad6..a89c69fa 100644 --- a/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/fast/lists/markers-in-selection-expected.txt
@@ -30,8 +30,8 @@ LayoutBlockFlow {UL} at (0,120) size 784x18 LayoutListItem {LI} at (40,0) size 744x18 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 154x17 - text run at (30,0) width 154: "Item with inside marker" + LayoutText {#text} at (22,0) size 154x17 + text run at (22,0) width 154: "Item with inside marker" LayoutBlockFlow {UL} at (0,154) size 784x18 LayoutListItem {LI} at (40,0) size 744x18 LayoutListMarker (anonymous) at (-17,4) size 10x10
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.png index 736a6a97..2a497a04 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.txt index c12775c..fb053a61 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/list-marker-expected.txt
@@ -27,8 +27,8 @@ LayoutListItem {LI} at (40,0) size 744x18 LayoutBlockFlow (anonymous) at (0,0) size 744x18 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 21x17 - text run at (30,0) width 21: "bar" + LayoutText {#text} at (22,0) size 21x17 + text run at (22,0) width 21: "bar" LayoutBlockFlow {DIV} at (10,28) size 724x0 LayoutBlockFlow {UL} at (0,120) size 784x18 LayoutListItem {LI} at (0,0) size 744x18 @@ -41,6 +41,6 @@ LayoutListItem {LI} at (0,0) size 744x18 LayoutBlockFlow (anonymous) at (0,0) size 744x18 LayoutListMarker (anonymous) at (738,0) size 7x17: bullet - LayoutText {#text} at (693,0) size 21x17 - text run at (693,0) width 21: "bar" + LayoutText {#text} at (701,0) size 21x17 + text run at (701,0) width 21: "bar" LayoutBlockFlow {DIV} at (10,28) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.png b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.png index 7663ee3d..176d161 100644 --- a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.txt b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.txt index 05047bde..bd6f3f8d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/tables/mozilla/bugs/bug30692-expected.txt
@@ -9,13 +9,13 @@ LayoutBR {BR} at (496,14) size 1x0 LayoutListItem {LI} at (0,18) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 265x17 - text run at (30,0) width 265: "Absolute units work correctly (eg. 50px)." + LayoutText {#text} at (22,0) size 265x17 + text run at (22,0) width 265: "Absolute units work correctly (eg. 50px)." LayoutListItem {LI} at (0,36) size 784x490 LayoutBlockFlow (anonymous) at (0,0) size 784x18 LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet - LayoutText {#text} at (30,0) size 183x17 - text run at (30,0) width 183: "\"width:x%\" works correctly." + LayoutText {#text} at (22,0) size 183x17 + text run at (22,0) width 183: "\"width:x%\" works correctly." LayoutBlockFlow {HR} at (0,26) size 784x2 [border: (1px inset #EEEEEE)] LayoutTable {TABLE} at (0,36) size 784x100 LayoutTableSection {TBODY} at (0,0) size 784x100
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/scrollbars/custom-composited-different-track-parts-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/scrollbars/custom-composited-different-track-parts-expected.png deleted file mode 100644 index 2c7f7e5..0000000 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/compositing/scrollbars/custom-composited-different-track-parts-expected.png +++ /dev/null Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png index 736a6a97..2a497a04 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt new file mode 100644 index 0000000..fb053a61 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/disable-spinvalidation/paint/invalidation/list-marker-expected.txt
@@ -0,0 +1,46 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (8,8) size 784x576 + LayoutBlockFlow {P} at (0,0) size 784x36 + LayoutText {#text} at (0,0) size 54x17 + text run at (0,0) width 54: "Test for " + LayoutInline {I} at (0,0) size 739x35 + LayoutInline {A} at (0,0) size 305x17 [color=#0000EE] + LayoutText {#text} at (53,0) size 305x17 + text run at (53,0) width 305: "http://bugs.webkit.org/show_bug.cgi?id=12910" + LayoutText {#text} at (357,0) size 739x35 + text run at (357,0) width 5: " " + text run at (361,0) width 378: "REGRESSION (r18756-r18765): list-bullet doesn't redraw" + text run at (0,18) width 375: "properly when changing the list's content using JavaScript" + LayoutText {#text} at (374,18) size 5x17 + text run at (374,18) width 5: "." + LayoutBlockFlow {UL} at (0,52) size 784x18 + LayoutListItem {LI} at (40,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (-17,0) size 7x17: bullet + LayoutText {#text} at (0,0) size 22x17 + text run at (0,0) width 22: "foo" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,86) size 784x18 + LayoutListItem {LI} at (40,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet + LayoutText {#text} at (22,0) size 21x17 + text run at (22,0) width 21: "bar" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,120) size 784x18 + LayoutListItem {LI} at (0,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (754,0) size 7x17: bullet + LayoutText {#text} at (722,0) size 22x17 + text run at (722,0) width 22: "foo" + LayoutBlockFlow {DIV} at (10,28) size 724x0 + LayoutBlockFlow {UL} at (0,154) size 784x18 + LayoutListItem {LI} at (0,0) size 744x18 + LayoutBlockFlow (anonymous) at (0,0) size 744x18 + LayoutListMarker (anonymous) at (738,0) size 7x17: bullet + LayoutText {#text} at (701,0) size 21x17 + text run at (701,0) width 21: "bar" + LayoutBlockFlow {DIV} at (10,28) size 724x0
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.png b/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.png new file mode 100644 index 0000000..9fd54420 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.png Binary files differ
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.txt new file mode 100644 index 0000000..deac66536 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/mojo-loading/css1/classification/list_style_position-expected.txt
@@ -0,0 +1,52 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x600 + LayoutBlockFlow {HTML} at (0,0) size 800x600 + LayoutBlockFlow {BODY} at (8,8) size 784x584 [bgcolor=#CCCCCC] + LayoutBlockFlow {P} at (0,0) size 784x18 + LayoutText {#text} at (0,0) size 363x17 + text run at (0,0) width 363: "The style declarations which apply to the text below are:" + LayoutBlockFlow {PRE} at (0,34) size 784x48 + LayoutText {#text} at (0,0) size 288x48 + text run at (0,0) width 288: ".one {list-style-position: outside;}" + text run at (288,0) width 0: " " + text run at (0,16) width 280: ".two {list-style-position: inside;}" + text run at (280,16) width 0: " " + text run at (0,32) width 0: " " + LayoutBlockFlow {HR} at (0,95) size 784x2 [border: (1px inset #EEEEEE)] + LayoutBlockFlow {UL} at (0,113) size 784x36 + LayoutListItem {LI} at (40,0) size 744x36 + LayoutListMarker (anonymous) at (-17,0) size 7x17: bullet + LayoutText {#text} at (0,0) size 743x35 + text run at (0,0) width 743: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving blank" + text run at (0,18) width 158: "space beneath the bullet." + LayoutBlockFlow {UL} at (0,165) size 784x36 + LayoutListItem {LI} at (40,0) size 744x36 + LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet + LayoutText {#text} at (22,0) size 727x35 + text run at (22,0) width 705: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left margin," + text run at (0,18) width 268: "leaving no blank space beneath the bullet." + LayoutTable {TABLE} at (0,217) size 784x140 [border: (1px outset #808080)] + LayoutTableSection {TBODY} at (1,1) size 782x138 + LayoutTableRow {TR} at (0,0) size 782x26 + LayoutTableCell {TD} at (0,0) size 782x26 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=2] + LayoutInline {STRONG} at (0,0) size 161x17 + LayoutText {#text} at (4,4) size 161x17 + text run at (4,4) width 161: "TABLE Testing Section" + LayoutTableRow {TR} at (0,26) size 782x112 + LayoutTableCell {TD} at (0,69) size 12x26 [bgcolor=#C0C0C0] [border: (1px inset #808080)] [r=1 c=0 rs=1 cs=1] + LayoutText {#text} at (4,4) size 4x17 + text run at (4,4) width 4: " " + LayoutTableCell {TD} at (12,26) size 770x112 [border: (1px inset #808080)] [r=1 c=1 rs=1 cs=1] + LayoutBlockFlow {UL} at (4,4) size 762x36 + LayoutListItem {LI} at (40,0) size 722x36 + LayoutListMarker (anonymous) at (-17,0) size 7x17: bullet + LayoutText {#text} at (0,0) size 704x35 + text run at (0,0) width 704: "The text in this item should behave as expected; that is, it should line up with itself on the left margin, leaving" + text run at (0,18) width 197: "blank space beneath the bullet." + LayoutBlockFlow {UL} at (4,56) size 762x36 + LayoutListItem {LI} at (40,0) size 722x36 + LayoutListMarker (anonymous) at (-1,0) size 7x17: bullet + LayoutText {#text} at (22,0) size 674x35 + text run at (22,0) width 652: "The text in this item should not behave as expected; that is, it should line up with the bullet on the left" + text run at (0,18) width 321: "margin, leaving no blank space beneath the bullet."
diff --git a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/README.txt b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/README.txt deleted file mode 100644 index edc3930e..0000000 --- a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/README.txt +++ /dev/null
@@ -1 +0,0 @@ -# This suite runs the tests in compositing/ with --disable-slimming-paint-invalidation.
diff --git a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-child-expected.txt b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-child-expected.txt deleted file mode 100644 index a5e7976c..0000000 --- a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-child-expected.txt +++ /dev/null
@@ -1,165 +0,0 @@ -CASE 1, original layer tree -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#00FF00", - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ] -} -CASE 2, hovering over the outer div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#008000", - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 100, 100], - "reason": "style change" - } - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "reason": "style change" - } - ] -} -CASE 3, hovering over the inner div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#008000", - "transform": [ - [0.707106781186548, 0.707106781186548, 0, 0], - [-0.707106781186548, 0.707106781186548, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 100, 100], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "rect": [20, 25, 50, 50], - "reason": "style change" - } - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "reason": "style change" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt deleted file mode 100644 index d2a68910..0000000 --- a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/compositing/squashing/squash-transform-repainting-transformed-child-expected.txt +++ /dev/null
@@ -1,165 +0,0 @@ -CASE 1, original layer tree -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#00FF00", - "transform": [ - [0.927183854566787, 0.374606593415912, 0, 0], - [-0.374606593415912, 0.927183854566787, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ] -} -CASE 2, hovering over the outer div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#008000", - "transform": [ - [0.927183854566787, 0.374606593415912, 0, 0], - [-0.374606593415912, 0.927183854566787, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 100, 100], - "reason": "style change" - } - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "reason": "style change" - } - ] -} -CASE 3, hovering over the inner div -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "contentsOpaque": true, - "drawsContent": true - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='composited box behind'", - "position": [100, 100], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#0000FF" - }, - { - "name": "Squashing Containment Layer", - "shouldFlattenTransform": false - }, - { - "name": "LayoutBlockFlow (positioned) DIV class='box middle'", - "position": [20, 20], - "bounds": [100, 100], - "contentsOpaque": true, - "drawsContent": true, - "backgroundColor": "#008000", - "transform": [ - [0.927183854566787, 0.374606593415912, 0, 0], - [-0.374606593415912, 0.927183854566787, 0, 0], - [0, 0, 1, 0], - [0, 0, 0, 1] - ], - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "rect": [0, 0, 100, 100], - "reason": "style change" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "rect": [12, 17, 66, 66], - "reason": "style change" - } - ] - }, - { - "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV class='box top')", - "position": [180, 180], - "bounds": [100, 100], - "drawsContent": true - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV class='box middle'", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='smallbox'", - "reason": "style change" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/README.txt b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/README.txt deleted file mode 100644 index 4304347b..0000000 --- a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/README.txt +++ /dev/null
@@ -1 +0,0 @@ -# This suite runs the tests in paint/ with --disable-slimming-paint-invalidation.
diff --git a/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/README.txt b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/README.txt new file mode 100644 index 0000000..fb466fe --- /dev/null +++ b/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/README.txt
@@ -0,0 +1 @@ +# This suite runs the tests in paint/invalidation with experimental features disabled.
diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl index def34ae..50e3b25 100644 --- a/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/callback_function.cpp.tmpl
@@ -12,7 +12,7 @@ namespace blink { // static -{{cpp_class}}* {{cpp_class}}::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +{{cpp_class}}* {{cpp_class}}::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new {{cpp_class}}(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -24,13 +24,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE({{cpp_class}}) {} - DEFINE_TRACE_WRAPPERS({{cpp_class}}) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool {{cpp_class}}::call({{argument_declarations | join(', ')}}) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -39,39 +40,44 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); {% for argument in arguments %} v8::Local<v8::Value> {{argument.argument_name}} = {{argument.cpp_value_to_v8_value}}; {% endfor %} - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - {% if arguments %} v8::Local<v8::Value> argv[] = { {{arguments | join(', ', 'argument_name')}} }; {% else %} {# Empty array initializers are illegal, and don\'t compile in MSVC. #} v8::Local<v8::Value> *argv = nullptr; {% endif %} - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, {{arguments | length}}, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - {% if return_value %} - {{v8_value_to_local_cpp_value(return_value) | indent(8)}} - returnValue = cppValue; - {% endif %} - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + {{arguments | length}}, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + {% if return_value %} + {{v8_value_to_local_cpp_value(return_value) | indent(2)}} + returnValue = cppValue; + {% endif %} + return true; } {{cpp_class}}* NativeValueTraits<{{cpp_class}}>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl index 57b5e77c..6528813 100644 --- a/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl +++ b/third_party/WebKit/Source/bindings/templates/callback_function.h.tmpl
@@ -18,11 +18,11 @@ class {{exported}}{{cpp_class}} final : public GarbageCollectedFinalized<{{cpp_class}}>, public TraceWrapperBase { public: - static {{cpp_class}}* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static {{cpp_class}}* create(ScriptState*, v8::Local<v8::Value> callback); ~{{cpp_class}}() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call({{argument_declarations | join(', ')}});
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp index 3046a01..a7fe7379 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.cpp
@@ -23,7 +23,7 @@ namespace blink { // static -AnyCallbackFunctionOptionalAnyArg* AnyCallbackFunctionOptionalAnyArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +AnyCallbackFunctionOptionalAnyArg* AnyCallbackFunctionOptionalAnyArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new AnyCallbackFunctionOptionalAnyArg(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -35,13 +35,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(AnyCallbackFunctionOptionalAnyArg) {} - DEFINE_TRACE_WRAPPERS(AnyCallbackFunctionOptionalAnyArg) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool AnyCallbackFunctionOptionalAnyArg::call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -50,30 +51,35 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> optionalAnyArgArgument = optionalAnyArg.v8Value(); - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - v8::Local<v8::Value> argv[] = { optionalAnyArgArgument }; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - ScriptValue cppValue = ScriptValue(ScriptState::current(m_scriptState->isolate()), v8ReturnValue); - returnValue = cppValue; - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 1, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + ScriptValue cppValue = ScriptValue(ScriptState::current(m_scriptState->isolate()), v8ReturnValue); + returnValue = cppValue; + return true; } AnyCallbackFunctionOptionalAnyArg* NativeValueTraits<AnyCallbackFunctionOptionalAnyArg>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h index 1a85f3e..2984ff5 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/AnyCallbackFunctionOptionalAnyArg.h
@@ -26,11 +26,11 @@ class CORE_EXPORT AnyCallbackFunctionOptionalAnyArg final : public GarbageCollectedFinalized<AnyCallbackFunctionOptionalAnyArg>, public TraceWrapperBase { public: - static AnyCallbackFunctionOptionalAnyArg* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static AnyCallbackFunctionOptionalAnyArg* create(ScriptState*, v8::Local<v8::Value> callback); ~AnyCallbackFunctionOptionalAnyArg() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable, ScriptValue optionalAnyArg, ScriptValue& returnValue);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp b/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp index a9bc2a3c..051490c 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.cpp
@@ -24,7 +24,7 @@ namespace blink { // static -LongCallbackFunction* LongCallbackFunction::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +LongCallbackFunction* LongCallbackFunction::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new LongCallbackFunction(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -36,13 +36,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(LongCallbackFunction) {} - DEFINE_TRACE_WRAPPERS(LongCallbackFunction) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool LongCallbackFunction::call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -51,33 +52,38 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> num1Argument = v8::Integer::New(m_scriptState->isolate(), num1); v8::Local<v8::Value> num2Argument = v8::Integer::New(m_scriptState->isolate(), num2); - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - v8::Local<v8::Value> argv[] = { num1Argument, num2Argument }; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 2, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(m_scriptState->isolate(), v8ReturnValue, exceptionState, NormalConversion); - if (exceptionState.hadException()) - return false; - returnValue = cppValue; - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 2, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(m_scriptState->isolate(), v8ReturnValue, exceptionState, NormalConversion); + if (exceptionState.hadException()) + return false; + returnValue = cppValue; + return true; } LongCallbackFunction* NativeValueTraits<LongCallbackFunction>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h b/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h index 1bf142c..b596782 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/LongCallbackFunction.h
@@ -26,11 +26,11 @@ class CORE_EXPORT LongCallbackFunction final : public GarbageCollectedFinalized<LongCallbackFunction>, public TraceWrapperBase { public: - static LongCallbackFunction* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static LongCallbackFunction* create(ScriptState*, v8::Local<v8::Value> callback); ~LongCallbackFunction() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable, int32_t num1, int32_t num2, int32_t& returnValue);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp index 67e92f2..707c5e2 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.cpp
@@ -24,7 +24,7 @@ namespace blink { // static -StringSequenceCallbackFunctionLongSequenceArg* StringSequenceCallbackFunctionLongSequenceArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +StringSequenceCallbackFunctionLongSequenceArg* StringSequenceCallbackFunctionLongSequenceArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new StringSequenceCallbackFunctionLongSequenceArg(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -36,13 +36,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(StringSequenceCallbackFunctionLongSequenceArg) {} - DEFINE_TRACE_WRAPPERS(StringSequenceCallbackFunctionLongSequenceArg) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool StringSequenceCallbackFunctionLongSequenceArg::call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -51,32 +52,37 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> argArgument = ToV8(arg, m_scriptState->context()->Global(), m_scriptState->isolate()); - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - v8::Local<v8::Value> argv[] = { argArgument }; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - Vector<String> cppValue = toImplArray<Vector<String>>(v8ReturnValue, 0, m_scriptState->isolate(), exceptionState); - if (exceptionState.hadException()) - return false; - returnValue = cppValue; - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 1, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + Vector<String> cppValue = toImplArray<Vector<String>>(v8ReturnValue, 0, m_scriptState->isolate(), exceptionState); + if (exceptionState.hadException()) + return false; + returnValue = cppValue; + return true; } StringSequenceCallbackFunctionLongSequenceArg* NativeValueTraits<StringSequenceCallbackFunctionLongSequenceArg>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h index ca05d21..cac68ff 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/StringSequenceCallbackFunctionLongSequenceArg.h
@@ -26,11 +26,11 @@ class CORE_EXPORT StringSequenceCallbackFunctionLongSequenceArg final : public GarbageCollectedFinalized<StringSequenceCallbackFunctionLongSequenceArg>, public TraceWrapperBase { public: - static StringSequenceCallbackFunctionLongSequenceArg* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static StringSequenceCallbackFunctionLongSequenceArg* create(ScriptState*, v8::Local<v8::Value> callback); ~StringSequenceCallbackFunctionLongSequenceArg() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable, const Vector<int32_t>& arg, Vector<String>& returnValue);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp index fa58bd55..74073fa 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.cpp
@@ -22,7 +22,7 @@ namespace blink { // static -VoidCallbackFunction* VoidCallbackFunction::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +VoidCallbackFunction* VoidCallbackFunction::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new VoidCallbackFunction(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -34,13 +34,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(VoidCallbackFunction) {} - DEFINE_TRACE_WRAPPERS(VoidCallbackFunction) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool VoidCallbackFunction::call(ScriptWrappable* scriptWrappable) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -49,26 +50,32 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> *argv = nullptr; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 0, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + return true; } VoidCallbackFunction* NativeValueTraits<VoidCallbackFunction>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h index cd3146b0..0cb4575 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunction.h
@@ -26,11 +26,11 @@ class CORE_EXPORT VoidCallbackFunction final : public GarbageCollectedFinalized<VoidCallbackFunction>, public TraceWrapperBase { public: - static VoidCallbackFunction* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static VoidCallbackFunction* create(ScriptState*, v8::Local<v8::Value> callback); ~VoidCallbackFunction() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp index e48a538..ad2a2a5 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.cpp
@@ -23,7 +23,7 @@ namespace blink { // static -VoidCallbackFunctionInterfaceArg* VoidCallbackFunctionInterfaceArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +VoidCallbackFunctionInterfaceArg* VoidCallbackFunctionInterfaceArg::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new VoidCallbackFunctionInterfaceArg(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -35,13 +35,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(VoidCallbackFunctionInterfaceArg) {} - DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionInterfaceArg) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool VoidCallbackFunctionInterfaceArg::call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -50,28 +51,33 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> divElementArgument = ToV8(divElement, m_scriptState->context()->Global(), m_scriptState->isolate()); - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - v8::Local<v8::Value> argv[] = { divElementArgument }; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 1, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + return true; } VoidCallbackFunctionInterfaceArg* NativeValueTraits<VoidCallbackFunctionInterfaceArg>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h index 3648e1d..c44da05 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionInterfaceArg.h
@@ -27,11 +27,11 @@ class CORE_EXPORT VoidCallbackFunctionInterfaceArg final : public GarbageCollectedFinalized<VoidCallbackFunctionInterfaceArg>, public TraceWrapperBase { public: - static VoidCallbackFunctionInterfaceArg* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static VoidCallbackFunctionInterfaceArg* create(ScriptState*, v8::Local<v8::Value> callback); ~VoidCallbackFunctionInterfaceArg() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable, HTMLDivElement* divElement);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp index ac28a3f..7ead85d 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.cpp
@@ -24,7 +24,7 @@ namespace blink { // static -VoidCallbackFunctionTypedef* VoidCallbackFunctionTypedef::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +VoidCallbackFunctionTypedef* VoidCallbackFunctionTypedef::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new VoidCallbackFunctionTypedef(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -36,13 +36,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(VoidCallbackFunctionTypedef) {} - DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionTypedef) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool VoidCallbackFunctionTypedef::call(ScriptWrappable* scriptWrappable, const String& arg) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -51,28 +52,33 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); + + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> argArgument = v8String(m_scriptState->isolate(), arg); - - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); - v8::Local<v8::Value> argv[] = { argArgument }; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 1, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 1, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + return true; } VoidCallbackFunctionTypedef* NativeValueTraits<VoidCallbackFunctionTypedef>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h index ab2cebb..64069d8 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/VoidCallbackFunctionTypedef.h
@@ -26,11 +26,11 @@ class CORE_EXPORT VoidCallbackFunctionTypedef final : public GarbageCollectedFinalized<VoidCallbackFunctionTypedef>, public TraceWrapperBase { public: - static VoidCallbackFunctionTypedef* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static VoidCallbackFunctionTypedef* create(ScriptState*, v8::Local<v8::Value> callback); ~VoidCallbackFunctionTypedef() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable, const String& arg);
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp index 09c9871..28b9d372 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.cpp
@@ -22,7 +22,7 @@ namespace blink { // static -VoidCallbackFunctionModules* VoidCallbackFunctionModules::create(ScriptState* scriptState, v8::Local<v8::Value> callback){ +VoidCallbackFunctionModules* VoidCallbackFunctionModules::create(ScriptState* scriptState, v8::Local<v8::Value> callback) { if (isUndefinedOrNull(callback)) return nullptr; return new VoidCallbackFunctionModules(scriptState, v8::Local<v8::Function>::Cast(callback)); @@ -34,13 +34,14 @@ DCHECK(!m_callback.isEmpty()); } -DEFINE_TRACE(VoidCallbackFunctionModules) {} - DEFINE_TRACE_WRAPPERS(VoidCallbackFunctionModules) { visitor->traceWrappers(m_callback.cast<v8::Value>()); } bool VoidCallbackFunctionModules::call(ScriptWrappable* scriptWrappable) { + if (m_callback.isEmpty()) + return false; + if (!m_scriptState->contextIsValid()) return false; @@ -49,26 +50,32 @@ if (context->isContextSuspended() || context->isContextDestroyed()) return false; - if (m_callback.isEmpty()) - return false; - // TODO(bashi): Make sure that using DummyExceptionStateForTesting is OK. // crbug.com/653769 DummyExceptionStateForTesting exceptionState; ScriptState::Scope scope(m_scriptState.get()); + v8::Isolate* isolate = m_scriptState->isolate(); - v8::Local<v8::Value> thisValue = ToV8(scriptWrappable, m_scriptState->context()->Global(), m_scriptState->isolate()); + v8::Local<v8::Value> thisValue = ToV8( + scriptWrappable, + m_scriptState->context()->Global(), + isolate); v8::Local<v8::Value> *argv = nullptr; - - v8::Local<v8::Value> v8ReturnValue; - v8::TryCatch exceptionCatcher(m_scriptState->isolate()); + v8::TryCatch exceptionCatcher(isolate); exceptionCatcher.SetVerbose(true); - if (V8ScriptRunner::callFunction(m_callback.newLocal(m_scriptState->isolate()), m_scriptState->getExecutionContext(), thisValue, 0, argv, m_scriptState->isolate()).ToLocal(&v8ReturnValue)) { - return true; + v8::Local<v8::Value> v8ReturnValue; + if (!V8ScriptRunner::callFunction(m_callback.newLocal(isolate), + context, + thisValue, + 0, + argv, + isolate).ToLocal(&v8ReturnValue)) { + return false; } - return false; + + return true; } VoidCallbackFunctionModules* NativeValueTraits<VoidCallbackFunctionModules>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h index d10cccd..a729dfd 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h +++ b/third_party/WebKit/Source/bindings/tests/results/modules/VoidCallbackFunctionModules.h
@@ -26,11 +26,11 @@ class MODULES_EXPORT VoidCallbackFunctionModules final : public GarbageCollectedFinalized<VoidCallbackFunctionModules>, public TraceWrapperBase { public: - static VoidCallbackFunctionModules* create(ScriptState* scriptState, v8::Local<v8::Value> callback); + static VoidCallbackFunctionModules* create(ScriptState*, v8::Local<v8::Value> callback); ~VoidCallbackFunctionModules() = default; - DECLARE_TRACE(); + DEFINE_INLINE_TRACE() {} DECLARE_TRACE_WRAPPERS(); bool call(ScriptWrappable* scriptWrappable);
diff --git a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp index 84e9da0..ba85f542 100644 --- a/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp +++ b/third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp
@@ -17,8 +17,8 @@ #include "platform/fonts/FontDescription.h" #include "platform/fonts/SimpleFontData.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/network/NetworkStateNotifier.h" -#include "platform/network/ResourceLoadPriority.h" #include "public/platform/WebEffectiveConnectionType.h" #include "wtf/CurrentTime.h"
diff --git a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp index ec334a5..33910194 100644 --- a/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp +++ b/third_party/WebKit/Source/core/fileapi/FileReaderLoader.cpp
@@ -30,6 +30,7 @@ #include "core/fileapi/FileReaderLoader.h" +#include <memory> #include "core/dom/DOMArrayBuffer.h" #include "core/dom/ExecutionContext.h" #include "core/fileapi/Blob.h" @@ -39,9 +40,9 @@ #include "platform/blob/BlobRegistry.h" #include "platform/blob/BlobURL.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "public/platform/WebURLRequest.h" #include "wtf/PassRefPtr.h" #include "wtf/PtrUtil.h" @@ -49,7 +50,6 @@ #include "wtf/Vector.h" #include "wtf/text/Base64.h" #include "wtf/text/StringBuilder.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/frame/Frame.cpp b/third_party/WebKit/Source/core/frame/Frame.cpp index 9af871dd..c2858eb 100644 --- a/third_party/WebKit/Source/core/frame/Frame.cpp +++ b/third_party/WebKit/Source/core/frame/Frame.cpp
@@ -49,7 +49,7 @@ #include "platform/InstanceCounters.h" #include "platform/UserGestureIndicator.h" #include "platform/feature_policy/FeaturePolicy.h" -#include "platform/network/ResourceError.h" +#include "platform/loader/fetch/ResourceError.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/frame/FrameConsole.cpp b/third_party/WebKit/Source/core/frame/FrameConsole.cpp index 0bd2317d..2c02a9a 100644 --- a/third_party/WebKit/Source/core/frame/FrameConsole.cpp +++ b/third_party/WebKit/Source/core/frame/FrameConsole.cpp
@@ -38,8 +38,8 @@ #include "core/loader/DocumentLoader.h" #include "core/page/ChromeClient.h" #include "core/page/Page.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "wtf/text/StringBuilder.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp b/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp index 63db6b16..6a958c40 100644 --- a/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp +++ b/third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp
@@ -43,7 +43,7 @@ #include "platform/heap/Handle.h" #include "platform/image-decoders/ImageDecoder.h" #include "platform/loader/fetch/MemoryCache.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/skia/include/core/SkCanvas.h" #include "third_party/skia/include/core/SkColorSpaceXform.h"
diff --git a/third_party/WebKit/Source/core/frame/LocalFrameClient.h b/third_party/WebKit/Source/core/frame/LocalFrameClient.h index ef0b5b7..5f25ddfe 100644 --- a/third_party/WebKit/Source/core/frame/LocalFrameClient.h +++ b/third_party/WebKit/Source/core/frame/LocalFrameClient.h
@@ -43,9 +43,9 @@ #include "core/loader/FrameLoaderTypes.h" #include "core/loader/NavigationPolicy.h" #include "platform/heap/Handle.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceLoadPriority.h" #include "platform/weborigin/Referrer.h" #include "public/platform/WebContentSecurityPolicyStruct.h" #include "public/platform/WebEffectiveConnectionType.h"
diff --git a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp index d39a908..d04e312 100644 --- a/third_party/WebKit/Source/core/frame/RemoteFrame.cpp +++ b/third_party/WebKit/Source/core/frame/RemoteFrame.cpp
@@ -19,7 +19,7 @@ #include "platform/PluginScriptForbiddenScope.h" #include "platform/UserGestureIndicator.h" #include "platform/graphics/GraphicsLayer.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityPolicy.h" #include "public/platform/WebLayer.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h index 970353b8..e701cb9 100644 --- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h +++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveList.h
@@ -10,9 +10,9 @@ #include "core/frame/csp/SourceListDirective.h" #include "platform/heap/Handle.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/ContentSecurityPolicyParsers.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "public/platform/WebContentSecurityPolicy.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp index 9fd7b07..c6586f2526 100644 --- a/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp +++ b/third_party/WebKit/Source/core/frame/csp/CSPDirectiveListTest.cpp
@@ -6,8 +6,8 @@ #include "core/frame/csp/ContentSecurityPolicy.h" #include "core/frame/csp/SourceListDirective.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceRequest.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/text/StringOperators.h" #include "wtf/text/WTFString.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSource.h b/third_party/WebKit/Source/core/frame/csp/CSPSource.h index 100d3799..09902e7 100644 --- a/third_party/WebKit/Source/core/frame/csp/CSPSource.h +++ b/third_party/WebKit/Source/core/frame/csp/CSPSource.h
@@ -8,7 +8,7 @@ #include "core/CoreExport.h" #include "core/frame/csp/ContentSecurityPolicy.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebContentSecurityPolicyStruct.h" #include "wtf/Allocator.h" #include "wtf/text/WTFString.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp b/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp index 8c8b9d3..85e76b9 100644 --- a/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp +++ b/third_party/WebKit/Source/core/frame/csp/CSPSourceTest.cpp
@@ -6,7 +6,7 @@ #include "core/dom/Document.h" #include "core/frame/csp/ContentSecurityPolicy.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp index 1eb8c8a..f698d9a 100644 --- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp +++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.cpp
@@ -53,11 +53,11 @@ #include "platform/RuntimeEnabledFeatures.h" #include "platform/json/JSONValues.h" #include "platform/loader/fetch/IntegrityMetadata.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/ContentSecurityPolicyParsers.h" #include "platform/network/ContentSecurityPolicyResponseHeaders.h" #include "platform/network/EncodedFormData.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/KnownPorts.h" #include "platform/weborigin/SecurityOrigin.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h index 48d7c81..dc1c4ae3 100644 --- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h +++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicy.h
@@ -35,9 +35,9 @@ #include "core/inspector/ConsoleTypes.h" #include "platform/heap/Handle.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/ContentSecurityPolicyParsers.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "public/platform/WebInsecureRequestPolicy.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp index 9dd4728..ebb18ea 100644 --- a/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp +++ b/third_party/WebKit/Source/core/frame/csp/ContentSecurityPolicyTest.cpp
@@ -12,8 +12,8 @@ #include "platform/Crypto.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/loader/fetch/IntegrityMetadata.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityOrigin.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h index 6ef7699d..f8dba97 100644 --- a/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h +++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirective.h
@@ -9,8 +9,8 @@ #include "core/frame/csp/CSPDirective.h" #include "core/frame/csp/CSPSource.h" #include "platform/Crypto.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceRequest.h" #include "public/platform/WebContentSecurityPolicy.h" #include "wtf/HashSet.h" #include "wtf/text/WTFString.h"
diff --git a/third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp b/third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp index 39f88cf8c7..293a6c688 100644 --- a/third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp +++ b/third_party/WebKit/Source/core/frame/csp/SourceListDirectiveTest.cpp
@@ -7,7 +7,7 @@ #include "core/dom/Document.h" #include "core/frame/csp/CSPSource.h" #include "core/frame/csp/ContentSecurityPolicy.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/third_party/WebKit/Source/core/html/HTMLImageElement.h b/third_party/WebKit/Source/core/html/HTMLImageElement.h index 37bf7e40..97e42b4 100644 --- a/third_party/WebKit/Source/core/html/HTMLImageElement.h +++ b/third_party/WebKit/Source/core/html/HTMLImageElement.h
@@ -33,7 +33,7 @@ #include "core/imagebitmap/ImageBitmapSource.h" #include "platform/graphics/GraphicsTypes.h" #include "platform/loader/fetch/FetchRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp index 139cff4..acbe2d5 100644 --- a/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp +++ b/third_party/WebKit/Source/core/html/HTMLPlugInElement.cpp
@@ -48,7 +48,7 @@ #include "core/plugins/PluginView.h" #include "platform/FrameViewBase.h" #include "platform/Histogram.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/mime/MIMETypeFromURL.h" #include "platform/network/mime/MIMETypeRegistry.h" #include "platform/plugins/PluginData.h"
diff --git a/third_party/WebKit/Source/core/html/parser/CSSPreloadScannerTest.cpp b/third_party/WebKit/Source/core/html/parser/CSSPreloadScannerTest.cpp index 2d6dd9b..81cfceb 100644 --- a/third_party/WebKit/Source/core/html/parser/CSSPreloadScannerTest.cpp +++ b/third_party/WebKit/Source/core/html/parser/CSSPreloadScannerTest.cpp
@@ -4,18 +4,18 @@ #include "core/html/parser/CSSPreloadScanner.h" +#include <memory> #include "core/frame/Settings.h" #include "core/html/parser/HTMLResourcePreloader.h" #include "core/testing/DummyPageHolder.h" #include "platform/heap/Heap.h" #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "testing/gtest/include/gtest/gtest.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp index a3b9458..d5f68bf6 100644 --- a/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp +++ b/third_party/WebKit/Source/core/html/parser/XSSAuditorDelegate.cpp
@@ -34,8 +34,8 @@ #include "core/loader/NavigationScheduler.h" #include "core/loader/PingLoader.h" #include "platform/json/JSONValues.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/network/EncodedFormData.h" -#include "platform/network/ResourceError.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/text/StringBuilder.h"
diff --git a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp index 4817fd3..dec030c 100644 --- a/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp +++ b/third_party/WebKit/Source/core/inspector/DevToolsHost.cpp
@@ -53,10 +53,10 @@ #include "platform/ScriptForbiddenScope.h" #include "platform/SharedBuffer.h" #include "platform/UserGestureIndicator.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp index 803e9d66..60c94f5 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorNetworkAgent.cpp
@@ -59,14 +59,14 @@ #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceLoadTiming.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/fetch/UniqueIdentifier.h" #include "platform/network/HTTPHeaderMap.h" #include "platform/network/NetworkStateNotifier.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceLoadTiming.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/network/WebSocketHandshakeRequest.h" #include "platform/network/WebSocketHandshakeResponse.h" #include "platform/weborigin/KURL.h"
diff --git a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp index 9cf27cb..01d1470 100644 --- a/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp +++ b/third_party/WebKit/Source/core/inspector/InspectorTraceEvents.cpp
@@ -34,9 +34,9 @@ #include "platform/InstanceCounters.h" #include "platform/graphics/GraphicsLayer.h" #include "platform/instrumentation/tracing/TracedValue.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "v8/include/v8-profiler.h" #include "v8/include/v8.h"
diff --git a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp index bf1b5700..df9a788f 100644 --- a/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp +++ b/third_party/WebKit/Source/core/inspector/NetworkResourcesData.cpp
@@ -28,11 +28,11 @@ #include "core/inspector/NetworkResourcesData.h" +#include <memory> #include "core/dom/DOMImplementation.h" #include "platform/SharedBuffer.h" #include "platform/loader/fetch/Resource.h" -#include "platform/network/ResourceResponse.h" -#include <memory> +#include "platform/loader/fetch/ResourceResponse.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp index db381a8..9cef256 100644 --- a/third_party/WebKit/Source/core/layout/LayoutGrid.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
@@ -71,6 +71,12 @@ void LayoutGrid::addChild(LayoutObject* newChild, LayoutObject* beforeChild) { LayoutBlock::addChild(newChild, beforeChild); + // Positioned grid items do not take up space or otherwise participate in the + // layout of the grid, for that reason we don't need to mark the grid as dirty + // when they are added. + if (newChild->isOutOfFlowPositioned()) + return; + // The grid needs to be recomputed as it might contain auto-placed items that // will change their position. dirtyGrid(); @@ -79,6 +85,12 @@ void LayoutGrid::removeChild(LayoutObject* child) { LayoutBlock::removeChild(child); + // Positioned grid items do not take up space or otherwise participate in the + // layout of the grid, for that reason we don't need to mark the grid as dirty + // when they are removed. + if (child->isOutOfFlowPositioned()) + return; + // The grid needs to be recomputed as it might contain auto-placed items that // will change their position. dirtyGrid();
diff --git a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp index c7e5f98..4007188 100644 --- a/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutListMarker.cpp
@@ -295,7 +295,6 @@ case ListStyleCategory::Symbol: marginStart = LayoutUnit(-1); marginEnd = - fontMetrics.ascent() - minPreferredLogicalWidth() + 1 + LayoutUnit(cUAMarkerMarginEm * style()->computedFontSize()); break; default:
diff --git a/third_party/WebKit/Source/core/loader/DocumentLoader.h b/third_party/WebKit/Source/core/loader/DocumentLoader.h index cb84c36a..a30b783 100644 --- a/third_party/WebKit/Source/core/loader/DocumentLoader.h +++ b/third_party/WebKit/Source/core/loader/DocumentLoader.h
@@ -45,11 +45,11 @@ #include "platform/SharedBuffer.h" #include "platform/loader/fetch/ClientHintsPreferences.h" #include "platform/loader/fetch/RawResource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/fetch/SubstituteData.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "public/platform/WebLoadingBehaviorFlag.h" #include "wtf/HashSet.h" #include "wtf/RefPtr.h"
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp index a7fdb7f..06461184 100644 --- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp +++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
@@ -52,7 +52,7 @@ #include "platform/loader/fetch/FetchUtils.h" #include "platform/loader/fetch/Resource.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h"
diff --git a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h index 03f776e0..8370d2e 100644 --- a/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h +++ b/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h
@@ -32,18 +32,18 @@ #ifndef DocumentThreadableLoader_h #define DocumentThreadableLoader_h +#include <memory> #include "core/CoreExport.h" #include "core/loader/ThreadableLoader.h" #include "platform/Timer.h" #include "platform/heap/Handle.h" #include "platform/loader/fetch/RawResource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceOwner.h" #include "platform/network/HTTPHeaderMap.h" -#include "platform/network/ResourceError.h" #include "platform/weborigin/Referrer.h" #include "wtf/Forward.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.h b/third_party/WebKit/Source/core/loader/EmptyClients.h index 560df7b..508d5de 100644 --- a/third_party/WebKit/Source/core/loader/EmptyClients.h +++ b/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -45,7 +45,7 @@ #include "platform/geometry/FloatRect.h" #include "platform/geometry/IntRect.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceError.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/text/TextCheckerClient.h" #include "public/platform/WebFocusType.h" #include "public/platform/WebScreenInfo.h"
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp index 2d89785..1f6dd37c 100644 --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp
@@ -71,13 +71,13 @@ #include "platform/loader/fetch/ClientHintsPreferences.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceLoadingLog.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/loader/fetch/UniqueIdentifier.h" #include "platform/mhtml/MHTMLArchive.h" #include "platform/network/NetworkStateNotifier.h" #include "platform/network/NetworkUtils.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceTimingInfo.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityPolicy.h" #include "public/platform/WebCachePolicy.h"
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContext.h b/third_party/WebKit/Source/core/loader/FrameFetchContext.h index 32de7a2..b087a7c 100644 --- a/third_party/WebKit/Source/core/loader/FrameFetchContext.h +++ b/third_party/WebKit/Source/core/loader/FrameFetchContext.h
@@ -38,7 +38,7 @@ #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "wtf/Forward.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp index 32eb83e..2ab3b0c 100644 --- a/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp +++ b/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp
@@ -44,9 +44,9 @@ #include "core/page/Page.h" #include "core/testing/DummyPageHolder.h" #include "platform/loader/fetch/FetchInitiatorInfo.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/loader/fetch/UniqueIdentifier.h" #include "platform/loader/testing/MockResource.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "public/platform/WebAddressSpace.h"
diff --git a/third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp b/third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp index 4373b3d..42a089bd 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp +++ b/third_party/WebKit/Source/core/loader/FrameLoadRequest.cpp
@@ -4,7 +4,7 @@ #include "core/loader/FrameLoadRequest.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebURLRequest.h" #include "wtf/text/AtomicString.h"
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp index 180f731..fb58d81 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp +++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -91,8 +91,8 @@ #include "platform/feature_policy/FeaturePolicy.h" #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceRequest.h" #include "platform/scroll/ScrollAnimatorBase.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h" @@ -1654,8 +1654,9 @@ type == NavigationTypeFormResubmitted; if (isFormSubmission && !m_frame->document()->contentSecurityPolicy()->allowFormAction( - request.url())) + request.url(), request.redirectStatus())) { return NavigationPolicyIgnore; + } bool replacesCurrentHistoryItem = frameLoadType == FrameLoadTypeReplaceCurrentItem;
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.h b/third_party/WebKit/Source/core/loader/FrameLoader.h index 1b3ab0e..355b641 100644 --- a/third_party/WebKit/Source/core/loader/FrameLoader.h +++ b/third_party/WebKit/Source/core/loader/FrameLoader.h
@@ -46,7 +46,7 @@ #include "platform/heap/Handle.h" #include "platform/instrumentation/tracing/TracedValue.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebInsecureRequestPolicy.h" #include "wtf/Forward.h" #include "wtf/HashSet.h"
diff --git a/third_party/WebKit/Source/core/loader/HistoryItem.cpp b/third_party/WebKit/Source/core/loader/HistoryItem.cpp index 2978583d..74ab5cfd 100644 --- a/third_party/WebKit/Source/core/loader/HistoryItem.cpp +++ b/third_party/WebKit/Source/core/loader/HistoryItem.cpp
@@ -27,7 +27,7 @@ #include "core/dom/Document.h" #include "core/html/forms/FormController.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityPolicy.h" #include "wtf/Assertions.h" #include "wtf/CurrentTime.h"
diff --git a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp index 67d0c6b..ad9274a 100644 --- a/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp +++ b/third_party/WebKit/Source/core/loader/LinkLoaderTest.cpp
@@ -4,6 +4,8 @@ #include "core/loader/LinkLoader.h" +#include <base/macros.h> +#include <memory> #include "core/frame/Settings.h" #include "core/html/LinkRelAttribute.h" #include "core/loader/DocumentLoader.h" @@ -12,13 +14,11 @@ #include "core/testing/DummyPageHolder.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/testing/URLTestHelpers.h" #include "public/platform/Platform.h" #include "public/platform/WebURLLoaderMockFactory.h" #include "testing/gtest/include/gtest/gtest.h" -#include <base/macros.h> -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/MixedContentChecker.h b/third_party/WebKit/Source/core/loader/MixedContentChecker.h index 5ef804fe..6366345 100644 --- a/third_party/WebKit/Source/core/loader/MixedContentChecker.h +++ b/third_party/WebKit/Source/core/loader/MixedContentChecker.h
@@ -34,7 +34,7 @@ #include "base/gtest_prod_util.h" #include "core/CoreExport.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "public/platform/WebMixedContentContextType.h" #include "public/platform/WebURLRequest.h"
diff --git a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp index 333530a..b7c381118 100644 --- a/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp +++ b/third_party/WebKit/Source/core/loader/MixedContentCheckerTest.cpp
@@ -4,10 +4,12 @@ #include "core/loader/MixedContentChecker.h" +#include <base/macros.h> +#include <memory> #include "core/frame/Settings.h" #include "core/loader/EmptyClients.h" #include "core/testing/DummyPageHolder.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebMixedContent.h" @@ -15,8 +17,6 @@ #include "testing/gmock/include/gmock/gmock-generated-function-mockers.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/RefPtr.h" -#include <base/macros.h> -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/PingLoader.cpp b/third_party/WebKit/Source/core/loader/PingLoader.cpp index e9cddb9..6656313 100644 --- a/third_party/WebKit/Source/core/loader/PingLoader.cpp +++ b/third_party/WebKit/Source/core/loader/PingLoader.cpp
@@ -54,13 +54,13 @@ #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/FetchUtils.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/fetch/UniqueIdentifier.h" #include "platform/network/EncodedFormData.h" #include "platform/network/ParsedContentType.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h" #include "public/platform/Platform.h"
diff --git a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp index a72a93020..81a48b4 100644 --- a/third_party/WebKit/Source/core/loader/ProgressTracker.cpp +++ b/third_party/WebKit/Source/core/loader/ProgressTracker.cpp
@@ -34,7 +34,7 @@ #include "core/loader/FrameLoader.h" #include "platform/loader/fetch/Resource.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "wtf/CurrentTime.h" #include "wtf/PtrUtil.h" #include "wtf/text/CString.h"
diff --git a/third_party/WebKit/Source/core/loader/ProgressTracker.h b/third_party/WebKit/Source/core/loader/ProgressTracker.h index 3c531c5..9057435 100644 --- a/third_party/WebKit/Source/core/loader/ProgressTracker.h +++ b/third_party/WebKit/Source/core/loader/ProgressTracker.h
@@ -26,15 +26,15 @@ #ifndef ProgressTracker_h #define ProgressTracker_h +#include <memory> #include "core/CoreExport.h" #include "core/loader/FrameLoaderTypes.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "wtf/Allocator.h" #include "wtf/Forward.h" #include "wtf/HashMap.h" #include "wtf/Noncopyable.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/ProgressTrackerTest.cpp b/third_party/WebKit/Source/core/loader/ProgressTrackerTest.cpp index 662d28e..2712caa4 100644 --- a/third_party/WebKit/Source/core/loader/ProgressTrackerTest.cpp +++ b/third_party/WebKit/Source/core/loader/ProgressTrackerTest.cpp
@@ -7,7 +7,7 @@ #include "core/frame/Settings.h" #include "core/loader/EmptyClients.h" #include "core/testing/DummyPageHolder.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "testing/gtest/include/gtest/gtest.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp index 3866a96..63c86ee 100644 --- a/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp +++ b/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
@@ -15,11 +15,11 @@ #include "platform/WaitableEvent.h" #include "platform/geometry/IntSize.h" #include "platform/loader/fetch/MemoryCache.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/testing/URLTestHelpers.h" #include "platform/testing/UnitTestHelpers.h" #include "platform/weborigin/KURL.h"
diff --git a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp index 6ba26f6..9af8d3d 100644 --- a/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp +++ b/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
@@ -38,10 +38,10 @@ #include "core/workers/WorkerLoaderProxy.h" #include "platform/CrossThreadFunctional.h" #include "platform/heap/SafePoint.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityPolicy.h" #include "wtf/Functional.h"
diff --git a/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.cpp b/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.cpp index 1bb251f..11d7f18 100644 --- a/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.cpp +++ b/third_party/WebKit/Source/core/loader/private/CrossOriginPreflightResultCache.cpp
@@ -29,7 +29,7 @@ #include <memory> #include "platform/HTTPNames.h" #include "platform/loader/fetch/FetchUtils.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "wtf/CurrentTime.h" #include "wtf/StdLibExtras.h"
diff --git a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResourceTest.cpp b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResourceTest.cpp index f09d0b11..31e39e4 100644 --- a/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResourceTest.cpp +++ b/third_party/WebKit/Source/core/loader/resource/CSSStyleSheetResourceTest.cpp
@@ -4,6 +4,7 @@ #include "core/loader/resource/CSSStyleSheetResource.h" +#include <memory> #include "core/css/CSSCrossfadeValue.h" #include "core/css/CSSImageValue.h" #include "core/css/CSSPrimitiveValue.h" @@ -25,7 +26,7 @@ #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/testing/URLTestHelpers.h" #include "platform/testing/UnitTestHelpers.h" #include "platform/weborigin/KURL.h" @@ -35,7 +36,6 @@ #include "wtf/PtrUtil.h" #include "wtf/RefPtr.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp b/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp index c7dc7a2..4273414 100644 --- a/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp +++ b/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp
@@ -9,13 +9,13 @@ #include "platform/loader/fetch/FetchInitiatorInfo.h" #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/MemoryCache.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" #include "platform/loader/fetch/ResourceLoader.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/testing/MockFetchContext.h" #include "platform/loader/testing/MockResourceClient.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "public/platform/Platform.h" #include "public/platform/WebCachePolicy.h"
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h index 9d6417ae..d829bfe 100644 --- a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h +++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h
@@ -5,6 +5,7 @@ #ifndef ImageResourceContent_h #define ImageResourceContent_h +#include <memory> #include "core/CoreExport.h" #include "platform/geometry/IntRect.h" #include "platform/geometry/IntSizeHash.h" @@ -12,12 +13,11 @@ #include "platform/graphics/Image.h" #include "platform/graphics/ImageObserver.h" #include "platform/graphics/ImageOrientation.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceStatus.h" -#include "platform/network/ResourceLoadPriority.h" #include "platform/weborigin/KURL.h" #include "wtf/HashCountedSet.h" #include "wtf/HashMap.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceObserver.h b/third_party/WebKit/Source/core/loader/resource/ImageResourceObserver.h index 7a6922f..bc14528 100644 --- a/third_party/WebKit/Source/core/loader/resource/ImageResourceObserver.h +++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceObserver.h
@@ -25,7 +25,7 @@ #include "core/CoreExport.h" #include "platform/graphics/ImageAnimationPolicy.h" -#include "platform/network/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "wtf/Forward.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParser.h b/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParser.h index 2674efe..c1cf568 100644 --- a/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParser.h +++ b/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParser.h
@@ -43,7 +43,7 @@ #include "core/CoreExport.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "wtf/Vector.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParserTest.cpp b/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParserTest.cpp index 7a3d4d5..3120304 100644 --- a/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParserTest.cpp +++ b/third_party/WebKit/Source/core/loader/resource/MultipartImageResourceParserTest.cpp
@@ -4,7 +4,7 @@ #include "core/loader/resource/MultipartImageResourceParser.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "testing/gtest/include/gtest/gtest.h" #include <stddef.h>
diff --git a/third_party/WebKit/Source/core/page/CreateWindow.cpp b/third_party/WebKit/Source/core/page/CreateWindow.cpp index 8307d41d..a1a0262 100644 --- a/third_party/WebKit/Source/core/page/CreateWindow.cpp +++ b/third_party/WebKit/Source/core/page/CreateWindow.cpp
@@ -38,7 +38,7 @@ #include "core/page/Page.h" #include "core/page/WindowFeatures.h" #include "platform/UserGestureIndicator.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h"
diff --git a/third_party/WebKit/Source/core/page/DragController.cpp b/third_party/WebKit/Source/core/page/DragController.cpp index 2a5c72e..f36e0973 100644 --- a/third_party/WebKit/Source/core/page/DragController.cpp +++ b/third_party/WebKit/Source/core/page/DragController.cpp
@@ -26,6 +26,7 @@ #include "core/page/DragController.h" +#include <memory> #include "bindings/core/v8/ExceptionState.h" #include "core/HTMLNames.h" #include "core/InputTypeNames.h" @@ -76,7 +77,7 @@ #include "platform/graphics/Image.h" #include "platform/graphics/ImageOrientation.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebCommon.h" #include "public/platform/WebDragData.h" @@ -88,7 +89,6 @@ #include "wtf/CurrentTime.h" #include "wtf/PassRefPtr.h" #include "wtf/RefPtr.h" -#include <memory> #if OS(WIN) #include <windows.h>
diff --git a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp index 5b75dec..34ab1db 100644 --- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp +++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetector.cpp
@@ -113,7 +113,8 @@ m_seenFirstMeaningfulPaintCandidate = true; return; } - m_paintTiming->markFirstMeaningfulPaintCandidate(); + m_paintTiming->setFirstMeaningfulPaintCandidate( + m_provisionalFirstMeaningfulPaint); } int FirstMeaningfulPaintDetector::activeConnections() { @@ -170,6 +171,11 @@ m_network2QuietReached = true; if (m_provisionalFirstMeaningfulPaint) { + // If there's only been one contentful paint, then there won't have been + // a meaningful paint signalled to the Scheduler, so mark one now. + // This is a no-op if a FMPC has already been marked. + m_paintTiming->setFirstMeaningfulPaintCandidate( + m_provisionalFirstMeaningfulPaint); // Enforce FirstContentfulPaint <= FirstMeaningfulPaint. m_firstMeaningfulPaint2Quiet = std::max(m_provisionalFirstMeaningfulPaint,
diff --git a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp index 49236227..63527ab 100644 --- a/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp +++ b/third_party/WebKit/Source/core/paint/FirstMeaningfulPaintDetectorTest.cpp
@@ -158,6 +158,23 @@ } TEST_F(FirstMeaningfulPaintDetectorTest, + OnlyOneFirstMeaningfulPaintCandidateBeforeNetworkStable) { + paintTiming().markFirstContentfulPaint(); + EXPECT_EQ(paintTiming().firstMeaningfulPaintCandidate(), 0.0); + double beforePaint = monotonicallyIncreasingTime(); + simulateLayoutAndPaint(1); + // The first candidate is initially ignored. + EXPECT_EQ(paintTiming().firstMeaningfulPaintCandidate(), 0.0); + simulateNetworkStable(); + // The networkStable then promotes the first candidate. + EXPECT_GT(paintTiming().firstMeaningfulPaintCandidate(), beforePaint); + double candidate = paintTiming().firstMeaningfulPaintCandidate(); + // The second candidate is then ignored. + simulateLayoutAndPaint(10); + EXPECT_EQ(paintTiming().firstMeaningfulPaintCandidate(), candidate); +} + +TEST_F(FirstMeaningfulPaintDetectorTest, NetworkStableBeforeFirstContentfulPaint) { paintTiming().markFirstPaint(); simulateLayoutAndPaint(1);
diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.cpp b/third_party/WebKit/Source/core/paint/PaintTiming.cpp index 60923e0c..6594030 100644 --- a/third_party/WebKit/Source/core/paint/PaintTiming.cpp +++ b/third_party/WebKit/Source/core/paint/PaintTiming.cpp
@@ -83,10 +83,10 @@ notifyPaintTimingChanged(); } -void PaintTiming::markFirstMeaningfulPaintCandidate() { +void PaintTiming::setFirstMeaningfulPaintCandidate(double timestamp) { if (m_firstMeaningfulPaintCandidate) return; - m_firstMeaningfulPaintCandidate = monotonicallyIncreasingTime(); + m_firstMeaningfulPaintCandidate = timestamp; if (frame() && frame()->view() && !frame()->view()->parent()) { frame()->frameScheduler()->onFirstMeaningfulPaint(); }
diff --git a/third_party/WebKit/Source/core/paint/PaintTiming.h b/third_party/WebKit/Source/core/paint/PaintTiming.h index 878401e..81f8f75 100644 --- a/third_party/WebKit/Source/core/paint/PaintTiming.h +++ b/third_party/WebKit/Source/core/paint/PaintTiming.h
@@ -43,7 +43,7 @@ void markFirstTextPaint(); void markFirstImagePaint(); - void markFirstMeaningfulPaintCandidate(); + void setFirstMeaningfulPaintCandidate(double timestamp); void setFirstMeaningfulPaint(double stamp); void notifyPaint(bool isFirstPaint, bool textPainted, bool imagePainted);
diff --git a/third_party/WebKit/Source/core/svg/SVGAElement.cpp b/third_party/WebKit/Source/core/svg/SVGAElement.cpp index a4e7c547..a208607b4 100644 --- a/third_party/WebKit/Source/core/svg/SVGAElement.cpp +++ b/third_party/WebKit/Source/core/svg/SVGAElement.cpp
@@ -43,7 +43,7 @@ #include "core/page/ChromeClient.h" #include "core/page/Page.h" #include "core/svg/animation/SVGSMILElement.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index 7d85b33..d88d522 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -139,8 +139,8 @@ #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/network/NetworkStateNotifier.h" -#include "platform/network/ResourceLoadPriority.h" #include "platform/scroll/ProgrammaticScrollAnimator.h" #include "platform/scroll/ScrollbarTheme.h" #include "platform/testing/URLTestHelpers.h"
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp index 59e504ae..2834a27 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceBase.cpp +++ b/third_party/WebKit/Source/core/timing/PerformanceBase.cpp
@@ -31,6 +31,7 @@ #include "core/timing/PerformanceBase.h" +#include <algorithm> #include "core/dom/Document.h" #include "core/dom/DocumentTiming.h" #include "core/events/Event.h" @@ -43,11 +44,10 @@ #include "core/timing/PerformanceResourceTiming.h" #include "core/timing/PerformanceUserTiming.h" #include "platform/RuntimeEnabledFeatures.h" -#include "platform/network/ResourceResponse.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceResponse.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/CurrentTime.h" -#include <algorithm> namespace blink {
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp index 2cbe0464..b217ed0 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp +++ b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp
@@ -13,7 +13,7 @@ #include "core/timing/PerformanceLongTaskTiming.h" #include "core/timing/PerformanceObserver.h" #include "core/timing/PerformanceObserverInit.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "testing/gtest/include/gtest/gtest.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp b/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp index 3b4eb06..723d74c 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp +++ b/third_party/WebKit/Source/core/timing/PerformanceResourceTiming.cpp
@@ -33,9 +33,9 @@ #include "bindings/core/v8/V8ObjectBuilder.h" #include "core/timing/PerformanceBase.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" namespace blink {
diff --git a/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp b/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp index d659edee..664de6f 100644 --- a/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp +++ b/third_party/WebKit/Source/core/timing/PerformanceTiming.cpp
@@ -42,8 +42,8 @@ #include "core/loader/FrameLoader.h" #include "core/paint/PaintTiming.h" #include "core/timing/PerformanceBase.h" -#include "platform/network/ResourceLoadTiming.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceLoadTiming.h" +#include "platform/loader/fetch/ResourceResponse.h" // Legacy support for NT1(https://www.w3.org/TR/navigation-timing/). namespace blink {
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp index 53bc069..913cdda1 100644 --- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp +++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.cpp
@@ -36,9 +36,9 @@ #include "core/origin_trials/OriginTrialContext.h" #include "core/workers/WorkerGlobalScope.h" #include "platform/HTTPNames.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/ContentSecurityPolicyResponseHeaders.h" #include "platform/network/NetworkUtils.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebAddressSpace.h" #include "public/platform/WebURLRequest.h"
diff --git a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h index 32b656e..5a52758 100644 --- a/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h +++ b/third_party/WebKit/Source/core/workers/WorkerScriptLoader.h
@@ -28,10 +28,11 @@ #ifndef WorkerScriptLoader_h #define WorkerScriptLoader_h +#include <memory> #include "core/CoreExport.h" #include "core/loader/ThreadableLoader.h" #include "core/loader/ThreadableLoaderClient.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "public/platform/WebAddressSpace.h" #include "public/platform/WebURLRequest.h" @@ -40,7 +41,6 @@ #include "wtf/PassRefPtr.h" #include "wtf/RefCounted.h" #include "wtf/text/StringBuilder.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp b/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp index 88284a9a0..fc6b5d6 100644 --- a/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp +++ b/third_party/WebKit/Source/core/xml/XSLTProcessorLibxslt.cpp
@@ -22,6 +22,10 @@ #include "core/xml/XSLTProcessor.h" +#include <libxslt/imports.h> +#include <libxslt/security.h> +#include <libxslt/variables.h> +#include <libxslt/xsltutils.h> #include "bindings/core/v8/SourceLocation.h" #include "core/dom/Document.h" #include "core/dom/TransformSource.h" @@ -38,20 +42,16 @@ #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/RawResource.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/Assertions.h" #include "wtf/allocator/Partitions.h" #include "wtf/text/CString.h" #include "wtf/text/StringBuffer.h" #include "wtf/text/UTF8.h" -#include <libxslt/imports.h> -#include <libxslt/security.h> -#include <libxslt/variables.h> -#include <libxslt/xsltutils.h> namespace blink {
diff --git a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp index 9cd21b6..3d0885d 100644 --- a/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp +++ b/third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
@@ -26,6 +26,11 @@ #include "core/xml/parser/XMLDocumentParser.h" +#include <libxml/catalog.h> +#include <libxml/parser.h> +#include <libxml/parserInternals.h> +#include <libxslt/xslt.h> +#include <memory> #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptController.h" #include "bindings/core/v8/ScriptSourceCode.h" @@ -61,10 +66,10 @@ #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/RawResource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/AutoReset.h" #include "wtf/PtrUtil.h" @@ -72,11 +77,6 @@ #include "wtf/Threading.h" #include "wtf/Vector.h" #include "wtf/text/UTF8.h" -#include <libxml/catalog.h> -#include <libxml/parser.h> -#include <libxml/parserInternals.h> -#include <libxslt/xslt.h> -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp index 7a5f9b9..de75c7a 100644 --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -69,12 +69,12 @@ #include "platform/loader/fetch/CrossOriginAccessControl.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" #include "platform/loader/fetch/FetchUtils.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/HTTPParsers.h" #include "platform/network/NetworkLog.h" #include "platform/network/ParsedContentType.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h" #include "platform/weborigin/Suborigin.h"
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h index 41ea869f..e76fea7f 100644 --- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h +++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.h
@@ -23,6 +23,7 @@ #ifndef XMLHttpRequest_h #define XMLHttpRequest_h +#include <memory> #include "bindings/core/v8/ActiveScriptWrappable.h" #include "bindings/core/v8/ScriptString.h" #include "bindings/core/v8/ScriptWrappable.h" @@ -34,9 +35,9 @@ #include "core/xmlhttprequest/XMLHttpRequestEventTarget.h" #include "core/xmlhttprequest/XMLHttpRequestProgressEventThrottle.h" #include "platform/heap/Handle.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/EncodedFormData.h" #include "platform/network/HTTPHeaderMap.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/Forward.h" @@ -44,7 +45,6 @@ #include "wtf/RefPtr.h" #include "wtf/text/AtomicString.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp index 8381bd62..a590923 100644 --- a/third_party/WebKit/Source/modules/eventsource/EventSource.cpp +++ b/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
@@ -32,6 +32,7 @@ #include "modules/eventsource/EventSource.h" +#include <memory> #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptController.h" #include "bindings/core/v8/SerializedScriptValue.h" @@ -51,13 +52,12 @@ #include "core/loader/ThreadableLoader.h" #include "modules/eventsource/EventSourceInit.h" #include "platform/HTTPNames.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebURLRequest.h" #include "wtf/text/StringBuilder.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp index 66849a6..0a9e922 100644 --- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp +++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumer.cpp
@@ -10,8 +10,8 @@ #include "platform/blob/BlobRegistry.h" #include "platform/blob/BlobURL.h" #include "platform/loader/fetch/FetchInitiatorTypeNames.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h"
diff --git a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp index e483ae67..24e302b 100644 --- a/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp +++ b/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
@@ -10,9 +10,9 @@ #include "modules/fetch/BytesConsumerTestUtil.h" #include "modules/fetch/DataConsumerHandleTestUtil.h" #include "platform/blob/BlobData.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/EncodedFormData.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceResponse.h" #include "platform/testing/UnitTestHelpers.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/Vector.h"
diff --git a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp index 6b443d3..39fa98f 100644 --- a/third_party/WebKit/Source/modules/fetch/FetchManager.cpp +++ b/third_party/WebKit/Source/modules/fetch/FetchManager.cpp
@@ -4,6 +4,7 @@ #include "modules/fetch/FetchManager.h" +#include <memory> #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/ScriptPromiseResolver.h" #include "bindings/core/v8/ScriptState.h" @@ -30,10 +31,10 @@ #include "modules/fetch/ResponseInit.h" #include "platform/HTTPNames.h" #include "platform/loader/fetch/FetchUtils.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/NetworkUtils.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityOrigin.h" @@ -43,7 +44,6 @@ #include "wtf/HashSet.h" #include "wtf/Vector.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp b/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp index f13a083..addc2ed 100644 --- a/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp +++ b/third_party/WebKit/Source/modules/fetch/FetchRequestData.cpp
@@ -14,7 +14,7 @@ #include "modules/fetch/FetchHeaderList.h" #include "platform/HTTPNames.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebURLRequest.h" #include "public/platform/modules/serviceworker/WebServiceWorkerRequest.h"
diff --git a/third_party/WebKit/Source/modules/fetch/Request.cpp b/third_party/WebKit/Source/modules/fetch/Request.cpp index c5619f07..666857c 100644 --- a/third_party/WebKit/Source/modules/fetch/Request.cpp +++ b/third_party/WebKit/Source/modules/fetch/Request.cpp
@@ -15,8 +15,8 @@ #include "platform/RuntimeEnabledFeatures.h" #include "platform/loader/fetch/FetchUtils.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceRequest.h" #include "platform/weborigin/OriginAccessEntry.h" #include "platform/weborigin/Referrer.h" #include "public/platform/WebURLRequest.h"
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp index 9682179..08af273 100644 --- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp +++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoader.cpp
@@ -4,21 +4,21 @@ #include "modules/notifications/NotificationImageLoader.h" +#include <memory> #include "core/dom/ExecutionContext.h" #include "platform/Histogram.h" #include "platform/image-decoders/ImageDecoder.h" #include "platform/image-decoders/ImageFrame.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "public/platform/WebURLRequest.h" #include "public/platform/modules/notifications/WebNotificationConstants.h" #include "skia/ext/image_operations.h" #include "wtf/CurrentTime.h" #include "wtf/Threading.h" -#include <memory> #define NOTIFICATION_PER_TYPE_HISTOGRAM_COUNTS(metric, type_name, value, max) \ case NotificationImageLoader::Type::type_name: { \
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp index 0a0aa43c..ac5d73a0 100644 --- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp +++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp
@@ -30,6 +30,8 @@ #include "modules/serviceworkers/ServiceWorkerGlobalScope.h" +#include <memory> +#include <utility> #include "bindings/core/v8/CallbackPromiseAdapter.h" #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptPromiseResolver.h" @@ -56,14 +58,12 @@ #include "platform/Histogram.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "public/platform/Platform.h" #include "public/platform/WebURL.h" #include "wtf/CurrentTime.h" #include "wtf/PtrUtil.h" -#include <memory> -#include <utility> namespace blink {
diff --git a/third_party/WebKit/Source/platform/BUILD.gn b/third_party/WebKit/Source/platform/BUILD.gn index ba5ff4b..358bd51 100644 --- a/third_party/WebKit/Source/platform/BUILD.gn +++ b/third_party/WebKit/Source/platform/BUILD.gn
@@ -1125,16 +1125,6 @@ "network/NetworkUtils.h", "network/ParsedContentType.cpp", "network/ParsedContentType.h", - "network/ResourceError.cpp", - "network/ResourceError.h", - "network/ResourceLoadTiming.cpp", - "network/ResourceLoadTiming.h", - "network/ResourceRequest.cpp", - "network/ResourceRequest.h", - "network/ResourceResponse.cpp", - "network/ResourceResponse.h", - "network/ResourceTimingInfo.cpp", - "network/ResourceTimingInfo.h", "network/WebSocketHandshakeRequest.cpp", "network/WebSocketHandshakeRequest.h", "network/WebSocketHandshakeResponse.cpp", @@ -1760,7 +1750,6 @@ "network/NetworkStateNotifierTest.cpp", "network/NetworkUtilsTest.cpp", "network/ParsedContentTypeTest.cpp", - "network/ResourceRequestTest.cpp", "network/mime/MIMETypeRegistryTest.cpp", "scheduler/base/intrusive_heap_unittest.cc", "scheduler/base/queueing_time_estimator_unittest.cc", @@ -2065,7 +2054,9 @@ "graphics/test/FakeGLES2Interface.h", "graphics/test/FakeWebGraphicsContext3DProvider.h", "graphics/test/MockImageDecoder.h", - "network/ResourceResponseTest.cpp", + + # TODO(toyoshim): Remove Platform dependency and move to loader/BUILD.gn + "loader/fetch/ResourceResponseTest.cpp", ] configs += [
diff --git a/third_party/WebKit/Source/platform/CrossThreadCopier.cpp b/third_party/WebKit/Source/platform/CrossThreadCopier.cpp index 79509a0..4d70708 100644 --- a/third_party/WebKit/Source/platform/CrossThreadCopier.cpp +++ b/third_party/WebKit/Source/platform/CrossThreadCopier.cpp
@@ -30,12 +30,12 @@ #include "platform/CrossThreadCopier.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include <memory> +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/exported/WebHTTPLoadInfo.cpp b/third_party/WebKit/Source/platform/exported/WebHTTPLoadInfo.cpp index 47106110..f4a3c735 100644 --- a/third_party/WebKit/Source/platform/exported/WebHTTPLoadInfo.cpp +++ b/third_party/WebKit/Source/platform/exported/WebHTTPLoadInfo.cpp
@@ -30,7 +30,7 @@ #include "public/platform/WebHTTPLoadInfo.h" -#include "platform/network/ResourceLoadInfo.h" +#include "platform/loader/fetch/ResourceLoadInfo.h" #include "public/platform/WebHTTPHeaderVisitor.h" #include "public/platform/WebString.h"
diff --git a/third_party/WebKit/Source/platform/exported/WebURLError.cpp b/third_party/WebKit/Source/platform/exported/WebURLError.cpp index d3993a4..be5451c0 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLError.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLError.cpp
@@ -30,7 +30,7 @@ #include "public/platform/WebURLError.h" -#include "platform/network/ResourceError.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/weborigin/KURL.h" namespace blink {
diff --git a/third_party/WebKit/Source/platform/exported/WebURLLoadTiming.cpp b/third_party/WebKit/Source/platform/exported/WebURLLoadTiming.cpp index 453f84e..e514187 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLLoadTiming.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLLoadTiming.cpp
@@ -30,7 +30,7 @@ #include "public/platform/WebURLLoadTiming.h" -#include "platform/network/ResourceLoadTiming.h" +#include "platform/loader/fetch/ResourceLoadTiming.h" #include "public/platform/WebString.h" namespace blink {
diff --git a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp index 88b0ea0..f425424 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLRequest.cpp
@@ -30,8 +30,9 @@ #include "public/platform/WebURLRequest.h" +#include <memory> #include "platform/RuntimeEnabledFeatures.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebCachePolicy.h" #include "public/platform/WebHTTPBody.h" #include "public/platform/WebHTTPHeaderVisitor.h" @@ -40,7 +41,6 @@ #include "wtf/Allocator.h" #include "wtf/Noncopyable.h" #include "wtf/PtrUtil.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp index 852323a..5d644c4 100644 --- a/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp +++ b/third_party/WebKit/Source/platform/exported/WebURLResponse.cpp
@@ -30,8 +30,9 @@ #include "public/platform/WebURLResponse.h" -#include "platform/network/ResourceLoadTiming.h" -#include "platform/network/ResourceResponse.h" +#include <memory> +#include "platform/loader/fetch/ResourceLoadTiming.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "public/platform/WebHTTPHeaderVisitor.h" #include "public/platform/WebHTTPLoadInfo.h" #include "public/platform/WebString.h" @@ -41,7 +42,6 @@ #include "wtf/Assertions.h" #include "wtf/PtrUtil.h" #include "wtf/RefPtr.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/loader/BUILD.gn b/third_party/WebKit/Source/platform/loader/BUILD.gn index 0696c63..2ce1c3b 100644 --- a/third_party/WebKit/Source/platform/loader/BUILD.gn +++ b/third_party/WebKit/Source/platform/loader/BUILD.gn
@@ -46,13 +46,25 @@ "fetch/Resource.h", "fetch/ResourceClient.h", "fetch/ResourceClientWalker.h", + "fetch/ResourceError.cpp", + "fetch/ResourceError.h", "fetch/ResourceFetcher.cpp", "fetch/ResourceFetcher.h", + "fetch/ResourceLoadInfo.h", + "fetch/ResourceLoadPriority.h", + "fetch/ResourceLoadTiming.cpp", + "fetch/ResourceLoadTiming.h", "fetch/ResourceLoader.cpp", "fetch/ResourceLoader.h", "fetch/ResourceLoaderOptions.h", "fetch/ResourceLoadingLog.h", + "fetch/ResourceRequest.cpp", + "fetch/ResourceRequest.h", + "fetch/ResourceResponse.cpp", + "fetch/ResourceResponse.h", "fetch/ResourceStatus.h", + "fetch/ResourceTimingInfo.cpp", + "fetch/ResourceTimingInfo.h", "fetch/SubstituteData.h", "fetch/UniqueIdentifier.cpp", "fetch/UniqueIdentifier.h", @@ -79,6 +91,7 @@ public_deps = [ "//base", + "//net", "//skia", "//third_party/icu", "//v8", @@ -102,6 +115,7 @@ "fetch/RawResourceTest.cpp", "fetch/ResourceFetcherTest.cpp", "fetch/ResourceLoaderOptionsTest.cpp", + "fetch/ResourceRequestTest.cpp", "fetch/ResourceTest.cpp", ]
diff --git a/third_party/WebKit/Source/platform/loader/DEPS b/third_party/WebKit/Source/platform/loader/DEPS index 430408b1..09fce71 100644 --- a/third_party/WebKit/Source/platform/loader/DEPS +++ b/third_party/WebKit/Source/platform/loader/DEPS
@@ -1,3 +1,4 @@ include_rules = [ - "+components/link_header_util" # for LinkHeader.cpp + "+components/link_header_util", # for LinkHeader.cpp + "+net/base/net_errors.h" # for fetch/ResourceError.h ]
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp index c6df27b4..dbe3078 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.cpp
@@ -26,20 +26,20 @@ #include "platform/loader/fetch/CrossOriginAccessControl.h" +#include <algorithm> +#include <memory> #include "platform/loader/fetch/FetchUtils.h" #include "platform/loader/fetch/Resource.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/SchemeRegistry.h" #include "platform/weborigin/SecurityOrigin.h" #include "wtf/PtrUtil.h" #include "wtf/Threading.h" #include "wtf/text/AtomicString.h" #include "wtf/text/StringBuilder.h" -#include <algorithm> -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h index 9a7b077f..09964a2f 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h +++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControl.h
@@ -29,7 +29,7 @@ #include "platform/PlatformExport.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "wtf/Allocator.h" #include "wtf/Forward.h" #include "wtf/HashSet.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControlTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControlTest.cpp index 25388c8..eeb242b 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControlTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/CrossOriginAccessControlTest.cpp
@@ -4,7 +4,7 @@ #include "platform/loader/fetch/CrossOriginAccessControl.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityOrigin.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/RefPtr.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h index 5097526..e206102 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h +++ b/third_party/WebKit/Source/platform/loader/fetch/FetchContext.h
@@ -37,8 +37,8 @@ #include "platform/loader/fetch/FetchInitiatorInfo.h" #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/Resource.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "wtf/Forward.h" #include "wtf/Noncopyable.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h b/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h index 7389bfc..71eb3e82 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h +++ b/third_party/WebKit/Source/platform/loader/fetch/FetchRequest.h
@@ -32,7 +32,7 @@ #include "platform/loader/fetch/FetchInitiatorInfo.h" #include "platform/loader/fetch/IntegrityMetadata.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "wtf/Allocator.h" #include "wtf/text/AtomicString.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp index 8804372..1bfa2c03 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp
@@ -35,9 +35,9 @@ #include "platform/loader/fetch/RawResource.h" #include "platform/loader/fetch/Resource.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/loader/testing/MockFetchContext.h" #include "platform/loader/testing/MockResource.h" -#include "platform/network/ResourceRequest.h" #include "platform/testing/TestingPlatformSupport.h" #include "testing/gtest/include/gtest/gtest.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp index 787cf010..6ed93045 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheTest.cpp
@@ -31,8 +31,8 @@ #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/RawResource.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/loader/testing/MockResourceClient.h" -#include "platform/network/ResourceRequest.h" #include "platform/testing/TestingPlatformSupport.h" #include "platform/testing/UnitTestHelpers.h" #include "public/platform/Platform.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp index 332df86..8632f5f 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp
@@ -34,7 +34,7 @@ #include "platform/heap/Handle.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/testing/TestingPlatformSupport.h" #include "platform/testing/UnitTestHelpers.h" #include "public/platform/Platform.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/Resource.h b/third_party/WebKit/Source/platform/loader/fetch/Resource.h index 8c0645f..cbd4c0f7 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/Resource.h +++ b/third_party/WebKit/Source/platform/loader/fetch/Resource.h
@@ -24,6 +24,7 @@ #ifndef Resource_h #define Resource_h +#include <memory> #include "platform/MemoryCoordinator.h" #include "platform/PlatformExport.h" #include "platform/SharedBuffer.h" @@ -31,12 +32,12 @@ #include "platform/instrumentation/tracing/web_process_memory_dump.h" #include "platform/loader/fetch/CachedMetadataHandler.h" #include "platform/loader/fetch/IntegrityMetadata.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/loader/fetch/ResourceStatus.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "public/platform/WebDataConsumerHandle.h" #include "wtf/Allocator.h" #include "wtf/AutoReset.h" @@ -44,7 +45,6 @@ #include "wtf/HashSet.h" #include "wtf/text/AtomicString.h" #include "wtf/text/WTFString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/network/ResourceError.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceError.cpp similarity index 97% rename from third_party/WebKit/Source/platform/network/ResourceError.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceError.cpp index 7c6e304..3a9b99fc1 100644 --- a/third_party/WebKit/Source/platform/network/ResourceError.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceError.cpp
@@ -24,9 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "platform/network/ResourceError.h" +#include "platform/loader/fetch/ResourceError.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/weborigin/KURL.h" #include "public/platform/Platform.h" #include "public/platform/WebURL.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceError.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceError.h similarity index 98% rename from third_party/WebKit/Source/platform/network/ResourceError.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceError.h index 93d7e5e..9e8f1c50 100644 --- a/third_party/WebKit/Source/platform/network/ResourceError.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceError.h
@@ -27,11 +27,12 @@ #ifndef ResourceError_h #define ResourceError_h +// TODO(toyoshim): Move net/base inclusion from header file. +#include <iosfwd> #include "net/base/net_errors.h" #include "platform/PlatformExport.h" #include "wtf/Allocator.h" #include "wtf/text/WTFString.h" -#include <iosfwd> namespace blink {
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp index c9fb59c2..1d35e159 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp
@@ -36,12 +36,12 @@ #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/ResourceLoader.h" #include "platform/loader/fetch/ResourceLoadingLog.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/loader/fetch/UniqueIdentifier.h" #include "platform/mhtml/ArchiveResource.h" #include "platform/mhtml/MHTMLArchive.h" #include "platform/network/NetworkInstrumentation.h" #include "platform/network/NetworkUtils.h" -#include "platform/network/ResourceTimingInfo.h" #include "platform/weborigin/KnownPorts.h" #include "platform/weborigin/SecurityOrigin.h" #include "platform/weborigin/SecurityPolicy.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h index 424c52b3..cba60d9 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.h
@@ -27,21 +27,21 @@ #ifndef ResourceFetcher_h #define ResourceFetcher_h +#include <memory> #include "platform/PlatformExport.h" #include "platform/Timer.h" #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/FetchInitiatorInfo.h" #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceError.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" #include "platform/loader/fetch/SubstituteData.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceLoadPriority.h" #include "wtf/HashMap.h" #include "wtf/HashSet.h" #include "wtf/ListHashSet.h" #include "wtf/text/StringHash.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp index 697e1932..cf04620d 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcherTest.cpp
@@ -41,14 +41,14 @@ #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/MemoryCache.h" #include "platform/loader/fetch/RawResource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceLoader.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/loader/testing/FetchTestingPlatformSupport.h" #include "platform/loader/testing/MockFetchContext.h" #include "platform/loader/testing/MockResource.h" #include "platform/loader/testing/MockResourceClient.h" -#include "platform/network/ResourceError.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceTimingInfo.h" #include "platform/scheduler/test/fake_web_task_runner.h" #include "platform/testing/TestingPlatformSupport.h" #include "platform/testing/URLTestHelpers.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceLoadInfo.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoadInfo.h similarity index 100% rename from third_party/WebKit/Source/platform/network/ResourceLoadInfo.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceLoadInfo.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceLoadPriority.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoadPriority.h similarity index 100% rename from third_party/WebKit/Source/platform/network/ResourceLoadPriority.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceLoadPriority.h
diff --git a/third_party/WebKit/Source/platform/network/ResourceLoadTiming.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoadTiming.cpp similarity index 98% rename from third_party/WebKit/Source/platform/network/ResourceLoadTiming.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceLoadTiming.cpp index 60802bc..f542c68 100644 --- a/third_party/WebKit/Source/platform/network/ResourceLoadTiming.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoadTiming.cpp
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "platform/network/ResourceLoadTiming.h" +#include "platform/loader/fetch/ResourceLoadTiming.h" #include "platform/instrumentation/tracing/TraceEvent.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceLoadTiming.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoadTiming.h similarity index 100% rename from third_party/WebKit/Source/platform/network/ResourceLoadTiming.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceLoadTiming.h
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp index 3356215..67e8d61 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.cpp
@@ -35,9 +35,9 @@ #include "platform/loader/fetch/CrossOriginAccessControl.h" #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/Resource.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" #include "platform/network/NetworkInstrumentation.h" -#include "platform/network/ResourceError.h" #include "platform/weborigin/SecurityViolationReportingPolicy.h" #include "public/platform/Platform.h" #include "public/platform/WebCachePolicy.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h index 94a3c53..91fb9eaa 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceLoader.h
@@ -29,13 +29,13 @@ #ifndef ResourceLoader_h #define ResourceLoader_h +#include <memory> #include "platform/PlatformExport.h" #include "platform/loader/fetch/ResourceLoaderOptions.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "public/platform/WebURLLoader.h" #include "public/platform/WebURLLoaderClient.h" #include "wtf/Forward.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp similarity index 99% rename from third_party/WebKit/Source/platform/network/ResourceRequest.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp index 0637ae06..0ba9cd2 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.cpp
@@ -24,8 +24,9 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include <memory> #include "platform/HTTPNames.h" #include "platform/RuntimeEnabledFeatures.h" #include "platform/network/NetworkUtils.h" @@ -34,7 +35,6 @@ #include "public/platform/WebCachePolicy.h" #include "public/platform/WebURLRequest.h" #include "wtf/PtrUtil.h" -#include <memory> namespace blink { @@ -384,10 +384,11 @@ } const CacheControlHeader& ResourceRequest::cacheControlHeader() const { - if (!m_cacheControlHeaderCache.parsed) + if (!m_cacheControlHeaderCache.parsed) { m_cacheControlHeaderCache = parseCacheControlDirectives( m_httpHeaderFields.get(HTTPNames::Cache_Control), m_httpHeaderFields.get(HTTPNames::Pragma)); + } return m_cacheControlHeaderCache; }
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequest.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h similarity index 98% rename from third_party/WebKit/Source/platform/network/ResourceRequest.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h index 8c1f927c..6a678686 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequest.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequest.h
@@ -28,18 +28,18 @@ #ifndef ResourceRequest_h #define ResourceRequest_h +#include <memory> #include "platform/HTTPNames.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" #include "platform/network/EncodedFormData.h" #include "platform/network/HTTPHeaderMap.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceLoadPriority.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/Referrer.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/WebAddressSpace.h" #include "public/platform/WebURLRequest.h" #include "wtf/RefCounted.h" -#include <memory> namespace blink { @@ -88,7 +88,7 @@ bool isEmpty() const; const KURL& url() const; - void setURL(const KURL& url); + void setURL(const KURL&); void removeUserAndPassFromURL(); @@ -99,7 +99,7 @@ void setTimeoutInterval(double); const KURL& firstPartyForCookies() const; - void setFirstPartyForCookies(const KURL& firstPartyForCookies); + void setFirstPartyForCookies(const KURL&); PassRefPtr<SecurityOrigin> requestorOrigin() const; void setRequestorOrigin(PassRefPtr<SecurityOrigin>);
diff --git a/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequestTest.cpp similarity index 98% rename from third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceRequestTest.cpp index b6359bd..134c540 100644 --- a/third_party/WebKit/Source/platform/network/ResourceRequestTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceRequestTest.cpp
@@ -2,8 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include <memory> #include "platform/network/EncodedFormData.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/Referrer.h" @@ -11,7 +12,6 @@ #include "public/platform/WebURLRequest.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/text/AtomicString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.cpp similarity index 99% rename from third_party/WebKit/Source/platform/network/ResourceResponse.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.cpp index 8517599..ca4251cc 100644 --- a/third_party/WebKit/Source/platform/network/ResourceResponse.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.cpp
@@ -24,7 +24,7 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/HTTPNames.h" #include "platform/network/HTTPParsers.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponse.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.h similarity index 99% rename from third_party/WebKit/Source/platform/network/ResourceResponse.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.h index 712228c..ae4c711e 100644 --- a/third_party/WebKit/Source/platform/network/ResourceResponse.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponse.h
@@ -29,10 +29,10 @@ #include "platform/PlatformExport.h" #include "platform/blob/BlobData.h" +#include "platform/loader/fetch/ResourceLoadInfo.h" +#include "platform/loader/fetch/ResourceLoadTiming.h" #include "platform/network/HTTPHeaderMap.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceLoadInfo.h" -#include "platform/network/ResourceLoadTiming.h" #include "platform/weborigin/KURL.h" #include "public/platform/WebURLResponse.h" #include "public/platform/modules/serviceworker/WebServiceWorkerResponseType.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponseTest.cpp similarity index 98% rename from third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceResponseTest.cpp index 573b827..492704b 100644 --- a/third_party/WebKit/Source/platform/network/ResourceResponseTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceResponseTest.cpp
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/CrossThreadFunctional.h" #include "platform/WebTaskRunner.h"
diff --git a/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp index a887e42..445172d 100644 --- a/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp
@@ -6,8 +6,8 @@ #include "platform/SharedBuffer.h" #include "platform/loader/fetch/RawResource.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/testing/TestingPlatformSupport.h" #include "platform/testing/URLTestHelpers.h" #include "public/platform/Platform.h"
diff --git a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.cpp b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.cpp similarity index 97% rename from third_party/WebKit/Source/platform/network/ResourceTimingInfo.cpp rename to third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.cpp index 9372db1..47d233d 100644 --- a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.cpp +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.cpp
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" +#include <memory> #include "platform/CrossThreadCopier.h" #include "wtf/PtrUtil.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h similarity index 97% rename from third_party/WebKit/Source/platform/network/ResourceTimingInfo.h rename to third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h index fc9b8d12..dda54b4 100644 --- a/third_party/WebKit/Source/platform/network/ResourceTimingInfo.h +++ b/third_party/WebKit/Source/platform/loader/fetch/ResourceTimingInfo.h
@@ -31,15 +31,15 @@ #ifndef ResourceTimingInfo_h #define ResourceTimingInfo_h +#include <memory> #include "platform/CrossThreadCopier.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "wtf/Allocator.h" #include "wtf/Functional.h" #include "wtf/Noncopyable.h" #include "wtf/PtrUtil.h" #include "wtf/text/AtomicString.h" -#include <memory> namespace blink {
diff --git a/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp b/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp index 1267a47..cb733df 100644 --- a/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp +++ b/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp
@@ -5,8 +5,8 @@ #include "platform/loader/testing/FetchTestingPlatformSupport.h" #include <memory> +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/testing/MockFetchContext.h" -#include "platform/network/ResourceError.h" #include "platform/testing/weburl_loader_mock_factory_impl.h" #include "public/platform/Platform.h" #include "public/platform/WebURL.h"
diff --git a/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h b/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h index 3fcbbba2..f95d5d8 100644 --- a/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h +++ b/third_party/WebKit/Source/platform/loader/testing/MockFetchContext.h
@@ -7,7 +7,7 @@ #include "platform/loader/fetch/FetchContext.h" #include "platform/loader/fetch/FetchRequest.h" -#include "platform/network/ResourceTimingInfo.h" +#include "platform/loader/fetch/ResourceTimingInfo.h" #include "platform/scheduler/test/fake_web_task_runner.h" #include "wtf/PtrUtil.h"
diff --git a/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.cpp b/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.cpp index 81b0db8..867d7dc 100644 --- a/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.cpp +++ b/third_party/WebKit/Source/platform/network/ContentSecurityPolicyResponseHeaders.cpp
@@ -26,7 +26,7 @@ #include "platform/network/ContentSecurityPolicyResponseHeaders.h" #include "platform/HTTPNames.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" namespace blink {
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp index 91b38a9..e0928aa 100644 --- a/third_party/WebKit/Source/platform/network/HTTPParsers.cpp +++ b/third_party/WebKit/Source/platform/network/HTTPParsers.cpp
@@ -35,7 +35,7 @@ #include "net/http/http_response_headers.h" #include "net/http/http_util.h" #include "platform/json/JSONParser.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/Suborigin.h" #include "public/platform/WebString.h" #include "wtf/DateMath.h"
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp b/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp index 1e5fe828..317485fe 100644 --- a/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp +++ b/third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp
@@ -5,7 +5,7 @@ #include "platform/network/HTTPParsers.h" #include "platform/heap/Handle.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/weborigin/Suborigin.h" #include "testing/gtest/include/gtest/gtest.h" #include "wtf/MathExtras.h"
diff --git a/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp index 0899461..a5b59cb 100644 --- a/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp +++ b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.cpp
@@ -6,8 +6,8 @@ #include "base/trace_event/trace_event.h" #include "platform/instrumentation/tracing/TracedValue.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceRequest.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceRequest.h" namespace network_instrumentation {
diff --git a/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h index e5c07ea0..39ccb39 100644 --- a/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h +++ b/third_party/WebKit/Source/platform/network/NetworkInstrumentation.h
@@ -6,7 +6,7 @@ #define NetworkInstrumentation_h #include "platform/PlatformExport.h" -#include "platform/network/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" namespace blink { class ResourceRequest;
diff --git a/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp b/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp index aae2ed5..68e35cbd 100644 --- a/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp +++ b/third_party/WebKit/Source/platform/testing/PlatformTestPrinters.cpp
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "platform/network/ResourceError.h" #include <ostream> +#include "platform/loader/fetch/ResourceError.h" // Pretty printer for gtest. // Each corresponding declaration should be placed in the header file of
diff --git a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp index 238a4001..7adbc552 100644 --- a/third_party/WebKit/Source/web/AssertMatchingEnums.cpp +++ b/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
@@ -69,10 +69,10 @@ #include "platform/FileSystemType.h" #include "platform/fonts/FontDescription.h" #include "platform/fonts/FontSmoothingMode.h" +#include "platform/loader/fetch/ResourceLoadPriority.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/mediastream/MediaStreamSource.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceLoadPriority.h" -#include "platform/network/ResourceResponse.h" #include "platform/scroll/ScrollTypes.h" #include "platform/text/TextChecking.h" #include "platform/text/TextDecoration.h"
diff --git a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp index f97298f..256070d 100644 --- a/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp +++ b/third_party/WebKit/Source/web/SharedWorkerRepositoryClientImpl.cpp
@@ -38,7 +38,7 @@ #include "core/frame/csp/ContentSecurityPolicy.h" #include "core/inspector/InspectorInstrumentation.h" #include "core/workers/SharedWorker.h" -#include "platform/network/ResourceResponse.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "public/platform/WebContentSecurityPolicy.h" #include "public/platform/WebMessagePortChannel.h" #include "public/platform/WebString.h"
diff --git a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp index 7c7e5adc..627ab987 100644 --- a/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp +++ b/third_party/WebKit/Source/web/WebAssociatedURLLoaderImpl.cpp
@@ -42,8 +42,8 @@ #include "platform/exported/WrappedResourceResponse.h" #include "platform/loader/fetch/CrossOriginAccessControl.h" #include "platform/loader/fetch/FetchUtils.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/network/HTTPParsers.h" -#include "platform/network/ResourceError.h" #include "public/platform/WebHTTPHeaderVisitor.h" #include "public/platform/WebString.h" #include "public/platform/WebURLError.h"
diff --git a/third_party/WebKit/Source/web/WebFrameSerializer.cpp b/third_party/WebKit/Source/web/WebFrameSerializer.cpp index 196b3032a..3b47ccd 100644 --- a/third_party/WebKit/Source/web/WebFrameSerializer.cpp +++ b/third_party/WebKit/Source/web/WebFrameSerializer.cpp
@@ -49,10 +49,10 @@ #include "platform/SerializedResource.h" #include "platform/SharedBuffer.h" #include "platform/instrumentation/tracing/TraceEvent.h" +#include "platform/loader/fetch/ResourceRequest.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/mhtml/MHTMLArchive.h" #include "platform/mhtml/MHTMLParser.h" -#include "platform/network/ResourceRequest.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "public/platform/WebString.h" #include "public/platform/WebURL.h"
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp index 7a78416..01a75f3 100644 --- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp +++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -176,8 +176,8 @@ #include "platform/heap/Handle.h" #include "platform/instrumentation/tracing/TraceEvent.h" #include "platform/loader/fetch/ResourceFetcher.h" +#include "platform/loader/fetch/ResourceRequest.h" #include "platform/loader/fetch/SubstituteData.h" -#include "platform/network/ResourceRequest.h" #include "platform/scroll/ScrollTypes.h" #include "platform/scroll/ScrollbarTheme.h" #include "platform/weborigin/KURL.h"
diff --git a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp index 8254729c..78a1b1af 100644 --- a/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp +++ b/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp
@@ -50,8 +50,8 @@ #include "platform/CrossThreadFunctional.h" #include "platform/heap/Handle.h" #include "platform/heap/Persistent.h" +#include "platform/loader/fetch/ResourceResponse.h" #include "platform/network/ContentSecurityPolicyParsers.h" -#include "platform/network/ResourceResponse.h" #include "platform/weborigin/KURL.h" #include "platform/weborigin/SecurityOrigin.h" #include "public/platform/Platform.h"
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp index 81c8b3c..b493b9f 100644 --- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -92,8 +92,8 @@ #include "platform/geometry/FloatRect.h" #include "platform/loader/fetch/FetchRequest.h" #include "platform/loader/fetch/MemoryCache.h" +#include "platform/loader/fetch/ResourceError.h" #include "platform/loader/fetch/ResourceFetcher.h" -#include "platform/network/ResourceError.h" #include "platform/scroll/Scrollbar.h" #include "platform/scroll/ScrollbarTestSuite.h" #include "platform/scroll/ScrollbarTheme.h"
diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h index e25f892..8ccb873c 100644 --- a/ui/base/clipboard/clipboard.h +++ b/ui/base/clipboard/clipboard.h
@@ -120,10 +120,6 @@ return false; } - static ClipboardType FromInt(int32_t type) { - return static_cast<ClipboardType>(type); - } - // Sets the list of threads that are allowed to access the clipboard. static void SetAllowedThreads( const std::vector<base::PlatformThreadId>& allowed_threads);