diff --git a/DEPS b/DEPS index ff0194a..436b542 100644 --- a/DEPS +++ b/DEPS
@@ -105,11 +105,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': '96aa535b782f31df0f063213c2958acba32a808d', + 'skia_revision': '846bb413e161cb556f1afdbf07f3e637bff44432', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': 'c9229d20d0c0a245c0a429cc8207b75a0aca49cb', + 'v8_revision': '4e454ce4b9534e4ada120486a56b099c46c72b6a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -117,7 +117,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling ANGLE # and whatever else without interference from each other. - 'angle_revision': '7df52383cfdf1a0f69c30fc237d0dbebc2bac353', + 'angle_revision': '4004ae0e033a0169de3cb53c0a036833ad47178a', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling build tools # and whatever else without interference from each other. @@ -129,7 +129,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling PDFium # and whatever else without interference from each other. - 'pdfium_revision': 'c765d2ac867611935cff6b5c5a2ff8575fe85162', + 'pdfium_revision': 'e005dc33c31a2e701e1af3a0a3e5775cabbf1ddd', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling openmax_dl # and whatever else without interference from each other. @@ -165,7 +165,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'f704817cbbab2484d0510a0b622fc93b68980cc5', + 'catapult_revision': 'f153b902bec3811dd5faa9e807240b059e7bbc8c', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other. @@ -518,7 +518,7 @@ # Build tools for Chrome OS. Note: This depends on third_party/pyelftools. 'src/third_party/chromite': { - 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + 'efd58885b78d39f3abfbad691689965a1c955f10', + 'url': Var('chromium_git') + '/chromiumos/chromite.git' + '@' + '9cccc5ce4fb9d6c2df820b14d5fc8350a98cd5b9', 'condition': 'checkout_linux', }, @@ -543,7 +543,7 @@ }, 'src/third_party/depot_tools': - Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '79d42dfb11746abb523643428926f2e745834d90', + Var('chromium_git') + '/chromium/tools/depot_tools.git' + '@' + '1cabdc464313eee47fdc52a95b3f8e028680000d', 'src/third_party/devtools-node-modules': Var('chromium_git') + '/external/github.com/ChromeDevTools/devtools-node-modules' + '@' + Var('devtools_node_modules_revision'), @@ -793,7 +793,7 @@ Var('chromium_git') + '/webm/libwebm.git' + '@' + '01c1d1d76f139345c442bfc8e61b4e1cba809059', 'src/third_party/libyuv': - Var('chromium_git') + '/libyuv/libyuv.git' + '@' + '780cdfed4eb271839d68bac9a91ffeae6083db76', # from r1711 + Var('chromium_git') + '/libyuv/libyuv.git' + '@' + 'bc383e76d6316cf7ca59c76d18d0d7e61f007780', # from r1711 'src/third_party/lighttpd': { 'url': Var('chromium_git') + '/chromium/deps/lighttpd.git' + '@' + Var('lighttpd_revision'), @@ -891,7 +891,7 @@ }, 'src/third_party/perfetto': - Var('android_git') + '/platform/external/perfetto.git' + '@' + '4ce4cb826374b59ba774a5b7387c046d1ca8f218', + Var('android_git') + '/platform/external/perfetto.git' + '@' + '0ff6498e4181c3e3589e59fa68bcbb5ba85672f3', 'src/third_party/perl': { 'url': Var('chromium_git') + '/chromium/deps/perl.git' + '@' + 'ac0d98b5cee6c024b0cffeb4f8f45b6fc5ccdb78', @@ -1010,7 +1010,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + '5e83981c2c44f24109b96b555d6865d481e0c609', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '790da37b72f96feb8d5309b4485ef3df54ffa2d1', + Var('webrtc_git') + '/src.git' + '@' + '66cadcc6b924f027afb60a9b5932d4af3dc6a1d5', 'src/third_party/xdg-utils': { 'url': Var('chromium_git') + '/chromium/deps/xdg-utils.git' + '@' + 'd80274d5869b17b8c9067a1022e4416ee7ed5e0d', @@ -1044,7 +1044,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@dd1a2724e60eb13deaad3c5f040846b908dc85da', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@208cf41c691bb5f5851630c661426bc5a880ba1a', 'condition': 'checkout_src_internal', },
diff --git a/ash/BUILD.gn b/ash/BUILD.gn index e41fdeaa..ff141c0 100644 --- a/ash/BUILD.gn +++ b/ash/BUILD.gn
@@ -122,14 +122,18 @@ "assistant/ui/dialog_plate/dialog_plate.h", "assistant/ui/logo_view/base_logo_view.cc", "assistant/ui/logo_view/base_logo_view.h", + "assistant/ui/main_stage/assistant_header_view.cc", + "assistant/ui/main_stage/assistant_header_view.h", + "assistant/ui/main_stage/assistant_main_stage.cc", + "assistant/ui/main_stage/assistant_main_stage.h", "assistant/ui/main_stage/assistant_query_view.cc", "assistant/ui/main_stage/assistant_query_view.h", "assistant/ui/main_stage/assistant_text_element_view.cc", "assistant/ui/main_stage/assistant_text_element_view.h", + "assistant/ui/main_stage/suggestion_container_view.cc", + "assistant/ui/main_stage/suggestion_container_view.h", "assistant/ui/main_stage/ui_element_container_view.cc", "assistant/ui/main_stage/ui_element_container_view.h", - "assistant/ui/suggestion_container_view.cc", - "assistant/ui/suggestion_container_view.h", "autoclick/autoclick_controller.cc", "autoclick/autoclick_controller.h", "cancel_mode.cc", @@ -1397,6 +1401,7 @@ "//ui/native_theme", "//ui/ozone", "//ui/platform_window", + "//ui/platform_window/mojo", "//ui/platform_window/stub", "//ui/snapshot", "//ui/wm/public",
diff --git a/ash/assistant/assistant_bubble_controller.cc b/ash/assistant/assistant_bubble_controller.cc index 53aee7d..e89613e 100644 --- a/ash/assistant/assistant_bubble_controller.cc +++ b/ash/assistant/assistant_bubble_controller.cc
@@ -81,15 +81,17 @@ case CaptionButtonId::kMinimize: UpdateUiMode(AssistantUiMode::kMiniUi); return true; - case CaptionButtonId::kSettings: - UpdateUiMode(AssistantUiMode::kWebUi); - return true; case CaptionButtonId::kClose: return false; } return false; } +void AssistantBubbleController::OnSettingsButtonPressed() { + // TODO(dmblack): Navigate to Assistant settings. + UpdateUiMode(AssistantUiMode::kWebUi); +} + bool AssistantBubbleController::IsVisible() const { return bubble_view_ && bubble_view_->GetWidget()->IsVisible(); }
diff --git a/ash/assistant/assistant_bubble_controller.h b/ash/assistant/assistant_bubble_controller.h index fa8b678..087efde9 100644 --- a/ash/assistant/assistant_bubble_controller.h +++ b/ash/assistant/assistant_bubble_controller.h
@@ -49,6 +49,9 @@ // CaptionBarDelegate: bool OnCaptionButtonPressed(CaptionButtonId id) override; + // Invoked on settings button pressed. + void OnSettingsButtonPressed(); + // Returns true if assistant bubble is visible, otherwise false. bool IsVisible() const;
diff --git a/ash/assistant/assistant_controller.cc b/ash/assistant/assistant_controller.cc index c1d53e54..e8ff4a5 100644 --- a/ash/assistant/assistant_controller.cc +++ b/ash/assistant/assistant_controller.cc
@@ -203,7 +203,7 @@ return; // When the user-facing interaction is dismissed, we instruct the service to - // terminate any listening, speaking, or query in flight. + // terminate any listening, speaking, or pending query. has_active_interaction_ = false; assistant_->StopActiveInteraction(); @@ -211,6 +211,14 @@ assistant_interaction_model_.SetInputModality(InputModality::kKeyboard); } +void AssistantController::OnCommittedQueryChanged( + const AssistantQuery& committed_query) { + // We clear the interaction when a query is committed, but need to retain + // the committed query as it is query that is currently being fulfilled. + assistant_interaction_model_.ClearInteraction( + /*retain_committed_query=*/true); +} + void AssistantController::OnHighlighterEnabledChanged( HighlighterEnabledState state) { assistant_interaction_model_.SetInputModality(InputModality::kStylus); @@ -227,18 +235,16 @@ return; // When switching to a non-voice input modality we instruct the underlying - // service to terminate any listening, speaking, or in flight voice query. We - // do not do this when switching to voice input modality because initiation of - // a voice interaction will automatically interrupt any pre-existing activity. + // service to terminate any listening, speaking, or pending voice query. We do + // not do this when switching to voice input modality because initiation of a + // voice interaction will automatically interrupt any pre-existing activity. // Stopping the active interaction here for voice input modality would // actually have the undesired effect of stopping the voice interaction. - if (assistant_interaction_model_.query().type() == + if (assistant_interaction_model_.pending_query().type() == AssistantQueryType::kVoice) { has_active_interaction_ = false; assistant_->StopActiveInteraction(); - - // Clear the interaction to reset the UI. - assistant_interaction_model_.ClearInteraction(); + assistant_interaction_model_.ClearPendingQuery(); } } @@ -270,8 +276,6 @@ const AssistantSuggestion* suggestion = assistant_interaction_model_.GetSuggestionById(id); - DCHECK(suggestion); - // If the suggestion contains a non-empty action url, we will handle the // suggestion chip pressed event by launching the action url in the browser. if (!suggestion->action_url.is_empty()) { @@ -282,11 +286,10 @@ // Otherwise, we will submit a simple text query using the suggestion text. const std::string text = suggestion->text; - assistant_interaction_model_.ClearInteraction(); - assistant_interaction_model_.SetQuery( + assistant_interaction_model_.SetPendingQuery( std::make_unique<AssistantTextQuery>(text)); + assistant_interaction_model_.CommitPendingQuery(); - DCHECK(assistant_); assistant_->SendTextQuery(text); } @@ -307,18 +310,18 @@ } void AssistantController::OnSpeechRecognitionStarted() { - assistant_interaction_model_.ClearInteraction(); assistant_interaction_model_.SetInputModality(InputModality::kVoice); assistant_interaction_model_.SetMicState(MicState::kOpen); - assistant_interaction_model_.SetQuery( + assistant_interaction_model_.SetPendingQuery( std::make_unique<AssistantVoiceQuery>()); } void AssistantController::OnSpeechRecognitionIntermediateResult( const std::string& high_confidence_text, const std::string& low_confidence_text) { - assistant_interaction_model_.SetQuery(std::make_unique<AssistantVoiceQuery>( - high_confidence_text, low_confidence_text)); + assistant_interaction_model_.SetPendingQuery( + std::make_unique<AssistantVoiceQuery>(high_confidence_text, + low_confidence_text)); } void AssistantController::OnSpeechRecognitionEndOfUtterance() { @@ -327,8 +330,9 @@ void AssistantController::OnSpeechRecognitionFinalResult( const std::string& final_result) { - assistant_interaction_model_.SetQuery( + assistant_interaction_model_.SetPendingQuery( std::make_unique<AssistantVoiceQuery>(final_result)); + assistant_interaction_model_.CommitPendingQuery(); } void AssistantController::OnSpeechLevelUpdated(float speech_level) { @@ -352,6 +356,11 @@ return; } + if (id == DialogPlateButtonId::kSettings) { + assistant_bubble_controller_->OnSettingsButtonPressed(); + return; + } + DCHECK_EQ(id, DialogPlateButtonId::kVoiceInputToggle); switch (assistant_interaction_model_.mic_state()) { @@ -361,26 +370,20 @@ case MicState::kOpen: has_active_interaction_ = false; assistant_->StopActiveInteraction(); - - // Clear the interaction to reset the UI. - assistant_interaction_model_.ClearInteraction(); break; } } void AssistantController::OnDialogPlateContentsCommitted( const std::string& text) { - // TODO(dmblack): Handle an empty text query more gracefully by showing a - // helpful message to the user. Currently we just reset state and pretend as - // if nothing happened. - if (text.empty()) { - assistant_interaction_model_.ClearInteraction(); + // TODO(dmblack): This case no longer makes sense now that the DialogPlate has + // been rebuilt. Remove the ability to commit empty DialogPlate contents. + if (text.empty()) return; - } - assistant_interaction_model_.ClearInteraction(); - assistant_interaction_model_.SetQuery( + assistant_interaction_model_.SetPendingQuery( std::make_unique<AssistantTextQuery>(text)); + assistant_interaction_model_.CommitPendingQuery(); assistant_->SendTextQuery(text); }
diff --git a/ash/assistant/assistant_controller.h b/ash/assistant/assistant_controller.h index 98918b8c..41e3cd7 100644 --- a/ash/assistant/assistant_controller.h +++ b/ash/assistant/assistant_controller.h
@@ -100,6 +100,7 @@ // AssistantInteractionModelObserver: void OnInputModalityChanged(InputModality input_modality) override; void OnInteractionStateChanged(InteractionState interaction_state) override; + void OnCommittedQueryChanged(const AssistantQuery& committed_query) override; // HighlighterController::Observer: void OnHighlighterEnabledChanged(HighlighterEnabledState state) override;
diff --git a/ash/assistant/model/assistant_interaction_model.cc b/ash/assistant/model/assistant_interaction_model.cc index 7c4b17e..4448e502 100644 --- a/ash/assistant/model/assistant_interaction_model.cc +++ b/ash/assistant/model/assistant_interaction_model.cc
@@ -11,7 +11,8 @@ namespace ash { AssistantInteractionModel::AssistantInteractionModel() - : query_(std::make_unique<AssistantEmptyQuery>()) {} + : committed_query_(std::make_unique<AssistantEmptyQuery>()), + pending_query_(std::make_unique<AssistantEmptyQuery>()) {} AssistantInteractionModel::~AssistantInteractionModel() = default; @@ -25,9 +26,12 @@ observers_.RemoveObserver(observer); } -void AssistantInteractionModel::ClearInteraction() { +void AssistantInteractionModel::ClearInteraction(bool retain_committed_query) { + if (!retain_committed_query) + ClearCommittedQuery(); + + ClearPendingQuery(); ClearUiElements(); - ClearQuery(); ClearSuggestions(); } @@ -56,6 +60,31 @@ NotifyMicStateChanged(); } +void AssistantInteractionModel::ClearCommittedQuery() { + committed_query_ = std::make_unique<AssistantEmptyQuery>(); + NotifyCommittedQueryCleared(); +} + +void AssistantInteractionModel::SetPendingQuery( + std::unique_ptr<AssistantQuery> pending_query) { + DCHECK(!pending_query->Empty()); + pending_query_ = std::move(pending_query); + NotifyPendingQueryChanged(); +} + +void AssistantInteractionModel::CommitPendingQuery() { + committed_query_ = std::move(pending_query_); + pending_query_ = std::make_unique<AssistantEmptyQuery>(); + + NotifyCommittedQueryChanged(); + NotifyPendingQueryCleared(); +} + +void AssistantInteractionModel::ClearPendingQuery() { + pending_query_ = std::make_unique<AssistantEmptyQuery>(); + NotifyPendingQueryCleared(); +} + void AssistantInteractionModel::AddUiElement( std::unique_ptr<AssistantUiElement> ui_element) { AssistantUiElement* ptr = ui_element.get(); @@ -68,18 +97,6 @@ NotifyUiElementsCleared(); } -void AssistantInteractionModel::SetQuery( - std::unique_ptr<AssistantQuery> query) { - DCHECK(query); - query_ = std::move(query); - NotifyQueryChanged(); -} - -void AssistantInteractionModel::ClearQuery() { - query_.reset(new AssistantEmptyQuery()); - NotifyQueryCleared(); -} - void AssistantInteractionModel::AddSuggestions( std::vector<AssistantSuggestionPtr> suggestions) { std::map<int, AssistantSuggestion*> ptrs; @@ -127,6 +144,26 @@ observer.OnMicStateChanged(mic_state_); } +void AssistantInteractionModel::NotifyCommittedQueryChanged() { + for (AssistantInteractionModelObserver& observer : observers_) + observer.OnCommittedQueryChanged(*committed_query_); +} + +void AssistantInteractionModel::NotifyCommittedQueryCleared() { + for (AssistantInteractionModelObserver& observer : observers_) + observer.OnCommittedQueryCleared(); +} + +void AssistantInteractionModel::NotifyPendingQueryChanged() { + for (AssistantInteractionModelObserver& observer : observers_) + observer.OnPendingQueryChanged(*pending_query_); +} + +void AssistantInteractionModel::NotifyPendingQueryCleared() { + for (AssistantInteractionModelObserver& observer : observers_) + observer.OnPendingQueryCleared(); +} + void AssistantInteractionModel::NotifyUiElementAdded( const AssistantUiElement* ui_element) { for (AssistantInteractionModelObserver& observer : observers_) @@ -138,16 +175,6 @@ observer.OnUiElementsCleared(); } -void AssistantInteractionModel::NotifyQueryChanged() { - for (AssistantInteractionModelObserver& observer : observers_) - observer.OnQueryChanged(*query_); -} - -void AssistantInteractionModel::NotifyQueryCleared() { - for (AssistantInteractionModelObserver& observer : observers_) - observer.OnQueryCleared(); -} - void AssistantInteractionModel::NotifySuggestionsAdded( const std::map<int, AssistantSuggestion*>& suggestions) { for (AssistantInteractionModelObserver& observer : observers_)
diff --git a/ash/assistant/model/assistant_interaction_model.h b/ash/assistant/model/assistant_interaction_model.h index ad222c9..d0fa83e 100644 --- a/ash/assistant/model/assistant_interaction_model.h +++ b/ash/assistant/model/assistant_interaction_model.h
@@ -56,8 +56,10 @@ void AddObserver(AssistantInteractionModelObserver* observer); void RemoveObserver(AssistantInteractionModelObserver* observer); - // Resets the interaction to its initial state. - void ClearInteraction(); + // Resets the interaction to its initial state. There are instances in which + // we wish to clear the interaction but retain the committed query. As such, + // |retain_committed_query| is provided but defaults to |false|. + void ClearInteraction(bool retain_committed_query = false); // Sets the interaction state. void SetInteractionState(InteractionState interaction_state); @@ -77,6 +79,24 @@ // Returns the mic state for the interaction. MicState mic_state() const { return mic_state_; } + // Returns the committed query for the interaction. + const AssistantQuery& committed_query() const { return *committed_query_; } + + // Clears the committed query for the interaction. + void ClearCommittedQuery(); + + // Updates the pending query for the interaction. + void SetPendingQuery(std::unique_ptr<AssistantQuery> pending_query); + + // Returns the pending query for the interaction. + const AssistantQuery& pending_query() const { return *pending_query_; } + + // Commits the pending query for the interaction. + void CommitPendingQuery(); + + // Clears the pending query for the interaction. + void ClearPendingQuery(); + // Adds the specified |ui_element| that should be rendered for the // interaction. void AddUiElement(std::unique_ptr<AssistantUiElement> ui_element); @@ -84,15 +104,6 @@ // Clears all UI elements for the interaction. void ClearUiElements(); - // Updates the query for the interaction. - void SetQuery(std::unique_ptr<AssistantQuery> query); - - // Returns the query for the interaction. - const AssistantQuery& query() const { return *query_; } - - // Clears the query for the interaction. - void ClearQuery(); - // Adds the specified |suggestions| that should be rendered for the // interaction. void AddSuggestions(std::vector<AssistantSuggestionPtr> suggestions); @@ -111,10 +122,12 @@ void NotifyInteractionStateChanged(); void NotifyInputModalityChanged(); void NotifyMicStateChanged(); + void NotifyCommittedQueryChanged(); + void NotifyCommittedQueryCleared(); + void NotifyPendingQueryChanged(); + void NotifyPendingQueryCleared(); void NotifyUiElementAdded(const AssistantUiElement* ui_element); void NotifyUiElementsCleared(); - void NotifyQueryChanged(); - void NotifyQueryCleared(); void NotifySuggestionsAdded( const std::map<int, AssistantSuggestion*>& suggestions); void NotifySuggestionsCleared(); @@ -123,7 +136,8 @@ InteractionState interaction_state_ = InteractionState::kInactive; InputModality input_modality_ = InputModality::kKeyboard; MicState mic_state_ = MicState::kClosed; - std::unique_ptr<AssistantQuery> query_; + std::unique_ptr<AssistantQuery> committed_query_; + std::unique_ptr<AssistantQuery> pending_query_; std::vector<AssistantSuggestionPtr> suggestions_; std::vector<std::unique_ptr<AssistantUiElement>> ui_element_list_;
diff --git a/ash/assistant/model/assistant_interaction_model_observer.h b/ash/assistant/model/assistant_interaction_model_observer.h index 2d5582d3..85bf7948 100644 --- a/ash/assistant/model/assistant_interaction_model_observer.h +++ b/ash/assistant/model/assistant_interaction_model_observer.h
@@ -42,18 +42,26 @@ // Invoked when the mic state associated with the interaction is changed. virtual void OnMicStateChanged(MicState mic_state) {} + // Invoked when the committed query associated with the interaction is + // changed. + virtual void OnCommittedQueryChanged(const AssistantQuery& committed_query) {} + + // Invoked when the committed query associated with the interaction is + // cleared. + virtual void OnCommittedQueryCleared() {} + + // Invoked when the pending query associated with the interaction is changed. + virtual void OnPendingQueryChanged(const AssistantQuery& pending_query) {} + + // Invoked when the pending query associated with the interaction is cleared. + virtual void OnPendingQueryCleared() {} + // Invoked when a UI element associated with the interaction is added. virtual void OnUiElementAdded(const AssistantUiElement* ui_element) {} // Invoked when all UI elements associated with the interaction are cleared. virtual void OnUiElementsCleared() {} - // Invoked when the query associated with the interaction is changed. - virtual void OnQueryChanged(const AssistantQuery& query) {} - - // Invoked when the query associated with the interaction is cleared. - virtual void OnQueryCleared() {} - // Invoked when the specified |suggestions| are added to the associated // interaction. The key for the map is the unique identifier by which the // interaction model identifies each suggestion before the next
diff --git a/ash/assistant/ui/assistant_main_view.cc b/ash/assistant/ui/assistant_main_view.cc index b2380a7..0a695720 100644 --- a/ash/assistant/ui/assistant_main_view.cc +++ b/ash/assistant/ui/assistant_main_view.cc
@@ -12,8 +12,7 @@ #include "ash/assistant/ui/assistant_ui_constants.h" #include "ash/assistant/ui/caption_bar.h" #include "ash/assistant/ui/dialog_plate/dialog_plate.h" -#include "ash/assistant/ui/main_stage/ui_element_container_view.h" -#include "ash/assistant/ui/suggestion_container_view.h" +#include "ash/assistant/ui/main_stage/assistant_main_stage.h" #include "ui/views/layout/box_layout.h" namespace ash { @@ -27,10 +26,6 @@ AssistantMainView::AssistantMainView(AssistantController* assistant_controller) : assistant_controller_(assistant_controller), - caption_bar_(new CaptionBar()), - ui_element_container_(new UiElementContainerView(assistant_controller)), - suggestions_container_(new SuggestionContainerView(assistant_controller)), - dialog_plate_(new DialogPlate(assistant_controller)), min_height_dip_(kMinHeightDip) { InitLayout(); @@ -62,13 +57,14 @@ void AssistantMainView::ChildPreferredSizeChanged(views::View* child) { PreferredSizeChanged(); - // We force a layout here because, though we are receiving a - // ChildPreferredSizeChanged event, it may be that the - // |ui_element_container_|'s bounds will not actually change due to the height - // restrictions imposed by AssistantMainView. When this is the case, we - // need to force a layout to see |ui_element_container_|'s new contents. - if (child == ui_element_container_) + // Even though the preferred size for |main_stage_| may change, its bounds + // may not actually change due to height restrictions imposed by its parent. + // For this reason, we need to explicitly trigger a layout pass so that the + // children of |main_stage_| are properly updated. + if (child == main_stage_) { Layout(); + SchedulePaint(); + } } void AssistantMainView::ChildVisibilityChanged(views::View* child) { @@ -81,18 +77,17 @@ views::BoxLayout::Orientation::kVertical)); // Caption bar. + caption_bar_ = new CaptionBar(); AddChildView(caption_bar_); - // UI element container. - AddChildView(ui_element_container_); + // Main stage. + main_stage_ = new AssistantMainStage(assistant_controller_); + AddChildView(main_stage_); - layout_manager->SetFlexForView(ui_element_container_, 1); - - // Suggestions container. - suggestions_container_->SetVisible(false); - AddChildView(suggestions_container_); + layout_manager->SetFlexForView(main_stage_, 1); // Dialog plate. + dialog_plate_ = new DialogPlate(assistant_controller_); AddChildView(dialog_plate_); }
diff --git a/ash/assistant/ui/assistant_main_view.h b/ash/assistant/ui/assistant_main_view.h index fcef35390..bb5b237 100644 --- a/ash/assistant/ui/assistant_main_view.h +++ b/ash/assistant/ui/assistant_main_view.h
@@ -12,10 +12,9 @@ namespace ash { class AssistantController; +class AssistantMainStage; class CaptionBar; class DialogPlate; -class SuggestionContainerView; -class UiElementContainerView; class AssistantMainView : public views::View, public AssistantInteractionModelObserver { @@ -39,9 +38,8 @@ AssistantController* const assistant_controller_; // Owned by Shell. CaptionBar* caption_bar_; // Owned by view hierarchy. - UiElementContainerView* ui_element_container_; // Owned by view hierarchy. - SuggestionContainerView* suggestions_container_; // Owned by view hierarchy. DialogPlate* dialog_plate_; // Owned by view hierarchy. + AssistantMainStage* main_stage_; // Owned by view hierarchy. int min_height_dip_;
diff --git a/ash/assistant/ui/assistant_ui_constants.h b/ash/assistant/ui/assistant_ui_constants.h index 6f41dce..cbeb697 100644 --- a/ash/assistant/ui/assistant_ui_constants.h +++ b/ash/assistant/ui/assistant_ui_constants.h
@@ -19,6 +19,7 @@ // Typography. constexpr SkColor kTextColorHint = gfx::kGoogleGrey500; constexpr SkColor kTextColorPrimary = gfx::kGoogleGrey900; +constexpr SkColor kTextColorSecondary = gfx::kGoogleGrey700; } // namespace ash
diff --git a/ash/assistant/ui/caption_bar.cc b/ash/assistant/ui/caption_bar.cc index ed6a11f..b3ab263d 100644 --- a/ash/assistant/ui/caption_bar.cc +++ b/ash/assistant/ui/caption_bar.cc
@@ -19,7 +19,7 @@ // Appearance. constexpr int kCaptionButtonSizeDip = 12; -constexpr int kPreferredHeightDip = 48; +constexpr int kPreferredHeightDip = 32; // CaptionButton --------------------------------------------------------------- @@ -74,14 +74,6 @@ layout_manager->set_main_axis_alignment( views::BoxLayout::MainAxisAlignment::MAIN_AXIS_ALIGNMENT_END); - // Settings. - // TODO(dmblack): Remove this caption button. This is only being added as - // an entry point for development purposes. - CaptionButton* settings_button = - new CaptionButton(kNotificationSettingsIcon, this); - settings_button->set_id(static_cast<int>(CaptionButtonId::kSettings)); - AddChildView(settings_button); - // Minimize. CaptionButton* minimize_button = new CaptionButton(kWindowControlMinimizeIcon, this); @@ -108,7 +100,6 @@ GetWidget()->Close(); break; case CaptionButtonId::kMinimize: - case CaptionButtonId::kSettings: // No default behavior defined. NOTIMPLEMENTED(); break;
diff --git a/ash/assistant/ui/caption_bar.h b/ash/assistant/ui/caption_bar.h index db53f8b..a5eb90f 100644 --- a/ash/assistant/ui/caption_bar.h +++ b/ash/assistant/ui/caption_bar.h
@@ -16,7 +16,6 @@ enum class CaptionButtonId { kClose = 1, kMinimize, - kSettings, // TODO(dmblack): Remove. }; // CaptionBarDelegate ----------------------------------------------------------
diff --git a/ash/assistant/ui/dialog_plate/dialog_plate.cc b/ash/assistant/ui/dialog_plate/dialog_plate.cc index 0ae3151..ebc4af6 100644 --- a/ash/assistant/ui/dialog_plate/dialog_plate.cc +++ b/ash/assistant/ui/dialog_plate/dialog_plate.cc
@@ -8,11 +8,13 @@ #include "ash/assistant/assistant_controller.h" #include "ash/assistant/ui/assistant_ui_constants.h" +#include "ash/public/cpp/vector_icons/vector_icons.h" #include "ash/resources/vector_icons/vector_icons.h" #include "ash/strings/grit/ash_strings.h" #include "base/strings/utf_string_conversions.h" #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/canvas.h" +#include "ui/gfx/color_palette.h" #include "ui/gfx/paint_vector_icon.h" #include "ui/views/background.h" #include "ui/views/border.h" @@ -29,6 +31,20 @@ constexpr int kIconSizeDip = 24; constexpr int kPreferredHeightDip = 48; +// Helpers --------------------------------------------------------------------- + +// Creates a settings button. Caller takes ownership. +views::ImageButton* CreateSettingsButton(DialogPlate* dialog_plate) { + views::ImageButton* settings_button = new views::ImageButton(dialog_plate); + settings_button->set_id(static_cast<int>(DialogPlateButtonId::kSettings)); + settings_button->SetImage( + views::Button::ButtonState::STATE_NORMAL, + gfx::CreateVectorIcon(kNotificationSettingsIcon, kIconSizeDip, + gfx::kGoogleGrey600)); + settings_button->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); + return settings_button; +} + } // namespace // DialogPlate ----------------------------------------------------------------- @@ -113,6 +129,14 @@ voice_input_toggle_->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); keyboard_layout_container_->AddChildView(voice_input_toggle_); + // Spacer. + views::View* spacer = new views::View(); + spacer->SetPreferredSize(gfx::Size(kSpacingDip, kSpacingDip)); + keyboard_layout_container_->AddChildView(spacer); + + // Settings. + keyboard_layout_container_->AddChildView(CreateSettingsButton(this)); + AddChildView(keyboard_layout_container_); } @@ -154,13 +178,8 @@ layout_manager->SetFlexForView(spacer, 1); - // Spacer. - // Note: this spacer has preferred size (kIconSizeDip, kIconSizeDip) to - // match |keyboard_input_toggle_| so that |action_view_| will be centered - // within its parent. - spacer = new views::View(); - spacer->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); - voice_layout_container_->AddChildView(spacer); + // Settings. + voice_layout_container_->AddChildView(CreateSettingsButton(this)); AddChildView(voice_layout_container_); }
diff --git a/ash/assistant/ui/dialog_plate/dialog_plate.h b/ash/assistant/ui/dialog_plate/dialog_plate.h index 2cced83..81c9214 100644 --- a/ash/assistant/ui/dialog_plate/dialog_plate.h +++ b/ash/assistant/ui/dialog_plate/dialog_plate.h
@@ -27,6 +27,7 @@ enum class DialogPlateButtonId { kKeyboardInputToggle = 1, kVoiceInputToggle, + kSettings, }; // DialogPlateDelegate ---------------------------------------------------------
diff --git a/ash/assistant/ui/main_stage/assistant_header_view.cc b/ash/assistant/ui/main_stage/assistant_header_view.cc new file mode 100644 index 0000000..eda414f --- /dev/null +++ b/ash/assistant/ui/main_stage/assistant_header_view.cc
@@ -0,0 +1,105 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/assistant/ui/main_stage/assistant_header_view.h" + +#include <memory> + +#include "ash/assistant/assistant_controller.h" +#include "ash/assistant/model/assistant_interaction_model.h" +#include "ash/assistant/model/assistant_query.h" +#include "ash/assistant/ui/assistant_ui_constants.h" +#include "ash/resources/vector_icons/vector_icons.h" +#include "ash/strings/grit/ash_strings.h" +#include "ui/base/l10n/l10n_util.h" +#include "ui/gfx/paint_vector_icon.h" +#include "ui/views/controls/image_view.h" +#include "ui/views/controls/label.h" +#include "ui/views/layout/box_layout.h" + +namespace ash { + +namespace { + +// Appearance. +constexpr int kIconSizeDip = 24; +constexpr int kInitialHeightDip = 72; + +} // namespace + +AssistantHeaderView::AssistantHeaderView( + AssistantController* assistant_controller) + : assistant_controller_(assistant_controller) { + InitLayout(); + + // The Assistant controller indirectly owns the view hierarchy to which + // AssistantHeaderView belongs so is guaranteed to outlive it. + assistant_controller_->AddInteractionModelObserver(this); +} + +AssistantHeaderView::~AssistantHeaderView() { + assistant_controller_->RemoveInteractionModelObserver(this); +} + +gfx::Size AssistantHeaderView::CalculatePreferredSize() const { + return gfx::Size(INT_MAX, GetHeightForWidth(INT_MAX)); +} + +int AssistantHeaderView::GetHeightForWidth(int width) const { + return label_->visible() ? kInitialHeightDip + : views::View::GetHeightForWidth(width); +} + +void AssistantHeaderView::ChildVisibilityChanged(views::View* child) { + DCHECK_EQ(child, label_); + + layout_manager_->set_cross_axis_alignment( + label_->visible() + ? views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER + : views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_START); + + PreferredSizeChanged(); +} + +void AssistantHeaderView::InitLayout() { + layout_manager_ = SetLayoutManager(std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical, gfx::Insets(), kSpacingDip)); + + layout_manager_->set_cross_axis_alignment( + views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER); + + // Icon. + views::ImageView* icon = new views::ImageView(); + icon->SetImage(gfx::CreateVectorIcon(kAssistantIcon, kIconSizeDip)); + icon->SetImageSize(gfx::Size(kIconSizeDip, kIconSizeDip)); + icon->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); + AddChildView(icon); + + // Label. + label_ = new views::Label( + l10n_util::GetStringUTF16(IDS_ASH_ASSISTANT_PROMPT_DEFAULT)); + label_->SetAutoColorReadabilityEnabled(false); + label_->SetEnabledColor(kTextColorPrimary); + label_->SetFontList(views::Label::GetDefaultFontList() + .DeriveWithSizeDelta(8) + .DeriveWithWeight(gfx::Font::Weight::MEDIUM)); + label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_CENTER); + label_->SetMultiLine(true); + AddChildView(label_); +} + +void AssistantHeaderView::OnInteractionStateChanged( + InteractionState interaction_state) { + if (interaction_state != InteractionState::kInactive) + return; + + label_->SetVisible(true); +} + +void AssistantHeaderView::OnCommittedQueryChanged( + const AssistantQuery& committed_query) { + label_->SetVisible(false); +} + +} // namespace ash
diff --git a/ash/assistant/ui/main_stage/assistant_header_view.h b/ash/assistant/ui/main_stage/assistant_header_view.h new file mode 100644 index 0000000..2332d7d --- /dev/null +++ b/ash/assistant/ui/main_stage/assistant_header_view.h
@@ -0,0 +1,51 @@ +// Copyright 2018 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 ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_HEADER_VIEW_H_ +#define ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_HEADER_VIEW_H_ + +#include "ash/assistant/model/assistant_interaction_model_observer.h" +#include "base/macros.h" +#include "ui/views/view.h" + +namespace views { +class BoxLayout; +class Label; +} // namespace views + +namespace ash { + +class AssistantController; + +// AssistantHeaderView is the child of UiElementContainerView which provides +// the Assistant icon. On first launch, it also displays a greeting to the user. +class AssistantHeaderView : public views::View, + public AssistantInteractionModelObserver { + public: + explicit AssistantHeaderView(AssistantController* assistant_controller); + ~AssistantHeaderView() override; + + // views::View: + gfx::Size CalculatePreferredSize() const override; + int GetHeightForWidth(int width) const override; + void ChildVisibilityChanged(views::View* child) override; + + // AssistantInteractionModelObserver: + void OnInteractionStateChanged(InteractionState interaction_state) override; + void OnCommittedQueryChanged(const AssistantQuery& committed_query) override; + + private: + void InitLayout(); + + AssistantController* const assistant_controller_; // Owned by Shell. + + views::BoxLayout* layout_manager_; // Owned by view hierarchy. + views::Label* label_; // Owned by view hierarchy. + + DISALLOW_COPY_AND_ASSIGN(AssistantHeaderView); +}; + +} // namespace ash + +#endif // ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_HEADER_VIEW_H_
diff --git a/ash/assistant/ui/main_stage/assistant_main_stage.cc b/ash/assistant/ui/main_stage/assistant_main_stage.cc new file mode 100644 index 0000000..72837a9 --- /dev/null +++ b/ash/assistant/ui/main_stage/assistant_main_stage.cc
@@ -0,0 +1,146 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ash/assistant/ui/main_stage/assistant_main_stage.h" + +#include <memory> + +#include "ash/assistant/assistant_controller.h" +#include "ash/assistant/ui/main_stage/assistant_query_view.h" +#include "ash/assistant/ui/main_stage/suggestion_container_view.h" +#include "ash/assistant/ui/main_stage/ui_element_container_view.h" +#include "ui/views/layout/box_layout.h" +#include "ui/views/layout/fill_layout.h" + +namespace ash { + +AssistantMainStage::AssistantMainStage( + AssistantController* assistant_controller) { + InitLayout(assistant_controller); +} + +AssistantMainStage::~AssistantMainStage() = default; + +void AssistantMainStage::ChildPreferredSizeChanged(views::View* child) { + PreferredSizeChanged(); +} + +void AssistantMainStage::ChildVisibilityChanged(views::View* child) { + PreferredSizeChanged(); +} + +void AssistantMainStage::OnViewPreferredSizeChanged(views::View* view) { + if (view == committed_query_view_) { + // Because it reserves layout space for |committed_query_view_|, the + // associated spacer needs to match its preferred size. + committed_query_view_spacer_->SetPreferredSize( + committed_query_view_->GetPreferredSize()); + } else if (view == suggestion_container_) { + // Because it reserves layout space for the |suggestion_container_|, the + // associated spacer needs to match its preferred size. + suggestion_container_spacer_->SetPreferredSize( + suggestion_container_->GetPreferredSize()); + } + PreferredSizeChanged(); +} + +void AssistantMainStage::OnViewVisibilityChanged(views::View* view) { + if (view == committed_query_view_) { + // We only reserve space for |committed_query_view_| when it is visible. + committed_query_view_spacer_->SetVisible(committed_query_view_->visible()); + } else if (view == suggestion_container_) { + // We only reserve space for the |suggestion_container_| when it is hidden. + suggestion_container_spacer_->SetVisible(!suggestion_container_->visible()); + } else if (view == pending_query_view_) { + // We only display |suggestion_container_| when |pending_query_view_| is + // hidden. When |suggestion_container_| is hidden, its space will be + // preserved in the layout by |suggestion_container_spacer_|. + suggestion_container_->SetVisible(!pending_query_view_->visible()); + } + PreferredSizeChanged(); +} + +void AssistantMainStage::InitLayout(AssistantController* assistant_controller) { + SetLayoutManager(std::make_unique<views::FillLayout>()); + + InitContentLayoutContainer(assistant_controller); + InitQueryLayoutContainer(assistant_controller); +} + +void AssistantMainStage::InitContentLayoutContainer( + AssistantController* assistant_controller) { + // Note that we will observe children of |content_layout_container| to handle + // preferred size and visibility change events in AssistantMainStage. This is + // necessary because |content_layout_container| may not change size in + // response to these events, necessitating an explicit layout pass. + views::View* content_layout_container = new views::View(); + + views::BoxLayout* layout_manager = content_layout_container->SetLayoutManager( + std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical)); + + // Committed query spacer. + // Note: This view reserves layout space for |committed_query_view_|, + // dynamically mirroring its preferred size and visibility. + committed_query_view_spacer_ = new views::View(); + committed_query_view_spacer_->AddObserver(this); + content_layout_container->AddChildView(committed_query_view_spacer_); + + // UI element container. + ui_element_container_ = new UiElementContainerView(assistant_controller); + ui_element_container_->AddObserver(this); + content_layout_container->AddChildView(ui_element_container_); + + layout_manager->SetFlexForView(ui_element_container_, 1); + + // Suggestion container. + suggestion_container_ = new SuggestionContainerView(assistant_controller); + suggestion_container_->AddObserver(this); + content_layout_container->AddChildView(suggestion_container_); + + // Suggestion container spacer. + // Note: This view reserves layout space for the |suggestion_container_|, + // dynamically mirroring its preferred size and being visible only when the + // |suggestion_container_| is hidden. + suggestion_container_spacer_ = new views::View(); + content_layout_container->AddChildView(suggestion_container_spacer_); + + AddChildView(content_layout_container); +} + +void AssistantMainStage::InitQueryLayoutContainer( + AssistantController* assistant_controller) { + // Note that we will observe children of |query_layout_container| to handle + // preferred size and visibility change events in AssistantMainStage. This is + // necessary because |query_layout_container| may not change size in response + // to these events, necessitating an explicit layout pass. + views::View* query_layout_container = new views::View(); + query_layout_container->set_can_process_events_within_subtree(false); + + views::BoxLayout* layout_manager = query_layout_container->SetLayoutManager( + std::make_unique<views::BoxLayout>( + views::BoxLayout::Orientation::kVertical)); + + // Committed query. + committed_query_view_ = new AssistantQueryView( + assistant_controller, AssistantQueryView::ObservedQueryState::kCommitted); + committed_query_view_->AddObserver(this); + query_layout_container->AddChildView(committed_query_view_); + + // Spacer. + views::View* spacer = new views::View(); + query_layout_container->AddChildView(spacer); + + layout_manager->SetFlexForView(spacer, 1); + + // Pending query. + pending_query_view_ = new AssistantQueryView( + assistant_controller, AssistantQueryView::ObservedQueryState::kPending); + pending_query_view_->AddObserver(this); + query_layout_container->AddChildView(pending_query_view_); + + AddChildView(query_layout_container); +} + +} // namespace ash
diff --git a/ash/assistant/ui/main_stage/assistant_main_stage.h b/ash/assistant/ui/main_stage/assistant_main_stage.h new file mode 100644 index 0000000..2e7785a --- /dev/null +++ b/ash/assistant/ui/main_stage/assistant_main_stage.h
@@ -0,0 +1,52 @@ +// Copyright 2018 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 ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_MAIN_STAGE_H_ +#define ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_MAIN_STAGE_H_ + +#include "base/macros.h" +#include "ui/views/view.h" +#include "ui/views/view_observer.h" + +namespace ash { + +class AssistantController; +class AssistantQueryView; +class SuggestionContainerView; +class UiElementContainerView; + +// AssistantMainStage is the child of AssistantMainView responsible for +// displaying the Assistant interaction to the user. This includes visual +// affordances for the query, response, as well as suggestions. +class AssistantMainStage : public views::View, public views::ViewObserver { + public: + explicit AssistantMainStage(AssistantController* assistant_controller); + ~AssistantMainStage() override; + + // views::View: + void ChildPreferredSizeChanged(views::View* child) override; + void ChildVisibilityChanged(views::View* child) override; + + // views::ViewObserver: + void OnViewPreferredSizeChanged(views::View* view) override; + void OnViewVisibilityChanged(views::View* view) override; + + private: + void InitLayout(AssistantController* assistant_controller); + void InitContentLayoutContainer(AssistantController* assistant_controller); + void InitQueryLayoutContainer(AssistantController* assistant_controller); + + AssistantQueryView* committed_query_view_; // Owned by view hierarchy. + views::View* committed_query_view_spacer_; // Owned by view hierarchy. + AssistantQueryView* pending_query_view_; // Owned by view hierarchy. + SuggestionContainerView* suggestion_container_; // Owned by view hierarchy. + views::View* suggestion_container_spacer_; // Owned by view hierarchy. + UiElementContainerView* ui_element_container_; // Owned by view hierarchy. + + DISALLOW_COPY_AND_ASSIGN(AssistantMainStage); +}; + +} // namespace ash + +#endif // ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_MAIN_STAGE_H_
diff --git a/ash/assistant/ui/main_stage/assistant_query_view.cc b/ash/assistant/ui/main_stage/assistant_query_view.cc index b7d3405..24bbfc3 100644 --- a/ash/assistant/ui/main_stage/assistant_query_view.cc +++ b/ash/assistant/ui/main_stage/assistant_query_view.cc
@@ -10,12 +10,7 @@ #include "ash/assistant/model/assistant_interaction_model.h" #include "ash/assistant/model/assistant_query.h" #include "ash/assistant/ui/assistant_ui_constants.h" -#include "ash/resources/vector_icons/vector_icons.h" -#include "ash/strings/grit/ash_strings.h" #include "base/strings/utf_string_conversions.h" -#include "ui/base/l10n/l10n_util.h" -#include "ui/gfx/paint_vector_icon.h" -#include "ui/views/controls/image_view.h" #include "ui/views/layout/box_layout.h" namespace ash { @@ -23,16 +18,16 @@ namespace { // Appearance. -constexpr int kIconSizeDip = 24; +constexpr int kMinHeightDip = 32; } // namespace AssistantQueryView::AssistantQueryView( - AssistantController* assistant_controller) + AssistantController* assistant_controller, + ObservedQueryState observed_query_state) : assistant_controller_(assistant_controller), - label_(new views::StyledLabel(base::string16(), /*listener=*/nullptr)) { + observed_query_state_(observed_query_state) { InitLayout(); - OnQueryChanged(assistant_controller_->interaction_model()->query()); // The Assistant controller indirectly owns the view hierarchy to which // AssistantQueryView belongs so is guaranteed to outlive it. @@ -47,6 +42,10 @@ return gfx::Size(INT_MAX, GetHeightForWidth(INT_MAX)); } +int AssistantQueryView::GetHeightForWidth(int width) const { + return std::max(views::View::GetHeightForWidth(width), kMinHeightDip); +} + void AssistantQueryView::ChildPreferredSizeChanged(views::View* child) { PreferredSizeChanged(); } @@ -58,23 +57,41 @@ void AssistantQueryView::InitLayout() { views::BoxLayout* layout_manager = SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kVertical, gfx::Insets(), - kSpacingDip)); + views::BoxLayout::Orientation::kVertical)); + + layout_manager->set_main_axis_alignment( + views::BoxLayout::MainAxisAlignment::MAIN_AXIS_ALIGNMENT_CENTER); layout_manager->set_cross_axis_alignment( - views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_START); - - // Icon. - views::ImageView* icon = new views::ImageView(); - icon->SetImage(gfx::CreateVectorIcon(kAssistantIcon, kIconSizeDip)); - icon->SetImageSize(gfx::Size(kIconSizeDip, kIconSizeDip)); - icon->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); - AddChildView(icon); + views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_CENTER); // Label. + label_ = new views::StyledLabel(base::string16(), /*listener=*/nullptr); label_->set_auto_color_readability_enabled(false); - label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); + label_->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_CENTER); AddChildView(label_); + + // Artificially trigger event to initialize state. + OnPendingQueryChanged( + observed_query_state_ == ObservedQueryState::kCommitted + ? assistant_controller_->interaction_model()->committed_query() + : assistant_controller_->interaction_model()->pending_query()); +} + +void AssistantQueryView::OnCommittedQueryChanged( + const AssistantQuery& committed_query) { + if (observed_query_state_ != ObservedQueryState::kCommitted) + return; + + OnQueryChanged(committed_query); +} + +void AssistantQueryView::OnPendingQueryChanged( + const AssistantQuery& pending_query) { + if (observed_query_state_ != ObservedQueryState::kPending) + return; + + OnQueryChanged(pending_query); } void AssistantQueryView::OnQueryChanged(const AssistantQuery& query) { @@ -105,46 +122,72 @@ } } +void AssistantQueryView::OnCommittedQueryCleared() { + if (observed_query_state_ != ObservedQueryState::kCommitted) + return; + + OnQueryCleared(); +} + +void AssistantQueryView::OnPendingQueryCleared() { + if (observed_query_state_ != ObservedQueryState::kPending) + return; + + OnQueryCleared(); +} + void AssistantQueryView::OnQueryCleared() { - SetText(l10n_util::GetStringUTF8(IDS_ASH_ASSISTANT_PROMPT_DEFAULT)); + SetVisible(false); + label_->SetText(base::string16()); } void AssistantQueryView::SetText(const std::string& high_confidence_text, const std::string& low_confidence_text) { - const base::string16& high_confidence_text_16 = - base::UTF8ToUTF16(high_confidence_text); + if (observed_query_state_ == ObservedQueryState::kCommitted) { + // When observing a committed query, text is displayed in a single color. + const base::string16& text_16 = + base::UTF8ToUTF16(high_confidence_text + low_confidence_text); - if (low_confidence_text.empty()) { - label_->SetText(high_confidence_text_16); - label_->AddStyleRange(gfx::Range(0, high_confidence_text_16.length()), - CreateStyleInfo(kTextColorPrimary)); + label_->SetText(text_16); + label_->AddStyleRange(gfx::Range(0, text_16.length()), + CreateStyleInfo(kTextColorSecondary)); } else { - const base::string16& low_confidence_text_16 = - base::UTF8ToUTF16(low_confidence_text); + // When observing a pending query, high confidence text and low confidence + // text are displayed in different colors for visual emphasis. + const base::string16& high_confidence_text_16 = + base::UTF8ToUTF16(high_confidence_text); - label_->SetText(high_confidence_text_16 + low_confidence_text_16); + if (low_confidence_text.empty()) { + label_->SetText(high_confidence_text_16); + label_->AddStyleRange(gfx::Range(0, high_confidence_text_16.length()), + CreateStyleInfo(kTextColorPrimary)); + } else { + const base::string16& low_confidence_text_16 = + base::UTF8ToUTF16(low_confidence_text); - // High confidence text styling. - label_->AddStyleRange(gfx::Range(0, high_confidence_text_16.length()), - CreateStyleInfo(kTextColorPrimary)); + label_->SetText(high_confidence_text_16 + low_confidence_text_16); - // Low confidence text styling. - label_->AddStyleRange(gfx::Range(high_confidence_text_16.length(), - high_confidence_text_16.length() + - low_confidence_text_16.length()), - CreateStyleInfo(kTextColorHint)); + // High confidence text styling. + label_->AddStyleRange(gfx::Range(0, high_confidence_text_16.length()), + CreateStyleInfo(kTextColorPrimary)); + + // Low confidence text styling. + label_->AddStyleRange(gfx::Range(high_confidence_text_16.length(), + high_confidence_text_16.length() + + low_confidence_text_16.length()), + CreateStyleInfo(kTextColorHint)); + } } label_->SizeToFit(width()); PreferredSizeChanged(); + SetVisible(true); } views::StyledLabel::RangeStyleInfo AssistantQueryView::CreateStyleInfo( SkColor color) const { views::StyledLabel::RangeStyleInfo style; - style.custom_font = - label_->GetDefaultFontList().DeriveWithSizeDelta(8).DeriveWithWeight( - gfx::Font::Weight::MEDIUM); + style.custom_font = label_->GetDefaultFontList().DeriveWithSizeDelta(2); style.override_color = color; return style; }
diff --git a/ash/assistant/ui/main_stage/assistant_query_view.h b/ash/assistant/ui/main_stage/assistant_query_view.h index 5dcfa5d..4a733f4 100644 --- a/ash/assistant/ui/main_stage/assistant_query_view.h +++ b/ash/assistant/ui/main_stage/assistant_query_view.h
@@ -19,17 +19,27 @@ class AssistantQueryView : public views::View, public AssistantInteractionModelObserver { public: - explicit AssistantQueryView(AssistantController* assistant_controller); + // Dictates whether AssistantQueryView observes a committed or pending query. + enum ObservedQueryState { + kCommitted, + kPending, + }; + + AssistantQueryView(AssistantController* assistant_controller, + ObservedQueryState observed_query_state); ~AssistantQueryView() override; // views::View: gfx::Size CalculatePreferredSize() const override; + int GetHeightForWidth(int width) const override; void ChildPreferredSizeChanged(views::View* child) override; void OnBoundsChanged(const gfx::Rect& prev_bounds) override; // AssistantInteractionModelObserver: - void OnQueryChanged(const AssistantQuery& query) override; - void OnQueryCleared() override; + void OnCommittedQueryChanged(const AssistantQuery& committed_query) override; + void OnCommittedQueryCleared() override; + void OnPendingQueryChanged(const AssistantQuery& pending_query) override; + void OnPendingQueryCleared() override; private: void InitLayout(); @@ -37,9 +47,14 @@ const std::string& low_confidence_text = std::string()); views::StyledLabel::RangeStyleInfo CreateStyleInfo(SkColor color) const; + void OnQueryChanged(const AssistantQuery& query); + void OnQueryCleared(); + AssistantController* const assistant_controller_; // Owned by Shell. views::StyledLabel* label_; // Owned by view hierarchy. + const ObservedQueryState observed_query_state_; + DISALLOW_COPY_AND_ASSIGN(AssistantQueryView); };
diff --git a/ash/assistant/ui/main_stage/assistant_text_element_view.cc b/ash/assistant/ui/main_stage/assistant_text_element_view.cc index 11e91db..96ba96f5 100644 --- a/ash/assistant/ui/main_stage/assistant_text_element_view.cc +++ b/ash/assistant/ui/main_stage/assistant_text_element_view.cc
@@ -6,115 +6,22 @@ #include "ash/assistant/model/assistant_ui_element.h" #include "ash/assistant/ui/assistant_ui_constants.h" -#include "ash/resources/vector_icons/vector_icons.h" #include "base/strings/utf_string_conversions.h" -#include "ui/gfx/canvas.h" -#include "ui/gfx/color_palette.h" -#include "ui/gfx/paint_vector_icon.h" -#include "ui/views/background.h" -#include "ui/views/controls/image_view.h" -#include "ui/views/controls/label.h" -#include "ui/views/layout/box_layout.h" namespace ash { -// Appearance. -constexpr int kIconSizeDip = 32; -constexpr SkColor kLabelContainerBackgroundColor = SK_ColorWHITE; -constexpr int kLabelContainerBackgroundCornerRadiusDip = 16; -constexpr SkColor kLabelContainerBackgroundStrokeColor = - SkColorSetA(gfx::kGoogleGrey900, 0x24); -constexpr int kLabelContainerBackgroundStrokeWidthDip = 1; -constexpr int kLabelContainerPaddingHorizontalDip = 16; -constexpr int kLabelContainerPaddingVerticalDip = 6; - -namespace { - -// LabelContainerBackground ---------------------------------------------------- - -class LabelContainerBackground : public views::Background { - public: - LabelContainerBackground() = default; - - ~LabelContainerBackground() override = default; - - // views::Background: - void Paint(gfx::Canvas* canvas, views::View* view) const override { - cc::PaintFlags flags; - flags.setAntiAlias(true); - - gfx::Rect bounds = view->GetContentsBounds(); - - // Background. - flags.setColor(kLabelContainerBackgroundColor); - canvas->DrawRoundRect(bounds, kLabelContainerBackgroundCornerRadiusDip, - flags); - - // Stroke should be drawn within our contents bounds. - bounds.Inset(gfx::Insets(kLabelContainerBackgroundStrokeWidthDip)); - - // Stroke. - flags.setColor(kLabelContainerBackgroundStrokeColor); - flags.setStrokeWidth(kLabelContainerBackgroundStrokeWidthDip); - flags.setStyle(cc::PaintFlags::Style::kStroke_Style); - canvas->DrawRoundRect(bounds, kLabelContainerBackgroundCornerRadiusDip, - flags); - } - - private: - DISALLOW_COPY_AND_ASSIGN(LabelContainerBackground); -}; - -} // namespace - // AssistantTextElementView ---------------------------------------------------- AssistantTextElementView::AssistantTextElementView( - const AssistantTextElement* text_element) { - InitLayout(text_element); + const AssistantTextElement* text_element) + : views::Label(base::UTF8ToUTF16(text_element->text())) { + SetAutoColorReadabilityEnabled(false); + SetEnabledColor(kTextColorPrimary); + SetFontList(views::Label::GetDefaultFontList().DeriveWithSizeDelta(2)); + SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); + SetMultiLine(true); } AssistantTextElementView::~AssistantTextElementView() = default; -void AssistantTextElementView::ChildPreferredSizeChanged(views::View* child) { - PreferredSizeChanged(); -} - -void AssistantTextElementView::InitLayout( - const AssistantTextElement* text_element) { - views::BoxLayout* layout_manager = - SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kHorizontal, gfx::Insets(), - 2 * kSpacingDip)); - - layout_manager->set_cross_axis_alignment( - views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_START); - - // Icon. - views::ImageView* icon = new views::ImageView(); - icon->SetImage(gfx::CreateVectorIcon(kAssistantIcon, kIconSizeDip)); - icon->SetImageSize(gfx::Size(kIconSizeDip, kIconSizeDip)); - icon->SetPreferredSize(gfx::Size(kIconSizeDip, kIconSizeDip)); - AddChildView(icon); - - // Label Container. - views::View* label_container = new views::View(); - label_container->SetBackground(std::make_unique<LabelContainerBackground>()); - label_container->SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kHorizontal, - gfx::Insets(kLabelContainerPaddingVerticalDip, - kLabelContainerPaddingHorizontalDip))); - AddChildView(label_container); - - // Label. - views::Label* label = - new views::Label(base::UTF8ToUTF16(text_element->text())); - label->SetAutoColorReadabilityEnabled(false); - label->SetEnabledColor(kTextColorPrimary); - label->SetFontList(views::Label::GetDefaultFontList().DeriveWithSizeDelta(4)); - label->SetHorizontalAlignment(gfx::HorizontalAlignment::ALIGN_LEFT); - label->SetMultiLine(true); - label_container->AddChildView(label); -} - } // namespace ash
diff --git a/ash/assistant/ui/main_stage/assistant_text_element_view.h b/ash/assistant/ui/main_stage/assistant_text_element_view.h index c147642..4f3beab 100644 --- a/ash/assistant/ui/main_stage/assistant_text_element_view.h +++ b/ash/assistant/ui/main_stage/assistant_text_element_view.h
@@ -6,7 +6,7 @@ #define ASH_ASSISTANT_UI_MAIN_STAGE_ASSISTANT_TEXT_ELEMENT_VIEW_H_ #include "base/macros.h" -#include "ui/views/view.h" +#include "ui/views/controls/label.h" namespace ash { @@ -14,17 +14,12 @@ // AssistantTextElementView is the visual representation of an // AssistantTextElement. It is a child view of UiElementContainerView. -class AssistantTextElementView : public views::View { +class AssistantTextElementView : public views::Label { public: explicit AssistantTextElementView(const AssistantTextElement* text_element); ~AssistantTextElementView() override; - // views::View: - void ChildPreferredSizeChanged(views::View* child) override; - private: - void InitLayout(const AssistantTextElement* text_element); - DISALLOW_COPY_AND_ASSIGN(AssistantTextElementView); };
diff --git a/ash/assistant/ui/suggestion_container_view.cc b/ash/assistant/ui/main_stage/suggestion_container_view.cc similarity index 97% rename from ash/assistant/ui/suggestion_container_view.cc rename to ash/assistant/ui/main_stage/suggestion_container_view.cc index c1f4cfad..6977a824 100644 --- a/ash/assistant/ui/suggestion_container_view.cc +++ b/ash/assistant/ui/main_stage/suggestion_container_view.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ash/assistant/ui/suggestion_container_view.h" +#include "ash/assistant/ui/main_stage/suggestion_container_view.h" #include <memory> @@ -119,15 +119,12 @@ contents_view_->AddChildView(suggestion_chip_view); } UpdateContentsBounds(); - SetVisible(contents_view_->has_children()); } void SuggestionContainerView::OnSuggestionsCleared() { // Abort any download requests in progress. download_request_weak_factory_.InvalidateWeakPtrs(); - SetVisible(false); - // When modifying the view hierarchy, make sure we keep our view cache synced. contents_view_->RemoveAllChildViews(/*delete_children=*/true); suggestion_chip_views_.clear();
diff --git a/ash/assistant/ui/suggestion_container_view.h b/ash/assistant/ui/main_stage/suggestion_container_view.h similarity index 91% rename from ash/assistant/ui/suggestion_container_view.h rename to ash/assistant/ui/main_stage/suggestion_container_view.h index 9b80a399..dee1432 100644 --- a/ash/assistant/ui/suggestion_container_view.h +++ b/ash/assistant/ui/main_stage/suggestion_container_view.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef ASH_ASSISTANT_UI_SUGGESTION_CONTAINER_VIEW_H_ -#define ASH_ASSISTANT_UI_SUGGESTION_CONTAINER_VIEW_H_ +#ifndef ASH_ASSISTANT_UI_MAIN_STAGE_SUGGESTION_CONTAINER_VIEW_H_ +#define ASH_ASSISTANT_UI_MAIN_STAGE_SUGGESTION_CONTAINER_VIEW_H_ #include <map> @@ -64,4 +64,4 @@ } // namespace ash -#endif // ASH_ASSISTANT_UI_SUGGESTION_CONTAINER_VIEW_H_ +#endif // ASH_ASSISTANT_UI_MAIN_STAGE_SUGGESTION_CONTAINER_VIEW_H_
diff --git a/ash/assistant/ui/main_stage/ui_element_container_view.cc b/ash/assistant/ui/main_stage/ui_element_container_view.cc index abff04b..b88d717 100644 --- a/ash/assistant/ui/main_stage/ui_element_container_view.cc +++ b/ash/assistant/ui/main_stage/ui_element_container_view.cc
@@ -7,7 +7,7 @@ #include "ash/assistant/assistant_controller.h" #include "ash/assistant/model/assistant_ui_element.h" #include "ash/assistant/ui/assistant_ui_constants.h" -#include "ash/assistant/ui/main_stage/assistant_query_view.h" +#include "ash/assistant/ui/main_stage/assistant_header_view.h" #include "ash/assistant/ui/main_stage/assistant_text_element_view.h" #include "ash/public/cpp/app_list/answer_card_contents_registry.h" #include "base/base64.h" @@ -19,6 +19,9 @@ namespace { +// Appearance. +constexpr int kPaddingHorizontalDip = 32; + constexpr char kDataUriPrefix[] = "data:text/html;base64,"; } // namespace @@ -26,8 +29,6 @@ UiElementContainerView::UiElementContainerView( AssistantController* assistant_controller) : assistant_controller_(assistant_controller), - assistant_query_view_( - std::make_unique<AssistantQueryView>(assistant_controller)), render_request_weak_factory_(this) { InitLayout(); @@ -48,15 +49,17 @@ void UiElementContainerView::InitLayout() { views::BoxLayout* layout_manager = SetLayoutManager(std::make_unique<views::BoxLayout>( - views::BoxLayout::Orientation::kVertical, gfx::Insets(0, kPaddingDip), - kSpacingDip)); + views::BoxLayout::Orientation::kVertical, + gfx::Insets(0, kPaddingHorizontalDip), kSpacingDip)); layout_manager->set_cross_axis_alignment( views::BoxLayout::CrossAxisAlignment::CROSS_AXIS_ALIGNMENT_START); - // Query. - assistant_query_view_->set_owned_by_client(); - AddChildView(assistant_query_view_.get()); + // Header. + assistant_header_view_ = + std::make_unique<AssistantHeaderView>(assistant_controller_); + assistant_header_view_->set_owned_by_client(); + AddChildView(assistant_header_view_.get()); } void UiElementContainerView::OnUiElementAdded( @@ -83,7 +86,7 @@ render_request_weak_factory_.InvalidateWeakPtrs(); RemoveAllChildViews(/*delete_children=*/true); - AddChildView(assistant_query_view_.get()); + AddChildView(assistant_header_view_.get()); PreferredSizeChanged(); @@ -115,9 +118,10 @@ ash::mojom::ManagedWebContentsParamsPtr params( ash::mojom::ManagedWebContentsParams::New()); params->url = GURL(kDataUriPrefix + encoded_html); - params->min_size_dip = gfx::Size(kPreferredWidthDip - 2 * kPaddingDip, 1); + params->min_size_dip = + gfx::Size(kPreferredWidthDip - 2 * kPaddingHorizontalDip, 1); params->max_size_dip = - gfx::Size(kPreferredWidthDip - 2 * kPaddingDip, INT_MAX); + gfx::Size(kPreferredWidthDip - 2 * kPaddingHorizontalDip, INT_MAX); // The card will be rendered by AssistantCardRenderer, running the specified // callback when the card is ready for embedding. @@ -145,7 +149,6 @@ // When the card has been rendered in the same process, its view is // available in the AnswerCardContentsRegistry's token-to-view map. if (app_list::AnswerCardContentsRegistry::Get()) { - RemoveChildView(assistant_query_view_.get()); AddChildView(app_list::AnswerCardContentsRegistry::Get()->GetView( embed_token.value())); } @@ -162,7 +165,6 @@ const AssistantTextElement* text_element) { DCHECK(!is_processing_ui_element_); - RemoveChildView(assistant_query_view_.get()); AddChildView(new AssistantTextElementView(text_element)); PreferredSizeChanged();
diff --git a/ash/assistant/ui/main_stage/ui_element_container_view.h b/ash/assistant/ui/main_stage/ui_element_container_view.h index de6990e9..3de7456 100644 --- a/ash/assistant/ui/main_stage/ui_element_container_view.h +++ b/ash/assistant/ui/main_stage/ui_element_container_view.h
@@ -17,7 +17,7 @@ class AssistantCardElement; class AssistantController; -class AssistantQueryView; +class AssistantHeaderView; class AssistantTextElement; class AssistantUiElement; @@ -55,7 +55,8 @@ void ReleaseAllCards(); AssistantController* const assistant_controller_; // Owned by Shell. - std::unique_ptr<AssistantQueryView> assistant_query_view_; + + std::unique_ptr<AssistantHeaderView> assistant_header_view_; // Uniquely identifies cards owned by AssistantCardRenderer. std::vector<base::UnguessableToken> id_token_list_;
diff --git a/ash/host/ash_window_tree_host_platform.cc b/ash/host/ash_window_tree_host_platform.cc index 471e71d..3c88256 100644 --- a/ash/host/ash_window_tree_host_platform.cc +++ b/ash/host/ash_window_tree_host_platform.cc
@@ -10,11 +10,14 @@ #include "ash/host/transformer_helper.h" #include "ash/shell.h" #include "ash/shell_delegate.h" +#include "base/feature_list.h" #include "base/trace_event/trace_event.h" #include "services/ui/public/cpp/input_devices/input_device_controller_client.h" #include "services/ui/public/interfaces/window_manager.mojom.h" +#include "ui/aura/mus/input_method_mus.h" #include "ui/aura/window.h" #include "ui/aura/window_tree_host_platform.h" +#include "ui/base/ui_base_features.h" #include "ui/events/event_sink.h" #include "ui/events/null_event_targeter.h" #include "ui/events/ozone/chromeos/cursor_controller.h" @@ -22,7 +25,10 @@ #include "ui/gfx/geometry/rect_conversions.h" #include "ui/gfx/geometry/rect_f.h" #include "ui/gfx/transform.h" +#include "ui/platform_window/mojo/ime_type_converters.h" +#include "ui/platform_window/platform_ime_controller.h" #include "ui/platform_window/platform_window.h" +#include "ui/platform_window/text_input_state.h" namespace ash { @@ -30,12 +36,14 @@ const gfx::Rect& initial_bounds) : aura::WindowTreeHostPlatform(initial_bounds), transformer_helper_(this) { transformer_helper_.Init(); + InitInputMethodIfNecessary(); } AshWindowTreeHostPlatform::AshWindowTreeHostPlatform() : transformer_helper_(this) { CreateCompositor(); transformer_helper_.Init(); + InitInputMethodIfNecessary(); } AshWindowTreeHostPlatform::~AshWindowTreeHostPlatform() = default; @@ -148,6 +156,15 @@ SendEventToSink(event); } +void AshWindowTreeHostPlatform::InitInputMethodIfNecessary() { + if (!base::FeatureList::IsEnabled(features::kOopAsh)) + return; + + input_method_ = std::make_unique<aura::InputMethodMus>(this, this); + input_method_->Init(Shell::Get()->connector()); + SetSharedInputMethod(input_method_.get()); +} + void AshWindowTreeHostPlatform::SetTapToClickPaused(bool state) { ui::InputDeviceControllerClient* input_device_controller_client = Shell::Get()->shell_delegate()->GetInputDeviceControllerClient(); @@ -158,4 +175,24 @@ input_device_controller_client->SetTapToClickPaused(state); } +void AshWindowTreeHostPlatform::SetTextInputState( + ui::mojom::TextInputStatePtr state) { + ui::PlatformImeController* ime = + platform_window()->GetPlatformImeController(); + if (ime) + ime->UpdateTextInputState(state.To<ui::TextInputState>()); +} + +void AshWindowTreeHostPlatform::SetImeVisibility( + bool visible, + ui::mojom::TextInputStatePtr state) { + if (!state.is_null()) + SetTextInputState(std::move(state)); + + ui::PlatformImeController* ime = + platform_window()->GetPlatformImeController(); + if (ime) + ime->SetImeVisibility(visible); +} + } // namespace ash
diff --git a/ash/host/ash_window_tree_host_platform.h b/ash/host/ash_window_tree_host_platform.h index a265802..253da8a 100644 --- a/ash/host/ash_window_tree_host_platform.h +++ b/ash/host/ash_window_tree_host_platform.h
@@ -10,13 +10,19 @@ #include "ash/ash_export.h" #include "ash/host/ash_window_tree_host.h" #include "ash/host/transformer_helper.h" +#include "ui/aura/mus/input_method_mus_delegate.h" #include "ui/aura/window_tree_host_platform.h" +namespace aura { +class InputMethodMus; +} + namespace ash { class ASH_EXPORT AshWindowTreeHostPlatform : public AshWindowTreeHost, - public aura::WindowTreeHostPlatform { + public aura::WindowTreeHostPlatform, + public aura::InputMethodMusDelegate { public: explicit AshWindowTreeHostPlatform(const gfx::Rect& initial_bounds); ~AshWindowTreeHostPlatform() override; @@ -48,7 +54,14 @@ const viz::LocalSurfaceId& local_surface_id) override; void DispatchEvent(ui::Event* event) override; + // aura::InputMethodMusDelegate: + void SetTextInputState(ui::mojom::TextInputStatePtr state) override; + void SetImeVisibility(bool visible, + ui::mojom::TextInputStatePtr state) override; + private: + void InitInputMethodIfNecessary(); + // Temporarily disable the tap-to-click feature. Used on CrOS. void SetTapToClickPaused(bool state); @@ -56,6 +69,13 @@ gfx::Rect last_cursor_confine_bounds_in_pixels_; + // Use InputMethodMus as the InputMethod implementation. InputMethodMus ends + // up connection to the UI Service over mojo, which is in process, but + // simplifies things. In particular, even though the WindowService is in + // process, parts of ime live in it's own process, so by using InputMethodMus + // those connections are correctly established. + std::unique_ptr<aura::InputMethodMus> input_method_; + DISALLOW_COPY_AND_ASSIGN(AshWindowTreeHostPlatform); };
diff --git a/ash/shell.cc b/ash/shell.cc index 6af87e28..842028c6 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -186,6 +186,7 @@ #include "ui/aura/mus/window_tree_client.h" #include "ui/aura/window.h" #include "ui/aura/window_event_dispatcher.h" +#include "ui/base/ui_base_features.h" #include "ui/base/ui_base_switches.h" #include "ui/base/user_activity/user_activity_detector.h" #include "ui/chromeos/user_activity_power_manager_notifier.h" @@ -277,10 +278,10 @@ CHECK(!instance_); instance_ = new Shell(std::move(init_params.delegate), std::move(init_params.shell_port)); - instance_->Init(init_params.context_factory, - init_params.context_factory_private, - std::move(init_params.initial_display_prefs), - std::move(init_params.gpu_interface_provider)); + instance_->Init( + init_params.context_factory, init_params.context_factory_private, + std::move(init_params.initial_display_prefs), + std::move(init_params.gpu_interface_provider), init_params.connector); return instance_; } @@ -403,7 +404,8 @@ // static bool Shell::ShouldUseIMEService() { - return Shell::GetAshConfig() == Config::MASH; + return Shell::GetAshConfig() == Config::MASH || + base::FeatureList::IsEnabled(::features::kOopAsh); } // static @@ -959,9 +961,12 @@ ui::ContextFactory* context_factory, ui::ContextFactoryPrivate* context_factory_private, std::unique_ptr<base::Value> initial_display_prefs, - std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider) { + std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider, + service_manager::Connector* connector) { const Config config = shell_port_->GetAshConfig(); + connector_ = connector; + // This creates the MessageCenter object which is used by some other objects // initialized here, so it needs to come early. message_center_controller_ = std::make_unique<MessageCenterController>(); @@ -1300,8 +1305,10 @@ if (config != Config::MASH) { window_service_owner_ = std::make_unique<WindowServiceOwner>(std::move(gpu_interface_provider)); - ime_focus_handler_ = std::make_unique<ImeFocusHandler>( - focus_controller(), window_tree_host_manager_->input_method()); + if (!ShouldUseIMEService()) { + ime_focus_handler_ = std::make_unique<ImeFocusHandler>( + focus_controller(), window_tree_host_manager_->input_method()); + } } for (auto& observer : shell_observers_)
diff --git a/ash/shell.h b/ash/shell.h index b428662..e815e18 100644 --- a/ash/shell.h +++ b/ash/shell.h
@@ -56,6 +56,10 @@ class KeyboardController; } // namespace keyboard +namespace service_manager { +class Connector; +} + namespace ui { class ContextFactory; class ContextFactoryPrivate; @@ -381,6 +385,7 @@ ClientImageRegistry* client_image_registry() { return client_image_registry_.get(); } + service_manager::Connector* connector() { return connector_; } CrosDisplayConfig* cros_display_config() { return cros_display_config_.get(); } @@ -679,7 +684,8 @@ ui::ContextFactory* context_factory, ui::ContextFactoryPrivate* context_factory_private, std::unique_ptr<base::Value> initial_display_prefs, - std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider); + std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider, + service_manager::Connector* connector); // Initializes the display manager and related components. void InitializeDisplayManager(); @@ -744,6 +750,7 @@ std::unique_ptr<CastConfigController> cast_config_; std::unique_ptr<ClientImageRegistry> client_image_registry_; std::unique_ptr<CrosDisplayConfig> cros_display_config_; + service_manager::Connector* connector_ = nullptr; std::unique_ptr<DetachableBaseHandler> detachable_base_handler_; std::unique_ptr<DetachableBaseNotificationController> detachable_base_notification_controller_;
diff --git a/ash/shell_init_params.h b/ash/shell_init_params.h index ca43697..71fb2d5 100644 --- a/ash/shell_init_params.h +++ b/ash/shell_init_params.h
@@ -13,6 +13,10 @@ class Value; } +namespace service_manager { +class Connector; +} + namespace ui { class ContextFactory; class ContextFactoryPrivate; @@ -42,6 +46,9 @@ // Allows gpu interfaces to be injected while avoiding direct content // dependencies. std::unique_ptr<ui::ws2::GpuInterfaceProvider> gpu_interface_provider; + + // Connector used by Shell to establish connections. + service_manager::Connector* connector = nullptr; }; } // namespace ash
diff --git a/base/files/file.cc b/base/files/file.cc index 1a4ee370..e8934b1 100644 --- a/base/files/file.cc +++ b/base/files/file.cc
@@ -36,11 +36,13 @@ } #endif -File::File(PlatformFile platform_file) +File::File(PlatformFile platform_file) : File(platform_file, false) {} + +File::File(PlatformFile platform_file, bool async) : file_(platform_file), error_details_(FILE_OK), created_(false), - async_(false) { + async_(async) { #if defined(OS_POSIX) || defined(OS_FUCHSIA) DCHECK_GE(platform_file, -1); #endif @@ -64,15 +66,6 @@ Close(); } -// static -File File::CreateForAsyncHandle(PlatformFile platform_file) { - File file(platform_file); - // It would be nice if we could validate that |platform_file| was opened with - // FILE_FLAG_OVERLAPPED on Windows but this doesn't appear to be possible. - file.async_ = true; - return file; -} - File& File::operator=(File&& other) { Close(); SetPlatformFile(other.TakePlatformFile());
diff --git a/base/files/file.h b/base/files/file.h index c3a31d8..ca99b131 100644 --- a/base/files/file.h +++ b/base/files/file.h
@@ -153,9 +153,14 @@ // |path| contains path traversal ('..') components. File(const FilePath& path, uint32_t flags); - // Takes ownership of |platform_file|. + // Takes ownership of |platform_file| and sets async to false. explicit File(PlatformFile platform_file); + // Takes ownership of |platform_file| and sets async to the given value. + // This constructor exists because on Windows you can't check if platform_file + // is async or not. + File(PlatformFile platform_file, bool async); + // Creates an object with a specific error_details code. explicit File(Error error_details); @@ -163,9 +168,6 @@ ~File(); - // Takes ownership of |platform_file|. - static File CreateForAsyncHandle(PlatformFile platform_file); - File& operator=(File&& other); // Creates or opens the given file.
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc index 45cef58..fffec5e 100644 --- a/base/files/file_posix.cc +++ b/base/files/file_posix.cc
@@ -395,10 +395,7 @@ if (other_fd == -1) return File(File::GetLastFileError()); - File other(other_fd); - if (async()) - other.async_ = true; - return other; + return File(other_fd, async()); } // Static.
diff --git a/base/files/file_unittest.cc b/base/files/file_unittest.cc index 65bf62d..8a57322 100644 --- a/base/files/file_unittest.cc +++ b/base/files/file_unittest.cc
@@ -745,4 +745,18 @@ file.Close(); ASSERT_TRUE(base::PathExists(file_path)); } + +// Check that we handle the async bit being set incorrectly in a sane way. +TEST(FileTest, UseSyncApiWithAsyncFile) { + base::ScopedTempDir temp_dir; + ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); + FilePath file_path = temp_dir.GetPath().AppendASCII("file"); + + File file(file_path, base::File::FLAG_CREATE | base::File::FLAG_WRITE | + base::File::FLAG_ASYNC); + File lying_file(file.TakePlatformFile(), false /* async */); + ASSERT_TRUE(lying_file.IsValid()); + + ASSERT_EQ(lying_file.WriteAtCurrentPos("12345", 5), -1); +} #endif // defined(OS_WIN)
diff --git a/base/files/file_win.cc b/base/files/file_win.cc index d7bffc3b..82cd7e8 100644 --- a/base/files/file_win.cc +++ b/base/files/file_win.cc
@@ -269,10 +269,7 @@ return File(GetLastFileError()); } - File other(other_handle); - if (async()) - other.async_ = true; - return other; + return File(other_handle, async()); } bool File::DeleteOnClose(bool delete_on_close) {
diff --git a/base/message_loop/incoming_task_queue.cc b/base/message_loop/incoming_task_queue.cc index 83800d1..9e6931b 100644 --- a/base/message_loop/incoming_task_queue.cc +++ b/base/message_loop/incoming_task_queue.cc
@@ -54,11 +54,9 @@ IncomingTaskQueue::IncomingTaskQueue(MessageLoop* message_loop) : always_schedule_work_(AlwaysNotifyPump(message_loop->type())), triage_tasks_(this), - delayed_tasks_(this), - deferred_tasks_(this), message_loop_(message_loop) { - // The constructing sequence is not necessarily the running sequence in the - // case of base::Thread. + // The constructing sequence is not necessarily the running sequence, e.g. in + // the case of a MessageLoop created unbound. DETACH_FROM_SEQUENCE(sequence_checker_); } @@ -155,10 +153,6 @@ DCHECK(!queue_.empty()); PendingTask pending_task = std::move(queue_.front()); queue_.pop(); - - if (pending_task.is_high_res) - --outer_->pending_high_res_tasks_; - return pending_task; } @@ -205,49 +199,46 @@ void IncomingTaskQueue::TriageQueue::ReloadFromIncomingQueueIfEmpty() { DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); if (queue_.empty()) { - // Incrementing the high resolution task count now will have the impact of - // triggering the high resolution timer before these tasks arrive in the - // delayed queue. This is fine as this loop will remain awake anyways until - // the triage queue is empty and has placed any delayed tasks in the delayed - // queue. - outer_->pending_high_res_tasks_ += outer_->ReloadWorkQueue(&queue_); + outer_->ReloadWorkQueue(&queue_); } } -IncomingTaskQueue::DelayedQueue::DelayedQueue(IncomingTaskQueue* outer) - : outer_(outer) {} +IncomingTaskQueue::DelayedQueue::DelayedQueue() { + DETACH_FROM_SEQUENCE(sequence_checker_); +} IncomingTaskQueue::DelayedQueue::~DelayedQueue() = default; void IncomingTaskQueue::DelayedQueue::Push(PendingTask pending_task) { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); if (pending_task.is_high_res) - ++outer_->pending_high_res_tasks_; + ++pending_high_res_tasks_; queue_.push(std::move(pending_task)); } const PendingTask& IncomingTaskQueue::DelayedQueue::Peek() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!queue_.empty()); return queue_.top(); } PendingTask IncomingTaskQueue::DelayedQueue::Pop() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!queue_.empty()); PendingTask delayed_task = std::move(const_cast<PendingTask&>(queue_.top())); queue_.pop(); if (delayed_task.is_high_res) - --outer_->pending_high_res_tasks_; + --pending_high_res_tasks_; + DCHECK_GE(pending_high_res_tasks_, 0); return delayed_task; } bool IncomingTaskQueue::DelayedQueue::HasTasks() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // TODO(robliao): The other queues don't check for IsCancelled(). Should they? while (!queue_.empty() && Peek().task.IsCancelled()) Pop(); @@ -256,57 +247,48 @@ } void IncomingTaskQueue::DelayedQueue::Clear() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); while (!queue_.empty()) Pop(); } size_t IncomingTaskQueue::DelayedQueue::Size() const { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return queue_.size(); } -IncomingTaskQueue::DeferredQueue::DeferredQueue(IncomingTaskQueue* outer) - : outer_(outer) {} +IncomingTaskQueue::DeferredQueue::DeferredQueue() { + DETACH_FROM_SEQUENCE(sequence_checker_); +} IncomingTaskQueue::DeferredQueue::~DeferredQueue() = default; void IncomingTaskQueue::DeferredQueue::Push(PendingTask pending_task) { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); - - // TODO(robliao): These tasks should not count towards the high res task count - // since they are no longer in the delayed queue. - if (pending_task.is_high_res) - ++outer_->pending_high_res_tasks_; - + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); queue_.push(std::move(pending_task)); } const PendingTask& IncomingTaskQueue::DeferredQueue::Peek() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!queue_.empty()); return queue_.front(); } PendingTask IncomingTaskQueue::DeferredQueue::Pop() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK(!queue_.empty()); PendingTask deferred_task = std::move(queue_.front()); queue_.pop(); - - if (deferred_task.is_high_res) - --outer_->pending_high_res_tasks_; - return deferred_task; } bool IncomingTaskQueue::DeferredQueue::HasTasks() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); return !queue_.empty(); } void IncomingTaskQueue::DeferredQueue::Clear() { - DCHECK_CALLED_ON_VALID_SEQUENCE(outer_->sequence_checker_); + DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); while (!queue_.empty()) Pop(); } @@ -352,11 +334,6 @@ bool IncomingTaskQueue::PostPendingTaskLockRequired(PendingTask* pending_task) { incoming_queue_lock_.AssertAcquired(); -#if defined(OS_WIN) - if (pending_task->is_high_res) - ++high_res_task_count_; -#endif - // Initialize the sequence number. The sequence number is used for delayed // tasks (to facilitate FIFO sorting when two tasks have the same // delayed_run_time value) and for identifying the task in about:tracing. @@ -380,7 +357,7 @@ return false; } -int IncomingTaskQueue::ReloadWorkQueue(TaskQueue* work_queue) { +void IncomingTaskQueue::ReloadWorkQueue(TaskQueue* work_queue) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); // Make sure no tasks are lost. @@ -396,10 +373,6 @@ } else { incoming_queue_.swap(*work_queue); } - // Reset the count of high resolution tasks since our queue is now empty. - int high_res_tasks = high_res_task_count_; - high_res_task_count_ = 0; - return high_res_tasks; } } // namespace internal
diff --git a/base/message_loop/incoming_task_queue.h b/base/message_loop/incoming_task_queue.h index 803a9b8..c89b2b90 100644 --- a/base/message_loop/incoming_task_queue.h +++ b/base/message_loop/incoming_task_queue.h
@@ -93,9 +93,9 @@ Queue& deferred_tasks() { return deferred_tasks_; } - bool HasPendingHighResolutionTasks() { + bool HasPendingHighResolutionTasks() const { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); - return pending_high_res_tasks_ > 0; + return delayed_tasks_.HasPendingHighResolutionTasks(); } // Reports UMA metrics about its queues before the MessageLoop goes to sleep @@ -153,7 +153,7 @@ class DelayedQueue : public Queue { public: - DelayedQueue(IncomingTaskQueue* outer); + DelayedQueue(); ~DelayedQueue() override; // Queue: @@ -165,17 +165,24 @@ void Push(PendingTask pending_task) override; size_t Size() const; + bool HasPendingHighResolutionTasks() const { + return pending_high_res_tasks_ > 0; + } private: - IncomingTaskQueue* const outer_; DelayedTaskQueue queue_; + // Number of high resolution tasks in |queue_|. + int pending_high_res_tasks_ = 0; + + SEQUENCE_CHECKER(sequence_checker_); + DISALLOW_COPY_AND_ASSIGN(DelayedQueue); }; class DeferredQueue : public Queue { public: - DeferredQueue(IncomingTaskQueue* outer); + DeferredQueue(); ~DeferredQueue() override; // Queue: @@ -186,9 +193,10 @@ void Push(PendingTask pending_task) override; private: - IncomingTaskQueue* const outer_; TaskQueue queue_; + SEQUENCE_CHECKER(sequence_checker_); + DISALLOW_COPY_AND_ASSIGN(DeferredQueue); }; @@ -205,9 +213,8 @@ bool PostPendingTaskLockRequired(PendingTask* pending_task); // Loads tasks from the |incoming_queue_| into |*work_queue|. Must be called - // from the sequence processing the tasks. Returns the number of tasks that - // require high resolution timers in |work_queue|. - int ReloadWorkQueue(TaskQueue* work_queue); + // from the sequence processing the tasks. + void ReloadWorkQueue(TaskQueue* work_queue); // Checks calls made only on the MessageLoop thread. SEQUENCE_CHECKER(sequence_checker_); @@ -227,9 +234,6 @@ // Queue for non-nestable deferred tasks on the |sequence_checker_| sequence. DeferredQueue deferred_tasks_; - // Number of high resolution tasks in the sequence affine queues above. - int pending_high_res_tasks_ = 0; - // Lock that serializes |message_loop_->ScheduleWork()| calls as well as // prevents |message_loop_| from being made nullptr during such a call. base::Lock message_loop_lock_; @@ -240,10 +244,6 @@ // Synchronizes access to all members below this line. base::Lock incoming_queue_lock_; - // Number of tasks that require high resolution timing. This value is kept - // so that ReloadWorkQueue() completes in constant time. - int high_res_task_count_ = 0; - // An incoming queue of tasks that are acquired under a mutex for processing // on this instance's thread. These tasks have not yet been been pushed to // |triage_tasks_|.
diff --git a/build/config/gcc/BUILD.gn b/build/config/gcc/BUILD.gn index 614d55dc..b6f4f5f 100644 --- a/build/config/gcc/BUILD.gn +++ b/build/config/gcc/BUILD.gn
@@ -98,6 +98,10 @@ # Settings for executables. config("executable_ldconfig") { + # WARNING! //sandbox/linux:chrome_sandbox will not pick up this + # config, because it is a setuid binary that needs special flags. + # If you add things to this config, make sure you check to see + # if they should be added to that target as well. ldflags = [] if (is_android) { ldflags += [
diff --git a/build/install-build-deps.sh b/build/install-build-deps.sh index 340436bc..d371c16 100755 --- a/build/install-build-deps.sh +++ b/build/install-build-deps.sh
@@ -17,6 +17,9 @@ "fonts" echo "--[no-]nacl: enable or disable installation of prerequisites for"\ "building standalone NaCl and all its toolchains" + echo "--[no-]backwards-compatible: enable or disable installation of packages + that are no longer currently needed and have been removed from this + script. Useful for bisection." echo "--no-prompt: silently select standard options/defaults" echo "--quick-check: quickly try to determine if dependencies are installed" echo " (this avoids interactive prompts and sudo commands," @@ -46,21 +49,23 @@ while [ "$1" != "" ] do case "$1" in - --syms) do_inst_syms=1;; - --no-syms) do_inst_syms=0;; - --lib32) do_inst_lib32=1;; - --arm) do_inst_arm=1;; - --no-arm) do_inst_arm=0;; - --chromeos-fonts) do_inst_chromeos_fonts=1;; - --no-chromeos-fonts) do_inst_chromeos_fonts=0;; - --nacl) do_inst_nacl=1;; - --no-nacl) do_inst_nacl=0;; - --add-cross-tool-repo) add_cross_tool_repo=1;; - --no-prompt) do_default=1 - do_quietly="-qq --assume-yes" + --syms) do_inst_syms=1;; + --no-syms) do_inst_syms=0;; + --lib32) do_inst_lib32=1;; + --arm) do_inst_arm=1;; + --no-arm) do_inst_arm=0;; + --chromeos-fonts) do_inst_chromeos_fonts=1;; + --no-chromeos-fonts) do_inst_chromeos_fonts=0;; + --nacl) do_inst_nacl=1;; + --no-nacl) do_inst_nacl=0;; + --backwards-compatible) do_inst_backwards_compatible=1;; + --no-backwards-compatible) do_inst_backwards_compatible=0;; + --add-cross-tool-repo) add_cross_tool_repo=1;; + --no-prompt) do_default=1 + do_quietly="-qq --assume-yes" ;; - --quick-check) do_quick_check=1;; - --unsupported) do_unsupported=1;; + --quick-check) do_quick_check=1;; + --unsupported) do_unsupported=1;; *) usage;; esac shift @@ -254,6 +259,62 @@ # 32-bit libraries needed for a 32-bit build lib32_list="$lib32_list libx11-xcb1:i386" +# Packages that have been removed from this script. Regardless of configuration +# or options passed to this script, whenever a package is removed, it should be +# added here. +backwards_compatible_list="\ + 7za + fonts-indic + fonts-ipafont + fonts-stix + fonts-thai-tlwg + fonts-tlwg-garuda + language-pack-da + language-pack-fr + language-pack-he + language-pack-zh-hant + libappindicator3-1:i386 + libdconf-dev + libdconf-dev:i386 + libdconf1 + libdconf1:i386 + libexif-dev + libexif12 + libexif12:i386 + libgbm-dev + libgconf-2-4:i386 + libgconf2-dev + libgl1-mesa-dev + libgl1-mesa-glx:i386 + libgles2-mesa-dev + mesa-common-dev + msttcorefonts + ttf-dejavu-core + ttf-indic-fonts + ttf-kochi-gothic + ttf-kochi-mincho + ttf-mscorefonts-installer + xfonts-mathml +" +case $distro_codename in + trusty) + backwards_compatible_list+=" \ + libgbm-dev-lts-trusty + libgl1-mesa-dev-lts-trusty + libgl1-mesa-glx-lts-trusty:i386 + libgles2-mesa-dev-lts-trusty + mesa-common-dev-lts-trusty" + ;; + xenial) + backwards_compatible_list+=" \ + libgbm-dev-lts-xenial + libgl1-mesa-dev-lts-xenial + libgl1-mesa-glx-lts-xenial:i386 + libgles2-mesa-dev-lts-xenial + mesa-common-dev-lts-xenial" + ;; +esac + # arm cross toolchain packages needed to build chrome on armhf EM_REPO="deb http://emdebian.org/tools/debian/ jessie main" EM_SOURCE=$(cat <<EOF @@ -467,6 +528,8 @@ dbg_list="${dbg_list} libstdc++6-4.8-dbg" elif package_exists libstdc++6-4.7-dbg; then dbg_list="${dbg_list} libstdc++6-4.7-dbg" + elif package_exists libstdc++6-4.6-dbg; then + dbg_list="${dbg_list} libstdc++6-4.6-dbg" fi fi if [ "$(dbg_package_name libatk1.0-0)" == "" ]; then @@ -501,11 +564,22 @@ nacl_list= fi +filtered_backwards_compatible_list= +if [ "$do_inst_backwards_compatible" = "1" ]; then + echo "Including backwards compatible packages." + for package in ${backwards_compatible_list}; do + if package_exists ${package}; then + filtered_backwards_compatible_list+=" ${package}" + fi + done +fi + # The `sort -r -s -t: -k2` sorts all the :i386 packages to the front, to avoid # confusing dpkg-query (crbug.com/446172). packages="$( - echo "${dev_list} ${lib_list} ${dbg_list} ${lib32_list} ${arm_list}"\ - "${nacl_list}" | tr " " "\n" | sort -u | sort -r -s -t: -k2 | tr "\n" " " + echo "${dev_list} ${lib_list} ${dbg_list} ${lib32_list} ${arm_list}" \ + "${nacl_list}" ${filtered_backwards_compatible_list} | tr " " "\n" | \ + sort -u | sort -r -s -t: -k2 | tr "\n" " " )" if [ 1 -eq "${do_quick_check-0}" ] ; then
diff --git a/cc/paint/paint_op_reader.cc b/cc/paint/paint_op_reader.cc index e9c885c..bfe3661 100644 --- a/cc/paint/paint_op_reader.cc +++ b/cc/paint/paint_op_reader.cc
@@ -153,23 +153,6 @@ remaining_bytes_ -= bytes; } -void PaintOpReader::ReadArray(size_t count, SkPoint* array) { - size_t bytes = count * sizeof(SkPoint); - if (remaining_bytes_ < bytes) - SetInvalid(); - // Overflow? - if (count > static_cast<size_t>(~0) / sizeof(SkPoint)) - SetInvalid(); - if (!valid_) - return; - if (count == 0) - return; - - memcpy(array, const_cast<const char*>(memory_), bytes); - memory_ += bytes; - remaining_bytes_ -= bytes; -} - void PaintOpReader::ReadSize(size_t* size) { ReadSimple(size); }
diff --git a/cc/paint/paint_op_reader.h b/cc/paint/paint_op_reader.h index c8455fe..0188c8d 100644 --- a/cc/paint/paint_op_reader.h +++ b/cc/paint/paint_op_reader.h
@@ -45,7 +45,6 @@ size_t remaining_bytes() const { return remaining_bytes_; } void ReadData(size_t bytes, void* data); - void ReadArray(size_t count, SkPoint* array); void ReadSize(size_t* size); void Read(SkScalar* data);
diff --git a/cc/paint/paint_op_writer.cc b/cc/paint/paint_op_writer.cc index ded7b669..2caf4eb 100644 --- a/cc/paint/paint_op_writer.cc +++ b/cc/paint/paint_op_writer.cc
@@ -442,11 +442,6 @@ remaining_bytes_ -= bytes; } -void PaintOpWriter::WriteArray(size_t count, const SkPoint* input) { - size_t bytes = sizeof(SkPoint) * count; - WriteData(bytes, input); -} - void PaintOpWriter::AlignMemory(size_t alignment) { // Due to the math below, alignment must be a power of two. DCHECK_GT(alignment, 0u);
diff --git a/cc/paint/paint_op_writer.h b/cc/paint/paint_op_writer.h index ecca69c..47137ef0 100644 --- a/cc/paint/paint_op_writer.h +++ b/cc/paint/paint_op_writer.h
@@ -40,8 +40,6 @@ // Write a sequence of arbitrary bytes. void WriteData(size_t bytes, const void* input); - void WriteArray(size_t count, const SkPoint* input); - size_t size() const { return valid_ ? size_ - remaining_bytes_ : 0u; } void WriteSize(size_t size);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java index 7cbdfdc..d3a9dc7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeActivity.java
@@ -1423,6 +1423,10 @@ findViewById(R.id.keyboard_accessory_stub), findViewById(R.id.keyboard_accessory_sheet_stub)); + if (mToolbarManager != null && mToolbarManager.getToolbar() != null) { + mToolbarManager.getToolbar().setScrim(mFadingBackgroundView); + } + if (supportsContextualSuggestionsBottomSheet() && FeatureUtilities.isContextualSuggestionsBottomSheetEnabled(isTablet())) { getLayoutInflater().inflate(R.layout.bottom_sheet, coordinator); @@ -2464,7 +2468,9 @@ private void clearToolbarResourceCache() { ControlContainer controlContainer = (ControlContainer) findViewById(R.id.control_container); - controlContainer.getToolbarResourceAdapter().dropCachedBitmap(); + if (controlContainer != null) { + controlContainer.getToolbarResourceAdapter().dropCachedBitmap(); + } } @Override
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java index e575fc2..ed8b3d4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java
@@ -124,6 +124,7 @@ import org.chromium.chrome.browser.tabmodel.TabModelSelectorTabObserver; import org.chromium.chrome.browser.tabmodel.TabModelUtils; import org.chromium.chrome.browser.tabmodel.TabWindowManager; +import org.chromium.chrome.browser.tasks.TasksUma; import org.chromium.chrome.browser.toolbar.ToolbarButtonInProductHelpController; import org.chromium.chrome.browser.toolbar.ToolbarControlContainer; import org.chromium.chrome.browser.util.FeatureUtilities; @@ -1471,6 +1472,14 @@ setStatusBarColor(null, Color.BLACK); } } + + @Override + public void onTabStateInitialized() { + if (!mCreatedTabOnStartup) return; + + TabModel model = mTabModelSelectorImpl.getModel(false); + TasksUma.recordTasksUma(model); + } }); mTabModelSelectorTabObserver = new TabModelSelectorTabObserver(mTabModelSelectorImpl) {
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadActivity.java index 02a36944..97342f9 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadActivity.java
@@ -109,6 +109,6 @@ @Override public void onRequestPermissionsResult( int requestCode, String[] permissions, int[] grantResults) { - mPermissionDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults); + mPermissionDelegate.handlePermissionResult(requestCode, permissions, grantResults); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java index e88ab16..20735d4 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/DownloadController.java
@@ -165,7 +165,7 @@ if (activity instanceof ChromeActivity) { WindowAndroid windowAndroid = ((ChromeActivity) activity).getWindowAndroid(); if (windowAndroid != null) { - delegate = windowAndroid.getAndroidPermissionDelegate(); + delegate = windowAndroid; } } else if (activity instanceof DownloadActivity) { delegate = ((DownloadActivity) activity).getAndroidPermissionDelegate();
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java index bde64142..cfa0156 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/download/ui/SpaceDisplay.java
@@ -15,6 +15,7 @@ import android.widget.TextView; import org.chromium.base.ApiCompatibilityUtils; +import org.chromium.base.Callback; import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.base.ObserverList; @@ -25,7 +26,6 @@ import org.chromium.chrome.browser.widget.MaterialProgressBar; import java.io.File; -import java.util.concurrent.ExecutionException; import java.util.concurrent.RejectedExecutionException; /** A View that manages the display of space used by the downloads. */ @@ -55,9 +55,11 @@ * space is free. */ private boolean mFetchTotalSize; + private Callback<Long> mOnTaskCompleteCallback; - StorageSizeTask(boolean fetchTotalSize) { + StorageSizeTask(boolean fetchTotalSize, Callback<Long> onTaskCompleteCallback) { mFetchTotalSize = fetchTotalSize; + mOnTaskCompleteCallback = onTaskCompleteCallback; } @Override @@ -94,10 +96,14 @@ return 0L; } } + + @Override + protected void onPostExecute(Long bytes) { + mOnTaskCompleteCallback.onResult(bytes); + } }; private final ObserverList<Observer> mObservers = new ObserverList<>(); - private final AsyncTask<Void, Void, Long> mFileSystemBytesTask; private AsyncTask<Void, Void, Long> mFreeBytesTask; private DownloadHistoryAdapter mHistoryAdapter; @@ -107,6 +113,7 @@ private TextView mSpaceFreeAndOtherAppsTextView; private MaterialProgressBar mSpaceBar; private long mFreeBytes; + private long mFileSystemBytes; SpaceDisplay(final ViewGroup parent, DownloadHistoryAdapter historyAdapter) { mHistoryAdapter = historyAdapter; @@ -117,8 +124,22 @@ mSpaceFreeAndOtherAppsTextView = (TextView) mView.findViewById(R.id.size_free_and_other_apps); mSpaceBar = (MaterialProgressBar) mView.findViewById(R.id.space_bar); - mFileSystemBytesTask = - new StorageSizeTask(true).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + new StorageSizeTask(true, this ::onFileSystemBytesTaskFinished) + .executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); + } + + private void onFileSystemBytesTaskFinished(Long bytes) { + mFileSystemBytes = bytes; + long bytesUsedByDownloads = Math.max(0, mHistoryAdapter.getTotalDownloadSize()); + RecordHistogram.recordPercentageHistogram("Android.DownloadManager.SpaceUsed", + computePercentage(bytesUsedByDownloads, bytes)); + updateSpaceDisplay(); + } + + private void onFreeBytesTaskFinished(Long bytes) { + mFreeBytes = bytes; + mFreeBytesTask = null; + updateSpaceDisplay(); } /** @return The view container of space display view. */ @@ -133,25 +154,9 @@ @Override public void onChanged() { - // Record how much the user has downloaded relative to the size of their storage. - try { - long bytesUsedByDownloads = Math.max(0, mHistoryAdapter.getTotalDownloadSize()); - RecordHistogram.recordPercentageHistogram("Android.DownloadManager.SpaceUsed", - computePercentage(bytesUsedByDownloads, mFileSystemBytesTask.get())); - } catch (ExecutionException | InterruptedException e) { - // Can't record what we don't have. - } - // Determine how much space is free now, then update the display. if (mFreeBytesTask == null) { - mFreeBytesTask = new StorageSizeTask(false) { - @Override - protected void onPostExecute(Long bytes) { - mFreeBytes = bytes.longValue(); - mFreeBytesTask = null; - update(); - } - }; + mFreeBytesTask = new StorageSizeTask(false, this ::onFreeBytesTaskFinished); try { mFreeBytesTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); @@ -166,17 +171,9 @@ mObservers.addObserver(observer); } - private void update() { - long fileSystemBytes = 0; - - try { - fileSystemBytes = mFileSystemBytesTask.get(); - } catch (ExecutionException | InterruptedException e) { - // Can't do anything here. - } - + private void updateSpaceDisplay() { // Indicate how much space has been used by everything on the device via the progress bar. - long bytesUsedTotal = Math.max(0, fileSystemBytes - mFreeBytes); + long bytesUsedTotal = Math.max(0, mFileSystemBytes - mFreeBytes); long bytesUsedByDownloads = Math.max(0, mHistoryAdapter.getTotalDownloadSize()); long bytesUsedByOtherApps = Math.max(0, bytesUsedTotal - bytesUsedByDownloads); @@ -193,15 +190,15 @@ spaceFree, spaceUsedByOtherApps)); // Set a minimum size for the download size so that it shows up in the progress bar. - long threePercentOfSystem = fileSystemBytes == 0 ? 0 : fileSystemBytes / 100 * 3; + long threePercentOfSystem = mFileSystemBytes == 0 ? 0 : mFileSystemBytes / 100 * 3; long fudgedBytesUsedByDownloads = Math.max(bytesUsedByDownloads, threePercentOfSystem); long fudgedBytesUsedByOtherApps = Math.max(bytesUsedByOtherApps, threePercentOfSystem); // Indicate how much space has been used as a progress bar. The percentage used by // downloads is shown by the non-overlapped area of the primary and secondary progressbar. int percentageUsedTotal = computePercentage( - fudgedBytesUsedByDownloads + fudgedBytesUsedByOtherApps, fileSystemBytes); - int percentageDownloaded = computePercentage(fudgedBytesUsedByDownloads, fileSystemBytes); + fudgedBytesUsedByDownloads + fudgedBytesUsedByOtherApps, mFileSystemBytes); + int percentageDownloaded = computePercentage(fudgedBytesUsedByDownloads, mFileSystemBytes); mSpaceBar.setProgress(percentageUsedTotal); mSpaceBar.setSecondaryProgress(percentageDownloaded);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridge.java index 0888b0a..a6f97c7 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridge.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridge.java
@@ -31,11 +31,18 @@ } /** - * Fetches an icon from a url and returns in a Bitmap image. + * Fetches an icon from a url and returns in a Bitmap image. The callback argument will be null + * if the operation fails. */ - public static void getIcon(final String iconUrl, final Callback<Bitmap> callback) {} + public static void getIcon( + Profile profile, final String iconUrl, final Callback<Bitmap> callback) { + nativeGetIcon(profile, iconUrl, callback); + } private static native void nativeGetNtpCategories(Profile profile, List<ExploreSitesCategoryTile> result, Callback<List<ExploreSitesCategoryTile>> callback); + private static native void nativeGetIcon( + Profile profile, String iconUrl, Callback<Bitmap> callback); + public static native String nativeGetCatalogUrl(); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesSection.java b/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesSection.java index 8bf7b70..f9a2b762 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesSection.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/explore_sites/ExploreSitesSection.java
@@ -61,7 +61,7 @@ -> mNavigationDelegate.navigateToSuggestionUrl( WindowOpenDisposition.CURRENT_TAB, tile.getNavigationUrl())); ExploreSitesBridge.getIcon( - tile.getIconUrl(), (Bitmap icon) -> onIconRetrieved(tileView, icon)); + mProfile, tile.getIconUrl(), (Bitmap icon) -> onIconRetrieved(tileView, icon)); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java b/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java index b0d2386..78ad9b23 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/init/AsyncInitializationActivity.java
@@ -577,7 +577,7 @@ public void onRequestPermissionsResult( int requestCode, String[] permissions, int[] grantResults) { if (mWindowAndroid != null) { - if (mWindowAndroid.onRequestPermissionsResult(requestCode, permissions, grantResults)) { + if (mWindowAndroid.handlePermissionResult(requestCode, permissions, grantResults)) { return; } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerWrapper.java b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerWrapper.java index b1746338..c3df5d1e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerWrapper.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/media/remote/RemoteMediaPlayerWrapper.java
@@ -8,8 +8,11 @@ import com.google.android.gms.cast.MediaInfo; import com.google.android.gms.cast.MediaStatus; import com.google.android.gms.cast.RemoteMediaPlayer; +import com.google.android.gms.cast.RemoteMediaPlayer.MediaChannelResult; import com.google.android.gms.common.api.GoogleApiClient; +import com.google.android.gms.common.api.ResultCallback; +import org.chromium.base.Log; import org.chromium.chrome.browser.media.router.MediaController; import org.chromium.chrome.browser.media.router.cast.CastSessionUtil; import org.chromium.chrome.browser.media.ui.MediaNotificationInfo; @@ -21,7 +24,10 @@ */ public class RemoteMediaPlayerWrapper implements RemoteMediaPlayer.OnMetadataUpdatedListener, RemoteMediaPlayer.OnStatusUpdatedListener, + ResultCallback<MediaChannelResult>, MediaController { + private static final String TAG = "MediaRemoting"; + private final CastDevice mCastDevice; private GoogleApiClient mApiClient; @@ -78,8 +84,14 @@ * Forwards the message to the underlying RemoteMediaPlayer. */ public void onMediaMessage(String message) { - if (mMediaPlayer != null) + if (mMediaPlayer == null) return; + + try { mMediaPlayer.onMessageReceived(mCastDevice, CastSessionUtil.MEDIA_NAMESPACE, message); + } catch (IllegalStateException e) { + // GMS throws with "Result already set" when receiving responses from multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -92,7 +104,8 @@ new MediaInfo.Builder(mediaUrl).setContentType("*/*").setStreamType( MediaInfo.STREAM_TYPE_BUFFERED); - mMediaPlayer.load(mApiClient, mediaInfoBuilder.build(), /* autoplay */ false); + mMediaPlayer.load(mApiClient, mediaInfoBuilder.build(), /* autoplay */ true) + .setResultCallback(this); } /** @@ -103,7 +116,12 @@ public void play() { if (!canSendCommand()) return; - mMediaPlayer.play(mApiClient); + try { + mMediaPlayer.play(mApiClient).setResultCallback(this); + } catch (IllegalStateException e) { + // GMS throws with message "Result already set" when making multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -114,7 +132,12 @@ public void pause() { if (!canSendCommand()) return; - mMediaPlayer.pause(mApiClient); + try { + mMediaPlayer.pause(mApiClient).setResultCallback(this); + } catch (IllegalStateException e) { + // GMS throws with message "Result already set" when making multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -125,7 +148,12 @@ public void setMute(boolean mute) { if (!canSendCommand()) return; - mMediaPlayer.setStreamMute(mApiClient, mute); + try { + mMediaPlayer.setStreamMute(mApiClient, mute).setResultCallback(this); + } catch (IllegalStateException e) { + // GMS throws with message "Result already set" when making multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -136,7 +164,12 @@ public void setVolume(double volume) { if (!canSendCommand()) return; - mMediaPlayer.setStreamVolume(mApiClient, volume); + try { + mMediaPlayer.setStreamVolume(mApiClient, volume).setResultCallback(this); + } catch (IllegalStateException e) { + // GMS throws with message "Result already set" when making multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -147,7 +180,12 @@ public void seek(long position) { if (!canSendCommand()) return; - mMediaPlayer.seek(mApiClient, position); + try { + mMediaPlayer.seek(mApiClient, position).setResultCallback(this); + } catch (IllegalStateException e) { + // GMS throws with message "Result already set" when making multiple API calls + // in a short amount of time, before results can be read. See https://crbug.com/853923. + } } /** @@ -156,4 +194,18 @@ public void clearApiClient() { mApiClient = null; } + + // ResultCallback<MediaChannelResult> implementation + @Override + public void onResult(MediaChannelResult result) { + // When multiple API calls are made in quick succession, "Results have already been set" + // IllegalStateExceptions might be thrown from GMS code. We prefer to catch the exception + // and noop it, than to crash. This might lead to some API calls never getting their + // onResult() called, so we should not rely on onResult() being called for every API call. + // See https://crbug.com/853923. + if (!result.getStatus().isSuccess()) { + Log.e(TAG, "Error when sending command. Status code: %d", + result.getStatus().getStatusCode()); + } + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java index cf20197..e04a4deb1 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBar.java
@@ -17,6 +17,7 @@ import org.chromium.chrome.browser.toolbar.Toolbar; import org.chromium.chrome.browser.toolbar.ToolbarActionModeCallback; import org.chromium.chrome.browser.toolbar.ToolbarDataProvider; +import org.chromium.chrome.browser.widget.FadingBackgroundView; import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet; import org.chromium.ui.base.WindowAndroid; @@ -193,4 +194,9 @@ * to it, used to avoid text overlapping the buttons and vice versa. */ int getUrlContainerMarginEnd(); + + /** + * @param scrim The scrim for this location bar to use. + */ + void setScrim(FadingBackgroundView scrim); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java index d710a0c1..4b6ecbc 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/omnibox/LocationBarLayout.java
@@ -2016,6 +2016,16 @@ } } + @Override + public void setScrim(FadingBackgroundView scrim) { + mFadingView = scrim; + + // In some cases, users can start chrome and immediately start tapping the omnibox. In that + // case, the omnibox will focus, but there is no scrim. This checks if the scrim needs to + // be visible and updates it accordingly. + updateFadingBackgroundView(isUrlBarFocused(), true); + } + /** * Update the fading background view that shows when the omnibox is focused. If Chrome Home is * enabled, this method is a no-op. @@ -2024,22 +2034,16 @@ * scrim. */ protected void updateFadingBackgroundView(boolean visible, boolean ignoreNtpChecks) { - if (mFadingView == null) { - // Some uses of the location bar do not have a tab backing them (like SearchActivity). - if (getCurrentTab() == null || getCurrentTab().getActivity() == null) return; - mFadingView = getCurrentTab().getActivity().getFadingBackgroundView(); - } + if (mFadingView == null) return; NewTabPage ntp = mToolbarDataProvider.getNewTabPageForCurrentTab(); boolean locationBarShownInNTP = ntp != null && ntp.isLocationBarShownInNTP(); - if (mFadingView != null) { - if (visible && (!locationBarShownInNTP || ignoreNtpChecks)) { - // If the location bar is shown in the NTP, the toolbar will eventually trigger a - // fade in. - mFadingView.showFadingOverlay(mScrimParams); - } else { - mFadingView.hideFadingOverlay(!locationBarShownInNTP); - } + if (visible && (!locationBarShownInNTP || ignoreNtpChecks)) { + // If the location bar is shown in the NTP, the toolbar will eventually trigger a + // fade in. + mFadingView.showFadingOverlay(mScrimParams); + } else { + mFadingView.hideFadingOverlay(!locationBarShownInNTP); } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/OWNERS b/chrome/android/java/src/org/chromium/chrome/browser/tasks/OWNERS new file mode 100644 index 0000000..1756ab7 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/OWNERS
@@ -0,0 +1,2 @@ +yusufo@chromium.org +wychen@chromium.org
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tasks/TasksUma.java b/chrome/android/java/src/org/chromium/chrome/browser/tasks/TasksUma.java new file mode 100644 index 0000000..6941b20 --- /dev/null +++ b/chrome/android/java/src/org/chromium/chrome/browser/tasks/TasksUma.java
@@ -0,0 +1,104 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.tasks; + +import org.chromium.base.Log; +import org.chromium.base.metrics.RecordHistogram; +import org.chromium.chrome.browser.tab.Tab; +import org.chromium.chrome.browser.tabmodel.TabModel; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * This class collects UMA statistics for tab group creation or complex tab navigation patterns. + */ +public class TasksUma { + private static final String TAG = "TasksUma"; + + /** + * This method collects the tab creation statistics based on the input {@link TabModel}, and + * records the statistics. + * @param model Collects tab creation statistics from this model + */ + public static void recordTasksUma(TabModel model) { + Map<Integer, List<Integer>> tabsRelationshipList = new HashMap<>(); + getTabsRelationship(model, tabsRelationshipList); + + int tabInGroupsCount = 0; + int tabGroupCount = 0; + List<Integer> rootTabList = tabsRelationshipList.get(Tab.INVALID_TAB_ID); + if (rootTabList == null) { + Log.d(TAG, "TabModel should have at least one root tab"); + return; + } + for (int i = 0; i < rootTabList.size(); i++) { + int tabsInThisGroupCount = + getTabsInOneGroupCount(tabsRelationshipList, rootTabList.get(i)); + if (tabsInThisGroupCount > 1) { + tabInGroupsCount += tabsInThisGroupCount; + tabGroupCount++; + } + } + + recordStatistic(tabInGroupsCount, tabGroupCount, model.getCount()); + } + + private static int getTabsInOneGroupCount( + Map<Integer, List<Integer>> tabsRelationList, int rootId) { + int count = 1; + if (tabsRelationList.containsKey(rootId)) { + List<Integer> childTabsId = tabsRelationList.get(rootId); + for (int i = 0; i < childTabsId.size(); i++) { + count += getTabsInOneGroupCount(tabsRelationList, childTabsId.get(i)); + } + } + return count; + } + + private static void getTabsRelationship( + TabModel model, Map<Integer, List<Integer>> tabsRelationList) { + for (int i = 0; i < model.getCount(); i++) { + Tab currentTab = model.getTabAt(i); + int parentIdOfCurrentTab = currentTab.getParentId(); + if (!tabsRelationList.containsKey(parentIdOfCurrentTab)) { + tabsRelationList.put(parentIdOfCurrentTab, new ArrayList<>()); + } + tabsRelationList.get(parentIdOfCurrentTab).add(currentTab.getId()); + } + } + + private static void recordStatistic( + int tabsInGroupCount, int tabGroupCount, int totalTabCount) { + if (totalTabCount == 0) return; + + RecordHistogram.recordCountHistogram("Tabs.Tasks.TabGroupCount", tabGroupCount); + + RecordHistogram.recordCountHistogram("Tabs.Tasks.TabsInGroupCount", tabsInGroupCount); + + double tabsInGroupRatio = tabsInGroupCount * 1.0 / totalTabCount; + RecordHistogram.recordPercentageHistogram( + "Tabs.Tasks.TabsInGroupRatio", (int) tabsInGroupRatio * 100); + + if (tabGroupCount != 0) { + int averageGroupSize = tabsInGroupCount / tabGroupCount; + RecordHistogram.recordCountHistogram( + "Tabs.Tasks.AverageTabGroupSize", averageGroupSize); + Log.d(TAG, "AverageGroupSize: %d", averageGroupSize); + } + + double tabGroupDensity = tabGroupCount * 1.0 / totalTabCount; + RecordHistogram.recordPercentageHistogram( + "Tabs.Tasks.TabGroupDensity", (int) tabGroupDensity * 100); + + Log.d(TAG, "TotalTabCount: %d", totalTabCount); + Log.d(TAG, "TabGroupCount: %d", tabGroupCount); + Log.d(TAG, "TabsInGroupCount: %d", tabsInGroupCount); + Log.d(TAG, "TabsInGroupRatio: %f", tabsInGroupRatio); + Log.d(TAG, "TabGroupDensity: %f", tabGroupDensity); + } +}
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java index c88aa481..3c63a03 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java
@@ -54,6 +54,7 @@ import org.chromium.chrome.browser.util.AccessibilityUtil; import org.chromium.chrome.browser.util.ColorUtils; import org.chromium.chrome.browser.util.FeatureUtilities; +import org.chromium.chrome.browser.widget.FadingBackgroundView; import org.chromium.chrome.browser.widget.TintedDrawable; import org.chromium.chrome.browser.widget.TintedImageButton; import org.chromium.components.url_formatter.UrlFormatter; @@ -820,4 +821,7 @@ public int getUrlContainerMarginEnd() { return 0; } + + @Override + public void setScrim(FadingBackgroundView scrim) {} }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java index a1db76eb..57e8636 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/Toolbar.java
@@ -8,6 +8,7 @@ import android.view.View; import org.chromium.chrome.browser.compositor.layouts.LayoutUpdateHost; +import org.chromium.chrome.browser.widget.FadingBackgroundView; import org.chromium.chrome.browser.widget.bottomsheet.BottomSheet; /** @@ -111,4 +112,9 @@ * @return height of the tab strip in px. */ int getTabStripHeight(); + + /** + * @param scrim The scrim for this location bar to use. + */ + void setScrim(FadingBackgroundView scrim); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java index 072e458..d47ad86f2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarLayout.java
@@ -40,6 +40,7 @@ import org.chromium.chrome.browser.tab.Tab; import org.chromium.chrome.browser.tabmodel.TabModelSelector; import org.chromium.chrome.browser.util.ViewUtils; +import org.chromium.chrome.browser.widget.FadingBackgroundView; import org.chromium.chrome.browser.widget.PulseDrawable; import org.chromium.chrome.browser.widget.TintedImageButton; import org.chromium.chrome.browser.widget.ToolbarProgressBar; @@ -978,4 +979,9 @@ ntpButton.setImageResource(iconResId); } + + @Override + public void setScrim(FadingBackgroundView scrim) { + getLocationBar().setScrim(scrim); + } }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrWindowAndroid.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrWindowAndroid.java index 4fde59e..904521e 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrWindowAndroid.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrWindowAndroid.java
@@ -104,7 +104,9 @@ } @Override - public void onRequestPermissionsResult( - int requestCode, String[] permissions, int[] grantResults) {} + public boolean handlePermissionResult( + int requestCode, String[] permissions, int[] grantResults) { + return false; + } } }
diff --git a/chrome/android/java_sources.gni b/chrome/android/java_sources.gni index 25ad620..3ddab65 100644 --- a/chrome/android/java_sources.gni +++ b/chrome/android/java_sources.gni
@@ -1347,6 +1347,7 @@ "java/src/org/chromium/chrome/browser/tabmodel/document/IncognitoDocumentTabModel.java", "java/src/org/chromium/chrome/browser/tabmodel/document/StorageDelegate.java", "java/src/org/chromium/chrome/browser/tabmodel/document/TabDelegate.java", + "java/src/org/chromium/chrome/browser/tasks/TasksUma.java", "java/src/org/chromium/chrome/browser/toolbar/ActionModeController.java", "java/src/org/chromium/chrome/browser/toolbar/BottomToolbarCoordinator.java", "java/src/org/chromium/chrome/browser/toolbar/BottomToolbarMediator.java", @@ -1713,6 +1714,7 @@ "javatests/src/org/chromium/chrome/browser/download/ui/DownloadHistoryAdapterTest.java", "javatests/src/org/chromium/chrome/browser/download/ui/StubbedProvider.java", "javatests/src/org/chromium/chrome/browser/engagement/SiteEngagementServiceTest.java", + "javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeTest.java", "javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java", "javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java", "javatests/src/org/chromium/chrome/browser/externalnav/IntentWithGesturesHandlerTest.java",
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java index acf7bd7..e0814832 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java
@@ -448,8 +448,10 @@ } @Override - public void onRequestPermissionsResult( - int requestCode, String[] permissions, int[] grantResults) {} + public boolean handlePermissionResult( + int requestCode, String[] permissions, int[] grantResults) { + return false; + } } private static class FakeLocationUtils extends LocationUtils {
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeTest.java new file mode 100644 index 0000000..1d31952 --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/ExploreSitesBridgeTest.java
@@ -0,0 +1,77 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +package org.chromium.chrome.browser.explore_sites; + +import android.graphics.Bitmap; +import android.graphics.BitmapFactory; +import android.support.test.InstrumentationRegistry; +import android.support.test.filters.SmallTest; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.runner.RunWith; + +import org.chromium.base.Callback; +import org.chromium.base.ThreadUtils; +import org.chromium.base.test.util.UrlUtils; +import org.chromium.chrome.browser.profiles.Profile; +import org.chromium.chrome.browser.test.ChromeBrowserTestRule; +import org.chromium.chrome.test.ChromeJUnit4ClassRunner; +import org.chromium.net.test.EmbeddedTestServer; + +import java.util.concurrent.Semaphore; +import java.util.concurrent.TimeUnit; + +/** Tests for {@link ExploreSitesBridge}. */ +@RunWith(ChromeJUnit4ClassRunner.class) +public final class ExploreSitesBridgeTest { + @Rule + public final ChromeBrowserTestRule mRule = new ChromeBrowserTestRule(); + + private static final String TEST_IMAGE = "/chrome/test/data/android/google.png"; + private static final int TIMEOUT_MS = 5000; + + private EmbeddedTestServer mTestServer; + private Profile mProfile; + + @Before + public void setUp() throws Exception { + ThreadUtils.runOnUiThreadBlocking(() -> { mProfile = Profile.getLastUsedProfile(); }); + mTestServer = EmbeddedTestServer.createAndStartServer(InstrumentationRegistry.getContext()); + } + + @After + public void tearDown() throws Exception { + mTestServer.stopAndDestroyServer(); + mTestServer = null; + } + + @Test + @SmallTest + public void testGetIcon() throws Exception { + Bitmap expectedIcon = + BitmapFactory.decodeFile(UrlUtils.getIsolatedTestFilePath(TEST_IMAGE)); + String testImageUrl = mTestServer.getURL(TEST_IMAGE); + + final Semaphore semaphore = new Semaphore(0); + ThreadUtils.runOnUiThreadBlocking(new Runnable() { + @Override + public void run() { + ExploreSitesBridge.getIcon(mProfile, testImageUrl, new Callback<Bitmap>() { + @Override + public void onResult(Bitmap icon) { + Assert.assertNotNull(icon); + Assert.assertTrue(expectedIcon.sameAs(icon)); + semaphore.release(); + } + }); + } + }); + Assert.assertTrue(semaphore.tryAcquire(TIMEOUT_MS, TimeUnit.MILLISECONDS)); + } +}
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/OWNERS b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/OWNERS new file mode 100644 index 0000000..f30fa90c --- /dev/null +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/explore_sites/OWNERS
@@ -0,0 +1,3 @@ +file://chrome/browser/android/explore_sites/OWNERS + +# TEAM: offline-dev@chromium.org
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfobarTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfobarTest.java index d6d6a83..67641579 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfobarTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/infobar/PermissionUpdateInfobarTest.java
@@ -197,8 +197,10 @@ } @Override - public void onRequestPermissionsResult( - int requestCode, String[] permissions, int[] grantResults) {} + public boolean handlePermissionResult( + int requestCode, String[] permissions, int[] grantResults) { + return false; + } } }
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarVoiceRecognitionHandlerTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarVoiceRecognitionHandlerTest.java index de996fd..f06207a20 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarVoiceRecognitionHandlerTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/omnibox/LocationBarVoiceRecognitionHandlerTest.java
@@ -394,8 +394,10 @@ } @Override - public void onRequestPermissionsResult( - int requestCode, String[] permissions, int[] grantResults) {} + public boolean handlePermissionResult( + int requestCode, String[] permissions, int[] grantResults) { + return false; + } } @Before
diff --git a/chrome/app/nibs/MainMenu.xib b/chrome/app/nibs/MainMenu.xib index dbe2f9e..ba5febc 100644 --- a/chrome/app/nibs/MainMenu.xib +++ b/chrome/app/nibs/MainMenu.xib
@@ -1,9 +1,8 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5056" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> +<?xml version="1.0" encoding="UTF-8"?> +<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="17D47" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none"> <dependencies> - <deployment version="1090" defaultVersion="1060" identifier="macosx"/> - <development version="5100" identifier="xcode"/> - <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5056"/> + <deployment version="1090" identifier="macosx"/> + <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/> </dependencies> <objects> <customObject id="-2" userLabel="File's Owner" customClass="BrowserCrApplication"/> @@ -318,7 +317,7 @@ <action selector="commandDispatch:" target="-1" id="0A7-Iy-65Q"/> </connections> </menuItem> - <menuItem title="^IDS_CUSTOMIZE_TOUCH_BAR" id="679" tag="40251"> + <menuItem title="^IDS_CUSTOMIZE_TOUCH_BAR" tag="40251" id="679"> <connections> <action selector="toggleTouchBarCustomizationPalette:" target="-1" id="680"/> </connections> @@ -391,7 +390,7 @@ <action selector="commandDispatch:" target="-1" id="657"/> </connections> </menuItem> - <menuItem title="^IDS_ALLOW_JAVASCRIPT_APPLE_EVENTS_MAC" tag="40253" id="659"> + <menuItem title="^IDS_ALLOW_JAVASCRIPT_APPLE_EVENTS_MAC" tag="40253" id="659"> <connections> <action selector="commandDispatch:" target="-1" id="664"/> </connections>
diff --git a/chrome/app/nibs/PRESUBMIT.py b/chrome/app/nibs/PRESUBMIT.py index 9c25730..d9dd885 100644 --- a/chrome/app/nibs/PRESUBMIT.py +++ b/chrome/app/nibs/PRESUBMIT.py
@@ -26,8 +26,10 @@ 'version="([0-9]+)"/>' def _CheckXIBSystemAndXcodeVersions(input_api, output_api, error_type): + # Skip MainMenu.xib, which was updated to use 10.3.3, Xcode 8.3.2. affected_xibs = [x for x in input_api.AffectedFiles() - if x.LocalPath().endswith('.xib')] + if x.LocalPath().endswith('.xib') + and not x.LocalPath().endswith('MainMenu.xib')] incorrect_system_versions = [] incorrect_ib_versions = []
diff --git a/chrome/app/settings_strings.grdp b/chrome/app/settings_strings.grdp index bb555d49..89954f2 100644 --- a/chrome/app/settings_strings.grdp +++ b/chrome/app/settings_strings.grdp
@@ -421,9 +421,6 @@ <message name="IDS_SETTINGS_TEXT_TO_SPEECH_ENGINES" desc="Heading for a section of text-to-speech settings to do per-engine settings"> Speech Engines </message> - <message name="IDS_SETTINGS_TEXT_TO_SPEECH_INSTALL_ENGINES" desc="A link to install additional text-to-speech engines"> - Install additional speech engines - </message> </if> <if expr="chromeos">
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn index 145d3da..544e0d3 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -2071,6 +2071,8 @@ "android/explore_sites/explore_sites_bridge.h", "android/explore_sites/ntp_json_fetcher.cc", "android/explore_sites/ntp_json_fetcher.h", + "android/explore_sites/url_util.cc", + "android/explore_sites/url_util.h", "android/favicon_helper.cc", "android/favicon_helper.h", "android/feature_engagement/tracker_factory_android.cc", @@ -3750,6 +3752,7 @@ deps += [ "//apps", "//chrome/browser/sync_file_system/drive_backend:sync_file_system_drive_proto", + "//chrome/browser/web_applications", "//chrome/common/extensions/api", "//chrome/common/extensions/api:api_registration", "//chrome/common/extensions/api:extensions_features",
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS index 4470136..f519f9bf 100644 --- a/chrome/browser/DEPS +++ b/chrome/browser/DEPS
@@ -150,6 +150,7 @@ "+third_party/blink/public/platform/web_input_event.h", "+third_party/blink/public/platform/web_mouse_event.h", "+third_party/blink/public/platform/web_mouse_wheel_event.h", + "+third_party/blink/public/platform/web_touch_event.h", "+third_party/blink/public/platform/web_referrer_policy.h", "+third_party/blink/public/platform/web_security_style.h", "+third_party/blink/public/platform/web_speech_synthesis_constants.h",
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 365c1ea13..58cece50 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -1373,6 +1373,9 @@ {"enable-webassembly-baseline", flag_descriptions::kEnableWasmBaselineName, flag_descriptions::kEnableWasmBaselineDescription, kOsAll, FEATURE_VALUE_TYPE(features::kWebAssemblyBaseline)}, + {"enable-webassembly-threads", flag_descriptions::kEnableWasmThreadsName, + flag_descriptions::kEnableWasmThreadsDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kWebAssemblyThreads)}, {"shared-array-buffer", flag_descriptions::kEnableSharedArrayBufferName, flag_descriptions::kEnableSharedArrayBufferDescription, kOsAll, FEATURE_VALUE_TYPE(features::kSharedArrayBuffer)}, @@ -2704,6 +2707,11 @@ flag_descriptions::kEnableWebPaymentsSingleAppUiSkipDescription, kOsAndroid | kOsDesktop, FEATURE_VALUE_TYPE(payments::features::kWebPaymentsSingleAppUiSkip)}, + {"just-in-time-service-worker-payment-app", + flag_descriptions::kJustInTimeServiceWorkerPaymentAppName, + flag_descriptions::kJustInTimeServiceWorkerPaymentAppDescription, + kOsAndroid | kOsDesktop, + FEATURE_VALUE_TYPE(payments::features::kWebPaymentsJustInTimePaymentApp)}, #if defined(OS_ANDROID) {"enable-android-pay-integration-v1", flag_descriptions::kEnableAndroidPayIntegrationV1Name, @@ -3940,6 +3948,11 @@ FEATURE_VALUE_TYPE(chrome::android::kCCTModule)}, #endif + {"enable-css-fragment-identifiers", + flag_descriptions::kEnableCSSFragmentIdentifiersName, + flag_descriptions::kEnableCSSFragmentIdentifiersDescription, kOsAll, + FEATURE_VALUE_TYPE(features::kCSSFragmentIdentifiers)}, + // NOTE: Adding a new flag requires adding a corresponding entry to enum // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag // Histograms" in tools/metrics/histograms/README.md (run the
diff --git a/chrome/browser/android/explore_sites/explore_sites_bridge.cc b/chrome/browser/android/explore_sites/explore_sites_bridge.cc index 98baaa9..0c0d902 100644 --- a/chrome/browser/android/explore_sites/explore_sites_bridge.cc +++ b/chrome/browser/android/explore_sites/explore_sites_bridge.cc
@@ -9,21 +9,48 @@ #include "base/android/jni_string.h" #include "base/android/scoped_java_ref.h" #include "base/bind.h" +#include "base/threading/thread_task_runner_handle.h" +#include "chrome/browser/android/explore_sites/url_util.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_android.h" +#include "chrome/browser/search/suggestions/image_decoder_impl.h" +#include "components/image_fetcher/core/image_fetcher.h" +#include "components/image_fetcher/core/image_fetcher_impl.h" #include "jni/ExploreSitesBridge_jni.h" #include "jni/ExploreSitesCategoryTile_jni.h" +#include "net/traffic_annotation/network_traffic_annotation.h" +#include "net/url_request/url_request_context_getter.h" #include "services/network/public/cpp/simple_url_loader.h" +#include "ui/gfx/android/java_bitmap.h" +#include "ui/gfx/image/image.h" namespace explore_sites { using base::android::JavaParamRef; using base::android::JavaRef; -using base::android::ScopedJavaLocalRef; using base::android::ScopedJavaGlobalRef; +using base::android::ScopedJavaLocalRef; namespace { +constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation = + net::DefineNetworkTrafficAnnotation("explore_sites_image_fetcher", R"( + semantics { + sender: "Explore Sites image fetcher" + description: + "Downloads images for explore sites usage." + trigger: + "When Explore Sites feature requires images from url." + data: "Requested image at url." + destination: GOOGLE_OWNED_SERVICE + } + policy { + cookies_allowed: YES + setting: "user" + policy_exception_justification: + "This feature is only enabled explicitly by flag." + })"); + void GotNTPCategoriesFromJson( const ScopedJavaGlobalRef<jobject>& j_callback_ref, const ScopedJavaGlobalRef<jobject>& j_result_ref, @@ -43,6 +70,22 @@ base::android::RunCallbackAndroid(j_callback_ref, j_result_ref); } +void OnGetIconDone(std::unique_ptr<image_fetcher::ImageFetcher> image_fetcher, + const ScopedJavaGlobalRef<jobject>& j_callback_obj, + const std::string& id, + const gfx::Image& image, + const image_fetcher::RequestMetadata& metadata) { + ScopedJavaLocalRef<jobject> j_bitmap; + if (!image.IsEmpty()) { + j_bitmap = gfx::ConvertToJavaBitmap(image.ToSkBitmap()); + } + base::android::RunCallbackAndroid(j_callback_obj, j_bitmap); + + // Delete |image_fetcher| when appropriate. + base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, + std::move(image_fetcher)); +} + } // namespace // static @@ -61,4 +104,34 @@ base::WrapUnique(ntp_fetcher))); } +// static +static void JNI_ExploreSitesBridge_GetIcon( + JNIEnv* env, + const JavaParamRef<jclass>& j_caller, + const JavaParamRef<jobject>& j_profile, + const JavaParamRef<jstring>& j_url, + const JavaParamRef<jobject>& j_callback_obj) { + Profile* profile = ProfileAndroid::FromProfileAndroid(j_profile); + GURL icon_url(ConvertJavaStringToUTF8(env, j_url)); + scoped_refptr<net::URLRequestContextGetter> request_context = + profile->GetRequestContext(); + auto image_fetcher = std::make_unique<image_fetcher::ImageFetcherImpl>( + std::make_unique<suggestions::ImageDecoderImpl>(), request_context.get()); + // |image_fetcher| will be owned by the callback and gets destroyed at the end + // of the callback. + image_fetcher::ImageFetcher* image_fetcher_ptr = image_fetcher.get(); + image_fetcher_ptr->FetchImage( + icon_url.spec(), icon_url, + base::BindOnce(&OnGetIconDone, std::move(image_fetcher), + ScopedJavaGlobalRef<jobject>(j_callback_obj)), + kTrafficAnnotation); +} + +// static +ScopedJavaLocalRef<jstring> JNI_ExploreSitesBridge_GetCatalogUrl( + JNIEnv* env, + const JavaParamRef<jclass>& jcaller) { + return base::android::ConvertUTF8ToJavaString(env, GetCatalogURL().spec()); +} + } // namespace explore_sites
diff --git a/chrome/browser/android/explore_sites/explore_sites_bridge.h b/chrome/browser/android/explore_sites/explore_sites_bridge.h index 77dc0cf4..3f5f8a5 100644 --- a/chrome/browser/android/explore_sites/explore_sites_bridge.h +++ b/chrome/browser/android/explore_sites/explore_sites_bridge.h
@@ -5,6 +5,8 @@ #ifndef CHROME_BROWSER_ANDROID_EXPLORE_SITES_EXPLORE_SITES_BRIDGE_H_ #define CHROME_BROWSER_ANDROID_EXPLORE_SITES_EXPLORE_SITES_BRIDGE_H_ +#include <memory> + #include "base/android/jni_android.h" #include "base/android/jni_weak_ref.h" #include "base/android/scoped_java_ref.h" @@ -24,6 +26,18 @@ const base::android::JavaParamRef<jobject>& j_result_obj, const base::android::JavaParamRef<jobject>& j_callback_obj); +static void JNI_ExploreSitesBridge_GetIcon( + JNIEnv* env, + const base::android::JavaParamRef<jclass>& j_caller, + const base::android::JavaParamRef<jobject>& j_profile, + const base::android::JavaParamRef<jstring>& j_url, + const base::android::JavaParamRef<jobject>& j_callback_obj); + +static base::android::ScopedJavaLocalRef<jstring> +JNI_ExploreSitesBridge_GetCatalogUrl( + JNIEnv* env, + const base::android::JavaParamRef<jclass>& jcaller); + } // namespace explore_sites #endif // CHROME_BROWSER_ANDROID_EXPLORE_SITES_EXPLORE_SITES_BRIDGE_H_
diff --git a/chrome/browser/android/explore_sites/url_util.cc b/chrome/browser/android/explore_sites/url_util.cc new file mode 100644 index 0000000..efa3fb5a --- /dev/null +++ b/chrome/browser/android/explore_sites/url_util.cc
@@ -0,0 +1,46 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/android/explore_sites/url_util.h" + +#include <string> + +#include "base/metrics/field_trial_params.h" +#include "chrome/browser/android/chrome_feature_list.h" +#include "url/gurl.h" + +namespace explore_sites { + +GURL GetBaseURL() { + const char kBaseURLOption[] = "base_url"; + const char kDefaultBaseUrl[] = + "https://explore-sites-ux-research.appspot.com"; + std::string field_trial_param = base::GetFieldTrialParamValueByFeature( + chrome::android::kExploreSites, kBaseURLOption); + if (field_trial_param.empty()) + return GURL(kDefaultBaseUrl); + return GURL(field_trial_param); +} + +GURL GetNtpURL() { + const char kNtpJsonPath[] = "/ntp.json"; + std::string path(kNtpJsonPath); + + GURL base_url(GetBaseURL()); + GURL::Replacements replacements; + replacements.SetPathStr(path); + return base_url.ReplaceComponents(replacements); +} + +GURL GetCatalogURL() { + const char kEspPath[] = "/esp.html"; + std::string path(kEspPath); + + GURL base_url(GetBaseURL()); + GURL::Replacements replacements; + replacements.SetPathStr(path); + return base_url.ReplaceComponents(replacements); +} + +} // namespace explore_sites
diff --git a/chrome/browser/android/explore_sites/url_util.h b/chrome/browser/android/explore_sites/url_util.h new file mode 100644 index 0000000..068c9ad --- /dev/null +++ b/chrome/browser/android/explore_sites/url_util.h
@@ -0,0 +1,23 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_ANDROID_EXPLORE_SITES_URL_UTIL_H_ +#define CHROME_BROWSER_ANDROID_EXPLORE_SITES_URL_UTIL_H_ + +#include "url/gurl.h" + +namespace explore_sites { + +// Returns the base URL for the Explore Sites server. +GURL GetBaseURL(); + +// Returns the NTP JSON URL for the Explore Sites feature. +GURL GetNtpURL(); + +// Returns the ESP catalog URL for the Explore Sites feature. +GURL GetCatalogURL(); + +} // namespace explore_sites + +#endif // CHROME_BROWSER_ANDROID_EXPLORE_SITES_URL_UTIL_H_
diff --git a/chrome/browser/android/history_report/delta_file_backend_leveldb.cc b/chrome/browser/android/history_report/delta_file_backend_leveldb.cc index ca381240..0bf6029 100644 --- a/chrome/browser/android/history_report/delta_file_backend_leveldb.cc +++ b/chrome/browser/android/history_report/delta_file_backend_leveldb.cc
@@ -13,6 +13,7 @@ #include "base/trace_event/process_memory_dump.h" #include "chrome/browser/android/history_report/delta_file_commons.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/comparator.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/iterator.h" @@ -99,8 +100,13 @@ std::string path = path_.value(); leveldb::Status status = leveldb_env::OpenDB(options, path, &db_); if (status.IsCorruption()) { - LOG(WARNING) << "Deleting possibly-corrupt database"; - base::DeleteFile(path_, true); + LOG(WARNING) << "Deleting corrupt database"; + status = leveldb_chrome::DeleteDB(path_, options); + if (!status.ok()) { + LOG(ERROR) << "Unable to delete corrupt database " << path_ + << ", error: " << status.ToString(); + return false; + } status = leveldb_env::OpenDB(options, path, &db_); } if (status.ok()) { @@ -218,7 +224,7 @@ void DeltaFileBackend::Clear() { if (!EnsureInitialized()) return; db_.reset(); - base::DeleteFile(path_, true); + leveldb_chrome::DeleteDB(path_, leveldb_env::Options()); Init(); }
diff --git a/chrome/browser/android/history_report/usage_reports_buffer_backend.cc b/chrome/browser/android/history_report/usage_reports_buffer_backend.cc index 656477e..164b64e 100644 --- a/chrome/browser/android/history_report/usage_reports_buffer_backend.cc +++ b/chrome/browser/android/history_report/usage_reports_buffer_backend.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/android/history_report/usage_report_util.h" #include "chrome/browser/android/proto/delta_file.pb.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/iterator.h" #include "third_party/leveldatabase/src/include/leveldb/options.h" @@ -46,15 +47,19 @@ leveldb_env::LEVELDB_STATUS_MAX); if (status.IsCorruption()) { LOG(ERROR) << "Deleting corrupt database"; - base::DeleteFile(db_file_name_, true); + status = leveldb_chrome::DeleteDB(db_file_name_, options); + if (!status.ok()) { + LOG(ERROR) << "Unable to delete " << db_file_name_ + << ", error: " << status.ToString(); + return false; + } status = leveldb_env::OpenDB(options, path, &db_); } if (status.ok()) { CHECK(db_); return true; } - LOG(WARNING) << "Unable to open " << path << ": " - << status.ToString(); + LOG(WARNING) << "Unable to open " << path << ": " << status.ToString(); return false; } @@ -122,7 +127,7 @@ void UsageReportsBufferBackend::Clear() { db_.reset(); - base::DeleteFile(db_file_name_, true); + leveldb_chrome::DeleteDB(db_file_name_, leveldb_env::Options()); Init(); }
diff --git a/chrome/browser/android/vr/android_ui_gesture_target.cc b/chrome/browser/android/vr/android_ui_gesture_target.cc index 4b2479c..4d5821d 100644 --- a/chrome/browser/android/vr/android_ui_gesture_target.cc +++ b/chrome/browser/android/vr/android_ui_gesture_target.cc
@@ -10,6 +10,7 @@ #include "third_party/blink/public/platform/web_gesture_event.h" #include "third_party/blink/public/platform/web_input_event.h" #include "third_party/blink/public/platform/web_mouse_event.h" +#include "third_party/blink/public/platform/web_touch_event.h" using base::android::JavaParamRef; using base::android::JavaRef; @@ -32,9 +33,12 @@ void AndroidUiGestureTarget::DispatchWebInputEvent( std::unique_ptr<blink::WebInputEvent> event) { blink::WebMouseEvent* mouse; + blink::WebTouchEvent* touch; blink::WebGestureEvent* gesture; if (blink::WebInputEvent::IsMouseEventType(event->GetType())) { mouse = static_cast<blink::WebMouseEvent*>(event.get()); + } else if (blink::WebInputEvent::IsTouchEventType(event->GetType())) { + touch = static_cast<blink::WebTouchEvent*>(event.get()); } else { gesture = static_cast<blink::WebGestureEvent*>(event.get()); } @@ -94,22 +98,28 @@ break; case blink::WebMouseEvent::kMouseMove: case blink::WebMouseEvent::kMouseLeave: - // We don't need to inject MOTION_EVENT_ACTION_HOVER_EXIT as the platform - // will generate it for us if the pointer is out of bounds. + // The platform ignores HOVER_EXIT, so we instead send a fixed + // out-of-bounds point (http://crbug.com/715114). SetPointer(mouse->PositionInWidget().x, mouse->PositionInWidget().y); Inject(content::MOTION_EVENT_ACTION_HOVER_MOVE, event_time_ms); break; - case blink::WebMouseEvent::kMouseDown: + case blink::WebTouchEvent::kTouchStart: // Mouse down events are translated into touch events on Android anyways, // so we can just send touch events. - // We intentionally don't support long press or drags/swipes with mouse - // input as this could trigger long press and open 2D popups. - SetPointer(mouse->PositionInWidget().x, mouse->PositionInWidget().y); + SetPointer(touch->touches[0].PositionInWidget().x, + touch->touches[0].PositionInWidget().y); Inject(content::MOTION_EVENT_ACTION_START, event_time_ms); + break; + case blink::WebTouchEvent::kTouchEnd: + SetPointer(touch->touches[0].PositionInWidget().x, + touch->touches[0].PositionInWidget().y); Inject(content::MOTION_EVENT_ACTION_END, event_time_ms); break; - case blink::WebMouseEvent::kMouseUp: - // No need to do anything for mouseUp as mouseDown already handled up. + case blink::WebTouchEvent::kTouchMove: + DCHECK_EQ(touch->touches_length, 1u); + SetPointer(touch->touches[0].PositionInWidget().x, + touch->touches[0].PositionInWidget().y); + Inject(content::MOTION_EVENT_ACTION_MOVE, event_time_ms); break; default: NOTREACHED() << "Unsupported event type sent to Android UI.";
diff --git a/chrome/browser/android/vr/vr_shell_gl.cc b/chrome/browser/android/vr/vr_shell_gl.cc index b26edaa..11863d0 100644 --- a/chrome/browser/android/vr/vr_shell_gl.cc +++ b/chrome/browser/android/vr/vr_shell_gl.cc
@@ -863,6 +863,7 @@ showing_vr_dialog_ = true; vr_dialog_input_delegate_.reset(new PlatformUiInputDelegate(input_handler)); vr_dialog_input_delegate_->SetSize(width, height); + vr_dialog_input_delegate_->SetPlatformController(controller_.get()); ui_->SetAlertDialogEnabled(true, vr_dialog_input_delegate_.get(), width / content_tex_buffer_size_.width(), height / content_tex_buffer_size_.width());
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index 80a2c9d..57cc941 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -979,6 +979,8 @@ "login/lock_screen_utils.cc", "login/lock_screen_utils.h", "login/login_wizard.h", + "login/mojo_version_info_dispatcher.cc", + "login/mojo_version_info_dispatcher.h", "login/oobe_screen.cc", "login/oobe_screen.h", "login/profile_auth_data.cc",
diff --git a/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc b/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc index c0fa61c..f12ec7da 100644 --- a/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc +++ b/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc
@@ -42,12 +42,12 @@ } void DeviceEventRouter::StartupDelayed() { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); is_starting_up_ = false; } void DeviceEventRouter::OnDeviceAdded(const std::string& device_path) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); SetDeviceState(device_path, DEVICE_STATE_USUAL); if (IsExternalStorageDisabled()) { @@ -58,7 +58,7 @@ } void DeviceEventRouter::OnDeviceRemoved(const std::string& device_path) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); SetDeviceState(device_path, DEVICE_STATE_USUAL); OnDeviceEvent(file_manager_private::DEVICE_EVENT_TYPE_REMOVED, device_path); } @@ -71,7 +71,7 @@ void DeviceEventRouter::OnDiskRemoved( const chromeos::disks::DiskMountManager::Disk& disk) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (is_resuming_ || is_starting_up_) return; @@ -87,7 +87,7 @@ void DeviceEventRouter::OnVolumeMounted(chromeos::MountError error_code, const Volume& volume) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); const std::string& device_path = volume.system_path_prefix().AsUTF8Unsafe(); SetDeviceState(device_path, DEVICE_STATE_USUAL); @@ -100,7 +100,7 @@ void DeviceEventRouter::OnFormatStarted(const std::string& device_path, bool success) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (success) { OnDeviceEvent(file_manager_private::DEVICE_EVENT_TYPE_FORMAT_START, @@ -113,7 +113,7 @@ void DeviceEventRouter::OnFormatCompleted(const std::string& device_path, bool success) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); OnDeviceEvent(success ? file_manager_private::DEVICE_EVENT_TYPE_FORMAT_SUCCESS : file_manager_private::DEVICE_EVENT_TYPE_FORMAT_FAIL, @@ -122,7 +122,7 @@ void DeviceEventRouter::OnRenameStarted(const std::string& device_path, bool success) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); OnDeviceEvent(success ? file_manager_private::DEVICE_EVENT_TYPE_RENAME_START : file_manager_private::DEVICE_EVENT_TYPE_RENAME_FAIL, @@ -131,7 +131,7 @@ void DeviceEventRouter::OnRenameCompleted(const std::string& device_path, bool success) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); OnDeviceEvent(success ? file_manager_private::DEVICE_EVENT_TYPE_RENAME_SUCCESS : file_manager_private::DEVICE_EVENT_TYPE_RENAME_FAIL, @@ -140,12 +140,12 @@ void DeviceEventRouter::SuspendImminent( power_manager::SuspendImminent::Reason reason) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); is_resuming_ = true; } void DeviceEventRouter::SuspendDone(const base::TimeDelta& sleep_duration) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( FROM_HERE, base::BindOnce(&DeviceEventRouter::SuspendDoneDelayed, @@ -154,7 +154,7 @@ } void DeviceEventRouter::SuspendDoneDelayed() { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); is_resuming_ = false; }
diff --git a/chrome/browser/chromeos/extensions/file_manager/device_event_router.h b/chrome/browser/chromeos/extensions/file_manager/device_event_router.h index 35e654cd4..f912720 100644 --- a/chrome/browser/chromeos/extensions/file_manager/device_event_router.h +++ b/chrome/browser/chromeos/extensions/file_manager/device_event_router.h
@@ -97,7 +97,7 @@ std::map<std::string, DeviceState> device_states_; // Thread checker. - base::ThreadChecker thread_checker_; + THREAD_CHECKER(thread_checker_); // Note: This should remain the last member so it'll be destroyed and // invalidate the weak pointers before any other members are destroyed.
diff --git a/chrome/browser/chromeos/extensions/file_manager/job_event_router.cc b/chrome/browser/chromeos/extensions/file_manager/job_event_router.cc index 772f1bd..41092b8 100644 --- a/chrome/browser/chromeos/extensions/file_manager/job_event_router.cc +++ b/chrome/browser/chromeos/extensions/file_manager/job_event_router.cc
@@ -32,7 +32,7 @@ } void JobEventRouter::OnJobUpdated(const drive::JobInfo& job_info) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!drive::IsActiveFileTransferJobInfo(job_info)) return; @@ -47,7 +47,7 @@ void JobEventRouter::OnJobDone(const drive::JobInfo& job_info, drive::FileError error) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (!drive::IsActiveFileTransferJobInfo(job_info)) return;
diff --git a/chrome/browser/chromeos/extensions/file_manager/job_event_router.h b/chrome/browser/chromeos/extensions/file_manager/job_event_router.h index ea787a67..cfe0d71 100644 --- a/chrome/browser/chromeos/extensions/file_manager/job_event_router.h +++ b/chrome/browser/chromeos/extensions/file_manager/job_event_router.h
@@ -99,7 +99,7 @@ int64_t num_total_bytes_; // Thread checker. - base::ThreadChecker thread_checker_; + THREAD_CHECKER(thread_checker_); // Note: This should remain the last member so it'll be destroyed and // invalidate the weak pointers before any other members are destroyed.
diff --git a/chrome/browser/chromeos/login/existing_user_controller.cc b/chrome/browser/chromeos/login/existing_user_controller.cc index d717d2f7..8fbd012 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.cc +++ b/chrome/browser/chromeos/login/existing_user_controller.cc
@@ -317,7 +317,6 @@ ExistingUserController::ExistingUserController(LoginDisplayHost* host) : host_(host), - login_display_(host_->CreateLoginDisplay(this)), cros_settings_(CrosSettings::Get()), network_state_helper_(new login::NetworkStateHelper), weak_factory_(this) { @@ -412,9 +411,9 @@ show_guest &= !filtered_users.empty(); bool allow_new_user = true; cros_settings_->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); - login_display_->set_parent_window(GetNativeWindow()); - login_display_->Init(filtered_users, show_guest, show_users_on_signin, - allow_new_user); + GetLoginDisplay()->set_parent_window(GetNativeWindow()); + GetLoginDisplay()->Init(filtered_users, show_guest, show_users_on_signin, + allow_new_user); host_->OnPreferencesChanged(); } @@ -511,7 +510,6 @@ } else { NOTREACHED() << "More than one controller are alive."; } - DCHECK(login_display_.get()); } //////////////////////////////////////////////////////////////////////////////// @@ -667,7 +665,7 @@ void ExistingUserController::RestartLogin(const UserContext& user_context) { is_login_in_progress_ = false; login_performer_.reset(); - login_display_->ShowSigninUI(user_context.GetAccountId().GetUserEmail()); + GetLoginDisplay()->ShowSigninUI(user_context.GetAccountId().GetUserEmail()); } void ExistingUserController::OnSigninScreenReady() { @@ -802,8 +800,8 @@ } void ExistingUserController::ShowTPMError() { - login_display_->SetUIEnabled(false); - login_display_->ShowErrorScreen(LoginDisplay::TPM_ERROR); + GetLoginDisplay()->SetUIEnabled(false); + GetLoginDisplay()->ShowErrorScreen(LoginDisplay::TPM_ERROR); } void ExistingUserController::ShowPasswordChangedDialog() { @@ -821,8 +819,8 @@ // us to recover from a lost owner password/homedir. // TODO(gspencer): We shouldn't have to erase stateful data when // doing this. See http://crosbug.com/9115 http://crosbug.com/7792 - login_display_->ShowPasswordChangedDialog(show_invalid_old_password_error, - display_email_); + GetLoginDisplay()->ShowPasswordChangedDialog(show_invalid_old_password_error, + display_email_); } //////////////////////////////////////////////////////////////////////////////// @@ -856,7 +854,7 @@ ShowTPMError(); } else if (last_login_attempt_account_id_ == user_manager::GuestAccountId()) { // Show no errors, just re-enable input. - login_display_->ClearAndEnablePassword(); + GetLoginDisplay()->ClearAndEnablePassword(); StartAutoLoginTimer(); } else if (is_known_user && failure.reason() == AuthFailure::MISSING_CRYPTOHOME) { @@ -881,7 +879,7 @@ if (auth_flow_offline_) UMA_HISTOGRAM_BOOLEAN("Login.OfflineFailure.IsKnownUser", is_known_user); - login_display_->ClearAndEnablePassword(); + GetLoginDisplay()->ClearAndEnablePassword(); StartAutoLoginTimer(); } @@ -898,7 +896,7 @@ void ExistingUserController::OnAuthSuccess(const UserContext& user_context) { is_login_in_progress_ = false; - login_display_->set_signin_completed(true); + GetLoginDisplay()->set_signin_completed(true); // Login performer will be gone so cache this value to use // once profile is loaded. @@ -970,7 +968,7 @@ void ExistingUserController::OnProfilePrepared(Profile* profile, bool browser_launched) { // Reenable clicking on other windows and status area. - login_display_->SetUIEnabled(true); + GetLoginDisplay()->SetUIEnabled(true); if (browser_launched) host_ = nullptr; @@ -1188,13 +1186,13 @@ // Start online sign-in UI for the user. is_login_in_progress_ = false; login_performer_.reset(); - login_display_->ShowSigninUI(account_id.GetUserEmail()); + GetLoginDisplay()->ShowSigninUI(account_id.GetUserEmail()); } void ExistingUserController::WhiteListCheckFailed(const std::string& email) { PerformLoginFinishedActions(true /* start auto login timer */); - login_display_->ShowWhitelistCheckFailedError(); + GetLoginDisplay()->ShowWhitelistCheckFailedError(); if (auth_status_consumer_) { auth_status_consumer_->OnAuthFailure( @@ -1223,7 +1221,7 @@ void ExistingUserController::DeviceSettingsChanged() { // If login was already completed, we should avoid any signin screen // transitions, see http://crbug.com/461604 for example. - if (host_ != nullptr && !login_display_->is_signin_completed()) { + if (host_ != nullptr && !GetLoginDisplay()->is_signin_completed()) { // Signed settings or user list changed. Notify views and update them. UpdateLoginDisplay(user_manager::UserManager::Get()->GetUsers()); ConfigureAutoLogin(); @@ -1244,6 +1242,10 @@ return password_changed_; } +LoginDisplay* ExistingUserController::GetLoginDisplay() { + return host_->GetLoginDisplay(); +} + void ExistingUserController::LoginAsGuest() { PerformPreLoginActions(UserContext(user_manager::USER_TYPE_GUEST, user_manager::GuestAccountId())); @@ -1506,7 +1508,7 @@ } } - login_display_->ShowError(error_id, num_login_attempts_, help_topic_id); + GetLoginDisplay()->ShowError(error_id, num_login_attempts_, help_topic_id); } void ExistingUserController::SendAccessibilityAlert( @@ -1549,7 +1551,7 @@ void ExistingUserController::PerformPreLoginActions( const UserContext& user_context) { // Disable clicking on other windows and status tray. - login_display_->SetUIEnabled(false); + GetLoginDisplay()->SetUIEnabled(false); if (last_login_attempt_account_id_ != user_context.GetAccountId()) { last_login_attempt_account_id_ = user_context.GetAccountId(); @@ -1566,7 +1568,7 @@ is_login_in_progress_ = false; // Reenable clicking on other windows and status area. - login_display_->SetUIEnabled(true); + GetLoginDisplay()->SetUIEnabled(true); if (start_auto_login_timer) StartAutoLoginTimer(); @@ -1586,7 +1588,7 @@ void ExistingUserController::ContinueLoginIfDeviceNotDisabled( const base::Closure& continuation) { // Disable clicking on other windows and status tray. - login_display_->SetUIEnabled(false); + GetLoginDisplay()->SetUIEnabled(false); // Stop the auto-login timer. StopAutoLoginTimer(); @@ -1603,13 +1605,13 @@ if (status == CrosSettingsProvider::PERMANENTLY_UNTRUSTED) { // If the |cros_settings_| are permanently untrusted, show an error message // and refuse to log in. - login_display_->ShowError(IDS_LOGIN_ERROR_OWNER_KEY_LOST, 1, - HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT); + GetLoginDisplay()->ShowError(IDS_LOGIN_ERROR_OWNER_KEY_LOST, 1, + HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT); // Re-enable clicking on other windows and the status area. Do not start the // auto-login timer though. Without trusted |cros_settings_|, no auto-login // can succeed. - login_display_->SetUIEnabled(true); + GetLoginDisplay()->SetUIEnabled(true); return; } @@ -1619,7 +1621,7 @@ // Re-enable clicking on other windows and the status area. Do not start the // auto-login timer though. On a disabled device, no auto-login can succeed. - login_display_->SetUIEnabled(true); + GetLoginDisplay()->SetUIEnabled(true); return; } @@ -1706,7 +1708,7 @@ // If credentials are missing, refuse to log in. // Reenable clicking on other windows and status area. - login_display_->SetUIEnabled(true); + GetLoginDisplay()->SetUIEnabled(true); // Restart the auto-login timer. StartAutoLoginTimer(); } @@ -1742,7 +1744,7 @@ // permission to collect a feedback. RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); VLOG(1) << "Show unrecoverable cryptohome error dialog."; - login_display_->ShowUnrecoverableCrypthomeErrorDialog(); + GetLoginDisplay()->ShowUnrecoverableCrypthomeErrorDialog(); } void ExistingUserController::ClearRecordedNames() {
diff --git a/chrome/browser/chromeos/login/existing_user_controller.h b/chrome/browser/chromeos/login/existing_user_controller.h index 1ca016c..f9c9b865 100644 --- a/chrome/browser/chromeos/login/existing_user_controller.h +++ b/chrome/browser/chromeos/login/existing_user_controller.h
@@ -49,7 +49,7 @@ namespace chromeos { class CrosSettings; -class LoginDisplayHost; +class LoginDisplay; class OAuth2TokenInitializer; namespace login { @@ -139,13 +139,6 @@ auth_status_consumer_ = consumer; } - // Returns the LoginDisplay created and owned by this controller. - // Used for testing. - LoginDisplay* login_display() { return login_display_.get(); } - - // Returns the LoginDisplayHost for this controller. - LoginDisplayHost* login_display_host() { return host_; } - // Returns value of LoginPerformer::auth_mode() (cached if performer is // destroyed). LoginPerformer::AuthorizationMode auth_mode() const; @@ -162,6 +155,9 @@ FRIEND_TEST_ALL_PREFIXES(ExistingUserControllerTest, ExistingUserLogin); + // Login UI implementation instance. + LoginDisplay* GetLoginDisplay(); + void LoginAsGuest(); void LoginAsPublicSession(const UserContext& user_context); void LoginAsKioskApp(const std::string& app_id, bool diagnostic_mode); @@ -216,9 +212,6 @@ // Shows "enable developer features" screen. void ShowEnableDebuggingScreen(); - // Shows demo mode setup screen. - void ShowDemoModeSetupScreen(); - // Shows kiosk feature enable screen. void ShowKioskEnableScreen(); @@ -355,9 +348,6 @@ // OOBE/login display host. LoginDisplayHost* host_; - // Login UI implementation instance. - std::unique_ptr<LoginDisplay> login_display_; - // Number of login attempts. Used to show help link when > 1 unsuccessful // logins for the same user. size_t num_login_attempts_ = 0;
diff --git a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc index 6928e50..1562e65 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_auto_login_unittest.cc
@@ -47,13 +47,12 @@ scoped_user_manager_(base::WrapUnique(mock_user_manager_)) {} void SetUp() override { - mock_login_display_host_.reset(new MockLoginDisplayHost); - mock_login_display_ = new MockLoginDisplay(); - arc_kiosk_app_manager_.reset(new ArcKioskAppManager()); + mock_login_display_host_ = std::make_unique<MockLoginDisplayHost>(); + mock_login_display_ = std::make_unique<MockLoginDisplay>(); + arc_kiosk_app_manager_ = std::make_unique<ArcKioskAppManager>(); - EXPECT_CALL(*mock_login_display_host_.get(), CreateLoginDisplay(_)) - .Times(1) - .WillOnce(Return(mock_login_display_)); + ON_CALL(*mock_login_display_host_, GetLoginDisplay()) + .WillByDefault(Return(mock_login_display_.get())); EXPECT_CALL(*mock_user_manager_, Shutdown()).Times(AnyNumber()); EXPECT_CALL(*mock_user_manager_, FindUser(_)).WillRepeatedly(ReturnNull()); @@ -136,11 +135,8 @@ policy::DeviceLocalAccount::TYPE_PUBLIC_SESSION)); private: - // |mock_login_display_| is owned by the ExistingUserController, which calls - // CreateLoginDisplay() on the |mock_login_display_host_| to get it. - MockLoginDisplay* mock_login_display_; - std::unique_ptr<MockLoginDisplayHost> mock_login_display_host_; + std::unique_ptr<MockLoginDisplay> mock_login_display_; content::TestBrowserThreadBundle test_browser_thread_bundle_; ScopedTestingLocalState local_state_;
diff --git a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc index feed308..a0311a4 100644 --- a/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc +++ b/chrome/browser/chromeos/login/existing_user_controller_browsertest.cc
@@ -204,22 +204,21 @@ DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); - mock_login_display_host_.reset(new MockLoginDisplayHost()); - mock_login_display_ = new MockLoginDisplay(); + mock_login_display_host_ = std::make_unique<MockLoginDisplayHost>(); + mock_login_display_ = std::make_unique<MockLoginDisplay>(); SetUpLoginDisplay(); } virtual void SetUpSessionManager() {} virtual void SetUpLoginDisplay() { - EXPECT_CALL(*mock_login_display_host_.get(), CreateLoginDisplay(_)) - .Times(1) - .WillOnce(Return(mock_login_display_)); - EXPECT_CALL(*mock_login_display_host_.get(), GetNativeWindow()) + EXPECT_CALL(*mock_login_display_host_, GetLoginDisplay()) + .Times(AnyNumber()) + .WillRepeatedly(Return(mock_login_display_.get())); + EXPECT_CALL(*mock_login_display_host_, GetNativeWindow()) .Times(1) .WillOnce(ReturnNull()); - EXPECT_CALL(*mock_login_display_host_.get(), OnPreferencesChanged()) - .Times(1); + EXPECT_CALL(*mock_login_display_host_, OnPreferencesChanged()).Times(1); EXPECT_CALL(*mock_login_display_, Init(_, false, true, true)).Times(1); } @@ -289,9 +288,7 @@ std::unique_ptr<ExistingUserController> existing_user_controller_; - // |mock_login_display_| is owned by the ExistingUserController, which calls - // CreateLoginDisplay() on the |mock_login_display_host_| to get it. - MockLoginDisplay* mock_login_display_ = nullptr; + std::unique_ptr<MockLoginDisplay> mock_login_display_; std::unique_ptr<MockLoginDisplayHost> mock_login_display_host_; // Mock URLFetcher. @@ -481,9 +478,9 @@ } void SetUpLoginDisplay() override { - EXPECT_CALL(*mock_login_display_host_.get(), CreateLoginDisplay(_)) - .Times(1) - .WillOnce(Return(mock_login_display_)); + EXPECT_CALL(*mock_login_display_host_, GetLoginDisplay()) + .Times(AnyNumber()) + .WillRepeatedly(Return(mock_login_display_.get())); EXPECT_CALL(*mock_login_display_host_.get(), GetNativeWindow()) .Times(AnyNumber()) .WillRepeatedly(ReturnNull()); @@ -955,14 +952,13 @@ } void SetUpLoginDisplay() override { - EXPECT_CALL(*mock_login_display_host_.get(), CreateLoginDisplay(_)) - .Times(1) - .WillOnce(Return(mock_login_display_)); - EXPECT_CALL(*mock_login_display_host_.get(), GetNativeWindow()) + EXPECT_CALL(*mock_login_display_host_, GetLoginDisplay()) + .Times(AnyNumber()) + .WillRepeatedly(Return(mock_login_display_.get())); + EXPECT_CALL(*mock_login_display_host_, GetNativeWindow()) .Times(1) .WillOnce(ReturnNull()); - EXPECT_CALL(*mock_login_display_host_.get(), OnPreferencesChanged()) - .Times(1); + EXPECT_CALL(*mock_login_display_host_, OnPreferencesChanged()).Times(1); EXPECT_CALL(*mock_login_display_, Init(_, false, true, false)).Times(1); } };
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.cc b/chrome/browser/chromeos/login/lock/views_screen_locker.cc index b9818f1..c2f34034 100644 --- a/chrome/browser/chromeos/login/lock/views_screen_locker.cc +++ b/chrome/browser/chromeos/login/lock/views_screen_locker.cc
@@ -18,6 +18,7 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/chromeos/lock_screen_apps/state_controller.h" #include "chrome/browser/chromeos/login/lock_screen_utils.h" +#include "chrome/browser/chromeos/login/mojo_version_info_dispatcher.h" #include "chrome/browser/chromeos/login/quick_unlock/pin_backend.h" #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_factory.h" #include "chrome/browser/chromeos/login/quick_unlock/quick_unlock_storage.h" @@ -26,17 +27,13 @@ #include "chrome/browser/chromeos/system/system_clock.h" #include "chrome/browser/ui/ash/session_controller_client.h" #include "chrome/browser/ui/ash/wallpaper_controller_client.h" -#include "chrome/common/channel_info.h" #include "chrome/common/pref_names.h" -#include "chrome/grit/generated_resources.h" #include "chromeos/components/proximity_auth/screenlock_bridge.h" #include "chromeos/login/auth/authpolicy_login_helper.h" #include "components/user_manager/known_user.h" #include "components/user_manager/user_manager.h" -#include "components/version_info/version_info.h" #include "google_apis/gaia/gaia_auth_util.h" #include "ui/base/ime/chromeos/ime_keyboard.h" -#include "ui/base/l10n/l10n_util.h" namespace chromeos { @@ -61,7 +58,7 @@ ViewsScreenLocker::ViewsScreenLocker(ScreenLocker* screen_locker) : screen_locker_(screen_locker), - version_info_updater_(this), + version_info_updater_(std::make_unique<MojoVersionInfoDispatcher>()), weak_factory_(this) { LoginScreenClient::Get()->SetDelegate(this); user_board_view_mojo_ = std::make_unique<UserBoardViewMojo>(); @@ -103,18 +100,8 @@ } } - version_info::Channel channel = chrome::GetChannel(); - bool should_show_version = (channel == version_info::Channel::STABLE || - channel == version_info::Channel::BETA) - ? false - : true; - if (should_show_version) { -#if defined(OFFICIAL_BUILD) - version_info_updater_.StartUpdate(true); -#else - version_info_updater_.StartUpdate(false); -#endif - } + // Start to request version info. + version_info_updater_->StartUpdate(); } void ViewsScreenLocker::OnLockScreenReady() { @@ -298,26 +285,6 @@ reverse); } -void ViewsScreenLocker::OnOSVersionLabelTextUpdated( - const std::string& os_version_label_text) { - os_version_label_text_ = os_version_label_text; - OnDevChannelInfoUpdated(); -} - -void ViewsScreenLocker::OnEnterpriseInfoUpdated(const std::string& message_text, - const std::string& asset_id) { - if (asset_id.empty()) - return; - enterprise_info_text_ = l10n_util::GetStringFUTF8( - IDS_OOBE_ASSET_ID_LABEL, base::UTF8ToUTF16(asset_id)); - OnDevChannelInfoUpdated(); -} - -void ViewsScreenLocker::OnDeviceInfoUpdated(const std::string& bluetooth_name) { - bluetooth_name_ = bluetooth_name; - OnDevChannelInfoUpdated(); -} - void ViewsScreenLocker::UpdatePinKeyboardState(const AccountId& account_id) { quick_unlock::PinBackend::GetInstance()->CanAuthenticate( account_id, base::BindOnce(&ViewsScreenLocker::OnPinCanAuthenticate, @@ -337,11 +304,6 @@ } } -void ViewsScreenLocker::OnDevChannelInfoUpdated() { - LoginScreenClient::Get()->login_screen()->SetDevChannelInfo( - os_version_label_text_, enterprise_info_text_, bluetooth_name_); -} - void ViewsScreenLocker::OnPinCanAuthenticate(const AccountId& account_id, bool can_authenticate) { LoginScreenClient::Get()->login_screen()->SetPinEnabledForUser(
diff --git a/chrome/browser/chromeos/login/lock/views_screen_locker.h b/chrome/browser/chromeos/login/lock/views_screen_locker.h index dc742894..6088bf8 100644 --- a/chrome/browser/chromeos/login/lock/views_screen_locker.h +++ b/chrome/browser/chromeos/login/lock/views_screen_locker.h
@@ -8,7 +8,6 @@ #include "base/memory/weak_ptr.h" #include "chrome/browser/chromeos/lock_screen_apps/focus_cycler_delegate.h" #include "chrome/browser/chromeos/login/lock/screen_locker.h" -#include "chrome/browser/chromeos/login/version_info_updater.h" #include "chrome/browser/chromeos/settings/cros_settings.h" #include "chrome/browser/ui/ash/login_screen_client.h" #include "chromeos/dbus/power_manager_client.h" @@ -17,6 +16,7 @@ class UserBoardViewMojo; class UserSelectionScreen; +class MojoVersionInfoDispatcher; // ViewsScreenLocker acts like LoginScreenClient::Delegate which handles method // calls coming from ash into chrome. @@ -25,8 +25,7 @@ class ViewsScreenLocker : public LoginScreenClient::Delegate, public ScreenLocker::Delegate, public PowerManagerClient::Observer, - public lock_screen_apps::FocusCyclerDelegate, - public VersionInfoUpdater::Delegate { + public lock_screen_apps::FocusCyclerDelegate { public: explicit ViewsScreenLocker(ScreenLocker* screen_locker); ~ViewsScreenLocker() override; @@ -73,17 +72,9 @@ void UnregisterLockScreenAppFocusHandler() override; void HandleLockScreenAppFocusOut(bool reverse) override; - // VersionInfoUpdater::Delegate: - void OnOSVersionLabelTextUpdated( - const std::string& os_version_label_text) override; - void OnEnterpriseInfoUpdated(const std::string& message_text, - const std::string& asset_id) override; - void OnDeviceInfoUpdated(const std::string& bluetooth_name) override; - private: void UpdatePinKeyboardState(const AccountId& account_id); void OnAllowedInputMethodsChanged(); - void OnDevChannelInfoUpdated(); void OnPinCanAuthenticate(const AccountId& account_id, bool can_authenticate); std::unique_ptr<UserBoardViewMojo> user_board_view_mojo_; @@ -109,12 +100,8 @@ // called to hand focus over to lock screen apps. LockScreenAppFocusCallback lock_screen_app_focus_handler_; - // Updates when version info is changed. - VersionInfoUpdater version_info_updater_; - - std::string os_version_label_text_; - std::string enterprise_info_text_; - std::string bluetooth_name_; + // Updates UI when version info is changed. + std::unique_ptr<MojoVersionInfoDispatcher> version_info_updater_; base::WeakPtrFactory<ViewsScreenLocker> weak_factory_;
diff --git a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc index 5363aba3..ba72dde6 100644 --- a/chrome/browser/chromeos/login/lock/webui_screen_locker.cc +++ b/chrome/browser/chromeos/login/lock/webui_screen_locker.cc
@@ -156,10 +156,10 @@ LoadURL(GURL(kLoginURL)); OnLockWindowReady(); - signin_screen_controller_.reset( - new SignInScreenController(GetOobeUI(), this)); + signin_screen_controller_.reset(new SignInScreenController(GetOobeUI())); - login_display_.reset(new LoginDisplayWebUI(this)); + login_display_.reset(new LoginDisplayWebUI()); + login_display_->set_delegate(this); login_display_->set_parent_window(GetNativeWindow()); login_display_->Init(screen_locker_->users(), false, true, false);
diff --git a/chrome/browser/chromeos/login/mojo_version_info_dispatcher.cc b/chrome/browser/chromeos/login/mojo_version_info_dispatcher.cc new file mode 100644 index 0000000..51bca7fc --- /dev/null +++ b/chrome/browser/chromeos/login/mojo_version_info_dispatcher.cc
@@ -0,0 +1,61 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/chromeos/login/mojo_version_info_dispatcher.h" + +#include "base/strings/utf_string_conversions.h" +#include "chrome/browser/ui/ash/login_screen_client.h" +#include "chrome/common/channel_info.h" +#include "chrome/grit/generated_resources.h" +#include "components/version_info/channel.h" +#include "ui/base/l10n/l10n_util.h" + +namespace chromeos { + +MojoVersionInfoDispatcher::MojoVersionInfoDispatcher() + : version_info_updater_(this) {} + +MojoVersionInfoDispatcher::~MojoVersionInfoDispatcher() {} + +void MojoVersionInfoDispatcher::StartUpdate() { + version_info::Channel channel = chrome::GetChannel(); + bool should_show_version = channel != version_info::Channel::STABLE && + channel != version_info::Channel::BETA; + if (should_show_version) { +#if defined(OFFICIAL_BUILD) + version_info_updater_.StartUpdate(true); +#else + version_info_updater_.StartUpdate(false); +#endif + } +} + +void MojoVersionInfoDispatcher::OnOSVersionLabelTextUpdated( + const std::string& os_version_label_text) { + os_version_label_text_ = os_version_label_text; + OnDevChannelInfoUpdated(); +} + +void MojoVersionInfoDispatcher::OnEnterpriseInfoUpdated( + const std::string& message_text, + const std::string& asset_id) { + if (asset_id.empty()) + return; + enterprise_info_text_ = l10n_util::GetStringFUTF8( + IDS_OOBE_ASSET_ID_LABEL, base::UTF8ToUTF16(asset_id)); + OnDevChannelInfoUpdated(); +} + +void MojoVersionInfoDispatcher::OnDeviceInfoUpdated( + const std::string& bluetooth_name) { + bluetooth_name_ = bluetooth_name; + OnDevChannelInfoUpdated(); +} + +void MojoVersionInfoDispatcher::OnDevChannelInfoUpdated() { + LoginScreenClient::Get()->login_screen()->SetDevChannelInfo( + os_version_label_text_, enterprise_info_text_, bluetooth_name_); +} + +} // namespace chromeos
diff --git a/chrome/browser/chromeos/login/mojo_version_info_dispatcher.h b/chrome/browser/chromeos/login/mojo_version_info_dispatcher.h new file mode 100644 index 0000000..1b57894 --- /dev/null +++ b/chrome/browser/chromeos/login/mojo_version_info_dispatcher.h
@@ -0,0 +1,45 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOJO_VERSION_INFO_DISPATCHER_H_ +#define CHROME_BROWSER_CHROMEOS_LOGIN_MOJO_VERSION_INFO_DISPATCHER_H_ + +#include "chrome/browser/chromeos/login/version_info_updater.h" + +namespace chromeos { + +// Used by both views based lock and login screen to observe the version info +// changes and make a mojo call to update the UI. +class MojoVersionInfoDispatcher : public VersionInfoUpdater::Delegate { + public: + MojoVersionInfoDispatcher(); + ~MojoVersionInfoDispatcher() override; + + // Start to request the version info. + void StartUpdate(); + + // VersionInfoUpdater::Delegate: + void OnOSVersionLabelTextUpdated( + const std::string& os_version_label_text) override; + void OnEnterpriseInfoUpdated(const std::string& message_text, + const std::string& asset_id) override; + void OnDeviceInfoUpdated(const std::string& bluetooth_name) override; + + private: + // Invoked when version info changes to update UI. + void OnDevChannelInfoUpdated(); + + // Updates when version info is changed. + VersionInfoUpdater version_info_updater_; + + std::string os_version_label_text_; + std::string enterprise_info_text_; + std::string bluetooth_name_; + + DISALLOW_COPY_AND_ASSIGN(MojoVersionInfoDispatcher); +}; + +} // namespace chromeos + +#endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOJO_VERSION_INFO_DISPATCHER_H_
diff --git a/chrome/browser/chromeos/login/oobe_browsertest.cc b/chrome/browser/chromeos/login/oobe_browsertest.cc index 913d72dac..8bbf9d3 100644 --- a/chrome/browser/chromeos/login/oobe_browsertest.cc +++ b/chrome/browser/chromeos/login/oobe_browsertest.cc
@@ -8,12 +8,10 @@ #include "base/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/chromeos/login/existing_user_controller.h" #include "chrome/browser/chromeos/login/screens/gaia_view.h" #include "chrome/browser/chromeos/login/test/oobe_base_test.h" #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" #include "chrome/browser/chromeos/login/ui/login_display_host_webui.h" -#include "chrome/browser/chromeos/login/ui/login_display_webui.h" #include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/lifetime/application_lifetime.h" #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" @@ -55,9 +53,8 @@ OobeBaseTest::TearDownOnMainThread(); } - LoginDisplayWebUI* GetLoginDisplay() { - return static_cast<LoginDisplayWebUI*>( - ExistingUserController::current_controller()->login_display()); + LoginDisplay* GetLoginDisplay() { + return LoginDisplayHost::default_host()->GetLoginDisplay(); } views::Widget* GetLoginWindowWidget() {
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.cc b/chrome/browser/chromeos/login/screens/user_selection_screen.cc index 8b26cbf..adbf64a 100644 --- a/chrome/browser/chromeos/login/screens/user_selection_screen.cc +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.cc
@@ -360,11 +360,6 @@ proximity_auth::ScreenlockBridge::Get()->SetLockHandler(this); } -void UserSelectionScreen::SetLoginDisplayDelegate( - LoginDisplay::Delegate* login_display_delegate) { - login_display_delegate_ = login_display_delegate; -} - // static void UserSelectionScreen::FillUserDictionary( user_manager::User* user, @@ -759,9 +754,11 @@ user_context.SetKey(Key(secret)); user_context.GetKey()->SetLabel(key_label); - // login display delegate not exist in views-based lock screen. - if (login_display_delegate_) - login_display_delegate_->Login(user_context, SigninSpecifics()); + // LoginDisplayHost does not exist in views-based lock screen. + if (LoginDisplayHost::default_host()) { + LoginDisplayHost::default_host()->GetLoginDisplay()->delegate()->Login( + user_context, SigninSpecifics()); + } } void UserSelectionScreen::Show() {}
diff --git a/chrome/browser/chromeos/login/screens/user_selection_screen.h b/chrome/browser/chromeos/login/screens/user_selection_screen.h index 8d968a3f..8ddccf9 100644 --- a/chrome/browser/chromeos/login/screens/user_selection_screen.h +++ b/chrome/browser/chromeos/login/screens/user_selection_screen.h
@@ -39,7 +39,6 @@ explicit UserSelectionScreen(const std::string& display_type); ~UserSelectionScreen() override; - void SetLoginDisplayDelegate(LoginDisplay::Delegate* login_display_delegate); void SetHandler(LoginDisplayWebUIHandler* handler); void SetView(UserBoardView* view); @@ -152,7 +151,6 @@ TokenHandleUtil::TokenHandleStatus status); LoginDisplayWebUIHandler* handler_ = nullptr; - LoginDisplay::Delegate* login_display_delegate_ = nullptr; // Purpose of the screen (see constants in OobeUI). const std::string display_type_;
diff --git a/chrome/browser/chromeos/login/session/chrome_session_manager_browsertest.cc b/chrome/browser/chromeos/login/session/chrome_session_manager_browsertest.cc index f5923a8..68f10a6 100644 --- a/chrome/browser/chromeos/login/session/chrome_session_manager_browsertest.cc +++ b/chrome/browser/chromeos/login/session/chrome_session_manager_browsertest.cc
@@ -15,7 +15,6 @@ #include "chrome/browser/chromeos/login/startup_utils.h" #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" #include "chrome/browser/chromeos/login/ui/login_display_host.h" -#include "chrome/browser/chromeos/login/ui/login_display_webui.h" #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" #include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
diff --git a/chrome/browser/chromeos/login/signin_screen_controller.cc b/chrome/browser/chromeos/login/signin_screen_controller.cc index b8ea0af4..4aaa1c2 100644 --- a/chrome/browser/chromeos/login/signin_screen_controller.cc +++ b/chrome/browser/chromeos/login/signin_screen_controller.cc
@@ -16,9 +16,7 @@ SignInScreenController* SignInScreenController::instance_ = nullptr; -SignInScreenController::SignInScreenController( - OobeUI* oobe_ui, - LoginDisplay::Delegate* login_display_delegate) +SignInScreenController::SignInScreenController(OobeUI* oobe_ui) : oobe_ui_(oobe_ui), gaia_screen_(new GaiaScreen()) { DCHECK(!instance_); instance_ = this; @@ -26,7 +24,6 @@ gaia_screen_->set_view(oobe_ui_->GetGaiaScreenView()); std::string display_type = oobe_ui->display_type(); user_selection_screen_.reset(new ChromeUserSelectionScreen(display_type)); - user_selection_screen_->SetLoginDisplayDelegate(login_display_delegate); user_board_view_ = oobe_ui_->GetUserBoardView()->GetWeakPtr(); user_selection_screen_->SetView(user_board_view_.get());
diff --git a/chrome/browser/chromeos/login/signin_screen_controller.h b/chrome/browser/chromeos/login/signin_screen_controller.h index 53cc8dea..70b0a7db 100644 --- a/chrome/browser/chromeos/login/signin_screen_controller.h +++ b/chrome/browser/chromeos/login/signin_screen_controller.h
@@ -33,8 +33,7 @@ public user_manager::UserManager::Observer, public content::NotificationObserver { public: - SignInScreenController(OobeUI* oobe_ui, - LoginDisplay::Delegate* login_display_delegate); + explicit SignInScreenController(OobeUI* oobe_ui); ~SignInScreenController() override; // Returns the default wizard controller if it has been created.
diff --git a/chrome/browser/chromeos/login/ui/fake_login_display_host.cc b/chrome/browser/chromeos/login/ui/fake_login_display_host.cc index 450b1f64..0773e62 100644 --- a/chrome/browser/chromeos/login/ui/fake_login_display_host.cc +++ b/chrome/browser/chromeos/login/ui/fake_login_display_host.cc
@@ -29,8 +29,7 @@ FakeLoginDisplayHost::~FakeLoginDisplayHost() = default; -LoginDisplay* FakeLoginDisplayHost::CreateLoginDisplay( - LoginDisplay::Delegate* delegate) { +LoginDisplay* FakeLoginDisplayHost::GetLoginDisplay() { return nullptr; }
diff --git a/chrome/browser/chromeos/login/ui/fake_login_display_host.h b/chrome/browser/chromeos/login/ui/fake_login_display_host.h index 2067149..b42c07be 100644 --- a/chrome/browser/chromeos/login/ui/fake_login_display_host.h +++ b/chrome/browser/chromeos/login/ui/fake_login_display_host.h
@@ -23,7 +23,7 @@ ~FakeLoginDisplayHost() override; // chromeos::LoginDisplayHost: - LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; + LoginDisplay* GetLoginDisplay() override; gfx::NativeWindow GetNativeWindow() const override; OobeUI* GetOobeUI() const override; WebUILoginView* GetWebUILoginView() const override;
diff --git a/chrome/browser/chromeos/login/ui/login_display.cc b/chrome/browser/chromeos/login/ui/login_display.cc index 78d4542..c1861e6 100644 --- a/chrome/browser/chromeos/login/ui/login_display.cc +++ b/chrome/browser/chromeos/login/ui/login_display.cc
@@ -8,7 +8,7 @@ LoginDisplay::Delegate::~Delegate() = default; -LoginDisplay::LoginDisplay(Delegate* delegate) : delegate_(delegate) {} +LoginDisplay::LoginDisplay() = default; LoginDisplay::~LoginDisplay() = default;
diff --git a/chrome/browser/chromeos/login/ui/login_display.h b/chrome/browser/chromeos/login/ui/login_display.h index c70bfdc..9de1681 100644 --- a/chrome/browser/chromeos/login/ui/login_display.h +++ b/chrome/browser/chromeos/login/ui/login_display.h
@@ -79,7 +79,7 @@ virtual ~Delegate(); }; - explicit LoginDisplay(Delegate* delegate); + LoginDisplay(); virtual ~LoginDisplay(); // Clears and enables fields on user pod or GAIA frame.
diff --git a/chrome/browser/chromeos/login/ui/login_display_host.cc b/chrome/browser/chromeos/login/ui/login_display_host.cc index 8dd5479..7fbb3223 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host.cc
@@ -4,17 +4,6 @@ #include "chrome/browser/chromeos/login/ui/login_display_host.h" -#include "chrome/browser/browser_process.h" -#include "chrome/browser/chromeos/login/app_launch_controller.h" -#include "chrome/browser/chromeos/login/arc_kiosk_controller.h" -#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h" -#include "chrome/browser/chromeos/login/existing_user_controller.h" -#include "chrome/browser/chromeos/login/startup_utils.h" -#include "chrome/browser/chromeos/mobile_config.h" -#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" -#include "chrome/browser/chromeos/system/device_disabling_manager.h" -#include "chrome/browser/ui/ash/wallpaper_controller_client.h" - namespace chromeos { // static
diff --git a/chrome/browser/chromeos/login/ui/login_display_host.h b/chrome/browser/chromeos/login/ui/login_display_host.h index 4015d7d..ff737b6 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host.h +++ b/chrome/browser/chromeos/login/ui/login_display_host.h
@@ -52,10 +52,8 @@ // Returns the default LoginDisplayHost instance if it has been created. static LoginDisplayHost* default_host() { return default_host_; } - // Creates UI implementation specific login display instance (views/WebUI). - // The caller takes ownership of the returned value. - virtual LoginDisplay* CreateLoginDisplay( - LoginDisplay::Delegate* delegate) = 0; + // Returns an unowned pointer to the LoginDisplay* instance. + virtual LoginDisplay* GetLoginDisplay() = 0; // Returns corresponding native window. virtual gfx::NativeWindow GetNativeWindow() const = 0;
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc index 01144f71..13fdb6aa 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.cc
@@ -9,6 +9,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "chrome/browser/chromeos/login/existing_user_controller.h" +#include "chrome/browser/chromeos/login/mojo_version_info_dispatcher.h" #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" #include "chrome/browser/chromeos/login/screens/gaia_view.h" #include "chrome/browser/chromeos/login/ui/login_display.h" @@ -32,9 +33,11 @@ } // namespace LoginDisplayHostMojo::LoginDisplayHostMojo() - : user_board_view_mojo_(std::make_unique<UserBoardViewMojo>()), + : login_display_(std::make_unique<LoginDisplayMojo>(this)), + user_board_view_mojo_(std::make_unique<UserBoardViewMojo>()), user_selection_screen_( std::make_unique<ChromeUserSelectionScreen>(kLoginDisplay)), + version_info_updater_(std::make_unique<MojoVersionInfoDispatcher>()), weak_factory_(this) { user_selection_screen_->SetView(user_board_view_mojo_.get()); @@ -44,8 +47,10 @@ LoginDisplayHostMojo::~LoginDisplayHostMojo() { LoginScreenClient::Get()->SetDelegate(nullptr); - if (dialog_) + if (dialog_) { + dialog_->GetOobeUI()->signin_screen_handler()->SetDelegate(nullptr); dialog_->Close(); + } } void LoginDisplayHostMojo::OnDialogDestroyed( @@ -94,13 +99,8 @@ dialog_->Show(true /*closable_by_esc*/); } -LoginDisplay* LoginDisplayHostMojo::CreateLoginDisplay( - LoginDisplay::Delegate* delegate) { - user_selection_screen_->SetLoginDisplayDelegate(delegate); - LoginDisplayMojo* login_display = new LoginDisplayMojo(delegate, this); - if (GetOobeUI()) - GetOobeUI()->signin_screen_handler()->SetDelegate(login_display); - return login_display; +LoginDisplay* LoginDisplayHostMojo::GetLoginDisplay() { + return login_display_.get(); } gfx::NativeWindow LoginDisplayHostMojo::GetNativeWindow() const { @@ -174,6 +174,7 @@ // There can only be one |ExistingUserController| instance at a time. existing_user_controller_.reset(); existing_user_controller_ = std::make_unique<ExistingUserController>(this); + login_display_->set_delegate(existing_user_controller_.get()); // We need auth attempt results to notify views-based lock screen. existing_user_controller_->set_login_status_consumer(this); @@ -184,6 +185,9 @@ user_selection_screen_->InitEasyUnlock(); kiosk_updater_.SendKioskApps(); + + // Start to request version info. + version_info_updater_->StartUpdate(); } void LoginDisplayHostMojo::OnPreferencesChanged() { @@ -354,6 +358,8 @@ dialog_ = new OobeUIDialogDelegate(weak_factory_.GetWeakPtr()); dialog_->Init(); + dialog_->GetOobeUI()->signin_screen_handler()->SetDelegate( + login_display_.get()); } } // namespace chromeos
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h index cdf5e81..066ef658 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_mojo.h +++ b/chrome/browser/chromeos/login/ui/login_display_host_mojo.h
@@ -19,9 +19,11 @@ namespace chromeos { class ExistingUserController; +class LoginDisplayMojo; class OobeUIDialogDelegate; class UserBoardViewMojo; class UserSelectionScreen; +class MojoVersionInfoDispatcher; // A LoginDisplayHost instance that sends requests to the views-based signin // screen. @@ -65,7 +67,7 @@ } // LoginDisplayHost: - LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; + LoginDisplay* GetLoginDisplay() override; gfx::NativeWindow GetNativeWindow() const override; OobeUI* GetOobeUI() const override; WebUILoginView* GetWebUILoginView() const override; @@ -118,6 +120,8 @@ // Callback that should be executed the authentication result is available. AuthenticateUserCallback on_authenticated_; + std::unique_ptr<LoginDisplayMojo> login_display_; + std::unique_ptr<UserBoardViewMojo> user_board_view_mojo_; std::unique_ptr<UserSelectionScreen> user_selection_screen_; @@ -137,6 +141,9 @@ KioskAppMenuUpdater kiosk_updater_; + // Updates UI when version info is changed. + std::unique_ptr<MojoVersionInfoDispatcher> version_info_updater_; + base::WeakPtrFactory<LoginDisplayHostMojo> weak_factory_; DISALLOW_COPY_AND_ASSIGN(LoginDisplayHostMojo);
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc index 73b5d9d..b1fcb2a3 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_webui.cc +++ b/chrome/browser/chromeos/login/ui/login_display_host_webui.cc
@@ -490,6 +490,8 @@ ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); manager->Initialize(SOUND_STARTUP, bundle.GetRawDataResource(IDR_SOUND_STARTUP_WAV)); + + login_display_ = std::make_unique<LoginDisplayWebUI>(); } LoginDisplayHostWebUI::~LoginDisplayHostWebUI() { @@ -528,10 +530,8 @@ //////////////////////////////////////////////////////////////////////////////// // LoginDisplayHostWebUI, LoginDisplayHost: -LoginDisplay* LoginDisplayHostWebUI::CreateLoginDisplay( - LoginDisplay::Delegate* delegate) { - login_display_ = new LoginDisplayWebUI(delegate); - return login_display_; +LoginDisplay* LoginDisplayHostWebUI::GetLoginDisplay() { + return login_display_.get(); } gfx::NativeWindow LoginDisplayHostWebUI::GetNativeWindow() const { @@ -651,8 +651,7 @@ existing_user_controller_.reset(new ExistingUserController(this)); if (!signin_screen_controller_.get()) { - signin_screen_controller_.reset( - new SignInScreenController(GetOobeUI(), login_display_->delegate())); + signin_screen_controller_.reset(new SignInScreenController(GetOobeUI())); } SetOobeProgressBarVisible(oobe_progress_bar_visible_ = false); @@ -660,8 +659,8 @@ existing_user_controller_->Init( user_manager::UserManager::Get()->GetUsersAllowedForMultiProfile()); CHECK(login_display_); - GetOobeUI()->ShowSigninScreen(LoginScreenContext(), login_display_, - login_display_); + GetOobeUI()->ShowSigninScreen(LoginScreenContext(), login_display_.get(), + login_display_.get()); } void LoginDisplayHostWebUI::CancelUserAdding() { @@ -701,10 +700,10 @@ DVLOG(1) << "Starting sign in screen"; existing_user_controller_.reset(); // Only one controller in a time. existing_user_controller_.reset(new ExistingUserController(this)); + login_display_->set_delegate(existing_user_controller_.get()); if (!signin_screen_controller_.get()) { - signin_screen_controller_.reset( - new SignInScreenController(GetOobeUI(), login_display_->delegate())); + signin_screen_controller_.reset(new SignInScreenController(GetOobeUI())); } // TODO(crbug.com/784495): This is always false, since @@ -714,7 +713,8 @@ existing_user_controller_->Init(user_manager::UserManager::Get()->GetUsers()); CHECK(login_display_); - GetOobeUI()->ShowSigninScreen(context, login_display_, login_display_); + GetOobeUI()->ShowSigninScreen(context, login_display_.get(), + login_display_.get()); TRACE_EVENT_ASYNC_STEP_INTO0("ui", "ShowLoginWebUI", kShowLoginWebUIid, "WaitForScreenStateInitialize"); @@ -1135,7 +1135,7 @@ // static void LoginDisplayHostWebUI::DisableRestrictiveProxyCheckForTest() { - static_cast<LoginDisplayHostWebUI*>(default_host()) + default_host() ->GetOobeUI() ->GetGaiaScreenView() ->DisableRestrictiveProxyCheckForTest();
diff --git a/chrome/browser/chromeos/login/ui/login_display_host_webui.h b/chrome/browser/chromeos/login/ui/login_display_host_webui.h index 916cea4..6ed1aef 100644 --- a/chrome/browser/chromeos/login/ui/login_display_host_webui.h +++ b/chrome/browser/chromeos/login/ui/login_display_host_webui.h
@@ -54,7 +54,7 @@ ~LoginDisplayHostWebUI() override; // LoginDisplayHost: - LoginDisplay* CreateLoginDisplay(LoginDisplay::Delegate* delegate) override; + LoginDisplay* GetLoginDisplay() override; gfx::NativeWindow GetNativeWindow() const override; OobeUI* GetOobeUI() const override; WebUILoginView* GetWebUILoginView() const override; @@ -197,7 +197,7 @@ WebUILoginView* login_view_ = nullptr; // Login display we are using. - LoginDisplayWebUI* login_display_ = nullptr; + std::unique_ptr<LoginDisplayWebUI> login_display_; // True if the login display is the current screen. bool is_showing_login_ = false;
diff --git a/chrome/browser/chromeos/login/ui/login_display_mojo.cc b/chrome/browser/chromeos/login/ui/login_display_mojo.cc index 0740c73..1fe1fc1 100644 --- a/chrome/browser/chromeos/login/ui/login_display_mojo.cc +++ b/chrome/browser/chromeos/login/ui/login_display_mojo.cc
@@ -24,19 +24,12 @@ namespace chromeos { -LoginDisplayMojo::LoginDisplayMojo(Delegate* delegate, - LoginDisplayHostMojo* host) - : LoginDisplay(delegate), host_(host) { +LoginDisplayMojo::LoginDisplayMojo(LoginDisplayHostMojo* host) : host_(host) { user_manager::UserManager::Get()->AddObserver(this); } LoginDisplayMojo::~LoginDisplayMojo() { user_manager::UserManager::Get()->RemoveObserver(this); - - // Make sure SigninScreenHandler does not hold a reference to LoginDisplayMojo - // after it is deleted. - if (host_->GetOobeUI()) - host_->GetOobeUI()->signin_screen_handler()->SetDelegate(nullptr); } void LoginDisplayMojo::ClearAndEnablePassword() {}
diff --git a/chrome/browser/chromeos/login/ui/login_display_mojo.h b/chrome/browser/chromeos/login/ui/login_display_mojo.h index d067f9d6..b1031f37 100644 --- a/chrome/browser/chromeos/login/ui/login_display_mojo.h +++ b/chrome/browser/chromeos/login/ui/login_display_mojo.h
@@ -22,7 +22,7 @@ public SigninScreenHandlerDelegate, public user_manager::UserManager::Observer { public: - LoginDisplayMojo(Delegate* delegate, LoginDisplayHostMojo* host); + explicit LoginDisplayMojo(LoginDisplayHostMojo* host); ~LoginDisplayMojo() override; // LoginDisplay:
diff --git a/chrome/browser/chromeos/login/ui/login_display_webui.cc b/chrome/browser/chromeos/login/ui/login_display_webui.cc index 066fd5f..1126bb3 100644 --- a/chrome/browser/chromeos/login/ui/login_display_webui.cc +++ b/chrome/browser/chromeos/login/ui/login_display_webui.cc
@@ -41,8 +41,7 @@ // LoginDisplay implementation: ------------------------------------------------ -LoginDisplayWebUI::LoginDisplayWebUI(LoginDisplay::Delegate* delegate) - : LoginDisplay(delegate) {} +LoginDisplayWebUI::LoginDisplayWebUI() = default; void LoginDisplayWebUI::ClearAndEnablePassword() { if (webui_handler_)
diff --git a/chrome/browser/chromeos/login/ui/login_display_webui.h b/chrome/browser/chromeos/login/ui/login_display_webui.h index 2794d4e..89ad383 100644 --- a/chrome/browser/chromeos/login/ui/login_display_webui.h +++ b/chrome/browser/chromeos/login/ui/login_display_webui.h
@@ -27,7 +27,7 @@ public SigninScreenHandlerDelegate, public ui::UserActivityObserver { public: - explicit LoginDisplayWebUI(LoginDisplay::Delegate* delegate); + LoginDisplayWebUI(); ~LoginDisplayWebUI() override; // LoginDisplay implementation:
diff --git a/chrome/browser/chromeos/login/ui/mock_login_display.cc b/chrome/browser/chromeos/login/ui/mock_login_display.cc index 3250ad3..87c4e5c 100644 --- a/chrome/browser/chromeos/login/ui/mock_login_display.cc +++ b/chrome/browser/chromeos/login/ui/mock_login_display.cc
@@ -10,7 +10,7 @@ namespace chromeos { -MockLoginDisplay::MockLoginDisplay() : LoginDisplay(nullptr) {} +MockLoginDisplay::MockLoginDisplay() = default; MockLoginDisplay::~MockLoginDisplay() = default;
diff --git a/chrome/browser/chromeos/login/ui/mock_login_display_host.h b/chrome/browser/chromeos/login/ui/mock_login_display_host.h index 142026c..3d27691 100644 --- a/chrome/browser/chromeos/login/ui/mock_login_display_host.h +++ b/chrome/browser/chromeos/login/ui/mock_login_display_host.h
@@ -19,7 +19,7 @@ MockLoginDisplayHost(); virtual ~MockLoginDisplayHost(); - MOCK_METHOD1(CreateLoginDisplay, LoginDisplay*(LoginDisplay::Delegate*)); + MOCK_METHOD0(GetLoginDisplay, LoginDisplay*()); MOCK_CONST_METHOD0(GetNativeWindow, gfx::NativeWindow(void)); MOCK_CONST_METHOD0(GetOobeUI, OobeUI*(void)); MOCK_CONST_METHOD0(GetWebUILoginView, WebUILoginView*(void));
diff --git a/chrome/browser/devtools/README.md b/chrome/browser/devtools/README.md new file mode 100644 index 0000000..e031518 --- /dev/null +++ b/chrome/browser/devtools/README.md
@@ -0,0 +1,3 @@ +# Chrome DevTools Protocol + +Contributing to Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing).
diff --git a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc index 04585cea..2699c31 100644 --- a/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc +++ b/chrome/browser/extensions/api/content_settings/content_settings_apitest.cc
@@ -62,9 +62,6 @@ ExtensionApiTest::TearDownOnMainThread(); } - // Override to let the test normally run on Windows Debug. - bool ExtensionSubtestsAreSkipped() override { return false; } - protected: void CheckContentSettingsSet() { HostContentSettingsMap* map =
diff --git a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc index 0ecdfca..0012a40 100644 --- a/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc +++ b/chrome/browser/extensions/api/enterprise_reporting_private/enterprise_reporting_private_api.cc
@@ -23,6 +23,14 @@ namespace em = enterprise_management; namespace extensions { +namespace { + +void LogReportError(const std::string& reason) { + VLOG(1) << "Enterprise report is not uploaded: " << reason; +} + +} // namespace + namespace enterprise_reporting { const char kInvalidInputErrorMessage[] = "The report is not valid."; @@ -53,8 +61,12 @@ ExtensionFunction::ResponseAction EnterpriseReportingPrivateUploadChromeDesktopReportFunction::Run() { - if (dm_token_.empty() || client_id_.empty()) + VLOG(1) << "Uploading enterprise report"; + + if (dm_token_.empty() || client_id_.empty()) { + LogReportError("Device is not enrolled."); return RespondNow(Error(enterprise_reporting::kDeviceNotEnrolled)); + } std::unique_ptr< api::enterprise_reporting_private::UploadChromeDesktopReport::Params> params(api::enterprise_reporting_private::UploadChromeDesktopReport:: @@ -65,6 +77,7 @@ params->report.additional_properties, Profile::FromBrowserContext(browser_context())); if (!request) { + LogReportError("The input from extension is not valid."); return RespondNow(Error(enterprise_reporting::kInvalidInputErrorMessage)); } @@ -101,10 +114,13 @@ void EnterpriseReportingPrivateUploadChromeDesktopReportFunction:: OnReportUploaded(bool status) { - if (status) + if (status) { + VLOG(1) << "The enterprise report has been uploaded."; Respond(NoArguments()); - else + } else { + LogReportError("Server error."); Respond(Error(enterprise_reporting::kUploadFailed)); + } } } // namespace extensions
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc index 2ab2d3b..8d89690 100644 --- a/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc +++ b/chrome/browser/extensions/api/messaging/native_message_process_host_unittest.cc
@@ -215,15 +215,17 @@ #if defined(OS_WIN) base::string16 pipe_name = base::StringPrintf( L"\\\\.\\pipe\\chrome.nativeMessaging.out.%llx", base::RandUint64()); - base::File write_handle = base::File::CreateForAsyncHandle( - CreateNamedPipeW(pipe_name.c_str(), - PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED | - FILE_FLAG_FIRST_PIPE_INSTANCE, - PIPE_TYPE_BYTE, 1, 0, 0, 5000, NULL)); + base::File write_handle = + base::File(CreateNamedPipeW(pipe_name.c_str(), + PIPE_ACCESS_OUTBOUND | FILE_FLAG_OVERLAPPED | + FILE_FLAG_FIRST_PIPE_INSTANCE, + PIPE_TYPE_BYTE, 1, 0, 0, 5000, NULL), + true /* async */); ASSERT_TRUE(write_handle.IsValid()); - base::File read_handle = base::File::CreateForAsyncHandle( + base::File read_handle = base::File( CreateFileW(pipe_name.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL)); + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL), + true /* async */); ASSERT_TRUE(read_handle.IsValid()); read_file = std::move(read_handle);
diff --git a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc index 8b5ce115..a746b77 100644 --- a/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc +++ b/chrome/browser/extensions/api/messaging/native_process_launcher_win.cc
@@ -171,8 +171,8 @@ } *process = std::move(cmd_process); - *read_file = base::File::CreateForAsyncHandle(stdout_pipe.Take()); - *write_file = base::File::CreateForAsyncHandle(stdin_pipe.Take()); + *read_file = base::File(stdout_pipe.Take(), true /* async */); + *write_file = base::File(stdin_pipe.Take(), true /* async */); return true; }
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc index 6a1ac5b9..51b7173 100644 --- a/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc +++ b/chrome/browser/extensions/api/passwords_private/passwords_private_apitest.cc
@@ -277,36 +277,19 @@ IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, ImportPasswords) { EXPECT_FALSE(importPasswordsWasTriggered()); EXPECT_TRUE(RunPasswordsSubtest("importPasswords")) << message_; - - // TODO(crbug.com/177163): Extension subtests are currently skipped on - // Windows, which leads to the import passwords function never being - // triggered, causing the test to fail, so the check is currently skipped in - // this case. - if (!ExtensionApiTest::ExtensionSubtestsAreSkipped()) { - EXPECT_TRUE(importPasswordsWasTriggered()); - } + EXPECT_TRUE(importPasswordsWasTriggered()); } IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, ExportPasswords) { EXPECT_FALSE(exportPasswordsWasTriggered()); EXPECT_TRUE(RunPasswordsSubtest("exportPasswords")) << message_; - - // TODO(crbug.com/177163): Extension subtests are currently skipped on - // Windows, which leads to the import passwords function never being - // triggered, causing the test to fail, so the check is currently skipped in - // this case. - if (!ExtensionApiTest::ExtensionSubtestsAreSkipped()) { - EXPECT_TRUE(exportPasswordsWasTriggered()); - } + EXPECT_TRUE(exportPasswordsWasTriggered()); } IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, CancelExportPasswords) { EXPECT_FALSE(cancelExportPasswordsWasTriggered()); EXPECT_TRUE(RunPasswordsSubtest("cancelExportPasswords")) << message_; - - if (!ExtensionApiTest::ExtensionSubtestsAreSkipped()) { - EXPECT_TRUE(cancelExportPasswordsWasTriggered()); - } + EXPECT_TRUE(cancelExportPasswordsWasTriggered()); } IN_PROC_BROWSER_TEST_F(PasswordsPrivateApiTest, RequestExportProgressStatus) {
diff --git a/chrome/browser/extensions/events_apitest.cc b/chrome/browser/extensions/events_apitest.cc index ed54be6..5f1689e3 100644 --- a/chrome/browser/extensions/events_apitest.cc +++ b/chrome/browser/extensions/events_apitest.cc
@@ -29,12 +29,6 @@ // In this test, page1.html registers for a number of events, then navigates // to page2.html, which should unregister those events. page2.html notifies // pass, by which point the event should have been unregistered. - // - // This test relies on the extension installed with RunExtensionSubtest - // actually being installed, which won't happen if subtests are skipped (see - // comment on ExtensionApiTest::ExtensionSubtestsAreSkipped) - if (ExtensionSubtestsAreSkipped()) - return; EventRouter* event_router = EventRouter::Get(profile()); ExtensionRegistry* registry = ExtensionRegistry::Get(profile());
diff --git a/chrome/browser/extensions/extension_apitest.cc b/chrome/browser/extensions/extension_apitest.cc index 3b9c979..e9deed8 100644 --- a/chrome/browser/extensions/extension_apitest.cc +++ b/chrome/browser/extensions/extension_apitest.cc
@@ -242,16 +242,6 @@ extension_name, std::string(), NULL, kFlagEnableIncognito); } -bool ExtensionApiTest::ExtensionSubtestsAreSkipped() { - // See http://crbug.com/177163 for details. -#if defined(OS_WIN) && !defined(NDEBUG) - LOG(WARNING) << "Workaround for 177163, prematurely returning"; - return true; -#else - return false; -#endif -} - bool ExtensionApiTest::RunExtensionSubtest(const std::string& extension_name, const std::string& page_url) { return RunExtensionSubtestWithArgAndFlags(extension_name, page_url, nullptr, @@ -279,8 +269,6 @@ const char* custom_arg, int flags) { DCHECK(!page_url.empty()) << "Argument page_url is required."; - if (ExtensionSubtestsAreSkipped()) - return true; return RunExtensionTestImpl(extension_name, page_url, custom_arg, flags); }
diff --git a/chrome/browser/extensions/extension_apitest.h b/chrome/browser/extensions/extension_apitest.h index a9e3421..d2ea53e 100644 --- a/chrome/browser/extensions/extension_apitest.h +++ b/chrome/browser/extensions/extension_apitest.h
@@ -104,15 +104,6 @@ // Same as RunExtensionTestIncognito, but disables file access. bool RunExtensionTestIncognitoNoFileAccess(const std::string& extension_name); - // Returns true if the Subtest and Page tests are being skipped. This is - // will only be true for windows debug builds, see http://crbug.com/177163. - // - // Usually you won't need to check this, but if a test continues after - // RunExtensionSubtest, you may. For example, if a test calls - // RunExtensionSubtest then asserts that the Extension was installed, it will - // fail on win debug builds. - virtual bool ExtensionSubtestsAreSkipped(); - // If not empty, Load |extension_name|, load |page_url| and wait for pass / // fail notification from the extension API on the page. Note that if // |page_url| is not a valid url, it will be treated as a resource within
diff --git a/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc b/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc index d0abde9..53ed6fe 100644 --- a/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc +++ b/chrome/browser/extensions/external_provider_impl_chromeos_unittest.cc
@@ -156,7 +156,8 @@ // Normal mode, standalone app should be installed, because sync is enabled but // not running. -TEST_F(ExternalProviderImplChromeOSTest, Standalone) { +// flaky: crbug.com/854206 +TEST_F(ExternalProviderImplChromeOSTest, DISABLED_Standalone) { InitServiceWithExternalProviders(true); WaitForPendingStandaloneExtensionsInstalled(); @@ -167,7 +168,8 @@ } // Should include only subset of default apps -TEST_F(ExternalProviderImplChromeOSTest, StandaloneChild) { +// flaky: crbug.com/854206 +TEST_F(ExternalProviderImplChromeOSTest, DISABLED_StandaloneChild) { InitServiceWithExternalProvidersAndUserType(true /* standalone */, true /* is_child */);
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc index 171a128..bcc762c 100644 --- a/chrome/browser/flag_descriptions.cc +++ b/chrome/browser/flag_descriptions.cc
@@ -400,6 +400,12 @@ const char kEnableClientLoFiDescription[] = "Enable showing low fidelity images on some pages on slow networks."; +const char kEnableCSSFragmentIdentifiersName[] = + "Enable CSS Fragment Identifiers"; +const char kEnableCSSFragmentIdentifiersDescription[] = + "Enable support for specifying a target element using a css selector in " + "the fragment identifier."; + const char kEnableCursorMotionBlurName[] = "Enable Cursor Motion Blur"; const char kEnableCursorMotionBlurDescription[] = "Enable motion blur effect for the cursor."; @@ -722,6 +728,11 @@ const char kEnableWasmBaselineDescription[] = "Enables WebAssembly baseline compilation and tier up."; +const char kEnableWasmThreadsName[] = "WebAssembly threads support."; +const char kEnableWasmThreadsDescription[] = + "Enables support for the WebAssembly Threads proposal. Implies " + "#shared-array-buffer and #enable-webassembly."; + const char kExpensiveBackgroundTimerThrottlingName[] = "Throttle expensive background timers"; const char kExpensiveBackgroundTimerThrottlingDescription[] = @@ -957,6 +968,12 @@ "conflict with the latest JavaScript features. This flag allows disabling " "support of those features for compatibility with such pages."; +const char kJustInTimeServiceWorkerPaymentAppName[] = + "Just-in-time service worker payment app"; +const char kJustInTimeServiceWorkerPaymentAppDescription[] = + "Allow crawling just-in-time service worker payment app when there is no " + "installed service worker payment app for a payment request."; + const char kKeepAliveRendererForKeepaliveRequestsName[] = "Keep a renderer alive for keepalive fetch requests"; const char kKeepAliveRendererForKeepaliveRequestsDescription[] =
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h index 20174d6..0218c0f5 100644 --- a/chrome/browser/flag_descriptions.h +++ b/chrome/browser/flag_descriptions.h
@@ -275,6 +275,9 @@ extern const char kEnableClientLoFiName[]; extern const char kEnableClientLoFiDescription[]; +extern const char kEnableCSSFragmentIdentifiersName[]; +extern const char kEnableCSSFragmentIdentifiersDescription[]; + extern const char kEnableCursorMotionBlurName[]; extern const char kEnableCursorMotionBlurDescription[]; @@ -459,6 +462,9 @@ extern const char kEnableWasmBaselineName[]; extern const char kEnableWasmBaselineDescription[]; +extern const char kEnableWasmThreadsName[]; +extern const char kEnableWasmThreadsDescription[]; + extern const char kExpensiveBackgroundTimerThrottlingName[]; extern const char kExpensiveBackgroundTimerThrottlingDescription[]; @@ -598,6 +604,9 @@ extern const char kJavascriptHarmonyShippingName[]; extern const char kJavascriptHarmonyShippingDescription[]; +extern const char kJustInTimeServiceWorkerPaymentAppName[]; +extern const char kJustInTimeServiceWorkerPaymentAppDescription[]; + extern const char kKeepAliveRendererForKeepaliveRequestsName[]; extern const char kKeepAliveRendererForKeepaliveRequestsDescription[];
diff --git a/chrome/browser/net/file_downloader.cc b/chrome/browser/net/file_downloader.cc index 153f35e..7ac9cc9 100644 --- a/chrome/browser/net/file_downloader.cc +++ b/chrome/browser/net/file_downloader.cc
@@ -31,10 +31,10 @@ const base::FilePath& path, bool overwrite, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, - const DownloadFinishedCallback& callback, + DownloadFinishedCallback callback, const net::NetworkTrafficAnnotationTag& traffic_annotation) : url_loader_factory_(url_loader_factory), - callback_(callback), + callback_(std::move(callback)), local_path_(path), weak_ptr_factory_(this) { auto resource_request = std::make_unique<network::ResourceRequest>(); @@ -75,7 +75,7 @@ << " while trying to download " << simple_url_loader_->GetFinalURL().spec(); } - callback_.Run(FAILED); + std::move(callback_).Run(FAILED); return; } @@ -91,7 +91,7 @@ void FileDownloader::OnFileExistsCheckDone(bool exists) { if (exists) { - callback_.Run(EXISTS); + std::move(callback_).Run(EXISTS); } else { simple_url_loader_->DownloadToTempFile( url_loader_factory_.get(), @@ -106,5 +106,5 @@ << local_path_.LossyDisplayName(); } - callback_.Run(success ? DOWNLOADED : FAILED); + std::move(callback_).Run(success ? DOWNLOADED : FAILED); }
diff --git a/chrome/browser/net/file_downloader.h b/chrome/browser/net/file_downloader.h index b782b83..9b4bdc99 100644 --- a/chrome/browser/net/file_downloader.h +++ b/chrome/browser/net/file_downloader.h
@@ -34,7 +34,7 @@ // Downloading failed. FAILED }; - using DownloadFinishedCallback = base::Callback<void(Result)>; + using DownloadFinishedCallback = base::OnceCallback<void(Result)>; // Directly starts the download (if necessary) and runs |callback| when done. // If the instance is destroyed before it is finished, |callback| is not run. @@ -43,7 +43,7 @@ const base::FilePath& path, bool overwrite, scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory, - const DownloadFinishedCallback& callback, + DownloadFinishedCallback callback, const net::NetworkTrafficAnnotationTag& traffic_annotation); ~FileDownloader();
diff --git a/chrome/browser/net/file_downloader_unittest.cc b/chrome/browser/net/file_downloader_unittest.cc index e8362dd..89312e27 100644 --- a/chrome/browser/net/file_downloader_unittest.cc +++ b/chrome/browser/net/file_downloader_unittest.cc
@@ -58,8 +58,8 @@ void Download(bool overwrite, FileDownloader::Result expected_result) { FileDownloader downloader( GURL(kURL), path_, overwrite, test_shared_loader_factory_, - base::Bind(&FileDownloaderTest::OnDownloadFinished, - base::Unretained(this)), + base::BindOnce(&FileDownloaderTest::OnDownloadFinished, + base::Unretained(this)), TRAFFIC_ANNOTATION_FOR_TESTS); EXPECT_CALL(*this, OnDownloadFinished(expected_result)); // Wait for the FileExists check to happen if necessary.
diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc index ac96830..dc061f7 100644 --- a/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc +++ b/chrome/browser/picture_in_picture/picture_in_picture_window_controller_browsertest.cc
@@ -61,8 +61,8 @@ DISALLOW_COPY_AND_ASSIGN(PictureInPictureWindowControllerBrowserTest); }; -// TODO(845747): Linux is hitting this DCHECK. -#if !defined(OS_LINUX) +// TODO(845747): ChromeOS is hitting this DCHECK. +#if !defined(OS_CHROMEOS) // Checks the creation of the window controller, as well as basic window // creation and visibility. @@ -615,8 +615,16 @@ } // Same as above for a cross-origin iframe. +// Flaky on windows: crbug/854349 +#if defined(OS_WIN) +#define MAYBE_CrossOriginFrameEnterLeaveCloseWindow \ + DISABLED_CrossOriginFrameEnterLeaveCloseWindow +#else +#define MAYBE_CrossOriginFrameEnterLeaveCloseWindow \ + CrossOriginFrameEnterLeaveCloseWindow +#endif IN_PROC_BROWSER_TEST_F(PictureInPictureWindowControllerBrowserTest, - CrossOriginFrameEnterLeaveCloseWindow) { + MAYBE_CrossOriginFrameEnterLeaveCloseWindow) { GURL embed_url = embedded_test_server()->GetURL( "a.com", "/media/picture-in-picture/iframe-content.html"); GURL main_url = embedded_test_server()->GetURL( @@ -653,4 +661,4 @@ EXPECT_FALSE(window_controller()->GetWindowForTesting()->IsVisible()); } -#endif // !defined(OS_LINUX) +#endif // !defined(OS_CHROMEOS)
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc index fb5b59a..cfe6b026 100644 --- a/chrome/browser/prefs/browser_prefs.cc +++ b/chrome/browser/prefs/browser_prefs.cc
@@ -69,6 +69,7 @@ #include "chrome/browser/ui/webui/flags_ui.h" #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" #include "chrome/browser/ui/webui/print_preview/sticky_settings.h" +#include "chrome/browser/web_applications/web_app.h" #include "chrome/common/buildflags.h" #include "chrome/common/pref_names.h" #include "chrome/common/secure_origin_whitelist.h" @@ -572,6 +573,7 @@ extensions::NtpOverriddenBubbleDelegate::RegisterPrefs(registry); extensions::RuntimeAPI::RegisterPrefs(registry); update_client::RegisterProfilePrefs(registry); + web_app::RegisterProfilePrefs(registry); #endif // BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_DESKTOP_IN_PRODUCT_HELP)
diff --git a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc index 165ea36e..f69fe40c 100644 --- a/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc +++ b/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
@@ -144,6 +144,7 @@ #include "chrome/browser/extensions/browser_context_keyed_service_factories.h" #include "chrome/browser/extensions/extension_management.h" #include "chrome/browser/ui/bookmarks/enhanced_bookmark_key_service_factory.h" +#include "chrome/browser/web_applications/policy/web_app_policy_manager_factory.h" #include "extensions/browser/api/networking_private/networking_private_delegate_factory.h" #include "extensions/browser/browser_context_keyed_service_factories.h" #if defined(OS_CHROMEOS) @@ -198,6 +199,7 @@ extensions::ExtensionManagementFactory::GetInstance(); chrome_extensions::EnsureBrowserContextKeyedServiceFactoriesBuilt(); chrome_apps::EnsureBrowserContextKeyedServiceFactoriesBuilt(); + web_app::WebAppPolicyManagerFactory::GetInstance(); #endif #if BUILDFLAG(ENABLE_APP_LIST)
diff --git a/chrome/browser/resource_coordinator/lifecycle_unit.h b/chrome/browser/resource_coordinator/lifecycle_unit.h index 6daec32..3e3cf56 100644 --- a/chrome/browser/resource_coordinator/lifecycle_unit.h +++ b/chrome/browser/resource_coordinator/lifecycle_unit.h
@@ -88,9 +88,11 @@ // Returns the current visibility of this LifecycleUnit. virtual content::Visibility GetVisibility() const = 0; - // Returns the last time at which the LifecycleUnit was visible, or - // base::TimeTicks::Max() if the LifecycleUnit is currently visible. - virtual base::TimeTicks GetLastVisibleTime() const = 0; + // Returns TimeTicks::Max() if the LifecycleUnit is currently visible, the + // last time at which the LifecycleUnit was visible if it's not currently + // visible but has been visible in the past, the LifecycleUnit creation time + // otherwise. + virtual base::TimeTicks GetLastActiveTime() const = 0; // Returns the loading state associated with a LifecycleUnit. virtual LifecycleUnitLoadingState GetLoadingState() const = 0;
diff --git a/chrome/browser/resource_coordinator/lifecycle_unit_base.cc b/chrome/browser/resource_coordinator/lifecycle_unit_base.cc index 99cab20..86c9487 100644 --- a/chrome/browser/resource_coordinator/lifecycle_unit_base.cc +++ b/chrome/browser/resource_coordinator/lifecycle_unit_base.cc
@@ -10,9 +10,9 @@ namespace resource_coordinator { LifecycleUnitBase::LifecycleUnitBase(content::Visibility visibility) - : last_visible_time_(visibility == content::Visibility::VISIBLE - ? base::TimeTicks::Max() - : base::TimeTicks()) {} + : last_active_time_(visibility == content::Visibility::VISIBLE + ? base::TimeTicks::Max() + : NowTicks()) {} LifecycleUnitBase::~LifecycleUnitBase() = default; @@ -24,8 +24,8 @@ return state_; } -base::TimeTicks LifecycleUnitBase::GetLastVisibleTime() const { - return last_visible_time_; +base::TimeTicks LifecycleUnitBase::GetLastActiveTime() const { + return last_active_time_; } void LifecycleUnitBase::AddObserver(LifecycleUnitObserver* observer) { @@ -58,9 +58,9 @@ void LifecycleUnitBase::OnLifecycleUnitVisibilityChanged( content::Visibility visibility) { if (visibility == content::Visibility::VISIBLE) - last_visible_time_ = base::TimeTicks::Max(); - else if (last_visible_time_.is_max()) - last_visible_time_ = NowTicks(); + last_active_time_ = base::TimeTicks::Max(); + else if (last_active_time_.is_max()) + last_active_time_ = NowTicks(); for (auto& observer : observers_) observer.OnLifecycleUnitVisibilityChanged(this, visibility);
diff --git a/chrome/browser/resource_coordinator/lifecycle_unit_base.h b/chrome/browser/resource_coordinator/lifecycle_unit_base.h index 9b14d71..e2a56dc 100644 --- a/chrome/browser/resource_coordinator/lifecycle_unit_base.h +++ b/chrome/browser/resource_coordinator/lifecycle_unit_base.h
@@ -23,7 +23,7 @@ // LifecycleUnit: int32_t GetID() const override; - base::TimeTicks GetLastVisibleTime() const override; + base::TimeTicks GetLastActiveTime() const override; LifecycleUnitState GetState() const override; void AddObserver(LifecycleUnitObserver* observer) override; void RemoveObserver(LifecycleUnitObserver* observer) override; @@ -60,7 +60,12 @@ // Current state of this LifecycleUnit. LifecycleUnitState state_ = LifecycleUnitState::ACTIVE; - base::TimeTicks last_visible_time_; + // TODO(fdoray): Use WebContents::GetLastActiveTime() instead of tracking a + // separate last active time here. For this to work, + // WebContents::GetLastActiveTime() will have to be updated to return the last + // time at which the WebContents was active, rather than the last time at + // which it was activated. + base::TimeTicks last_active_time_; base::ObserverList<LifecycleUnitObserver> observers_;
diff --git a/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc b/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc index c25728b..593a8ef 100644 --- a/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc +++ b/chrome/browser/resource_coordinator/lifecycle_unit_base_unittest.cc
@@ -31,11 +31,23 @@ DISALLOW_COPY_AND_ASSIGN(MockLifecycleUnitObserver); }; +class LifecycleUnitBaseTest : public testing::Test { + protected: + LifecycleUnitBaseTest() = default; + + base::SimpleTestTickClock test_clock_; + ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_{&test_clock_}; + testing::StrictMock<MockLifecycleUnitObserver> observer_; + + private: + DISALLOW_COPY_AND_ASSIGN(LifecycleUnitBaseTest); +}; + } // namespace // Verify that GetID() returns different ids for different LifecycleUnits, but // always the same id for the same LifecycleUnit. -TEST(LifecycleUnitBaseTest, GetID) { +TEST_F(LifecycleUnitBaseTest, GetID) { TestLifecycleUnit a; TestLifecycleUnit b; TestLifecycleUnit c; @@ -51,79 +63,86 @@ // Verify that observers are notified when the state changes and when the // LifecycleUnit is destroyed. -TEST(LifecycleUnitBaseTest, SetStateNotifiesObservers) { - testing::StrictMock<MockLifecycleUnitObserver> observer; +TEST_F(LifecycleUnitBaseTest, SetStateNotifiesObservers) { TestLifecycleUnit lifecycle_unit; - lifecycle_unit.AddObserver(&observer); + lifecycle_unit.AddObserver(&observer_); // Observer is notified when the state changes. - EXPECT_CALL(observer, OnLifecycleUnitStateChanged(&lifecycle_unit, - lifecycle_unit.GetState())); + EXPECT_CALL(observer_, OnLifecycleUnitStateChanged( + &lifecycle_unit, lifecycle_unit.GetState())); lifecycle_unit.SetState(LifecycleUnitState::DISCARDED, LifecycleUnitStateChangeReason::BROWSER_INITIATED); - testing::Mock::VerifyAndClear(&observer); + testing::Mock::VerifyAndClear(&observer_); // Observer isn't notified when the state stays the same. lifecycle_unit.SetState(LifecycleUnitState::DISCARDED, LifecycleUnitStateChangeReason::BROWSER_INITIATED); - lifecycle_unit.RemoveObserver(&observer); + lifecycle_unit.RemoveObserver(&observer_); } // Verify that observers are notified when the LifecycleUnit is destroyed. -TEST(LifecycleUnitBaseTest, DestroyNotifiesObservers) { - testing::StrictMock<MockLifecycleUnitObserver> observer; +TEST_F(LifecycleUnitBaseTest, DestroyNotifiesObservers) { { TestLifecycleUnit lifecycle_unit; - lifecycle_unit.AddObserver(&observer); - EXPECT_CALL(observer, OnLifecycleUnitDestroyed(&lifecycle_unit)); + lifecycle_unit.AddObserver(&observer_); + EXPECT_CALL(observer_, OnLifecycleUnitDestroyed(&lifecycle_unit)); } - testing::Mock::VerifyAndClear(&observer); + testing::Mock::VerifyAndClear(&observer_); +} + +// Verify the initial GetLastActiveTime() of a visible LifecycleUnit. +TEST_F(LifecycleUnitBaseTest, InitialLastActiveTimeForVisibleLifecycleUnit) { + TestLifecycleUnit lifecycle_unit(content::Visibility::VISIBLE); + EXPECT_EQ(base::TimeTicks::Max(), lifecycle_unit.GetLastActiveTime()); +} + +// Verify the initial GetLastActiveTime() of a hidden LifecycleUnit. +TEST_F(LifecycleUnitBaseTest, InitialLastActiveTimeForHiddenLifecycleUnit) { + TestLifecycleUnit lifecycle_unit(content::Visibility::HIDDEN); + EXPECT_EQ(NowTicks(), lifecycle_unit.GetLastActiveTime()); } // Verify that observers are notified when the visibility of the LifecyleUnit -// changes. Verify that GetLastVisibleTime() is updated properly. -TEST(LifecycleUnitBaseTest, VisibilityChangeNotifiesObserversAndUpdatesTime) { - base::SimpleTestTickClock test_clock_; - ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_(&test_clock_); - testing::StrictMock<MockLifecycleUnitObserver> observer; +// changes. Verify that GetLastActiveTime() is updated properly. +TEST_F(LifecycleUnitBaseTest, VisibilityChangeNotifiesObserversAndUpdatesTime) { TestLifecycleUnit lifecycle_unit; - lifecycle_unit.AddObserver(&observer); + lifecycle_unit.AddObserver(&observer_); // Observer is notified when the visibility changes. test_clock_.Advance(base::TimeDelta::FromMinutes(1)); base::TimeTicks last_visible_time = NowTicks(); - EXPECT_CALL(observer, OnLifecycleUnitVisibilityChanged( - &lifecycle_unit, content::Visibility::HIDDEN)) + EXPECT_CALL(observer_, OnLifecycleUnitVisibilityChanged( + &lifecycle_unit, content::Visibility::HIDDEN)) .WillOnce(testing::Invoke( [&](LifecycleUnit* lifecycle_unit, content::Visibility visibility) { - EXPECT_EQ(last_visible_time, lifecycle_unit->GetLastVisibleTime()); + EXPECT_EQ(last_visible_time, lifecycle_unit->GetLastActiveTime()); })); lifecycle_unit.OnLifecycleUnitVisibilityChanged(content::Visibility::HIDDEN); - testing::Mock::VerifyAndClear(&observer); + testing::Mock::VerifyAndClear(&observer_); test_clock_.Advance(base::TimeDelta::FromMinutes(1)); - EXPECT_CALL(observer, OnLifecycleUnitVisibilityChanged( - &lifecycle_unit, content::Visibility::OCCLUDED)) + EXPECT_CALL(observer_, OnLifecycleUnitVisibilityChanged( + &lifecycle_unit, content::Visibility::OCCLUDED)) .WillOnce(testing::Invoke( [&](LifecycleUnit* lifecycle_unit, content::Visibility visibility) { - EXPECT_EQ(last_visible_time, lifecycle_unit->GetLastVisibleTime()); + EXPECT_EQ(last_visible_time, lifecycle_unit->GetLastActiveTime()); })); lifecycle_unit.OnLifecycleUnitVisibilityChanged( content::Visibility::OCCLUDED); - testing::Mock::VerifyAndClear(&observer); + testing::Mock::VerifyAndClear(&observer_); test_clock_.Advance(base::TimeDelta::FromMinutes(1)); - EXPECT_CALL(observer, OnLifecycleUnitVisibilityChanged( - &lifecycle_unit, content::Visibility::VISIBLE)) + EXPECT_CALL(observer_, OnLifecycleUnitVisibilityChanged( + &lifecycle_unit, content::Visibility::VISIBLE)) .WillOnce(testing::Invoke( [&](LifecycleUnit* lifecycle_unit, content::Visibility visibility) { - EXPECT_TRUE(lifecycle_unit->GetLastVisibleTime().is_max()); + EXPECT_TRUE(lifecycle_unit->GetLastActiveTime().is_max()); })); lifecycle_unit.OnLifecycleUnitVisibilityChanged(content::Visibility::VISIBLE); - testing::Mock::VerifyAndClear(&observer); + testing::Mock::VerifyAndClear(&observer_); - lifecycle_unit.RemoveObserver(&observer); + lifecycle_unit.RemoveObserver(&observer_); } } // namespace resource_coordinator
diff --git a/chrome/browser/resource_coordinator/local_site_characteristics_data_impl.h b/chrome/browser/resource_coordinator/local_site_characteristics_data_impl.h index 5a81685d..a56683b2 100644 --- a/chrome/browser/resource_coordinator/local_site_characteristics_data_impl.h +++ b/chrome/browser/resource_coordinator/local_site_characteristics_data_impl.h
@@ -101,8 +101,6 @@ return site_characteristics_; } - size_t loaded_tabs_count_for_testing() const { return loaded_tabs_count_; } - size_t loaded_tabs_in_background_count_for_testing() const { return loaded_tabs_in_background_count_; }
diff --git a/chrome/browser/resource_coordinator/local_site_characteristics_data_writer.cc b/chrome/browser/resource_coordinator/local_site_characteristics_data_writer.cc index 7f7808e..ae6c95d 100644 --- a/chrome/browser/resource_coordinator/local_site_characteristics_data_writer.cc +++ b/chrome/browser/resource_coordinator/local_site_characteristics_data_writer.cc
@@ -66,8 +66,6 @@ void LocalSiteCharacteristicsDataWriter::NotifyUsesAudioInBackground() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_EQ(TabVisibility::kBackground, tab_visibility_); - // TODO(sebmarchand): Do not advance the background audio observation time - // when the WebContents has never played audio. impl_->NotifyUsesAudioInBackground(); }
diff --git a/chrome/browser/resource_coordinator/local_site_characteristics_database_browsertest.cc b/chrome/browser/resource_coordinator/local_site_characteristics_database_browsertest.cc deleted file mode 100644 index 455863a2..0000000 --- a/chrome/browser/resource_coordinator/local_site_characteristics_database_browsertest.cc +++ /dev/null
@@ -1,555 +0,0 @@ -// Copyright 2018 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 <algorithm> - -#include "base/bind_helpers.h" -#include "base/callback.h" -#include "base/path_service.h" -#include "base/test/scoped_feature_list.h" -#include "base/test/simple_test_tick_clock.h" -#include "chrome/browser/chrome_notification_types.h" -#include "chrome/browser/content_settings/host_content_settings_map_factory.h" -#include "chrome/browser/history/history_service_factory.h" -#include "chrome/browser/notifications/desktop_notification_profile_util.h" -#include "chrome/browser/permissions/permission_request_manager.h" -#include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/resource_coordinator/local_site_characteristics_data_impl.h" -#include "chrome/browser/resource_coordinator/local_site_characteristics_data_reader.h" -#include "chrome/browser/resource_coordinator/local_site_characteristics_data_store_factory.h" -#include "chrome/browser/resource_coordinator/site_characteristics_data_reader.h" -#include "chrome/browser/resource_coordinator/tab_load_tracker.h" -#include "chrome/browser/resource_coordinator/tab_manager_features.h" -#include "chrome/browser/resource_coordinator/time.h" -#include "chrome/browser/ui/browser.h" -#include "chrome/test/base/in_process_browser_test.h" -#include "chrome/test/base/ui_test_utils.h" -#include "components/content_settings/core/browser/host_content_settings_map.h" -#include "components/network_session_configurator/common/network_switches.h" -#include "content/public/browser/notification_service.h" -#include "content/public/test/browser_test_utils.h" -#include "content/public/test/test_utils.h" -#include "content/public/test/web_contents_tester.h" -#include "media/base/media_switches.h" -#include "net/dns/mock_host_resolver.h" -#include "testing/gtest/include/gtest/gtest.h" -#include "url/origin.h" - -#if defined(OS_CHROMEOS) -#include "chromeos/chromeos_switches.h" -#endif - -namespace resource_coordinator { - -namespace { - -using WebContents = content::WebContents; -using WebContentsTester = content::WebContentsTester; - -constexpr char kTestPage[] = - "/resource_coordinator/site_characteristics_test_page.html"; - -// Returns the longest feature observation window. -base::TimeDelta GetLongestObservationWindow() { - const SiteCharacteristicsDatabaseParams& params = - GetStaticSiteCharacteristicsDatabaseParams(); - return std::max({params.favicon_update_observation_window, - params.title_update_observation_window, - params.audio_usage_observation_window, - params.notifications_usage_observation_window}); -} - -} // namespace - -class LocalSiteCharacteristicsDatabaseTest : public InProcessBrowserTest { - public: - LocalSiteCharacteristicsDatabaseTest() - : scoped_set_tick_clock_for_testing_(&test_clock_), - test_server_(net::test_server::EmbeddedTestServer::TYPE_HTTPS) {} - ~LocalSiteCharacteristicsDatabaseTest() override = default; - - void SetUp() override { - test_clock_.Advance(base::TimeDelta::FromSeconds(1)); - scoped_feature_list_.InitAndEnableFeature( - features::kSiteCharacteristicsDatabase); - InProcessBrowserTest::SetUp(); - } - - void SetUpOnMainThread() override { - InProcessBrowserTest::SetUpOnMainThread(); - - // Setup the test server. - base::FilePath test_data_dir; - ASSERT_TRUE(base::PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir)); - test_server_.SetSSLConfig(net::EmbeddedTestServer::CERT_OK); - test_server_.ServeFilesFromDirectory( - test_data_dir.AppendASCII("chrome/test/data/")); - ASSERT_TRUE(test_server_.InitializeAndListen()); - test_server_.StartAcceptingConnections(); - const std::string real_host = test_server_.host_port_pair().host(); - host_resolver()->AddRule("*", real_host); - } - - void SetUpCommandLine(base::CommandLine* command_line) override { - command_line->AppendSwitchASCII( - switches::kAutoplayPolicy, - switches::autoplay::kNoUserGestureRequiredPolicy); - - // HTTPS server only serves a valid cert for localhost, so this is needed - // to load pages from other origins without an interstitial. - command_line->AppendSwitch(switches::kIgnoreCertificateErrors); - -#if defined(OS_CHROMEOS) - command_line->AppendSwitch( - chromeos::switches::kIgnoreUserProfileMappingForTests); -#endif - InProcessBrowserTest::SetUpCommandLine(command_line); - } - - WebContents* GetActiveWebContents() { - return browser()->tab_strip_model()->GetActiveWebContents(); - } - - std::unique_ptr<SiteCharacteristicsDataReader> GetReaderForOrigin( - Profile* profile, - const url::Origin& origin) { - SiteCharacteristicsDataStore* data_store = - LocalSiteCharacteristicsDataStoreFactory::GetForProfile(profile); - EXPECT_TRUE(data_store); - std::unique_ptr<SiteCharacteristicsDataReader> reader = - data_store->GetReaderForOrigin(origin); - - internal::LocalSiteCharacteristicsDataImpl* impl = - static_cast<LocalSiteCharacteristicsDataReader*>(reader.get()) - ->impl_for_testing() - .get(); - while (!impl->site_characteristics_for_testing().IsInitialized()) - base::RunLoop().RunUntilIdle(); - return reader; - } - - // Test that feature usage is tracked correctly: - // - kSiteFeatureUsageUnknown if never observed and observation window - // hasn't expired. - // - kSiteFeatureNotInUse if never observed and observation window has - // expired. - // - kSiteFeatureInUse if observed. - // |feature_detection_method| is the SiteCharacteristicsDataReader method that - // will be called to query the status of this feature. |triggering_closure| is - // the closure to run to cause this feature to be used (this will get called - // while the tab is in background) and |allowing_closure| is an optional - // closure that should run before testing the feature usage (to allow it to - // be used). - void TestFeatureUsageDetection( - SiteFeatureUsage ( - SiteCharacteristicsDataReader::*feature_detection_method)() const, - base::RepeatingClosure triggering_closure, - base::RepeatingClosure allowing_closure = base::DoNothing::Repeatedly()) { - // Test that feature usage is tracked correctly before the expiration of its - // observation window. - TestFeatureUsageDetectionImpl(feature_detection_method, allowing_closure, - triggering_closure, false); - // Test that feature usage is tracked correctly after the expiration of its - // observation window. - TestFeatureUsageDetectionImpl(feature_detection_method, - std::move(allowing_closure), - std::move(triggering_closure), true); - } - - void ExecuteScriptInMainFrame(const char* script) { - content::RenderFrameHost* main_frame = - GetActiveWebContents()->GetMainFrame(); - EXPECT_TRUE(content::ExecuteScript(main_frame, script)); - } - - void PlayAudioInActiveWebContents() { - ExecuteScriptInMainFrame("PlayAudio();"); - } - - void ChangeTitleOfActiveWebContents() { - ExecuteScriptInMainFrame("ChangeTitle('new_title')"); - } - - void ChangeFaviconOfActiveWebContents() { - ExecuteScriptInMainFrame("ChangeFavicon()"); - } - - void TriggerNonPersistentNotificationInActiveWebContents() { - ExecuteScriptInMainFrame( - "DisplayAndCloseNonPersistentNotification('foo');"); - } - - // By default a tab has to play audio while being visible if it wants to be - // able to play audio in background (see - // ChromeContentRendererClient::DeferMediaLoad). This makes the current active - // WebContents visible, play some audio and background it. After calling - // this the background tab is allowed play audio. - void AllowBackgroundAudioInActiveTab() { - content::WebContents* active_webcontents = GetActiveWebContents(); - active_webcontents->WasShown(); - PlayAudioInActiveWebContents(); - - // Wait for the audio to start playing. - while (!active_webcontents->WasEverAudible()) - base::RunLoop().RunUntilIdle(); - - active_webcontents->GetController().Reload(content::ReloadType::NORMAL, - false); - content::WaitForLoadStop(GetActiveWebContents()); - // Background the tab and reload it so the audio will stop playing if it's - // still playing. - GetActiveWebContents()->WasHidden(); - } - - // Ensure that the current tab is allowed to display non-persistent - // notifications. - void AllowBackgroundNotificationInActiveTab() { - HostContentSettingsMapFactory::GetForProfile(browser()->profile()) - ->ClearSettingsForOneType(CONTENT_SETTINGS_TYPE_NOTIFICATIONS); - HostContentSettingsMapFactory::GetForProfile(browser()->profile()) - ->SetDefaultContentSetting(CONTENT_SETTINGS_TYPE_NOTIFICATIONS, - CONTENT_SETTING_ALLOW); - content::WebContents* web_contents = GetActiveWebContents(); - DesktopNotificationProfileUtil::GrantPermission( - browser()->profile(), web_contents->GetLastCommittedURL()); - PermissionRequestManager::FromWebContents(web_contents) - ->set_auto_response_for_test(PermissionRequestManager::ACCEPT_ALL); - ExecuteScriptInMainFrame("RequestNotificationsPermission();"); - } - - base::SimpleTestTickClock& test_clock() { return test_clock_; } - net::test_server::EmbeddedTestServer& test_server() { return test_server_; } - - private: - void TestFeatureUsageDetectionImpl( - SiteFeatureUsage ( - SiteCharacteristicsDataReader::*feature_detection_method)() const, - base::OnceClosure allowing_closure, - base::RepeatingClosure triggering_closure, - bool wait_for_observation_window_to_expire); - - base::SimpleTestTickClock test_clock_; - ScopedSetTickClockForTesting scoped_set_tick_clock_for_testing_; - base::test::ScopedFeatureList scoped_feature_list_; - net::test_server::EmbeddedTestServer test_server_; - - DISALLOW_COPY_AND_ASSIGN(LocalSiteCharacteristicsDatabaseTest); -}; - -void LocalSiteCharacteristicsDatabaseTest::TestFeatureUsageDetectionImpl( - SiteFeatureUsage ( - SiteCharacteristicsDataReader::*feature_detection_method)() const, - base::OnceClosure allowing_closure, - base::RepeatingClosure triggering_closure, - bool wait_for_observation_window_to_expire) { - // Use a different origin depending on the type of test to make sure that - // previous observations don't get re-used. - const char* kOrigin = - wait_for_observation_window_to_expire ? "foo.com" : "bar.com"; - GURL test_url(test_server_.GetURL(kOrigin, kTestPage)); - - // Get the reader for this origin. - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - (reader.get()->*feature_detection_method)()); - - // Navigate to the test url and background it. - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, WindowOpenDisposition::CURRENT_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - GetActiveWebContents()->WasHidden(); - - // If needed, wait for all feature observation windows to expire. - if (wait_for_observation_window_to_expire) { - test_clock_.Advance(GetLongestObservationWindow()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - (reader.get()->*feature_detection_method)()); - } - - // Call the allowing closure. - std::move(allowing_closure).Run(); - - // Ensure that the closure hasn't caused the feature usage status to - // change. - if (wait_for_observation_window_to_expire) { - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - (reader.get()->*feature_detection_method)()); - } else { - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - (reader.get()->*feature_detection_method)()); - } - - // Cause the feature to be used. - triggering_closure.Run(); - - while ((reader.get()->*feature_detection_method)() != - SiteFeatureUsage::kSiteFeatureInUse) { - base::RunLoop().RunUntilIdle(); - } - - // Advance the clock, make sure that the feature usage status doesn't - // change. - test_clock_.Advance(GetLongestObservationWindow()); - - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureInUse, - (reader.get()->*feature_detection_method)()); -} - -// Test that doesn't use any feature. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, NoFeatureUsed) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, WindowOpenDisposition::NEW_BACKGROUND_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesFaviconInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UsesAudioInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UsesNotificationsInBackground()); - - test_clock().Advance(GetLongestObservationWindow()); - - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - reader->UpdatesFaviconInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - reader->UpdatesTitleInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - reader->UsesAudioInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureNotInUse, - reader->UsesNotificationsInBackground()); -} - -// Test that use features while in foreground, this shouldn't be recorded. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - FeatureUsedInForegroundOnly) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, WindowOpenDisposition::CURRENT_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - - GetActiveWebContents()->WasShown(); - - ChangeTitleOfActiveWebContents(); - ChangeFaviconOfActiveWebContents(); - PlayAudioInActiveWebContents(); - // TODO(sebmarchand): Also trigger a background notification once. - - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesFaviconInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); - - // Advance the clock while the tab is still in foreground and make sure that - // the state hasn't changed. - test_clock().Advance(GetLongestObservationWindow()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesFaviconInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UsesAudioInBackground()); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UsesNotificationsInBackground()); -} - -// Test that the audio feature usage in background gets detected properly. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - AudioFeatureUsage) { - TestFeatureUsageDetection( - &SiteCharacteristicsDataReader::UsesAudioInBackground, - base::BindRepeating( - &LocalSiteCharacteristicsDatabaseTest::PlayAudioInActiveWebContents, - base::Unretained(this)), - base::BindRepeating(&LocalSiteCharacteristicsDatabaseTest:: - AllowBackgroundAudioInActiveTab, - base::Unretained(this))); -} - -// Test that the notification feature usage in background gets detected -// properly. -// TODO(sebmarchand): Figure out how to trigger a non-persistent notification in -// this test. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - DISABLED_NotificationFeatureUsage) { - TestFeatureUsageDetection( - &SiteCharacteristicsDataReader::UsesNotificationsInBackground, - base::BindRepeating( - &LocalSiteCharacteristicsDatabaseTest:: - TriggerNonPersistentNotificationInActiveWebContents, - base::Unretained(this)), - base::BindRepeating(&LocalSiteCharacteristicsDatabaseTest:: - AllowBackgroundNotificationInActiveTab, - base::Unretained(this))); -} - -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - TitleUpdateFeatureUsage) { - TestFeatureUsageDetection( - &SiteCharacteristicsDataReader::UpdatesTitleInBackground, - base::BindRepeating( - &LocalSiteCharacteristicsDatabaseTest::ChangeTitleOfActiveWebContents, - base::Unretained(this))); -} - -// Test that the favicon update feature usage in background gets detected -// properly. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - FaviconUpdateFeatureUsage) { - TestFeatureUsageDetection( - &SiteCharacteristicsDataReader::UpdatesFaviconInBackground, - base::BindRepeating(&LocalSiteCharacteristicsDatabaseTest:: - ChangeFaviconOfActiveWebContents, - base::Unretained(this))); -} - -// Test that loads the same origin into multiple tabs and ensure that they get -// tracked properly. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - LoadedStateGetsTrackedProperly) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - auto test_reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - - const size_t kTabCount = 3; - - // Load all the tabs and background them. - for (size_t i = 0; i < kTabCount; ++i) { - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, - i == 0 ? WindowOpenDisposition::CURRENT_TAB - : WindowOpenDisposition::NEW_FOREGROUND_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - EXPECT_EQ(TabLoadTracker::LoadingState::LOADED, - TabLoadTracker::Get()->GetLoadingState( - browser()->tab_strip_model()->GetWebContentsAt(i))); - browser()->tab_strip_model()->GetWebContentsAt(i)->WasHidden(); - } - - internal::LocalSiteCharacteristicsDataImpl* impl = - static_cast<LocalSiteCharacteristicsDataReader*>(test_reader.get()) - ->impl_for_testing() - .get(); - EXPECT_TRUE(impl); - EXPECT_EQ(3U, impl->loaded_tabs_count_for_testing()); - EXPECT_EQ(3U, impl->loaded_tabs_in_background_count_for_testing()); - - // Change the visibility of the tabs. - for (size_t i = 0; i < kTabCount; ++i) { - browser()->tab_strip_model()->GetWebContentsAt(i)->WasShown(); - - EXPECT_EQ(kTabCount, impl->loaded_tabs_count_for_testing()); - EXPECT_EQ(kTabCount - (i + 1), - impl->loaded_tabs_in_background_count_for_testing()); - } - - for (size_t i = 0; i < kTabCount; ++i) - browser()->tab_strip_model()->GetWebContentsAt(i)->WasHidden(); - - EXPECT_EQ(3U, impl->loaded_tabs_in_background_count_for_testing()); - - // Close the tabs. - for (size_t i = 0; i < kTabCount; ++i) { - EXPECT_TRUE(browser()->tab_strip_model()->CloseWebContentsAt(0, 0)); - EXPECT_EQ(kTabCount - (i + 1), impl->loaded_tabs_count_for_testing()); - EXPECT_EQ(kTabCount - (i + 1), - impl->loaded_tabs_in_background_count_for_testing()); - } -} - -// Ensure that the observations gets persisted on disk. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - PRE_DatabaseGetsPersisted) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - // Get the reader for this origin. - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); - - // Navigate to the test url and background it. - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, WindowOpenDisposition::CURRENT_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - GetActiveWebContents()->WasHidden(); - - // Cause the "title update in background" feature to be used. - ChangeTitleOfActiveWebContents(); - - while (reader->UpdatesTitleInBackground() != - SiteFeatureUsage::kSiteFeatureInUse) { - base::RunLoop().RunUntilIdle(); - } -} - -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, - DatabaseGetsPersisted) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - // Get the reader for this origin. - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - - // We should remember the observation made previously. - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureInUse, - reader->UpdatesTitleInBackground()); -} - -// Ensure that clearing the history removes the observations from disk. -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, PRE_ClearHistory) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - // Get the reader for this origin. - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); - - // Navigate to the test url and background it. - ui_test_utils::NavigateToURLWithDisposition( - browser(), test_url, WindowOpenDisposition::CURRENT_TAB, - ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); - GetActiveWebContents()->WasHidden(); - - // Cause the "title update in background" feature to be used. - ChangeTitleOfActiveWebContents(); - - while (reader->UpdatesTitleInBackground() != - SiteFeatureUsage::kSiteFeatureInUse) { - base::RunLoop().RunUntilIdle(); - } - - HistoryServiceFactory::GetForProfile(browser()->profile(), - ServiceAccessType::IMPLICIT_ACCESS) - ->DeleteURL(test_url); - // The history gets cleared asynchronously. - base::RunLoop().RunUntilIdle(); - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); -} - -IN_PROC_BROWSER_TEST_F(LocalSiteCharacteristicsDatabaseTest, ClearHistory) { - GURL test_url(test_server().GetURL("foo.com", kTestPage)); - - // Get the reader for this origin. - auto reader = - GetReaderForOrigin(browser()->profile(), url::Origin::Create(test_url)); - - // The history has been cleared, we shouldn't know if this feature is used. - EXPECT_EQ(SiteFeatureUsage::kSiteFeatureUsageUnknown, - reader->UpdatesTitleInBackground()); -} - -} // namespace resource_coordinator
diff --git a/chrome/browser/resource_coordinator/tab_helper.cc b/chrome/browser/resource_coordinator/tab_helper.cc index cf3b091..2775ffdb 100644 --- a/chrome/browser/resource_coordinator/tab_helper.cc +++ b/chrome/browser/resource_coordinator/tab_helper.cc
@@ -27,10 +27,6 @@ #include "services/resource_coordinator/public/mojom/service_constants.mojom.h" #include "services/service_manager/public/cpp/connector.h" -#if !defined(OS_ANDROID) -#include "chrome/browser/resource_coordinator/local_site_characteristics_webcontents_observer.h" -#endif - DEFINE_WEB_CONTENTS_USER_DATA_KEY( resource_coordinator::ResourceCoordinatorTabHelper); @@ -66,14 +62,6 @@ TabMemoryMetricsReporter::Get()->StartReporting(TabLoadTracker::Get()); } - -#if !defined(OS_ANDROID) - if (base::FeatureList::IsEnabled(features::kSiteCharacteristicsDatabase)) { - local_site_characteristics_wc_observer_ = - std::make_unique<LocalSiteCharacteristicsWebContentsObserver>( - web_contents); - } -#endif } ResourceCoordinatorTabHelper::~ResourceCoordinatorTabHelper() = default;
diff --git a/chrome/browser/resource_coordinator/tab_helper.h b/chrome/browser/resource_coordinator/tab_helper.h index 6bcdb20..16bebcd6 100644 --- a/chrome/browser/resource_coordinator/tab_helper.h +++ b/chrome/browser/resource_coordinator/tab_helper.h
@@ -9,7 +9,6 @@ #include "base/macros.h" #include "base/time/time.h" -#include "build/build_config.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" #include "services/metrics/public/cpp/ukm_source_id.h" @@ -18,7 +17,6 @@ namespace resource_coordinator { class PageResourceCoordinator; -class LocalSiteCharacteristicsWebContentsObserver; class ResourceCoordinatorTabHelper : public content::WebContentsObserver, @@ -65,11 +63,6 @@ page_resource_coordinator_; ukm::SourceId ukm_source_id_ = ukm::kInvalidSourceId; -#if !defined(OS_ANDROID) - std::unique_ptr<LocalSiteCharacteristicsWebContentsObserver> - local_site_characteristics_wc_observer_; -#endif - // Favicon and title are set when a page is loaded, we only want to send // signals to GRC about title and favicon update from the previous title and // favicon, thus we want to ignore the very first update since it is always
diff --git a/chrome/browser/resource_coordinator/tab_manager.cc b/chrome/browser/resource_coordinator/tab_manager.cc index 5bb8e7c..a3fdc6ab 100644 --- a/chrome/browser/resource_coordinator/tab_manager.cc +++ b/chrome/browser/resource_coordinator/tab_manager.cc
@@ -942,7 +942,7 @@ DecisionDetails freeze_details; if (lifecycle_unit->CanFreeze(&freeze_details)) { const base::TimeDelta time_not_visible = - now - lifecycle_unit->GetLastVisibleTime(); + now - lifecycle_unit->GetLastActiveTime(); const base::TimeDelta time_until_freeze = proactive_freeze_discard_params_.freeze_timeout - time_not_visible; @@ -965,8 +965,8 @@ if (lifecycle_unit->CanDiscard(DiscardReason::kProactive, &discard_details)) { if (!oldest_discardable_lifecycle_unit || - lifecycle_unit->GetLastVisibleTime() < - oldest_discardable_lifecycle_unit->GetLastVisibleTime()) { + lifecycle_unit->GetLastActiveTime() < + oldest_discardable_lifecycle_unit->GetLastActiveTime()) { oldest_discardable_lifecycle_unit = lifecycle_unit; oldest_discardable_lifecycle_unit_decision_details = std::move(discard_details); @@ -986,7 +986,7 @@ if (proactive_freeze_discard_params_.should_proactively_discard && oldest_discardable_lifecycle_unit) { const base::TimeDelta time_not_visible = - now - oldest_discardable_lifecycle_unit->GetLastVisibleTime(); + now - oldest_discardable_lifecycle_unit->GetLastActiveTime(); const base::TimeDelta time_until_discard = GetTimeInBackgroundBeforeProactiveDiscard() - time_not_visible;
diff --git a/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc b/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc index c1d04c0..d09827b 100644 --- a/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc +++ b/chrome/browser/resource_coordinator/tab_manager_stats_collector.cc
@@ -333,10 +333,15 @@ } // Set all visibility related fields. + // + // |time_since_visible| is: + // - Zero if the LifecycleUnit is currently visible. + // - Time since creation if the LifecycleUnit was never visible. + // - Time since visible if the LifecycleUnit was visible in the past. auto visibility = lifecycle_unit->GetVisibility(); base::TimeDelta time_since_visible; // Zero. if (visibility != content::Visibility::VISIBLE) - time_since_visible = NowTicks() - lifecycle_unit->GetLastVisibleTime(); + time_since_visible = NowTicks() - lifecycle_unit->GetLastActiveTime(); builder.SetTimeSinceVisibilityStateChangeMs( time_since_visible.InMilliseconds()); builder.SetVisibilityState(static_cast<int64_t>(visibility));
diff --git a/chrome/browser/resource_coordinator/test_lifecycle_unit.cc b/chrome/browser/resource_coordinator/test_lifecycle_unit.cc index 9ddc7ee..4fb5c2f 100644 --- a/chrome/browser/resource_coordinator/test_lifecycle_unit.cc +++ b/chrome/browser/resource_coordinator/test_lifecycle_unit.cc
@@ -16,6 +16,9 @@ process_handle_(process_handle), can_discard_(can_discard) {} +TestLifecycleUnit::TestLifecycleUnit(content::Visibility visibility) + : LifecycleUnitBase(visibility) {} + TestLifecycleUnit::~TestLifecycleUnit() { OnLifecycleUnitDestroyed(); }
diff --git a/chrome/browser/resource_coordinator/test_lifecycle_unit.h b/chrome/browser/resource_coordinator/test_lifecycle_unit.h index 8cc7d4a7..2e9db905 100644 --- a/chrome/browser/resource_coordinator/test_lifecycle_unit.h +++ b/chrome/browser/resource_coordinator/test_lifecycle_unit.h
@@ -18,6 +18,7 @@ TestLifecycleUnit(base::TimeTicks last_focused_time = base::TimeTicks(), base::ProcessHandle process_handle = base::ProcessHandle(), bool can_discard = true); + explicit TestLifecycleUnit(content::Visibility visibility); ~TestLifecycleUnit() override; void SetLastFocusedTime(base::TimeTicks last_focused_time) { @@ -45,7 +46,7 @@ private: base::TimeTicks last_focused_time_; base::ProcessHandle process_handle_; - bool can_discard_; + bool can_discard_ = true; DISALLOW_COPY_AND_ASSIGN(TestLifecycleUnit); };
diff --git a/chrome/browser/resources/chromeos/emulator/audio_settings.html b/chrome/browser/resources/chromeos/emulator/audio_settings.html index 8a99ab3..8eea27f 100644 --- a/chrome/browser/resources/chromeos/emulator/audio_settings.html +++ b/chrome/browser/resources/chromeos/emulator/audio_settings.html
@@ -2,13 +2,13 @@ <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable-behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper-radio-group.html"> <link rel="import" href="icons.html"> <link rel="import" href="shared_styles.html"> @@ -24,12 +24,12 @@ <div slot="body"> <form> <div class="form-field-section"> - <paper-input value="{{currentEditableObject.deviceName}}" - label="Device Name"></paper-input> - <paper-input value="{{currentEditableObject.name}}" - label="Tray Name"></paper-input> - <paper-input value="{{currentEditableObject.id}}" - label="ID" disabled></paper-input> + <cr-input value="{{currentEditableObject.deviceName}}" + label="Device Name"></cr-input> + <cr-input value="{{currentEditableObject.name}}" + label="Tray Name"></cr-input> + <cr-input value="{{currentEditableObject.id}}" + label="ID" disabled></cr-input> </div> <div class="form-field-section"> <span class="toggle-button-label">Is Input</span>
diff --git a/chrome/browser/resources/chromeos/emulator/battery_settings.html b/chrome/browser/resources/chromeos/emulator/battery_settings.html index 4a6cfb8b..13faf80 100644 --- a/chrome/browser/resources/chromeos/emulator/battery_settings.html +++ b/chrome/browser/resources/chromeos/emulator/battery_settings.html
@@ -1,13 +1,14 @@ <link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html"> +<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/html/md_select_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-collapse/iron-collapse.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable-behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper-radio-group.html"> <link rel="import" href="icons.html"> <link rel="import" href="shared_styles.html"> @@ -18,6 +19,10 @@ See https://github.com/Polymer/polymer/pull/3668. --> <style include="device-emulator-shared-styles iron-flex iron-flex-alignment iron-positioning md-select"> + cr-input { + --cr-input-error-display: none; + margin-bottom: var(--cr-form-field-bottom-spacing); + } </style> <div class="layout vertical"> <div class="element-label"> @@ -36,17 +41,15 @@ </label> <iron-collapse opened="[[isBatteryPresent(batteryState)]]"> <div class="layout vertical"> - <paper-input label="Battery percentage" value="[[batteryPercent]]" + <cr-input label="Battery percentage" value="[[batteryPercent]]" on-change="onBatteryPercentChange" type="number"> - </paper-input> - - <paper-input label="Seconds until empty" value="[[timeUntilEmpty]]" + </cr-input> + <cr-input label="Seconds until empty" value="[[timeUntilEmpty]]" on-change="onTimeUntilEmptyChange" type="number"> - </paper-input> - - <paper-input label="Seconds until full" value="[[timeUntilFull]]" + </cr-input> + <cr-input label="Seconds until full" value="[[timeUntilFull]]" on-change="onTimeUntilFullChange" type="number"> - </paper-input> + </cr-input> </div> </iron-collapse>
diff --git a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html index 2c4235e..d80dc9d 100644 --- a/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html +++ b/chrome/browser/resources/chromeos/emulator/bluetooth_settings.html
@@ -2,13 +2,13 @@ <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_radio_button/cr_radio_button.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable-behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-radio-group/paper-radio-group.html"> <link rel="import" href="icons.html"> <link rel="import" href="shared_styles.html"> @@ -24,18 +24,18 @@ <div slot="body"> <form> <div class="form-field-section"> - <paper-input value="{{currentEditableObject.alias}}" - label="Alias"></paper-input> - <paper-input on-input="validatePath" + <cr-input value="{{currentEditableObject.alias}}" + label="Alias"></cr-input> + <cr-input on-input="validatePath" id="devicePathInput" value="{{currentEditableObject.path}}" - label="Path" on-input="validatePath"></paper-input> - <paper-input value="{{currentEditableObject.name}}" - label="Name"></paper-input> - <paper-input id="deviceAddressInput" on-input="handleAddressInput" + label="Path"></cr-input> + <cr-input value="{{currentEditableObject.name}}" + label="Name"></cr-input> + <cr-input id="deviceAddressInput" on-input="handleAddressInput" value="{{currentEditableObject.address}}" label="Address (xx:xx:xx:xx:xx:xx)" - maxlength="17"></paper-input> + maxlength="17"></cr-input> </div> <div class="form-field-section"> <span class="toggle-button-label">Trusted</span> @@ -78,8 +78,8 @@ hidden$= "[[!showAuthToken(currentEditableObject.pairingMethod)]]" > - <paper-input value="{{currentEditableObject.pairingAuthToken}}" - label="Code"></paper-input> + <cr-input value="{{currentEditableObject.pairingAuthToken}}" + label="Code"></cr-input> </div> <div class="form-field-section"> <label>
diff --git a/chrome/browser/resources/chromeos/emulator/shared_styles.html b/chrome/browser/resources/chromeos/emulator/shared_styles.html index abf3959..b30084fe 100644 --- a/chrome/browser/resources/chromeos/emulator/shared_styles.html +++ b/chrome/browser/resources/chromeos/emulator/shared_styles.html
@@ -3,9 +3,10 @@ <dom-module id="device-emulator-shared-styles"> <template> <style> - paper-input { + cr-input { display: inline-block; margin: 0 15px; + vertical-align: top; width: 200px; }
diff --git a/chrome/browser/resources/chromeos/zip_archiver/css/passphrase-dialog.css b/chrome/browser/resources/chromeos/zip_archiver/css/passphrase-dialog.css index 39346f4a..2f26528a0 100644 --- a/chrome/browser/resources/chromeos/zip_archiver/css/passphrase-dialog.css +++ b/chrome/browser/resources/chromeos/zip_archiver/css/passphrase-dialog.css
@@ -2,7 +2,7 @@ * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ -input, +cr-input, paper-button { -webkit-app-region: no-drag; } @@ -22,6 +22,7 @@ } #input { + --cr-input-error-display: none; font-family: inherit; font-size: 13px; font-weight: inherit; @@ -55,13 +56,6 @@ box-shadow: 0 0 0 2px rgba(51, 103, 214, 0.5); } -paper-input-container { - --paper-input-container-focus-color: rgb(51, 103, 214); - --paper-input-container-underline-focus: { - height: 1px; - } -} - #acceptButton { background: rgb(51, 103, 214); color: white;
diff --git a/chrome/browser/resources/chromeos/zip_archiver/html/passphrase-dialog.html b/chrome/browser/resources/chromeos/zip_archiver/html/passphrase-dialog.html index c1a5806e5..88fa5048 100644 --- a/chrome/browser/resources/chromeos/zip_archiver/html/passphrase-dialog.html +++ b/chrome/browser/resources/chromeos/zip_archiver/html/passphrase-dialog.html
@@ -1,19 +1,16 @@ <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input-container.html"> <dom-module id="passphrase-dialog"> <template> <link rel="stylesheet" href="../css/passphrase-dialog.css"> <span id="title" i18n-content="ZIP_ARCHIVER_PASSPHRASE_TITLE"></span> - <paper-input-container> - <input is="core-input" - type="password" - id="input" - slot="input" - autofocus - i18n-values="placeholder:ZIP_ARCHIVER_PASSPHRASE_INPUT_LABEL;aria-label:ZIP_ARCHIVER_PASSPHRASE_INPUT_LABEL"> - </paper-input-container> + <cr-input type="password" + id="input" + autofocus + i18n-values="placeholder:ZIP_ARCHIVER_PASSPHRASE_INPUT_LABEL;aria-label:ZIP_ARCHIVER_PASSPHRASE_INPUT_LABEL"> + </cr-input> <div id="buttons"> <paper-button noink on-click="accept"
diff --git a/chrome/browser/resources/md_bookmarks/BUILD.gn b/chrome/browser/resources/md_bookmarks/BUILD.gn index 400eacb..0c28dd7d 100644 --- a/chrome/browser/resources/md_bookmarks/BUILD.gn +++ b/chrome/browser/resources/md_bookmarks/BUILD.gn
@@ -139,7 +139,7 @@ ":api_listener", ":dialog_focus_manager", ":types", - "//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted", + "//ui/webui/resources/cr_elements/cr_input:cr_input", "//ui/webui/resources/js:assert", "//ui/webui/resources/js:cr", "//ui/webui/resources/js:load_time_data",
diff --git a/chrome/browser/resources/md_bookmarks/edit_dialog.html b/chrome/browser/resources/md_bookmarks/edit_dialog.html index 6966055..2d3486a 100644 --- a/chrome/browser/resources/md_bookmarks/edit_dialog.html +++ b/chrome/browser/resources/md_bookmarks/edit_dialog.html
@@ -2,35 +2,28 @@ <link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> -<link rel="import" href="chrome://resources/cr_elements/paper_input_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://bookmarks/dialog_focus_manager.html"> <dom-module id="bookmarks-edit-dialog"> <template> - <style include="cr-shared-style paper-input-style paper-button-style"> + <style include="cr-shared-style paper-button-style"> </style> <cr-dialog id="dialog"> <div slot="title"> [[getDialogTitle_(isFolder_, isEdit_)]] </div> <div slot="body"> - <paper-input always-float-label id="name" - label="$i18n{editDialogNameInput}" - value="{{titleValue_}}" - autofocus> - </paper-input> - <paper-input always-float-label id="url" - type="url" - label="$i18n{editDialogUrlInput}" - error-message="$i18n{editDialogInvalidUrl}" - value="{{urlValue_}}" - hidden$="[[isFolder_]]" - required> - </paper-input> + <cr-input id="name" label="$i18n{editDialogNameInput}" + value="{{titleValue_}}" autofocus> + </cr-input> + <cr-input id="url" type="url" label="$i18n{editDialogUrlInput}" + error-message="$i18n{editDialogInvalidUrl}" value="{{urlValue_}}" + hidden$="[[isFolder_]]" required> + </cr-input> </div> <div slot="button-container"> <paper-button class="cancel-button" on-click="onCancelButtonTap_">
diff --git a/chrome/browser/resources/md_bookmarks/edit_dialog.js b/chrome/browser/resources/md_bookmarks/edit_dialog.js index d46092be..01cccb9 100644 --- a/chrome/browser/resources/md_bookmarks/edit_dialog.js +++ b/chrome/browser/resources/md_bookmarks/edit_dialog.js
@@ -98,7 +98,7 @@ * @private */ validateUrl_: function() { - const urlInput = /** @type {PaperInputElement} */ (this.$.url); + const urlInput = /** @type {CrInputElement} */ (this.$.url); const originalValue = this.urlValue_; if (urlInput.validate())
diff --git a/chrome/browser/resources/md_downloads/item.js b/chrome/browser/resources/md_downloads/item.js index bd9605e..35f331b7 100644 --- a/chrome/browser/resources/md_downloads/item.js +++ b/chrome/browser/resources/md_downloads/item.js
@@ -7,9 +7,7 @@ is: 'downloads-item', properties: { - data: { - type: Object, - }, + data: Object, completelyOnDisk_: { computed: 'computeCompletelyOnDisk_(' + @@ -205,11 +203,17 @@ * @private */ computePauseOrResumeClass_: function() { + if (this.data === undefined) + return ''; + return !this.isInProgress_ && this.data.resume ? 'action-button' : ''; }, /** @private */ computePauseOrResumeText_: function() { + if (this.data === undefined) + return ''; + if (this.isInProgress_) return loadTimeData.getString('controlPause'); if (this.data.resume)
diff --git a/chrome/browser/resources/md_extensions/keyboard_shortcuts.html b/chrome/browser/resources/md_extensions/keyboard_shortcuts.html index c5b5b72..acf7798 100644 --- a/chrome/browser/resources/md_extensions/keyboard_shortcuts.html +++ b/chrome/browser/resources/md_extensions/keyboard_shortcuts.html
@@ -38,18 +38,22 @@ } .command-entry { - align-items: center; + align-items: start; display: flex; - height: var(--cr-section-min-height); + /* Makes top/bottom spacing of each row more even, while leaving + space for cr-input error message in between rows. */ + margin-bottom: -8px; + padding-top: 16px; } .command-name { + /* Align with cr-input by matching the field's top padding. */ flex: 1; + margin-top: 6px; } .command-entry .md-select { - /* TODO(scottchen): line-height needs adjustment to fix large fonts, - * same for paper-input. */ + /* TODO(scottchen): line-height needs adjustment to fix large fonts. */ -webkit-margin-start: var(--cr-section-padding); line-height: 22px; }
diff --git a/chrome/browser/resources/md_extensions/kiosk_dialog.html b/chrome/browser/resources/md_extensions/kiosk_dialog.html index 0a7a4c8..9b7b54d 100644 --- a/chrome/browser/resources/md_extensions/kiosk_dialog.html +++ b/chrome/browser/resources/md_extensions/kiosk_dialog.html
@@ -2,6 +2,7 @@ <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html"> <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> @@ -11,7 +12,6 @@ <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="item_behavior.html"> <link rel="import" href="kiosk_browser_proxy.html"> @@ -19,28 +19,18 @@ <template> <style include="cr-shared-style paper-button-style cr-icons"> #add-kiosk-app { - --paper-input-container-input: { - font-size: inherit; - }; - align-items: center; - display: flex; margin-bottom: 10px; margin-top: 20px; - width: 350px; } - #add-kiosk-app paper-input { - flex: 1; + #add-kiosk-app cr-input { + width: 350px; } #add-kiosk-app paper-button { -webkit-margin-start: 10px; } - paper-button { - color: var(--google-blue-500); - } - #kiosk-apps-list { border: 1px solid var(--paper-grey-300); padding: 10px; @@ -108,17 +98,16 @@ </template> </div> <div id="add-kiosk-app"> - <paper-input id="add-input" label="$i18n{kioskAddApp}" + <cr-input id="add-input" label="$i18n{kioskAddApp}" placeholder="$i18n{kioskAddAppHint}" value="{{addAppInput_}}" - always-float-label invalid="[[errorAppId_]]" + invalid="[[errorAppId_]]" on-keydown="clearInputInvalid_" error-message="[[getErrorMessage_( - '$i18nPolymer{kioskInvalidApp}', errorAppId_)]]" - on-keydown="clearInputInvalid_"> - </paper-input> - <paper-button id="add-button" on-click="onAddAppTap_" - disabled="[[!addAppInput_]]"> - $i18n{add} - </paper-button> + '$i18nPolymer{kioskInvalidApp}', errorAppId_)]]"> + <paper-button id="add-button" on-click="onAddAppTap_" + disabled="[[!addAppInput_]]" slot="suffix"> + $i18n{add} + </paper-button> + </cr-input> </div> <cr-checkbox disabled="[[!canEditBailout_]]" id="bailout" on-change="onBailoutChanged_" checked="[[bailoutDisabled_]]"
diff --git a/chrome/browser/resources/md_extensions/pack_dialog.html b/chrome/browser/resources/md_extensions/pack_dialog.html index ce51758..dcc3fd20 100644 --- a/chrome/browser/resources/md_extensions/pack_dialog.html +++ b/chrome/browser/resources/md_extensions/pack_dialog.html
@@ -1,53 +1,46 @@ <link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> -<link rel="import" href="chrome://resources/cr_elements/paper_input_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/shared_style_css.html"> +<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/html/cr.html"> <link rel="import" href="chrome://resources/html/util.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="pack_dialog_alert.html"> <dom-module id="extensions-pack-dialog"> <template> - <style include="cr-shared-style paper-button-style paper-input-style"> - .file-input { - align-items: center; - display: flex; + <style include="cr-shared-style paper-button-style"> + cr-input { + margin-top: var(--cr-form-field-bottom-spacing); + --cr-input-error-display: none; } - .file-input paper-input { - flex: 1; - } - - .file-input paper-button { + paper-button[slot='suffix'] { -webkit-margin-start: 10px; - color: var(--google-blue-500); } </style> <cr-dialog id="dialog" close-text="$i18n{close}"> <div slot="title">$i18n{packDialogTitle}</div> <div slot="body"> <div>$i18n{packDialogContent}</div> - <div class="file-input"> - <paper-input id="root-dir" label="$i18n{packDialogExtensionRoot}" - always-float-label value="{{packDirectory_}}"> - </paper-input> - <paper-button id="root-dir-browse" on-click="onRootBrowse_"> + <cr-input id="root-dir" label="$i18n{packDialogExtensionRoot}" + value="{{packDirectory_}}"> + <paper-button id="root-dir-browse" on-click="onRootBrowse_" + slot="suffix"> $i18n{packDialogBrowse} </paper-button> - </div> - <div class="file-input"> - <paper-input id="key-file" label="$i18n{packDialogKeyFile}" - always-float-label value="{{keyFile_}}"> - </paper-input> - <paper-button id="key-file-browse" on-click="onKeyBrowse_"> + </cr-input> + <cr-input id="key-file" label="$i18n{packDialogKeyFile}" + value="{{keyFile_}}"> + <paper-button id="key-file-browse" on-click="onKeyBrowse_" + slot="suffix"> $i18n{packDialogBrowse} </paper-button> - </div> + </cr-input> </div> <div slot="button-container"> <paper-button class="cancel-button" on-click="onCancelTap_">
diff --git a/chrome/browser/resources/md_extensions/shortcut_input.html b/chrome/browser/resources/md_extensions/shortcut_input.html index 513ffd4..5d9ce55 100644 --- a/chrome/browser/resources/md_extensions/shortcut_input.html +++ b/chrome/browser/resources/md_extensions/shortcut_input.html
@@ -1,58 +1,47 @@ <link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> -<link rel="import" href="chrome://resources/cr_elements/paper_input_style_css.html"> -<link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/html/assert.html"> <link rel="import" href="chrome://resources/html/cr.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="shortcut_util.html"> <dom-module id="extensions-shortcut-input"> <template> - <style include="cr-icons cr-hidden-style paper-input-style"> + <style include="cr-icons cr-hidden-style"> #main { position: relative; width: 200px; } - #input { - --paper-input-container: { - margin-bottom: 0px; - margin-top: 2px; /* Offset underline spacing. */ - padding: 0; - @apply --cr-primary-text; - }; - } - #clearContainer { - bottom: -4px; + --cr-icon-ripple-size: 28px; position: absolute; - right: -8px; + right: 2px; } :host-context([dir='rtl']) #clearContainer { - left: -8px; + left: -2px; right: inherit; } </style> <div id="main"> - <paper-input id="input" placeholder="$i18n{shortcutTypeAShortcut}" + <cr-input id="input" placeholder="$i18n{shortcutTypeAShortcut}" error-message="[[getErrorString_(error_, '$i18nPolymer{shortcutIncludeStartModifier}', '$i18nPolymer{shortcutTooManyModifiers}', '$i18nPolymer{shortcutNeedCharacter}')]]" - value="[[computeText_(capturing_, shortcut, pendingShortcut_)]]" - no-label-float> - </paper-input> - <paper-icon-button-light class="icon-clear no-overlap" id="clearContainer" - hidden$="[[computeClearHidden_(capturing_, shortcut)]]"> - <button id="clear" on-click="onClearTap_"></button> - </paper-icon-button-light> + value="[[computeText_(capturing_, shortcut, pendingShortcut_)]]"> + <paper-icon-button-light id="clearContainer" slot="suffix" + class="icon-cancel no-overlap" + hidden$="[[computeClearHidden_(capturing_, shortcut)]]"> + <button id="clear" on-click="onClearTap_"></button> + </paper-icon-button-light> + </cr-input> </div> </template> <script src="shortcut_input.js"></script>
diff --git a/chrome/browser/resources/md_extensions/shortcut_input.js b/chrome/browser/resources/md_extensions/shortcut_input.js index 48629000..cc822d13 100644 --- a/chrome/browser/resources/md_extensions/shortcut_input.js +++ b/chrome/browser/resources/md_extensions/shortcut_input.js
@@ -57,7 +57,7 @@ /** @override */ ready: function() { - const node = this.$['input']; + const node = this.$.input; node.addEventListener('mouseup', this.startCapture_.bind(this)); node.addEventListener('blur', this.endCapture_.bind(this)); node.addEventListener('focus', this.startCapture_.bind(this)); @@ -90,6 +90,9 @@ * @private */ onKeyDown_: function(e) { + if (e.target == this.$.clear) + return; + if (e.keyCode == extensions.Key.Escape) { if (!this.capturing_) { // If we're not currently capturing, allow escape to propagate. @@ -117,6 +120,13 @@ * @private */ onKeyUp_: function(e) { + // Ignores pressing 'Space' or 'Enter' on the clear button. In 'Enter's + // case, the clear button disappears before key-up, so 'Enter's key-up + // target becomes the input field, not the clear button, and needs to + // be caught explicitly. + if (e.target == this.$.clear || e.key == 'Enter') + return; + if (e.keyCode == extensions.Key.Escape || e.keyCode == extensions.Key.Tab) return; @@ -206,10 +216,11 @@ /** @private */ onClearTap_: function() { - if (this.shortcut) { - this.pendingShortcut_ = ''; - this.commitPending_(); - } + assert(this.shortcut); + + this.pendingShortcut_ = ''; + this.commitPending_(); + this.endCapture_(); }, });
diff --git a/chrome/browser/resources/md_user_manager/BUILD.gn b/chrome/browser/resources/md_user_manager/BUILD.gn index 41e5786..38fea87 100644 --- a/chrome/browser/resources/md_user_manager/BUILD.gn +++ b/chrome/browser/resources/md_user_manager/BUILD.gn
@@ -26,6 +26,7 @@ js_library("create_profile") { deps = [ ":profile_browser_proxy", + "//ui/webui/resources/cr_elements/cr_input:cr_input", "//ui/webui/resources/cr_elements/cr_profile_avatar_selector:cr_profile_avatar_selector", "//ui/webui/resources/js:i18n_behavior", "//ui/webui/resources/js:util",
diff --git a/chrome/browser/resources/md_user_manager/create_profile.html b/chrome/browser/resources/md_user_manager/create_profile.html index 076a826..6eea5e1 100644 --- a/chrome/browser/resources/md_user_manager/create_profile.html +++ b/chrome/browser/resources/md_user_manager/create_profile.html
@@ -3,6 +3,7 @@ <link rel="import" href="/profile_browser_proxy.html"> <link rel="import" href="/shared_styles.html"> <link rel="import" href="chrome://resources/cr_elements/cr_checkbox/cr_checkbox.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/html/action_link.html"> @@ -13,7 +14,6 @@ <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-spinner/paper-spinner-lite.html"> <dom-module id="create-profile"> @@ -74,16 +74,9 @@ } #nameInput { - --paper-input-container-focus-color: var(--google-blue-500); - --paper-input-container-input: { - font-size: inherit; - }; - --paper-input-container-label: { - font-size: inherit; - }; - } - - #nameInput { + --cr-input-input: { + border-bottom: 1px solid var(--paper-grey-800); + } margin-bottom: 24px; margin-top: 32px; width: 300px; @@ -118,9 +111,9 @@ </div> <div class="container"> <div id="title-bar">$i18n{createProfileTitle}</div> - <paper-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*" - no-label-float auto-validate> - </paper-input> + <cr-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*" + auto-validate> + </cr-input> <cr-profile-avatar-selector avatars="[[availableIcons_]]" selected-avatar="{{selectedAvatar_}}"> </cr-profile-avatar-selector>
diff --git a/chrome/browser/resources/md_user_manager/create_profile.js b/chrome/browser/resources/md_user_manager/create_profile.js index daabfba..8e4cbbf5 100644 --- a/chrome/browser/resources/md_user_manager/create_profile.js +++ b/chrome/browser/resources/md_user_manager/create_profile.js
@@ -112,7 +112,7 @@ /** @override */ attached: function() { - // paper-input's focusable element isn't defined until after it's attached. + // cr-input's focusable element isn't defined until after it's attached. Polymer.RenderStatus.afterNextRender(this, () => this.$.nameInput.focus()); }, @@ -243,9 +243,7 @@ * @private */ isSaveDisabled_: function(createInProgress, profileName) { - // TODO(mahmadi): Figure out a way to add 'paper-input-extracted' as a - // dependency and cast to PaperInputElement instead. - /** @type {{validate: function():boolean}} */ + /** @type {CrInputElement} */ const nameInput = this.$.nameInput; return createInProgress || !profileName || !nameInput.validate(); },
diff --git a/chrome/browser/resources/settings/a11y_page/a11y_page.html b/chrome/browser/resources/settings/a11y_page/a11y_page.html index 3a3255e2..aa40bde8 100644 --- a/chrome/browser/resources/settings/a11y_page/a11y_page.html +++ b/chrome/browser/resources/settings/a11y_page/a11y_page.html
@@ -47,15 +47,13 @@ </settings-manage-a11y-page> </settings-subpage> </template> - <template is="dom-if" if="[[showExperimentalFeatures_]]"> - <template is="dom-if" route-path="/manageAccessibility/tts"> - <settings-subpage - associated-control="[[$$('#subpage-trigger')]]" - page-title="$i18n{manageTtsSettings}"> - <settings-tts-subpage prefs="{{prefs}}"> - </settings-tts-subpage> - </settings-subpage> - </template> + <template is="dom-if" route-path="/manageAccessibility/tts"> + <settings-subpage + associated-control="[[$$('#subpage-trigger')]]" + page-title="$i18n{manageTtsSettings}"> + <settings-tts-subpage prefs="{{prefs}}"> + </settings-tts-subpage> + </settings-subpage> </template> </settings-animated-pages> </if>
diff --git a/chrome/browser/resources/settings/a11y_page/manage_a11y_page.html b/chrome/browser/resources/settings/a11y_page/manage_a11y_page.html index 204740a..2d8ac25 100644 --- a/chrome/browser/resources/settings/a11y_page/manage_a11y_page.html +++ b/chrome/browser/resources/settings/a11y_page/manage_a11y_page.html
@@ -73,21 +73,19 @@ </paper-icon-button-light> </div> </iron-collapse> - <template is="dom-if" if="[[showExperimentalFeatures_]]"> - <div class="settings-box two-line" on-click="onManageTtsSettingsTap_" - actionable> - <div class="start"> - $i18n{manageTtsSettings} - <div class="secondary" id="appearanceSettingsSecondary"> - $i18n{ttsSettingsLinkDescription} - </div> + <div class="settings-box two-line" on-click="onManageTtsSettingsTap_" + actionable> + <div class="start"> + $i18n{manageTtsSettings} + <div class="secondary" id="appearanceSettingsSecondary"> + $i18n{ttsSettingsLinkDescription} </div> - <paper-icon-button-light class="subpage-arrow"> - <button aria-label="$i18n{manageTtsSettings}" - aria-describedby="appearanceSettingsSecondary"></button> - </paper-icon-button-light> </div> - </template> + <paper-icon-button-light class="subpage-arrow"> + <button aria-label="$i18n{manageTtsSettings}" + aria-describedby="appearanceSettingsSecondary"></button> + </paper-icon-button-light> + </div> <h2>$i18n{displayHeading}</h2> <settings-toggle-button class="first"
diff --git a/chrome/browser/resources/settings/a11y_page/tts_subpage.html b/chrome/browser/resources/settings/a11y_page/tts_subpage.html index 30d408e..d51e8fae 100644 --- a/chrome/browser/resources/settings/a11y_page/tts_subpage.html +++ b/chrome/browser/resources/settings/a11y_page/tts_subpage.html
@@ -154,9 +154,6 @@ </a> </div> </template> - <div class="settings-box block continuation"> - <a href="">$i18n{textToSpeechInstallEngines}</a> - </div> </template> <script src="tts_subpage.js"></script> </dom-module>
diff --git a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html index b334bbb..45beb855 100644 --- a/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html +++ b/chrome/browser/resources/settings/passwords_and_forms_page/address_edit_dialog.html
@@ -54,10 +54,6 @@ margin-bottom: var(--cr-form-field-bottom-spacing); } - #saveButton { - -webkit-margin-start: 8px; - } - #dialog { --cr-dialog-body-container: { max-height: 450px;
diff --git a/chrome/browser/resources/settings/people_page/setup_pin_dialog.html b/chrome/browser/resources/settings/people_page/setup_pin_dialog.html index 62595331c..14f79a0 100644 --- a/chrome/browser/resources/settings/people_page/setup_pin_dialog.html +++ b/chrome/browser/resources/settings/people_page/setup_pin_dialog.html
@@ -59,7 +59,7 @@ <div id="pinKeyboardDiv" class="settings-box continuation"> <pin-keyboard id="pinKeyboard" on-pin-change="onPinChange_" on-submit="onPinSubmit_" value="{{pinKeyboardValue_}}" - has-error$="[[hasError_(problemMessage_, problemClass_)]]"> + has-error="[[hasError_(problemMessage_, problemClass_)]]"> <!-- Warning/error; only shown if title is hidden. --> <div id="problemDiv" class$="[[problemClass_]]" invisible$="[[!problemMessage_]]" problem>
diff --git a/chrome/browser/resources/settings/settings_page/settings_subpage_search.html b/chrome/browser/resources/settings/settings_page/settings_subpage_search.html index 25d7c948..3b7e38a 100644 --- a/chrome/browser/resources/settings/settings_page/settings_subpage_search.html +++ b/chrome/browser/resources/settings/settings_page/settings_subpage_search.html
@@ -22,6 +22,9 @@ } cr-input { + --cr-input-container: { + border-radius: 0; + } --cr-input-error-display: none; --cr-input-input: { background-color: white;
diff --git a/chrome/browser/site_per_process_interactive_browsertest.cc b/chrome/browser/site_per_process_interactive_browsertest.cc index e9e7421..bac2074 100644 --- a/chrome/browser/site_per_process_interactive_browsertest.cc +++ b/chrome/browser/site_per_process_interactive_browsertest.cc
@@ -849,8 +849,16 @@ EXPECT_EQ("none", GetFullscreenElementId(grandchild)); } +// This is flaky on Linux (crbug.com/854294) +#if defined(OS_LINUX) +#define MAYBE_FullscreenElementInABAAndExitViaEscapeKey \ + DISABLED_FullscreenElementInABAAndExitViaEscapeKey +#else +#define MAYBE_FullscreenElementInABAAndExitViaEscapeKey \ + FullscreenElementInABAAndExitViaEscapeKey +#endif IN_PROC_BROWSER_TEST_F(SitePerProcessInteractiveBrowserTest, - FullscreenElementInABAAndExitViaEscapeKey) { + MAYBE_FullscreenElementInABAAndExitViaEscapeKey) { if (IsMacViewsBrowser()) return; FullscreenElementInABA(FullscreenExitMethod::ESC_PRESS);
diff --git a/chrome/browser/supervised_user/supervised_user_service.cc b/chrome/browser/supervised_user/supervised_user_service.cc index f8487c5..6f7791f3 100644 --- a/chrome/browser/supervised_user/supervised_user_service.cc +++ b/chrome/browser/supervised_user/supervised_user_service.cc
@@ -663,8 +663,8 @@ ->GetURLLoaderFactoryForBrowserProcess(); blacklist_downloader_.reset(new FileDownloader( url, path, false, std::move(factory), - base::Bind(&SupervisedUserService::OnBlacklistDownloadDone, - base::Unretained(this), path), + base::BindOnce(&SupervisedUserService::OnBlacklistDownloadDone, + base::Unretained(this), path), traffic_annotation)); }
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc index d5ebb03..fe79af9 100644 --- a/chrome/browser/sync_file_system/drive_backend/metadata_database.cc +++ b/chrome/browser/sync_file_system/drive_backend/metadata_database.cc
@@ -36,6 +36,7 @@ #include "google_apis/drive/drive_api_parser.h" #include "storage/common/fileapi/file_system_util.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/status.h" #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" @@ -583,9 +584,11 @@ DCHECK(metadata_database); base::FilePath database_path = metadata_database->database_path_; DCHECK(!database_path.empty()); + leveldb::Options options = leveldb_env::Options(); + if (metadata_database->env_override_) + options.env = metadata_database->env_override_; metadata_database.reset(); - - base::DeleteFile(database_path, true /* recursive */); + leveldb_chrome::DeleteDB(database_path, options); } int64_t MetadataDatabase::GetLargestFetchedChangeID() const {
diff --git a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc index 13555224..1ed6225 100644 --- a/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc +++ b/chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc
@@ -10,6 +10,7 @@ #include <utility> #include "base/bind.h" +#include "base/files/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/macros.h" #include "base/message_loop/message_loop.h" @@ -217,10 +218,16 @@ return 0; } + bool enable_on_disk_index() const { return GetParam(); } + + leveldb::Env* in_memory_env() const { return in_memory_env_.get(); } + + const base::FilePath& DatabasePath() const { return database_dir_.GetPath(); } + SyncStatusCode InitializeMetadataDatabase() { SyncStatusCode status = SYNC_STATUS_UNKNOWN; metadata_database_ = MetadataDatabase::CreateInternal( - database_dir_.GetPath(), in_memory_env_.get(), GetParam(), &status); + DatabasePath(), in_memory_env_.get(), enable_on_disk_index(), &status); return status; } @@ -275,8 +282,8 @@ options.create_if_missing = true; options.max_open_files = 0; // Use minimum. options.env = in_memory_env_.get(); - leveldb::Status status = leveldb_env::OpenDB( - options, database_dir_.GetPath().AsUTF8Unsafe(), &db); + leveldb::Status status = + leveldb_env::OpenDB(options, DatabasePath().AsUTF8Unsafe(), &db); EXPECT_TRUE(status.ok()); std::unique_ptr<LevelDBWrapper> wrapper(new LevelDBWrapper(std::move(db))); @@ -538,7 +545,7 @@ MetadataDatabaseIndexInterface* index1 = metadata_database_->index_.get(); MetadataDatabaseIndexInterface* index2 = metadata_database_2->index_.get(); - if (GetParam()) { + if (enable_on_disk_index()) { VerifyReloadConsistencyForOnDisk( static_cast<MetadataDatabaseIndexOnDisk*>(index1), static_cast<MetadataDatabaseIndexOnDisk*>(index2)); @@ -1171,5 +1178,29 @@ EXPECT_TRUE(file->HasKey("details")); } +TEST_P(MetadataDatabaseTest, ClearDatabase) { + const bool db_on_disk = enable_on_disk_index(); + leveldb::Env* env = db_on_disk ? leveldb::Env::Default() : in_memory_env(); + std::vector<std::string> children; + EXPECT_TRUE(env->GetChildren(DatabasePath().AsUTF8Unsafe(), &children).ok()); + EXPECT_EQ(children.size(), 0ul); + + SyncStatusCode status = SYNC_STATUS_UNKNOWN; + std::unique_ptr<MetadataDatabase> metadata_database = + MetadataDatabase::CreateInternal(DatabasePath(), env, + enable_on_disk_index(), &status); + ASSERT_EQ(SYNC_STATUS_OK, status); + EXPECT_TRUE(env->GetChildren(DatabasePath().AsUTF8Unsafe(), &children).ok()); + EXPECT_GT(children.size(), 0ul); + + MetadataDatabase::ClearDatabase(std::move(metadata_database)); + + if (db_on_disk) { + EXPECT_FALSE(base::PathExists(DatabasePath())); + } else { + EXPECT_TRUE(base::PathExists(DatabasePath())); + } +} + } // namespace drive_backend } // namespace sync_file_system
diff --git a/chrome/browser/themes/theme_properties.cc b/chrome/browser/themes/theme_properties.cc index b4c15995..ab59a3f 100644 --- a/chrome/browser/themes/theme_properties.cc +++ b/chrome/browser/themes/theme_properties.cc
@@ -81,7 +81,9 @@ // Default tints. constexpr color_utils::HSL kDefaultTintButtons = {-1, -1, -1}; -constexpr color_utils::HSL kDefaultTintButtonsIncognito = {-1, -1, 0.85}; +constexpr color_utils::HSL kDefaultTintButtonsIncognito = {-1, -1, 0.96}; +constexpr color_utils::HSL kPreRefreshDefaultTintButtonsIncognito = {-1, -1, + 0.85}; constexpr color_utils::HSL kDefaultTintFrame = {-1, -1, -1}; constexpr color_utils::HSL kDefaultTintFrameInactive = {-1, -1, 0.75}; constexpr color_utils::HSL kDefaultTintFrameIncognito = {-1, 0.2, 0.35}; @@ -261,6 +263,8 @@ return incognito ? kDefaultTintFrameIncognitoInactive : kDefaultTintFrameInactive; case TINT_BUTTONS: + if (incognito && !ui::MaterialDesignController::IsRefreshUi()) + return kPreRefreshDefaultTintButtonsIncognito; return incognito ? kDefaultTintButtonsIncognito : kDefaultTintButtons; case TINT_BACKGROUND_TAB: return kDefaultTintBackgroundTab;
diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc index df26535e..8eae273 100644 --- a/chrome/browser/themes/theme_service.cc +++ b/chrome/browser/themes/theme_service.cc
@@ -428,13 +428,6 @@ ui::MaterialDesignController::IsNewerMaterialUi(); switch (id) { case ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON: - // Touch-optimized UI uses different colors than gfx::kChromeIconGrey. - // They are two specific colors in normal and incognito modes which we - // can't get one from the other by HSLShift(). - // TODO: This will break custom themes. https://crbug.com/820495. - if (is_newer_material) - break; - return color_utils::HSLShift( gfx::kChromeIconGrey, GetTint(ThemeProperties::TINT_BUTTONS, incognito)); @@ -467,9 +460,10 @@ 0x4D); } case ThemeProperties::COLOR_BACKGROUND_TAB: { - // Touch optimized color design uses different tab background colors. - // TODO(malaykeshav) - This will break custom themes on touch optimized - // UI. Use tint shift instead. https://crbug.com/820495. + // Touchable hardcodes the background tab color. This can break custom + // themes, but touchable is replaced by touchable refresh, which doesn't + // use the default background tab color at all, so this issue won't be + // fixed. if (is_newer_material) break;
diff --git a/chrome/browser/ui/android/context_menu_helper.cc b/chrome/browser/ui/android/context_menu_helper.cc index 898f1151..07855448 100644 --- a/chrome/browser/ui/android/context_menu_helper.cc +++ b/chrome/browser/ui/android/context_menu_helper.cc
@@ -15,6 +15,7 @@ #include "chrome/browser/android/download/download_controller_base.h" #include "chrome/browser/image_decoder.h" #include "chrome/browser/ui/tab_contents/core_tab_helper.h" +#include "chrome/browser/vr/vr_tab_helper.h" #include "chrome/common/chrome_render_frame.mojom.h" #include "components/data_reduction_proxy/core/common/data_reduction_proxy_headers.h" #include "content/public/browser/render_frame_host.h" @@ -107,6 +108,12 @@ void ContextMenuHelper::ShowContextMenu( content::RenderFrameHost* render_frame_host, const content::ContextMenuParams& params) { + // TODO(crbug.com/851495): support context menu in VR. + if (vr::VrTabHelper::IsUiSuppressedInVr( + web_contents_, vr::UiSuppressedElement::kContextMenu)) { + web_contents_->NotifyContextMenuClosed(params.custom_context); + return; + } JNIEnv* env = base::android::AttachCurrentThread(); context_menu_params_ = params; render_frame_id_ = render_frame_host->GetRoutingID();
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc index bdb50b7..ec5e42f 100644 --- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc +++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl.cc
@@ -134,7 +134,7 @@ } bool SaveCardBubbleControllerImpl::IsIconVisible() const { - return !upload_save_card_callback_.is_null() && + return !upload_save_card_callback_.is_null() || !local_save_card_callback_.is_null(); }
diff --git a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc index 5699a88..1fdfd339 100644 --- a/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc +++ b/chrome/browser/ui/autofill/save_card_bubble_controller_impl_browsertest.cc
@@ -35,7 +35,14 @@ std::unique_ptr<base::Value> value(base::JSONReader::Read( "{" " \"line\" : [ {" - " \"template\": \"This is the entire message.\"" + " \"template\": \"The legal documents are: {0} and {1}.\"," + " \"template_parameter\" : [ {" + " \"display_text\" : \"Terms of Service\"," + " \"url\": \"http://www.example.com/tos\"" + " }, {" + " \"display_text\" : \"Privacy Policy\"," + " \"url\": \"http://www.example.com/pp\"" + " } ]" " } ]" "}")); base::DictionaryValue* dictionary;
diff --git a/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc b/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc index bd39fd9..41c8257 100644 --- a/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc +++ b/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc
@@ -111,33 +111,37 @@ manager->ShowBubble(std::move(bubble)); } +// TODO(crbug.com/854355): Fix the ownership of ExtensionInstalledBubble and +// re-enable these tests. IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, - InvokeUi_BrowserAction) { + DISABLED_InvokeUi_BrowserAction) { ShowAndVerifyUi(); } IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, - InvokeUi_PageAction) { + DISABLED_InvokeUi_PageAction) { ShowAndVerifyUi(); } // Test anchoring to the app menu. IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, - InvokeUi_InstalledByDefault) { + DISABLED_InvokeUi_InstalledByDefault) { ShowAndVerifyUi(); } // Test anchoring to the omnibox. -IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, InvokeUi_Omnibox) { +IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, + DISABLED_InvokeUi_Omnibox) { ShowAndVerifyUi(); } IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, - InvokeUi_SignInPromo) { + DISABLED_InvokeUi_SignInPromo) { ShowAndVerifyUi(); } -IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, InvokeUi_NoAction) { +IN_PROC_BROWSER_TEST_F(ExtensionInstalledBubbleBrowserTest, + DISABLED_InvokeUi_NoAction) { // Sign in to supppress the signin promo. identity::MakePrimaryAccountAvailable( SigninManagerFactory::GetForProfile(profile()),
diff --git a/chrome/browser/ui/views/autofill/save_card_bubble_views.cc b/chrome/browser/ui/views/autofill/save_card_bubble_views.cc index a12b3901..bfd5ae9 100644 --- a/chrome/browser/ui/views/autofill/save_card_bubble_views.cc +++ b/chrome/browser/ui/views/autofill/save_card_bubble_views.cc
@@ -13,6 +13,7 @@ #include "chrome/browser/ui/browser_dialogs.h" #include "chrome/browser/ui/views/autofill/dialog_view_ids.h" #include "chrome/browser/ui/views/harmony/chrome_layout_provider.h" +#include "chrome/browser/ui/views/harmony/chrome_typography.h" #include "components/autofill/core/browser/credit_card.h" #include "components/autofill/core/browser/legal_message_line.h" #include "components/autofill/core/browser/ui/save_card_bubble_controller.h" @@ -32,6 +33,7 @@ #include "ui/views/controls/styled_label.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/layout/box_layout.h" +#include "ui/views/style/typography.h" #include "ui/views/window/dialog_client_view.h" namespace autofill { @@ -47,6 +49,8 @@ views::StyledLabelListener* listener) { std::unique_ptr<views::StyledLabel> label( new views::StyledLabel(line.text(), listener)); + label->SetTextContext(CONTEXT_BODY_TEXT_LARGE); + label->SetDefaultTextStyle(ChromeTextStyle::STYLE_SECONDARY); for (const LegalMessageLine::Link& link : line.links()) { label->AddStyleRange(link.range, views::StyledLabel::RangeStyleInfo::CreateForLink()); @@ -253,7 +257,8 @@ // info. base::string16 explanation = controller_->GetExplanatoryMessage(); if (!explanation.empty()) { - auto* explanation_label = new views::Label(explanation); + auto* explanation_label = new views::Label( + explanation, CONTEXT_BODY_TEXT_LARGE, ChromeTextStyle::STYLE_SECONDARY); explanation_label->SetMultiLine(true); explanation_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); view->AddChildView(explanation_label); @@ -278,7 +283,8 @@ description_view->AddChildView(card_type_icon); description_view->AddChildView( - new views::Label(card.NetworkAndLastFourDigits())); + new views::Label(card.NetworkAndLastFourDigits(), CONTEXT_BODY_TEXT_LARGE, + views::style::STYLE_PRIMARY)); // The spacer will stretch to use the available horizontal space in the // dialog, which will end-align the expiration date label. @@ -286,8 +292,9 @@ description_view->AddChildView(spacer); box_layout->SetFlexForView(spacer, /*flex=*/1); - description_view->AddChildView( - new views::Label(card.AbbreviatedExpirationDateForDisplay())); + description_view->AddChildView(new views::Label( + card.AbbreviatedExpirationDateForDisplay(), CONTEXT_BODY_TEXT_LARGE, + ChromeTextStyle::STYLE_SECONDARY)); // If necessary, add the cardholder name textfield to the upload save dialog. if (controller_->ShouldRequestNameFromUser()) {
diff --git a/chrome/browser/ui/views/omnibox/omnibox_tab_switch_button.cc b/chrome/browser/ui/views/omnibox/omnibox_tab_switch_button.cc index 7eec1cf9..40d0bbd 100644 --- a/chrome/browser/ui/views/omnibox/omnibox_tab_switch_button.cc +++ b/chrome/browser/ui/views/omnibox/omnibox_tab_switch_button.cc
@@ -110,7 +110,7 @@ } } if (state() == STATE_HOVERED) { - if (!model_->IsButtonSelected() && old_state == STATE_NORMAL) { + if (old_state == STATE_NORMAL) { SetBgColorOverride(GetBackgroundColor()); } } @@ -121,10 +121,7 @@ void OmniboxTabSwitchButton::UpdateBackground() { focus_ring()->SchedulePaint(); - if (model_->IsButtonSelected()) - SetPressed(); - else - SetBgColorOverride(GetBackgroundColor()); + SetBgColorOverride(GetBackgroundColor()); } void OmniboxTabSwitchButton::ProvideWidthHint(size_t parent_width) {
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc index 67d69ee..5963d3c5 100644 --- a/chrome/browser/ui/views/overlay/overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -508,6 +508,15 @@ if (event->type() != ui::ET_GESTURE_TAP) return; + // If the controls were not shown, make them visible. All controls related + // layers are expected to have the same visibility. + // TODO(apacible): This placeholder logic should be updated with touchscreen + // specific investigation. https://crbug/854373 + if (!GetControlsBackgroundLayer()->visible()) { + UpdateControlsVisibility(true); + return; + } + if (GetCloseControlsBounds().Contains(event->location())) { controller_->Close(true /* should_pause_video */); event->SetHandled();
diff --git a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc index b54f502..62a8059 100644 --- a/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc +++ b/chrome/browser/ui/webui/settings/md_settings_localized_strings_provider.cc
@@ -275,7 +275,6 @@ {"textToSpeechPreviewVoice", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_VOICE}, {"textToSpeechPreviewPlay", IDS_SETTINGS_TEXT_TO_SPEECH_PREVIEW_PLAY}, {"textToSpeechEngines", IDS_SETTINGS_TEXT_TO_SPEECH_ENGINES}, - {"textToSpeechInstallEngines", IDS_SETTINGS_TEXT_TO_SPEECH_INSTALL_ENGINES}, #endif }; AddLocalizedStringsBulk(html_source, localized_strings,
diff --git a/chrome/browser/ui/webui/settings/search_engines_handler.cc b/chrome/browser/ui/webui/settings/search_engines_handler.cc index 878159e..ad5bb1f 100644 --- a/chrome/browser/ui/webui/settings/search_engines_handler.cc +++ b/chrome/browser/ui/webui/settings/search_engines_handler.cc
@@ -34,8 +34,8 @@ #include "extensions/common/extension.h" namespace { -// The following strings need to match with the IDs of the paper-input elements -// at settings/search_engines_page/add_search_engine_dialog.html. +// The following strings need to match with the IDs of the text input elements +// at settings/search_engines_page/search_engine_dialog.html. const char kSearchEngineField[] = "searchEngine"; const char kKeywordField[] = "keyword"; const char kQueryUrlField[] = "queryUrl";
diff --git a/chrome/browser/unified_consent/OWNERS b/chrome/browser/unified_consent/OWNERS new file mode 100644 index 0000000..dae0af5 --- /dev/null +++ b/chrome/browser/unified_consent/OWNERS
@@ -0,0 +1 @@ +file://components/unified_consent/OWNERS
diff --git a/chrome/browser/vr/content_input_delegate.cc b/chrome/browser/vr/content_input_delegate.cc index b7d000ce..c5dbdfd 100644 --- a/chrome/browser/vr/content_input_delegate.cc +++ b/chrome/browser/vr/content_input_delegate.cc
@@ -146,44 +146,4 @@ base::ResetAndReturn(&update_state_callback).Run(pending_text_input_info_); } -std::unique_ptr<blink::WebMouseEvent> ContentInputDelegate::MakeMouseEvent( - blink::WebInputEvent::Type type, - const gfx::PointF& normalized_web_content_location) { - if (!controller_) - return nullptr; - - gfx::Point location(size().width() * normalized_web_content_location.x(), - size().height() * normalized_web_content_location.y()); - blink::WebInputEvent::Modifiers modifiers = - controller_->IsButtonDown(PlatformController::kButtonSelect) - ? blink::WebInputEvent::kLeftButtonDown - : blink::WebInputEvent::kNoModifiers; - - base::TimeTicks timestamp; - switch (type) { - case blink::WebInputEvent::kMouseUp: - case blink::WebInputEvent::kMouseDown: - timestamp = controller_->GetLastButtonTimestamp(); - break; - case blink::WebInputEvent::kMouseMove: - case blink::WebInputEvent::kMouseEnter: - case blink::WebInputEvent::kMouseLeave: - timestamp = controller_->GetLastOrientationTimestamp(); - break; - default: - NOTREACHED(); - } - - auto mouse_event = - std::make_unique<blink::WebMouseEvent>(type, modifiers, timestamp); - mouse_event->pointer_type = blink::WebPointerProperties::PointerType::kMouse; - mouse_event->button = blink::WebPointerProperties::Button::kLeft; - mouse_event->SetPositionInWidget(location.x(), location.y()); - // TODO(mthiesse): Should we support double-clicks for input? What should the - // timeout be? - mouse_event->click_count = 1; - - return mouse_event; -} - } // namespace vr
diff --git a/chrome/browser/vr/content_input_delegate.h b/chrome/browser/vr/content_input_delegate.h index 3798266..eca2763 100644 --- a/chrome/browser/vr/content_input_delegate.h +++ b/chrome/browser/vr/content_input_delegate.h
@@ -20,7 +20,6 @@ namespace vr { -class PlatformController; class PlatformInputHandler; // This class is responsible for processing all events and gestures for @@ -48,10 +47,6 @@ int compositon_end, base::OnceCallback<void(const TextInputInfo&)> callback); - void OnPlatformControllerInitialized(PlatformController* controller) { - controller_ = controller; - } - void OnWebInputTextChangedForTest(const base::string16& text) { OnWebInputTextChanged(text); } @@ -61,9 +56,6 @@ protected: void SendGestureToTarget( std::unique_ptr<blink::WebInputEvent> event) override; - std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent( - blink::WebInputEvent::Type type, - const gfx::PointF& normalized_web_content_location) override; private: enum TextRequestState { @@ -77,8 +69,6 @@ int content_id_ = 0; int locked_content_id_ = 0; - PlatformController* controller_ = nullptr; - EditedText last_keyboard_edit_; TextRequestState pending_text_request_state_ = kNoPendingRequest; TextInputInfo pending_text_input_info_;
diff --git a/chrome/browser/vr/elements/platform_ui_element.cc b/chrome/browser/vr/elements/platform_ui_element.cc index 58ba676..f45041f 100644 --- a/chrome/browser/vr/elements/platform_ui_element.cc +++ b/chrome/browser/vr/elements/platform_ui_element.cc
@@ -51,6 +51,11 @@ delegate_->OnButtonUp(position); } +void PlatformUiElement::OnTouchMove(const gfx::PointF& position) { + if (delegate_) + delegate_->OnTouchMove(position); +} + void PlatformUiElement::OnFlingCancel( std::unique_ptr<blink::WebGestureEvent> gesture, const gfx::PointF& position) {
diff --git a/chrome/browser/vr/elements/platform_ui_element.h b/chrome/browser/vr/elements/platform_ui_element.h index efbd5d5..60454d9 100644 --- a/chrome/browser/vr/elements/platform_ui_element.h +++ b/chrome/browser/vr/elements/platform_ui_element.h
@@ -27,6 +27,7 @@ void OnHoverMove(const gfx::PointF& position) override; void OnButtonDown(const gfx::PointF& position) override; void OnButtonUp(const gfx::PointF& position) override; + void OnTouchMove(const gfx::PointF& position) override; void OnFlingCancel(std::unique_ptr<blink::WebGestureEvent> gesture, const gfx::PointF& position) override; void OnScrollBegin(std::unique_ptr<blink::WebGestureEvent> gesture,
diff --git a/chrome/browser/vr/platform_ui_input_delegate.cc b/chrome/browser/vr/platform_ui_input_delegate.cc index f95bf06..edbeaba 100644 --- a/chrome/browser/vr/platform_ui_input_delegate.cc +++ b/chrome/browser/vr/platform_ui_input_delegate.cc
@@ -10,6 +10,7 @@ #include "chrome/browser/vr/platform_input_handler.h" #include "third_party/blink/public/platform/web_gesture_event.h" #include "third_party/blink/public/platform/web_mouse_event.h" +#include "third_party/blink/public/platform/web_touch_event.h" namespace vr { @@ -52,13 +53,19 @@ void PlatformUiInputDelegate::OnButtonDown( const gfx::PointF& normalized_hit_point) { SendGestureToTarget( - MakeMouseEvent(blink::WebInputEvent::kMouseDown, normalized_hit_point)); + MakeTouchEvent(blink::WebInputEvent::kTouchStart, normalized_hit_point)); } void PlatformUiInputDelegate::OnButtonUp( const gfx::PointF& normalized_hit_point) { SendGestureToTarget( - MakeMouseEvent(blink::WebInputEvent::kMouseUp, normalized_hit_point)); + MakeTouchEvent(blink::WebInputEvent::kTouchEnd, normalized_hit_point)); +} + +void PlatformUiInputDelegate::OnTouchMove( + const gfx::PointF& normalized_hit_point) { + SendGestureToTarget( + MakeTouchEvent(blink::WebInputEvent::kTouchMove, normalized_hit_point)); } void PlatformUiInputDelegate::OnFlingCancel( @@ -106,14 +113,30 @@ std::unique_ptr<blink::WebMouseEvent> PlatformUiInputDelegate::MakeMouseEvent( blink::WebInputEvent::Type type, - const gfx::PointF& normalized_web_content_location) { - gfx::Point location(size_.width() * normalized_web_content_location.x(), - size_.height() * normalized_web_content_location.y()); - blink::WebInputEvent::Modifiers modifiers = - blink::WebInputEvent::kNoModifiers; + const gfx::PointF& normalized_web_content_location) const { + // TODO(acondor): Remove dependency on platform controller. + if (!controller_) + return nullptr; - auto mouse_event = std::make_unique<blink::WebMouseEvent>( - type, modifiers, base::TimeTicks::Now()); + gfx::Point location = CalculateLocation(normalized_web_content_location); + blink::WebInputEvent::Modifiers modifiers = + controller_->IsButtonDown(PlatformController::kButtonSelect) + ? blink::WebInputEvent::kLeftButtonDown + : blink::WebInputEvent::kNoModifiers; + + base::TimeTicks timestamp; + switch (type) { + case blink::WebInputEvent::kMouseMove: + case blink::WebInputEvent::kMouseEnter: + case blink::WebInputEvent::kMouseLeave: + timestamp = controller_->GetLastOrientationTimestamp(); + break; + default: + NOTREACHED(); + } + + auto mouse_event = + std::make_unique<blink::WebMouseEvent>(type, modifiers, timestamp); mouse_event->pointer_type = blink::WebPointerProperties::PointerType::kMouse; mouse_event->button = blink::WebPointerProperties::Button::kLeft; mouse_event->SetPositionInWidget(location.x(), location.y()); @@ -121,4 +144,49 @@ return mouse_event; } +std::unique_ptr<blink::WebTouchEvent> PlatformUiInputDelegate::MakeTouchEvent( + blink::WebInputEvent::Type type, + const gfx::PointF& normalized_web_content_location) const { + // TODO(acondor): Remove dependency on platform controller. + if (!controller_) + return nullptr; + + gfx::Point location = CalculateLocation(normalized_web_content_location); + blink::WebInputEvent::Modifiers modifiers = + blink::WebInputEvent::kNoModifiers; + + base::TimeTicks timestamp; + blink::WebTouchPoint::State touch_state = + blink::WebTouchPoint::kStateUndefined; + switch (type) { + case blink::WebInputEvent::kTouchStart: + touch_state = blink::WebTouchPoint::kStatePressed; + timestamp = controller_->GetLastButtonTimestamp(); + break; + case blink::WebInputEvent::kTouchEnd: + touch_state = blink::WebTouchPoint::kStateReleased; + timestamp = controller_->GetLastButtonTimestamp(); + break; + case blink::WebInputEvent::kTouchMove: + touch_state = blink::WebTouchPoint::kStateMoved; + timestamp = controller_->GetLastOrientationTimestamp(); + break; + default: + NOTREACHED(); + } + + auto touch_event = + std::make_unique<blink::WebTouchEvent>(type, modifiers, timestamp); + touch_event->touches_length = 1; + touch_event->touches[0].state = touch_state; + touch_event->touches[0].SetPositionInWidget(location.x(), location.y()); + return touch_event; +} + +gfx::Point PlatformUiInputDelegate::CalculateLocation( + const gfx::PointF& normalized_web_content_location) const { + return gfx::Point(size_.width() * normalized_web_content_location.x(), + size_.height() * normalized_web_content_location.y()); +} + } // namespace vr
diff --git a/chrome/browser/vr/platform_ui_input_delegate.h b/chrome/browser/vr/platform_ui_input_delegate.h index 77bbc025..4d5bddf 100644 --- a/chrome/browser/vr/platform_ui_input_delegate.h +++ b/chrome/browser/vr/platform_ui_input_delegate.h
@@ -21,6 +21,7 @@ namespace blink { class WebGestureEvent; class WebMouseEvent; +class WebTouchEvent; } // namespace blink namespace gfx { @@ -29,6 +30,7 @@ namespace vr { +class PlatformController; class PlatformInputHandler; // This class is responsible for processing all events and gestures for @@ -48,6 +50,7 @@ VIRTUAL_FOR_MOCKS void OnHoverMove(const gfx::PointF& normalized_hit_point); VIRTUAL_FOR_MOCKS void OnButtonDown(const gfx::PointF& normalized_hit_point); VIRTUAL_FOR_MOCKS void OnButtonUp(const gfx::PointF& normalized_hit_point); + VIRTUAL_FOR_MOCKS void OnTouchMove(const gfx::PointF& normalized_hit_point); VIRTUAL_FOR_MOCKS void OnFlingCancel( std::unique_ptr<blink::WebGestureEvent> gesture, const gfx::PointF& normalized_hit_point); @@ -61,6 +64,10 @@ std::unique_ptr<blink::WebGestureEvent> gesture, const gfx::PointF& normalized_hit_point); + void SetPlatformController(PlatformController* controller) { + controller_ = controller; + } + void SetSize(int width, int height) { size_ = {width, height}; } void SetPlatformInputHandlerForTest(PlatformInputHandler* input_handler) { input_handler_ = input_handler; @@ -68,18 +75,27 @@ protected: virtual void SendGestureToTarget(std::unique_ptr<blink::WebInputEvent> event); - virtual std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent( - blink::WebInputEvent::Type type, - const gfx::PointF& normalized_web_content_location); PlatformInputHandler* input_handler() const { return input_handler_; } private: void UpdateGesture(const gfx::PointF& normalized_content_hit_point, blink::WebGestureEvent& gesture); + std::unique_ptr<blink::WebMouseEvent> MakeMouseEvent( + blink::WebInputEvent::Type type, + const gfx::PointF& normalized_web_content_location) const; + std::unique_ptr<blink::WebTouchEvent> MakeTouchEvent( + blink::WebInputEvent::Type type, + const gfx::PointF& normalized_web_content_location) const; + gfx::Point CalculateLocation( + const gfx::PointF& normalized_web_content_location) const; + gfx::Size size_; PlatformInputHandler* input_handler_ = nullptr; + // TODO(acondor): Remove dependency on platform controller. + PlatformController* controller_ = nullptr; + DISALLOW_COPY_AND_ASSIGN(PlatformUiInputDelegate); };
diff --git a/chrome/browser/vr/ui.cc b/chrome/browser/vr/ui.cc index 145e77e..e000b51 100644 --- a/chrome/browser/vr/ui.cc +++ b/chrome/browser/vr/ui.cc
@@ -438,7 +438,7 @@ } void Ui::OnPlatformControllerInitialized(PlatformController* controller) { - content_input_delegate_->OnPlatformControllerInitialized(controller); + content_input_delegate_->SetPlatformController(controller); } bool Ui::IsControllerVisible() const {
diff --git a/chrome/browser/vr/ui_suppressed_element.h b/chrome/browser/vr/ui_suppressed_element.h index 359096c..0b3aee1 100644 --- a/chrome/browser/vr/ui_suppressed_element.h +++ b/chrome/browser/vr/ui_suppressed_element.h
@@ -25,6 +25,7 @@ kUsbChooser, kSslClientCertificate, kMediaRouterPresentationRequest, + kContextMenu, // This must be last. kCount,
diff --git a/chrome/browser/vr/vr_tab_helper.cc b/chrome/browser/vr/vr_tab_helper.cc index 89f0fd3..f71fafa 100644 --- a/chrome/browser/vr/vr_tab_helper.cc +++ b/chrome/browser/vr/vr_tab_helper.cc
@@ -77,6 +77,7 @@ // and permission request dialog are supported in VR before we disable this // suppression. case UiSuppressedElement::kFileAccessPermission: + case UiSuppressedElement::kContextMenu: suppress = true; break; // The following are not suppressed if kVrBrowsingNativeAndroidUi is
diff --git a/chrome/browser/web_applications/BUILD.gn b/chrome/browser/web_applications/BUILD.gn new file mode 100644 index 0000000..8b49ffa --- /dev/null +++ b/chrome/browser/web_applications/BUILD.gn
@@ -0,0 +1,32 @@ +# Copyright 2018 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//extensions/buildflags/buildflags.gni") + +assert(enable_extensions) + +source_set("web_applications") { + sources = [ + "extensions/pending_bookmark_app_manager.cc", + "extensions/pending_bookmark_app_manager.h", + "policy/web_app_policy_constants.cc", + "policy/web_app_policy_constants.h", + "policy/web_app_policy_manager.cc", + "policy/web_app_policy_manager.h", + "policy/web_app_policy_manager_factory.cc", + "policy/web_app_policy_manager_factory.h", + ] + + configs += [ "//build/config/compiler:wexit_time_destructors" ] + + deps = [ + "//base", + "//chrome/browser/extensions", + "//chrome/common", + "//components/keyed_service/content", + "//components/prefs", + "//extensions/browser", + "//url", + ] +}
diff --git a/chrome/browser/web_applications/extensions/OWNERS b/chrome/browser/web_applications/extensions/OWNERS new file mode 100644 index 0000000..99f818d3 --- /dev/null +++ b/chrome/browser/web_applications/extensions/OWNERS
@@ -0,0 +1,2 @@ +mgiuca@chromium.org +ortuno@chromium.org
diff --git a/chrome/browser/web_applications/extensions/README.md b/chrome/browser/web_applications/extensions/README.md new file mode 100644 index 0000000..49220d6b --- /dev/null +++ b/chrome/browser/web_applications/extensions/README.md
@@ -0,0 +1,9 @@ +For historic reasons, Chrome uses the Extension system, more specifically +"Bookmark Apps", to create and install apps based on websites. Hosted Apps are +getting deprecated, so we will eventually migrate off extensions/ and into +web_applications/, but in the meantime we still need to add new features to +the current implementation. + +This directory holds files that implement new features for Hosted Apps that will +soon be moved to web_applications/. This is to avoid adding files that will soon +be deleted to extensions/ folders.
diff --git a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc new file mode 100644 index 0000000..e60bafe --- /dev/null +++ b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.cc
@@ -0,0 +1,18 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h" + +#include <vector> + +namespace extensions { + +PendingBookmarkAppManager::PendingBookmarkAppManager() = default; + +PendingBookmarkAppManager::~PendingBookmarkAppManager() = default; + +void PendingBookmarkAppManager::ProcessAppOperations( + std::vector<web_app::WebAppPolicyManager::AppInfo> apps_to_install) {} + +} // namespace extensions
diff --git a/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h new file mode 100644 index 0000000..02846a6c --- /dev/null +++ b/chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h
@@ -0,0 +1,35 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_PENDING_BOOKMARK_APP_MANAGER_H_ +#define CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_PENDING_BOOKMARK_APP_MANAGER_H_ + +#include <vector> + +#include "base/macros.h" +#include "chrome/browser/web_applications/policy/web_app_policy_manager.h" + +namespace extensions { + +// Implementation of WebAppPolicyManager::PendingAppManager that manages the set +// of Bookmark Apps which are being installed, uninstalled, and updated. +// +// WebAppPolicyManager creates an instance of this class and manages its +// lifetime. This class should only be used from the UI thread. +class PendingBookmarkAppManager final + : public web_app::WebAppPolicyManager::PendingAppManager { + public: + PendingBookmarkAppManager(); + ~PendingBookmarkAppManager() override; + + // WebAppPolicyManager::PendingAppManager + void ProcessAppOperations(std::vector<web_app::WebAppPolicyManager::AppInfo> + apps_to_install) override; + + DISALLOW_COPY_AND_ASSIGN(PendingBookmarkAppManager); +}; + +} // namespace extensions + +#endif // CHROME_BROWSER_WEB_APPLICATIONS_EXTENSIONS_PENDING_BOOKMARK_APP_MANAGER_H_
diff --git a/chrome/browser/web_applications/policy/OWNERS b/chrome/browser/web_applications/policy/OWNERS new file mode 100644 index 0000000..99f818d3 --- /dev/null +++ b/chrome/browser/web_applications/policy/OWNERS
@@ -0,0 +1,2 @@ +mgiuca@chromium.org +ortuno@chromium.org
diff --git a/chrome/browser/web_applications/policy/web_app_policy_constants.cc b/chrome/browser/web_applications/policy/web_app_policy_constants.cc new file mode 100644 index 0000000..45edd1f3 --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_constants.cc
@@ -0,0 +1,14 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/web_applications/policy/web_app_policy_constants.h" + +namespace web_app { + +const char kUrlKey[] = "url"; +const char kLaunchTypeKey[] = "launch_type"; +const char kLaunchTypeWindowValue[] = "window"; +const char kLaunchTypeTabValue[] = "tab"; + +} // namespace web_app
diff --git a/chrome/browser/web_applications/policy/web_app_policy_constants.h b/chrome/browser/web_applications/policy/web_app_policy_constants.h new file mode 100644 index 0000000..de5c1df --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_constants.h
@@ -0,0 +1,18 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_ +#define CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_ + +namespace web_app { + +// Keys and values for the WebAppInstallForceList preference. +extern const char kUrlKey[]; +extern const char kLaunchTypeKey[]; +extern const char kLaunchTypeWindowValue[]; +extern const char kLaunchTypeTabValue[]; + +} // namespace web_app + +#endif // CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_CONSTANTS_H_
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager.cc b/chrome/browser/web_applications/policy/web_app_policy_manager.cc new file mode 100644 index 0000000..d143b3f --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_manager.cc
@@ -0,0 +1,69 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/web_applications/policy/web_app_policy_manager.h" + +#include <utility> +#include <vector> + +#include "base/values.h" +#include "chrome/browser/web_applications/extensions/pending_bookmark_app_manager.h" +#include "chrome/browser/web_applications/policy/web_app_policy_constants.h" +#include "chrome/common/pref_names.h" +#include "components/prefs/pref_service.h" + +namespace web_app { + +WebAppPolicyManager::AppInfo::AppInfo(GURL url, LaunchType launch_type) + : url(std::move(url)), launch_type(launch_type) {} + +WebAppPolicyManager::AppInfo::AppInfo(AppInfo&& other) = default; + +WebAppPolicyManager::AppInfo::~AppInfo() = default; + +bool WebAppPolicyManager::AppInfo::operator==(const AppInfo& other) const { + return std::tie(url, launch_type) == std::tie(other.url, other.launch_type); +} + +WebAppPolicyManager::WebAppPolicyManager( + PrefService* pref_service, + std::unique_ptr<PendingAppManager> pending_app_manager) + : pref_service_(pref_service), + pending_app_manager_(std::move(pending_app_manager)) { + pending_app_manager_->ProcessAppOperations(GetAppsToInstall()); +} + +WebAppPolicyManager::WebAppPolicyManager(PrefService* pref_service) + : WebAppPolicyManager( + pref_service, + std::make_unique<extensions::PendingBookmarkAppManager>()) {} + +WebAppPolicyManager::~WebAppPolicyManager() = default; + +std::vector<WebAppPolicyManager::AppInfo> +WebAppPolicyManager::GetAppsToInstall() { + const base::Value* web_apps = + pref_service_->GetList(prefs::kWebAppInstallForceList); + + std::vector<AppInfo> apps_to_install; + for (const base::Value& info : web_apps->GetList()) { + const base::Value& url = *info.FindKey(kUrlKey); + const base::Value& launch_type = *info.FindKey(kLaunchTypeKey); + + DCHECK(launch_type.GetString() == kLaunchTypeWindowValue || + launch_type.GetString() == kLaunchTypeTabValue); + + apps_to_install.emplace_back( + GURL(url.GetString()), launch_type.GetString() == kLaunchTypeWindowValue + ? LaunchType::kWindow + : LaunchType::kTab); + } + return apps_to_install; +} + +WebAppPolicyManager::PendingAppManager::PendingAppManager() = default; + +WebAppPolicyManager::PendingAppManager::~PendingAppManager() = default; + +} // namespace web_app
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager.h b/chrome/browser/web_applications/policy/web_app_policy_manager.h new file mode 100644 index 0000000..2a5231e3 --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_manager.h
@@ -0,0 +1,92 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_ +#define CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_ + +#include <memory> +#include <vector> + +#include "base/macros.h" +#include "components/keyed_service/core/keyed_service.h" +#include "url/gurl.h" + +class PrefService; +class GURL; + +namespace web_app { + +// Tracks the policy that affects Web Apps and also tracks which Web Apps are +// currently installed based on this policy. Based on these, it decides +// which apps need to be installed, uninstalled, and updated. It uses +// WebAppPolicyManager::PendingAppManager to actually install, uninstall, +// and update apps. +class WebAppPolicyManager : public KeyedService { + public: + class PendingAppManager; + + // How the app will be launched after installation. + enum class LaunchType { + kTab, + kWindow, + }; + + struct AppInfo { + AppInfo(GURL url, LaunchType launch_type); + AppInfo(AppInfo&& other); + ~AppInfo(); + + bool operator==(const AppInfo& other) const; + + GURL url; + LaunchType launch_type; + + DISALLOW_COPY_AND_ASSIGN(AppInfo); + }; + + // Constructs a WebAppPolicyManager instance that uses + // extensions::PendingBookmarkAppManager to manage apps. + explicit WebAppPolicyManager(PrefService* pref_service); + + // Constructs a WebAppPolicyManager instance that uses |pending_app_manager| + // to manage apps. + explicit WebAppPolicyManager( + PrefService* pref_service, + std::unique_ptr<PendingAppManager> pending_app_manager); + + ~WebAppPolicyManager() override; + + const PendingAppManager& pending_app_manager() { + return *pending_app_manager_; + } + + private: + std::vector<AppInfo> GetAppsToInstall(); + + PrefService* pref_service_; + std::unique_ptr<PendingAppManager> pending_app_manager_; + + DISALLOW_COPY_AND_ASSIGN(WebAppPolicyManager); +}; + +// Used by WebAppPolicyManager to install, uninstall, and update apps. +// +// Implementations of this class should perform each set of operations serially +// in the order in which they arrive. For example, if an uninstall request gets +// queued while an update request for the same app is pending, implementations +// should wait for the update request to finish before uninstalling the app. +class WebAppPolicyManager::PendingAppManager { + public: + PendingAppManager(); + virtual ~PendingAppManager(); + + // Starts the installation of |apps_to_install|. + virtual void ProcessAppOperations(std::vector<AppInfo> apps_to_install) = 0; + + DISALLOW_COPY_AND_ASSIGN(PendingAppManager); +}; + +} // namespace web_app + +#endif // CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_H_
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager_factory.cc b/chrome/browser/web_applications/policy/web_app_policy_manager_factory.cc new file mode 100644 index 0000000..acd23f32 --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_manager_factory.cc
@@ -0,0 +1,48 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/web_applications/policy/web_app_policy_manager_factory.h" + +#include "chrome/browser/profiles/profile.h" +#include "chrome/browser/web_applications/policy/web_app_policy_manager.h" +#include "components/keyed_service/content/browser_context_dependency_manager.h" +#include "extensions/browser/extension_system_provider.h" +#include "extensions/browser/extensions_browser_client.h" + +namespace web_app { + +// static +WebAppPolicyManager* WebAppPolicyManagerFactory::GetForProfile( + Profile* profile) { + return static_cast<WebAppPolicyManager*>( + WebAppPolicyManagerFactory::GetInstance()->GetServiceForBrowserContext( + profile, true /* create */)); +} + +// static +WebAppPolicyManagerFactory* WebAppPolicyManagerFactory::GetInstance() { + return base::Singleton<WebAppPolicyManagerFactory>::get(); +} + +WebAppPolicyManagerFactory::WebAppPolicyManagerFactory() + : BrowserContextKeyedServiceFactory( + "WebAppPolicyManager", + BrowserContextDependencyManager::GetInstance()) { + DependsOn( + extensions::ExtensionsBrowserClient::Get()->GetExtensionSystemFactory()); +} + +WebAppPolicyManagerFactory::~WebAppPolicyManagerFactory() = default; + +KeyedService* WebAppPolicyManagerFactory::BuildServiceInstanceFor( + content::BrowserContext* context) const { + Profile* profile = Profile::FromBrowserContext(context); + return new WebAppPolicyManager(profile->GetPrefs()); +} + +bool WebAppPolicyManagerFactory::ServiceIsCreatedWithBrowserContext() const { + return true; +} + +} // namespace web_app
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager_factory.h b/chrome/browser/web_applications/policy/web_app_policy_manager_factory.h new file mode 100644 index 0000000..3a69d9f --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_manager_factory.h
@@ -0,0 +1,46 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_FACTORY_H_ +#define CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_FACTORY_H_ + +#include "base/macros.h" +#include "base/memory/singleton.h" +#include "components/keyed_service/content/browser_context_keyed_service_factory.h" + +namespace content { +class BrowserContext; +} + +class Profile; + +namespace web_app { + +class WebAppPolicyManager; + +// Singleton that owns all WebAppPolicyManagerFactories and associates them with +// Profile. +class WebAppPolicyManagerFactory : public BrowserContextKeyedServiceFactory { + public: + static WebAppPolicyManager* GetForProfile(Profile* profile); + + static WebAppPolicyManagerFactory* GetInstance(); + + private: + friend struct base::DefaultSingletonTraits<WebAppPolicyManagerFactory>; + + WebAppPolicyManagerFactory(); + ~WebAppPolicyManagerFactory() override; + + // BrowserContextKeyedServiceFactory + KeyedService* BuildServiceInstanceFor( + content::BrowserContext* context) const override; + bool ServiceIsCreatedWithBrowserContext() const override; + + DISALLOW_COPY_AND_ASSIGN(WebAppPolicyManagerFactory); +}; + +} // namespace web_app + +#endif // CHROME_BROWSER_WEB_APPLICATIONS_POLICY_WEB_APP_POLICY_MANAGER_FACTORY_H_
diff --git a/chrome/browser/web_applications/policy/web_app_policy_manager_unittest.cc b/chrome/browser/web_applications/policy/web_app_policy_manager_unittest.cc new file mode 100644 index 0000000..d694740f --- /dev/null +++ b/chrome/browser/web_applications/policy/web_app_policy_manager_unittest.cc
@@ -0,0 +1,124 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/web_applications/policy/web_app_policy_manager.h" + +#include <utility> +#include <vector> + +#include "base/values.h" +#include "chrome/browser/prefs/browser_prefs.h" +#include "chrome/browser/web_applications/policy/web_app_policy_constants.h" +#include "chrome/common/pref_names.h" +#include "components/sync_preferences/testing_pref_service_syncable.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +using sync_preferences::TestingPrefServiceSyncable; +using AppInfo = web_app::WebAppPolicyManager::AppInfo; + +namespace web_app { + +namespace { + +const char kUrl1[] = "https://mobile.twitter.com"; +const char kUrl2[] = "https://www.google.com"; + +} // namespace + +class WebAppPolicyManagerTest : public testing::Test { + public: + class TestPendingAppManager; +}; + +class WebAppPolicyManagerTest::TestPendingAppManager + : public WebAppPolicyManager::PendingAppManager { + public: + TestPendingAppManager() = default; + ~TestPendingAppManager() override = default; + + void ProcessAppOperations( + std::vector<WebAppPolicyManager::AppInfo> apps_to_install) override { + last_apps_to_install_ = std::move(apps_to_install); + } + + const std::vector<AppInfo>& last_apps_to_install() { + return last_apps_to_install_; + } + + private: + std::vector<AppInfo> last_apps_to_install_; + + DISALLOW_COPY_AND_ASSIGN(TestPendingAppManager); +}; + +TEST_F(WebAppPolicyManagerTest, NoForceInstalledAppsPrefValue) { + auto prefs = std::make_unique<TestingPrefServiceSyncable>(); + RegisterUserProfilePrefs(prefs->registry()); + + auto pending_app_manager = std::make_unique<TestPendingAppManager>(); + auto* pending_app_manager_ptr = pending_app_manager.get(); + + WebAppPolicyManager web_app_policy_manager(prefs.get(), + std::move(pending_app_manager)); + const auto& apps_to_install = pending_app_manager_ptr->last_apps_to_install(); + + EXPECT_TRUE(apps_to_install.empty()); +} + +TEST_F(WebAppPolicyManagerTest, NoForceInstalledApps) { + auto prefs = std::make_unique<TestingPrefServiceSyncable>(); + RegisterUserProfilePrefs(prefs->registry()); + + prefs->Set(prefs::kWebAppInstallForceList, + base::Value(base::Value::Type::LIST)); + + auto pending_app_manager = std::make_unique<TestPendingAppManager>(); + auto* pending_app_manager_ptr = pending_app_manager.get(); + + WebAppPolicyManager web_app_policy_manager(prefs.get(), + std::move(pending_app_manager)); + const auto& apps_to_install = pending_app_manager_ptr->last_apps_to_install(); + + EXPECT_TRUE(apps_to_install.empty()); +} + +TEST_F(WebAppPolicyManagerTest, TwoForceInstalledApps) { + auto prefs = std::make_unique<TestingPrefServiceSyncable>(); + RegisterUserProfilePrefs(prefs->registry()); + + base::Value list(base::Value::Type::LIST); + // Add two sites, one that opens in a window and one that opens in a tab. + { + base::Value item1(base::Value::Type::DICTIONARY); + item1.SetKey(kUrlKey, base::Value(kUrl1)); + item1.SetKey(kLaunchTypeKey, base::Value(kLaunchTypeWindowValue)); + + base::Value item2(base::Value::Type::DICTIONARY); + item2.SetKey(kUrlKey, base::Value(kUrl2)); + item2.SetKey(kLaunchTypeKey, base::Value(kLaunchTypeTabValue)); + + list.GetList().push_back(std::move(item1)); + list.GetList().push_back(std::move(item2)); + + prefs->Set(prefs::kWebAppInstallForceList, std::move(list)); + } + + auto pending_app_manager = std::make_unique<TestPendingAppManager>(); + auto* pending_app_manager_ptr = pending_app_manager.get(); + + WebAppPolicyManager web_app_policy_manager(prefs.get(), + std::move(pending_app_manager)); + const auto& apps_to_install = pending_app_manager_ptr->last_apps_to_install(); + + std::vector<AppInfo> expected_apps_to_install; + expected_apps_to_install.emplace_back( + GURL(kUrl1), WebAppPolicyManager::LaunchType::kWindow); + expected_apps_to_install.emplace_back(GURL(kUrl2), + WebAppPolicyManager::LaunchType::kTab); + + EXPECT_EQ(apps_to_install, expected_apps_to_install); +} + +} // namespace web_app
diff --git a/chrome/browser/web_applications/web_app.cc b/chrome/browser/web_applications/web_app.cc index 9a680cc..d6d6279 100644 --- a/chrome/browser/web_applications/web_app.cc +++ b/chrome/browser/web_applications/web_app.cc
@@ -27,6 +27,7 @@ #include "chrome/common/chrome_switches.h" #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" #include "chrome/common/pref_names.h" +#include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_thread.h" #include "extensions/browser/extension_registry.h" @@ -142,6 +143,10 @@ // are no naming conflicts. static const char kCrxAppPrefix[] = "_crx_"; +void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry) { + registry->RegisterListPref(prefs::kWebAppInstallForceList); +} + namespace internals { base::FilePath GetSanitizedFileName(const base::string16& name) {
diff --git a/chrome/browser/web_applications/web_app.h b/chrome/browser/web_applications/web_app.h index 7ca1f3b4..e4ff98e 100644 --- a/chrome/browser/web_applications/web_app.h +++ b/chrome/browser/web_applications/web_app.h
@@ -31,6 +31,10 @@ class ImageFamily; } +namespace user_prefs { +class PrefRegistrySyncable; +} + // This namespace contains everything related to integrating Chrome apps into // the OS. E.g. creating and updating shorcuts for apps, setting up file // associations, etc. @@ -126,6 +130,8 @@ typedef base::Callback<void(std::unique_ptr<ShortcutInfo>)> ShortcutInfoCallback; +void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); + std::unique_ptr<ShortcutInfo> ShortcutInfoForExtensionAndProfile( const extensions::Extension* app, Profile* profile);
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc index 11d0d19..98ac3a64 100644 --- a/chrome/common/pref_names.cc +++ b/chrome/common/pref_names.cc
@@ -1572,6 +1572,11 @@ const char kWebAppCreateInQuickLaunchBar[] = "browser.web_app.create_in_quick_launch_bar"; +// A list of dictionaries for force-installed Web Apps. Each dictionary contains +// two strings: the URL of the Web App and "tab" or "window" for where the app +// will be launched. +const char kWebAppInstallForceList[] = "profile.web_app.install.forcelist"; + // Dictionary that maps Geolocation network provider server URLs to // corresponding access token. const char kGeolocationAccessToken[] = "geolocation.access_token";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h index 6be2e1c..64b88a6 100644 --- a/chrome/common/pref_names.h +++ b/chrome/common/pref_names.h
@@ -561,6 +561,8 @@ extern const char kWebAppCreateInAppsMenu[]; extern const char kWebAppCreateInQuickLaunchBar[]; +extern const char kWebAppInstallForceList[]; + extern const char kGeolocationAccessToken[]; extern const char kDefaultAudioCaptureDevice[];
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 8faf066..22980b8e 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -697,7 +697,6 @@ "../browser/renderer_host/render_process_host_chrome_browsertest.cc", "../browser/repost_form_warning_browsertest.cc", "../browser/resource_coordinator/local_site_characteristics_data_store_factory_browsertest.cc", - "../browser/resource_coordinator/local_site_characteristics_database_browsertest.cc", "../browser/resource_coordinator/render_process_probe_browsertest.cc", "../browser/resource_coordinator/tab_activity_watcher_browsertest.cc", "../browser/resource_coordinator/tab_manager_browsertest.cc", @@ -3598,6 +3597,7 @@ "../browser/sync_file_system/sync_file_system_test_util.h", "../browser/sync_file_system/sync_process_runner_unittest.cc", "../browser/sync_file_system/syncable_file_system_util_unittest.cc", + "../browser/web_applications/policy/web_app_policy_manager_unittest.cc", "../browser/web_applications/web_app_mac_unittest.mm", "../browser/web_applications/web_app_unittest.cc", "../common/extensions/api/commands/commands_manifest_unittest.cc",
diff --git a/chrome/test/data/resource_coordinator/default_favicon.png b/chrome/test/data/resource_coordinator/default_favicon.png deleted file mode 100644 index c44e0f3..0000000 --- a/chrome/test/data/resource_coordinator/default_favicon.png +++ /dev/null Binary files differ
diff --git a/chrome/test/data/resource_coordinator/site_characteristics_test_page.html b/chrome/test/data/resource_coordinator/site_characteristics_test_page.html deleted file mode 100644 index c4a70712..0000000 --- a/chrome/test/data/resource_coordinator/site_characteristics_test_page.html +++ /dev/null
@@ -1,55 +0,0 @@ -<!doctype html> -<html lang="en"> - -<head> - <meta charset="utf-8"> - <title>Site Characteristics Database Test Page</title> -</head> - -<body> - <script> - // Requests permission to display Web Notifications. - function RequestNotificationsPermission() { - Notification.requestPermission(function (level) { - domAutomationController.send(level); - }); - } - - // Instantiates a new non-persistent notification with the given |title| - // and |options| and then closes it. - function DisplayAndCloseNonPersistentNotification(title, options) { - const notification = new Notification(title, options || {}); - notification.addEventListener('show', e => { - notification.close(); - }); - notification.addEventListener('close', e => { - domAutomationController.send('ok'); - }); - } - - // Play |test_audio.ogg|. - function PlayAudio() { - var audio = new Audio('test_audio.ogg'); - audio.addEventListener('loadeddata', function () { - audio.play(); - }) - } - - // Change the page title to |new_title| - function ChangeTitle(new_title) { - document.title = new_title; - } - - // Change the favicon to |default_favicon.png|. - function ChangeFavicon() { - favicon = document.createElement('link'); - favicon.setAttribute('rel', 'shortcut icon'); - var head = document.querySelector('head'); - head.appendChild(favicon); - favicon.setAttribute('type', 'image/png'); - favicon.setAttribute('href', 'default_favicon.png'); - } - </script> -</body> - -</html> \ No newline at end of file
diff --git a/chrome/test/data/resource_coordinator/test_audio.ogg b/chrome/test/data/resource_coordinator/test_audio.ogg deleted file mode 100644 index c6c4e2c..0000000 --- a/chrome/test/data/resource_coordinator/test_audio.ogg +++ /dev/null Binary files differ
diff --git a/chrome/test/data/webui/cr_elements/cr_dialog_test.js b/chrome/test/data/webui/cr_elements/cr_dialog_test.js index b0edc4c..d83d124 100644 --- a/chrome/test/data/webui/cr_elements/cr_dialog_test.js +++ b/chrome/test/data/webui/cr_elements/cr_dialog_test.js
@@ -129,12 +129,12 @@ assertTrue(clicked); }); - test('enter keys from paper-inputs (only) are processed', function() { + test('enter keys from cr-inputs (only) are processed', function() { document.body.innerHTML = ` <cr-dialog> <div slot="title">title</div> <div slot="body"> - <paper-input></paper-input> + <cr-input></cr-input> <foobar></foobar> <button class="action-button">active</button> </div> @@ -142,7 +142,7 @@ const dialog = document.body.querySelector('cr-dialog'); - const inputElement = document.body.querySelector('paper-input'); + const inputElement = document.body.querySelector('cr-input'); const otherElement = document.body.querySelector('foobar'); const actionButton = document.body.querySelector('.action-button'); assertTrue(!!inputElement);
diff --git a/chrome/test/data/webui/cr_elements/cr_input_test.js b/chrome/test/data/webui/cr_elements/cr_input_test.js index 873ea63b..54d4ef1 100644 --- a/chrome/test/data/webui/cr_elements/cr_input_test.js +++ b/chrome/test/data/webui/cr_elements/cr_input_test.js
@@ -21,6 +21,7 @@ ['disabled', 'disabled', false, true], ['incremental', 'incremental', false, true], ['maxlength', 'maxLength', -1, 5], + ['minlength', 'minLength', -1, 5], ['pattern', 'pattern', '', '[a-z]+'], ['readonly', 'readOnly', false, true], ['required', 'required', false, true],
diff --git a/chrome/test/data/webui/md_downloads/item_tests.js b/chrome/test/data/webui/md_downloads/item_tests.js index 174dbb64..7113c08 100644 --- a/chrome/test/data/webui/md_downloads/item_tests.js +++ b/chrome/test/data/webui/md_downloads/item_tests.js
@@ -14,6 +14,7 @@ test('dangerous downloads aren\'t linkable', function() { item.set('data', { danger_type: downloads.DangerType.DANGEROUS_FILE, + hideDate: true, file_externally_removed: false, state: downloads.States.DANGEROUS, url: 'http://evil.com'
diff --git a/chrome/test/data/webui/md_downloads/manager_tests.js b/chrome/test/data/webui/md_downloads/manager_tests.js index c1e89b3..f23bae2 100644 --- a/chrome/test/data/webui/md_downloads/manager_tests.js +++ b/chrome/test/data/webui/md_downloads/manager_tests.js
@@ -40,6 +40,7 @@ downloads.Manager.insertItems(0, [{ file_name: 'file name', state: downloads.States.COMPLETE, + since_string: 'Today', url: 'a'.repeat(1000), }]); Polymer.dom.flush(); @@ -50,8 +51,12 @@ }); test('inserting items at beginning render dates correctly', function() { - const dateQuery = '* /deep/ h3[id=date]:not(:empty)'; - const countDates = () => manager.querySelectorAll(dateQuery).length; + const countDates = () => { + const items = manager.shadowRoot.querySelectorAll('downloads-item'); + return Array.from(items).reduce((soFar, item) => { + return item.$$('h3[id=date]:not(:empty)') ? soFar + 1 : soFar; + }, 0); + }; let download1 = Object.assign({}, DOWNLOAD_DATA_TEMPLATE); let download2 = Object.assign({}, DOWNLOAD_DATA_TEMPLATE);
diff --git a/chrome/test/data/webui/settings/certificate_manager_test.js b/chrome/test/data/webui/settings/certificate_manager_test.js index a1c1f63a..c1e9124 100644 --- a/chrome/test/data/webui/settings/certificate_manager_test.js +++ b/chrome/test/data/webui/settings/certificate_manager_test.js
@@ -168,7 +168,7 @@ /** * Triggers an 'input' event on the given text input field (which triggers * validation to occur for password fields being tested in this file). - * @param {!PaperInputElement} element + * @param {!CrInputElement} element */ function triggerInputEvent(element) { // The actual key code is irrelevant for tests.
diff --git a/chrome/test/data/webui/settings/search_engines_page_test.js b/chrome/test/data/webui/settings/search_engines_page_test.js index bf6d385..fb7e551 100644 --- a/chrome/test/data/webui/settings/search_engines_page_test.js +++ b/chrome/test/data/webui/settings/search_engines_page_test.js
@@ -92,14 +92,14 @@ }); // Tests the dialog to add a new search engine. Specifically - // - paper-input elements are empty initially. + // - cr-input elements are empty initially. // - action button initially disabled. // - validation is triggered on 'input' event. // - action button is enabled when all fields are valid. // - action button triggers appropriate browser signal when tapped. test('DialogAddSearchEngine', function() { /** - * Triggers an 'input' event on the paper-input element and checks that + * Triggers an 'input' event on the cr-input element and checks that * validation is triggered. * @param {string} inputId * @return {!Promise} @@ -421,7 +421,7 @@ const dialog = page.$$('settings-search-engine-dialog'); assertTrue(!!dialog); - // Check that the paper-input fields are pre-populated. + // Check that the cr-input fields are pre-populated. assertEquals(engine.name, dialog.$.searchEngine.value); assertEquals(engine.keyword, dialog.$.keyword.value); assertEquals(engine.url, dialog.$.queryUrl.value);
diff --git a/chrome/test/media_router/resources/common.js b/chrome/test/media_router/resources/common.js index cf503b0..48ce0d9 100644 --- a/chrome/test/media_router/resources/common.js +++ b/chrome/test/media_router/resources/common.js
@@ -21,7 +21,7 @@ } else if (params.get('__oneUANoReceiver__') == 'true') { presentationUrl = "no_presentation_receiver.html"; } else { - presentationUrl = "test://test"; + presentationUrl = "https://www.example.com/presentation.html"; } var startSessionRequest = new PresentationRequest([presentationUrl]);
diff --git a/chrome/tools/build/mac/FILES.cfg b/chrome/tools/build/mac/FILES.cfg index 2ef7293d..a24fe945 100644 --- a/chrome/tools/build/mac/FILES.cfg +++ b/chrome/tools/build/mac/FILES.cfg
@@ -54,6 +54,7 @@ 'filename': 'browser_tests', 'buildtype': ['dev', 'official'], 'archive': 'browser_tests', + 'optional': ['dev', 'official'], }, # Remoting files: {
diff --git a/chromeos/services/secure_channel/secure_channel_service_unittest.cc b/chromeos/services/secure_channel/secure_channel_service_unittest.cc index b939589f..a547942 100644 --- a/chromeos/services/secure_channel/secure_channel_service_unittest.cc +++ b/chromeos/services/secure_channel/secure_channel_service_unittest.cc
@@ -375,6 +375,7 @@ auto connector = connector_factory_->CreateConnector(); connector->BindInterface(mojom::kServiceName, &secure_channel_ptr_); + secure_channel_ptr_.FlushForTesting(); } void TearDown() override { @@ -572,15 +573,6 @@ // The PendingConnectionManager should not have yet been created. EXPECT_FALSE(fake_pending_connection_manager()); - // The service is not expected to start up until at least one API call is - // made on its interface. - CallInitiateConnectionToDeviceAndVerifyInitializationNotComplete( - test_devices()[4], test_devices()[5], "feature", - ConnectionPriority::kLow); - CallListenForConnectionFromDeviceAndVerifyInitializationNotComplete( - test_devices()[4], test_devices()[5], "feature", - ConnectionPriority::kLow); - EXPECT_TRUE(test_task_runner_->HasPendingTask()); test_task_runner_->RunUntilIdle(); @@ -956,6 +948,16 @@ mojom::ConnectionAttemptFailureReason::LOCAL_DEVICE_INVALID_PSK); } +TEST_F(SecureChannelServiceTest, CallsQueuedBeforeInitializationComplete) { + CallInitiateConnectionToDeviceAndVerifyInitializationNotComplete( + test_devices()[4], test_devices()[5], "feature", + ConnectionPriority::kLow); + CallListenForConnectionFromDeviceAndVerifyInitializationNotComplete( + test_devices()[4], test_devices()[5], "feature", + ConnectionPriority::kLow); + FinishInitialization(); +} + TEST_F(SecureChannelServiceTest, ListenForConnection_OneDevice) { FinishInitialization();
diff --git a/components/arc/common/intent_helper.mojom b/components/arc/common/intent_helper.mojom index e292f6d..5b4fc95 100644 --- a/components/arc/common/intent_helper.mojom +++ b/components/arc/common/intent_helper.mojom
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // -// Next MinVersion: 21 +// Next MinVersion: 22 module arc.mojom; @@ -48,6 +48,7 @@ [MinVersion=10] array<AuthorityEntry>? data_authorities; [MinVersion=10] array<PatternMatcher>? data_paths; [MinVersion=10] array<PatternMatcher>? deprecated_data_scheme_specific_parts; + [MinVersion=21] string? package_name; // Package which registered the filter. }; // Describes a package that can handle an intent.
diff --git a/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc b/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc index c767cc6..e747a66 100644 --- a/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc +++ b/components/arc/intent_helper/arc_intent_helper_bridge_unittest.cc
@@ -17,10 +17,12 @@ namespace { +constexpr char kPackageName[] = "default.package.name"; + IntentFilter GetIntentFilter(const std::string& host) { std::vector<IntentFilter::AuthorityEntry> authorities; authorities.emplace_back(host, -1); - return IntentFilter(std::move(authorities), + return IntentFilter(kPackageName, std::move(authorities), std::vector<IntentFilter::PatternMatcher>()); }
diff --git a/components/arc/intent_helper/intent_filter.cc b/components/arc/intent_helper/intent_filter.cc index 32fb9a14..d82b8ba 100644 --- a/components/arc/intent_helper/intent_filter.cc +++ b/components/arc/intent_helper/intent_filter.cc
@@ -17,9 +17,10 @@ IntentFilter::IntentFilter(IntentFilter&& other) = default; IntentFilter::IntentFilter( + const std::string& package_name, std::vector<IntentFilter::AuthorityEntry> authorities, std::vector<IntentFilter::PatternMatcher> paths) - : authorities_(std::move(authorities)) { + : package_name_(package_name), authorities_(std::move(authorities)) { // In order to register a path we need to have at least one authority. if (!authorities_.empty()) paths_ = std::move(paths);
diff --git a/components/arc/intent_helper/intent_filter.h b/components/arc/intent_helper/intent_filter.h index e6c447f58..0640775 100644 --- a/components/arc/intent_helper/intent_filter.h +++ b/components/arc/intent_helper/intent_filter.h
@@ -71,7 +71,8 @@ IntentFilter(); IntentFilter(IntentFilter&& other); - IntentFilter(std::vector<AuthorityEntry> authorities, + IntentFilter(const std::string& package_name, + std::vector<AuthorityEntry> authorities, std::vector<PatternMatcher> paths); ~IntentFilter(); @@ -79,6 +80,7 @@ bool Match(const GURL& url) const; + const std::string& package_name() const { return package_name_; } const std::vector<AuthorityEntry>& authorities() const { return authorities_; } @@ -88,6 +90,7 @@ bool MatchDataAuthority(const GURL& url) const; bool HasDataPath(const GURL& url) const; + std::string package_name_; std::vector<AuthorityEntry> authorities_; std::vector<PatternMatcher> paths_;
diff --git a/components/arc/intent_helper/intent_filter_struct_traits.cc b/components/arc/intent_helper/intent_filter_struct_traits.cc index e4a59fc..1a33f43 100644 --- a/components/arc/intent_helper/intent_filter_struct_traits.cc +++ b/components/arc/intent_helper/intent_filter_struct_traits.cc
@@ -23,7 +23,12 @@ if (!data.ReadDataPaths(&paths)) return false; - *out = arc::IntentFilter(std::move(authorities), std::move(paths)); + std::string package_name; + if (!data.ReadPackageName(&package_name)) + return false; + + *out = + arc::IntentFilter(package_name, std::move(authorities), std::move(paths)); return true; } @@ -32,8 +37,7 @@ Read(arc::mojom::AuthorityEntryDataView data, arc::IntentFilter::AuthorityEntry* out) { std::string host; - bool result = data.ReadHost(&host); - if (!result) + if (!data.ReadHost(&host)) return false; *out = arc::IntentFilter::AuthorityEntry(std::move(host), data.port());
diff --git a/components/arc/intent_helper/intent_filter_struct_traits.h b/components/arc/intent_helper/intent_filter_struct_traits.h index a76ba40..421001d 100644 --- a/components/arc/intent_helper/intent_filter_struct_traits.h +++ b/components/arc/intent_helper/intent_filter_struct_traits.h
@@ -43,6 +43,10 @@ return base::span<arc::IntentFilter::PatternMatcher>(); } + static const std::string& package_name(const arc::IntentFilter& r) { + return r.package_name(); + } + static bool Read(arc::mojom::IntentFilterDataView data, arc::IntentFilter* out); };
diff --git a/components/arc/intent_helper/intent_filter_unittest.cc b/components/arc/intent_helper/intent_filter_unittest.cc index 1205c2e..73a9d3f 100644 --- a/components/arc/intent_helper/intent_filter_unittest.cc +++ b/components/arc/intent_helper/intent_filter_unittest.cc
@@ -18,6 +18,8 @@ namespace { +constexpr char kPackageName[] = "default.package.name"; + class IntentFilterBuilder { public: IntentFilterBuilder() = default; @@ -38,7 +40,8 @@ } operator IntentFilter() { - return IntentFilter(std::move(authorities_), std::move(paths_)); + return IntentFilter(kPackageName, std::move(authorities_), + std::move(paths_)); } private:
diff --git a/components/data_reduction_proxy/core/browser/data_store_impl.cc b/components/data_reduction_proxy/core/browser/data_store_impl.cc index 2ed201e..043ed02 100644 --- a/components/data_reduction_proxy/core/browser/data_store_impl.cc +++ b/components/data_reduction_proxy/core/browser/data_store_impl.cc
@@ -12,6 +12,7 @@ #include "base/metrics/histogram_macros.h" #include "components/data_reduction_proxy/proto/data_store.pb.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/options.h" #include "third_party/leveldatabase/src/include/leveldb/status.h" @@ -146,8 +147,11 @@ DataStore::Status DataStoreImpl::RecreateDB() { DCHECK(sequence_checker_.CalledOnValidSequence()); - db_.reset(nullptr); - base::DeleteFile(profile_path_.Append(kDBName), true); + db_.reset(); + const base::FilePath db_path = profile_path_.Append(kDBName); + leveldb::Status s = leveldb_chrome::DeleteDB(db_path, leveldb::Options()); + if (!s.ok()) + return LevelDbToDRPStoreStatus(s); return OpenDB(); }
diff --git a/components/drive/resource_metadata_storage.cc b/components/drive/resource_metadata_storage.cc index 7e46cb56..56cd94c 100644 --- a/components/drive/resource_metadata_storage.cc +++ b/components/drive/resource_metadata_storage.cc
@@ -25,6 +25,7 @@ #include "components/drive/drive_api_util.h" #include "components/drive/file_system_core_util.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" @@ -571,11 +572,21 @@ const base::FilePath preserved_resource_map_path = directory_path.Append(kPreservedResourceMapDBName); + leveldb_env::Options options; + options.max_open_files = 0; // Use minimum. + options.create_if_missing = false; + if (base::PathExists(preserved_resource_map_path)) { // Preserved DB is found. The previous attempt to create a new DB should not // be successful. Discard the imperfect new DB and restore the old DB. - if (!base::DeleteFile(resource_map_path, false /* recursive */) || - !base::Move(preserved_resource_map_path, resource_map_path)) + leveldb::Status status = + leveldb_chrome::DeleteDB(resource_map_path, options); + if (!status.ok()) { + LOG(ERROR) << "ERROR deleting " << resource_map_path + << ", err:" << status.ToString(); + return false; + } + if (!base::Move(preserved_resource_map_path, resource_map_path)) return false; } @@ -584,9 +595,6 @@ // Open DB. std::unique_ptr<leveldb::DB> resource_map; - leveldb_env::Options options; - options.max_open_files = 0; // Use minimum. - options.create_if_missing = false; leveldb::Status status = leveldb_env::OpenDB( options, resource_map_path.AsUTF8Unsafe(), &resource_map); if (!status.ok()) @@ -661,18 +669,18 @@ const base::FilePath trashed_resource_map_path = directory_path_.Append(kTrashedResourceMapDBName); + leveldb_env::Options options; + options.max_open_files = 0; // Use minimum. + options.create_if_missing = false; + // Discard unneeded DBs. - if (!base::DeleteFile(preserved_resource_map_path, true /* recursive */) || - !base::DeleteFile(trashed_resource_map_path, true /* recursive */)) { + if (!leveldb_chrome::DeleteDB(preserved_resource_map_path, options).ok() || + !leveldb_chrome::DeleteDB(trashed_resource_map_path, options).ok()) { LOG(ERROR) << "Failed to remove unneeded DBs."; return false; } // Try to open the existing DB. - leveldb_env::Options options; - options.max_open_files = 0; // Use minimum. - options.create_if_missing = false; - DBInitStatus open_existing_result = DB_INIT_NOT_FOUND; leveldb::Status status; if (base::PathExists(resource_map_path)) {
diff --git a/components/invalidation/impl/BUILD.gn b/components/invalidation/impl/BUILD.gn index 569ffc9..8c66851 100644 --- a/components/invalidation/impl/BUILD.gn +++ b/components/invalidation/impl/BUILD.gn
@@ -78,6 +78,8 @@ "notifier_reason_util.h", "p2p_invalidator.cc", "p2p_invalidator.h", + "per_user_topic_invalidation_client.cc", + "per_user_topic_invalidation_client.h", "push_client_channel.cc", "push_client_channel.h", "registration_manager.cc", @@ -153,6 +155,7 @@ "non_blocking_invalidator_unittest.cc", "object_id_invalidation_map_unittest.cc", "p2p_invalidator_unittest.cc", + "per_user_topic_invalidation_client_unittest.cc", "per_user_topic_registration_manager_unittest.cc", "push_client_channel_unittest.cc", "registration_manager_unittest.cc", @@ -185,6 +188,10 @@ "fake_invalidation_state_tracker.h", "fake_invalidator.cc", "fake_invalidator.h", + "fake_logger.cc", + "fake_logger.h", + "fake_system_resources.cc", + "fake_system_resources.h", "invalidation_service_test_template.cc", "invalidation_service_test_template.h", "invalidation_test_util.cc",
diff --git a/components/invalidation/impl/fake_logger.cc b/components/invalidation/impl/fake_logger.cc new file mode 100644 index 0000000..2b386fa2 --- /dev/null +++ b/components/invalidation/impl/fake_logger.cc
@@ -0,0 +1,23 @@ +// Copyright 2018 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/invalidation/impl/fake_logger.h" + +#include "google/cacheinvalidation/deps/string_util.h" + +namespace invalidation { + +FakeLogger::~FakeLogger() {} + +void FakeLogger::Log(LogLevel level, + const char* file, + int line, + const char* format, + ...) {} + +void FakeLogger::SetSystemResources(SystemResources* resources) { + // Nothing to do (logger uses no other resources). +} + +} // namespace invalidation
diff --git a/components/invalidation/impl/fake_logger.h b/components/invalidation/impl/fake_logger.h new file mode 100644 index 0000000..114fd4b --- /dev/null +++ b/components/invalidation/impl/fake_logger.h
@@ -0,0 +1,30 @@ +// Copyright 2018 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_INVALIDATION_IMPL_FAKE_LOGGER_H_ +#define COMPONENTS_INVALIDATION_IMPL_FAKE_LOGGER_H_ + +#include "google/cacheinvalidation/deps/logging.h" +#include "google/cacheinvalidation/include/system-resources.h" + +namespace invalidation { + +// A simple logger implementation for testing. +class FakeLogger : public Logger { + public: + ~FakeLogger() override; + + // Logger + void Log(LogLevel level, + const char* file, + int line, + const char* format, + ...) override; + + void SetSystemResources(SystemResources* resources) override; +}; + +} // namespace invalidation + +#endif // COMPONENTS_INVALIDATION_IMPL_FAKE_LOGGER_H_
diff --git a/components/invalidation/impl/fake_system_resources.cc b/components/invalidation/impl/fake_system_resources.cc new file mode 100644 index 0000000..d8f7b088 --- /dev/null +++ b/components/invalidation/impl/fake_system_resources.cc
@@ -0,0 +1,65 @@ +// Copyright 2018 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/invalidation/impl/fake_system_resources.h" + +#include "google/cacheinvalidation/deps/string_util.h" +#include "google/cacheinvalidation/include/system-resources.h" + +namespace invalidation { + +FakeSystemResources::FakeSystemResources( + std::unique_ptr<Logger> logger, + std::unique_ptr<NetworkChannel> network, + std::unique_ptr<Storage> storage, + const string& platform) + : logger_(std::move(logger)), + network_(std::move(network)), + storage_(std::move(storage)), + platform_(platform) { + logger_->SetSystemResources(this); + network_->SetSystemResources(this); + storage_->SetSystemResources(this); +} + +FakeSystemResources::~FakeSystemResources() {} + +void FakeSystemResources::Start() { + is_started_ = true; +} + +void FakeSystemResources::Stop() { + CHECK(is_started_) << "cannot stop resources that aren't started"; + is_started_ = false; +} + +bool FakeSystemResources::IsStarted() const { + return is_started_; +} + +Logger* FakeSystemResources::logger() { + return logger_.get(); +} + +Scheduler* FakeSystemResources::internal_scheduler() { + return nullptr; +} + +Scheduler* FakeSystemResources::listener_scheduler() { + return nullptr; +} + +NetworkChannel* FakeSystemResources::network() { + return network_.get(); +} + +Storage* FakeSystemResources::storage() { + return storage_.get(); +} + +string FakeSystemResources::platform() const { + return platform_; +} + +} // namespace invalidation
diff --git a/components/invalidation/impl/fake_system_resources.h b/components/invalidation/impl/fake_system_resources.h new file mode 100644 index 0000000..7171385 --- /dev/null +++ b/components/invalidation/impl/fake_system_resources.h
@@ -0,0 +1,54 @@ +// Copyright 2018 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_INVALIDATION_IMPL_FAKE_SYSTEM_RESOURCES_H_ +#define COMPONENTS_INVALIDATION_IMPL_FAKE_SYSTEM_RESOURCES_H_ + +#include "google/cacheinvalidation/include/system-resources.h" +#include "google/cacheinvalidation/include/types.h" + +namespace invalidation { + +class Logger; +class NetworkChannel; +class Scheduler; +class Storage; +class SystemResources; + +class FakeSystemResources : public SystemResources { + public: + FakeSystemResources(std::unique_ptr<Logger> logger, + std::unique_ptr<NetworkChannel> network, + std::unique_ptr<Storage> storage, + const string& platform); + + ~FakeSystemResources() override; + + // Overrides from SystemResources. + void Start() override; + void Stop() override; + bool IsStarted() const override; + + Logger* logger() override; + Scheduler* internal_scheduler() override; + Scheduler* listener_scheduler() override; + NetworkChannel* network() override; + Storage* storage() override; + string platform() const override; + + private: + // Components comprising the system resources. We delegate calls to these as + // appropriate. + std::unique_ptr<Logger> logger_; + std::unique_ptr<NetworkChannel> network_; + std::unique_ptr<Storage> storage_; + + // Information about the client operating system/platform. + string platform_; + bool is_started_ = false; +}; + +} // namespace invalidation + +#endif // COMPONENTS_INVALIDATION_IMPL_FAKE_SYSTEM_RESOURCES_H_
diff --git a/components/invalidation/impl/per_user_topic_invalidation_client.cc b/components/invalidation/impl/per_user_topic_invalidation_client.cc new file mode 100644 index 0000000..5c340f37 --- /dev/null +++ b/components/invalidation/impl/per_user_topic_invalidation_client.cc
@@ -0,0 +1,57 @@ +// Copyright 2018 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/invalidation/impl/per_user_topic_invalidation_client.h" + +#include "base/bind.h" +#include "google/cacheinvalidation/deps/callback.h" +#include "google/cacheinvalidation/impl/log-macro.h" +#include "google/cacheinvalidation/include/invalidation-listener.h" + +namespace invalidation { + +PerUserTopicInvalidationClient::PerUserTopicInvalidationClient( + SystemResources* resources, + InvalidationListener* listener) + : resources_(resources), listener_(listener) { + RegisterWithNetwork(resources_); + TLOG(logger(), INFO, "Created client"); +} + +PerUserTopicInvalidationClient::~PerUserTopicInvalidationClient() {} + +void PerUserTopicInvalidationClient::RegisterWithNetwork( + SystemResources* resources) { + // Install ourselves as a receiver for server messages. + resources->network()->SetMessageReceiver(NewPermanentCallback( + this, &PerUserTopicInvalidationClient::MessageReceiver)); +} + +void PerUserTopicInvalidationClient::Start() { + if (ticl_protocol_started_) { + TLOG(logger(), SEVERE, "Ignoring start call since already started"); + return; + } + + FinishStartingTiclAndInformListener(); +} + +void PerUserTopicInvalidationClient::Stop() { + TLOG(logger(), INFO, "Ticl being stopped"); + ticl_protocol_started_ = false; +} + +void PerUserTopicInvalidationClient::FinishStartingTiclAndInformListener() { + DCHECK(!ticl_protocol_started_); + ticl_protocol_started_ = true; + GetListener()->Ready(this); + GetListener()->ReissueRegistrations(this, "", 0); + TLOG(logger(), INFO, "Ticl started"); +} + +void PerUserTopicInvalidationClient::MessageReceiver(string message) { + // TODO(melandory): Here message should be passed to the protocol handler. +} + +} // namespace invalidation
diff --git a/components/invalidation/impl/per_user_topic_invalidation_client.h b/components/invalidation/impl/per_user_topic_invalidation_client.h new file mode 100644 index 0000000..45eac3a --- /dev/null +++ b/components/invalidation/impl/per_user_topic_invalidation_client.h
@@ -0,0 +1,69 @@ +// Copyright 2018 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_INVALIDATION_IMPL_PER_USER_TOPIC_INVALIDATION_CLIENT_H_ +#define COMPONENTS_INVALIDATION_IMPL_PER_USER_TOPIC_INVALIDATION_CLIENT_H_ + +#include <string> +#include <utility> + +#include "base/macros.h" +#include "google/cacheinvalidation/include/invalidation-client.h" +#include "google/cacheinvalidation/include/system-resources.h" +#include "google/cacheinvalidation/include/types.h" + +namespace invalidation { + +class InvalidationListener; +class Logger; + +class PerUserTopicInvalidationClient : public InvalidationClient { + public: + PerUserTopicInvalidationClient(SystemResources* resources, + InvalidationListener* listener); + + ~PerUserTopicInvalidationClient() override; + + /* Returns true iff the client is currently started. */ + bool IsStartedForTest() { return ticl_protocol_started_; } + + // InvalidationClient implementation + void Start() override; + void Stop() override; + void Register(const ObjectId& object_id) override {} + void Unregister(const ObjectId& object_id) override {} + void Register(const vector<ObjectId>& object_ids) override {} + void Unregister(const vector<ObjectId>& object_ids) override {} + void Acknowledge(const AckHandle& ack_handle) override {} + + private: + InvalidationListener* GetListener() { return listener_; } + Logger* logger() { return resources_->logger(); } + + /* Handles the result of a request to read from persistent storage. */ + void ReadCallback(std::pair<Status, std::string> read_result); + + /* Finish starting the ticl and inform the listener that it is ready. */ + void FinishStartingTiclAndInformListener(); + + /* Registers a message receiver and status change listener on |resources|. */ + void RegisterWithNetwork(SystemResources* resources); + + /* Handles inbound messages from the network. */ + void MessageReceiver(std::string message); + + /* Resources for the Ticl. Owned by interface user */ + SystemResources* resources_; + + /* The state of the Ticl whether it has started or not. */ + bool ticl_protocol_started_ = false; + + InvalidationListener* listener_; + + DISALLOW_COPY_AND_ASSIGN(PerUserTopicInvalidationClient); +}; + +} // namespace invalidation + +#endif // COMPONENTS_INVALIDATION_IMPL_PER_USER_TOPIC_INVALIDATION_CLIENT_H_
diff --git a/components/invalidation/impl/per_user_topic_invalidation_client_unittest.cc b/components/invalidation/impl/per_user_topic_invalidation_client_unittest.cc new file mode 100644 index 0000000..9366a711 --- /dev/null +++ b/components/invalidation/impl/per_user_topic_invalidation_client_unittest.cc
@@ -0,0 +1,98 @@ +// Copyright 2018 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/invalidation/impl/per_user_topic_invalidation_client.h" + +#include "components/invalidation/impl/fake_logger.h" +#include "components/invalidation/impl/fake_system_resources.h" +#include "google/cacheinvalidation/deps/logging.h" +#include "google/cacheinvalidation/include/invalidation-listener.h" +#include "google/cacheinvalidation/include/types.h" +#include "testing/gmock/include/gmock/gmock.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace invalidation { + +class MockInvalidationListener : public InvalidationListener { + public: + MOCK_METHOD1(Ready, void(InvalidationClient*)); + MOCK_METHOD3(Invalidate, + void(InvalidationClient*, + const Invalidation&, + const AckHandle&)); + MOCK_METHOD3(InvalidateUnknownVersion, + void(InvalidationClient*, const ObjectId&, const AckHandle&)); + MOCK_METHOD2(InvalidateAll, void(InvalidationClient*, const AckHandle&)); + MOCK_METHOD3(InformRegistrationStatus, + void(InvalidationClient*, const ObjectId&, RegistrationState)); + MOCK_METHOD4(InformRegistrationFailure, + void(InvalidationClient*, const ObjectId&, bool, const string&)); + MOCK_METHOD3(ReissueRegistrations, + void(InvalidationClient*, const string&, int)); + MOCK_METHOD2(InformError, void(InvalidationClient*, const ErrorInfo&)); +}; + +// A mock of the Network interface. +class MockNetwork : public NetworkChannel { + public: + MOCK_METHOD1(SendMessage, void(const string&)); + MOCK_METHOD1(SetMessageReceiver, void(MessageCallback*)); + MOCK_METHOD1(AddNetworkStatusReceiver, void(NetworkStatusCallback*)); + MOCK_METHOD1(SetSystemResources, void(SystemResources*)); +}; + +// A mock of the Storage interface. +class MockStorage : public Storage { + public: + MOCK_METHOD3(WriteKey, void(const string&, const string&, WriteKeyCallback*)); + MOCK_METHOD2(ReadKey, void(const string&, ReadKeyCallback*)); + MOCK_METHOD2(DeleteKey, void(const string&, DeleteKeyCallback*)); + MOCK_METHOD1(ReadAllKeys, void(ReadAllKeysCallback*)); + MOCK_METHOD1(SetSystemResources, void(SystemResources*)); +}; + +// Tests the basic functionality of the invalidation client. +class InvalidationClientImplTest : public testing::Test { + public: + ~InvalidationClientImplTest() override {} + + // Performs setup for protocol handler unit tests, e.g. creating resource + // components and setting up common expectations for certain mock objects. + void SetUp() override { + InitSystemResources(); + client_ = std::make_unique<PerUserTopicInvalidationClient>(resources_.get(), + &listener_); + } + + void InitSystemResources() { + // Create the actual resources. + resources_ = std::make_unique<FakeSystemResources>( + std::make_unique<FakeLogger>(), std::make_unique<MockNetwork>(), + std::make_unique<MockStorage>(), "unit-test"); + } + + // The client being tested. Created fresh for each test function. + std::unique_ptr<InvalidationClient> client_; + + // A mock invalidation listener. + MockInvalidationListener listener_; + std::unique_ptr<FakeSystemResources> resources_; +}; + +// Starts the ticl and checks that appropriate calls are made on the listener +// and that a proper message is sent on the network. Test is disabled on ASAN +// because using callback mechanism from cacheinvalidations library introduces a +// leak. +#if defined(ADDRESS_SANITIZER) +#define MAYBE_Start DISABLED_Start +#else +#define MAYBE_Start Start +#endif +TEST_F(InvalidationClientImplTest, MAYBE_Start) { + // Expect the listener to indicate that it is ready. + EXPECT_CALL(listener_, Ready(testing::Eq(client_.get()))); + client_->Start(); +} + +} // namespace invalidation
diff --git a/components/omnibox/browser/BUILD.gn b/components/omnibox/browser/BUILD.gn index 5e27af2..1a6ce4f2 100644 --- a/components/omnibox/browser/BUILD.gn +++ b/components/omnibox/browser/BUILD.gn
@@ -30,6 +30,7 @@ "extension_app.icon", "http.icon", "keyword_search.icon", + "md_page.icon", "star.icon", "switch.icon", "tab.icon",
diff --git a/components/omnibox/browser/autocomplete_match.cc b/components/omnibox/browser/autocomplete_match.cc index 00fb3cdf..dabe282 100644 --- a/components/omnibox/browser/autocomplete_match.cc +++ b/components/omnibox/browser/autocomplete_match.cc
@@ -199,11 +199,16 @@ bool is_bookmark, bool is_tab_match) { #if (!defined(OS_ANDROID) || BUILDFLAG(ENABLE_VR)) && !defined(OS_IOS) + const bool is_refresh_ui = ui::MaterialDesignController::IsRefreshUi(); const bool is_touch_ui = ui::MaterialDesignController::IsTouchOptimizedUiEnabled(); - if (is_bookmark) - return is_touch_ui ? omnibox::kTouchableBookmarkIcon : omnibox::kStarIcon; + if (is_bookmark) { + if (is_refresh_ui || is_touch_ui) + return omnibox::kTouchableBookmarkIcon; + else + return omnibox::kStarIcon; + } switch (type) { case Type::URL_WHAT_YOU_TYPED: @@ -218,7 +223,12 @@ case Type::PHYSICAL_WEB_DEPRECATED: case Type::PHYSICAL_WEB_OVERFLOW_DEPRECATED: case Type::TAB_SEARCH_DEPRECATED: - return is_touch_ui ? omnibox::kTouchablePageIcon : omnibox::kHttpIcon; + if (is_refresh_ui) + return omnibox::kMdPageIcon; + else if (is_touch_ui) + return omnibox::kTouchablePageIcon; + else + return omnibox::kHttpIcon; case Type::SEARCH_WHAT_YOU_TYPED: case Type::SEARCH_HISTORY: @@ -229,8 +239,10 @@ case Type::SEARCH_OTHER_ENGINE: case Type::CONTACT_DEPRECATED: case Type::VOICE_SUGGEST: - return is_touch_ui ? omnibox::kTouchableSearchIcon - : vector_icons::kSearchIcon; + if (is_refresh_ui || is_touch_ui) + return omnibox::kTouchableSearchIcon; + else + return vector_icons::kSearchIcon; case Type::EXTENSION_APP_DEPRECATED: return omnibox::kExtensionAppIcon;
diff --git a/components/omnibox/browser/vector_icons/md_page.icon b/components/omnibox/browser/vector_icons/md_page.icon new file mode 100644 index 0000000..155b670 --- /dev/null +++ b/components/omnibox/browser/vector_icons/md_page.icon
@@ -0,0 +1,24 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +CANVAS_DIMENSIONS, 24, +MOVE_TO, 12, 2, +R_CUBIC_TO, 5.52f, 0, 10, 4.48f, 10, 10, +R_CUBIC_TO, 0, 5.52f, -4.48f, 10, -10, 10, +CUBIC_TO_SHORTHAND, 2, 17.52f, 2, 12, +CUBIC_TO_SHORTHAND, 6.48f, 2, 12, 2, +CLOSE, +MOVE_TO, 4, 12, +R_H_LINE_TO, 4.4f, +R_CUBIC_TO, 3.41f, 0.02f, 4.92f, 1.73f, 4.54f, 5.13f, +H_LINE_TO, 9.49f, +R_V_LINE_TO, 2.47f, +R_ARC_TO, 8, 8, 0, 0, 0, 10.5f, -8.08f, +CUBIC_TO, 19.33f, 12.5f, 18.33f, 13, 17, 13, +R_CUBIC_TO, -2.14f, 0, -3.21f, -0.92f, -3.21f, -2.75f, +R_H_LINE_TO, -3.75f, +R_CUBIC_TO, -0.27f, -2.73f, 0.68f, -4.09f, 2.87f, -4.09f, +R_CUBIC_TO, 0, -0.97f, 0.33f, -1.6f, 0.81f, -1.97f, +ARC_TO, 8, 8, 0, 0, 0, 4, 12, +CLOSE
diff --git a/components/payments/content/service_worker_payment_app_factory.cc b/components/payments/content/service_worker_payment_app_factory.cc index 7d3c347..78960240 100644 --- a/components/payments/content/service_worker_payment_app_factory.cc +++ b/components/payments/content/service_worker_payment_app_factory.cc
@@ -17,6 +17,7 @@ #include "components/payments/content/manifest_verifier.h" #include "components/payments/content/payment_manifest_web_data_service.h" #include "components/payments/content/utility/payment_manifest_parser.h" +#include "components/payments/core/features.h" #include "components/payments/core/payment_manifest_downloader.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" @@ -111,7 +112,9 @@ cache_ = cache; verifier_ = std::make_unique<ManifestVerifier>( web_contents, downloader_.get(), parser_.get(), cache_.get()); - if (may_crawl_for_installable_payment_apps) { + if (may_crawl_for_installable_payment_apps && + base::FeatureList::IsEnabled( + features::kWebPaymentsJustInTimePaymentApp)) { // Construct crawler in constructor to allow it observe the web_contents. crawler_ = std::make_unique<InstallablePaymentAppCrawler>( web_contents, downloader_.get(), parser_.get(), cache_.get());
diff --git a/components/payments/core/features.cc b/components/payments/core/features.cc index 73e143e..bda32a2f 100644 --- a/components/payments/core/features.cc +++ b/components/payments/core/features.cc
@@ -29,5 +29,7 @@ "WebPaymentsSingleAppUiSkip", base::FEATURE_DISABLED_BY_DEFAULT}; #endif +const base::Feature kWebPaymentsJustInTimePaymentApp{ + "WebPaymentsJustInTimePaymentApp", base::FEATURE_DISABLED_BY_DEFAULT}; } // namespace features } // namespace payments
diff --git a/components/payments/core/features.h b/components/payments/core/features.h index fe66a9f..279475c 100644 --- a/components/payments/core/features.h +++ b/components/payments/core/features.h
@@ -31,6 +31,9 @@ // with a single URL based payment app and no other info requested. extern const base::Feature kWebPaymentsSingleAppUiSkip; +// Used to control whether allow crawling just-in-time installable payment app. +extern const base::Feature kWebPaymentsJustInTimePaymentApp; + } // namespace features } // namespace payments
diff --git a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java index 834489d..1c09b377 100644 --- a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java +++ b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiBridge.java
@@ -48,20 +48,10 @@ } boolean initSuccesssful = handler.init(new SafeBrowsingApiHandler.Observer() { - // TODO(vakh): Temporary to avoid breaking downstream. Remove after updating the - // downstream code in issue 851587 @Override public void onUrlCheckDone( long callbackId, int resultStatus, String metadata, long checkDelta) { - nativeOnUrlCheckDone(callbackId, resultStatus, metadata, checkDelta, - 0 /* internalErrorStatusCode */); - } - - @Override - public void onUrlCheckDone(long callbackId, int resultStatus, String metadata, - long checkDelta, int internalErrorStatusCode) { - nativeOnUrlCheckDone(callbackId, resultStatus, metadata, checkDelta, - internalErrorStatusCode); + nativeOnUrlCheckDone(callbackId, resultStatus, metadata, checkDelta); } }); return initSuccesssful ? handler : null; @@ -77,6 +67,6 @@ Log.d(TAG, "Done starting request"); } - private static native void nativeOnUrlCheckDone(long callbackId, int resultStatus, - String metadata, long checkDelta, int internalErrorStatusCode); + private static native void nativeOnUrlCheckDone( + long callbackId, int resultStatus, String metadata, long checkDelta); }
diff --git a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java index fff4861..232db47 100644 --- a/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java +++ b/components/safe_browsing/android/java/src/org/chromium/components/safe_browsing/SafeBrowsingApiHandler.java
@@ -20,16 +20,9 @@ * Observer to be notified when the SafeBrowsingApiHandler determines the verdict for a url. */ public interface Observer { - // TODO(vakh): Remove this after updating the downstream code. // Note: |checkDelta| is the time the remote call took in microseconds. void onUrlCheckDone(long callbackId, @SafeBrowsingResult int resultStatus, String metadata, long checkDelta); - - // Note: |checkDelta| is the time the remote call took in microseconds, - // |internalErrorStatusCode| is the |SafetyNetStatusCode| for when there's an internal error - // and is undefined otherwise. - void onUrlCheckDone(long callbackId, @SafeBrowsingResult int resultStatus, String metadata, - long checkDelta, int internalErrorStatusCode); } // Possible values for resultStatus. Native side has the same definitions.
diff --git a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc index 71551af..e18eaa4 100644 --- a/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc +++ b/components/safe_browsing/android/safe_browsing_api_handler_bridge.cc
@@ -46,12 +46,6 @@ safe_browsing::UMA_STATUS_MAX_VALUE); } -void ReportInternalErrorStatusCode( - safe_browsing::InternalErrorStatusCode code) { - UMA_HISTOGRAM_ENUMERATION("SB2.RemoteCall.InternalErrorStatusCode", code, - safe_browsing::IESC_MAX_VALUE); -} - // Convert a SBThreatType to a Java threat type. We only support a few. int SBThreatTypeToJavaThreatType(const SBThreatType& sb_threat_type) { switch (sb_threat_type) { @@ -98,8 +92,7 @@ jlong callback_id, jint result_status, const JavaParamRef<jstring>& metadata, - jlong check_delta, - jint internal_error_status_code) { + jlong check_delta) { DCHECK(callback_id); UMA_HISTOGRAM_COUNTS_10M("SB2.RemoteCall.CheckDelta", check_delta); @@ -125,8 +118,6 @@ } else { DCHECK_EQ(result_status, RESULT_STATUS_INTERNAL_ERROR); ReportUmaResult(UMA_STATUS_INTERNAL_ERROR); - ReportInternalErrorStatusCode( - static_cast<InternalErrorStatusCode>(internal_error_status_code)); } RunCallbackOnIOThread(std::move(callback), SB_THREAT_TYPE_SAFE, ThreatMetadata());
diff --git a/components/safe_browsing/android/safe_browsing_api_handler_util.h b/components/safe_browsing/android/safe_browsing_api_handler_util.h index e0e126a..5c7e28c 100644 --- a/components/safe_browsing/android/safe_browsing_api_handler_util.h +++ b/components/safe_browsing/android/safe_browsing_api_handler_util.h
@@ -44,19 +44,6 @@ UMA_STATUS_MAX_VALUE }; -// Do not reorder or delete entries, and make sure changes here are reflected -// in SafeBrowsingRemoteInternalErrorStatusCode histogram enum. -// A similar enum exists in the internal ApiHandler in java and must be kept -// in sync. -enum InternalErrorStatusCode { - IESC_UNEXPECTED = 0, - IESC_UNSUPPORTED_THREAT_TYPES = 1, - IESC_MISSING_API_KEY = 2, - IESC_API_NOT_AVAILABLE = 3, - IESC_API_NOT_INITIALIZED = 4, - IESC_MAX_VALUE -}; - // This parses the JSON from the GMSCore API and then: // 1) Picks the most severe threat type // 2) Parses that threat's key/value pairs into the metadata struct.
diff --git a/components/viz/service/display/dc_layer_overlay.cc b/components/viz/service/display/dc_layer_overlay.cc index 78eb693..ca087f2 100644 --- a/components/viz/service/display/dc_layer_overlay.cc +++ b/components/viz/service/display/dc_layer_overlay.cc
@@ -32,6 +32,9 @@ dc_layer_overlay->color_space = quad->video_color_space; dc_layer_overlay->require_overlay = quad->require_overlay; dc_layer_overlay->is_protected_video = quad->is_protected_video; + if (dc_layer_overlay->is_protected_video) + DCHECK(dc_layer_overlay->require_overlay); + return DCLayerOverlayProcessor::DC_LAYER_SUCCESS; } @@ -305,7 +308,8 @@ // our damage calculations will be wrong otherwise. // TODO(magchen): Collect all overlay candidates, and filter the list at the // end to find the best candidates (largest size?). - if (is_root && !processed_overlay_in_frame_ && + if (is_root && + (!processed_overlay_in_frame_ || dc_layer.is_protected_video) && ProcessForOverlay(display_rect, quad_list, quad_rectangle, occlusion_bounding_box, &it, damage_rect)) { // ProcessForOverlay makes the iterator point to the next value on
diff --git a/content/browser/child_process_launcher_helper_android.cc b/content/browser/child_process_launcher_helper_android.cc index 0b954f1f..a3e3cd7 100644 --- a/content/browser/child_process_launcher_helper_android.cc +++ b/content/browser/child_process_launcher_helper_android.cc
@@ -155,24 +155,17 @@ const ChildProcessLauncherHelper::Process& process, bool known_dead) { ChildProcessTerminationInfo info; - info.binding_state = base::android::ChildBindingState::UNBOUND; - if (java_peer_avaiable_on_client_thread_) { - int binding_state = - Java_ChildProcessLauncherHelperImpl_bindingStateCurrentOrWhenDied( - AttachCurrentThread(), java_peer_); - info.binding_state = - static_cast<base::android::ChildBindingState>(binding_state); - } - info.was_killed_intentionally_by_browser = - java_peer_avaiable_on_client_thread_ && - Java_ChildProcessLauncherHelperImpl_isKilledByUs(AttachCurrentThread(), - java_peer_); + if (!java_peer_avaiable_on_client_thread_) + return info; + + Java_ChildProcessLauncherHelperImpl_getTerminationInfo( + AttachCurrentThread(), java_peer_, reinterpret_cast<intptr_t>(&info)); + + base::android::ApplicationState app_state = + base::android::ApplicationStatusListener::GetState(); bool app_foreground = - java_peer_avaiable_on_client_thread_ && - (base::android::ApplicationStatusListener::GetState() == - base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES || - base::android::ApplicationStatusListener::GetState() == - base::android::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES); + app_state == base::android::APPLICATION_STATE_HAS_RUNNING_ACTIVITIES || + app_state == base::android::APPLICATION_STATE_HAS_PAUSED_ACTIVITIES; if (app_foreground && (info.binding_state == base::android::ChildBindingState::MODERATE || @@ -186,6 +179,19 @@ return info; } +static void JNI_ChildProcessLauncherHelperImpl_SetTerminationInfo( + JNIEnv* env, + const JavaParamRef<jclass>&, + jlong termination_info_ptr, + jint binding_state, + jboolean killed_by_us) { + ChildProcessTerminationInfo* info = + reinterpret_cast<ChildProcessTerminationInfo*>(termination_info_ptr); + info->binding_state = + static_cast<base::android::ChildBindingState>(binding_state); + info->was_killed_intentionally_by_browser = killed_by_us; +} + // static bool ChildProcessLauncherHelper::TerminateProcess(const base::Process& process, int exit_code) {
diff --git a/content/browser/devtools/README.md b/content/browser/devtools/README.md new file mode 100644 index 0000000..e031518 --- /dev/null +++ b/content/browser/devtools/README.md
@@ -0,0 +1,3 @@ +# Chrome DevTools Protocol + +Contributing to Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing).
diff --git a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc index a51856e..7a013afb 100644 --- a/content/browser/dom_storage/local_storage_context_mojo_unittest.cc +++ b/content/browser/dom_storage/local_storage_context_mojo_unittest.cc
@@ -766,7 +766,7 @@ run_loop.Run(); EXPECT_TRUE(success); area.reset(); - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); } bool DoTestGet(LocalStorageContextMojo* context, @@ -825,7 +825,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); // Should not have created any files. EXPECT_TRUE(FirstEntryInDir().empty()); @@ -856,7 +856,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); // Should not have created any files. EXPECT_TRUE(FirstEntryInDir().empty()); @@ -877,7 +877,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); // Should have created files. EXPECT_EQ(test_path, FirstEntryInDir().BaseName()); @@ -908,7 +908,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); { // Mess up version number in database. @@ -933,7 +933,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); // Data should have been preserved now. context = new LocalStorageContextMojo(base::ThreadTaskRunnerHandle::Get(), @@ -961,9 +961,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); - // Also flush Task Scheduler tasks to make sure the leveldb is fully closed. - content::RunAllTasksUntilIdle(); + RunUntilIdle(); // Delete manifest files to mess up opening DB. base::FilePath db_path = @@ -986,7 +984,7 @@ context->ShutdownAndDelete(); context = nullptr; - base::RunLoop().RunUntilIdle(); + RunUntilIdle(); // Data should have been preserved now. context = new LocalStorageContextMojo(base::ThreadTaskRunnerHandle::Get(),
diff --git a/content/browser/dom_storage/test/mojo_test_with_file_service.h b/content/browser/dom_storage/test/mojo_test_with_file_service.h index ab71258..baff122c 100644 --- a/content/browser/dom_storage/test/mojo_test_with_file_service.h +++ b/content/browser/dom_storage/test/mojo_test_with_file_service.h
@@ -34,6 +34,8 @@ service_manager::Connector* connector() const { return connector_.get(); } + void RunUntilIdle() { scoped_task_environment_.RunUntilIdle(); } + private: base::test::ScopedTaskEnvironment scoped_task_environment_; std::unique_ptr<service_manager::TestConnectorFactory> test_connector_;
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc index e1ba9b5..214f5e3 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.cc +++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -266,12 +266,20 @@ NOTIMPLEMENTED(); } -bool RenderWidgetHostViewAndroid::SynchronizeVisualProperties() { +bool RenderWidgetHostViewAndroid::SynchronizeVisualProperties( + const cc::DeadlinePolicy& deadline_policy, + const base::Optional<viz::LocalSurfaceId>& + child_allocated_local_surface_id) { + if (child_allocated_local_surface_id) { + local_surface_id_allocator_.UpdateFromChild( + *child_allocated_local_surface_id); + } else { + local_surface_id_allocator_.GenerateId(); + } if (delegated_frame_host_) { delegated_frame_host_->EmbedSurface( - local_surface_id_allocator_.GenerateId(), - GetCompositorViewportPixelSize(), - cc::DeadlinePolicy::UseDefaultDeadline()); + local_surface_id_allocator_.GetCurrentLocalSurfaceId(), + GetCompositorViewportPixelSize(), deadline_policy); // TODO(ericrk): This can be removed once surface synchronization is // enabled. https://crbug.com/835102 @@ -506,11 +514,6 @@ RenderWidgetHostViewBase* updated_view) { DCHECK_EQ(text_input_manager_, text_input_manager); - // TODO(asimjour): remove the flag and fix text selection popup for - // virtual reality mode. - if (is_in_vr_) - return; - if (!selection_popup_controller_) return; @@ -819,7 +822,8 @@ void RenderWidgetHostViewAndroid::EnsureSurfaceSynchronizedForLayoutTest() { ++latest_capture_sequence_number_; - SynchronizeVisualProperties(); + SynchronizeVisualProperties(cc::DeadlinePolicy::UseInfiniteDeadline(), + base::nullopt); } uint32_t RenderWidgetHostViewAndroid::GetCaptureSequenceNumber() const { @@ -951,7 +955,8 @@ } bool RenderWidgetHostViewAndroid::RequestRepaintForTesting() { - return SynchronizeVisualProperties(); + return SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } void RenderWidgetHostViewAndroid::SynchronousFrameMetadata( @@ -1268,12 +1273,8 @@ base::ScopedClosureRunner sync_visual_props_runner(base::BindOnce( base::IgnoreResult( &RenderWidgetHostViewAndroid::SynchronizeVisualProperties), - base::Unretained(this))); - - if (!local_surface_id_allocator_.UpdateFromChild( - metadata.local_surface_id.value_or(viz::LocalSurfaceId()))) { - return; - } + base::Unretained(this), cc::DeadlinePolicy::UseDefaultDeadline(), + metadata.local_surface_id)); if (!features::IsSurfaceSynchronizationEnabled()) return; @@ -1370,7 +1371,8 @@ if (delegated_frame_host_ && delegated_frame_host_->IsPrimarySurfaceEvicted()) { - SynchronizeVisualProperties(); + SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } host()->WasShown(false /* record_presentation_time */); @@ -1872,8 +1874,7 @@ handles_hidden_by_selection_ui_ == hide_handles) return; handles_hidden_by_selection_ui_ = hide_handles; - touch_selection_controller_->SetTemporarilyHidden( - handles_hidden_by_selection_ui_ || handles_hidden_by_stylus_); + SetTextHandlesHiddenInternal(); } base::Optional<SkColor> RenderWidgetHostViewAndroid::GetCachedBackgroundColor() @@ -1882,14 +1883,11 @@ } void RenderWidgetHostViewAndroid::SetIsInVR(bool is_in_vr) { + if (is_in_vr_ == is_in_vr) + return; is_in_vr_ = is_in_vr; - // TODO(crbug.com/779126): support touch selection handles in VR. - if (is_in_vr) { - touch_selection_controller_.reset(); - } else if (view_.parent()) { - touch_selection_controller_ = CreateSelectionController( - touch_selection_controller_client_manager_.get(), view_.parent()); - } + // TODO(crbug.com/851054): support touch selection handles in VR. + SetTextHandlesHiddenInternal(); if (is_in_vr_ && controls_initialized_) { // TODO(mthiesse, https://crbug.com/825765): See the TODO in @@ -1975,8 +1973,10 @@ if (is_showing_ && view_.GetWindowAndroid()) StartObservingRootWindow(); - if (resize) - SynchronizeVisualProperties(); + if (resize) { + SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); + } if (!touch_selection_controller_) { ui::TouchSelectionControllerClient* client = @@ -2067,7 +2067,8 @@ void RenderWidgetHostViewAndroid::OnPhysicalBackingSizeChanged() { EvictFrameIfNecessary(); - SynchronizeVisualProperties(); + SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } void RenderWidgetHostViewAndroid::OnRootWindowVisibilityChanged(bool visible) { @@ -2217,8 +2218,16 @@ if (!touch_selection_controller_ || handles_hidden_by_stylus_ == hide_handles) return; handles_hidden_by_stylus_ = hide_handles; + SetTextHandlesHiddenInternal(); +} + +void RenderWidgetHostViewAndroid::SetTextHandlesHiddenInternal() { + if (!touch_selection_controller_) + return; + // TODO(crbug.com/851054): support touch selection handles in VR. touch_selection_controller_->SetTemporarilyHidden( - handles_hidden_by_stylus_ || handles_hidden_by_selection_ui_); + is_in_vr_ || handles_hidden_by_stylus_ || + handles_hidden_by_selection_ui_); } void RenderWidgetHostViewAndroid::OnStylusSelectBegin(float x0, @@ -2344,7 +2353,8 @@ } void RenderWidgetHostViewAndroid::OnSynchronizedDisplayPropertiesChanged() { - SynchronizeVisualProperties(); + SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } base::Optional<SkColor> RenderWidgetHostViewAndroid::GetBackgroundColor() @@ -2358,8 +2368,16 @@ return; } - SynchronizeVisualProperties(); + if (is_first_navigation_) { + SynchronizeVisualProperties( + cc::DeadlinePolicy::UseExistingDeadline(), + local_surface_id_allocator_.GetCurrentLocalSurfaceId()); + } else { + SynchronizeVisualProperties(cc::DeadlinePolicy::UseExistingDeadline(), + base::nullopt); + } delegated_frame_host_->DidNavigate(); + is_first_navigation_ = false; } viz::ScopedSurfaceIdAllocator
diff --git a/content/browser/renderer_host/render_widget_host_view_android.h b/content/browser/renderer_host/render_widget_host_view_android.h index 1dff6cc..b8d3091 100644 --- a/content/browser/renderer_host/render_widget_host_view_android.h +++ b/content/browser/renderer_host/render_widget_host_view_android.h
@@ -292,7 +292,9 @@ void SetDoubleTapSupportEnabled(bool enabled); void SetMultiTouchZoomSupportEnabled(bool enabled); - bool SynchronizeVisualProperties(); + bool SynchronizeVisualProperties(const cc::DeadlinePolicy& deadline_policy, + const base::Optional<viz::LocalSurfaceId>& + child_allocated_local_surface_id); bool HasValidFrame() const; @@ -414,6 +416,7 @@ void LostFocusInternal(); void SetTextHandlesHiddenForStylus(bool hide_handles); + void SetTextHandlesHiddenInternal(); // The begin frame source being observed. Null if none. viz::BeginFrameSource* begin_frame_source_; @@ -507,6 +510,7 @@ uint32_t latest_capture_sequence_number_ = 0u; viz::ParentLocalSurfaceIdAllocator local_surface_id_allocator_; + bool is_first_navigation_ = true; base::WeakPtrFactory<RenderWidgetHostViewAndroid> weak_ptr_factory_;
diff --git a/content/browser/resources/histograms/histograms_internals.html b/content/browser/resources/histograms/histograms_internals.html index 5fd6ebfb7..16a22436 100644 --- a/content/browser/resources/histograms/histograms_internals.html +++ b/content/browser/resources/histograms/histograms_internals.html
@@ -9,7 +9,7 @@ <script src="chrome://resources/js/promise_resolver.js"></script> <script src="chrome://resources/js/util.js"></script> <script src="histograms_internals.js"></script> - <title>📊 About Histograms</title> + <title>Histograms</title> </head> <p>Stats accumulated from browser startup to previous page load; reload to get stats as of this page load. </p>
diff --git a/content/browser/web_contents/web_contents_android.cc b/content/browser/web_contents/web_contents_android.cc index 43bfc21..c98f421 100644 --- a/content/browser/web_contents/web_contents_android.cc +++ b/content/browser/web_contents/web_contents_android.cc
@@ -842,7 +842,8 @@ if (rwhva) { // |SendScreenRects()| indirectly calls GetViewSize() that asks Java layer. web_contents_->SendScreenRects(); - rwhva->SynchronizeVisualProperties(); + rwhva->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } }
diff --git a/content/browser/web_contents/web_contents_view_android.cc b/content/browser/web_contents/web_contents_view_android.cc index c331c552..16ce6c0 100644 --- a/content/browser/web_contents/web_contents_view_android.cc +++ b/content/browser/web_contents/web_contents_view_android.cc
@@ -590,7 +590,8 @@ auto* rwhv = GetRenderWidgetHostViewAndroid(); if (rwhv) { web_contents_->SendScreenRects(); - rwhv->SynchronizeVisualProperties(); + rwhv->SynchronizeVisualProperties(cc::DeadlinePolicy::UseDefaultDeadline(), + base::nullopt); } }
diff --git a/content/child/runtime_features.cc b/content/child/runtime_features.cc index 98fc1b71..879255b 100644 --- a/content/child/runtime_features.cc +++ b/content/child/runtime_features.cc
@@ -121,7 +121,8 @@ base::FeatureList::IsEnabled(features::kWebAssemblyStreaming)); WebRuntimeFeatures::EnableSharedArrayBuffer( - base::FeatureList::IsEnabled(features::kSharedArrayBuffer)); + base::FeatureList::IsEnabled(features::kSharedArrayBuffer) || + base::FeatureList::IsEnabled(features::kWebAssemblyThreads)); if (command_line.HasSwitch(switches::kDisableSharedWorkers)) WebRuntimeFeatures::EnableSharedWorker(false); @@ -317,6 +318,9 @@ if (base::FeatureList::IsEnabled(features::kCompositorTouchAction)) WebRuntimeFeatures::EnableCompositorTouchAction(true); + if (base::FeatureList::IsEnabled(features::kCSSFragmentIdentifiers)) + WebRuntimeFeatures::EnableCSSFragmentIdentifiers(true); + if (base::FeatureList::IsEnabled(features::kGenericSensor)) { WebRuntimeFeatures::EnableGenericSensor(true); if (base::FeatureList::IsEnabled(features::kGenericSensorExtraClasses))
diff --git a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java index 5e33cae..d5dd3bfe 100644 --- a/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java +++ b/content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncherHelperImpl.java
@@ -419,31 +419,15 @@ // Called on client (UI or IO) thread. @CalledByNative - private int bindingStateCurrentOrWhenDied() { + private void getTerminationInfo(long terminationInfoPtr) { ChildProcessConnection connection = mLauncher.getConnection(); // Here we are accessing the connection from a thread other than the launcher thread, but it // does not change once it's been set. So it is safe to test whether it's null here and // access it afterwards. - if (connection == null) { - return ChildBindingState.UNBOUND; - } + if (connection == null) return; - return connection.bindingStateCurrentOrWhenDied(); - } - - @CalledByNative - private boolean isKilledByUs() { - ChildProcessConnection connection = mLauncher.getConnection(); - // Here we are accessing the connection from a thread other than the launcher thread, but it - // does not change once it's been set. So it is safe to test whether it's null here and - // access it afterwards. - if (connection == null) { - return false; - } - - // We consider the process to be child protected if it has a strong or moderate binding and - // the app is in the foreground. - return connection.isKilledByUs(); + nativeSetTerminationInfo(terminationInfoPtr, connection.bindingStateCurrentOrWhenDied(), + connection.isKilledByUs()); } @CalledByNative @@ -666,4 +650,7 @@ public static ChildProcessConnection getWarmUpConnectionForTesting() { return sSpareSandboxedConnection == null ? null : sSpareSandboxedConnection.getConnection(); } + + private static native void nativeSetTerminationInfo( + long termiantionInfoPtr, @ChildBindingState int bindingState, boolean killedByUs); }
diff --git a/content/public/android/java/src/org/chromium/content/browser/WindowEventObserverManager.java b/content/public/android/java/src/org/chromium/content/browser/WindowEventObserverManager.java index f094a560..22ee0b7 100644 --- a/content/public/android/java/src/org/chromium/content/browser/WindowEventObserverManager.java +++ b/content/public/android/java/src/org/chromium/content/browser/WindowEventObserverManager.java
@@ -6,6 +6,7 @@ import android.content.res.Configuration; +import org.chromium.base.ActivityState; import org.chromium.base.ObserverList; import org.chromium.content.browser.webcontents.WebContentsImpl; import org.chromium.content_public.browser.WebContents; @@ -130,6 +131,12 @@ private void addActivityStateObserver() { if (!mAttachedToWindow || mWindowAndroid == null) return; mWindowAndroid.addActivityStateObserver(mViewEventSink); + // Sets the state of ViewEventSink right if activity is already in resumed state. + // Can happen when the front tab gets moved down in the stack while Chrome + // is in background. See https://crbug.com/852336. + if (mWindowAndroid.getActivityState() == ActivityState.RESUMED) { + mViewEventSink.onActivityResumed(); + } } private void addUiObservers() {
diff --git a/content/public/common/content_features.cc b/content/public/common/content_features.cc index 2a19c17..b7fd9a74 100644 --- a/content/public/common/content_features.cc +++ b/content/public/common/content_features.cc
@@ -110,6 +110,11 @@ const base::Feature kCrossSiteDocumentBlockingIfIsolating{ "CrossSiteDocumentBlockingIfIsolating", base::FEATURE_ENABLED_BY_DEFAULT}; +// Enables specification of a target element in the fragment identifier +// via a CSS selector. +const base::Feature kCSSFragmentIdentifiers{"CSSFragmentIdentifiers", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Puts save-data header in the holdback mode. This disables sending of // save-data header to origins, and to the renderer processes within Chrome. const base::Feature kDataSaverHoldback{"DataSaverHoldback", @@ -465,6 +470,11 @@ const base::Feature kWebAssemblyBaseline{"WebAssemblyBaseline", base::FEATURE_DISABLED_BY_DEFAULT}; +// Enable WebAssembly threads. +// https://github.com/WebAssembly/threads +const base::Feature kWebAssemblyThreads{"WebAssemblyThreads", + base::FEATURE_DISABLED_BY_DEFAULT}; + // Enable WebAssembly trap handler. const base::Feature kWebAssemblyTrapHandler{"WebAssemblyTrapHandler", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/content/public/common/content_features.h b/content/public/common/content_features.h index f4a38dd4..cab734e 100644 --- a/content/public/common/content_features.h +++ b/content/public/common/content_features.h
@@ -34,6 +34,7 @@ CONTENT_EXPORT extern const base::Feature kCompositorTouchAction; CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingAlways; CONTENT_EXPORT extern const base::Feature kCrossSiteDocumentBlockingIfIsolating; +CONTENT_EXPORT extern const base::Feature kCSSFragmentIdentifiers; CONTENT_EXPORT extern const base::Feature kDataSaverHoldback; CONTENT_EXPORT extern const base::Feature kExperimentalProductivityFeatures; CONTENT_EXPORT extern const base::Feature kExpensiveBackgroundTimerThrottling; @@ -112,6 +113,7 @@ CONTENT_EXPORT extern const base::Feature kWebAssembly; CONTENT_EXPORT extern const base::Feature kWebAssemblyStreaming; CONTENT_EXPORT extern const base::Feature kWebAssemblyBaseline; +CONTENT_EXPORT extern const base::Feature kWebAssemblyThreads; CONTENT_EXPORT extern const base::Feature kWebAssemblyTrapHandler; CONTENT_EXPORT extern const base::Feature kWebAuth; CONTENT_EXPORT extern const base::Feature kWebAuthBle;
diff --git a/content/renderer/media/stream/media_stream_audio_processor_options.cc b/content/renderer/media/stream/media_stream_audio_processor_options.cc index 4c471a4..04559e8 100644 --- a/content/renderer/media/stream/media_stream_audio_processor_options.cc +++ b/content/renderer/media/stream/media_stream_audio_processor_options.cc
@@ -271,8 +271,7 @@ void GetAudioProcessingStats( AudioProcessing* audio_processing, webrtc::AudioProcessorInterface::AudioProcessorStats* stats) { - // TODO(ivoc): Change the APM stats to use rtc::Optional instead of default - // values. + // TODO(ivoc): Change the APM stats to use optional instead of default values. auto apm_stats = audio_processing->GetStatistics(); stats->echo_return_loss = apm_stats.echo_return_loss.instant(); stats->echo_return_loss_enhancement =
diff --git a/content/renderer/media/stream/media_stream_constraints_util.cc b/content/renderer/media/stream/media_stream_constraints_util.cc index 52a4824e..e406f56 100644 --- a/content/renderer/media/stream/media_stream_constraints_util.cc +++ b/content/renderer/media/stream/media_stream_constraints_util.cc
@@ -235,16 +235,6 @@ return false; } -rtc::Optional<bool> ConstraintToOptional( - const blink::WebMediaConstraints& constraints, - const blink::BooleanConstraint blink::WebMediaTrackConstraintSet::*picker) { - bool value; - if (GetConstraintValueAsBoolean(constraints, picker, &value)) { - return rtc::Optional<bool>(value); - } - return rtc::Optional<bool>(); -} - std::string GetMediaStreamSource( const blink::WebMediaConstraints& constraints) { std::string source;
diff --git a/content/renderer/media/stream/media_stream_constraints_util.h b/content/renderer/media/stream/media_stream_constraints_util.h index 0e40d07..096ed08f 100644 --- a/content/renderer/media/stream/media_stream_constraints_util.h +++ b/content/renderer/media/stream/media_stream_constraints_util.h
@@ -16,7 +16,6 @@ #include "third_party/blink/public/platform/modules/mediastream/media_devices.mojom.h" #include "third_party/blink/public/platform/web_media_constraints.h" #include "third_party/blink/public/platform/web_media_stream_source.h" -#include "third_party/webrtc/api/optional.h" namespace content { @@ -287,10 +286,6 @@ const blink::StringConstraint blink::WebMediaTrackConstraintSet::*picker, std::string* value); -rtc::Optional<bool> ConstraintToOptional( - const blink::WebMediaConstraints& constraints, - const blink::BooleanConstraint blink::WebMediaTrackConstraintSet::*picker); - template <typename ConstraintType> bool ConstraintHasMax(const ConstraintType& constraint) { return constraint.HasMax() || constraint.HasExact();
diff --git a/content/renderer/media/stream/media_stream_constraints_util_video_content.h b/content/renderer/media/stream/media_stream_constraints_util_video_content.h index 75e9891..cbc9db71 100644 --- a/content/renderer/media/stream/media_stream_constraints_util_video_content.h +++ b/content/renderer/media/stream/media_stream_constraints_util_video_content.h
@@ -9,7 +9,6 @@ #include "content/common/content_export.h" #include "content/renderer/media/stream/media_stream_constraints_util.h" -#include "third_party/webrtc/api/optional.h" namespace blink { class WebMediaConstraints;
diff --git a/content/renderer/media/webrtc/audio_codec_factory.cc b/content/renderer/media/webrtc/audio_codec_factory.cc index be2d15a..73abab1 100644 --- a/content/renderer/media/webrtc/audio_codec_factory.cc +++ b/content/renderer/media/webrtc/audio_codec_factory.cc
@@ -28,7 +28,7 @@ template <typename T> struct NotAdvertisedEncoder { using Config = typename T::Config; - static rtc::Optional<Config> SdpToConfig( + static absl::optional<Config> SdpToConfig( const webrtc::SdpAudioFormat& audio_format) { return T::SdpToConfig(audio_format); } @@ -42,7 +42,7 @@ static std::unique_ptr<webrtc::AudioEncoder> MakeAudioEncoder( const Config& config, int payload_type, - rtc::Optional<webrtc::AudioCodecPairId> codec_pair_id) { + absl::optional<webrtc::AudioCodecPairId> codec_pair_id) { return T::MakeAudioEncoder(config, payload_type, codec_pair_id); } }; @@ -51,7 +51,7 @@ template <typename T> struct NotAdvertisedDecoder { using Config = typename T::Config; - static rtc::Optional<Config> SdpToConfig( + static absl::optional<Config> SdpToConfig( const webrtc::SdpAudioFormat& audio_format) { return T::SdpToConfig(audio_format); } @@ -61,7 +61,7 @@ } static std::unique_ptr<webrtc::AudioDecoder> MakeAudioDecoder( const Config& config, - rtc::Optional<webrtc::AudioCodecPairId> codec_pair_id) { + absl::optional<webrtc::AudioCodecPairId> codec_pair_id) { return T::MakeAudioDecoder(config, codec_pair_id); } };
diff --git a/content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc b/content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc index e03796d..5459c32 100644 --- a/content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc +++ b/content/renderer/media/webrtc/media_stream_video_webrtc_sink.cc
@@ -28,8 +28,8 @@ namespace { -rtc::Optional<bool> ToRtcOptionalBool(const base::Optional<bool>& value) { - return value ? rtc::Optional<bool>(*value) : rtc::Optional<bool>(); +absl::optional<bool> ToAbslOptionalBool(const base::Optional<bool>& value) { + return value ? absl::optional<bool>(*value) : absl::nullopt; } } // namespace @@ -39,7 +39,7 @@ public: WebRtcVideoSource(WebRtcVideoCapturerAdapter* capture_adapter, bool is_screencast, - rtc::Optional<bool> needs_denoising) + absl::optional<bool> needs_denoising) : VideoTrackSource(false), capture_adapter_(capture_adapter), is_screencast_(is_screencast), @@ -50,7 +50,7 @@ } bool is_screencast() const override { return is_screencast_; } - rtc::Optional<bool> needs_denoising() const override { + absl::optional<bool> needs_denoising() const override { return needs_denoising_; } @@ -62,7 +62,7 @@ private: std::unique_ptr<WebRtcVideoCapturerAdapter> const capture_adapter_; const bool is_screencast_; - const rtc::Optional<bool> needs_denoising_; + const absl::optional<bool> needs_denoising_; }; namespace { @@ -274,8 +274,8 @@ MediaStreamVideoTrack::GetVideoTrack(track); DCHECK(video_track); - rtc::Optional<bool> needs_denoising = - ToRtcOptionalBool(video_track->noise_reduction()); + absl::optional<bool> needs_denoising = + ToAbslOptionalBool(video_track->noise_reduction()); bool is_screencast = video_track->is_screencast(); base::Optional<double> min_frame_rate = video_track->min_frame_rate(); @@ -369,8 +369,8 @@ content::RequestRefreshFrameFromVideoTrack(connected_track()); } -rtc::Optional<bool> MediaStreamVideoWebRtcSink::SourceNeedsDenoisingForTesting() - const { +absl::optional<bool> +MediaStreamVideoWebRtcSink::SourceNeedsDenoisingForTesting() const { return video_source_->needs_denoising(); }
diff --git a/content/renderer/media/webrtc/media_stream_video_webrtc_sink.h b/content/renderer/media/webrtc/media_stream_video_webrtc_sink.h index 8ff0331..d803928 100644 --- a/content/renderer/media/webrtc/media_stream_video_webrtc_sink.h +++ b/content/renderer/media/webrtc/media_stream_video_webrtc_sink.h
@@ -43,7 +43,7 @@ return video_track_.get(); } - rtc::Optional<bool> SourceNeedsDenoisingForTesting() const; + absl::optional<bool> SourceNeedsDenoisingForTesting() const; protected: // Implementation of MediaStreamSink.
diff --git a/content/renderer/media/webrtc/rtc_certificate_generator.cc b/content/renderer/media/webrtc/rtc_certificate_generator.cc index 8eb3a817..4f5ff47 100644 --- a/content/renderer/media/webrtc/rtc_certificate_generator.cc +++ b/content/renderer/media/webrtc/rtc_certificate_generator.cc
@@ -39,7 +39,7 @@ } // A certificate generation request spawned by -// |RTCCertificateGenerator::generateCertificateWithOptionalExpiration|. This +// |GenerateCertificateWithOptionalExpiration|. This // is handled by a separate class so that reference counting can keep the // request alive independently of the |RTCCertificateGenerator| that spawned it. class RTCCertificateGeneratorRequest @@ -60,7 +60,7 @@ void GenerateCertificateAsync( const blink::WebRTCKeyParams& key_params, - const rtc::Optional<uint64_t>& expires_ms, + const absl::optional<uint64_t>& expires_ms, std::unique_ptr<blink::WebRTCCertificateCallback> observer) { DCHECK(main_thread_->BelongsToCurrentThread()); DCHECK(observer); @@ -80,7 +80,7 @@ void GenerateCertificateOnWorkerThread( const blink::WebRTCKeyParams key_params, - const rtc::Optional<uint64_t> expires_ms, + const absl::optional<uint64_t> expires_ms, CertificateCallbackPtr observer) { DCHECK(worker_thread_->BelongsToCurrentThread()); @@ -114,32 +114,12 @@ const scoped_refptr<base::SingleThreadTaskRunner> worker_thread_; }; -} // namespace - -void RTCCertificateGenerator::GenerateCertificate( +void GenerateCertificateWithOptionalExpiration( const blink::WebRTCKeyParams& key_params, + const absl::optional<uint64_t>& expires_ms, std::unique_ptr<blink::WebRTCCertificateCallback> observer, scoped_refptr<base::SingleThreadTaskRunner> task_runner) { - generateCertificateWithOptionalExpiration( - key_params, rtc::Optional<uint64_t>(), std::move(observer), task_runner); -} - -void RTCCertificateGenerator::GenerateCertificateWithExpiration( - const blink::WebRTCKeyParams& key_params, - uint64_t expires_ms, - std::unique_ptr<blink::WebRTCCertificateCallback> observer, - scoped_refptr<base::SingleThreadTaskRunner> task_runner) { - generateCertificateWithOptionalExpiration(key_params, - rtc::Optional<uint64_t>(expires_ms), - std::move(observer), task_runner); -} - -void RTCCertificateGenerator::generateCertificateWithOptionalExpiration( - const blink::WebRTCKeyParams& key_params, - const rtc::Optional<uint64_t>& expires_ms, - std::unique_ptr<blink::WebRTCCertificateCallback> observer, - scoped_refptr<base::SingleThreadTaskRunner> task_runner) { - DCHECK(IsSupportedKeyParams(key_params)); + DCHECK(WebRTCKeyParamsToKeyParams(key_params).IsValid()); PeerConnectionDependencyFactory* pc_dependency_factory = RenderThreadImpl::current()->GetPeerConnectionDependencyFactory(); pc_dependency_factory->EnsureInitialized(); @@ -147,8 +127,27 @@ scoped_refptr<RTCCertificateGeneratorRequest> request = new RTCCertificateGeneratorRequest( task_runner, pc_dependency_factory->GetWebRtcWorkerThread()); - request->GenerateCertificateAsync( - key_params, expires_ms, std::move(observer)); + request->GenerateCertificateAsync(key_params, expires_ms, + std::move(observer)); +} + +} // namespace + +void RTCCertificateGenerator::GenerateCertificate( + const blink::WebRTCKeyParams& key_params, + std::unique_ptr<blink::WebRTCCertificateCallback> observer, + scoped_refptr<base::SingleThreadTaskRunner> task_runner) { + GenerateCertificateWithOptionalExpiration(key_params, absl::nullopt, + std::move(observer), task_runner); +} + +void RTCCertificateGenerator::GenerateCertificateWithExpiration( + const blink::WebRTCKeyParams& key_params, + uint64_t expires_ms, + std::unique_ptr<blink::WebRTCCertificateCallback> observer, + scoped_refptr<base::SingleThreadTaskRunner> task_runner) { + GenerateCertificateWithOptionalExpiration(key_params, expires_ms, + std::move(observer), task_runner); } bool RTCCertificateGenerator::IsSupportedKeyParams(
diff --git a/content/renderer/media/webrtc/rtc_certificate_generator.h b/content/renderer/media/webrtc/rtc_certificate_generator.h index 248cd218..5e29c7f 100644 --- a/content/renderer/media/webrtc/rtc_certificate_generator.h +++ b/content/renderer/media/webrtc/rtc_certificate_generator.h
@@ -10,7 +10,6 @@ #include "third_party/blink/public/platform/web_rtc_certificate.h" #include "third_party/blink/public/platform/web_rtc_certificate_generator.h" #include "third_party/blink/public/platform/web_rtc_key_params.h" -#include "third_party/webrtc/api/optional.h" namespace content { @@ -38,12 +37,6 @@ blink::WebString pem_certificate) override; private: - void generateCertificateWithOptionalExpiration( - const blink::WebRTCKeyParams& key_params, - const rtc::Optional<uint64_t>& expires_ms, - std::unique_ptr<blink::WebRTCCertificateCallback> observer, - scoped_refptr<base::SingleThreadTaskRunner> task_runner); - DISALLOW_COPY_AND_ASSIGN(RTCCertificateGenerator); };
diff --git a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc index a7fc7287..bd8ee437 100644 --- a/content/renderer/media/webrtc/rtc_peer_connection_handler.cc +++ b/content/renderer/media/webrtc/rtc_peer_connection_handler.cc
@@ -255,6 +255,16 @@ webrtc_config->ice_candidate_pool_size = blink_config.ice_candidate_pool_size; } +absl::optional<bool> ConstraintToOptional( + const blink::WebMediaConstraints& constraints, + const blink::BooleanConstraint blink::WebMediaTrackConstraintSet::*picker) { + bool value; + if (GetConstraintValueAsBoolean(constraints, picker, &value)) { + return absl::optional<bool>(value); + } + return absl::nullopt; +} + void CopyConstraintsIntoRtcConfiguration( const blink::WebMediaConstraints constraints, webrtc::PeerConnectionInterface::RTCConfiguration* configuration) { @@ -305,7 +315,7 @@ constraints, &blink::WebMediaTrackConstraintSet::goog_screencast_min_bitrate, &rate)) { - configuration->screencast_min_bitrate = rtc::Optional<int>(rate); + configuration->screencast_min_bitrate = rate; } configuration->combined_audio_video_bwe = ConstraintToOptional( constraints,
diff --git a/content/renderer/media/webrtc/rtc_video_encoder_factory.cc b/content/renderer/media/webrtc/rtc_video_encoder_factory.cc index 3307c40..7b89e610 100644 --- a/content/renderer/media/webrtc/rtc_video_encoder_factory.cc +++ b/content/renderer/media/webrtc/rtc_video_encoder_factory.cc
@@ -73,7 +73,7 @@ const int fps = profile.max_framerate_numerator; DCHECK_EQ(1u, profile.max_framerate_denominator); - const rtc::Optional<webrtc::H264::Level> h264_level = + const absl::optional<webrtc::H264::Level> h264_level = webrtc::H264::SupportedLevel(width * height, fps); const webrtc::H264::ProfileLevelId profile_level_id( h264_profile, h264_level.value_or(webrtc::H264::kLevel1));
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc index 729652bb..c18e10cf 100644 --- a/content/renderer/render_process_impl.cc +++ b/content/renderer/render_process_impl.cc
@@ -138,8 +138,6 @@ "--harmony-import-meta"); SetV8FlagIfFeature(features::kAsmJsToWebAssembly, "--validate-asm"); SetV8FlagIfNotFeature(features::kAsmJsToWebAssembly, "--no-validate-asm"); - SetV8FlagIfNotFeature(features::kWebAssembly, - "--wasm-disable-structured-cloning"); SetV8FlagIfFeature(features::kV8Orinoco, "--no-single-threaded-gc"); SetV8FlagIfNotFeature(features::kV8Orinoco, "--single-threaded-gc"); @@ -150,10 +148,21 @@ SetV8FlagIfFeature(features::kWebAssemblyBaseline, "--wasm-tier-up"); SetV8FlagIfNotFeature(features::kWebAssemblyBaseline, "--no-wasm-tier-up"); - SetV8FlagIfFeature(features::kSharedArrayBuffer, - "--harmony-sharedarraybuffer"); - SetV8FlagIfNotFeature(features::kSharedArrayBuffer, - "--no-harmony-sharedarraybuffer"); + if (base::FeatureList::IsEnabled(features::kWebAssemblyThreads)) { + constexpr char kFlags[] = + "--harmony-sharedarraybuffer " + "--no-wasm-disable-structured-cloning " + "--experimental-wasm-threads"; + + v8::V8::SetFlagsFromString(kFlags, sizeof(kFlags)); + } else { + SetV8FlagIfNotFeature(features::kWebAssembly, + "--wasm-disable-structured-cloning"); + SetV8FlagIfFeature(features::kSharedArrayBuffer, + "--harmony-sharedarraybuffer"); + SetV8FlagIfNotFeature(features::kSharedArrayBuffer, + "--no-harmony-sharedarraybuffer"); + } SetV8FlagIfNotFeature(features::kWebAssemblyTrapHandler, "--no-wasm-trap-handler");
diff --git a/docs/security/sheriff.md b/docs/security/sheriff.md index 925c1ac..8dd807e 100644 --- a/docs/security/sheriff.md +++ b/docs/security/sheriff.md
@@ -67,6 +67,7 @@ close. Make sure to read bug comments where developer might point out that it needs more CLs, et c. Wait 24 hours before closing ClusterFuzz bugs, to give ClusterFuzz a chance to close it automatically. + * [Starting point](https://bugs.chromium.org/p/chromium/issues/list?can=2&q=Type%3D%22Bug-Security%22+%22Change-Id:%22) * Look at open security bug reports and check that progress is occurring. * Generally keep an eye on all bug traffic in case anything needs action or replying to.
diff --git a/gpu/command_buffer/client/cmd_buffer_helper.cc b/gpu/command_buffer/client/cmd_buffer_helper.cc index b0718114..8d348121 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper.cc
@@ -125,8 +125,10 @@ void CommandBufferHelper::FreeRingBuffer() { if (HaveRingBuffer()) { - FlushLazy(); + OrderingBarrier(); command_buffer_->DestroyTransferBuffer(ring_buffer_id_); + // SetGetBuffer is an IPC, so previous work needs to be flushed first. + Flush(); SetGetBuffer(-1, nullptr); } }
diff --git a/gpu/command_buffer/client/cmd_buffer_helper_test.cc b/gpu/command_buffer/client/cmd_buffer_helper_test.cc index 389b625..aa20eaa 100644 --- a/gpu/command_buffer/client/cmd_buffer_helper_test.cc +++ b/gpu/command_buffer/client/cmd_buffer_helper_test.cc
@@ -629,8 +629,8 @@ helper_->FreeRingBuffer(); EXPECT_FALSE(helper_->HaveRingBuffer()); - // FreeRingBuffer should have caused a flush. - EXPECT_EQ(command_buffer_->FlushCount(), old_flush_count + 1); + // FreeRingBuffer should have caused an ordering barrier and a flush. + EXPECT_EQ(command_buffer_->FlushCount(), old_flush_count + 2); // However it shouldn't force a finish. EXPECT_EQ(command_buffer_->GetLastState().get_offset, old_get_offset); @@ -638,7 +638,7 @@ // should work. helper_->Finish(); EXPECT_FALSE(helper_->HaveRingBuffer()); - EXPECT_EQ(command_buffer_->FlushCount(), old_flush_count + 1); + EXPECT_EQ(command_buffer_->FlushCount(), old_flush_count + 2); EXPECT_EQ(command_buffer_->GetLastState().get_offset, helper_->GetPutOffsetForTest()); }
diff --git a/gpu/command_buffer/client/mapped_memory.cc b/gpu/command_buffer/client/mapped_memory.cc index 053c551e..16ac761 100644 --- a/gpu/command_buffer/client/mapped_memory.cc +++ b/gpu/command_buffer/client/mapped_memory.cc
@@ -53,7 +53,7 @@ } MappedMemoryManager::~MappedMemoryManager() { - helper_->FlushLazy(); + helper_->OrderingBarrier(); CommandBuffer* cmd_buf = helper_->command_buffer(); for (auto& chunk : chunks_) { cmd_buf->DestroyTransferBuffer(chunk->shm_id()); @@ -152,7 +152,7 @@ chunk->FreeUnused(); if (chunk->bytes_in_use() == 0u) { if (chunk->InUseOrFreePending()) - helper_->FlushLazy(); + helper_->OrderingBarrier(); cmd_buf->DestroyTransferBuffer(chunk->shm_id()); allocated_memory_ -= chunk->GetSize(); iter = chunks_.erase(iter);
diff --git a/gpu/command_buffer/client/transfer_buffer.cc b/gpu/command_buffer/client/transfer_buffer.cc index 015c38c7..d8b1feb 100644 --- a/gpu/command_buffer/client/transfer_buffer.cc +++ b/gpu/command_buffer/client/transfer_buffer.cc
@@ -65,7 +65,7 @@ void TransferBuffer::Free() { if (HaveBuffer()) { TRACE_EVENT0("gpu", "TransferBuffer::Free"); - helper_->FlushLazy(); + helper_->OrderingBarrier(); helper_->command_buffer()->DestroyTransferBuffer(buffer_id_); buffer_id_ = -1; buffer_ = NULL;
diff --git a/gpu/command_buffer/client/transfer_buffer_unittest.cc b/gpu/command_buffer/client/transfer_buffer_unittest.cc index 0a08b07..92a0d3b 100644 --- a/gpu/command_buffer/client/transfer_buffer_unittest.cc +++ b/gpu/command_buffer/client/transfer_buffer_unittest.cc
@@ -86,8 +86,8 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); - EXPECT_CALL(*command_buffer(), OnFlush()).Times(AtMost(1)); EXPECT_CALL(*command_buffer(), Flush(_)).Times(AtMost(1)); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)).Times(AtMost(2)); transfer_buffer_.reset(); } @@ -122,6 +122,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -137,6 +140,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -153,6 +159,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -170,8 +179,8 @@ int32_t put_offset = helper_->GetPutOffsetForTest(); transfer_buffer_->FreePendingToken(data, token); - // Free buffer. Should cause a Flush. - EXPECT_CALL(*command_buffer(), Flush(_)).Times(AtMost(1)); + // Free buffer. Should cause an ordering barrier. + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)).Times(AtMost(1)); EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); @@ -180,9 +189,7 @@ EXPECT_FALSE(transfer_buffer_->HaveBuffer()); EXPECT_EQ(base::UnguessableToken(), transfer_buffer_->shared_memory_handle().GetGUID()); - // Free should have flushed. - EXPECT_EQ(put_offset, command_buffer_->GetServicePutOffset()); - // However it shouldn't have caused a finish. + // Free should not have caused a finish. EXPECT_LT(command_buffer_->GetState().get_offset, put_offset); // See that it gets reallocated. @@ -199,6 +206,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); transfer_buffer_->Free(); } @@ -334,11 +344,18 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); } // For command buffer. EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), Flush(_)).Times(1).RetiresOnSaturation(); transfer_buffer_.reset(); } @@ -362,6 +379,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); EXPECT_CALL(*command_buffer(), CreateTransferBuffer(kStartTransferBufferSize * 2, _)) .WillOnce(Invoke( @@ -381,6 +401,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); EXPECT_CALL(*command_buffer(), CreateTransferBuffer(kMaxTransferBufferSize, _)) .WillOnce(Invoke( @@ -415,6 +438,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -445,6 +471,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -469,6 +498,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer()); @@ -495,6 +527,9 @@ EXPECT_CALL(*command_buffer(), DestroyTransferBuffer(_)) .Times(1) .RetiresOnSaturation(); + EXPECT_CALL(*command_buffer(), OrderingBarrier(_)) + .Times(1) + .RetiresOnSaturation(); transfer_buffer_->Free(); // See it's freed. EXPECT_FALSE(transfer_buffer_->HaveBuffer());
diff --git a/gpu/ipc/client/command_buffer_proxy_impl.cc b/gpu/ipc/client/command_buffer_proxy_impl.cc index 2de2530d..9057af01 100644 --- a/gpu/ipc/client/command_buffer_proxy_impl.cc +++ b/gpu/ipc/client/command_buffer_proxy_impl.cc
@@ -411,7 +411,7 @@ if (last_state_.error != gpu::error::kNoError) return; - Send(new GpuCommandBufferMsg_DestroyTransferBuffer(route_id_, id)); + channel_->DestroyTransferBuffer(route_id_, id); } void CommandBufferProxyImpl::SetGpuControlClient(GpuControlClient* client) {
diff --git a/gpu/ipc/client/gpu_channel_host.cc b/gpu/ipc/client/gpu_channel_host.cc index 036109f..8e481432 100644 --- a/gpu/ipc/client/gpu_channel_host.cc +++ b/gpu/ipc/client/gpu_channel_host.cc
@@ -91,7 +91,8 @@ std::vector<SyncToken> sync_token_fences) { AutoLock lock(context_lock_); - if (flush_list_.empty() || flush_list_.back().route_id != route_id) + if (flush_list_.empty() || flush_list_.back().route_id != route_id || + flush_list_.back().transfer_buffer_id_to_destroy) flush_list_.push_back(FlushParams()); FlushParams& flush_params = flush_list_.back(); @@ -102,9 +103,22 @@ flush_params.sync_token_fences.end(), std::make_move_iterator(sync_token_fences.begin()), std::make_move_iterator(sync_token_fences.end())); + flush_params.transfer_buffer_id_to_destroy = 0; return flush_params.flush_id; } +void GpuChannelHost::DestroyTransferBuffer(int32_t route_id, + int32_t id_to_destroy) { + AutoLock lock(context_lock_); + + flush_list_.push_back(FlushParams()); + FlushParams& flush_params = flush_list_.back(); + flush_params.flush_id = next_flush_id_++; + flush_params.route_id = route_id; + flush_params.put_offset = -1; + flush_params.transfer_buffer_id_to_destroy = id_to_destroy; +} + void GpuChannelHost::EnsureFlush(uint32_t flush_id) { AutoLock lock(context_lock_); InternalFlush(flush_id); @@ -172,7 +186,10 @@ int32_t GpuChannelHost::ReserveTransferBufferId() { // 0 is a reserved value. - return g_next_transfer_buffer_id.GetNext() + 1; + int32_t id = g_next_transfer_buffer_id.GetNext(); + if (id) + return id; + return g_next_transfer_buffer_id.GetNext(); } int32_t GpuChannelHost::ReserveImageId() {
diff --git a/gpu/ipc/client/gpu_channel_host.h b/gpu/ipc/client/gpu_channel_host.h index ad24f74..5b0fb4a 100644 --- a/gpu/ipc/client/gpu_channel_host.h +++ b/gpu/ipc/client/gpu_channel_host.h
@@ -121,6 +121,10 @@ // Reserve one unused transfer buffer ID. int32_t ReserveTransferBufferId(); + // An ordering barrier must be placed after any commands that use the buffer + // before it is safe to call this function to destroy it. + void DestroyTransferBuffer(int32_t route_id, int32_t id_to_destroy); + // Reserve one unused image ID. int32_t ReserveImageId();
diff --git a/gpu/ipc/common/flush_params.h b/gpu/ipc/common/flush_params.h index eeb4e65..1523000 100644 --- a/gpu/ipc/common/flush_params.h +++ b/gpu/ipc/common/flush_params.h
@@ -23,6 +23,8 @@ // Route ID of the command buffer for this flush. int32_t route_id; + // If nonzero, destroy this transfer buffer instead of flushing. + int32_t transfer_buffer_id_to_destroy; // Client put offset. Service get offset is updated in shared memory. int32_t put_offset; // Increasing counter for the flush.
diff --git a/gpu/ipc/common/gpu_param_traits_macros.h b/gpu/ipc/common/gpu_param_traits_macros.h index 8b65040..edb20f0 100644 --- a/gpu/ipc/common/gpu_param_traits_macros.h +++ b/gpu/ipc/common/gpu_param_traits_macros.h
@@ -21,6 +21,7 @@ IPC_STRUCT_TRAITS_BEGIN(gpu::FlushParams) IPC_STRUCT_TRAITS_MEMBER(route_id) + IPC_STRUCT_TRAITS_MEMBER(transfer_buffer_id_to_destroy) IPC_STRUCT_TRAITS_MEMBER(put_offset) IPC_STRUCT_TRAITS_MEMBER(flush_id) IPC_STRUCT_TRAITS_MEMBER(sync_token_fences)
diff --git a/gpu/ipc/service/direct_composition_surface_win.cc b/gpu/ipc/service/direct_composition_surface_win.cc index 49abe1f..fc421fd 100644 --- a/gpu/ipc/service/direct_composition_surface_win.cc +++ b/gpu/ipc/service/direct_composition_surface_win.cc
@@ -456,6 +456,12 @@ DCLayerTree::SwapChainPresenter::~SwapChainPresenter() {} bool DCLayerTree::SwapChainPresenter::ShouldBeYUY2() { + // Always prefer YUY2 for protected video for now. + // TODO(crbug.com/850799): Assess power/perf impact when protected video + // swap chain is composited by DWM. + if (is_protected_video_) + return true; + // Start out as YUY2. if (!presentation_history_.valid()) return true;
diff --git a/gpu/ipc/service/gpu_channel.cc b/gpu/ipc/service/gpu_channel.cc index 2a1f2f3f..ecf68ec 100644 --- a/gpu/ipc/service/gpu_channel.cc +++ b/gpu/ipc/service/gpu_channel.cc
@@ -252,20 +252,31 @@ std::vector<FlushParams> flush_list = std::get<0>(std::move(params)); for (auto& flush_info : flush_list) { - GpuCommandBufferMsg_AsyncFlush flush_message( - flush_info.route_id, flush_info.put_offset, flush_info.flush_id); - auto it = route_sequences_.find(flush_info.route_id); if (it == route_sequences_.end()) { DLOG(ERROR) << "Invalid route id in flush list"; continue; } - tasks.emplace_back( - it->second /* sequence_id */, - base::BindOnce(&GpuChannel::HandleMessage, gpu_channel_->AsWeakPtr(), - flush_message), - std::move(flush_info.sync_token_fences)); + if (flush_info.transfer_buffer_id_to_destroy) { + tasks.emplace_back( + it->second /* sequence_id */, + base::BindOnce(&GpuChannel::HandleMessage, + gpu_channel_->AsWeakPtr(), + GpuCommandBufferMsg_DestroyTransferBuffer( + flush_info.route_id, + flush_info.transfer_buffer_id_to_destroy)), + std::move(flush_info.sync_token_fences)); + } else { + GpuCommandBufferMsg_AsyncFlush flush_message( + flush_info.route_id, flush_info.put_offset, flush_info.flush_id); + + tasks.emplace_back( + it->second /* sequence_id */, + base::BindOnce(&GpuChannel::HandleMessage, + gpu_channel_->AsWeakPtr(), flush_message), + std::move(flush_info.sync_token_fences)); + } } scheduler_->ScheduleTasks(std::move(tasks));
diff --git a/headless/lib/browser/protocol/README.md b/headless/lib/browser/protocol/README.md new file mode 100644 index 0000000..e031518 --- /dev/null +++ b/headless/lib/browser/protocol/README.md
@@ -0,0 +1,3 @@ +# Chrome DevTools Protocol + +Contributing to Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing).
diff --git a/ios/build/bots/chromium.fyi/ios11-beta-simulator.json b/ios/build/bots/chromium.fyi/ios11-beta-simulator.json index 08b351c..389ee8f 100644 --- a/ios/build/bots/chromium.fyi/ios11-beta-simulator.json +++ b/ios/build/bots/chromium.fyi/ios11-beta-simulator.json
@@ -41,6 +41,88 @@ "os": "11.4", "host os": "Mac-10.13", "xcode build version": "9q1019a" + }, + { + "include": "eg_tests.json", + "device type": "iPhone 6s Plus", + "os": "11.4", + "host os": "Mac-10.13", + "xcode build version": "9q1019a" + }, + { + "include": "screen_size_dependent_tests.json", + "device type": "iPad Air 2", + "os": "12.0", + "dimensions": [ + { + "os": "Mac-10.13.4", + "pool": "Chrome" + }, + { + "os": "Mac-10.13.5", + "pool": "Chrome" + } + ] + }, + { + "include": "screen_size_dependent_tests.json", + "device type": "iPhone 5s", + "os": "12.0", + "dimensions": [ + { + "os": "Mac-10.13.4", + "pool": "Chrome" + }, + { + "os": "Mac-10.13.5", + "pool": "Chrome" + } + ] + }, + { + "include": "screen_size_dependent_tests.json", + "device type": "iPhone 6s", + "os": "12.0", + "dimensions": [ + { + "os": "Mac-10.13.4", + "pool": "Chrome" + }, + { + "os": "Mac-10.13.5", + "pool": "Chrome" + } + ] + }, + { + "include": "screen_size_dependent_tests.json", + "device type": "iPhone 6s Plus", + "os": "12.0", + "dimensions": [ + { + "os": "Mac-10.13.4", + "pool": "Chrome" + }, + { + "os": "Mac-10.13.5", + "pool": "Chrome" + } + ] + }, + { + "include": "screen_size_dependent_tests.json", + "device type": "iPhone X", + "os": "12.0", + "dimensions": [ + { + "os": "Mac-10.13.4", + "pool": "Chrome" + }, + { + "os": "Mac-10.13.5", + "pool": "Chrome" + } + ] } ] }
diff --git a/ios/chrome/app/application_delegate/app_state.mm b/ios/chrome/app/application_delegate/app_state.mm index 77d207c70..589712a 100644 --- a/ios/chrome/app/application_delegate/app_state.mm +++ b/ios/chrome/app/application_delegate/app_state.mm
@@ -395,15 +395,7 @@ // closing the tabs. Set the BVC to inactive to cancel all the dialogs. if ([_browserLauncher browserInitializationStage] >= INITIALIZATION_STAGE_FOREGROUND) { - [[_browserLauncher browserViewInformation].mainTabModel haltAllTabs]; - - // Application termination flow is only triggered on a shutdown deliberately - // triggered by a user. In this case, close all incognito tabs. - TabModel* OTRTabModel = - [_browserLauncher browserViewInformation].otrTabModel; - [OTRTabModel closeAllTabs]; - [OTRTabModel saveSessionImmediately:YES]; - + [[_browserLauncher browserViewInformation] haltAllTabs]; [_browserLauncher browserViewInformation].currentBVC.active = NO; }
diff --git a/ios/chrome/app/application_delegate/app_state_unittest.mm b/ios/chrome/app/application_delegate/app_state_unittest.mm index 864bb1b..362d31e 100644 --- a/ios/chrome/app/application_delegate/app_state_unittest.mm +++ b/ios/chrome/app/application_delegate/app_state_unittest.mm
@@ -524,14 +524,10 @@ id window = [OCMockObject mockForClass:[UIWindow class]]; id browserViewInformation = [OCMockObject mockForProtocol:@protocol(BrowserViewInformation)]; - id mainTabModel = [OCMockObject mockForClass:[TabModel class]]; - id OTRTabModel = [OCMockObject mockForClass:[TabModel class]]; [[[browserLauncher stub] andReturnValue:@(INITIALIZATION_STAGE_FOREGROUND)] browserInitializationStage]; [[[browserLauncher stub] andReturn:browserViewInformation] browserViewInformation]; - [[[browserViewInformation stub] andReturn:mainTabModel] mainTabModel]; - [[[browserViewInformation stub] andReturn:OTRTabModel] otrTabModel]; [[[browserViewInformation stub] andReturn:browserViewController] currentBVC]; id settingsNavigationController = @@ -543,11 +539,7 @@ [[appNavigation expect] closeSettingsAnimated:NO completion:nil]; [[browserViewInformation expect] cleanDeviceSharingManager]; - - [[mainTabModel expect] haltAllTabs]; - - [[OTRTabModel expect] closeAllTabs]; - [[OTRTabModel expect] saveSessionImmediately:YES]; + [[browserViewInformation expect] haltAllTabs]; id startupInformation = [OCMockObject mockForProtocol:@protocol(StartupInformation)]; @@ -566,8 +558,6 @@ applicationNavigation:appNavigation]; // Test. - EXPECT_OCMOCK_VERIFY(OTRTabModel); - EXPECT_OCMOCK_VERIFY(mainTabModel); EXPECT_OCMOCK_VERIFY(browserViewController); EXPECT_OCMOCK_VERIFY(startupInformation); EXPECT_OCMOCK_VERIFY(appNavigation);
diff --git a/ios/chrome/app/main_controller.mm b/ios/chrome/app/main_controller.mm index 070fc84..fa933322 100644 --- a/ios/chrome/app/main_controller.mm +++ b/ios/chrome/app/main_controller.mm
@@ -967,6 +967,10 @@ #pragma mark - BrowserViewInformation implementation. +- (void)haltAllTabs { + [_browserViewWrangler haltAllTabs]; +} + - (void)cleanDeviceSharingManager { [_browserViewWrangler cleanDeviceSharingManager]; }
diff --git a/ios/chrome/browser/desktop_promotion/BUILD.gn b/ios/chrome/browser/desktop_promotion/BUILD.gn index c486d31..8cc9298 100644 --- a/ios/chrome/browser/desktop_promotion/BUILD.gn +++ b/ios/chrome/browser/desktop_promotion/BUILD.gn
@@ -4,8 +4,6 @@ source_set("desktop_promotion") { sources = [ - "desktop_promotion_sync_observer.cc", - "desktop_promotion_sync_observer.h", "desktop_promotion_sync_service.cc", "desktop_promotion_sync_service.h", "desktop_promotion_sync_service_factory.cc", @@ -14,6 +12,7 @@ deps = [ "//base", "//components/browser_sync", + "//components/keyed_service/core", "//components/keyed_service/ios", "//components/metrics", "//components/pref_registry",
diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.cc b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.cc deleted file mode 100644 index dd2a39e..0000000 --- a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.cc +++ /dev/null
@@ -1,118 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#import "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h" - -#include <algorithm> -#include <memory> - -#include "base/metrics/histogram_functions.h" -#include "base/metrics/histogram_macros.h" -#include "base/strings/stringprintf.h" -#include "base/time/time.h" -#include "components/browser_sync/profile_sync_service.h" -#include "components/prefs/pref_service.h" -#include "ios/chrome/browser/pref_names.h" - -namespace { - -// These values are written to logs. New values can be added, but existing -// values must never be reordered or deleted and reused. -const char* kDesktopIOSPromotionEntrypointHistogramPrefix[] = { - "SavePasswordsNewBubble", "BookmarksNewBubble", "BookmarksFootNote", - "HistoryPage", -}; - -} // namespace - -DesktopPromotionSyncObserver::DesktopPromotionSyncObserver( - PrefService* pref_service, - browser_sync::ProfileSyncService* sync_service) - : pref_service_(pref_service), sync_service_(sync_service) { - DCHECK(pref_service_); - DCHECK(sync_service_); - sync_service_->AddObserver(this); -} - -DesktopPromotionSyncObserver::~DesktopPromotionSyncObserver() { - sync_service_->RemoveObserver(this); -} - -void DesktopPromotionSyncObserver::OnStateChanged(syncer::SyncService* sync) { - if (desktop_metrics_logger_initiated_ || - !sync_service_->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)) { - return; - } - - desktop_metrics_logger_initiated_ = true; - bool done_logging = - pref_service_->GetBoolean(prefs::kDesktopIOSPromotionDone); - bool is_eligible = - pref_service_->GetBoolean(prefs::kDesktopIOSPromotionEligible); - double last_impression = - pref_service_->GetDouble(prefs::kDesktopIOSPromotionLastImpression); - base::TimeDelta delta = - base::Time::Now() - base::Time::FromDoubleT(last_impression); - if (done_logging || delta.InDays() >= 7) { - sync_service_->RemoveObserver(this); - // If the user was eligible but didn't see the promo on the last 7 days and - // installed Chrome then their eligiblity pref is reset to false. - if (delta.InDays() >= 7 && is_eligible) - pref_service_->SetBoolean(prefs::kDesktopIOSPromotionEligible, false); - return; - } - - // This user have seen the promotion in the last 7 days so it may be a - // reason of the installation. - int sms_entrypoint = - pref_service_->GetInteger(prefs::kDesktopIOSPromotionSMSEntryPoint); - int shown_entrypoints = - pref_service_->GetInteger(prefs::kDesktopIOSPromotionShownEntryPoints); - - // Entry points are represented on the preference by integers [1..4]. - // Entry points constants are defined on: - // chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h - int entrypoint_prefixes_count = - arraysize(kDesktopIOSPromotionEntrypointHistogramPrefix); - for (int i = 1; i < entrypoint_prefixes_count + 1; i++) { - // Note this fakes an enum UMA using an exact linear UMA, since the enum is - // a modification of another enum, but isn't defined directly. - if (sms_entrypoint == i) { - UMA_HISTOGRAM_EXACT_LINEAR("DesktopIOSPromotion.SMSSent.IOSSigninReason", - i, entrypoint_prefixes_count + 1); - // If the time delta is negative due to client bad clock we log 0 instead. - base::Histogram::FactoryGet( - base::StringPrintf( - "DesktopIOSPromotion.%s.SMSToSigninTime", - kDesktopIOSPromotionEntrypointHistogramPrefix[i - 1]), - 1, 168, 24, base::Histogram::kUmaTargetedHistogramFlag) - ->Add(std::max(0, delta.InHours())); - } else { - // If the user saw this promotion type, log that it could be a reason - // for the signin. - if ((1 << i) & shown_entrypoints) - UMA_HISTOGRAM_EXACT_LINEAR("DesktopIOSPromotion.NoSMS.IOSSigninReason", - i, entrypoint_prefixes_count + 1); - } - } - - // Check the variation id preference, if it's set then log to UMA that the - // user has seen this promotion variation on desktop. - int promo_variation_id = - pref_service_->GetInteger(prefs::kDesktopIOSPromotionVariationId); - if (promo_variation_id != 0) { - if (sms_entrypoint != 0) { - base::UmaHistogramSparse( - "DesktopIOSPromotion.SMSSent.VariationSigninReason", - promo_variation_id); - } else { - base::UmaHistogramSparse( - "DesktopIOSPromotion.NoSMS.VariationSigninReason", - promo_variation_id); - } - } - - pref_service_->SetBoolean(prefs::kDesktopIOSPromotionDone, true); - sync_service_->RemoveObserver(this); -}
diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h deleted file mode 100644 index 5923fc1..0000000 --- a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright 2017 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_ -#define IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_ - -#include "base/macros.h" -#include "components/sync/driver/sync_service_observer.h" - -namespace browser_sync { -class ProfileSyncService; -} - -class PrefService; - -// This class will implement ProfileSyncServiceObserver and will attach it self -// to the sync service to observe the sync state change. -// Once the sync state is changed and priority prefs are synced, the observer -// will check the desktop promotion prefs, and if eligilble it will log desktop -// promotion metrics to uma and mark the promotion cycle as completed in a perf. -class DesktopPromotionSyncObserver : public syncer::SyncServiceObserver { - public: - DesktopPromotionSyncObserver(PrefService* pref_service, - browser_sync::ProfileSyncService* sync_service); - - ~DesktopPromotionSyncObserver() override; - - // ProfileSyncServiceObserver implementation. - void OnStateChanged(syncer::SyncService* sync) override; - - private: - PrefService* pref_service_; - browser_sync::ProfileSyncService* sync_service_; - bool desktop_metrics_logger_initiated_; - - DISALLOW_COPY_AND_ASSIGN(DesktopPromotionSyncObserver); -}; - -#endif // IOS_CHROME_BROWSER_SIGNIN_DESKTOP_PROMOTION_SYNC_OBSERVER_H_
diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.cc b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.cc index 0a905ca..805143c 100644 --- a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.cc +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.cc
@@ -4,17 +4,130 @@ #include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h" +#include "base/logging.h" +#include "base/metrics/histogram_functions.h" +#include "base/metrics/histogram_macros.h" +#include "base/stl_util.h" +#include "base/strings/stringprintf.h" +#include "base/time/time.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/pref_service.h" -#include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h" +#include "components/sync/driver/sync_service.h" #include "ios/chrome/browser/pref_names.h" +namespace { + +// These values are written to logs. New values can be added, but existing +// values must never be reordered or deleted and reused. +const char* kDesktopIOSPromotionEntrypointHistogramPrefix[] = { + "SavePasswordsNewBubble", "BookmarksNewBubble", "BookmarksFootNote", + "HistoryPage", +}; + +} // namespace + DesktopPromotionSyncService::DesktopPromotionSyncService( PrefService* pref_service, - browser_sync::ProfileSyncService* sync_service) - : observer_(pref_service, sync_service) {} + syncer::SyncService* sync_service) + : pref_service_(pref_service), sync_service_(sync_service) { + DCHECK(pref_service_); + DCHECK(sync_service_); + sync_service_->AddObserver(this); +} -DesktopPromotionSyncService::~DesktopPromotionSyncService() = default; +DesktopPromotionSyncService::~DesktopPromotionSyncService() { + DCHECK(!sync_service_); +} + +void DesktopPromotionSyncService::Shutdown() { + if (sync_service_) { + sync_service_->RemoveObserver(this); + sync_service_ = nullptr; + } +} + +void DesktopPromotionSyncService::OnStateChanged( + syncer::SyncService* sync_service) { + DCHECK_EQ(sync_service, sync_service_); + if (desktop_metrics_logger_initiated_ || + !sync_service_->GetActiveDataTypes().Has(syncer::PRIORITY_PREFERENCES)) { + return; + } + + desktop_metrics_logger_initiated_ = true; + const bool done_logging = + pref_service_->GetBoolean(prefs::kDesktopIOSPromotionDone); + const double last_impression = + pref_service_->GetDouble(prefs::kDesktopIOSPromotionLastImpression); + const base::TimeDelta delta = + base::Time::Now() - base::Time::FromDoubleT(last_impression); + if (done_logging || delta.InDays() >= 7) { + sync_service_->RemoveObserver(this); + sync_service_ = nullptr; + + // If the user was eligible but didn't see the promo on the last 7 days and + // installed Chrome then their eligiblity pref is reset to false. + const bool is_eligible = + pref_service_->GetBoolean(prefs::kDesktopIOSPromotionEligible); + if (delta.InDays() >= 7 && is_eligible) + pref_service_->SetBoolean(prefs::kDesktopIOSPromotionEligible, false); + return; + } + + // This user have seen the promotion in the last 7 days so it may be a + // reason of the installation. + const int sms_entrypoint = + pref_service_->GetInteger(prefs::kDesktopIOSPromotionSMSEntryPoint); + const int shown_entrypoints = + pref_service_->GetInteger(prefs::kDesktopIOSPromotionShownEntryPoints); + + // Entry points are represented on the preference by integers [1..4]. + // Entry points constants are defined on: + // chrome/browser/ui/desktop_ios_promotion/desktop_ios_promotion_util.h + const int entrypoint_prefixes_count = + base::size(kDesktopIOSPromotionEntrypointHistogramPrefix); + for (int i = 1; i < entrypoint_prefixes_count + 1; i++) { + // Note this fakes an enum UMA using an exact linear UMA, since the enum is + // a modification of another enum, but isn't defined directly. + if (sms_entrypoint == i) { + UMA_HISTOGRAM_EXACT_LINEAR("DesktopIOSPromotion.SMSSent.IOSSigninReason", + i, entrypoint_prefixes_count + 1); + // If the time delta is negative due to client bad clock we log 0 instead. + base::Histogram::FactoryGet( + base::StringPrintf( + "DesktopIOSPromotion.%s.SMSToSigninTime", + kDesktopIOSPromotionEntrypointHistogramPrefix[i - 1]), + 1, 168, 24, base::Histogram::kUmaTargetedHistogramFlag) + ->Add(std::max(0, delta.InHours())); + } else { + // If the user saw this promotion type, log that it could be a reason + // for the signin. + if ((1 << i) & shown_entrypoints) + UMA_HISTOGRAM_EXACT_LINEAR("DesktopIOSPromotion.NoSMS.IOSSigninReason", + i, entrypoint_prefixes_count + 1); + } + } + + // Check the variation id preference, if it's set then log to UMA that the + // user has seen this promotion variation on desktop. + int promo_variation_id = + pref_service_->GetInteger(prefs::kDesktopIOSPromotionVariationId); + if (promo_variation_id != 0) { + if (sms_entrypoint != 0) { + base::UmaHistogramSparse( + "DesktopIOSPromotion.SMSSent.VariationSigninReason", + promo_variation_id); + } else { + base::UmaHistogramSparse( + "DesktopIOSPromotion.NoSMS.VariationSigninReason", + promo_variation_id); + } + } + + pref_service_->SetBoolean(prefs::kDesktopIOSPromotionDone, true); + sync_service_->RemoveObserver(this); + sync_service_ = nullptr; +} // static void DesktopPromotionSyncService::RegisterDesktopPromotionUserPrefs(
diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h index 55f93eb..669f5fce 100644 --- a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h
@@ -6,31 +6,48 @@ #define CHROME_BROWSER_DESKTOP_PROMOTION_DESKTOP_PROMOTION_SYNC_SERVICE_H #include "base/macros.h" -#include "components/browser_sync/profile_sync_service.h" -#include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_observer.h" +#include "components/keyed_service/core/keyed_service.h" +#include "components/sync/driver/sync_service_observer.h" + +class PrefService; + +namespace syncer { +class SyncService; +} namespace user_prefs { class PrefRegistrySyncable; } -// This class is responsible for creating a DesktopPromotionSyncObserver -// after the main browser state is initialized. -// An object from this class should only be created by -// DesktopPromotionSyncServiceFactory. -class DesktopPromotionSyncService : public KeyedService { +// This class is responsible for observing the SyncService. Once the +// priority preferences are synced, it will check the desktop promotion +// pref and if eligible it will log the desktop promotion metrics to +// uma and mark the promotion cycle as completed in a pref. +class DesktopPromotionSyncService : public KeyedService, + public syncer::SyncServiceObserver { public: // Only the DesktopPromotionSyncServiceFactory and tests should call this. DesktopPromotionSyncService(PrefService* pref_service, - browser_sync::ProfileSyncService* sync_service); + syncer::SyncService* sync_service); ~DesktopPromotionSyncService() override; + // KeyedService implementation. + void Shutdown() override; + + // syncer::SyncServiceObserver implementation. + void OnStateChanged(syncer::SyncService* sync) override; + // Register profile specific desktop promotion related preferences. static void RegisterDesktopPromotionUserPrefs( user_prefs::PrefRegistrySyncable* registry); private: - DesktopPromotionSyncObserver observer_; + PrefService* pref_service_ = nullptr; + syncer::SyncService* sync_service_ = nullptr; + bool desktop_metrics_logger_initiated_ = false; + + DISALLOW_COPY_AND_ASSIGN(DesktopPromotionSyncService); }; #endif // CHROME_BROWSER_DESKTOP_PROMOTION_DESKTOP_PROMOTION_SYNC_SERVICE_H
diff --git a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.cc b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.cc index 3ce0dd8..27c2d16 100644 --- a/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.cc +++ b/ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service_factory.cc
@@ -6,6 +6,7 @@ #include <memory> +#include "components/browser_sync/profile_sync_service.h" #include "components/keyed_service/ios/browser_state_dependency_manager.h" #include "ios/chrome/browser/browser_state/chrome_browser_state.h" #include "ios/chrome/browser/desktop_promotion/desktop_promotion_sync_service.h"
diff --git a/ios/chrome/browser/ui/main/browser_view_information.h b/ios/chrome/browser/ui/main/browser_view_information.h index df7e506..b8b295d 100644 --- a/ios/chrome/browser/ui/main/browser_view_information.h +++ b/ios/chrome/browser/ui/main/browser_view_information.h
@@ -29,6 +29,9 @@ // otrBVC). The other, if present, is in suspended mode. @property(nonatomic, assign) BrowserViewController* currentBVC; +// Halts all tabs from all TabModels. +- (void)haltAllTabs; + // Returns the browser state corresponding to the current browser view. - (ios::ChromeBrowserState*)currentBrowserState;
diff --git a/ios/chrome/browser/ui/main/browser_view_wrangler.mm b/ios/chrome/browser/ui/main/browser_view_wrangler.mm index 5ad21a43..7cfed22 100644 --- a/ios/chrome/browser/ui/main/browser_view_wrangler.mm +++ b/ios/chrome/browser/ui/main/browser_view_wrangler.mm
@@ -221,6 +221,11 @@ return self.currentBVC.browserState; } +- (void)haltAllTabs { + [self.mainTabModel haltAllTabs]; + [self.otrTabModel haltAllTabs]; +} + - (void)cleanDeviceSharingManager { [self.deviceSharingManager updateBrowserState:NULL]; }
diff --git a/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm index 0830a62..25d4a252 100644 --- a/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm +++ b/ios/chrome/browser/ui/recent_tabs/recent_tabs_table_view_controller.mm
@@ -673,6 +673,10 @@ itemTypeSelected == ItemTypeSessionTabData) { [self loadFaviconForCell:cell indexPath:indexPath]; } + // ItemTypeOtherDevicesNoSessions should not be selectable. + if (itemTypeSelected == ItemTypeOtherDevicesNoSessions) { + cell.selectionStyle = UITableViewCellSelectionStyleNone; + } return cell; }
diff --git a/ios/chrome/browser/ui/settings/BUILD.gn b/ios/chrome/browser/ui/settings/BUILD.gn index f6553f1..8cc006f 100644 --- a/ios/chrome/browser/ui/settings/BUILD.gn +++ b/ios/chrome/browser/ui/settings/BUILD.gn
@@ -168,6 +168,7 @@ "//ios/chrome/browser/ui/signin_interaction", "//ios/chrome/browser/ui/signin_interaction/public", "//ios/chrome/browser/ui/table_view", + "//ios/chrome/browser/ui/table_view:styler", "//ios/chrome/browser/ui/table_view/cells", "//ios/chrome/browser/voice", "//ios/chrome/browser/web:web",
diff --git a/ios/chrome/browser/ui/settings/cells/BUILD.gn b/ios/chrome/browser/ui/settings/cells/BUILD.gn index 49bdc7d..5e18384b 100644 --- a/ios/chrome/browser/ui/settings/cells/BUILD.gn +++ b/ios/chrome/browser/ui/settings/cells/BUILD.gn
@@ -28,6 +28,8 @@ "password_details_item.mm", "sync_switch_item.h", "sync_switch_item.mm", + "table_view_clear_browsing_data_item.h", + "table_view_clear_browsing_data_item.mm", "text_and_error_item.h", "text_and_error_item.mm", "version_item.h", @@ -42,6 +44,8 @@ "//ios/chrome/browser/ui", "//ios/chrome/browser/ui/collection_view/cells", "//ios/chrome/browser/ui/colors", + "//ios/chrome/browser/ui/table_view:styler", + "//ios/chrome/browser/ui/table_view/cells", "//ios/third_party/material_roboto_font_loader_ios", "//ui/base", ]
diff --git a/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h b/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h new file mode 100644 index 0000000..add53b2 --- /dev/null +++ b/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h
@@ -0,0 +1,27 @@ +// Copyright 2018 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 IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TABLE_VIEW_CLEAR_BROWSING_DATA_ITEM_H_ +#define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TABLE_VIEW_CLEAR_BROWSING_DATA_ITEM_H_ + +#import "ios/chrome/browser/ui/table_view/cells/table_view_item.h" + +enum class BrowsingDataRemoveMask; + +// TableViewClearBrowsingDataItem contains the model data for a +// TableViewTextCell in addition a BrowsingDataRemoveMask property. +@interface TableViewClearBrowsingDataItem : TableViewItem + +// Text of the TableViewTextCell +@property(nonatomic, copy) NSString* text; + +// Whether or not the cell should show a checkmark. +@property(nonatomic, assign) BOOL checked; + +// Mask of the data to be cleared. +@property(nonatomic, assign) BrowsingDataRemoveMask dataTypeMask; + +@end + +#endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TABLE_VIEW_CLEAR_BROWSING_DATA_ITEM_H_
diff --git a/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.mm b/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.mm new file mode 100644 index 0000000..1490fcb --- /dev/null +++ b/ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.mm
@@ -0,0 +1,39 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h" + +#include "base/mac/foundation_util.h" +#import "ios/chrome/browser/ui/table_view/cells/table_view_text_item.h" +#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" + +#if !defined(__has_feature) || !__has_feature(objc_arc) +#error "This file requires ARC support." +#endif + +@implementation TableViewClearBrowsingDataItem +@synthesize checked = _checked; +@synthesize dataTypeMask = _dataTypeMask; +@synthesize text = _text; + +- (instancetype)initWithType:(NSInteger)type { + self = [super initWithType:type]; + if (self) { + self.cellClass = [TableViewTextCell class]; + } + return self; +} + +- (void)configureCell:(UITableViewCell*)tableCell + withStyler:(ChromeTableViewStyler*)styler { + [super configureCell:tableCell withStyler:styler]; + TableViewTextCell* cell = + base::mac::ObjCCastStrict<TableViewTextCell>(tableCell); + cell.textLabel.text = self.text; + cell.textLabel.textColor = [UIColor blackColor]; + cell.checked = self.checked; + cell.textLabel.backgroundColor = styler.tableViewBackgroundColor; +} + +@end
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_coordinator.mm b/ios/chrome/browser/ui/settings/clear_browsing_data_coordinator.mm index 0389d32..4497938 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data_coordinator.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data_coordinator.mm
@@ -15,7 +15,8 @@ - (void)start { ClearBrowsingDataTableViewController* clearBrowsingDataTableViewController = - [[ClearBrowsingDataTableViewController alloc] init]; + [[ClearBrowsingDataTableViewController alloc] + initWithBrowserState:self.browserState]; clearBrowsingDataTableViewController.extendedLayoutIncludesOpaqueBars = YES; // We currently know for sure that baseViewController is a // Navigation Controller.
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_manager.mm b/ios/chrome/browser/ui/settings/clear_browsing_data_manager.mm index 584a7e04..a1626dc4 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data_manager.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data_manager.mm
@@ -37,6 +37,8 @@ #import "ios/chrome/browser/ui/list_model/list_model.h" #import "ios/chrome/browser/ui/settings/cells/clear_browsing_data_constants.h" #import "ios/chrome/browser/ui/settings/cells/clear_browsing_data_item.h" +#import "ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h" +#import "ios/chrome/browser/ui/table_view/cells/table_view_text_item.h" #import "ios/chrome/browser/ui/uikit_ui_util.h" #include "ios/chrome/common/channel_info.h" #include "ios/chrome/grit/ios_chromium_strings.h" @@ -110,14 +112,16 @@ - (void)loadModel:(ListModel*)model { // Time range section. - if (experimental_flags::IsNewClearBrowsingDataUIEnabled()) { + // Only implementing new UI for kListTypeCollectionView. + if (experimental_flags::IsNewClearBrowsingDataUIEnabled() && + self.listType == ClearBrowsingDataListType::kListTypeCollectionView) { [model addSectionWithIdentifier:SectionIdentifierTimeRange]; [model addItem:[self timeRangeItem] toSectionWithIdentifier:SectionIdentifierTimeRange]; } [self addClearBrowsingDataItemsToModel:model]; - + [self addClearDataButtonToModel:model]; [self addSyncProfileItemsToModel:model]; } @@ -165,12 +169,6 @@ prefName:browsing_data::prefs::kDeleteFormData]; [model addItem:autofillItem toSectionWithIdentifier:SectionIdentifierDataTypes]; - - // Clear Browsing Data button. - [model addSectionWithIdentifier:SectionIdentifierClearBrowsingDataButton]; - ListItem* clearButtonItem = [self clearButtonItem]; - [model addItem:clearButtonItem - toSectionWithIdentifier:SectionIdentifierClearBrowsingDataButton]; } - (NSString*)counterTextFromResult: @@ -243,6 +241,14 @@ return alertController; } +- (void)addClearDataButtonToModel:(ListModel*)model { + // Clear Browsing Data button. + ListItem* clearButtonItem = [self clearButtonItem]; + [model addSectionWithIdentifier:SectionIdentifierClearBrowsingDataButton]; + [model addItem:clearButtonItem + toSectionWithIdentifier:SectionIdentifierClearBrowsingDataButton]; +} + // Add footers about user's account data. - (void)addSyncProfileItemsToModel:(ListModel*)model { // Google Account footer. @@ -312,6 +318,11 @@ collectionClearButtonItem.accessibilityTraits |= UIAccessibilityTraitButton; collectionClearButtonItem.textColor = [[MDCPalette cr_redPalette] tint500]; clearButtonItem = collectionClearButtonItem; + } else { + // TODO(crbug.com/853402): Implement using TableviewTextButtonItem. + TableViewTextItem* tableViewDummyItem = [[TableViewTextItem alloc] + initWithType:ItemTypeClearBrowsingDataButton]; + clearButtonItem = tableViewDummyItem; } return clearButtonItem; } @@ -336,6 +347,8 @@ })); } ListItem* clearDataItem; + // Create a ClearBrowsingDataItem for a CollectionView model and a + // TableViewClearBrowsingDataItem for a TableView model. if (self.listType == ClearBrowsingDataListType::kListTypeCollectionView) { ClearBrowsingDataItem* collectionClearDataItem = [[ClearBrowsingDataItem alloc] initWithType:itemType @@ -359,6 +372,15 @@ l10n_util::GetNSString(IDS_DEL_COOKIES_COUNTER); } clearDataItem = collectionClearDataItem; + } else { + TableViewClearBrowsingDataItem* tableViewClearDataItem = + [[TableViewClearBrowsingDataItem alloc] initWithType:itemType]; + tableViewClearDataItem.text = l10n_util::GetNSString(titleMessageID); + tableViewClearDataItem.checked = prefs->GetBoolean(prefName); + tableViewClearDataItem.accessibilityIdentifier = + [self accessibilityIdentifierFromItemType:itemType]; + tableViewClearDataItem.dataTypeMask = mask; + clearDataItem = tableViewClearDataItem; } return clearDataItem; } @@ -382,6 +404,11 @@ ->GetClearBrowsingDataAccountActivityImage(); collectionFooterItem.image = image; footerItem = collectionFooterItem; + } else { + // TODO(crbug.com/853402): Implement using TableviewLinkTextItem. + TableViewTextItem* dummyItem = + [[TableViewTextItem alloc] initWithType:ItemTypeFooterGoogleAccount]; + footerItem = dummyItem; } return footerItem; } @@ -433,6 +460,11 @@ collectionFooterItem.linkDelegate = self.linkDelegate; collectionFooterItem.image = image; footerItem = collectionFooterItem; + } else { + // TODO(crbug.com/853402): Implement using TableviewLinkTextItem. + TableViewTextItem* dummyItem = + [[TableViewTextItem alloc] initWithType:itemType]; + footerItem = dummyItem; } return footerItem;
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.h b/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.h index 93c446a6..2bb8fae 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.h +++ b/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.h
@@ -7,12 +7,17 @@ #import "ios/chrome/browser/ui/table_view/chrome_table_view_controller.h" +namespace ios { +class ChromeBrowserState; +} + // TableView for clearing browsing data (including history, // cookies, caches, passwords, and autofill). @interface ClearBrowsingDataTableViewController : ChromeTableViewController -// Initializers. -- (instancetype)init NS_DESIGNATED_INITIALIZER; +// Initializers. |browserState| can't be nil. +- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState + NS_DESIGNATED_INITIALIZER; - (instancetype)initWithTableViewStyle:(UITableViewStyle)style appBarStyle: (ChromeTableViewControllerStyle)appBarStyle
diff --git a/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.mm b/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.mm index 6ec1dad..3436703 100644 --- a/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.mm +++ b/ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.mm
@@ -4,6 +4,11 @@ #import "ios/chrome/browser/ui/settings/clear_browsing_data_table_view_controller.h" +#include "base/mac/foundation_util.h" +#import "ios/chrome/browser/ui/settings/cells/table_view_clear_browsing_data_item.h" +#import "ios/chrome/browser/ui/settings/clear_browsing_data_manager.h" +#import "ios/chrome/browser/ui/table_view/cells/table_view_cells_constants.h" +#import "ios/chrome/browser/ui/table_view/chrome_table_view_styler.h" #include "ios/chrome/grit/ios_strings.h" #include "ui/base/l10n/l10n_util.h" @@ -11,23 +16,89 @@ #error "This file requires ARC support." #endif +namespace ios { +class ChromeBrowserState; +} + +@interface ClearBrowsingDataTableViewController () + +// TODO(crbug.com/850699): remove direct dependency and replace with +// delegate. +@property(nonatomic, readonly, strong) ClearBrowsingDataManager* dataManager; + +// Browser state. +@property(nonatomic, assign) ios::ChromeBrowserState* browserState; + +@end + @implementation ClearBrowsingDataTableViewController +@synthesize browserState = _browserState; +@synthesize dataManager = _dataManager; #pragma mark - ViewController Lifecycle. -- (instancetype)init { - return [super initWithTableViewStyle:UITableViewStylePlain +- (instancetype)initWithBrowserState:(ios::ChromeBrowserState*)browserState { + self = [super initWithTableViewStyle:UITableViewStylePlain appBarStyle:ChromeTableViewControllerStyleNoAppBar]; + if (self) { + _browserState = browserState; + _dataManager = [[ClearBrowsingDataManager alloc] + initWithBrowserState:browserState + listType:ClearBrowsingDataListType::kListTypeTableView]; + } + return self; } - (void)viewDidLoad { + [super viewDidLoad]; // TableView configuration self.tableView.estimatedRowHeight = 56; self.tableView.rowHeight = UITableViewAutomaticDimension; - self.tableView.estimatedSectionHeaderHeight = 56; + self.tableView.estimatedSectionHeaderHeight = 0; + self.styler.tableViewBackgroundColor = [UIColor clearColor]; + // Align cell separators with text label leading margin. + [self.tableView + setSeparatorInset:UIEdgeInsetsMake(0, kTableViewHorizontalSpacing, 0, 0)]; // Navigation controller configuration. self.title = l10n_util::GetNSString(IDS_IOS_CLEAR_BROWSING_DATA_TITLE); + + [self loadModel]; +} + +- (void)loadModel { + [super loadModel]; + [self.dataManager loadModel:self.tableViewModel]; +} + +#pragma mark - UITableViewDelegate + +- (void)tableView:(UITableView*)tableView + didSelectRowAtIndexPath:(NSIndexPath*)indexPath { + [self.tableView deselectRowAtIndexPath:indexPath animated:YES]; + TableViewItem* item = [self.tableViewModel itemAtIndexPath:indexPath]; + DCHECK(item); + switch (item.type) { + case ItemTypeDataTypeBrowsingHistory: + case ItemTypeDataTypeCookiesSiteData: + case ItemTypeDataTypeCache: + case ItemTypeDataTypeSavedPasswords: + case ItemTypeDataTypeAutofill: { + TableViewClearBrowsingDataItem* clearBrowsingDataItem = + base::mac::ObjCCastStrict<TableViewClearBrowsingDataItem>(item); + clearBrowsingDataItem.checked = !clearBrowsingDataItem.checked; + [self reconfigureCellsForItems:@[ clearBrowsingDataItem ]]; + break; + } + case ItemTypeClearBrowsingDataButton: + case ItemTypeFooterGoogleAccount: + case ItemTypeFooterGoogleAccountAndMyActivity: + case ItemTypeFooterSavedSiteData: + case ItemTypeFooterClearSyncAndSavedSiteData: + case ItemTypeTimeRange: + default: + break; + } } @end
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h index 425723ba..02dd658b 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.h
@@ -36,6 +36,9 @@ // The text to display. @property(nonatomic, readonly, strong) UILabel* textLabel; +// Whether to show the checkmark accessory view. +@property(nonatomic, assign) BOOL checked; + @end #endif // IOS_CHROME_BROWSER_UI_TABLE_VIEW_CELLS_TABLE_VIEW_TEXT_ITEM_H_
diff --git a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm index e5ca4b0..b4b77e9 100644 --- a/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm +++ b/ios/chrome/browser/ui/table_view/cells/table_view_text_item.mm
@@ -36,15 +36,17 @@ cell.textLabel.text = self.text; cell.textLabel.backgroundColor = styler.tableViewBackgroundColor; // This item's text color takes precedence over the global styler. - if (self.textColor) + // TODO(crbug.com/854249): redo the logic for this convoluted if clause. + if (self.textColor == TextItemColorBlack || + self.textColor == TextItemColorLightGrey) { cell.textLabel.textColor = UIColorFromRGB(self.textColor); - else if (styler.cellTitleColor) + } else if (styler.cellTitleColor) { cell.textLabel.textColor = styler.cellTitleColor; - else + } else { cell.textLabel.textColor = UIColorFromRGB(TextItemColorLightGrey); + } cell.textLabel.textAlignment = self.textAlignment ? self.textAlignment : NSTextAlignmentLeft; - cell.selectionStyle = UITableViewCellSelectionStyleNone; } @end @@ -53,6 +55,7 @@ @implementation TableViewTextCell @synthesize textLabel = _textLabel; +@synthesize checked = _checked; - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString*)reuseIdentifier { @@ -74,12 +77,11 @@ [_textLabel.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor constant:kTableViewHorizontalSpacing], - [_textLabel.topAnchor - constraintEqualToAnchor:self.contentView.topAnchor - constant:kTableViewLabelVerticalSpacing], + [_textLabel.topAnchor constraintEqualToAnchor:self.contentView.topAnchor + constant:kTableViewVerticalSpacing], [_textLabel.bottomAnchor constraintEqualToAnchor:self.contentView.bottomAnchor - constant:-kTableViewLabelVerticalSpacing], + constant:-kTableViewVerticalSpacing], [_textLabel.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor constant:-kTableViewHorizontalSpacing] @@ -88,4 +90,19 @@ return self; } +- (void)setChecked:(BOOL)checked { + if (checked) { + self.accessoryView = [[UIImageView alloc] + initWithImage:[UIImage imageNamed:@"bookmark_blue_check"]]; + } else { + self.accessoryView = nil; + } + _checked = checked; +} + +- (void)prepareForReuse { + [super prepareForReuse]; + self.checked = NO; +} + @end
diff --git a/ios/web/navigation/navigation_item_storage_builder.mm b/ios/web/navigation/navigation_item_storage_builder.mm index 6a24f7e4..2efd08a 100644 --- a/ios/web/navigation/navigation_item_storage_builder.mm +++ b/ios/web/navigation/navigation_item_storage_builder.mm
@@ -39,7 +39,7 @@ // GetVirtualURL() returns |url_| for the non-overridden case, this will also // update the virtual URL reported by this object. item->original_request_url_ = navigation_item_storage.virtualURL; - item->url_ = navigation_item_storage.virtualURL; + item->SetURL(navigation_item_storage.virtualURL); item->referrer_ = navigation_item_storage.referrer; item->timestamp_ = navigation_item_storage.timestamp; item->title_ = navigation_item_storage.title;
diff --git a/media/gpu/windows/d3d11_cdm_proxy.cc b/media/gpu/windows/d3d11_cdm_proxy.cc index bf92dd0..70a0d3f 100644 --- a/media/gpu/windows/d3d11_cdm_proxy.cc +++ b/media/gpu/windows/d3d11_cdm_proxy.cc
@@ -18,6 +18,39 @@ namespace { +// Checks whether there is a hardware protected key exhange method. +// https://msdn.microsoft.com/en-us/library/windows/desktop/dn894125(v=vs.85).aspx +// The key exhange capabilities are checked using these. +// https://msdn.microsoft.com/en-us/library/windows/desktop/hh447640%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 +// https://msdn.microsoft.com/en-us/library/windows/desktop/hh447782(v=vs.85).aspx +bool CanDoHardwareProtectedKeyExchange( + Microsoft::WRL::ComPtr<ID3D11VideoDevice> video_device, + const GUID& crypto_type) { + D3D11_VIDEO_CONTENT_PROTECTION_CAPS caps = {}; + HRESULT hresult = video_device->GetContentProtectionCaps( + &crypto_type, &D3D11_DECODER_PROFILE_H264_VLD_NOFGT, &caps); + if (FAILED(hresult)) { + DVLOG(1) << "Failed to get content protection caps."; + return false; + } + + for (uint32_t i = 0; i < caps.KeyExchangeTypeCount; ++i) { + GUID kex_guid = {}; + hresult = video_device->CheckCryptoKeyExchange( + &crypto_type, &D3D11_DECODER_PROFILE_H264_VLD_NOFGT, i, &kex_guid); + if (FAILED(hresult)) { + DVLOG(1) << "Failed to get key exchange GUID"; + return false; + } + + if (kex_guid == D3D11_KEY_EXCHANGE_HW_PROTECTION) + return true; + } + + DVLOG(1) << "Hardware key exchange is not supported."; + return false; +} + class D3D11CdmProxyContext : public CdmProxyContext { public: explicit D3D11CdmProxyContext(const GUID& key_info_guid) @@ -183,6 +216,12 @@ return; } + if (!CanDoHardwareProtectedKeyExchange(video_device_, crypto_type_)) { + DLOG(ERROR) << "Cannot do hardware proteted key exhange."; + failed(); + return; + } + hresult = device_context_.CopyTo(video_context_.GetAddressOf()); if (FAILED(hresult)) { DLOG(ERROR) << "Failed to get ID3D11VideoContext: " << hresult;
diff --git a/media/gpu/windows/d3d11_cdm_proxy_unittest.cc b/media/gpu/windows/d3d11_cdm_proxy_unittest.cc index 58ead442..a07eda4 100644 --- a/media/gpu/windows/d3d11_cdm_proxy_unittest.cc +++ b/media/gpu/windows/d3d11_cdm_proxy_unittest.cc
@@ -18,6 +18,7 @@ using ::testing::AtLeast; using ::testing::DoAll; using ::testing::Invoke; +using ::testing::Lt; using ::testing::Ne; using ::testing::Pointee; using ::testing::Return; @@ -76,12 +77,86 @@ video_context_mock_ = CreateD3D11Mock<D3D11VideoContextMock>(); video_context1_mock_ = CreateD3D11Mock<D3D11VideoContext1Mock>(); + // These flags are a reasonable subset of flags to get HARDWARE protected + // playback. + content_protection_caps_.Caps = + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE | + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECT_UNCOMPRESSED | + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_PROTECTED_MEMORY_PAGEABLE | + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN | + D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_DRM_COMMUNICATION; + // 1 for the mock behavior below for CheckCryptoKeyExchange(). + content_protection_caps_.KeyExchangeTypeCount = 1; + // This is arbitrary but 1 is reasonable, meaning doesn't need to be + // aligned. + content_protection_caps_.BlockAlignmentSize = 1; + // This value is arbitrary. + content_protection_caps_.ProtectedMemorySize = 10000000; + + OnCallsForInitialize(); + proxy_->SetCreateDeviceCallbackForTesting( base::BindRepeating(&D3D11CreateDeviceMock::Create, base::Unretained(&create_device_mock_))); } - // Helper method to do Initialize(). Only useful if the test doesn't require - // access to the mocks later. + + // Sets up ON_CALLs for the mock objects. These can be overriden with + // EXPECT_CALLs. + // |content_protection_caps_| should be set. + void OnCallsForInitialize() { + ON_CALL(create_device_mock_, + Create(_, D3D_DRIVER_TYPE_HARDWARE, _, _, _, _, _, _, _, _)) + .WillByDefault( + DoAll(AddRefAndSetArgPointee<7>(device_mock_.Get()), + AddRefAndSetArgPointee<9>(device_context_mock_.Get()), + Return(S_OK))); + + ON_CALL(*device_mock_.Get(), QueryInterface(IID_ID3D11VideoDevice, _)) + .WillByDefault(DoAll( + AddRefAndSetArgPointee<1>(video_device_mock_.Get()), Return(S_OK))); + + ON_CALL(*device_mock_.Get(), QueryInterface(IID_ID3D11VideoDevice1, _)) + .WillByDefault( + DoAll(AddRefAndSetArgPointee<1>(video_device1_mock_.Get()), + Return(S_OK))); + + ON_CALL(*device_context_mock_.Get(), + QueryInterface(IID_ID3D11VideoContext, _)) + .WillByDefault( + DoAll(AddRefAndSetArgPointee<1>(video_context_mock_.Get()), + Return(S_OK))); + + ON_CALL(*device_context_mock_.Get(), + QueryInterface(IID_ID3D11VideoContext1, _)) + .WillByDefault( + DoAll(AddRefAndSetArgPointee<1>(video_context1_mock_.Get()), + Return(S_OK))); + + ON_CALL(*video_device_mock_.Get(), + CreateCryptoSession(Pointee(CRYPTO_TYPE_GUID), _, + Pointee(D3D11_KEY_EXCHANGE_HW_PROTECTION), _)) + .WillByDefault( + DoAll(AddRefAndSetArgPointee<3>(crypto_session_mock_.Get()), + Return(S_OK))); + + ON_CALL( + *video_device1_mock_.Get(), + GetCryptoSessionPrivateDataSize(Pointee(CRYPTO_TYPE_GUID), _, _, _, _)) + .WillByDefault(DoAll(SetArgPointee<3>(kPrivateInputSize), + SetArgPointee<4>(kPrivateOutputSize), + Return(S_OK))); + + ON_CALL(*video_device_mock_.Get(), GetContentProtectionCaps(_, _, _)) + .WillByDefault( + DoAll(SetArgPointee<2>(content_protection_caps_), Return(S_OK))); + + ON_CALL(*video_device_mock_.Get(), CheckCryptoKeyExchange(_, _, Lt(1u), _)) + .WillByDefault(DoAll(SetArgPointee<3>(D3D11_KEY_EXCHANGE_HW_PROTECTION), + Return(S_OK))); + } + + // Helper method to do Initialize(), sets up EXPECT_CALLs for a successful + // initialization. void Initialize(CdmProxy::InitializeCB callback) { EXPECT_CALL(create_device_mock_, Create(_, D3D_DRIVER_TYPE_HARDWARE, _, _, _, _, _, _, _, _)) @@ -148,6 +223,7 @@ Microsoft::WRL::ComPtr<D3D11DeviceContextMock> device_context_mock_; Microsoft::WRL::ComPtr<D3D11VideoContextMock> video_context_mock_; Microsoft::WRL::ComPtr<D3D11VideoContext1Mock> video_context1_mock_; + D3D11_VIDEO_CONTENT_PROTECTION_CAPS content_protection_caps_ = {}; // These size values are arbitrary. Used for mocking // GetCryptoSessionPrivateDataSize(). @@ -173,6 +249,22 @@ &CallbackMock::InitializeCallback, base::Unretained(&callback_mock_)))); } +// Initialization failure because HW key exchange is not available. +TEST_F(D3D11CdmProxyTest, NoHwKeyExchange) { + EXPECT_CALL(callback_mock_, + InitializeCallback(CdmProxy::Status::kFail, _, _)); + // GUID is set to non-D3D11_KEY_EXCHANGE_HW_PROTECTION, which means no HW key + // exchange. + EXPECT_CALL(*video_device_mock_.Get(), + CheckCryptoKeyExchange(_, _, Lt(1u), _)) + .WillOnce( + DoAll(SetArgPointee<3>(D3D11_CRYPTO_TYPE_AES128_CTR), Return(S_OK))); + + proxy_->Initialize(nullptr, + base::BindOnce(&CallbackMock::InitializeCallback, + base::Unretained(&callback_mock_))); +} + // Verifies that Process() won't work if not initialized. TEST_F(D3D11CdmProxyTest, ProcessUninitialized) { // The size nor value here matter, so making non empty non zero vector.
diff --git a/media/gpu/windows/d3d11_video_decoder_impl.cc b/media/gpu/windows/d3d11_video_decoder_impl.cc index 9e87c374..51a2ac9 100644 --- a/media/gpu/windows/d3d11_video_decoder_impl.cc +++ b/media/gpu/windows/d3d11_video_decoder_impl.cc
@@ -384,8 +384,10 @@ // that ALLOW_OVERLAY is required for encrypted video path. frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); - if (is_encrypted_) + if (is_encrypted_) { frame->metadata()->SetBoolean(VideoFrameMetadata::PROTECTED_VIDEO, true); + frame->metadata()->SetBoolean(VideoFrameMetadata::REQUIRE_OVERLAY, true); + } frame->set_color_space(buffer_colorspace.ToGfxColorSpace()); output_cb_.Run(frame);
diff --git a/mojo/public/cpp/base/file_mojom_traits.cc b/mojo/public/cpp/base/file_mojom_traits.cc index e7fd6059..5799b79d 100644 --- a/mojo/public/cpp/base/file_mojom_traits.cc +++ b/mojo/public/cpp/base/file_mojom_traits.cc
@@ -23,7 +23,7 @@ MOJO_RESULT_OK) { return false; } - *file = base::File(platform_handle); + *file = base::File(platform_handle, data.async()); return true; }
diff --git a/mojo/public/cpp/base/file_mojom_traits.h b/mojo/public/cpp/base/file_mojom_traits.h index ac2d0d2..e4dd2f9 100644 --- a/mojo/public/cpp/base/file_mojom_traits.h +++ b/mojo/public/cpp/base/file_mojom_traits.h
@@ -19,6 +19,7 @@ static void SetToNull(base::File* file) { *file = base::File(); } static mojo::ScopedHandle fd(base::File& file); + static bool async(base::File& file) { return file.async(); } static bool Read(mojo_base::mojom::FileDataView data, base::File* file); };
diff --git a/mojo/public/cpp/base/file_unittest.cc b/mojo/public/cpp/base/file_unittest.cc index fb3cff40..e1db729 100644 --- a/mojo/public/cpp/base/file_unittest.cc +++ b/mojo/public/cpp/base/file_unittest.cc
@@ -28,6 +28,7 @@ mojo::test::SerializeAndDeserialize<mojom::File>(&file, &file_out)); std::vector<char> content(test_content.size()); ASSERT_TRUE(file_out.IsValid()); + ASSERT_FALSE(file_out.async()); ASSERT_EQ(static_cast<int>(test_content.size()), file_out.Read(0, content.data(), base::checked_cast<int>(test_content.size()))); @@ -35,6 +36,25 @@ base::StringPiece(content.data(), test_content.size())); } +TEST(FileTest, AsyncFile) { + base::ScopedTempDir temp_dir; + ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); + base::FilePath path = temp_dir.GetPath().AppendASCII("async_test_file.txt"); + + base::File write_file(path, base::File::FLAG_CREATE | base::File::FLAG_WRITE); + const base::StringPiece test_content = "test string"; + write_file.WriteAtCurrentPos(test_content.data(), + base::checked_cast<int>(test_content.size())); + write_file.Close(); + + base::File file(path, base::File::FLAG_OPEN | base::File::FLAG_READ | + base::File::FLAG_ASYNC); + base::File file_out; + ASSERT_TRUE( + mojo::test::SerializeAndDeserialize<mojom::File>(&file, &file_out)); + ASSERT_TRUE(file_out.async()); +} + TEST(FileTest, InvalidFile) { base::ScopedTempDir temp_dir; ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
diff --git a/mojo/public/mojom/base/file.mojom b/mojo/public/mojom/base/file.mojom index 824ebb1f..9f08b26b 100644 --- a/mojo/public/mojom/base/file.mojom +++ b/mojo/public/mojom/base/file.mojom
@@ -7,4 +7,5 @@ // Corresponds to |base::File| in base/files/file.h struct File { handle fd; + bool async; };
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc index dd9e2fa..2fa7c1d 100644 --- a/net/base/file_stream_unittest.cc +++ b/net/base/file_stream_unittest.cc
@@ -814,8 +814,7 @@ // handle but with the async flag set to true. uint32_t flags = base::File::FLAG_OPEN | base::File::FLAG_READ; base::File file(temp_file_path(), flags); - base::File lying_file = - base::File::CreateForAsyncHandle(file.TakePlatformFile()); + base::File lying_file(file.TakePlatformFile(), true); ASSERT_TRUE(lying_file.IsValid()); FileStream stream(std::move(lying_file), base::ThreadTaskRunnerHandle::Get());
diff --git a/net/quic/chromium/quic_stream_factory_test.cc b/net/quic/chromium/quic_stream_factory_test.cc index dc02322..dcfda6f2 100644 --- a/net/quic/chromium/quic_stream_factory_test.cc +++ b/net/quic/chromium/quic_stream_factory_test.cc
@@ -105,6 +105,7 @@ const char kServer4Url[] = "https://images.example.org/"; const int kDefaultRTTMilliSecs = 300; const size_t kMinRetryTimeForDefaultNetworkSecs = 1; +const size_t kWaitTimeForNewNetworkSecs = 10; // Run QuicStreamFactoryTest instances with all value combinations of version // and enable_connection_racting. @@ -784,8 +785,6 @@ void TestMigrationOnNetworkDisconnected(bool async_write_before); void OnNetworkMadeDefault(bool async_write_before); void TestMigrationOnWriteErrorPauseBeforeConnected(IoMode write_error_mode); - void OnNetworkDisconnectedWithNetworkList( - NetworkChangeNotifier::NetworkList network_list); void TestMigrationOnWriteErrorWithNetworkAddedBeforeNotification( IoMode write_error_mode, bool disconnected); @@ -2278,23 +2277,21 @@ EXPECT_TRUE(socket_data2.AllWriteDataConsumed()); } -TEST_P(QuicStreamFactoryTest, OnNetworkDisconnectedNoNetworks) { - NetworkChangeNotifier::NetworkList no_networks(0); - OnNetworkDisconnectedWithNetworkList(no_networks); -} - -TEST_P(QuicStreamFactoryTest, OnNetworkDisconnectedNoNewNetwork) { - OnNetworkDisconnectedWithNetworkList({kDefaultNetworkForTests}); -} - -void QuicStreamFactoryTestBase::OnNetworkDisconnectedWithNetworkList( - NetworkChangeNotifier::NetworkList network_list) { - InitializeConnectionMigrationTest(network_list); +// This test verifies that session times out connection migration attempt +// with signals delivered in the following order (no alternate network is +// available): +// - default network disconnected is delivered: session attempts connection +// migration but found not alternate network. Session waits for a new network +// comes up in the next kWaitTimeForNewNetworkSecs seonds. +// - no new network is connected, migration times out. Session is closed. +TEST_P(QuicStreamFactoryTest, MigrationTimeoutWithNoNewNetwork) { + InitializeConnectionMigrationV2Test({kDefaultNetworkForTests}); ProofVerifyDetailsChromium verify_details = DefaultProofVerifyDetails(); crypto_client_stream_factory_.AddProofVerifyDetails(&verify_details); - // Use the test task runner, to force the migration alarm timeout later. - QuicStreamFactoryPeer::SetTaskRunner(factory_.get(), runner_.get()); + // Using a testing task runner so that we can control time. + auto task_runner = base::MakeRefCounted<base::TestMockTimeTaskRunner>(); + QuicStreamFactoryPeer::SetTaskRunner(factory_.get(), task_runner.get()); MockQuicData socket_data; socket_data.AddRead(SYNCHRONOUS, ERR_IO_PENDING); @@ -2331,13 +2328,17 @@ // The migration will not fail until the migration alarm timeout. EXPECT_TRUE(QuicStreamFactoryPeer::IsLiveSession(factory_.get(), session)); - EXPECT_FALSE(HasActiveSession(host_port_pair_)); + EXPECT_TRUE(HasActiveSession(host_port_pair_)); EXPECT_EQ(1u, session->GetNumActiveStreams()); EXPECT_EQ(ERR_IO_PENDING, stream->ReadResponseHeaders(callback_.callback())); EXPECT_EQ(true, session->connection()->writer()->IsWriteBlocked()); - // Force the migration alarm timeout to run. - RunTestLoopUntilIdle(); + // Migration will be timed out after kWaitTimeForNewNetwokSecs. + EXPECT_EQ(1u, task_runner->GetPendingTaskCount()); + base::TimeDelta next_task_delay = task_runner->NextPendingTaskDelay(); + EXPECT_EQ(base::TimeDelta::FromSeconds(kWaitTimeForNewNetworkSecs), + next_task_delay); + task_runner->FastForwardBy(next_task_delay); // The connection should now be closed. A request for response // headers should fail.
diff --git a/remoting/client/plugin/BUILD.gn b/remoting/client/plugin/BUILD.gn index a2aa05c6..6c42277c 100644 --- a/remoting/client/plugin/BUILD.gn +++ b/remoting/client/plugin/BUILD.gn
@@ -58,6 +58,7 @@ "//remoting/signaling", "//third_party/libyuv", "//third_party/webrtc/modules/desktop_capture:primitives", + "//third_party/webrtc/system_wrappers:metrics_default", "//ui/events:dom_keycode_converter", ]
diff --git a/sandbox/linux/BUILD.gn b/sandbox/linux/BUILD.gn index 754fe5a..6f43c6cb 100644 --- a/sandbox/linux/BUILD.gn +++ b/sandbox/linux/BUILD.gn
@@ -319,6 +319,25 @@ # TODO fix this and re-enable this warning. "-Wno-sign-compare", ] + + import("//build/config/compiler/compiler.gni") + import("//build/config/sanitizers/sanitizers.gni") + if (is_component_build || using_sanitizer) { + # WARNING! We remove this config so that we don't accidentally + # pick up the //build/config:rpath_for_built_shared_libraries + # sub-config. However, this means that we need to duplicate any + # other flags that executable_config might have. + configs -= [ "//build/config:executable_config" ] + if (!use_gold) { + ldflags = [ "-Wl,--disable-new-dtags" ] + } + } + + # We also do not want to pick up any of the other sanitizer + # flags (i.e. we do not want to build w/ the sanitizers at all). + # This is safe to delete unconditionally, because it is part of the + # default configs and empty when not using the sanitizers. + configs -= [ "//build/config/sanitizers:default_sanitizer_flags" ] } }
diff --git a/sandbox/win/src/process_mitigations_dyncode_unittest.cc b/sandbox/win/src/process_mitigations_dyncode_unittest.cc index 95ea4ee6..d78e8110 100644 --- a/sandbox/win/src/process_mitigations_dyncode_unittest.cc +++ b/sandbox/win/src/process_mitigations_dyncode_unittest.cc
@@ -406,6 +406,11 @@ if (base::win::GetVersion() < base::win::VERSION_WIN8_1) return; +// TODO(crbug.com/805414): Windows ASan hotpatching requires dynamic code. +#if defined(ADDRESS_SANITIZER) + return; +#endif + base::string16 test_command = L"CheckPolicy "; test_command += std::to_wstring(TESTPOLICY_DYNAMICCODE); @@ -487,6 +492,11 @@ if (base::win::GetVersion() < base::win::VERSION_WIN10_RS1) return; +// TODO(crbug.com/805414): Windows ASan hotpatching requires dynamic code. +#if defined(ADDRESS_SANITIZER) + return; +#endif + base::string16 test_command = L"CheckPolicy "; test_command += std::to_wstring(TESTPOLICY_DYNAMICCODEOPTOUT);
diff --git a/services/network/BUILD.gn b/services/network/BUILD.gn index 0dbc6811..847a7090 100644 --- a/services/network/BUILD.gn +++ b/services/network/BUILD.gn
@@ -199,6 +199,7 @@ "keepalive_statistics_recorder_unittest.cc", "network_change_manager_unittest.cc", "network_context_unittest.cc", + "network_service_network_delegate_unittest.cc", "network_service_unittest.cc", "network_usage_accumulator_unittest.cc", "proxy_config_service_mojo_unittest.cc",
diff --git a/services/network/network_service_network_delegate.cc b/services/network/network_service_network_delegate.cc index c15e651..e7e27bc 100644 --- a/services/network/network_service_network_delegate.cc +++ b/services/network/network_service_network_delegate.cc
@@ -56,4 +56,12 @@ return true; } +bool NetworkServiceNetworkDelegate::OnCanEnablePrivacyMode( + const GURL& url, + const GURL& site_for_cookies) const { + return !network_context_->cookie_manager() + ->cookie_settings() + .IsCookieAccessAllowed(url, site_for_cookies); +} + } // namespace network
diff --git a/services/network/network_service_network_delegate.h b/services/network/network_service_network_delegate.h index 72f8769..f95d17f 100644 --- a/services/network/network_service_network_delegate.h +++ b/services/network/network_service_network_delegate.h
@@ -5,6 +5,7 @@ #ifndef SERVICES_NETWORK_NETWORK_SERVICE_NETWORK_DELEGATE_H_ #define SERVICES_NETWORK_NETWORK_SERVICE_NETWORK_DELEGATE_H_ +#include "base/component_export.h" #include "base/macros.h" #include "net/base/network_delegate_impl.h" @@ -12,7 +13,8 @@ class NetworkContext; -class NetworkServiceNetworkDelegate : public net::NetworkDelegateImpl { +class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkServiceNetworkDelegate + : public net::NetworkDelegateImpl { public: // |network_context| is guaranteed to outlive this class. explicit NetworkServiceNetworkDelegate(NetworkContext* network_context); @@ -27,6 +29,8 @@ bool OnCanAccessFile(const net::URLRequest& request, const base::FilePath& original_path, const base::FilePath& absolute_path) const override; + bool OnCanEnablePrivacyMode(const GURL& url, + const GURL& site_for_cookies) const override; NetworkContext* network_context_;
diff --git a/services/network/network_service_network_delegate_unittest.cc b/services/network/network_service_network_delegate_unittest.cc new file mode 100644 index 0000000..ecf96e2 --- /dev/null +++ b/services/network/network_service_network_delegate_unittest.cc
@@ -0,0 +1,93 @@ +// Copyright 2018 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 "services/network/network_service_network_delegate.h" + +#include "base/test/scoped_task_environment.h" +#include "services/network/network_context.h" +#include "services/network/network_service.h" +#include "testing/gtest/include/gtest/gtest.h" + +namespace network { +namespace { + +const GURL kURL("http://foo.com"); +const GURL kOtherURL("http://other.com"); + +class NetworkServiceNetworkDelegateTest : public testing::Test { + public: + NetworkServiceNetworkDelegateTest() + : network_service_(NetworkService::CreateForTesting()) { + mojom::NetworkContextPtr network_context_ptr; + network_context_ = std::make_unique<NetworkContext>( + network_service_.get(), mojo::MakeRequest(&network_context_ptr), + mojom::NetworkContextParams::New()); + } + + void SetContentSetting(const GURL& primary_pattern, + const GURL& secondary_pattern, + ContentSetting setting) { + network_context_->cookie_manager()->SetContentSettings( + {ContentSettingPatternSource( + ContentSettingsPattern::FromURL(primary_pattern), + ContentSettingsPattern::FromURL(secondary_pattern), + base::Value(setting), std::string(), false)}); + } + + void SetBlockThirdParty(bool block) { + network_context_->cookie_manager()->BlockThirdPartyCookies(block); + } + + NetworkContext* network_context() const { return network_context_.get(); } + + private: + base::test::ScopedTaskEnvironment scoped_task_environment_; + std::unique_ptr<NetworkService> network_service_; + std::unique_ptr<NetworkContext> network_context_; +}; + +TEST_F(NetworkServiceNetworkDelegateTest, PrivacyModeDisabledByDefault) { + NetworkServiceNetworkDelegate delegate(network_context()); + + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); +} + +TEST_F(NetworkServiceNetworkDelegateTest, PrivacyModeEnabledIfCookiesBlocked) { + NetworkServiceNetworkDelegate delegate(network_context()); + + SetContentSetting(kURL, kOtherURL, CONTENT_SETTING_BLOCK); + EXPECT_TRUE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); +} + +TEST_F(NetworkServiceNetworkDelegateTest, PrivacyModeDisabledIfCookiesAllowed) { + NetworkServiceNetworkDelegate delegate(network_context()); + + SetContentSetting(kURL, kOtherURL, CONTENT_SETTING_ALLOW); + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); +} + +TEST_F(NetworkServiceNetworkDelegateTest, + PrivacyModeDisabledIfCookiesSettingForOtherURL) { + NetworkServiceNetworkDelegate delegate(network_context()); + + // URLs are switched so setting should not apply. + SetContentSetting(kOtherURL, kURL, CONTENT_SETTING_BLOCK); + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); +} + +TEST_F(NetworkServiceNetworkDelegateTest, + PrivacyModeEnabledIfThirdPartyCookiesBlocked) { + NetworkServiceNetworkDelegate delegate(network_context()); + + SetBlockThirdParty(true); + EXPECT_TRUE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kURL)); + + SetBlockThirdParty(false); + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kOtherURL)); + EXPECT_FALSE(delegate.CanEnablePrivacyMode(kURL, kURL)); +} + +} // namespace +} // namespace network
diff --git a/storage/browser/fileapi/sandbox_directory_database.cc b/storage/browser/fileapi/sandbox_directory_database.cc index d94b8188..b2660c9 100644 --- a/storage/browser/fileapi/sandbox_directory_database.cc +++ b/storage/browser/fileapi/sandbox_directory_database.cc
@@ -24,6 +24,7 @@ #include "storage/browser/fileapi/file_system_usage_cache.h" #include "storage/common/fileapi/file_system_util.h" #include "third_party/leveldatabase/env_chromium.h" +#include "third_party/leveldatabase/leveldb_chrome.h" #include "third_party/leveldatabase/src/include/leveldb/db.h" #include "third_party/leveldatabase/src/include/leveldb/write_batch.h" @@ -760,7 +761,7 @@ FALLTHROUGH; case DELETE_ON_CORRUPTION: LOG(WARNING) << "Clearing SandboxDirectoryDatabase."; - if (!base::DeleteFile(filesystem_data_directory_, true)) + if (!leveldb_chrome::DeleteDB(filesystem_data_directory_, options).ok()) return false; if (!base::CreateDirectory(filesystem_data_directory_)) return false;
diff --git a/testing/buildbot/chromium.fyi.json b/testing/buildbot/chromium.fyi.json index 8df0f6c9..78d9f18 100644 --- a/testing/buildbot/chromium.fyi.json +++ b/testing/buildbot/chromium.fyi.json
@@ -814,33 +814,6 @@ } ] }, - "Dummy WebKit Mac10.13": { - "isolated_scripts": [ - { - "isolate_name": "webkit_layout_tests_exparchive", - "merge": { - "args": [ - "--verbose" - ], - "script": "//third_party/blink/tools/merge_web_test_results.py" - }, - "name": "webkit_layout_tests", - "only_retry_failed_tests": true, - "results_handler": "layout tests", - "swarming": { - "can_use_on_swarming_builders": true, - "dimension_sets": [ - { - "gpu": "8086:0a2e", - "os": "Mac-10.13" - } - ], - "hard_timeout": 900, - "shards": 12 - } - } - ] - }, "Fuchsia": { "additional_compile_targets": [ "gn_all" @@ -7731,7 +7704,7 @@ "dimension_sets": [ { "gpu": "none", - "os": "Mac-10.10.5" + "os": "Mac-10.10" } ], "shards": 12 @@ -7757,7 +7730,7 @@ "dimension_sets": [ { "gpu": "none", - "os": "Mac-10.11.6" + "os": "Mac-10.11" } ], "shards": 12 @@ -7782,8 +7755,9 @@ "can_use_on_swarming_builders": true, "dimension_sets": [ { - "gpu": "none", - "os": "Mac-10.12.6" + "gpu": "8086:0a2e", + "hidpi": "0", + "os": "Mac-10.12" } ], "shards": 12 @@ -7808,9 +7782,9 @@ "can_use_on_swarming_builders": true, "dimension_sets": [ { - "gpu": "1002:6821", + "gpu": "8086:0a2e", "hidpi": "1", - "os": "Mac-10.12.6", + "os": "Mac-10.12", "pool": "Chrome-GPU" } ], @@ -7837,6 +7811,7 @@ "dimension_sets": [ { "gpu": "8086:0a2e", + "hidpi": "0", "os": "Mac-10.13" } ],
diff --git a/testing/buildbot/test_suite_exceptions.pyl b/testing/buildbot/test_suite_exceptions.pyl index 4caefcae..aadd3357 100644 --- a/testing/buildbot/test_suite_exceptions.pyl +++ b/testing/buildbot/test_suite_exceptions.pyl
@@ -2601,11 +2601,6 @@ ], 'modifications': { # chromium.fyi - 'Dummy WebKit Mac10.13': { - 'swarming': { - 'shards': 12, - }, - }, 'linux-blink-gen-property-trees': { 'args': [ '--debug', @@ -2618,6 +2613,60 @@ '--additional-driver-flag=--enable-blink-features=HeapIncrementalMarkingStress', ], }, + 'mac10.10-blink-rel-dummy': { + 'swarming': { + 'dimension_sets': [ + { # This should match Mac10.10 Tests on chromium.mac. + 'gpu': 'none', + 'os': 'Mac-10.10', + } + ] + }, + }, + 'mac10.11-blink-rel-dummy': { + 'swarming': { + 'dimension_sets': [ + { # This should match Mac10.11 Tests on chromium.mac. + 'gpu': 'none', + 'os': 'Mac-10.11', + } + ] + }, + }, + 'mac10.12-blink-rel-dummy': { + 'swarming': { + 'dimension_sets': [ + { # This should match Mac10.12 Tests on chromium.mac. + 'gpu': '8086:0a2e', + 'hidpi': '0', + 'os': 'Mac-10.12', + }, + ], + }, + }, + 'mac10.12_retina-blink-rel-dummy': { + 'swarming': { + 'dimension_sets': [ + { # This should match WebKit Mac10.12 (retina) on chromium.webkit. + 'gpu': '8086:0a2e', + 'hidpi': '1', + 'os': 'Mac-10.12', + }, + ], + }, + }, + 'mac10.13-blink-rel-dummy': { + 'swarming': { + 'dimension_sets': [ + { # This should match Chromium Mac 10.13 on chromium.fyi. + 'gpu': '8086:0a2e', + 'hidpi': '0', + 'os': 'Mac-10.13', + }, + ], + 'shards': 12, + }, + }, 'WebKit Linux layout_ng Dummy Builder': { 'args': [ '--additional-driver-flag=--enable-blink-features=LayoutNG',
diff --git a/testing/buildbot/waterfalls.pyl b/testing/buildbot/waterfalls.pyl index 2f5949a..7292463 100644 --- a/testing/buildbot/waterfalls.pyl +++ b/testing/buildbot/waterfalls.pyl
@@ -2180,24 +2180,6 @@ 'isolated_scripts': 'chromium_webkit_isolated_scripts', }, }, - 'Dummy WebKit Mac10.13': { - # TODO(dpranke): Remove this builder after trybots.py has been updated. - 'swarming': { - 'dimension_sets': [ - { - # This matches the dimensions for "Chromium Mac10.13" in - # chromium_fyi.py. - 'gpu': '8086:0a2e', - 'os': 'Mac-10.13', - }, - ], - 'hard_timeout': 900, - }, - 'test_suites': { - 'isolated_scripts': 'webkit_layout_tests_isolated_scripts', - }, - }, - 'Fuchsia': { 'additional_compile_targets': [ 'gn_all',
diff --git a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees index c9637867..5b9bf04 100644 --- a/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees +++ b/third_party/WebKit/LayoutTests/FlagExpectations/enable-blink-gen-property-trees
@@ -133,6 +133,10 @@ Bug(none) xmlviewer/ [ Skip ] Bug(none) xr/ [ Skip ] +# These tests should also pass. TODO(pdr): Enable these tests. +Bug(none) virtual/scroll_customization/ [ Skip ] +Bug(none) virtual/threaded/ [ Skip ] + # These tests failed in normal mode but are fixed with BlinkGenPropertyTrees. Bug(none) compositing/overflow/clip-escaping-reverse-order-should-not-crash.html [ Pass ] Bug(none) compositing/overflow/composited-scroll-with-fractional-translation.html [ Pass ] @@ -154,6 +158,7 @@ crbug.com/836897 virtual/threaded/transitions/transition-end-event-destroy-iframe.html [ Timeout ] crbug.com/836897 virtual/threaded/fast/animationworklet/animation-worklet-animator-with-options.html [ Failure ] crbug.com/836897 virtual/threaded/fast/animationworklet/worklet-animation-currentTime.html [ Failure ] +crbug.com/836897 virtual/threaded/fast/animationworklet/animation-worklet-scroll-timeline-overflow-hidden.html [ Crash ] # These scrollbar tests should pass. Bug(none) virtual/prefer_compositing_to_lcd_text/scrollbars/ [ Pass ] @@ -166,6 +171,7 @@ crbug.com/836912 compositing/scrollbars/nested-overlay-scrollbars.html [ Failure ] crbug.com/836912 compositing/squashing/vertical-writing-mode-squashed.html [ Failure ] crbug.com/836912 compositing/squashing/no-squashing-into-another-clip-layer.html [ Pass Failure ] +crbug.com/836912 paint/overflow/composited-scroll-vertical-rl.html [ Failure ] # These scrolling tests should pass. Bug(none) virtual/threaded/fast/scrolling [ Pass ] @@ -299,6 +305,13 @@ Bug(none) compositing/overflow/scaled-overflow.html [ Failure ] Bug(none) compositing/overflow/tiled-mask.html [ Failure ] +# Subpixel differences on text. Likely benign. +Bug(none) css3/blending/background-blend-mode-overlapping-accelerated-elements.html [ Failure ] + +# Backdrop filters are not working. +crbug.com/854189 css3/filters/backdrop-filter-rendering-no-background.html [ Failure ] +crbug.com/854189 css3/filters/backdrop-filter-rendering.html [ Failure ] + # Incorrect clipping. crbug.com/844429 compositing/culling/tile-occlusion-boundaries.html [ Failure ] @@ -375,15 +388,6 @@ Bug(none) compositing/video/video-controls-layer-creation.html [ Failure Pass ] Bug(none) compositing/visibility/visibility-image-layers.html [ Failure ] -# These tests should also pass. TODO(pdr): Enable these tests. -Bug(none) virtual/scroll_customization/ [ Skip ] -Bug(none) virtual/threaded/ [ Skip ] -Bug(none) fast/ [ Skip ] -Bug(none) images/ [ Skip ] -Bug(none) paint/ [ Skip ] -Bug(none) svg/ [ Skip ] -Bug(none) css3/ [ Skip ] - # Rounded borders have slightly different antialiasing Bug(none) compositing/composited-scaled-child-with-border-radius-parent-clip.html [ Failure ] Bug(none) compositing/composited-translated-child-with-border-radius-parent-clip.html [ Failure ] @@ -400,6 +404,8 @@ Bug(none) compositing/overflow/siblings-composited-with-border-radius-ancestor-one-clipped.html [ Failure ] Bug(none) compositing/overflow/siblings-with-border-radius-ancestor.html [ Failure ] Bug(none) compositing/overflow/update-widget-positions-on-nested-frames-and-scrollers.html [ Crash Failure ] +Bug(none) fast/clip/overflow-border-radius-composited-parent.html [ Failure ] +Bug(none) fast/clip/overflow-border-radius-composited.html [ Failure ] # These test are flaky in various ways Bug(none) fast/events/hr-timestamp/input-events.html [ Failure Pass ] @@ -460,3 +466,184 @@ Bug(none) fast/events/keydown-keypress-focus-change.html [ Failure Pass ] Bug(none) fast/events/onchange-searchfield.html [ Failure Pass ] Bug(none) virtual/threaded/fast/scrolling/scrollbar-tickmarks-styled.html [ Crash Failure Pass ] + +# Something wrong with vertical-rl scrollbars +crbug.com/853945 fast/block/positioning/vertical-rl/002.html [ Failure ] + +# Border radius mask wrong. +crbug.com/853943 fast/borders/border-radius-mask-canvas-all.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-canvas-border.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-canvas-padding.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-canvas-with-mask.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-canvas-with-shadow.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-canvas.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-video-ratio.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-video-shadow.html [ Failure ] +crbug.com/853943 fast/borders/border-radius-mask-video.html [ Failure ] +crbug.com/853943 fast/borders/overflow-hidden-border-radius-force-backing-store.html [ Failure ] + +# Something with the pattern is wrong. Needs investigation. +crbug.com/853947 fast/canvas/synchronous-create-pattern.html [ Failure ] + +# Form-related popup tests are crashing. +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-ar.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-coarse.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-minimum-date.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-required-ar.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-required.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-ru.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-zoom125.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance-zoom200.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-date-types.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-datetimelocal-with-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-datetimelocal.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-pre-100-year.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-should-not-change-datetimelocal-time.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-touch-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-type-change-onchange.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/calendar-picker-with-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/date-open-picker-with-f4-key.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/date-picker-ax.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/date-picker-choose-default-value-after-set-value.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/date-picker-events.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/datetimelocal-change-type-on-input-crash.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/datetimelocal-open-picker-with-f4-key.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/datetimelocal-picker-choose-default-value-after-set-value.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/datetimelocal-picker-events.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-open-picker-with-f4-key.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-appearance-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-ax.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-choose-default-value-after-set-value.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-touch-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/month-picker-with-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-open-picker-with-f4-key.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-appearance-step.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-ax.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-choose-default-value-after-set-value.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-close-no-crash.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/calendar-picker/week-picker-touch-operations.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-appearance-value-attribute.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-appearance-zoom125.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-appearance-zoom200.html [ Pass Failure Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-crash-on-set-value.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-one-row-appearance.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-two-row-appearance.html [ Crash ] +crbug.com/853951 fast/forms/color/color-suggestion-picker-with-scrollbar-appearance.html [ Pass Failure Crash ] +crbug.com/853951 fast/forms/page-popup/page-popup-adjust-rect.html [ Crash ] +crbug.com/853951 fast/forms/page-popup/page-popup-hide-window.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-coarse.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-empty.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-fractional-width.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-long.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-many.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-minimum-font.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-rtl-default.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-single-option.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-styled.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-tall.html [ Pass Failure Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-texttransform.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-transform.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-zoom.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-zoom090.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance-zoom110.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-appearance.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-ax.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-crash-on-cancel.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-crash-on-close.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-crash-on-select.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-crash-on-style-update.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-event-order.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-font-face.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-multiline-title.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-nested-style.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-non-latin-update-from-element.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-open-partially-visible.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-position.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-resize-after-open.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-size.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-touch-operations.html [ Crash ] +crbug.com/853951 fast/forms/select-popup/popup-menu-update-from-element.html [ Crash ] +crbug.com/853951 fast/forms/select/menulist-popup-item-style.html [ Crash ] +crbug.com/853951 fast/forms/select/menulist-popup-open-hide-using-keyboard.html [ Crash ] +crbug.com/853951 fast/forms/select/menulist-popup-type-ahead-style-change.html [ Crash ] +crbug.com/853951 fast/forms/select/menulist-update-text-popup.html [ Crash ] +crbug.com/853951 fast/forms/select/optgroup-clicking.html [ Crash ] +crbug.com/853951 fast/forms/select/select-popup-close-no-crash.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-appearance-with-scroll-bar.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom125.html [ Pass Failure Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-appearance-zoom200.html [ Pass Failure Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-min-max-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-reset-value-after-reload.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/date-suggestion-picker-step-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-locale-hebrew.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance-with-scroll-bar.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-min-max-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-reset-value-after-reload.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/datetimelocal-suggestion-picker-step-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-appearance-with-scroll-bar.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-min-max-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-reset-value-after-reload.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/month-suggestion-picker-step-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-appearance-locale-hebrew.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-appearance-with-scroll-bar.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-min-max-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/time-suggestion-picker-step-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-appearance-rtl.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-appearance-with-scroll-bar.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-appearance.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-key-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-min-max-attribute.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-mouse-operations.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-reset-value-after-reload.html [ Crash ] +crbug.com/853951 fast/forms/suggestion-picker/week-suggestion-picker-step-attribute.html [ Crash ] + +# Composited multicolumn paints differently. +crbug.com/854192 fast/multicol/composited-layer-nested.html [ Failure ] +crbug.com/854192 fast/multicol/vertical-rl/composited-relpos-overlapping-will-change.html [ Failure ] +crbug.com/854192 paint/pagination/composited-paginated-outlined-box.html [ Failure ] + +# Crash due to layer bounds DCHECK. +crbug.com/854194 fast/multicol/short-columns-insane-unbreakable-content-height-crash.html [ Crash ] + +# Image layers are not scaled. +crbug.com/854195 images/color-profile-layer.html [ Failure ] +crbug.com/854195 images/pixelated-composited.html [ Failure ] + +# Paint invalidation test failures. Needs investigation. +crbug.com/854196 paint/invalidation/compositing/clipping-should-not-repaint-composited-descendants.html [ Failure ] +crbug.com/854196 paint/invalidation/compositing/overlap-test-with-filter.html [ Failure ] +crbug.com/854196 paint/invalidation/compositing/repaint-overflow-scrolled-squashed-content.html [ Failure ] +crbug.com/854196 paint/invalidation/compositing/should-not-repaint-composited-descendants-on-overflow-change.html [ Failure ] +crbug.com/854196 paint/invalidation/compositing/should-not-repaint-composited-descendants.html [ Failure ] +crbug.com/854196 paint/invalidation/scroll/overflow-scroll-composited-non-stacking-child.html [ Failure ] +crbug.com/854196 paint/invalidation/scroll/repaint-composited-child-in-scrolled-container.html [ Failure ]
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index e01ad0e..f6fcc820 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -1241,8 +1241,6 @@ crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flex-justify-content.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flex-no-flex.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flex-one-sets-flex-basis-to-zero-px.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flex-percentage-height-in-table-standards-mode.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flex-percentage-height-in-table.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flexbox-baseline-margins.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flexbox-baseline.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/flexbox-height-with-overflow-auto.html [ Skip ] @@ -1326,7 +1324,6 @@ crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/width-change-and-relayout-children.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/wrapping-column-dynamic-changes.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/writing-modes.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/z-index.html [ Failure ] ### virtual/layout_ng_experimental/css3/flexbox/mozilla/ crbug.com/591099 virtual/layout_ng_experimental/css3/flexbox/mozilla/flexbox-items-as-stacking-contexts-2.html [ Failure ] @@ -1343,35 +1340,28 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/abspos-autopos-vrl-ltr.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/abspos-autopos-vrl-rtl.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-001.htm [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-002.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-003.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-004.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-005.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-content-006.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-001.htm [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-002.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-003.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-004.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-005.htm [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-items-006.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-001.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-002.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-003.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-004.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-005.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-007.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-008.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-009.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-011.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-012.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/align-self-013.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/anonymous-flex-item-001.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/anonymous-flex-item-003.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/anonymous-flex-item-004.html [ Skip ] crbug.com/807497 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/anonymous-flex-item-005.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/anonymous-flex-item-006.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/auto-margins-001.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/css-box-justify-content.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/css-flexbox-column-reverse-wrap-reverse.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/css-flexbox-column-reverse-wrap.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/css-flexbox-column-reverse.html [ Skip ] @@ -1399,21 +1389,13 @@ crbug.com/467127 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-aspect-ratio-img-row-001.html [ Failure ] crbug.com/467127 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-aspect-ratio-img-row-002.html [ Failure ] crbug.com/467127 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-aspect-ratio-img-row-003.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-002.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-003.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-004.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-005.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-006.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-basis-008.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-box-wrap.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-container-margin.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-direction-with-element-insert.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-direction.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flexitem-childmargin.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flexitem-percentage-prescation.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-002.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-003.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-005.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-006.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-007.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-008.html [ Skip ] @@ -1423,8 +1405,6 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-flow-012.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-001.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-002.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-003.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-004.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-005.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-006.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-grow-007.html [ Failure ] @@ -1447,13 +1427,8 @@ crbug.com/249112 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-minimum-width-flex-items-007.xht [ Failure ] crbug.com/467127 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-minimum-width-flex-items-008.xht [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-order.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-001.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-002.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-003.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-004.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-005.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-006.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-007.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-shrink-008.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flex-vertical-align-effect.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox-flex-direction-column-reverse.htm [ Skip ] @@ -1490,11 +1465,8 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_align-self-flexstart.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_align-self-stretch.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_box-clear.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_columns-flexitems-2.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_columns-flexitems.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_direction-column-reverse.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_direction-column.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_direction-row-reverse.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_fbfc.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_fbfc2.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_first-line.html [ Failure ] @@ -1629,15 +1601,11 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_margin-auto.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_margin-collapse.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_margin-left-ex.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_margin.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_nested-flex.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_order-abspos-space-around.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_order-box.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_order.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_quirks_body.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rowspan-overflow-automatic.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rowspan-overflow.html [ Failure ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rowspan.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rtl-direction.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rtl-flow-reverse.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/flexbox_rtl-flow.html [ Skip ] @@ -1670,7 +1638,6 @@ crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/position-absolute-001.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/position-absolute-002.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/position-absolute-003.html [ Skip ] -crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/position-absolute-004.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/position-absolute-005.html [ Skip ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/table-as-item-auto-min-width.html [ Failure ] crbug.com/591099 virtual/layout_ng_experimental/external/wpt/css/css-flexbox/table-as-item-change-cell.html [ Skip ]
diff --git a/third_party/WebKit/LayoutTests/accessibility/option-removed-from-shadow-dom-crash.html b/third_party/WebKit/LayoutTests/accessibility/option-removed-from-shadow-dom-crash.html new file mode 100644 index 0000000..67e429d --- /dev/null +++ b/third_party/WebKit/LayoutTests/accessibility/option-removed-from-shadow-dom-crash.html
@@ -0,0 +1,44 @@ +<!DOCTYPE HTML> +<script src="../resources/testharness.js"></script> +<script src="../resources/testharnessreport.js"></script> + +<script> +/* doc > span */ +const spanElem = document.createElement('span'); +document.documentElement.appendChild(spanElem); + +// span > #shadowRoot +const shadowRoot = spanElem.createShadowRoot(); +shadowRoot.appendChild(document.createElement('content')); + +// "Hello" +const textNode1 = document.createTextNode('Hello'); +spanElem.appendChild(textNode1); + +// div > select > option +const divElem = document.createElement('div'); +divElem.innerHTML = "<select><option></select>"; +spanElem.appendChild(divElem); + +// Perform a layout. +divElem.offsetWidth; + +// "World" +const textNode2 = document.createTextNode('World'); +spanElem.appendChild(textNode2); + +// Now we have: +/* doc + * span + * #shadowRoot + * "Hello" <-- REMOVE FIRST + * div > select > option <-- REMOVE OPTION NEXT + * "World" + */ +textNode1.remove(); + +test(function(t) { + document.querySelector("option").remove(); +}, "Removing an option inside a shadow dom shouldn't crash"); + +</script> \ No newline at end of file
diff --git a/third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-videos-expected.txt b/third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-videos-expected.txt index e96d59e..d0dce57 100644 --- a/third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-videos-expected.txt +++ b/third_party/WebKit/LayoutTests/compositing/squashing/dont-squash-into-videos-expected.txt
@@ -29,6 +29,11 @@ }, { "name": "LayoutBlockFlow (positioned) DIV", + "bounds": [100, 100], + "drawsContent": false + }, + { + "name": "LayoutBlockFlow (positioned) DIV", "position": [50, 50], "bounds": [200, 200], "contentsOpaque": true,
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/5115601-expected.txt b/third_party/WebKit/LayoutTests/editing/deleting/5115601-expected.txt deleted file mode 100644 index d060b6a..0000000 --- a/third_party/WebKit/LayoutTests/editing/deleting/5115601-expected.txt +++ /dev/null
@@ -1,13 +0,0 @@ -This tests to make sure that after a deletion, merging can merge into an editable region that's embedded in non-editable content that is collapsed by the deletion. -| " -" -| <table> -| border="1" -| contenteditable="false" -| <tbody> -| <tr> -| <td> -| <span> -| contenteditable="true" -| id="start" -| "<#selection-caret>This sentence should be inside the editable cell."
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/5115601.html b/third_party/WebKit/LayoutTests/editing/deleting/5115601.html index 0cd23d5..6737e11 100644 --- a/third_party/WebKit/LayoutTests/editing/deleting/5115601.html +++ b/third_party/WebKit/LayoutTests/editing/deleting/5115601.html
@@ -1,23 +1,28 @@ <!DOCTYPE html> -<html> -<body> -<p id="description">This tests to make sure that after a deletion, merging can merge into an editable region that's embedded in non-editable content that is collapsed by the deletion.</p> -<div id="root" contenteditable="true"> -<table border="1" contenteditable="false"><tr><td><span id="start" contenteditable="true">foo</span></td></tr></table><span id="end">x</span>This sentence should be inside the editable cell. -</div> - -<script src="../../resources/dump-as-markup.js"></script> +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> +<script src="../assert_selection.js"></script> <script> -var start = document.getElementById("start"); -var end = document.getElementById("end"); -var sel = window.getSelection(); -var range = document.createRange(); -range.setStart(start, 0); -range.setEnd(end, end.childNodes.length); -sel.addRange(range); -document.execCommand("Delete"); -Markup.description(description.textContent); -Markup.dump("root"); +selection_test( + [ '<div contenteditable>', + '<table border="1" contenteditable="false">', + '<tr><td>', + '<span contenteditable>^foo</span>', + '</td></tr>', + '</table>', + '<span>x|</span>This sentence should be inside the editable cell.', + '</div>', + ], + 'delete', + [ '<div contenteditable>', + '<table border="1" contenteditable="false">', + '<tbody><tr><td>', + '<span contenteditable>|This sentence should be inside the editable cell.</span>', + '</td></tr></tbody>', + '</table>', + '</div>', + ], + 'This tests to make sure that after a deletion, merging can merge into an editable' ++ ' region that\'s embedded in non-editable content that is collapsed by the deletion.' +); </script> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt b/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt deleted file mode 100644 index 3bcbd67..0000000 --- a/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2-expected.txt +++ /dev/null
@@ -1,26 +0,0 @@ -This tests to see that selected non-editable nodes that are not in both the start and end editable root are preserved during a deletion. You should see two 'Non-editable' pieces on either side of the editable piece below. <radr://problem/5026848> -| " -" -| <table> -| contenteditable="false" -| " - " -| <tbody> -| <tr> -| " - " -| <td> -| "Non-editable" -| " - " -| <td> -| contenteditable="true" -| "Editable <#selection-caret>content" -| " - " -| <td> -| "Non-editable" -| " - " -| " -"
diff --git a/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2.html b/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2.html index 97222ba..8d20b89b 100644 --- a/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2.html +++ b/third_party/WebKit/LayoutTests/editing/deleting/delete-across-editable-content-boundaries-2.html
@@ -1,28 +1,33 @@ <!DOCTYPE html> -<html> -<body> -<p id="description">This tests to see that selected non-editable nodes that are not in both the start and end editable root are preserved during a deletion. You should see two 'Non-editable' pieces on either side of the editable piece below. <radr://problem/5026848></p> -<div id="div" contenteditable="true"> -<table contenteditable="false"> - <tr> - <td>Non-editable</td> - <td contenteditable="true">Editable <span id="start">content</span></td> - <td>Non-editable</td> - </tr> -</table> -Editable <span id="end">content</span> -</div> - -<script src="../../resources/dump-as-markup.js"></script> +<script src="../../resources/testharness.js"></script> +<script src="../../resources/testharnessreport.js"></script> +<script src="../assert_selection.js"></script> <script> -var sel = window.getSelection(); -var start = document.getElementById("start"); -var end = document.getElementById("end"); -sel.setBaseAndExtent(start, 0, end, 0); -document.execCommand("Delete"); -Markup.description(description.textContent); -Markup.dump("div"); +selection_test( + [ '<div contenteditable>', + '<table contenteditable="false">', + '<tr>', + '<td>foo</td>', + '<td contenteditable>bar <span>|baz</span></td>', + '<td>qux</td>', + '</tr>', + '</table>', + 'Editable <span>^content</span>', + '</div>', + ], + 'delete', + [ '<div contenteditable>', + '<table contenteditable="false">', + '<tbody><tr>', + '<td>foo</td>', + '<td contenteditable>bar |content</td>', + '<td>qux</td>', + '</tr></tbody>', + '</table>', + '</div>', + ], + 'This tests to see that selected non-editable nodes that are not in both the start' ++ ' and end editable root are preserved during a deletion. You should see "foo" and' ++ ' "qux" on both sides of the editable piece. <radr://problem/5026848>' +); </script> - -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl index 45c0149..73b55b3 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl +++ b/third_party/WebKit/LayoutTests/external/wpt/interfaces/webxr.idl
@@ -47,9 +47,9 @@ attribute EventHandler onend; }; -callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRPresentationFrame frame); +callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame); -[SecureContext, Exposed=Window] interface XRPresentationFrame { +[SecureContext, Exposed=Window] interface XRFrame { readonly attribute FrozenArray<XRView> views; XRDevicePose? getDevicePose(XRCoordinateSystem coordinateSystem);
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-createDataChannel-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-createDataChannel-expected.txt index 310fd9b1..ef18d82 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-createDataChannel-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-createDataChannel-expected.txt
@@ -2,7 +2,7 @@ PASS createDataChannel with no argument should throw TypeError PASS createDataChannel with closed connection should throw InvalidStateError FAIL createDataChannel attribute default values assert_equals: expected (object) null but got (undefined) undefined -FAIL createDataChannel with provided parameters should initialize attributes to provided values assert_equals: expected (object) null but got (undefined) undefined +FAIL createDataChannel with provided parameters should initialize attributes to provided values Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported PASS createDataChannel with label "foo" should succeed PASS createDataChannel with label null should succeed PASS createDataChannel with label undefined should succeed @@ -14,7 +14,7 @@ FAIL createDataChannel with both maxPacketLifeTime and maxRetransmits should throw SyntaxError assert_throws: function "() => pc.createDataChannel('', { maxPacketLifeTime: 0, maxRetransmits: 0 - })" did not throw + })" threw object "NotSupportedError: Failed to execute 'createDataChannel' on 'RTCPeerConnection': RTCDataChannel is not supported" ("NotSupportedError") expected object "TypeError" ("TypeError") PASS createDataChannel with protocol "foo" should succeed PASS createDataChannel with protocol null should succeed PASS createDataChannel with protocol undefined should succeed
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/interfaces.https-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/webxr/interfaces.https-expected.txt index 0bacd06..36cfae2 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webxr/interfaces.https-expected.txt +++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/interfaces.https-expected.txt
@@ -59,16 +59,16 @@ PASS Unscopable handled correctly for onresetpose property on XRSession PASS XRSession interface: attribute onend PASS Unscopable handled correctly for onend property on XRSession -PASS XRPresentationFrame interface: existence and properties of interface object -PASS XRPresentationFrame interface object length -PASS XRPresentationFrame interface object name -PASS XRPresentationFrame interface: existence and properties of interface prototype object -PASS XRPresentationFrame interface: existence and properties of interface prototype object's "constructor" property -PASS XRPresentationFrame interface: existence and properties of interface prototype object's @@unscopables property -PASS XRPresentationFrame interface: attribute views -PASS Unscopable handled correctly for views property on XRPresentationFrame -PASS XRPresentationFrame interface: operation getDevicePose(XRCoordinateSystem) -PASS Unscopable handled correctly for getDevicePose(XRCoordinateSystem) on XRPresentationFrame +PASS XRFrame interface: existence and properties of interface object +PASS XRFrame interface object length +PASS XRFrame interface object name +PASS XRFrame interface: existence and properties of interface prototype object +PASS XRFrame interface: existence and properties of interface prototype object's "constructor" property +PASS XRFrame interface: existence and properties of interface prototype object's @@unscopables property +PASS XRFrame interface: attribute views +PASS Unscopable handled correctly for views property on XRFrame +PASS XRFrame interface: operation getDevicePose(XRCoordinateSystem) +PASS Unscopable handled correctly for getDevicePose(XRCoordinateSystem) on XRFrame FAIL XRCoordinateSystem interface: existence and properties of interface object assert_equals: prototype of XRCoordinateSystem is not EventTarget expected function "function EventTarget() { [native code] }" but got function "function () { [native code] }" PASS XRCoordinateSystem interface object length PASS XRCoordinateSystem interface object name
diff --git a/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js index 388c757..5adf0a2 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js +++ b/third_party/WebKit/LayoutTests/external/wpt/webxr/resources/webxr_util.js
@@ -12,7 +12,7 @@ callback(window.XRSessionCreationOptions, 'XRSessionCreationOptions'); callback(window.XRFrameRequestCallback, 'XRFrameRequestCallback'); callback(window.XRPresentationContext, 'XRPresentationContext'); - callback(window.XRPresentationFrame, 'XRPresentationFrame'); + callback(window.XRFrame, 'XRFrame'); callback(window.XRView, 'XRView'); callback(window.XRViewport, 'XRViewport'); callback(window.XRDevicePose, 'XRDevicePose');
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.html b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.js similarity index 89% rename from third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.html rename to third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.js index a45fa9e..30b48e4 100644 --- a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.html +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.js
@@ -1,9 +1,3 @@ -<!DOCTYPE html> -<title>DedicatedWorker: import</title> -<script src="/resources/testharness.js"></script> -<script src="/resources/testharnessreport.js"></script> -<script> - // Starts a dedicated worker for |scriptURL| and waits until the list of // imported modules is sent from the worker. Passes if the list is equal to // |expectedImportedModules|. @@ -43,5 +37,3 @@ import_test('resources/eval-dynamic-import-worker.js', ['export-on-load-script.js'], 'eval(import()).'); - -</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.worker-expected.txt new file mode 100644 index 0000000..8d0a221 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/modules/dedicated-worker-import.any.worker-expected.txt
@@ -0,0 +1,10 @@ +This is a testharness.js-based test. +FAIL Static import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL Nested static import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL Static import and then dynamic import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL Dynamic import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL Nested dynamic import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL Dynamic import and then static import. promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +FAIL eval(import()). promise_test: Unhandled rejection with value: object "ReferenceError: Worker is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker-expected.txt new file mode 100644 index 0000000..2511953 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Test terminating a nested workers by calling terminate() from its parent worker assert_equals: expected "Pass" but got "Fail: ReferenceError: Worker is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker.html b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker.html new file mode 100644 index 0000000..57c9851 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_from_parent_worker.html
@@ -0,0 +1,15 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test terminating a nested workers by calling terminate() from its parent worker</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +async_test(function() { + const worker = new Worker("support/parent_of_nested_worker.js"); + worker.onmessage = this.step_func_done(function(e) { + assert_equals(e.data, "Pass"); + done(); + }); + worker.postMessage("close"); +}); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker-expected.txt new file mode 100644 index 0000000..69656c3 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Nested work that closes itself Worker is not defined +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker.js b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker.js new file mode 100644 index 0000000..73c87f4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_close_self.worker.js
@@ -0,0 +1,12 @@ +importScripts("/resources/testharness.js"); + +async_test(function() { + if (!self.Worker) + done(); + const worker = new Worker("support/WorkerClose.js"); + worker.onmessage = this.step_func_done(function(e) { + assert_equals(e.data, "close"); + done(); + }); + worker.postMessage("close"); +}, "Nested work that closes itself");
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker-expected.txt new file mode 100644 index 0000000..cbb6c36a --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Nested worker that calls importScripts() Worker is not defined +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker.js b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker.js new file mode 100644 index 0000000..a671ee4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_importScripts.worker.js
@@ -0,0 +1,11 @@ +importScripts("/resources/testharness.js"); + +async_test(function() { + const worker = new Worker("support/ImportScripts.js"); + worker.postMessage("ping"); + worker.onmessage = this.step_func_done(function(evt) { + assert_equals(evt.data, "Pass"); + worker.terminate(); + }); +}, "Nested worker that calls importScripts()"); +done();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker-expected.txt new file mode 100644 index 0000000..255be2c1 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Nested worker that issues a sync XHR Worker is not defined +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker.js b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker.js new file mode 100644 index 0000000..609ecc4 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_sync_xhr.worker.js
@@ -0,0 +1,11 @@ +importScripts("/resources/testharness.js"); + +async_test(function() { + const worker = new Worker("support/sync_xhr.js"); + worker.postMessage("ping"); + worker.onmessage = this.step_func_done(function(evt) { + assert_equals(evt.data, "Pass"); + worker.terminate(); + }); +}, "Nested worker that issues a sync XHR"); +done();
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document-expected.txt b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document-expected.txt new file mode 100644 index 0000000..20f4a134 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document-expected.txt
@@ -0,0 +1,4 @@ +This is a testharness.js-based test. +FAIL Test terminating a chain of nested workers by calling terminate() from the owning document assert_equals: expected "Pass" but got "Fail: ReferenceError: Worker is not defined" +Harness: the test ran to completion. +
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document.html b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document.html new file mode 100644 index 0000000..10849b3f --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/nested_worker_terminate_from_document.html
@@ -0,0 +1,14 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>Test terminating a chain of nested workers by calling terminate() from the owning document</title> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script> +async_test(function() { + const worker = new Worker("support/parent_of_nested_worker.js"); + worker.onmessage = this.step_func_done(function(e) { + assert_equals(e.data, "Pass"); + worker.terminate(); + }); +}); +</script>
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/support/parent_of_nested_worker.js b/third_party/WebKit/LayoutTests/external/wpt/workers/support/parent_of_nested_worker.js new file mode 100644 index 0000000..1f14334 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/support/parent_of_nested_worker.js
@@ -0,0 +1,14 @@ +try { + var worker = new Worker("WorkerBasic.js"); + worker.onmessage = function(e) { + if (e.data == "Pass") { + postMessage("Pass"); + } else if (e.data == "close") { + close(); + postMessage("Pass"); + } + }; + worker.postMessage("start"); +} catch (e) { + postMessage("Fail: " + e); +}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr.js b/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr.js new file mode 100644 index 0000000..5de74765 --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr.js
@@ -0,0 +1,13 @@ +try +{ + const request = new XMLHttpRequest(); + request.open("GET", "sync_xhr_target.xml", false); + request.send(); + result = request.responseText == "<foo>sometext</foo>\n" ? "Pass" : "Fail"; + postMessage(result); +} +catch(ex) +{ + result = "Fail"; + postMessage(result); +}
diff --git a/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr_target.xml b/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr_target.xml new file mode 100644 index 0000000..d31a8c5e --- /dev/null +++ b/third_party/WebKit/LayoutTests/external/wpt/workers/support/sync_xhr_target.xml
@@ -0,0 +1 @@ +<foo>sometext</foo>
diff --git a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-datachannel-expected.txt b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-datachannel-expected.txt index 2857a86..1b02504 100644 --- a/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-datachannel-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-datachannel-expected.txt
@@ -1,3 +1,4 @@ +CONSOLE WARNING: line 1: maxRetransmitTime is deprecated and will be removed in M70, around October 2018. Please use maxPacketLifeTime instead. See https://www.chromestatus.com/features/5198350873788416 for more details. Tests RTCDataChannel. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt index ff987ae..937ba4c4 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt
@@ -27,14 +27,6 @@ { "object": "LayoutBlockFlow HTML", "reason": "style change" - }, - { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='div'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/block-shift-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/block-shift-repaint-expected.txt index 4359928..7187f5a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/block-shift-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/block-shift-repaint-expected.txt
@@ -125,10 +125,6 @@ { "object": "LayoutBlockFlow DIV class='half'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='half'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clipped-relative-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clipped-relative-expected.txt index 0512f20..50831112 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clipped-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/clipped-relative-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (relative positioned) DIV id='i'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV id='inner'", "reason": "geometry" }, @@ -35,10 +31,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt index d88bb7b..d06d0d7 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (relative positioned) (floating) DIV class='imgContainer'", "reason": "geometry" }, @@ -35,10 +31,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/crbug-371640-3-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/crbug-371640-3-expected.txt index c985560..5f372a2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/crbug-371640-3-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/crbug-371640-3-expected.txt
@@ -26,22 +26,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (floating) DIV id='container'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV id='keep_child'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-change-expected.txt index 76120b2..2ad927de 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-change-expected.txt
@@ -25,16 +25,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt index c4d0f10..1e95f52 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt
@@ -30,24 +30,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-self-change-grid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-self-change-grid-expected.txt index b87d6c6..659a2be 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-self-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/align-self-change-grid-expected.txt
@@ -40,24 +40,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item3'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-change-expected.txt index 50fdd78a..2d089a7c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-change-expected.txt
@@ -35,16 +35,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt index fa0aec9b..cd1d73d9 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt
@@ -30,24 +30,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-change-expected.txt index 932b8588..b0a7398 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-change-expected.txt
@@ -23,10 +23,6 @@ { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt index d66a5ae..3aea132 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt
@@ -35,16 +35,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-self-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-self-change-expected.txt index 4cc89e2..d3c97d489 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-self-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/justify-self-change-expected.txt
@@ -40,24 +40,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item3'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt index 8e00169..acd1798 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt
@@ -40,14 +40,6 @@ { "object": "RootInlineBox", "reason": "geometry" - }, - { - "object": "LayoutBR BR", - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-move-during-layout-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-move-during-layout-expected.txt index 3eeca4d1..a559e537 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-move-during-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/float-move-during-layout-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow DIV id='s'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (floating) DIV", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt index 7f68e66c..5cd2a70 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt
@@ -16,70 +16,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutMultiColumnSet (anonymous)", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt index 16c7f35e4..773d7b35d 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -34,14 +34,6 @@ "reason": "geometry" }, { - "object": "LayoutListItem LI", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { "object": "LayoutListMarker (anonymous)", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/outline/outline-child-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/outline/outline-child-repaint-expected.txt index 4ba0d53..6733aca 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/outline/outline-child-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/outline/outline-child-repaint-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='container'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outlined'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-items-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-items-overflow-change-expected.txt index 6fd42de7..d89ac71 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-items-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-items-overflow-change-expected.txt
@@ -23,10 +23,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-self-overflow-change-expected.txt index 6fd42de7..d89ac71 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-self-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/align-self-overflow-change-expected.txt
@@ -23,10 +23,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-expected.txt index 27a31873..708fa73 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-expected.txt
@@ -593,10 +593,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -629,10 +657,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -665,10 +689,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -701,46 +721,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -773,10 +753,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -809,22 +785,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -853,22 +817,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -897,10 +849,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -913,14 +861,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -949,7 +889,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -957,6 +917,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -989,10 +953,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1025,46 +985,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1099,14 +1019,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-right-expected.txt index 32366b5..cce48181 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-right-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/float-overflow-right-expected.txt
@@ -593,10 +593,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -629,10 +657,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -665,10 +689,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -701,46 +721,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -773,10 +753,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -809,22 +785,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -853,22 +817,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -897,10 +849,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -913,14 +861,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -949,7 +889,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -957,6 +917,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -989,10 +953,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1025,46 +985,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1099,14 +1019,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-items-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-items-overflow-change-expected.txt index bff9e2ae..d8318ad 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-items-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-items-overflow-change-expected.txt
@@ -23,10 +23,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-self-overflow-change-expected.txt index fa304999..ef4368d7 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-self-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/overflow/justify-self-overflow-change-expected.txt
@@ -23,10 +23,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/align-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/align-content-position-change-grid-expected.txt index ac628e9..8341f5c 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/align-content-position-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/align-content-position-change-grid-expected.txt
@@ -45,24 +45,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-expected.txt index 61ff6a19..68e87da 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-expected.txt
@@ -35,16 +35,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-grid-expected.txt index 9391a2d..b911e79 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/justify-content-position-change-grid-expected.txt
@@ -45,24 +45,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt index a8ff153..0197f5f 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -45,10 +45,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV", "reason": "geometry" }, @@ -63,10 +59,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-document-element-expected.txt index d7efdd3c..99a5e39a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-document-element-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-document-element-expected.txt
@@ -34,10 +34,6 @@ "reason": "style change" }, { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow P", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt index 6b498454..f4b6fb4 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt
@@ -31,18 +31,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt index b53829e6..ab906992 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) UL id='list'", - "reason": "geometry" - }, - { "object": "LayoutListItem (positioned) LI", "reason": "geometry" }, @@ -39,10 +35,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/relative-margin-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/relative-margin-change-repaint-expected.txt index 68222d7e..1acad55 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/relative-margin-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/position/relative-margin-change-repaint-expected.txt
@@ -21,14 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='container'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (relative positioned) DIV id='test'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt index 7572c38..d3f14bd8 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -53,10 +53,6 @@ { "object": "InlineTextBox 'There should only be one copy of this text.'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt index 387cdd1..1d17d7b 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/destroy-composited-scrollbar-expected.txt
@@ -33,10 +33,6 @@ { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='content'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt index d9b4b39..d9656bb 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/overflow-hidden-in-overflow-hidden-scrolled-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow DIV class='innerWrapper'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='red'", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt index c779f04..737bf83a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/scroll/scroll-in-clipped-layer-expected.txt
@@ -21,10 +21,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='moveMe' class='absolute clipped'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (relative positioned) DIV class='relative green'", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/selection/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/selection/selection-clear-expected.txt index 0228206..564c7f30 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/selection/selection-clear-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/selection/selection-clear-expected.txt
@@ -60,11 +60,11 @@ }, { "object": "LayoutBR BR", - "reason": "geometry" + "reason": "selection" }, { "object": "InlineTextBox '\n'", - "reason": "geometry" + "reason": "selection" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt index 7327297..5f85294 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/text-rescale-expected.txt
@@ -98,11 +98,11 @@ }, { "object": "LayoutSVGInlineText #text", - "reason": "geometry" + "reason": "appeared" }, { "object": "LayoutSVGViewportContainer svg", - "reason": "geometry" + "reason": "appeared" }, { "object": "LayoutSVGText text",
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt index 0ce771a..1cb5afe 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/svg/window-expected.txt
@@ -1148,22 +1148,6 @@ { "object": "LayoutSVGViewportContainer svg id='minimizeButton'", "reason": "full" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", - "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-cell-append-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-cell-append-expected.txt index 34f292f..80efbf13 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-cell-append-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-cell-append-expected.txt
@@ -20,10 +20,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR id='row'", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-cell-border-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-cell-border-width-expected.txt index 04f32c1b..053cc82 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-cell-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-cell-border-width-expected.txt
@@ -20,10 +20,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-row-border-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-row-border-width-expected.txt index b3a1bcc..6186e5a 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-row-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-row-border-width-expected.txt
@@ -25,10 +25,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR id='row'", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-table-border-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-table-border-width-expected.txt index 6d7dd58..eb1bded2 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-table-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-table-border-width-expected.txt
@@ -20,10 +20,6 @@ "reason": "style change" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-tbody-border-width-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-tbody-border-width-expected.txt index 7e0d312..7ab334b 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-tbody-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/cached-change-tbody-border-width-expected.txt
@@ -63,10 +63,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt index 44627867..dcc41e3 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt
@@ -25,10 +25,6 @@ "reason": "incremental" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-cell-move-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-cell-move-expected.txt index 3a54d27..e358bdb 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-cell-move-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-cell-move-expected.txt
@@ -30,10 +30,6 @@ "reason": "appeared" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -43,19 +39,7 @@ }, { "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD id='s'", - "reason": "geometry" + "reason": "disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-overflow-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-overflow-expected.txt index 43da41e..ef53f2e 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-overflow-expected.txt
@@ -21,28 +21,12 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutTable TABLE", - "reason": "geometry" - }, - { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, { "object": "LayoutBlockFlow DIV", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-repaint-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-repaint-expected.txt index 7df437c..183e04e0 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/table/table-section-repaint-expected.txt
@@ -105,22 +105,10 @@ "reason": "disappeared" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, @@ -133,42 +121,18 @@ "reason": "disappeared" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, @@ -177,10 +141,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt index 1a8e6a1f4..09ebd260 100644 --- a/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt +++ b/third_party/WebKit/LayoutTests/flag-specific/enable-slimming-paint-v2/paint/invalidation/transform/transform-inline-layered-child-expected.txt
@@ -110,7 +110,7 @@ }, { "object": "LayoutText #text", - "reason": "geometry" + "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/hdr/video-canvas-alpha-expected.txt b/third_party/WebKit/LayoutTests/hdr/video-canvas-alpha-expected.txt index 4dd59ca..0d469c7 100644 --- a/third_party/WebKit/LayoutTests/hdr/video-canvas-alpha-expected.txt +++ b/third_party/WebKit/LayoutTests/hdr/video-canvas-alpha-expected.txt
@@ -8,7 +8,8 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (228,8) size 320x240 LayoutHTMLCanvas (relative positioned) {CANVAS} at (320,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/media/controls/controls-cast-overlay-slow-fade.html b/third_party/WebKit/LayoutTests/media/controls/controls-cast-overlay-slow-fade.html index bf596d1..4a06c02 100644 --- a/third_party/WebKit/LayoutTests/media/controls/controls-cast-overlay-slow-fade.html +++ b/third_party/WebKit/LayoutTests/media/controls/controls-cast-overlay-slow-fade.html
@@ -19,13 +19,17 @@ assert_true(isControlVisible(overlayCastButton(video)), "button should exist"); }), hideTimeoutLowerBound); - runAfterHideMediaControlsTimerFired(t.step_func_done(function() { + runAfterHideMediaControlsTimerFired(t.step_func(function() { // Cast button should be gone assert_false(isControlVisible(overlayCastButton(video)), "button should not exist"); + + singleTapOnControl(overlayEnclosureElement(video), t.step_func_done(() => { + assert_true(isControlVisible(overlayCastButton(video)), "button should reappear after tapping"); + })); }), video); }); internals.mediaPlayerRemoteRouteAvailabilityChanged(video, true); video.play(); }); -</script> \ No newline at end of file +</script>
diff --git a/third_party/WebKit/LayoutTests/media/media-controls.js b/third_party/WebKit/LayoutTests/media/media-controls.js index bde04dad..732f92b 100644 --- a/third_party/WebKit/LayoutTests/media/media-controls.js +++ b/third_party/WebKit/LayoutTests/media/media-controls.js
@@ -73,6 +73,14 @@ return button; } +function overlayEnclosureElement(videoElement) { + var controlID = '-webkit-media-controls-overlay-enclosure'; + var element = mediaControlsElement(internals.shadowRoot(videoElement).firstChild, controlID); + if (!element) + throw 'Failed to find overlay enclosure'; + return element; +} + function overflowButton(videoElement) { var controlID = '-internal-media-controls-overflow-button';
diff --git a/third_party/WebKit/LayoutTests/media/video-canvas-alpha-expected.txt b/third_party/WebKit/LayoutTests/media/video-canvas-alpha-expected.txt index 4dd59ca..0d469c7 100644 --- a/third_party/WebKit/LayoutTests/media/video-canvas-alpha-expected.txt +++ b/third_party/WebKit/LayoutTests/media/video-canvas-alpha-expected.txt
@@ -8,7 +8,8 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (228,8) size 320x240 LayoutHTMLCanvas (relative positioned) {CANVAS} at (320,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/media/video-remove-insert-repaints-expected.txt b/third_party/WebKit/LayoutTests/media/video-remove-insert-repaints-expected.txt index c8325f5b..a46cb6a 100644 --- a/third_party/WebKit/LayoutTests/media/video-remove-insert-repaints-expected.txt +++ b/third_party/WebKit/LayoutTests/media/video-remove-insert-repaints-expected.txt
@@ -7,5 +7,6 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt index a40a2c3..6540245 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/background/viewport-gradient-background-html-move-overflow-expected.txt
@@ -42,14 +42,6 @@ { "object": "LayoutBlockFlow HTML", "reason": "style change" - }, - { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='div'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/block-shift-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/block-shift-repaint-expected.txt index 466453d..ae564bc 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/block-shift-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/block-shift-repaint-expected.txt
@@ -136,10 +136,6 @@ { "object": "LayoutBlockFlow DIV class='half'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='half'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt index 15dc71d..2203bb1 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/clip/replaced-clipped-positioned-not-wrong-incremental-repainting-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (relative positioned) DIV id='shiftMe'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (relative positioned) (floating) DIV class='imgContainer'", "reason": "geometry" }, @@ -46,10 +42,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-layers-move-in-subpixels-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-layers-move-in-subpixels-expected.txt index 6954d91a..728a871d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-layers-move-in-subpixels-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/compositing/composited-layers-move-in-subpixels-expected.txt
@@ -38,12 +38,6 @@ "contentsOpaque": true, "backgroundColor": "#D3D3D3" } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize-expected.txt index 34bda7a..58ba65a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize-expected.txt
@@ -17,12 +17,6 @@ "contentsOpaque": true, "backgroundColor": "#FFFFFF" } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='target'", - "reason": "geometry" - } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-change-expected.txt index 3539a7ab..6bb8ef2b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-change-expected.txt
@@ -36,16 +36,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt index 62425ed..42cf0d47 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-content-distribution-change-grid-expected.txt
@@ -41,24 +41,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-self-change-grid-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-self-change-grid-expected.txt index 2ed96cb..2921631 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-self-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/align-self-change-grid-expected.txt
@@ -51,24 +51,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item3'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-change-expected.txt index e1a0c4c7..b44cc24 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-change-expected.txt
@@ -46,16 +46,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt index 7d200005..bfffceb 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-content-distribution-change-grid-expected.txt
@@ -41,24 +41,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-change-expected.txt index 3c694bb1..9a2ca27 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-change-expected.txt
@@ -34,10 +34,6 @@ { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt index 4a087aa1..0c3474b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-items-legacy-change-expected.txt
@@ -46,16 +46,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-self-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-self-change-expected.txt index 6e24575..c4a1f63 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-self-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/justify-self-change-expected.txt
@@ -51,24 +51,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item2'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item3'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt index ac0443a1..3b86ad00 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/flexbox/remove-inline-block-descendant-of-flex-expected.txt
@@ -51,14 +51,6 @@ { "object": "RootInlineBox", "reason": "geometry" - }, - { - "object": "LayoutBR BR", - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt index 02e3fc8..11faeeee7a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-resize-with-rule-expected.txt
@@ -27,70 +27,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutMultiColumnSet (anonymous)", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/outline/outline-child-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/outline/outline-child-repaint-expected.txt index b31195a..7c23559 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/outline/outline-child-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/outline/outline-child-repaint-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='container'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outlined'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-items-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-items-overflow-change-expected.txt index 44ece64b..d8e5695b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-items-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-items-overflow-change-expected.txt
@@ -34,10 +34,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-self-overflow-change-expected.txt index 44ece64b..d8e5695b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-self-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/align-self-overflow-change-expected.txt
@@ -34,10 +34,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/clipped-overflow-visible-subtree-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/clipped-overflow-visible-subtree-expected.txt index 4f33134..4797aef 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/clipped-overflow-visible-subtree-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/clipped-overflow-visible-subtree-expected.txt
@@ -32,18 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-items-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-items-overflow-change-expected.txt index 4efde55..172cc46d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-items-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-items-overflow-change-expected.txt
@@ -34,10 +34,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-self-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-self-overflow-change-expected.txt index 95f9a70..c1d347c9 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-self-overflow-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/overflow/justify-self-overflow-change-expected.txt
@@ -34,10 +34,6 @@ { "object": "LayoutBlockFlow DIV class='item1'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/align-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/align-content-position-change-grid-expected.txt index a9b66ad5..cf8f6bc 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/align-content-position-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/align-content-position-change-grid-expected.txt
@@ -56,24 +56,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-expected.txt index 8ca5ae9..2fdcb0d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-expected.txt
@@ -46,16 +46,8 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-grid-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-grid-expected.txt index 0629584..dbf0e350a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-grid-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/justify-content-position-change-grid-expected.txt
@@ -56,24 +56,12 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" }, { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='item'", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt index c37c7420..303ab68b 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/layout-state-only-positioned-expected.txt
@@ -42,10 +42,6 @@ { "object": "VerticalScrollbar", "reason": "scroll control" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='q'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/position/relative-margin-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/position/relative-margin-change-repaint-expected.txt index b614669..729fc6a 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/position/relative-margin-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/position/relative-margin-change-repaint-expected.txt
@@ -32,14 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='container'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (relative positioned) DIV id='test'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt index b6fe3c7..cb87def3 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-overlay-scrollbar-expected.txt
@@ -29,14 +29,6 @@ { "object": "VerticalScrollbar", "reason": "scroll control" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='content'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt index 04383306..6cae1ce 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/scroll/destroy-scrollbar-expected.txt
@@ -33,14 +33,6 @@ { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='content'", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-cell-append-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-cell-append-expected.txt index d6e1a1a..d54f9a4 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-cell-append-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-cell-append-expected.txt
@@ -31,10 +31,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR id='row'", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-width-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-width-expected.txt index e87fb733..c10107ad 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-cell-border-width-expected.txt
@@ -31,10 +31,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-row-border-width-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-row-border-width-expected.txt index 6e543fc..27aeba4 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-row-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-row-border-width-expected.txt
@@ -36,10 +36,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR id='row'", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt index cc60fde..e8d33fd 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-table-border-width-expected.txt
@@ -31,10 +31,6 @@ "reason": "style change" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-tbody-border-width-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-tbody-border-width-expected.txt index dfe0e71..18cb9e5 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-tbody-border-width-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/cached-change-tbody-border-width-expected.txt
@@ -74,10 +74,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "style change" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt index 77d34d04e..4b5f2ced 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/repaint-table-row-in-composited-document-expected.txt
@@ -36,10 +36,6 @@ "reason": "incremental" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-overflow-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-overflow-expected.txt index cf9067d..db24751 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-overflow-expected.txt
@@ -32,28 +32,12 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutTable TABLE", - "reason": "geometry" - }, - { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, { "object": "LayoutBlockFlow DIV", "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-repaint-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-repaint-expected.txt index 0c25cc2..4aa860c 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/table/table-section-repaint-expected.txt
@@ -116,22 +116,10 @@ "reason": "disappeared" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, @@ -144,42 +132,18 @@ "reason": "disappeared" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='green half'", "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD class='red half'", "reason": "geometry" }, @@ -188,10 +152,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { "object": "LayoutTableRow TR", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/video-paint-invalidation-expected.txt b/third_party/WebKit/LayoutTests/paint/invalidation/video-paint-invalidation-expected.txt index 5cc432a..d590ce4d 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/video-paint-invalidation-expected.txt +++ b/third_party/WebKit/LayoutTests/paint/invalidation/video-paint-invalidation-expected.txt
@@ -33,7 +33,7 @@ "bounds": [320, 240] }, { - "name": "Squashing Layer (first squashed layer: LayoutFlexibleBox DIV)", + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", "position": [8, 8], "bounds": [320, 240] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-fixed-scrolling-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-fixed-scrolling-expected.txt index 003ad1f..37fe369f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-fixed-scrolling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-fixed-scrolling-expected.txt
@@ -12,8 +12,9 @@ LayoutVideo {VIDEO} at (0,80) size 400x300 layer at (8,38) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (8,38) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (0,0) size 500x60 LayoutBlockFlow (positioned) {DIV} at (0,0) size 500x60 [bgcolor=#0000FFCC] scrolled to 0,50
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-opacity-overlay-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-opacity-overlay-expected.txt index 54c4dbba..2edba9f0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-opacity-overlay-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/geometry/video-opacity-overlay-expected.txt
@@ -14,8 +14,9 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (9,53) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (9,53) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (9,358) size 10x10 transparent LayoutBlockFlow {DIV} at (1,306) size 10x10 [bgcolor=#008000] layer at (9,293) size 400x60
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/layers-inside-overflow-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/layers-inside-overflow-scroll-expected.txt index 11b5e627..eb21c26 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/layers-inside-overflow-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/layers-inside-overflow-scroll-expected.txt
@@ -15,7 +15,8 @@ LayoutBlockFlow {DIV} at (1,1) size 285x500 layer at (19,53) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,53) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200 layer at (19,170) size 100x100 backgroundClip at (19,270) size 285x150 clip at (19,270) size 285x150 LayoutBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-compositing-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-compositing-descendant-expected.txt index dc64b192..1e2a3b09 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-compositing-descendant-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -15,7 +15,8 @@ LayoutVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000] layer at (19,63) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (19,63) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100 layer at (19,168) size 100x100 LayoutBlockFlow (relative positioned) {DIV} at (11,116) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/scroll-ancestor-update-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/scroll-ancestor-update-expected.txt index b51d45ae..2a5b2e67 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/scroll-ancestor-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -22,5 +22,6 @@ LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000] layer at (0,0) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (0,0) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/load-video-in-reflection-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/load-video-in-reflection-expected.txt index 34f5b0a..6efd3aa 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/load-video-in-reflection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/reflections/load-video-in-reflection-expected.txt
@@ -13,5 +13,6 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 [bgcolor=#FF0000] layer at (8,52) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/self-painting-layers-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/self-painting-layers-expected.txt index b7450f2..423857a4 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/self-painting-layers-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/self-painting-layers-expected.txt
@@ -23,5 +23,6 @@ text run at (0,102) width 63: "here." layer at (19,53) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,53) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200
diff --git a/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt index 9ea4fee..481f379 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/compositing/video-frame-size-change-expected.txt
@@ -16,9 +16,11 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,112) size 320x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x180 +layer at (8,112) size 320x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x180 layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt index 3b0ab726..877094b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-after-reload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt index 7172354..c2a1b64 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-strict-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt index 5bda98f8..a48e324 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (18,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (18,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x228 clip at (20,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt index 9d2d8ae..48747b1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-styling-strict-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x228 clip at (334,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt index 2a80de06..ff2db59c1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls-without-preload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/lazy-loaded-style-expected.txt index 549ad8e..4423ba2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/lazy-loaded-style-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/lazy-loaded-style-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (8,8) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 +layer at (8,8) size 400x300 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x288 clip at (10,10) size 396x284 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x288 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt index 3988777a..3d545b91 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-controls-with-cast-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -52,9 +53,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x228 clip at (10,299) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -89,8 +91,9 @@ LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,542) size 320x240 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,542) size 320x228 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-dark-rendering-expected.txt index 3816796..cd19ca0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-dark-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-dark-rendering-expected.txt
@@ -17,21 +17,24 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,305) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,550) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-light-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-light-rendering-expected.txt index c1d4f917..fb3ca1b2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-light-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/controls/video-overlay-cast-light-rendering-expected.txt
@@ -17,19 +17,22 @@ LayoutVideo {VIDEO} at (0,0) size 320x261.81 layer at (8,52) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81 layer at (16,353) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,611.81) size 320x261.81 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt index cfad5436..88c5f8b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-clone-expected.txt
@@ -15,9 +15,10 @@ LayoutMedia {AUDIO} at (300,96) size 300x54 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,98) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48 @@ -54,9 +55,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A] layer at (8,163) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,163) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,163) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,253) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt index 9c1a36f..69f91b52 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/media-controls-grey-scrubber-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x138 clip at (10,10) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-horizontal-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-horizontal-expected.txt index df5b8eb..04ec916 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-horizontal-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-horizontal-expected.txt
@@ -40,5 +40,6 @@ text run at (20,0) width 280: "Cue 6: should be on top of bottom positioned cue 5." layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-vertical-expected.txt index 4741d13..3df6aa7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/track/track-cue-rendering-vertical-expected.txt
@@ -40,5 +40,6 @@ text run at (1,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt index 88f89b4..44c68f7c 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-aspect-ratio-expected.txt
@@ -27,39 +27,47 @@ LayoutVideo {VIDEO} at (160,0) size 160x120 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (8,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,404) size 320x120 LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120 layer at (328,404) size 160x120 LayoutVideo (positioned) {VIDEO} at (0,0) size 160x120 layer at (328,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (488,404) size 160x120 LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120 layer at (488,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (488,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt index 66d4bdb..2f28ed5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv420-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,47) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt index d020df1..4f38d0a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-colorspace-yuv422-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,47) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt index 8da3fe1..7de9140 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-controls-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -51,9 +52,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -87,8 +89,9 @@ LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,524) size 320x228 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt index 96177b8..2867c0e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-display-toggle-expected.txt
@@ -11,9 +11,10 @@ LayoutVideo {VIDEO} at (0,20) size 320x240 layer at (8,28) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,28) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x228 clip at (10,30) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt index d50f882cfb..4d0ae6a1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-empty-source-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 302x152 [border: (1px solid #000000)] layer at (9,45) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (1,1) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (9,45) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x138 clip at (11,47) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt index 034276e3..d47aa30d 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-layer-crash-expected.txt
@@ -20,11 +20,13 @@ LayoutVideo {VIDEO} at (4,20) size 206x156 [border: (3px solid #FF0000)] layer at (15,67) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,67) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150 layer at (12,225) size 206x156 LayoutVideo {VIDEO} at (4,181) size 206x156 [border: (3px solid #FF0000)] layer at (15,228) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,228) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt index 2f1d1c3..4b32b7a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-no-audio-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 layer at (8,44) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 +layer at (8,44) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x276 clip at (10,46) size 348x272 LayoutButton (relative positioned) {INPUT} at (0,0) size 352x276 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-replaces-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-replaces-poster-expected.txt index b6b2a904..65bf684 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-replaces-poster-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-replaces-poster-expected.txt
@@ -20,5 +20,6 @@ LayoutVideo {VIDEO} at (0,0) size 480x270 layer at (8,72) size 480x270 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x270 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x270 +layer at (8,72) size 480x270 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x270
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt index d0764f5..953a256 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-controls-expected.txt
@@ -10,9 +10,10 @@ LayoutVideo {VIDEO} at (45,73) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x162 clip at (60,88) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)] @@ -47,9 +48,10 @@ LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x162 clip at (60,313) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-expected.txt index 3b2f45c..a7dec7e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/media/video-zoom-expected.txt
@@ -23,9 +23,11 @@ LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)] layer at (17,49) size 480x360 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,49) size 480x360 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360 layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt index d1c96ed..e1089d7f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -246,9 +246,18 @@ "drawsContent": false }, { + "name": "Squashing Containment Layer", + "drawsContent": false + }, + { "name": "LayoutFlexibleBox (relative positioned) DIV class='sizing-small phase-ready state-stopped'", "position": [15, 859], "bounds": [150, 60] + }, + { + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", + "position": [15, 859], + "bounds": [150, 60] } ], "objectPaintInvalidations": [
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-expected.txt index 4ce3296..175ab04 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-right-expected.txt index a7fbc0c9..8bba0c7 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-right-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/overflow/float-overflow-right-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-document-element-expected.txt index 02f1e8e..da17597 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-document-element-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-document-element-expected.txt
@@ -49,10 +49,6 @@ "reason": "style change" }, { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow P", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt index 4ced6de..99d9ccb 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt
@@ -42,18 +42,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt index 6640f265..59ec62f 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -64,10 +64,6 @@ { "object": "InlineTextBox 'There should only be one copy of this text.'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/selection/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/selection/selection-clear-expected.txt index 67060d8..97f78022 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/selection/selection-clear-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/selection/selection-clear-expected.txt
@@ -71,11 +71,11 @@ }, { "object": "LayoutBR BR", - "reason": "geometry" + "reason": "selection" }, { "object": "InlineTextBox '\n'", - "reason": "geometry" + "reason": "selection" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-match-document-change-expected.txt index 5113032e..d0915d5 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-match-document-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/text-match-document-change-expected.txt
@@ -60,10 +60,6 @@ { "object": "InlineTextBox 'After change'", "reason": "appeared" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 65e0921..9329101 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -67,10 +67,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -195,10 +191,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -320,10 +312,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -444,10 +432,6 @@ "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/lazy-loaded-style-expected.txt index 549ad8e..4423ba2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/lazy-loaded-style-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/lazy-loaded-style-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (8,8) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 +layer at (8,8) size 400x300 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x288 clip at (10,10) size 396x284 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x288 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt index 3988777a..3d545b91 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-controls-with-cast-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -52,9 +53,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x228 clip at (10,299) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -89,8 +91,9 @@ LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,542) size 320x240 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,542) size 320x228 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-dark-rendering-expected.txt index 3816796..cd19ca0 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-dark-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-dark-rendering-expected.txt
@@ -17,21 +17,24 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,305) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,550) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-light-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-light-rendering-expected.txt index c1d4f917..fb3ca1b2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-light-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/new-remote-playback-pipeline/media/controls/video-overlay-cast-light-rendering-expected.txt
@@ -17,19 +17,22 @@ LayoutVideo {VIDEO} at (0,0) size 320x261.81 layer at (8,52) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81 layer at (16,353) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,611.81) size 320x261.81 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-compositing-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-compositing-descendant-expected.txt index dc64b192..1e2a3b09 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-compositing-descendant-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -15,7 +15,8 @@ LayoutVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000] layer at (19,63) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (19,63) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100 layer at (19,168) size 100x100 LayoutBlockFlow (relative positioned) {DIV} at (11,116) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-ancestor-update-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-ancestor-update-expected.txt index b51d45ae..2a5b2e67 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-ancestor-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/prefer_compositing_to_lcd_text/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -22,5 +22,6 @@ LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000] layer at (0,0) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (0,0) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-after-reload-expected.txt index 3b0ab726..877094b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-after-reload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-strict-expected.txt index 7172354..c2a1b64 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-strict-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-expected.txt index 5bda98f8..a48e324 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (18,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (18,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x228 clip at (20,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-strict-expected.txt index 9d2d8ae..48747b1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-styling-strict-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x228 clip at (334,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-without-preload-expected.txt index 2a80de06..ff2db59c1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls-without-preload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/lazy-loaded-style-expected.txt index 549ad8e..4423ba2 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/lazy-loaded-style-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/lazy-loaded-style-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (8,8) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 +layer at (8,8) size 400x300 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x288 clip at (10,10) size 396x284 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x288 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-expected.txt index e836c3e1..5ddccb11 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-controls-with-cast-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-controls-with-cast-rendering-expected.txt index 3988777a..3d545b91 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-controls-with-cast-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-controls-with-cast-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -52,9 +53,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,297) size 320x228 clip at (10,299) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -89,8 +91,9 @@ LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,542) size 320x240 backgroundClip at (8,542) size 320x58 clip at (8,542) size 320x58 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,542) size 320x228 backgroundClip at (8,542) size 320x58 clip at (10,544) size 316x56
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-dark-rendering-expected.txt new file mode 100644 index 0000000..cd19ca0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-dark-rendering-expected.txt
@@ -0,0 +1,40 @@ +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 782 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 785x550 + LayoutBlockFlow {HTML} at (0,0) size 785x550 + LayoutBlockFlow {BODY} at (8,16) size 769x526 + LayoutBlockFlow {P} at (0,0) size 769x20 + LayoutText {#text} at (0,0) size 348x19 + text run at (0,0) width 348: "Test overlay cast button rendering on dark background." + LayoutBlockFlow {DIV} at (0,36) size 769x245 + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {DIV} at (0,281) size 769x245 + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {DIV} at (0,526) size 769x0 +layer at (8,52) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (16,60) size 48x48 + LayoutButton (positioned) {INPUT} at (8,8) size 48x48 +layer at (8,297) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (16,305) size 48x48 + LayoutButton (positioned) {INPUT} at (8,8) size 48x48 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (16,550) size 48x48 + LayoutButton (positioned) {INPUT} at (8,8) size 48x48
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-light-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-light-rendering-expected.txt new file mode 100644 index 0000000..fb3ca1b2 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/controls/video-overlay-cast-light-rendering-expected.txt
@@ -0,0 +1,38 @@ +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 874 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 785x620 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow {HTML} at (0,0) size 785x619.81 + LayoutBlockFlow {BODY} at (8,16) size 769x595.81 + LayoutBlockFlow {P} at (0,0) size 769x20 + LayoutText {#text} at (0,0) size 348x19 + text run at (0,0) width 348: "Test overlay cast button rendering on light background." + LayoutBlockFlow {DIV} at (0,36) size 769x293 + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {DIV} at (0,329) size 769x266.81 + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {DIV} at (0,595.81) size 769x0 +layer at (8,52) size 352x288 + LayoutVideo {VIDEO} at (0,0) size 352x288 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutVideo {VIDEO} at (0,0) size 320x261.81 +layer at (8,52) size 352x288 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 + LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 +layer at (16,60) size 48x48 + LayoutButton (positioned) {INPUT} at (8,8) size 48x48 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 + LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81 +layer at (16,353) size 48x48 + LayoutButton (positioned) {INPUT} at (8,8) size 48x48 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutVideo (positioned) {VIDEO} at (8,611.81) size 320x261.81 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 + LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-clone-expected.txt index cfad5436..88c5f8b 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-clone-expected.txt
@@ -15,9 +15,10 @@ LayoutMedia {AUDIO} at (300,96) size 300x54 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,98) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48 @@ -54,9 +55,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A] layer at (8,163) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,163) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,163) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,253) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-grey-scrubber-expected.txt index 9c1a36f..69f91b52 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/media-controls-grey-scrubber-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x138 clip at (10,10) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-horizontal-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-horizontal-expected.txt new file mode 100644 index 0000000..04ec916 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-horizontal-expected.txt
@@ -0,0 +1,45 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x261 + LayoutBlockFlow {HTML} at (0,0) size 800x261 + LayoutBlockFlow {BODY} at (8,8) size 784x245 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x240 [color=#FFFFFF] +layer at (8,8) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x15 + LayoutInline {DIV} at (0,0) size 280x19 [bgcolor=#000000CC] + LayoutText {#text} at (22,0) size 276x15 + text run at (22,0) width 276: "Cue 1: should be positioned at the top of the video." +layer at (8,27) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,19) size 320x15 + LayoutInline {DIV} at (0,0) size 308x19 [bgcolor=#000000CC] + LayoutText {#text} at (8,0) size 304x15 + text run at (8,0) width 304: "Cue 2: should be the second cue and not overlap cue 1." +layer at (8,46) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,38) size 320x15 + LayoutInline {DIV} at (0,0) size 300x19 [bgcolor=#000000CC] + LayoutText {#text} at (12,0) size 296x15 + text run at (12,0) width 296: "Cue 3: should become the third line from top to bottom." +layer at (8,103) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,95) size 320x15 + LayoutInline {DIV} at (0,0) size 292x19 [bgcolor=#000000CC] + LayoutText {#text} at (16,0) size 288x15 + text run at (16,0) width 288: "Cue 4: should be fixed positioned around the middle." +layer at (8,229) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,221) size 320x15 + LayoutInline {DIV} at (0,0) size 296x19 [bgcolor=#000000CC] + LayoutText {#text} at (14,0) size 292x15 + text run at (14,0) width 292: "Cue 5: should be displayed at the bottom of the video." +layer at (8,210) size 320x15 scrollHeight 17 + LayoutBlockFlow (positioned) {DIV} at (0,202) size 320x15 + LayoutInline {DIV} at (0,0) size 284x19 [bgcolor=#000000CC] + LayoutText {#text} at (20,0) size 280x15 + text run at (20,0) width 280: "Cue 6: should be on top of bottom positioned cue 5." +layer at (8,8) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt new file mode 100644 index 0000000..3df6aa7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt
@@ -0,0 +1,45 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x261 + LayoutBlockFlow {HTML} at (0,0) size 800x261 + LayoutBlockFlow {BODY} at (8,8) size 784x245 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x240 [color=#FFFFFF] +layer at (9,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (1,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 1: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (28,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (20,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 2: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (253,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (245,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 3: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (234,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (226,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 4: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (309,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (301,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 5: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (290,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (282,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (8,8) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-aspect-ratio-expected.txt new file mode 100644 index 0000000..44c68f7c --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-aspect-ratio-expected.txt
@@ -0,0 +1,73 @@ +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 + LayoutBlockFlow {P} at (0,0) size 784x20 + LayoutText {#text} at (0,0) size 620x19 + text run at (0,0) width 620: "Test video sizing. You should see one bigger image (paused video) and 7 small ones of 1/4 its size." + LayoutBlockFlow (anonymous) at (0,36) size 784x480 + LayoutBR {BR} at (320,240) size 0x0 + LayoutBlockFlow {DIV} at (160,240) size 320x120 + LayoutText {#text} at (0,0) size 0x0 + LayoutBlockFlow {DIV} at (0,360) size 320x120 + LayoutText {#text} at (0,0) size 0x0 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,44) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,284) size 160x120 + LayoutVideo {VIDEO} at (0,240) size 160x120 +layer at (168,284) size 160x120 + LayoutVideo {VIDEO} at (0,0) size 160x120 +layer at (328,284) size 160x120 + LayoutVideo {VIDEO} at (160,0) size 160x120 +layer at (8,404) size 160x120 + LayoutVideo {VIDEO} at (0,0) size 160x120 +layer at (168,404) size 160x120 + LayoutVideo {VIDEO} at (160,0) size 160x120 +layer at (8,44) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (168,284) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (328,284) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (8,404) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (168,404) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (328,404) size 320x120 + LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120 +layer at (328,404) size 160x120 + LayoutVideo (positioned) {VIDEO} at (0,0) size 160x120 +layer at (328,404) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 +layer at (488,404) size 160x120 + LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120 +layer at (488,404) size 160x120 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 + LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (488,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv420-expected.txt new file mode 100644 index 0000000..2f28ed5 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv420-expected.txt
@@ -0,0 +1,16 @@ +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 + LayoutBlockFlow {P} at (0,0) size 784x20 + LayoutText {#text} at (0,0) size 328x19 + text run at (0,0) width 328: "Test correct colorspace for yuv420, i.e. YU12 video" + LayoutBlockFlow (anonymous) at (0,36) size 784x156 +layer at (8,44) size 206x156 + LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] +layer at (11,47) size 200x150 + LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 + LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv422-expected.txt new file mode 100644 index 0000000..4f38d0a --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-colorspace-yuv422-expected.txt
@@ -0,0 +1,16 @@ +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 + LayoutBlockFlow {P} at (0,0) size 784x20 + LayoutText {#text} at (0,0) size 328x19 + text run at (0,0) width 328: "Test correct colorspace for yuv422, i.e. YU16 video" + LayoutBlockFlow (anonymous) at (0,36) size 784x156 +layer at (8,44) size 206x156 + LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] +layer at (11,47) size 200x150 + LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 + LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-controls-rendering-expected.txt index 8da3fe1..7de9140 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-controls-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -51,9 +52,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -87,8 +89,9 @@ LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,524) size 320x228 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-display-toggle-expected.txt index 96177b8..2867c0e 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-display-toggle-expected.txt
@@ -11,9 +11,10 @@ LayoutVideo {VIDEO} at (0,20) size 320x240 layer at (8,28) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,28) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x228 clip at (10,30) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-empty-source-expected.txt index d50f882cfb..4d0ae6a1 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-empty-source-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 302x152 [border: (1px solid #000000)] layer at (9,45) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (1,1) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (9,45) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x138 clip at (11,47) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt index b2dec7e..140bf2a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt
@@ -19,13 +19,16 @@ LayoutVideo {VIDEO} at (0,245) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.txt new file mode 100644 index 0000000..d47aa30d --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-layer-crash-expected.txt
@@ -0,0 +1,32 @@ +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 + LayoutBlockFlow {P} at (0,0) size 784x20 + LayoutText {#text} at (0,0) size 359x19 + text run at (0,0) width 359: "Test dynamic removal of transformed and reflected video" + LayoutBlockFlow (anonymous) at (0,36) size 784x342 + LayoutText {#text} at (0,0) size 4x19 + text run at (0,0) width 4: " " + LayoutBR {BR} at (4,15) size 0x0 + LayoutText {#text} at (0,161) size 4x19 + text run at (0,161) width 4: " " + LayoutBR {BR} at (210,176) size 0x0 + LayoutText {#text} at (0,322) size 4x19 + text run at (0,322) width 4: " " + LayoutBR {BR} at (210,337) size 0x0 +layer at (12,64) size 206x156 + LayoutVideo {VIDEO} at (4,20) size 206x156 [border: (3px solid #FF0000)] +layer at (15,67) size 200x150 + LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 + LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,67) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150 +layer at (12,225) size 206x156 + LayoutVideo {VIDEO} at (4,181) size 206x156 [border: (3px solid #FF0000)] +layer at (15,228) size 200x150 + LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 + LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,228) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-no-audio-expected.txt index 2f1d1c3..4b32b7a 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-no-audio-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 layer at (8,44) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 +layer at (8,44) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x276 clip at (10,46) size 348x272 LayoutButton (relative positioned) {INPUT} at (0,0) size 352x276 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-replaces-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-replaces-poster-expected.txt new file mode 100644 index 0000000..65bf684 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-replaces-poster-expected.txt
@@ -0,0 +1,25 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x355 + LayoutBlockFlow {HTML} at (0,0) size 800x355 + LayoutBlockFlow {BODY} at (8,16) size 784x331 + LayoutBlockFlow {P} at (0,0) size 784x40 + LayoutText {#text} at (0,0) size 52x19 + text run at (0,0) width 52: "Test for " + LayoutInline {A} at (0,0) size 305x19 [color=#0000EE] + LayoutText {#text} at (52,0) size 305x19 + text run at (52,0) width 305: "https://bugs.webkit.org/show_bug.cgi?id=34966" + LayoutText {#text} at (357,0) size 8x19 + text run at (357,0) width 8: ". " + LayoutBR {BR} at (365,0) size 0x19 + LayoutText {#text} at (0,20) size 204x19 + text run at (0,20) width 204: "You should see the video below." + LayoutBlockFlow (anonymous) at (0,56) size 784x275 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,72) size 480x270 + LayoutVideo {VIDEO} at (0,0) size 480x270 +layer at (8,72) size 480x270 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x270 + LayoutFlexibleBox {DIV} at (0,0) size 480x270 +layer at (8,72) size 480x270 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x270
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.txt index d0764f5..953a256 100644 --- a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-controls-expected.txt
@@ -10,9 +10,10 @@ LayoutVideo {VIDEO} at (45,73) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x162 clip at (60,88) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)] @@ -47,9 +48,10 @@ LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x162 clip at (60,313) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-expected.txt new file mode 100644 index 0000000..a7dec7e --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/linux/virtual/video-surface-layer/media/video-zoom-expected.txt
@@ -0,0 +1,33 @@ +layer at (0,0) size 800x600 clip at (0,0) size 785x600 scrollHeight 852 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 785x852 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow {HTML} at (0,0) size 785x852 + LayoutBlockFlow {BODY} at (8,8) size 769x836 + LayoutBlockFlow {P} at (0,0) size 769x20 + LayoutText {#text} at (0,0) size 283x19 + text run at (0,0) width 283: "150% zoom, with width and height attributes" + LayoutBlockFlow (anonymous) at (0,36) size 769x374 + LayoutText {#text} at (0,354) size 4x19 + text run at (0,354) width 4: " " + LayoutBR {BR} at (493,369) size 0x0 + LayoutBlockFlow {P} at (0,426) size 769x20 + LayoutText {#text} at (0,0) size 303x19 + text run at (0,0) width 303: "150% zoom, without width and height attributes" + LayoutBlockFlow (anonymous) at (0,462) size 769x374 + LayoutText {#text} at (0,354) size 4x19 + text run at (0,354) width 4: " " + LayoutBR {BR} at (493,369) size 0x0 +layer at (12,44) size 489x369 + LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)] +layer at (12,470) size 489x369 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)] +layer at (17,49) size 480x360 + LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 + LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,49) size 480x360 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360 +layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 + LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/track/track-cue-rendering-vertical-expected.txt index bda62ec..dc3a484c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/track/track-cue-rendering-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/media/track/track-cue-rendering-vertical-expected.txt
@@ -40,5 +40,6 @@ text run at (0,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt new file mode 100644 index 0000000..dc3a484c --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt
@@ -0,0 +1,45 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x260 + LayoutBlockFlow {HTML} at (0,0) size 800x260 + LayoutBlockFlow {BODY} at (8,8) size 784x244 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x240 [color=#FFFFFF] +layer at (12,8) size 14x240 scrollX 2.00 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (4,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 1: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (30,8) size 14x240 scrollX 2.00 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (22,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 2: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (260,8) size 14x240 scrollX 2.00 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (252,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 3: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (242,8) size 14x240 scrollX 2.00 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (234,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 4: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (310,8) size 14x240 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (302,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 5: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (292,8) size 14x240 scrollWidth 16 + LayoutBlockFlow (positioned) {DIV} at (284,0) size 14x240 + LayoutInline {DIV} at (0,0) size 18x116 [bgcolor=#000000CC] + LayoutText {#text} at (0,64) size 14x112 + text run at (0,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (8,8) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt new file mode 100644 index 0000000..8c8ac903 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -0,0 +1,44 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x347 + LayoutBlockFlow {HTML} at (0,0) size 800x347.27 + LayoutBlockFlow {BODY} at (8,8) size 784x331.27 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 400x327 + LayoutVideo {VIDEO} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x315 clip at (9,9) size 398x313 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,108.08) size 384x98.09 + LayoutBlockFlow {DIV} at (142.95,0) size 98.09x98.09 [bgcolor=#FFFFFFE6] +layer at (8,275) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,267.27) size 400x48 + LayoutBlockFlow {DIV} at (16,0) size 31.14x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 32x18 + text run at (0,15) width 32: "0:00" + LayoutBlockFlow {DIV} at (51.14,0) size 40.03x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 41x18 + text run at (0,15) width 41: "/ 0:09" + LayoutBlockFlow {DIV} at (91.17,48) size 212.83x0 + LayoutButton {INPUT} at (352,0) size 48x48 +layer at (312,275) size 48x48 transparent + LayoutButton {INPUT} at (304,0) size 48x48 [color=#7F7F7F] +layer at (8,323) size 400x12 + LayoutSlider {INPUT} at (0,315.27) size 400x12 [color=#909090] + LayoutFlexibleBox {DIV} at (16,0) size 368x4 +layer at (24,323) size 368x4 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] +layer at (24,319) size 12x12 + LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 +layer at (24,323) size 0x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt index eb6bbeb..bf70e4e8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/multicol/multicol-with-text-expected.txt
@@ -28,11 +28,11 @@ "objectPaintInvalidations": [ { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "incremental" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutMultiColumnFlowThread (anonymous)", @@ -52,11 +52,11 @@ }, { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "appeared" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "appeared" }, { "object": "LayoutBR BR",
diff --git a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt index df59cb65..1f35ab8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac-mac10.12/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -56,10 +56,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV", "reason": "geometry" }, @@ -74,10 +70,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-fixed-scrolling-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-fixed-scrolling-expected.txt index f8f39fd..2865c5c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-fixed-scrolling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-fixed-scrolling-expected.txt
@@ -12,8 +12,9 @@ LayoutVideo {VIDEO} at (0,80) size 400x300 layer at (8,38) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (8,38) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (0,0) size 500x60 LayoutBlockFlow (positioned) {DIV} at (0,0) size 500x60 [bgcolor=#0000FFCC] scrolled to 0,50
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-opacity-overlay-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-opacity-overlay-expected.txt index 1b69e2b..5c2ea54 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-opacity-overlay-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/geometry/video-opacity-overlay-expected.txt
@@ -14,8 +14,9 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (9,51) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (9,51) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (9,355) size 10x10 transparent LayoutBlockFlow {DIV} at (1,305) size 10x10 [bgcolor=#008000] layer at (9,291) size 400x60
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/layers-inside-overflow-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/layers-inside-overflow-scroll-expected.txt index 2062459..eba0bb8e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/layers-inside-overflow-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/layers-inside-overflow-scroll-expected.txt
@@ -15,7 +15,8 @@ LayoutBlockFlow {DIV} at (1,1) size 285x500 layer at (19,51) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,51) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200 layer at (19,167) size 100x100 backgroundClip at (19,267) size 285x150 clip at (19,267) size 285x150 LayoutBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt index 35e9e812..c99613de 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -15,7 +15,8 @@ LayoutVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000] layer at (19,61) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (19,61) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100 layer at (19,165) size 100x100 LayoutBlockFlow (relative positioned) {DIV} at (11,115) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt index d6792c3..3a34e5079 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -22,5 +22,6 @@ LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000] layer at (0,0) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (0,0) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/load-video-in-reflection-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/load-video-in-reflection-expected.txt index 79b83bf..03bb060 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/load-video-in-reflection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/reflections/load-video-in-reflection-expected.txt
@@ -13,5 +13,6 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 [bgcolor=#FF0000] layer at (8,50) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,50) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/self-painting-layers-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/self-painting-layers-expected.txt index 354e7437..07e00463 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/self-painting-layers-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/self-painting-layers-expected.txt
@@ -23,5 +23,6 @@ text run at (0,101) width 64: "here." layer at (19,51) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,51) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt index ac23d21..2bf8cff 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/video-frame-size-change-expected.txt
@@ -16,9 +16,11 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,110) size 320x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x180 +layer at (8,110) size 320x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x180 layer at (332,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-poster-expected.txt index 7626c69..f01c7710 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-poster-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/compositing/video/video-poster-expected.txt
@@ -76,9 +76,18 @@ "drawsContent": false }, { + "name": "Squashing Containment Layer", + "drawsContent": false + }, + { "name": "LayoutFlexibleBox (relative positioned) DIV class='sizing-small phase-ready state-stopped'", "position": [8, 8], "bounds": [352, 288] + }, + { + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", + "position": [8, 8], + "bounds": [352, 288] } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt index ec7263c..1687625 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-after-reload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x228 clip at (9,43) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt index cf911e6..75051a17 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-strict-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x228 clip at (9,51) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt index 966c271..3183e0b1 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (18,42) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,42) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (18,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,42) size 320x228 clip at (19,43) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,282) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,282) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x228 clip at (9,283) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt index 9f457fd5..75390eaa 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-styling-strict-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,50) size 320x228 clip at (9,51) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (332,50) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,50) size 320x228 clip at (333,51) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt index f2858f2..d7acddb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls-without-preload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x228 clip at (9,43) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/lazy-loaded-style-expected.txt index ae6a18b..346d9e5 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/lazy-loaded-style-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/lazy-loaded-style-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (8,8) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 +layer at (8,8) size 400x300 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x288 clip at (9,9) size 398x286 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x288 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index b7d91384..e661bccb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -8,12 +8,13 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 -layer at (8,8) size 400x315 clip at (9,9) size 398x313 - LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] +layer at (8,8) size 400x315 clip at (9,9) size 398x313 transparent + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px inset #D8D8D8) (1px inset #D1D1D1) (1px inset #BABABA) (1px inset #D1D1D1)] LayoutFlexibleBox (anonymous) at (8,108.08) size 384x98.09 LayoutBlockFlow {DIV} at (142.95,0) size 98.09x98.09 [bgcolor=#FFFFFFE6] layer at (8,275) size 400x48 @@ -39,5 +40,5 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 layer at (24,323) size 0x4 LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] -layer at (24,323) size 368x4 - LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A] +layer at (24,323) size 367x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 367x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt index b7d91384..8c8ac903 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (9,9) size 398x313 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-dark-rendering-expected.txt index 5a3453d..fa6de9d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-dark-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-dark-rendering-expected.txt
@@ -17,21 +17,24 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,58) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,294) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,294) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,302) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,538) size 320x240 layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,538) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,546) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-light-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-light-rendering-expected.txt index 9aacb33..d2b9613 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-light-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/controls/video-overlay-cast-light-rendering-expected.txt
@@ -17,19 +17,22 @@ LayoutVideo {VIDEO} at (0,0) size 320x261.81 layer at (8,50) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,50) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 layer at (16,58) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,342) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,342) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81 layer at (16,350) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,608) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,607.81) size 320x261.81 layer at (8,608) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,608) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt index 0a536398..d06ddcc 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-clone-expected.txt
@@ -15,9 +15,10 @@ LayoutMedia {AUDIO} at (300,96) size 300x54 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,98) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48 @@ -54,9 +55,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A] layer at (8,162) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,162) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,162) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,252) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt index 75238ba..a1d7560 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/media-controls-grey-scrubber-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x138 clip at (9,9) size 298x136 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt index 359a0f0..f94c258 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-horizontal-expected.txt
@@ -40,5 +40,6 @@ text run at (22,0) width 276: "Cue 6: should be on top of bottom positioned cue 5." layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-vertical-expected.txt index 1c3aac8..ceeacf8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/track/track-cue-rendering-vertical-expected.txt
@@ -40,5 +40,6 @@ text run at (2,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt index 9b51520e..75b9edfb 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-aspect-ratio-expected.txt
@@ -27,39 +27,47 @@ LayoutVideo {VIDEO} at (160,0) size 160x120 layer at (8,42) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,42) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,282) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,282) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,282) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,282) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,282) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,282) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (8,402) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,402) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,402) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,402) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,402) size 320x120 LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120 layer at (328,402) size 160x120 LayoutVideo (positioned) {VIDEO} at (0,0) size 160x120 layer at (328,402) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,402) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (488,402) size 160x120 LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120 layer at (488,402) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (488,402) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt index f57d63d..5a39e8a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv420-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,45) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,45) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt index 00f1b83..6368321 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-colorspace-yuv422-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,45) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,45) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt index 2f591ee6..301ef01f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-controls-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,42) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,42) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,42) size 320x228 clip at (9,43) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] @@ -51,9 +52,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,282) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,282) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,282) size 320x228 clip at (9,283) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] @@ -87,8 +89,9 @@ LayoutVideo (positioned) {VIDEO} at (8,522) size 320x240 layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,522) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,522) size 320x240 backgroundClip at (8,522) size 320x78 clip at (8,522) size 320x78 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,522) size 320x228 backgroundClip at (8,522) size 320x78 clip at (9,523) size 318x77
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt index 6f7a91e..b8d892ca 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-display-toggle-expected.txt
@@ -11,9 +11,10 @@ LayoutVideo {VIDEO} at (0,18) size 320x240 layer at (8,26) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,26) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,26) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,26) size 320x228 clip at (9,27) size 318x226 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt index 5781cb8c..87dd257 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-empty-source-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 302x152 [border: (1px solid #000000)] layer at (9,43) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (1,1) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,43) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (9,43) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,43) size 300x138 clip at (10,44) size 298x136 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt index d1935b8..2deba9e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-layer-crash-expected.txt
@@ -20,11 +20,13 @@ LayoutVideo {VIDEO} at (4,18) size 206x156 [border: (3px solid #FF0000)] layer at (15,63) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,63) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150 layer at (12,220) size 206x156 LayoutVideo {VIDEO} at (4,178) size 206x156 [border: (3px solid #FF0000)] layer at (15,223) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,223) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt index 63e1fa3..8099eaf 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-no-audio-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 layer at (8,42) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,42) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 +layer at (8,42) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,42) size 352x276 clip at (9,43) size 350x274 LayoutButton (relative positioned) {INPUT} at (0,0) size 352x276 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-poster-scale-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-poster-scale-expected.txt index 807f325..544c47b 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-poster-scale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-poster-scale-expected.txt
@@ -32,25 +32,31 @@ LayoutVideo {VIDEO} at (390,543) size 326x56 [bgcolor=#EE00EE] [border: (3px solid #FF0000)] layer at (11,11) size 320x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x150 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x150 +layer at (11,11) size 320x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x150 layer at (11,171) size 76x103 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103 - LayoutBlockFlow {DIV} at (38,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 76x103 +layer at (11,171) size 76x103 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 76x103 layer at (97,171) size 76x103 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103 - LayoutBlockFlow {DIV} at (38,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 76x103 +layer at (97,171) size 76x103 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 76x103 layer at (11,284) size 50x320 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 50x320 - LayoutBlockFlow {DIV} at (25,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 50x320 +layer at (11,284) size 50x320 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 50x320 layer at (71,364) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (71,364) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (401,554) size 320x50 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x50 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x50 +layer at (401,554) size 320x50 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x50
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-replaces-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-replaces-poster-expected.txt index 2555282..ec87986 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-replaces-poster-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-replaces-poster-expected.txt
@@ -20,5 +20,6 @@ LayoutVideo {VIDEO} at (0,0) size 480x270 layer at (8,68) size 480x270 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x270 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x270 +layer at (8,68) size 480x270 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x270
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt index f634898..8f7b1da 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-controls-expected.txt
@@ -10,9 +10,10 @@ LayoutVideo {VIDEO} at (45,73) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x234 backgroundClip at (57,85) size 240x180 clip at (59,87) size 237x178 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x234 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)] @@ -35,9 +36,10 @@ LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x234 backgroundClip at (43,291) size 268x218 clip at (59,312) size 237x197 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x234 [border: (1.50px solid #D8D8D8) (1.50px solid #D1D1D1) (1.50px solid #BABABA) (1.50px solid #D1D1D1)]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-expected.txt index d098b0e..a445a6c6 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/media/video-zoom-expected.txt
@@ -23,9 +23,11 @@ LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)] layer at (17,47) size 480x360 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,47) size 480x360 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360 layer at (17,470) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,470) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6388-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6388-expected.txt deleted file mode 100644 index d790541..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/bugzilla-6388-expected.txt +++ /dev/null
@@ -1,53 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV", - "rect": [8, 130, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "rect": [8, 130, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "rect": [8, 130, 100, 100], - "reason": "disappeared" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (positioned) DIV id='outside'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clipped-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clipped-relative-expected.txt index f7af1390..02c8c5e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clipped-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/clip/clipped-relative-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (relative positioned) DIV id='i'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV id='inner'", "reason": "geometry" }, @@ -46,10 +42,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt index d145c230..dfbaa520 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt
@@ -81,10 +81,6 @@ { "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'", "reason": "compositing update" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-2-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-2-expected.txt deleted file mode 100644 index 0b938040..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-2-expected.txt +++ /dev/null
@@ -1,65 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [348, 84, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='to_remove' class='item'", - "rect": [348, 84, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [88, 84, 100, 100], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (floating) DIV id='container'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-3-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-3-expected.txt index 06bf7d86..fbeffd2 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-3-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-3-expected.txt
@@ -37,22 +37,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (floating) DIV id='container'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV id='keep_child'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-4-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-4-expected.txt deleted file mode 100644 index b4c10a0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-4-expected.txt +++ /dev/null
@@ -1,84 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [408, 84, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='to_remove' class='item'", - "rect": [408, 84, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [208, 84, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [408, 84, 4, 18], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [408, 84, 4, 18], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [208, 84, 4, 18], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-expected.txt deleted file mode 100644 index 48c3cc1d..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/crbug-371640-expected.txt +++ /dev/null
@@ -1,88 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [800, 600], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [348, 84, 100, 100], - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='to_remove' class='item'", - "rect": [348, 84, 100, 100], - "reason": "disappeared" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "rect": [88, 84, 100, 100], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [348, 84, 4, 18], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [348, 84, 4, 18], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\u00A0'", - "rect": [88, 84, 4, 18], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutBlockFlow (floating) DIV id='container'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) (floating) DIV id='keep_inner' class='inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV class='abs_pos'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV id='keep' class='item'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox '\u00A0'", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/float-move-during-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/float-move-during-layout-expected.txt index ad56f13..3df1904 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/float-move-during-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/float-move-during-layout-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow DIV id='s'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (floating) DIV", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt index f020a12..2cd5739 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -246,9 +246,18 @@ "drawsContent": false }, { + "name": "Squashing Containment Layer", + "drawsContent": false + }, + { "name": "LayoutFlexibleBox (relative positioned) DIV class='sizing-small phase-ready state-stopped'", "position": [15, 854], "bounds": [150, 60] + }, + { + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", + "position": [15, 854], + "bounds": [150, 60] } ], "objectPaintInvalidations": [
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-text-expected.txt index f534128f..7174615 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/multicol/multicol-with-text-expected.txt
@@ -28,11 +28,11 @@ "objectPaintInvalidations": [ { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "incremental" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutMultiColumnFlowThread (anonymous)", @@ -52,11 +52,11 @@ }, { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "appeared" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "appeared" }, { "object": "LayoutBR BR",
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt index 63aff4c..0e5e64a 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -58,14 +58,6 @@ "reason": "geometry" }, { - "object": "LayoutListItem LI", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { "object": "LayoutListMarker (anonymous)", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-expected.txt index fdd3d76..ea93e4f 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-right-expected.txt index 8eb5d7f..cf53b1c3 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-right-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/overflow/float-overflow-right-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt deleted file mode 100644 index 7c3609a..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/abspos-shift-image-incorrect-repaint-expected.txt +++ /dev/null
@@ -1,107 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [1250, 585], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutImage IMG", - "rect": [704, 0, 214, 232], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [454, 0, 214, 232], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [0, 0, 214, 232], - "reason": "disappeared" - }, - { - "object": "InlineTextBox '\n'", - "rect": [700, 218, 4, 18], - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "rect": [450, 218, 4, 18], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='shiftMe'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox '\n'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='imageWrapper'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt index 3104b221..552cee9 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -56,10 +56,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV", "reason": "geometry" }, @@ -74,10 +70,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-document-element-expected.txt index 1f12c75..daecdb8 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-document-element-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-document-element-expected.txt
@@ -49,10 +49,6 @@ "reason": "style change" }, { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow P", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt index b680853..e936599 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt
@@ -42,18 +42,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt index 428aef4..c09f6049 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) UL id='list'", - "reason": "geometry" - }, - { "object": "LayoutListItem (positioned) LI", "reason": "geometry" }, @@ -50,10 +46,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt deleted file mode 100644 index c7246f0..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-addition-expected.txt +++ /dev/null
@@ -1,86 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 829], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "rect": [0, 735, 785, 94], - "reason": "incremental" - }, - { - "object": "LayoutIFrame IFRAME id='iframe'", - "rect": [8, 86, 732, 94], - "reason": "appeared" - }, - { - "object": "LayoutImage IMG", - "rect": [58, 230, 489, 537], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [58, 136, 489, 537], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "reason": "incremental" - }, - { - "object": "LayoutIFrame IFRAME id='iframe'", - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='relative'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutView #document", - "reason": "style change" - }, - { - "object": "LayoutBlockFlow HTML", - "reason": "appeared" - }, - { - "object": "LayoutBlockFlow BODY", - "reason": "appeared" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt deleted file mode 100644 index f0eecf8..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/position/shift-relative-positioned-container-with-image-removal-expected.txt +++ /dev/null
@@ -1,65 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [785, 600], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [785, 735], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutIFrame IFRAME id='iframe'", - "rect": [8, 86, 732, 94], - "reason": "disappeared" - }, - { - "object": "LayoutImage IMG", - "rect": [58, 136, 489, 537], - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "rect": [58, 234, 489, 501], - "reason": "geometry" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "Scrolling Contents Layer", - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='relative'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV class='relative paddingTop'", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutImage IMG", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt index 16e81fb..b910d13c 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -64,10 +64,6 @@ { "object": "InlineTextBox 'There should only be one copy of this text.'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-clear-expected.txt index ff1d5d6..dd2ce67 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-clear-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/selection/selection-clear-expected.txt
@@ -71,11 +71,11 @@ }, { "object": "LayoutBR BR", - "reason": "geometry" + "reason": "selection" }, { "object": "InlineTextBox '\n'", - "reason": "geometry" + "reason": "selection" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt index acba3ca..3c69d22 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/svg/window-expected.txt
@@ -1159,22 +1159,6 @@ { "object": "LayoutSVGViewportContainer svg id='minimizeButton'", "reason": "full" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", - "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/dynamic-table-vertical-alignment-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/dynamic-table-vertical-alignment-change-expected.txt deleted file mode 100644 index bda0541..0000000 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/dynamic-table-vertical-alignment-change-expected.txt +++ /dev/null
@@ -1,55 +0,0 @@ -{ - "layers": [ - { - "name": "LayoutView #document", - "bounds": [800, 600], - "drawsContent": false, - "backgroundColor": "#FFFFFF" - }, - { - "name": "Scrolling Layer", - "bounds": [800, 585], - "drawsContent": false - }, - { - "name": "Scrolling Contents Layer", - "bounds": [808, 585], - "contentsOpaque": true, - "backgroundColor": "#FFFFFF", - "paintInvalidations": [ - { - "object": "LayoutBlockFlow (floating) DIV id='target'", - "rect": [11, 71, 100, 100], - "reason": "appeared" - } - ] - } - ], - "objectPaintInvalidations": [ - { - "object": "LayoutTableCell TD", - "reason": "incremental" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='target'", - "reason": "style change" - }, - { - "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - } - ] -} -
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-cell-move-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-cell-move-expected.txt index 187130da..4f29072 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-cell-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-cell-move-expected.txt
@@ -41,10 +41,6 @@ "reason": "appeared" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -54,19 +50,7 @@ }, { "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD id='s'", - "reason": "geometry" + "reason": "disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-shrink-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-shrink-row-repaint-expected.txt index 07c73d7..a20bb72 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-shrink-row-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/table/table-shrink-row-repaint-expected.txt
@@ -245,10 +245,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -265,10 +261,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -285,10 +277,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -305,10 +293,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -325,10 +309,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -345,10 +325,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -365,10 +341,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -385,10 +357,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -405,10 +373,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -425,10 +389,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -445,10 +405,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -465,10 +421,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/text-match-document-change-expected.txt index 2ebae95..607ed82d 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/text-match-document-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/text-match-document-change-expected.txt
@@ -60,10 +60,6 @@ { "object": "InlineTextBox 'After change'", "reason": "appeared" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index a15fc66..0b46361 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -67,10 +67,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -195,10 +191,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -320,10 +312,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -444,10 +432,6 @@ "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt new file mode 100644 index 0000000..8c8ac903 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/new-remote-playback-pipeline/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -0,0 +1,44 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x347 + LayoutBlockFlow {HTML} at (0,0) size 800x347.27 + LayoutBlockFlow {BODY} at (8,8) size 784x331.27 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 400x327 + LayoutVideo {VIDEO} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x315 clip at (9,9) size 398x313 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,108.08) size 384x98.09 + LayoutBlockFlow {DIV} at (142.95,0) size 98.09x98.09 [bgcolor=#FFFFFFE6] +layer at (8,275) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,267.27) size 400x48 + LayoutBlockFlow {DIV} at (16,0) size 31.14x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 32x18 + text run at (0,15) width 32: "0:00" + LayoutBlockFlow {DIV} at (51.14,0) size 40.03x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 41x18 + text run at (0,15) width 41: "/ 0:09" + LayoutBlockFlow {DIV} at (91.17,48) size 212.83x0 + LayoutButton {INPUT} at (352,0) size 48x48 +layer at (312,275) size 48x48 transparent + LayoutButton {INPUT} at (304,0) size 48x48 [color=#7F7F7F] +layer at (8,323) size 400x12 + LayoutSlider {INPUT} at (0,315.27) size 400x12 [color=#909090] + LayoutFlexibleBox {DIV} at (16,0) size 368x4 +layer at (24,323) size 368x4 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] +layer at (24,319) size 12x12 + LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 +layer at (24,323) size 0x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt new file mode 100644 index 0000000..8c8ac903 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -0,0 +1,44 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x347 + LayoutBlockFlow {HTML} at (0,0) size 800x347.27 + LayoutBlockFlow {BODY} at (8,8) size 784x331.27 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 400x327 + LayoutVideo {VIDEO} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 + LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x315 clip at (9,9) size 398x313 + LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (1px solid #D8D8D8) (1px solid #D1D1D1) (1px solid #BABABA) (1px solid #D1D1D1)] + LayoutFlexibleBox (anonymous) at (8,108.08) size 384x98.09 + LayoutBlockFlow {DIV} at (142.95,0) size 98.09x98.09 [bgcolor=#FFFFFFE6] +layer at (8,275) size 400x48 + LayoutFlexibleBox (relative positioned) {DIV} at (0,267.27) size 400x48 + LayoutBlockFlow {DIV} at (16,0) size 31.14x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 32x18 + text run at (0,15) width 32: "0:00" + LayoutBlockFlow {DIV} at (51.14,0) size 40.03x48 [color=#FFFFFF] + LayoutText {#text} at (0,15) size 41x18 + text run at (0,15) width 41: "/ 0:09" + LayoutBlockFlow {DIV} at (91.17,48) size 212.83x0 + LayoutButton {INPUT} at (352,0) size 48x48 +layer at (312,275) size 48x48 transparent + LayoutButton {INPUT} at (304,0) size 48x48 [color=#7F7F7F] +layer at (8,323) size 400x12 + LayoutSlider {INPUT} at (0,315.27) size 400x12 [color=#909090] + LayoutFlexibleBox {DIV} at (16,0) size 368x4 +layer at (24,323) size 368x4 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF4D] +layer at (24,319) size 12x12 + LayoutBlockFlow (relative positioned) {DIV} at (0,-4) size 12x12 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 +layer at (24,323) size 0x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#FFFFFF] +layer at (24,323) size 368x4 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 368x4 [bgcolor=#FFFFFF8A]
diff --git a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt index e94bd26..b88944e 100644 --- a/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/mac/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt
@@ -19,13 +19,16 @@ LayoutVideo {VIDEO} at (0,244) size 320x240 layer at (8,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (332,50) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,50) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,294) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,294) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-fixed-scrolling-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-fixed-scrolling-expected.txt index b498b94..2395591d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-fixed-scrolling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-fixed-scrolling-expected.txt
@@ -12,8 +12,9 @@ LayoutVideo {VIDEO} at (0,80) size 400x300 layer at (8,38) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (8,38) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (0,0) size 500x60 LayoutBlockFlow (positioned) {DIV} at (0,0) size 500x60 [bgcolor=#0000FFCC] scrolled to 0,50
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-opacity-overlay-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-opacity-overlay-expected.txt index 9345638c..1a2e38c1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-opacity-overlay-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/geometry/video-opacity-overlay-expected.txt
@@ -14,8 +14,9 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (9,53) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 +layer at (9,53) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 layer at (9,358) size 10x10 transparent LayoutBlockFlow {DIV} at (1,306) size 10x10 [bgcolor=#008000] layer at (9,293) size 400x60
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/layers-inside-overflow-scroll-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/layers-inside-overflow-scroll-expected.txt index de727e0..94a0e7fe 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/layers-inside-overflow-scroll-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/layers-inside-overflow-scroll-expected.txt
@@ -15,7 +15,8 @@ LayoutBlockFlow {DIV} at (1,1) size 285x500 layer at (19,53) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,53) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200 layer at (19,170) size 100x100 backgroundClip at (19,270) size 285x150 clip at (19,270) size 285x150 LayoutBlockFlow {DIV} at (0,0) size 100x100 [bgcolor=#FF0000]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-compositing-descendant-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-compositing-descendant-expected.txt index 5c929ba..a5b6fe2 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-compositing-descendant-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/overflow-compositing-descendant-expected.txt
@@ -15,7 +15,8 @@ LayoutVideo {VIDEO} at (0,0) size 100x100 [bgcolor=#000000] layer at (19,63) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (19,63) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100 layer at (19,168) size 100x100 LayoutBlockFlow (relative positioned) {DIV} at (11,116) size 100x100 [bgcolor=#008000]
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scroll-ancestor-update-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scroll-ancestor-update-expected.txt index 90e3de4..c24d63264 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scroll-ancestor-update-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/overflow/scroll-ancestor-update-expected.txt
@@ -22,5 +22,6 @@ LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 100x100 [bgcolor=#008000] layer at (0,0) size 100x100 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 100x100 - LayoutBlockFlow {DIV} at (50,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 100x100 +layer at (0,0) size 100x100 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 100x100
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/load-video-in-reflection-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/load-video-in-reflection-expected.txt index 7a82ace..c61fed8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/load-video-in-reflection-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/reflections/load-video-in-reflection-expected.txt
@@ -13,5 +13,6 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 [bgcolor=#FF0000] layer at (8,52) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/self-painting-layers-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/self-painting-layers-expected.txt index bed46c4..e3c5967 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/self-painting-layers-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/self-painting-layers-expected.txt
@@ -23,5 +23,6 @@ text run at (0,102) width 62: "here." layer at (19,53) size 300x200 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x200 - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x200 +layer at (19,53) size 300x200 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x200
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt index 99ae881..a01fdfc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/video-frame-size-change-expected.txt
@@ -16,9 +16,11 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,112) size 320x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x180 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x180 +layer at (8,112) size 320x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x180 layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win/compositing/video/video-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/win/compositing/video/video-poster-expected.txt index aa85d81..d5a38eef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/compositing/video/video-poster-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/compositing/video/video-poster-expected.txt
@@ -76,9 +76,18 @@ "drawsContent": false }, { + "name": "Squashing Containment Layer", + "drawsContent": false + }, + { "name": "LayoutFlexibleBox (relative positioned) DIV class='sizing-small phase-ready state-stopped'", "position": [8, 8], "bounds": [352, 288] + }, + { + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", + "position": [8, 8], + "bounds": [352, 288] } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt index 0fb1ce5..81051ce 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-after-reload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt index 35e21164..17b040ef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-strict-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt index a7d89919..c74e1f460 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (18,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (18,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (18,44) size 320x228 clip at (20,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt index f35859d..00bb8d8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-styling-strict-expected.txt
@@ -16,9 +16,10 @@ LayoutVideo {VIDEO} at (324,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 [color=#000000] - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,52) size 320x228 clip at (10,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -50,9 +51,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (332,52) size 320x228 clip at (334,54) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt index b9d4f1c6..cf97b55c92 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls-without-preload-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/lazy-loaded-style-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/lazy-loaded-style-expected.txt index 47cf856..afc253c3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/lazy-loaded-style-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/lazy-loaded-style-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x300 layer at (8,8) size 400x300 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x300 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x300 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x300 +layer at (8,8) size 400x300 LayoutFlexibleBox {DIV} at (0,0) size 400x300 layer at (8,8) size 400x288 clip at (10,10) size 396x284 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x288 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt index 1e25818..8d9c7c8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-custom-bg-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt index 1e25818..8d9c7c8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/paint-controls-webkit-appearance-none-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 400x327.27 layer at (8,8) size 400x327 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 400x327.27 - LayoutBlockFlow {DIV} at (200,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x327 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 400x327.27 +layer at (8,8) size 400x327 LayoutFlexibleBox {DIV} at (0,0) size 400x327.27 layer at (8,8) size 400x315 clip at (10,10) size 396x311 LayoutButton (relative positioned) {INPUT} at (0,0) size 400x315.27 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-dark-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-dark-rendering-expected.txt index 265e05fd..a13b453b 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-dark-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-dark-rendering-expected.txt
@@ -17,21 +17,24 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,305) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,542) size 320x240 layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,542) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (16,550) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-light-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-light-rendering-expected.txt index ce381f3..32b4c728 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-light-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/controls/video-overlay-cast-light-rendering-expected.txt
@@ -17,19 +17,22 @@ LayoutVideo {VIDEO} at (0,0) size 320x261.81 layer at (8,52) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 +layer at (8,52) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 layer at (16,60) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,345) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81 layer at (16,353) size 48x48 LayoutButton (positioned) {INPUT} at (8,8) size 48x48 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutVideo (positioned) {VIDEO} at (8,611.81) size 320x261.81 layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x261.81 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x261.81 +layer at (8,612) size 320x262 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x261.81
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt index 6116a30..45ff970 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-clone-expected.txt
@@ -15,9 +15,10 @@ LayoutMedia {AUDIO} at (300,96) size 300x54 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,98) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48 @@ -54,9 +55,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 0x4 [bgcolor=#0000008A] layer at (8,163) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,163) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,163) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,253) size 300x48 LayoutFlexibleBox (relative positioned) {DIV} at (0,90) size 300x48
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt index 823565886..a07f232f 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/media-controls-grey-scrubber-expected.txt
@@ -8,9 +8,10 @@ LayoutVideo {VIDEO} at (0,0) size 300x150 layer at (8,8) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (8,8) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (8,8) size 300x138 clip at (10,10) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-horizontal-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-horizontal-expected.txt index c75966e..017accfe 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-horizontal-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-horizontal-expected.txt
@@ -40,5 +40,6 @@ text run at (19,0) width 282: "Cue 6: should be on top of bottom positioned cue 5." layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-vertical-expected.txt index 358f334..84cf45b3 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/track/track-cue-rendering-vertical-expected.txt
@@ -40,5 +40,6 @@ text run at (2,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt index 4b8fe8d..2ee86bc1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-aspect-ratio-expected.txt
@@ -27,39 +27,47 @@ LayoutVideo {VIDEO} at (160,0) size 160x120 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,284) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,284) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (8,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (8,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (168,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (168,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (328,404) size 320x120 LayoutBlockFlow (relative positioned) {DIV} at (320,360) size 320x120 layer at (328,404) size 160x120 LayoutVideo (positioned) {VIDEO} at (0,0) size 160x120 layer at (328,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (328,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120 layer at (488,404) size 160x120 LayoutVideo (positioned) {VIDEO} at (160,0) size 160x120 layer at (488,404) size 160x120 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 160x120 - LayoutBlockFlow {DIV} at (80,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 160x120 +layer at (488,404) size 160x120 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 160x120
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt index 8c89b161..d98d486 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv420-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,47) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt index c0ebd81b..b9052f8 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-colorspace-yuv422-expected.txt
@@ -11,5 +11,6 @@ LayoutVideo {VIDEO} at (0,0) size 206x156 [border: (3px solid #FF0000)] layer at (11,47) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (11,47) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt index 7733b32..696e5bdd 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-controls-rendering-expected.txt
@@ -17,9 +17,10 @@ LayoutVideo {VIDEO} at (0,0) size 320x240 layer at (8,44) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,44) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,44) size 320x228 clip at (10,46) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -51,9 +52,10 @@ LayoutBlockFlow (positioned) {DIV} at (0,0) size 288x4 [bgcolor=#FFFFFF8A] layer at (8,284) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,284) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,284) size 320x228 clip at (10,286) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)] @@ -87,8 +89,9 @@ LayoutVideo (positioned) {VIDEO} at (8,524) size 320x240 layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,524) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,524) size 320x240 backgroundClip at (8,524) size 320x76 clip at (8,524) size 320x76 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,524) size 320x228 backgroundClip at (8,524) size 320x76 clip at (10,526) size 316x74
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt index 71afe61..12a5739 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-display-toggle-expected.txt
@@ -11,9 +11,10 @@ LayoutVideo {VIDEO} at (0,20) size 320x240 layer at (8,28) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 +layer at (8,28) size 320x240 LayoutFlexibleBox {DIV} at (0,0) size 320x240 layer at (8,28) size 320x228 clip at (10,30) size 316x224 LayoutButton (relative positioned) {INPUT} at (0,0) size 320x228 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt index af1a7056..b6d1271 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-empty-source-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 302x152 [border: (1px solid #000000)] layer at (9,45) size 300x150 LayoutFlexibleBox (relative positioned) {DIV} at (1,1) size 300x150 [bgcolor=#333333] - LayoutBlockFlow {DIV} at (150,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 300x150 +layer at (9,45) size 300x150 LayoutFlexibleBox {DIV} at (0,0) size 300x150 layer at (9,45) size 300x138 clip at (11,47) size 296x134 LayoutButton (relative positioned) {INPUT} at (0,0) size 300x138 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt index 1928715..e1f1fdc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-layer-crash-expected.txt
@@ -20,11 +20,13 @@ LayoutVideo {VIDEO} at (4,20) size 206x156 [border: (3px solid #FF0000)] layer at (15,67) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,67) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150 layer at (12,225) size 206x156 LayoutVideo {VIDEO} at (4,181) size 206x156 [border: (3px solid #FF0000)] layer at (15,228) size 200x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 200x150 - LayoutBlockFlow {DIV} at (100,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 200x150 +layer at (15,228) size 200x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 200x150
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt index 83dc6f1..3e9f4ab 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-no-audio-expected.txt
@@ -12,9 +12,10 @@ LayoutVideo {VIDEO} at (0,0) size 352x288 layer at (8,44) size 352x288 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 352x288 - LayoutBlockFlow {DIV} at (176,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x288 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 352x288 +layer at (8,44) size 352x288 LayoutFlexibleBox {DIV} at (0,0) size 352x288 layer at (8,44) size 352x276 clip at (10,46) size 348x272 LayoutButton (relative positioned) {INPUT} at (0,0) size 352x276 [border: (2px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-poster-scale-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-poster-scale-expected.txt index d1e5a57c..9ebcf2df 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-poster-scale-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-poster-scale-expected.txt
@@ -32,25 +32,31 @@ LayoutVideo {VIDEO} at (390,545) size 326x56 [bgcolor=#EE00EE] [border: (3px solid #FF0000)] layer at (11,11) size 320x150 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x150 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x150 +layer at (11,11) size 320x150 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x150 layer at (11,172) size 76x103 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103 - LayoutBlockFlow {DIV} at (38,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 76x103 +layer at (11,172) size 76x103 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 76x103 layer at (97,172) size 76x103 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 76x103 - LayoutBlockFlow {DIV} at (38,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 76x103 +layer at (97,172) size 76x103 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 76x103 layer at (11,286) size 50x320 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 50x320 - LayoutBlockFlow {DIV} at (25,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 50x320 +layer at (11,286) size 50x320 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 50x320 layer at (71,366) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (71,366) size 320x240 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (401,556) size 320x50 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (3,3) size 320x50 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x50 +layer at (401,556) size 320x50 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x50
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-replaces-poster-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-replaces-poster-expected.txt index f3edaae..a11b7398 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-replaces-poster-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-replaces-poster-expected.txt
@@ -20,5 +20,6 @@ LayoutVideo {VIDEO} at (0,0) size 480x270 layer at (8,72) size 480x270 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 480x270 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x270 +layer at (8,72) size 480x270 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x270
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt index 8c32692..3beae52 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-controls-expected.txt
@@ -10,9 +10,10 @@ LayoutVideo {VIDEO} at (45,73) size 240x180 layer at (57,85) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,85) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,85) size 240x162 clip at (60,88) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)] @@ -47,9 +48,10 @@ LayoutVideo {VIDEO} at (45,298) size 240x180 layer at (57,310) size 240x180 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 240x180 - LayoutBlockFlow {DIV} at (120,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x180 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 240x180 +layer at (57,310) size 240x180 LayoutFlexibleBox {DIV} at (0,0) size 240x180 layer at (57,310) size 240x162 clip at (60,313) size 234x156 LayoutButton (relative positioned) {INPUT} at (0,0) size 240x162 [border: (3px outset #C0C0C0)]
diff --git a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-expected.txt b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-expected.txt index b45cc9dd..d30ad6d5 100644 --- a/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/media/video-zoom-expected.txt
@@ -23,9 +23,11 @@ LayoutVideo {VIDEO} at (4,0) size 489x369 [border: (4.50px solid #FF0000)] layer at (17,49) size 480x360 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,49) size 480x360 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360 layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 LayoutFlexibleBox (relative positioned) {DIV} at (4.50,4.50) size 480x360 - LayoutBlockFlow {DIV} at (240,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 480x360 +layer at (17,475) size 480x360 backgroundClip at (0,0) size 785x600 clip at (0,0) size 785x600 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 480x360
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/clipped-relative-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/clipped-relative-expected.txt index 08c9e5b..4ba8da1 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/clipped-relative-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/clip/clipped-relative-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (relative positioned) DIV id='i'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV id='inner'", "reason": "geometry" }, @@ -46,10 +42,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt index c93ad87..29b04b1d 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/compositing/remove-squashed-layer-plus-move-expected.txt
@@ -81,10 +81,6 @@ { "object": "LayoutBlockFlow (relative positioned) DIV class='mv-tile'", "reason": "compositing update" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/crbug-371640-3-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/crbug-371640-3-expected.txt index 95f47d9..cd3d710 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/crbug-371640-3-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/crbug-371640-3-expected.txt
@@ -37,22 +37,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (floating) DIV id='container'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV id='keep_outer' class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (relative positioned) DIV id='keep_inner'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV id='abs_pos'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV id='keep_child'", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/float-move-during-layout-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/float-move-during-layout-expected.txt index 330ab51..cd8e400 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/float-move-during-layout-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/float-move-during-layout-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow DIV id='s'", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (floating) DIV", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt index 700c464..e62a20cc 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/image/canvas-composite-repaint-by-all-imagesource-expected.txt
@@ -246,9 +246,18 @@ "drawsContent": false }, { + "name": "Squashing Containment Layer", + "drawsContent": false + }, + { "name": "LayoutFlexibleBox (relative positioned) DIV class='sizing-small phase-ready state-stopped'", "position": [15, 859], "bounds": [150, 60] + }, + { + "name": "Squashing Layer (first squashed layer: LayoutBlockFlow (positioned) DIV)", + "position": [15, 859], + "bounds": [150, 60] } ], "objectPaintInvalidations": [
diff --git a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-text-expected.txt similarity index 93% rename from third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt rename to third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-text-expected.txt index ca428b3..8d813cb 100644 --- a/third_party/WebKit/LayoutTests/paint/invalidation/multicol/multicol-with-text-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/multicol/multicol-with-text-expected.txt
@@ -28,11 +28,11 @@ "objectPaintInvalidations": [ { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "incremental" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "incremental" }, { "object": "LayoutMultiColumnFlowThread (anonymous)", @@ -52,11 +52,11 @@ }, { "object": "LayoutMultiColumnFlowThread (anonymous)", - "reason": "geometry" + "reason": "appeared" }, { "object": "RootInlineBox", - "reason": "geometry" + "reason": "appeared" }, { "object": "LayoutBR BR",
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt index d2e5dfc1..34ad8e0 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/offset-change-wrong-invalidation-with-float-expected.txt
@@ -58,14 +58,6 @@ "reason": "geometry" }, { - "object": "LayoutListItem LI", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { "object": "LayoutListMarker (anonymous)", "reason": "geometry" }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-expected.txt index 8eeab150..2ca79297 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-right-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-right-expected.txt index 5482ecf24..f0d3e65 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-right-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/overflow/float-overflow-right-expected.txt
@@ -604,10 +604,38 @@ "reason": "geometry" }, { + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", + "reason": "geometry" + }, + { "object": "LayoutText #text", "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -640,10 +668,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -676,10 +700,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -712,46 +732,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -784,10 +764,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutDeprecatedFlexibleBox DIV class='outer box'", "reason": "geometry" }, @@ -820,22 +796,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -864,22 +828,10 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutTable TABLE class='outer'", "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -908,10 +860,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (anonymous)", "reason": "geometry" }, @@ -924,14 +872,6 @@ "reason": "geometry" }, { - "object": "LayoutTableSection TBODY", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -960,7 +900,27 @@ "reason": "geometry" }, { - "object": "LayoutText #text", + "object": "LayoutBlockFlow DIV class='outer'", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow DIV", + "reason": "geometry" + }, + { + "object": "LayoutBlockFlow (floating) DIV", + "reason": "geometry" + }, + { + "object": "RootInlineBox", + "reason": "geometry" + }, + { + "object": "LayoutInline SPAN", + "reason": "geometry" + }, + { + "object": "InlineFlowBox", "reason": "geometry" }, { @@ -968,6 +928,10 @@ "reason": "geometry" }, { + "object": "InlineTextBox 'x'", + "reason": "geometry" + }, + { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1000,10 +964,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1036,46 +996,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV class='outer'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (floating) DIV", - "reason": "geometry" - }, - { - "object": "RootInlineBox", - "reason": "geometry" - }, - { - "object": "LayoutInline SPAN", - "reason": "geometry" - }, - { - "object": "InlineFlowBox", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "InlineTextBox 'x'", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV class='outer'", "reason": "geometry" }, @@ -1110,14 +1030,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt index 266173e..e1117fb 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/layoutstate-invalid-invalidation-inline-relative-positioned-expected.txt
@@ -56,10 +56,6 @@ "reason": "geometry" }, { - "object": "LayoutText #text", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow DIV", "reason": "geometry" }, @@ -74,10 +70,6 @@ { "object": "InlineTextBox 'x'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-document-element-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-document-element-expected.txt index 1b1dd62..a1b936e 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-document-element-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-document-element-expected.txt
@@ -49,10 +49,6 @@ "reason": "style change" }, { - "object": "LayoutBlockFlow BODY", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow P", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt index bd78413..cea0f15 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-great-grandparent-change-location-expected.txt
@@ -42,18 +42,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) DIV id='great-grandparent'", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { - "object": "LayoutBlockFlow (positioned) DIV", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow (positioned) DIV", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt index 190b4e6..e319b61 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/position/positioned-list-offset-change-repaint-expected.txt
@@ -32,10 +32,6 @@ ], "objectPaintInvalidations": [ { - "object": "LayoutBlockFlow (positioned) UL id='list'", - "reason": "geometry" - }, - { "object": "LayoutListItem (positioned) LI", "reason": "geometry" }, @@ -50,10 +46,6 @@ { "object": "LayoutImage IMG", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt index d9adabc..2bfc7cb 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/repaint-descandant-on-ancestor-layer-move-expected.txt
@@ -64,10 +64,6 @@ { "object": "InlineTextBox 'There should only be one copy of this text.'", "reason": "geometry" - }, - { - "object": "LayoutText #text", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/selection/selection-clear-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/selection/selection-clear-expected.txt index ab9e13d..3c95b95 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/selection/selection-clear-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/selection/selection-clear-expected.txt
@@ -71,11 +71,11 @@ }, { "object": "LayoutBR BR", - "reason": "geometry" + "reason": "selection" }, { "object": "InlineTextBox '\n'", - "reason": "geometry" + "reason": "selection" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt index 407b52e..61301d66 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/svg/window-expected.txt
@@ -1159,22 +1159,6 @@ { "object": "LayoutSVGViewportContainer svg id='minimizeButton'", "reason": "full" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g", - "reason": "appeared" - }, - { - "object": "LayoutSVGContainer g id='windowTitlebarGroupminimalWindow'", - "reason": "appeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-move-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-move-expected.txt index c1c49a2..632bb9a 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-move-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-cell-move-expected.txt
@@ -41,10 +41,6 @@ "reason": "appeared" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -54,19 +50,7 @@ }, { "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD", - "reason": "geometry" - }, - { - "object": "LayoutTableCell TD id='s'", - "reason": "geometry" + "reason": "disappeared" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-shrink-row-repaint-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-shrink-row-repaint-expected.txt index 20e916d..c7c2b51 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-shrink-row-repaint-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/table/table-shrink-row-repaint-expected.txt
@@ -245,10 +245,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -265,10 +261,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -285,10 +277,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -305,10 +293,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -325,10 +309,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -345,10 +325,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -365,10 +341,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -385,10 +357,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -405,10 +373,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -425,10 +389,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -445,10 +405,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" }, @@ -465,10 +421,6 @@ "reason": "geometry" }, { - "object": "LayoutTableRow TR", - "reason": "geometry" - }, - { "object": "LayoutTableCell TD", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/text-match-document-change-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/text-match-document-change-expected.txt index 380a574..b887502 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/text-match-document-change-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/text-match-document-change-expected.txt
@@ -60,10 +60,6 @@ { "object": "InlineTextBox 'After change'", "reason": "appeared" - }, - { - "object": "LayoutBlockFlow DIV", - "reason": "geometry" } ] }
diff --git a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt index 157296f7..5ecbb33 100644 --- a/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/paint/invalidation/window-resize/window-resize-vertical-writing-mode-expected.txt
@@ -67,10 +67,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -195,10 +191,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -320,10 +312,6 @@ "reason": "geometry" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" }, @@ -444,10 +432,6 @@ "reason": "incremental" }, { - "object": "LayoutBlockFlow HTML", - "reason": "geometry" - }, - { "object": "LayoutBlockFlow BODY", "reason": "geometry" },
diff --git a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt index 2e77d19..9441edef 100644 --- a/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win/virtual/video-surface-layer/media/video-frame-accurate-seek-expected.txt
@@ -19,13 +19,16 @@ LayoutVideo {VIDEO} at (0,245) size 320x240 layer at (8,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (332,52) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (332,52) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240 layer at (8,297) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,297) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win7/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/media/track/track-cue-rendering-vertical-expected.txt index 4741d13..3df6aa7 100644 --- a/third_party/WebKit/LayoutTests/platform/win7/media/track/track-cue-rendering-vertical-expected.txt +++ b/third_party/WebKit/LayoutTests/platform/win7/media/track/track-cue-rendering-vertical-expected.txt
@@ -40,5 +40,6 @@ text run at (1,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" layer at (8,8) size 320x240 LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 - LayoutBlockFlow {DIV} at (160,0) size 0x0 LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt b/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt new file mode 100644 index 0000000..3df6aa7 --- /dev/null +++ b/third_party/WebKit/LayoutTests/platform/win7/virtual/video-surface-layer/media/track/track-cue-rendering-vertical-expected.txt
@@ -0,0 +1,45 @@ +layer at (0,0) size 800x600 + LayoutView at (0,0) size 800x600 +layer at (0,0) size 800x261 + LayoutBlockFlow {HTML} at (0,0) size 800x261 + LayoutBlockFlow {BODY} at (8,8) size 784x245 + LayoutText {#text} at (0,0) size 0x0 +layer at (8,8) size 320x240 + LayoutVideo {VIDEO} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (relative positioned) {DIV} at (0,0) size 320x240 [color=#FFFFFF] +layer at (9,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (1,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 1: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (28,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (20,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 2: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (253,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (245,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 3: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (234,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (226,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 4: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (309,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (301,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 5: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (290,8) size 18x240 + LayoutBlockFlow (positioned) {DIV} at (282,0) size 18x240 + LayoutInline {DIV} at (0,0) size 19x116 [bgcolor=#000000CC] + LayoutText {#text} at (1,64) size 15x112 + text run at (1,64) width 111: "Cue 6: \x{79C1}\x{306F}\x{7ACB}\x{6D3E}\x{306A}\x{4EBA}" +layer at (8,8) size 320x240 + LayoutFlexibleBox (relative positioned) {DIV} at (0,0) size 320x240 + LayoutFlexibleBox {DIV} at (0,0) size 320x240 +layer at (8,8) size 320x240 + LayoutBlockFlow (positioned) {DIV} at (0,0) size 320x240
diff --git a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt index 3e30bac..beb74c5 100644 --- a/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
@@ -9111,6 +9111,13 @@ getter poseModelMatrix method constructor method getViewMatrix +interface XRFrame + attribute @@toStringTag + getter session + getter views + method constructor + method getDevicePose + method getInputPose interface XRFrameOfReference : XRCoordinateSystem attribute @@toStringTag getter bounds @@ -9139,13 +9146,6 @@ attribute @@toStringTag getter canvas method constructor -interface XRPresentationFrame - attribute @@toStringTag - getter session - getter views - method constructor - method getDevicePose - method getInputPose interface XRSession : EventTarget attribute @@toStringTag getter baseLayer
diff --git a/third_party/WebKit/LayoutTests/xr/exclusive_requestFrame_called.html b/third_party/WebKit/LayoutTests/xr/exclusive_requestFrame_called.html index 3543ed7..24bfd31 100644 --- a/third_party/WebKit/LayoutTests/xr/exclusive_requestFrame_called.html +++ b/third_party/WebKit/LayoutTests/xr/exclusive_requestFrame_called.html
@@ -15,7 +15,7 @@ session.baseLayer = new XRWebGLLayer(session, gl); function onFrame(time, xrFrame) { - assert_true(xrFrame instanceof XRPresentationFrame); + assert_true(xrFrame instanceof XRFrame); // Test does not complete until the returned promise resolves. resolve(); }
diff --git a/third_party/WebKit/LayoutTests/xr/getDevicePose_oneframeupdate.html b/third_party/WebKit/LayoutTests/xr/getDevicePose_oneframeupdate.html index cf0e948..c5de3df 100644 --- a/third_party/WebKit/LayoutTests/xr/getDevicePose_oneframeupdate.html +++ b/third_party/WebKit/LayoutTests/xr/getDevicePose_oneframeupdate.html
@@ -58,6 +58,6 @@ { exclusive: true }, { outputContext: getOutputContext() } ], -"XRPresentationFrame getDevicePose updates on the next frame"); +"XRFrame getDevicePose updates on the next frame"); </script>
diff --git a/third_party/WebKit/LayoutTests/xr/xrView_match.html b/third_party/WebKit/LayoutTests/xr/xrView_match.html index 2fac659..dbdca43 100644 --- a/third_party/WebKit/LayoutTests/xr/xrView_match.html +++ b/third_party/WebKit/LayoutTests/xr/xrView_match.html
@@ -55,6 +55,6 @@ session.requestAnimationFrame(onFrame); })); }, fakeDevices["FakeGooglePixelPhone"], [{ exclusive: true }], -"XRPresentationFrame contains the expected views"); +"XRFrame contains the expected views"); </script>
diff --git a/third_party/blink/public/platform/web_feature.mojom b/third_party/blink/public/platform/web_feature.mojom index 6f137386..eb09bb3e 100644 --- a/third_party/blink/public/platform/web_feature.mojom +++ b/third_party/blink/public/platform/web_feature.mojom
@@ -1942,6 +1942,8 @@ kMediaElementSourceOnOfflineContext = 2475, kMediaStreamDestinationOnOfflineContext = 2476, kMediaStreamSourceOnOfflineContext = 2477, + kRTCDataChannelInitMaxRetransmitTime = 2478, + kRTCPeerConnectionCreateDataChannelMaxPacketLifeTime = 2479, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots.
diff --git a/third_party/blink/public/platform/web_runtime_features.h b/third_party/blink/public/platform/web_runtime_features.h index e76a5e4..fece5200 100644 --- a/third_party/blink/public/platform/web_runtime_features.h +++ b/third_party/blink/public/platform/web_runtime_features.h
@@ -78,6 +78,7 @@ BLINK_PLATFORM_EXPORT static void EnableCacheInlineScriptCode(bool); BLINK_PLATFORM_EXPORT static void EnableCanvas2dImageChromium(bool); BLINK_PLATFORM_EXPORT static void EnableCSSHexAlphaColor(bool); + BLINK_PLATFORM_EXPORT static void EnableCSSFragmentIdentifiers(bool); BLINK_PLATFORM_EXPORT static void EnableScrollTopLeftInterop(bool); BLINK_PLATFORM_EXPORT static void EnableDatabase(bool); BLINK_PLATFORM_EXPORT static void EnableDecodeToYUV(bool);
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn index 61cd106..5a8f38d 100644 --- a/third_party/blink/renderer/core/BUILD.gn +++ b/third_party/blink/renderer/core/BUILD.gn
@@ -2033,6 +2033,7 @@ "paint/block_painter_test.cc", "paint/box_paint_invalidator_test.cc", "paint/clip_path_clipper_test.cc", + "paint/clip_rect_test.cc", "paint/compositing/composited_layer_mapping_test.cc", "paint/compositing/compositing_inputs_updater_test.cc", "paint/compositing/compositing_layer_assigner_test.cc",
diff --git a/third_party/blink/renderer/core/editing/caret_display_item_client.cc b/third_party/blink/renderer/core/editing/caret_display_item_client.cc index af43249..9f0073f 100644 --- a/third_party/blink/renderer/core/editing/caret_display_item_client.cc +++ b/third_party/blink/renderer/core/editing/caret_display_item_client.cc
@@ -228,8 +228,7 @@ if (context.NeedsVisualRectUpdate(*layout_block_)) { if (!local_rect_.IsEmpty()) { new_visual_rect = local_rect_; - context.MapLocalRectToVisualRectInBacking(*layout_block_, - new_visual_rect); + context.MapLocalRectToVisualRect(*layout_block_, new_visual_rect); if (layout_block_->UsesCompositedScrolling()) { // The caret should use scrolling coordinate space.
diff --git a/third_party/blink/renderer/core/frame/deprecation.cc b/third_party/blink/renderer/core/frame/deprecation.cc index cfc92fa..f59deb0 100644 --- a/third_party/blink/renderer/core/frame/deprecation.cc +++ b/third_party/blink/renderer/core/frame/deprecation.cc
@@ -586,6 +586,11 @@ "Creating a MediaStreamAudioSourceNode on an OfflineAudioContext", kM70, "5258622686724096")}; + case WebFeature::kRTCDataChannelInitMaxRetransmitTime: + return {"RTCDataChannelInitMaxRetransmitTime", kM70, + ReplacedWillBeRemoved("maxRetransmitTime", "maxPacketLifeTime", + kM70, "5198350873788416")}; + // Features that aren't deprecated don't have a deprecation message. default: return {"NotDeprecated", kUnknown, ""};
diff --git a/third_party/blink/renderer/core/frame/event_handler_registry.cc b/third_party/blink/renderer/core/frame/event_handler_registry.cc index 8221abf..d1bc0757 100644 --- a/third_party/blink/renderer/core/frame/event_handler_registry.cc +++ b/third_party/blink/renderer/core/frame/event_handler_registry.cc
@@ -10,6 +10,7 @@ #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/html/html_frame_owner_element.h" #include "third_party/blink/renderer/core/layout/layout_object.h" +#include "third_party/blink/renderer/core/layout/layout_view.h" #include "third_party/blink/renderer/core/page/chrome_client.h" #include "third_party/blink/renderer/core/page/scrolling/scrolling_coordinator.h" @@ -293,6 +294,12 @@ if (auto* node = target->ToNode()) { if (auto* layout_object = node->GetLayoutObject()) layout_object->MarkEffectiveWhitelistedTouchActionChanged(); + } else if (auto* dom_window = target->ToLocalDOMWindow()) { + // This event handler is on a window. Ensure the layout view is + // invalidated because the layout view tracks the window's blocking + // touch event rects. + if (auto* layout_view = dom_window->GetFrame()->ContentLayoutObject()) + layout_view->MarkEffectiveWhitelistedTouchActionChanged(); } } }
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.cc b/third_party/blink/renderer/core/frame/local_frame_view.cc index 753b56c..7efcbef 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view.cc
@@ -41,6 +41,7 @@ #include "third_party/blink/renderer/core/css/style_change_reason.h" #include "third_party/blink/renderer/core/dom/ax_object_cache.h" #include "third_party/blink/renderer/core/dom/element_visibility_observer.h" +#include "third_party/blink/renderer/core/dom/static_node_list.h" #include "third_party/blink/renderer/core/editing/drag_caret.h" #include "third_party/blink/renderer/core/editing/frame_selection.h" #include "third_party/blink/renderer/core/editing/markers/document_marker_controller.h" @@ -156,6 +157,10 @@ constexpr int kLetterPortraitPageWidth = 612; constexpr int kLetterPortraitPageHeight = 792; +constexpr char kCssFragmentIdentifierPrefix[] = "targetElement="; +constexpr size_t kCssFragmentIdentifierPrefixLength = + base::size(kCssFragmentIdentifierPrefix); + // Changing these values requires changing the names generated in // EnsureUkmTimeAggregator(). enum class UkmMetricNames { @@ -1673,7 +1678,15 @@ UrlFragmentBehavior behavior) { DCHECK(frame_->GetDocument()); - Element* anchor_node = frame_->GetDocument()->FindAnchor(name); + Element* anchor_node; + String selector; + if (RuntimeEnabledFeatures::CSSFragmentIdentifiersEnabled() && + ParseCSSFragmentIdentifier(name, &selector)) { + anchor_node = + FindCSSFragmentAnchor(AtomicString(selector), frame_->GetDocument()); + } else { + anchor_node = frame_->GetDocument()->FindAnchor(name); + } // Setting to null will clear the current target. frame_->GetDocument()->SetCSSTarget(anchor_node); @@ -1724,6 +1737,23 @@ return true; } +Element* LocalFrameView::FindCSSFragmentAnchor(const AtomicString& selector, + Document* document) { + DummyExceptionStateForTesting exception_state; + return document->QuerySelector(selector, exception_state); +} + +bool LocalFrameView::ParseCSSFragmentIdentifier(const String& fragment, + String* selector) { + size_t pos = fragment.Find(kCssFragmentIdentifierPrefix); + if (pos == 0) { + *selector = fragment.Substring(kCssFragmentIdentifierPrefixLength - 1); + return true; + } + + return false; +} + void LocalFrameView::ClearFragmentAnchor() { fragment_anchor_ = nullptr; }
diff --git a/third_party/blink/renderer/core/frame/local_frame_view.h b/third_party/blink/renderer/core/frame/local_frame_view.h index 9db8c2689..83e418ce 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view.h +++ b/third_party/blink/renderer/core/frame/local_frame_view.h
@@ -52,6 +52,7 @@ class AXObjectCache; class Cursor; +class Document; class DocumentLifecycle; class Element; class ElementVisibilityObserver; @@ -870,6 +871,8 @@ bool UpdatePlugins(); bool ProcessUrlFragmentHelper(const String&, UrlFragmentBehavior); + bool ParseCSSFragmentIdentifier(const String&, String*); + Element* FindCSSFragmentAnchor(const AtomicString&, Document*); void DidScrollTimerFired(TimerBase*); void UpdateCompositedSelectionIfNeeded();
diff --git a/third_party/blink/renderer/core/frame/local_frame_view_test.cc b/third_party/blink/renderer/core/frame/local_frame_view_test.cc index a35ddf6..3bdb6f0 100644 --- a/third_party/blink/renderer/core/frame/local_frame_view_test.cc +++ b/third_party/blink/renderer/core/frame/local_frame_view_test.cc
@@ -12,6 +12,8 @@ #include "third_party/blink/renderer/core/paint/paint_layer.h" #include "third_party/blink/renderer/core/paint/paint_property_tree_printer.h" #include "third_party/blink/renderer/core/testing/core_unit_test_helper.h" +#include "third_party/blink/renderer/core/testing/sim/sim_request.h" +#include "third_party/blink/renderer/core/testing/sim/sim_test.h" #include "third_party/blink/renderer/platform/geometry/int_size.h" #include "third_party/blink/renderer/platform/graphics/paint/paint_artifact.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" @@ -168,5 +170,99 @@ EXPECT_TRUE(child_layout_view->FirstFragment().PaintProperties()); } +class LocalFrameViewSimTest : public SimTest { + void SetUp() override { + SimTest::SetUp(); + RuntimeEnabledFeatures::SetCSSFragmentIdentifiersEnabled(true); + } +}; + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierIsParsed) { + SimRequest main_resource("https://example.com/#targetElement=.foobar", + "text/html"); + LoadURL("https://example.com/#targetElement=.foobar"); + main_resource.Complete("<div class='foobar' id='target'></div>"); + + Element* target = GetDocument().getElementById("target"); + EXPECT_EQ(target, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierComplexSelector) { + SimRequest main_resource( + "https://example.com/#targetElement=.outer%3Ediv%3Ep%3Anth-child%282%29", + "text/html"); + LoadURL( + "https://example.com/#targetElement=.outer%3Ediv%3Ep%3Anth-child%282%29"); + main_resource.Complete(R"HTML( + <!DOCTYPE html> + <html> + <head></head> + <body> + <div class='outer'> + <div> + <p></p> + <p id='target'></p> + </div> + </div> + </body> + </html> + )HTML"); + + Element* target = GetDocument().getElementById("target"); + EXPECT_EQ(target, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierUsesFirstElementFound) { + SimRequest main_resource("https://example.com/#targetElement=.foobar", + "text/html"); + LoadURL("https://example.com/#targetElement=.foobar"); + main_resource.Complete( + "<div class='foobar' id='target'></div><div class='foobar'></div>"); + + Element* target = GetDocument().getElementById("target"); + EXPECT_EQ(target, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierIneligibleFragments) { + SimRequest main_resource("https://example.com/#targetEl=.foobar", + "text/html"); + LoadURL("https://example.com/#targetEl=.foobar"); + main_resource.Complete("<div class='foobar' id='target'></div>"); + + EXPECT_EQ(nullptr, GetDocument().CssTarget()); + + SimRequest main_resource2("https://example.com/#path/fragment", "text/html"); + LoadURL("https://example.com/#path/fragment"); + main_resource2.Complete("<div class='foobar' id='target'></div>"); + + EXPECT_EQ(nullptr, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierNoMatches) { + SimRequest main_resource("https://example.com/#targetElement=.foobar", + "text/html"); + LoadURL("https://example.com/#targetElement=.foobar"); + main_resource.Complete("<div class='barbaz' id='target'></div>"); + + EXPECT_EQ(nullptr, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierInvalidSelector) { + SimRequest main_resource("https://example.com/#targetElement=..foobar", + "text/html"); + LoadURL("https://example.com/#targetElement=..foobar"); + main_resource.Complete("<div class='foobar' id='target'></div>"); + + EXPECT_EQ(nullptr, GetDocument().CssTarget()); +} + +TEST_F(LocalFrameViewSimTest, CSSFragmentIdentifierEmptySelector) { + SimRequest main_resource("https://example.com/#targetElement=", "text/html"); + LoadURL("https://example.com/#targetElement="); + main_resource.Complete("<div class='foobar' id='target'></div>"); + + EXPECT_EQ(nullptr, GetDocument().CssTarget()); +} + } // namespace } // namespace blink
diff --git a/third_party/blink/renderer/core/inspector/README.md b/third_party/blink/renderer/core/inspector/README.md new file mode 100644 index 0000000..e031518 --- /dev/null +++ b/third_party/blink/renderer/core/inspector/README.md
@@ -0,0 +1,3 @@ +# Chrome DevTools Protocol + +Contributing to Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing).
diff --git a/third_party/blink/renderer/core/inspector/browser_protocol.pdl b/third_party/blink/renderer/core/inspector/browser_protocol.pdl index d3a64749..dff1d8f 100644 --- a/third_party/blink/renderer/core/inspector/browser_protocol.pdl +++ b/third_party/blink/renderer/core/inspector/browser_protocol.pdl
@@ -1,6 +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. +# +# Contribuging to Chrome DevTools Protocol: https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing version major 1
diff --git a/third_party/blink/renderer/core/layout/flexible_box_algorithm.h b/third_party/blink/renderer/core/layout/flexible_box_algorithm.h index c7e273c..aabff561 100644 --- a/third_party/blink/renderer/core/layout/flexible_box_algorithm.h +++ b/third_party/blink/renderer/core/layout/flexible_box_algorithm.h
@@ -274,7 +274,7 @@ bool IsMultiline() const { return style_->FlexWrap() != EFlexWrap::kNowrap; } const ComputedStyle* style_; - LayoutUnit line_break_length_; + const LayoutUnit line_break_length_; Vector<FlexItem>& all_items_; Vector<FlexLine> flex_lines_; size_t next_item_index_;
diff --git a/third_party/blink/renderer/core/layout/layout_object.cc b/third_party/blink/renderer/core/layout/layout_object.cc index 44615e1f..16f944c 100644 --- a/third_party/blink/renderer/core/layout/layout_object.cc +++ b/third_party/blink/renderer/core/layout/layout_object.cc
@@ -1554,10 +1554,11 @@ } void LayoutObject::ClearPreviousVisualRects() { + DCHECK(!RuntimeEnabledFeatures::SlimmingPaintV2Enabled()); + for (auto* fragment = &fragment_; fragment; fragment = fragment->NextFragment()) { fragment->SetVisualRect(LayoutRect()); - fragment->SetLocationInBacking(LayoutPoint()); fragment->SetSelectionVisualRect(LayoutRect()); } @@ -1571,9 +1572,6 @@ } } - // Ensure check paint invalidation of subtree that would be triggered by - // location change if we had valid previous location. - SetMayNeedPaintInvalidationSubtree(); // After clearing ("invalidating") the visual rects, mark this object as // needing to re-compute them. SetShouldDoFullPaintInvalidation();
diff --git a/third_party/blink/renderer/core/layout/layout_object.h b/third_party/blink/renderer/core/layout/layout_object.h index c6c8f1d..f956b5b 100644 --- a/third_party/blink/renderer/core/layout/layout_object.h +++ b/third_party/blink/renderer/core/layout/layout_object.h
@@ -208,8 +208,6 @@ public DisplayItemClient { friend class LayoutObjectChildList; FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, MutableForPaintingClearPaintFlags); - FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, - LocationInBackingAndSelectionVisualRect); friend class VisualRectMappingTest; public: @@ -1938,8 +1936,6 @@ canStartElementOnCompositorEffectSPv2); FRIEND_TEST_ALL_PREFIXES(PrePaintTreeWalkTest, ClipRects); FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, VisualRect); - FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, - LocationInBackingAndSelectionVisualRect); FRIEND_TEST_ALL_PREFIXES(BoxPaintInvalidatorTest, ComputePaintInvalidationReasonBasic);
diff --git a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc index f7d8c402d..ec349d83 100644 --- a/third_party/blink/renderer/core/layout/layout_tree_as_text.cc +++ b/third_party/blink/renderer/core/layout/layout_tree_as_text.cc
@@ -701,7 +701,7 @@ ClipRect damage_rect, clip_rect_to_apply; layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(ClipRectsContext(root_layer, kUncachedClipRects), - &layer->GetLayoutObject().FirstFragment(), paint_rect, + &layer->GetLayoutObject().FirstFragment(), &paint_rect, layer_bounds, damage_rect, clip_rect_to_apply); // Ensure our lists are up to date.
diff --git a/third_party/blink/renderer/core/layout/ng/ng_flex_layout_algorithm.cc b/third_party/blink/renderer/core/layout/ng/ng_flex_layout_algorithm.cc index 7595a2e..9e07a8a7 100644 --- a/third_party/blink/renderer/core/layout/ng/ng_flex_layout_algorithm.cc +++ b/third_party/blink/renderer/core/layout/ng/ng_flex_layout_algorithm.cc
@@ -26,8 +26,12 @@ DCHECK(!NeedMinMaxSize(ConstraintSpace(), Style())) << "Don't support that yet"; - LayoutUnit container_logical_width = ComputeInlineSizeForFragment( - ConstraintSpace(), Style(), /* MinMaxSize */ base::nullopt); + LayoutUnit flex_container_border_box_inline_size = + ComputeInlineSizeForFragment(ConstraintSpace(), Style(), + /* MinMaxSize */ base::nullopt); + LayoutUnit flex_container_content_inline_size = + flex_container_border_box_inline_size - + CalculateBorderScrollbarPadding(ConstraintSpace(), Node()).InlineSum(); Vector<FlexItem> flex_items; for (NGLayoutInputNode child = Node().FirstChild(); child; @@ -47,11 +51,11 @@ child.ComputeMinMaxSize(ConstraintSpace().GetWritingMode(), zero_input); NGConstraintSpaceBuilder space_builder(ConstraintSpace()); - // TODO(dgrogan): Set the percentage size also, which is possibly same as - // container_logical_width. Also change NGSizeIndefinite to container size - // if it's definite. + // TODO(dgrogan): Set the percentage size also, which is possibly + // flex_container_content_inline_size. Also change NGSizeIndefinite to + // container size if it's definite. space_builder.SetAvailableSize( - NGLogicalSize{container_logical_width, NGSizeIndefinite}); + NGLogicalSize{flex_container_content_inline_size, NGSizeIndefinite}); scoped_refptr<NGConstraintSpace> child_space = space_builder.ToConstraintSpace(child.Style().GetWritingMode()); @@ -95,15 +99,18 @@ flex_items.back().ng_input_node = child; } - FlexLayoutAlgorithm algorithm(&Style(), container_logical_width, flex_items); + FlexLayoutAlgorithm algorithm(&Style(), flex_container_content_inline_size, + flex_items); NGBoxStrut borders_scrollbar_padding = CalculateBorderScrollbarPadding(ConstraintSpace(), Node()); LayoutUnit main_axis_offset = borders_scrollbar_padding.InlineSum(); LayoutUnit cross_axis_offset = borders_scrollbar_padding.BlockSum(); FlexLine* line; - while ((line = algorithm.ComputeNextFlexLine(container_logical_width))) { - line->SetContainerMainInnerSize(container_logical_width); + while ((line = algorithm.ComputeNextFlexLine( + flex_container_content_inline_size))) { + // TODO(dgrogan): This parameter is more complicated for columns. + line->SetContainerMainInnerSize(flex_container_content_inline_size); line->FreezeInflexibleItems(); while (!line->ResolveFlexibleLengths()) { continue; @@ -122,6 +129,9 @@ flex_item.ng_input_node.Layout(*child_space, nullptr /*break token*/); flex_item.cross_axis_size = flex_item.layout_result->PhysicalFragment()->Size().height; + // TODO(dgrogan): Port logic from + // LayoutFlexibleBox::CrossAxisIntrinsicExtentForChild? + flex_item.cross_axis_intrinsic_size = flex_item.cross_axis_size; } // cross_axis_offset is updated in each iteration of the loop, for passing // in to the next iteration. @@ -137,6 +147,13 @@ // TODO(dgrogan): For column flex containers, keep track of tallest flex // line and pass to ComputeBlockSizeForFragment as content_size. } + LayoutUnit intrinsic_block_content_size = cross_axis_offset; + LayoutUnit intrinsic_block_size = + intrinsic_block_content_size + borders_scrollbar_padding.BlockSum(); + LayoutUnit block_size = ComputeBlockSizeForFragment( + ConstraintSpace(), Style(), intrinsic_block_size); + container_builder_.SetBlockSize(block_size); + container_builder_.SetInlineSize(flex_container_border_box_inline_size); return container_builder_.ToBoxFragment(); }
diff --git a/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc b/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc index cb8934b..133293d8 100644 --- a/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc +++ b/third_party/blink/renderer/core/page/scrolling/scrolling_coordinator_test.cc
@@ -955,33 +955,34 @@ } TEST_P(ScrollingCoordinatorTest, IframeWindowTouchHandler) { - // TODO(pdr): Support window event handlers with PaintTouchActionRects. - if (RuntimeEnabledFeatures::PaintTouchActionRectsEnabled()) - return; - LoadHTML( R"(<iframe style="width: 275px; height: 250px;"></iframe>)"); WebLocalFrameImpl* child_frame = ToWebLocalFrameImpl(GetWebView()->MainFrameImpl()->FirstChild()); - FrameTestHelpers::LoadHTMLString(child_frame, - R"(<body> - <p style="margin: 1000px"> Hello </p> - <script> - window.addEventListener('touchstart', (e) => { - e.preventDefault(); - }, {passive: false}); - </script> - </body>)", + FrameTestHelpers::LoadHTMLString(child_frame, R"HTML( + <p style="margin: 1000px"> Hello </p> + <script> + window.addEventListener('touchstart', (e) => { + e.preventDefault(); + }, {passive: false}); + </script> + )HTML", URLTestHelpers::ToKURL("about:blank")); ForceFullCompositingUpdate(); PaintLayer* paint_layer_child_frame = child_frame->GetFrame()->GetDocument()->GetLayoutView()->Layer(); + auto* child_mapping = paint_layer_child_frame->GetCompositedLayerMapping(); + // With PaintTouchActionRects, touch action regions are stored on the layer + // that draws the background whereas without PaintTouchActionRects the main + // graphics layer is used. + auto* child_graphics_layer = + RuntimeEnabledFeatures::PaintTouchActionRectsEnabled() + ? child_mapping->ScrollingContentsLayer() + : child_mapping->MainGraphicsLayer(); + cc::Region region_child_frame = - paint_layer_child_frame - ->EnclosingLayerForPaintInvalidationCrossingFrameBoundaries() - ->GraphicsLayerBacking(&paint_layer_child_frame->GetLayoutObject()) - ->CcLayer() + child_graphics_layer->CcLayer() ->touch_action_region() .GetRegionForTouchAction(TouchAction::kTouchActionNone); PaintLayer* paint_layer_main_frame = GetWebView() @@ -1001,8 +1002,102 @@ EXPECT_FALSE(region_child_frame.bounds().IsEmpty()); // We only check for the content size for verification as the offset is 0x0 // due to child frame having its own composited layer. - EXPECT_EQ(child_frame->GetFrameView()->ContentsSize(), - IntRect(region_child_frame.bounds()).Size()); + if (RuntimeEnabledFeatures::PaintTouchActionRectsEnabled()) { + // Because PaintTouchActionRects is painting the touch action rects on the + // scrolling contents layer, the size of the rect should be equal to the + // entire scrolling contents area. + EXPECT_EQ(child_graphics_layer->Size(), + IntSize(region_child_frame.bounds().size())); + } else { + EXPECT_EQ(child_frame->GetFrameView()->ContentsSize(), + IntRect(region_child_frame.bounds()).Size()); + } +} + +TEST_P(ScrollingCoordinatorTest, WindowTouchEventHandler) { + LoadHTML(R"HTML( + <style> + html { width: 200px; height: 200px; } + body { width: 100px; height: 100px; } + </style> + <script> + window.addEventListener('touchstart', function(event) { + event.preventDefault(); + }, {passive: false} ); + </script> + )HTML"); + ForceFullCompositingUpdate(); + + auto* layout_view = GetFrame()->View()->GetLayoutView(); + auto* mapping = layout_view->Layer()->GetCompositedLayerMapping(); + // With PaintTouchActionRects, touch action regions are stored on the layer + // that draws the background whereas without PaintTouchActionRects the main + // graphics layer is used. + auto* graphics_layer = RuntimeEnabledFeatures::PaintTouchActionRectsEnabled() + ? mapping->ScrollingContentsLayer() + : mapping->MainGraphicsLayer(); + + // The touch action region should include the entire frame, even though the + // document is smaller than the frame. + cc::Region region = + graphics_layer->CcLayer()->touch_action_region().GetRegionForTouchAction( + TouchAction::kTouchActionNone); + EXPECT_EQ(region.bounds(), gfx::Rect(0, 0, 320, 240)); +} + +namespace { +class ScrollingCoordinatorMockEventListener final : public EventListener { + public: + ScrollingCoordinatorMockEventListener() + : EventListener(kCPPEventListenerType) {} + + bool operator==(const EventListener& other) const final { + return this == &other; + } + + void handleEvent(ExecutionContext*, Event*) final {} +}; +} // namespace + +TEST_P(ScrollingCoordinatorTest, WindowTouchEventHandlerInvalidation) { + LoadHTML(""); + ForceFullCompositingUpdate(); + + auto* layout_view = GetFrame()->View()->GetLayoutView(); + auto* mapping = layout_view->Layer()->GetCompositedLayerMapping(); + // With PaintTouchActionRects, touch action regions are stored on the layer + // that draws the background whereas without PaintTouchActionRects the main + // graphics layer is used. Both approaches can implement correct behavior for + // window event handlers. + auto* graphics_layer = RuntimeEnabledFeatures::PaintTouchActionRectsEnabled() + ? mapping->ScrollingContentsLayer() + : mapping->MainGraphicsLayer(); + auto* cc_layer = graphics_layer->CcLayer(); + + // Initially there are no touch action regions. + auto region = cc_layer->touch_action_region().GetRegionForTouchAction( + TouchAction::kTouchActionNone); + EXPECT_TRUE(region.IsEmpty()); + + // Adding a blocking window event handler should create a touch action region. + auto* listener = new ScrollingCoordinatorMockEventListener(); + AddEventListenerOptions options; + options.setPassive(false); + AddEventListenerOptionsResolved resolved_options(options); + GetFrame()->DomWindow()->addEventListener(EventTypeNames::touchstart, + listener, resolved_options); + ForceFullCompositingUpdate(); + region = cc_layer->touch_action_region().GetRegionForTouchAction( + TouchAction::kTouchActionNone); + EXPECT_FALSE(region.IsEmpty()); + + // Removing the window event handler also removes the blocking touch action + // region. + GetFrame()->DomWindow()->RemoveAllEventListeners(); + ForceFullCompositingUpdate(); + region = cc_layer->touch_action_region().GetRegionForTouchAction( + TouchAction::kTouchActionNone); + EXPECT_TRUE(region.IsEmpty()); } TEST_P(ScrollingCoordinatorTest, overflowScrolling) {
diff --git a/third_party/blink/renderer/core/paint/box_paint_invalidator.cc b/third_party/blink/renderer/core/paint/box_paint_invalidator.cc index 5e363f0d..d4de006 100644 --- a/third_party/blink/renderer/core/paint/box_paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/box_paint_invalidator.cc
@@ -99,13 +99,13 @@ // If either border box changed or bounds changed, and old or new border box // doesn't equal old or new bounds, incremental invalidation is not // applicable. This captures the following cases: - // - pixel snapping of paint invalidation bounds, + // - pixel snapping, or not snapping e.g. for some visual overflowing effects, // - scale, rotate, skew etc. transforms, - // - visual overflows. + // - visual (ink) overflows. if (context_.old_visual_rect != - LayoutRect(context_.old_location, old_border_box_size) || + LayoutRect(context_.old_paint_offset, old_border_box_size) || context_.fragment_data->VisualRect() != - LayoutRect(context_.fragment_data->LocationInBacking(), + LayoutRect(context_.fragment_data->PaintOffset(), new_border_box_size)) { return PaintInvalidationReason::kGeometry; } @@ -316,8 +316,8 @@ if (should_invalidate && !RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) { IncrementallyInvalidatePaint( - reason, LayoutRect(context_.old_location, box_.PreviousSize()), - LayoutRect(context_.fragment_data->LocationInBacking(), box_.Size())); + reason, LayoutRect(context_.old_paint_offset, box_.PreviousSize()), + LayoutRect(context_.fragment_data->PaintOffset(), box_.Size())); } if (should_invalidate) { context_.painting_layer->SetNeedsRepaint();
diff --git a/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc b/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc index 306f653e..92c92a0 100644 --- a/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc +++ b/third_party/blink/renderer/core/paint/box_paint_invalidator_test.cc
@@ -27,14 +27,13 @@ PaintInvalidationReason ComputePaintInvalidationReason( const LayoutBox& box, const LayoutRect& old_visual_rect, - const LayoutPoint& old_location) { + const LayoutPoint& old_paint_offset) { FragmentData fragment_data; PaintInvalidatorContext context; context.old_visual_rect = old_visual_rect; - context.old_location = old_location; + context.old_paint_offset = old_paint_offset; fragment_data_.SetVisualRect(box.FirstFragment().VisualRect()); - fragment_data_.SetLocationInBacking( - box.FirstFragment().LocationInBacking()); + fragment_data_.SetPaintOffset(box.FirstFragment().PaintOffset()); context.fragment_data = &fragment_data_; return BoxPaintInvalidator(box, context).ComputePaintInvalidationReason(); } @@ -49,11 +48,11 @@ auto& target = *GetDocument().getElementById("target"); const auto& box = *ToLayoutBox(target.GetLayoutObject()); LayoutRect visual_rect = box.FirstFragment().VisualRect(); - LayoutPoint location = box.FirstFragment().LocationInBacking(); + LayoutPoint paint_offset = box.FirstFragment().PaintOffset(); // No geometry change. EXPECT_EQ(PaintInvalidationReason::kNone, - ComputePaintInvalidationReason(box, visual_rect, location)); + ComputePaintInvalidationReason(box, visual_rect, paint_offset)); target.setAttribute( HTMLNames::styleAttr, @@ -64,7 +63,7 @@ LayoutRect(visual_rect.Location(), box.Size())); EXPECT_EQ(PaintInvalidationReason::kGeometry, - ComputePaintInvalidationReason(box, visual_rect, location)); + ComputePaintInvalidationReason(box, visual_rect, paint_offset)); } void SetUpHTML() { @@ -113,7 +112,7 @@ PaintInvalidationReason::kNone, ComputePaintInvalidationReason(box, visual_rect, visual_rect.Location())); - // Location change. + // Paint offset change. EXPECT_EQ(PaintInvalidationReason::kNone, ComputePaintInvalidationReason( box, visual_rect, visual_rect.Location() + LayoutSize(10, 20))); @@ -161,14 +160,13 @@ ComputePaintInvalidationReason(box, old_visual_rect, old_visual_rect.Location())); - // Visual rect size change, with location in backing different from location - // of visual rect. - LayoutPoint fake_location = visual_rect.Location() + LayoutSize(10, 20); - box.GetMutableForPainting().FirstFragment().SetLocationInBacking( - fake_location); + // Visual rect size change, with paint offset different from location of + // visual rect. + LayoutPoint fake_paint_offset = visual_rect.Location() + LayoutSize(10, 20); + box.GetMutableForPainting().FirstFragment().SetPaintOffset(fake_paint_offset); EXPECT_EQ( PaintInvalidationReason::kGeometry, - ComputePaintInvalidationReason(box, old_visual_rect, fake_location)); + ComputePaintInvalidationReason(box, old_visual_rect, fake_paint_offset)); // Should use the existing full paint invalidation reason regardless of // geometry change.
diff --git a/third_party/blink/renderer/core/paint/clip_rect.cc b/third_party/blink/renderer/core/paint/clip_rect.cc index 1218f1f..e18f5b3 100644 --- a/third_party/blink/renderer/core/paint/clip_rect.cc +++ b/third_party/blink/renderer/core/paint/clip_rect.cc
@@ -33,19 +33,31 @@ namespace blink { ClipRect::ClipRect(const FloatClipRect& rect) - : rect_(rect.Rect()), has_radius_(rect.HasRadius()) {} + : rect_(rect.Rect()), + has_radius_(rect.HasRadius()), + is_infinite_(rect.IsInfinite()) {} void ClipRect::SetRect(const FloatClipRect& rect) { rect_ = LayoutRect(rect.Rect()); has_radius_ = rect.HasRadius(); + is_infinite_ = rect.IsInfinite(); +} + +void ClipRect::SetRect(const LayoutRect& rect) { + rect_ = rect; + has_radius_ = false; + is_infinite_ = false; } bool ClipRect::Intersects(const HitTestLocation& hit_test_location) const { + if (is_infinite_) + return true; return hit_test_location.Intersects(rect_); } String ClipRect::ToString() const { - return rect_.ToString() + (has_radius_ ? " hasRadius" : " noRadius"); + return rect_.ToString() + (has_radius_ ? " hasRadius" : " noRadius") + + (is_infinite_ ? " isInfinite" : " notInfinite"); } std::ostream& operator<<(std::ostream& ostream, const ClipRect& rect) {
diff --git a/third_party/blink/renderer/core/paint/clip_rect.h b/third_party/blink/renderer/core/paint/clip_rect.h index 22e99a7..a361856 100644 --- a/third_party/blink/renderer/core/paint/clip_rect.h +++ b/third_party/blink/renderer/core/paint/clip_rect.h
@@ -35,20 +35,27 @@ class FloatClipRect; class HitTestLocation; -class ClipRect { +class CORE_EXPORT ClipRect { USING_FAST_MALLOC(ClipRect); public: - ClipRect() : has_radius_(false) {} - ClipRect(const LayoutRect& rect) : rect_(rect), has_radius_(false) {} + ClipRect() + : rect_(LayoutRect::InfiniteIntRect()), + has_radius_(false), + is_infinite_(true) {} + ClipRect(const LayoutRect& rect) + : rect_(rect), has_radius_(false), is_infinite_(false) {} ClipRect(const FloatClipRect& rect); + void SetRect(const LayoutRect& rect); const LayoutRect& Rect() const { return rect_; } void SetRect(const FloatClipRect& rect); bool HasRadius() const { return has_radius_; } void SetHasRadius(bool has_radius) { has_radius_ = has_radius; } + bool IsInfinite() const { return is_infinite_; } + bool operator==(const ClipRect& other) const { return Rect() == other.Rect() && HasRadius() == other.HasRadius(); } @@ -59,9 +66,19 @@ return Rect() != other_rect; } - void Intersect(const LayoutRect& other) { rect_.Intersect(other); } + void Intersect(const LayoutRect& other) { + if (IsInfinite()) { + rect_ = other; + is_infinite_ = false; + } else { + rect_.Intersect(other); + } + } + void Intersect(const ClipRect& other) { - rect_.Intersect(other.Rect()); + if (other.IsInfinite()) + return; + Intersect(other.Rect()); if (other.HasRadius()) has_radius_ = true; } @@ -76,7 +93,8 @@ private: LayoutRect rect_; - bool has_radius_; + bool has_radius_ : 1; + bool is_infinite_ : 1; }; inline ClipRect Intersection(const ClipRect& a, const ClipRect& b) {
diff --git a/third_party/blink/renderer/core/paint/clip_rect_test.cc b/third_party/blink/renderer/core/paint/clip_rect_test.cc new file mode 100644 index 0000000..0eed69d --- /dev/null +++ b/third_party/blink/renderer/core/paint/clip_rect_test.cc
@@ -0,0 +1,83 @@ +// Copyright 2018 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 "third_party/blink/renderer/core/paint/clip_rect.h" +#include "third_party/blink/renderer/core/layout/hit_test_location.h" +#include "third_party/blink/renderer/platform/graphics/paint/float_clip_rect.h" +#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" + +#include "testing/gtest/include/gtest/gtest.h" + +namespace blink { + +class ClipRectTest : public testing::Test {}; + +TEST_F(ClipRectTest, IsInfinite) { + ClipRect rect; + EXPECT_TRUE(rect.IsInfinite()); + + rect.SetRect(FloatClipRect()); + EXPECT_TRUE(rect.IsInfinite()); + + rect.SetRect(LayoutRect()); + EXPECT_FALSE(rect.IsInfinite()); +} + +TEST_F(ClipRectTest, HasRadius) { + ClipRect rect; + EXPECT_FALSE(rect.HasRadius()); + + rect.SetRect(FloatClipRect()); + EXPECT_FALSE(rect.HasRadius()); + + FloatClipRect float_clip_rect; + float_clip_rect.SetHasRadius(); + rect.SetRect(float_clip_rect); + EXPECT_TRUE(rect.HasRadius()); + + rect.SetRect(LayoutRect()); + EXPECT_FALSE(rect.HasRadius()); + + rect.SetHasRadius(true); + EXPECT_TRUE(rect.HasRadius()); +} + +TEST_F(ClipRectTest, IntersectClipRect) { + ClipRect rect; + rect.SetRect(LayoutRect(100, 200, 300, 400)); + EXPECT_FALSE(rect.HasRadius()); + + ClipRect rect2; + rect2.SetRect(LayoutRect(100, 100, 200, 300)); + rect2.SetHasRadius(true); + rect.Intersect(rect2); + EXPECT_TRUE(rect.HasRadius()); + EXPECT_FALSE(rect.IsInfinite()); + EXPECT_EQ(LayoutRect(100, 200, 200, 200), rect.Rect()); +} + +TEST_F(ClipRectTest, IntersectLayoutRect) { + ClipRect rect; + LayoutRect layout_rect; + + rect.Intersect(layout_rect); + EXPECT_FALSE(rect.IsInfinite()); +} + +TEST_F(ClipRectTest, IntersectsInfinite) { + ClipRect rect; + + EXPECT_TRUE(rect.Intersects(HitTestLocation(FloatPoint(100000, -3333333)))); +} + +TEST_F(ClipRectTest, ToString) { + ClipRect rect; + rect.SetRect(LayoutRect(0, 0, 100, 100)); + EXPECT_EQ(String("0,0 100x100 noRadius notInfinite"), rect.ToString()); + + rect.SetHasRadius(true); + EXPECT_EQ(String("0,0 100x100 hasRadius notInfinite"), rect.ToString()); +} + +} // namespace blink
diff --git a/third_party/blink/renderer/core/paint/find_paint_offset_and_visual_rect_needing_update.h b/third_party/blink/renderer/core/paint/find_paint_offset_and_visual_rect_needing_update.h index 60ad1d1..4df507f 100644 --- a/third_party/blink/renderer/core/paint/find_paint_offset_and_visual_rect_needing_update.h +++ b/third_party/blink/renderer/core/paint/find_paint_offset_and_visual_rect_needing_update.h
@@ -63,14 +63,13 @@ protected: FindVisualRectNeedingUpdateScopeBase(const LayoutObject& object, const PaintInvalidatorContext& context, - const LayoutRect& old_visual_rect, - bool is_actually_needed) + const LayoutRect& old_visual_rect) : object_(object), context_(context), old_visual_rect_(old_visual_rect), needed_visual_rect_update_(context.NeedsVisualRectUpdate(object)) { if (needed_visual_rect_update_) { - DCHECK(is_actually_needed); + DCHECK(context.tree_builder_context_actually_needed_); return; } context.force_visual_rect_update_for_checking_ = true; @@ -125,11 +124,7 @@ // Must be a reference to a rect that // outlives this scope. const LayoutRect& new_visual_rect) - : FindVisualRectNeedingUpdateScopeBase( - object, - context, - old_visual_rect, - context.tree_builder_context_actually_needed_), + : FindVisualRectNeedingUpdateScopeBase(object, context, old_visual_rect), new_visual_rect_ref_(new_visual_rect) {} ~FindVisualRectNeedingUpdateScope() { CheckVisualRect(new_visual_rect_ref_); } @@ -144,42 +139,18 @@ public: FindObjectVisualRectNeedingUpdateScope(const LayoutObject& object, const FragmentData& fragment_data, - const PaintInvalidatorContext& context, - bool is_actually_needed) + const PaintInvalidatorContext& context) : FindVisualRectNeedingUpdateScopeBase(object, context, - fragment_data.VisualRect(), - is_actually_needed), - fragment_data_(fragment_data), - old_location_(context.old_location) {} + fragment_data.VisualRect()), + fragment_data_(fragment_data) {} ~FindObjectVisualRectNeedingUpdateScope() { CheckVisualRect(fragment_data_.VisualRect()); - CheckLocation(); - } - - void CheckLocation() { - if (needed_visual_rect_update_) - return; - LayoutPoint new_location = fragment_data_.LocationInBacking(); - // Location of LayoutText and non-root SVG is location of the visual rect - // which have been checked above. - DCHECK(object_.IsText() || object_.IsSVGChild() || - new_location == old_location_ || - object_.EnclosingLayer()->SubtreeIsInvisible() || - // See checkVisualRect for the issue of approximation. - LayoutRect(-1, -1, 2, 2) - .Contains(LayoutRect(LayoutPoint(new_location - old_location_), - LayoutSize()))) - << "Location changed without needing update" - << " object=" << object_.DebugName() - << " old=" << old_location_.ToString() - << " new=" << new_location.ToString(); } private: const FragmentData& fragment_data_; - LayoutPoint old_location_; }; } // namespace blink
diff --git a/third_party/blink/renderer/core/paint/fragment_data.cc b/third_party/blink/renderer/core/paint/fragment_data.cc index 3c2ddaf..77d262b 100644 --- a/third_party/blink/renderer/core/paint/fragment_data.cc +++ b/third_party/blink/renderer/core/paint/fragment_data.cc
@@ -11,9 +11,7 @@ // These are defined here because of PaintLayer dependency. -FragmentData::RareData::RareData(const LayoutPoint& location_in_backing) - : unique_id(NewUniqueObjectId()), - location_in_backing(location_in_backing) {} +FragmentData::RareData::RareData() : unique_id(NewUniqueObjectId()) {} FragmentData::RareData::~RareData() = default; @@ -25,7 +23,7 @@ FragmentData::RareData& FragmentData::EnsureRareData() { if (!rare_data_) - rare_data_ = std::make_unique<RareData>(visual_rect_.Location()); + rare_data_ = std::make_unique<RareData>(); return *rare_data_; }
diff --git a/third_party/blink/renderer/core/paint/fragment_data.h b/third_party/blink/renderer/core/paint/fragment_data.h index 30ea621..042551c 100644 --- a/third_party/blink/renderer/core/paint/fragment_data.h +++ b/third_party/blink/renderer/core/paint/fragment_data.h
@@ -39,6 +39,8 @@ // The visual rect computed by the latest paint invalidation. // This rect does *not* account for composited scrolling. See LayoutObject:: // AdjustVisualRectForCompositedScrolling(). + // It's location may be different from PaintOffset when there is visual (ink) + // overflow to the top and/or the left. LayoutRect VisualRect() const { return visual_rect_; } void SetVisualRect(const LayoutRect& rect) { visual_rect_ = rect; } @@ -54,17 +56,6 @@ } void SetLayer(std::unique_ptr<PaintLayer>); - // See PaintInvalidatorContext::old_location for details. This will be removed - // for SPv2. - LayoutPoint LocationInBacking() const { - return rare_data_ ? rare_data_->location_in_backing - : visual_rect_.Location(); - } - void SetLocationInBacking(const LayoutPoint& location) { - if (rare_data_ || location != visual_rect_.Location()) - EnsureRareData().location_in_backing = location; - } - // Visual rect of the selection on this object, in the same coordinate space // as DisplayItemClient::VisualRect(). LayoutRect SelectionVisualRect() const { @@ -230,14 +221,13 @@ USING_FAST_MALLOC(RareData); public: - RareData(const LayoutPoint& location_in_backing); + RareData(); ~RareData(); // The following data fields are not fragment specific. Placed here just to // avoid separate data structure for them. std::unique_ptr<PaintLayer> layer; UniqueObjectId unique_id; - LayoutPoint location_in_backing; LayoutRect selection_visual_rect; LayoutRect partial_invalidation_local_rect; LayoutRect partial_invalidation_visual_rect;
diff --git a/third_party/blink/renderer/core/paint/fragment_data_test.cc b/third_party/blink/renderer/core/paint/fragment_data_test.cc index bef2197d..87822ad 100644 --- a/third_party/blink/renderer/core/paint/fragment_data_test.cc +++ b/third_party/blink/renderer/core/paint/fragment_data_test.cc
@@ -12,31 +12,23 @@ bool HasRareData(const FragmentData& data) { return !!data.rare_data_; } }; -TEST_F(FragmentDataTest, LocationInBackingAndSelectionVisualRect) { +TEST_F(FragmentDataTest, SelectionVisualRect) { FragmentData fragment; - // Default LocationInBacking and SelectionVisualRect should not create - // RareData. + // Default SelectionVisualRect should not create RareData. fragment.SetVisualRect(LayoutRect(10, 20, 30, 400)); - fragment.SetLocationInBacking(LayoutPoint(10, 20)); fragment.SetSelectionVisualRect(LayoutRect()); EXPECT_FALSE(HasRareData(fragment)); - EXPECT_EQ(LayoutPoint(10, 20), fragment.LocationInBacking()); EXPECT_EQ(LayoutRect(), fragment.SelectionVisualRect()); - // Non-Default LocationInBacking and SelectionVisualRect create RareData. - fragment.SetLocationInBacking(LayoutPoint(20, 30)); + // Non-Default SelectionVisualRect creates RareData. fragment.SetSelectionVisualRect(LayoutRect(1, 2, 3, 4)); EXPECT_TRUE(HasRareData(fragment)); - EXPECT_EQ(LayoutPoint(20, 30), fragment.LocationInBacking()); EXPECT_EQ(LayoutRect(1, 2, 3, 4), fragment.SelectionVisualRect()); - // PaintProperties should store default LocationInBacking and - // SelectionVisualRect once it's created. - fragment.SetLocationInBacking(LayoutPoint(10, 20)); + // PaintProperties should store default SelectionVisualRect once it's created. fragment.SetSelectionVisualRect(LayoutRect()); EXPECT_TRUE(HasRareData(fragment)); - EXPECT_EQ(LayoutPoint(10, 20), fragment.LocationInBacking()); EXPECT_EQ(LayoutRect(), fragment.SelectionVisualRect()); }
diff --git a/third_party/blink/renderer/core/paint/object_paint_invalidator.cc b/third_party/blink/renderer/core/paint/object_paint_invalidator.cc index 26516d16..1023e50 100644 --- a/third_party/blink/renderer/core/paint/object_paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/object_paint_invalidator.cc
@@ -486,8 +486,10 @@ context_.old_visual_rect.Location()) return PaintInvalidationReason::kGeometry; - if (!RuntimeEnabledFeatures::SlimmingPaintV175Enabled() && - context_.fragment_data->LocationInBacking() != context_.old_location) + // Most paintings are pixel-snapped so subpixel change of paint offset doesn't + // directly cause full raster invalidation. + if (RoundedIntPoint(context_.fragment_data->PaintOffset()) != + RoundedIntPoint(context_.old_paint_offset)) return PaintInvalidationReason::kGeometry; // Incremental invalidation is only applicable to LayoutBoxes. Return @@ -532,7 +534,7 @@ #endif if (context_.NeedsVisualRectUpdate(object_)) { new_selection_rect = object_.LocalSelectionRect(); - context_.MapLocalRectToVisualRectInBacking(object_, new_selection_rect); + context_.MapLocalRectToVisualRect(object_, new_selection_rect); } else { new_selection_rect = old_selection_rect; } @@ -565,7 +567,7 @@ if (rect.IsEmpty()) return; - context_.MapLocalRectToVisualRectInBacking(object_, rect); + context_.MapLocalRectToVisualRect(object_, rect); if (rect.IsEmpty()) return;
diff --git a/third_party/blink/renderer/core/paint/paint_invalidation_capable_scrollable_area.cc b/third_party/blink/renderer/core/paint/paint_invalidation_capable_scrollable_area.cc index ce38b66..70af5d0 100644 --- a/third_party/blink/renderer/core/paint/paint_invalidation_capable_scrollable_area.cc +++ b/third_party/blink/renderer/core/paint/paint_invalidation_capable_scrollable_area.cc
@@ -54,7 +54,7 @@ // the rect as in flipped block direction, but scrollbar controls don't // flip for block direction, so flip here to undo the flip in the function. box.FlipForWritingMode(visual_rect); - context.MapLocalRectToVisualRectInBacking(box, visual_rect); + context.MapLocalRectToVisualRect(box, visual_rect); } return visual_rect; }
diff --git a/third_party/blink/renderer/core/paint/paint_invalidator.cc b/third_party/blink/renderer/core/paint/paint_invalidator.cc index e985f85b..4ffc6c7 100644 --- a/third_party/blink/renderer/core/paint/paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/paint_invalidator.cc
@@ -92,13 +92,10 @@ -context.paint_invalidation_container->Layer()->SubpixelAccumulation()))); } -// TODO(wangxianzhu): Combine this into -// PaintInvalidator::mapLocalRectToBacking() when removing -// PaintInvalidationState. // This function is templatized to avoid FloatRect<->LayoutRect conversions // which affect performance. template <typename Rect, typename Point> -LayoutRect PaintInvalidator::MapLocalRectToVisualRectInBacking( +LayoutRect PaintInvalidator::MapLocalRectToVisualRect( const LayoutObject& object, const Rect& local_rect, const PaintInvalidatorContext& context, @@ -227,11 +224,10 @@ return result; } -void PaintInvalidatorContext::MapLocalRectToVisualRectInBacking( +void PaintInvalidatorContext::MapLocalRectToVisualRect( const LayoutObject& object, LayoutRect& rect) const { - rect = PaintInvalidator::MapLocalRectToVisualRectInBacking<LayoutRect, - LayoutPoint>( + rect = PaintInvalidator::MapLocalRectToVisualRect<LayoutRect, LayoutPoint>( object, rect, *this); } @@ -242,17 +238,17 @@ : nullptr; } -LayoutRect PaintInvalidator::ComputeVisualRectInBacking( +LayoutRect PaintInvalidator::ComputeVisualRect( const LayoutObject& object, const PaintInvalidatorContext& context) { if (object.IsSVGChild()) { FloatRect local_rect = SVGLayoutSupport::LocalVisualRect(object); - return MapLocalRectToVisualRectInBacking<FloatRect, FloatPoint>( - object, local_rect, context); + return MapLocalRectToVisualRect<FloatRect, FloatPoint>(object, local_rect, + context); } LayoutRect local_rect = object.LocalVisualRect(); - return MapLocalRectToVisualRectInBacking<LayoutRect, LayoutPoint>( - object, local_rect, context); + return MapLocalRectToVisualRect<LayoutRect, LayoutPoint>(object, local_rect, + context); } static LayoutRect ComputeFragmentLocalSelectionRect( @@ -277,56 +273,10 @@ if (!object.IsBox()) rect.Move(fragment.InlineOffsetToContainerBox().ToLayoutSize()); bool disable_flip = true; - return MapLocalRectToVisualRectInBacking<LayoutRect, LayoutPoint>( + return MapLocalRectToVisualRect<LayoutRect, LayoutPoint>( object, rect, context, disable_flip); } -LayoutPoint PaintInvalidator::ComputeLocationInBacking( - const LayoutObject& object, - const PaintInvalidatorContext& context) { - // In SPv2, locationInBacking is in the space of their local transform node. - if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) - return object.FirstFragment().PaintOffset(); - - LayoutPoint point; - if (object != context.paint_invalidation_container) { - point.MoveBy(context.fragment_data->PaintOffset()); - - const auto* container_transform = - context.paint_invalidation_container->FirstFragment() - .ContentsProperties() - .Transform(); - if (context.tree_builder_context_->current.transform != - container_transform) { - FloatRect rect = FloatRect(FloatPoint(point), FloatSize()); - GeometryMapper::SourceToDestinationRect( - context.tree_builder_context_->current.transform, container_transform, - rect); - point = LayoutPoint(rect.Location()); - } - - // Convert the result to the paint invalidation container's contents space. - // If the paint invalidation container has a transform node associated - // with it (due to scroll or transform), then its PaintOffset - // must be zero or equal to its subpixel accumulation, since in all - // such cases we allocate a paint offset translation transform. - point.MoveBy( - -context.paint_invalidation_container->FirstFragment().PaintOffset()); - } - - if (context.paint_invalidation_container->Layer()->GroupedMapping()) { - FloatPoint float_point(point); - PaintLayer::MapPointInPaintInvalidationContainerToBacking( - *context.paint_invalidation_container, float_point); - point = LayoutPoint(float_point); - } - - point.Move(object.ScrollAdjustmentForPaintInvalidation( - *context.paint_invalidation_container)); - - return point; -} - void PaintInvalidator::UpdatePaintingLayer(const LayoutObject& object, PaintInvalidatorContext& context) { if (object.HasLayer() && @@ -446,23 +396,11 @@ DCHECK(context.tree_builder_context_->current.paint_offset == fragment_data.PaintOffset()); - LayoutRect new_visual_rect = ComputeVisualRectInBacking(object, context); - LayoutPoint new_location; - if (object.IsBoxModelObject()) { - new_location = ComputeLocationInBacking(object, context); - // Location of empty visual rect doesn't affect paint invalidation. Set it - // to newLocation to avoid saving the previous location separately in - // ObjectPaintInvalidator. - if (new_visual_rect.IsEmpty()) - new_visual_rect.SetLocation(new_location); - } else { - // Use visual rect location for non-LayoutBoxModelObject because it suffices - // to check whether a visual rect changes for layout caused invalidation. - new_location = new_visual_rect.Location(); - } - + LayoutRect new_visual_rect = ComputeVisualRect(object, context); + // Make the empty visual rect more meaningful for debugging and testing. + if (new_visual_rect.IsEmpty()) + new_visual_rect.SetLocation(fragment_data.PaintOffset()); fragment_data.SetVisualRect(new_visual_rect); - fragment_data.SetLocationInBacking(new_location); // For LayoutNG, update NGPaintFragments. if (!RuntimeEnabledFeatures::LayoutNGEnabled()) @@ -604,7 +542,6 @@ fragment_data; fragment_data = fragment_data->NextFragment(), tree_builder_index++) { context.old_visual_rect = fragment_data->VisualRect(); - context.old_location = fragment_data->LocationInBacking(); context.fragment_data = fragment_data; DCHECK(!tree_builder_context || @@ -612,18 +549,19 @@ { #if DCHECK_IS_ON() - bool is_actually_needed = + context.tree_builder_context_actually_needed_ = tree_builder_context && tree_builder_context->is_actually_needed; - FindObjectVisualRectNeedingUpdateScope finder( - object, *fragment_data, context, is_actually_needed); - - context.tree_builder_context_actually_needed_ = is_actually_needed; + FindObjectVisualRectNeedingUpdateScope finder(object, *fragment_data, + context); #endif if (tree_builder_context) { context.tree_builder_context_ = &tree_builder_context->fragments[tree_builder_index]; + context.old_paint_offset = + context.tree_builder_context_->old_paint_offset; } else { context.tree_builder_context_ = nullptr; + context.old_paint_offset = fragment_data->PaintOffset(); } UpdateVisualRect(object, *fragment_data, context); @@ -647,12 +585,6 @@ default: break; } - - if (context.old_location != fragment_data->LocationInBacking() && - !context.painting_layer->SubtreeIsInvisible()) { - context.subtree_flags |= - PaintInvalidatorContext::kSubtreeInvalidationChecking; - } } if (object.MayNeedPaintInvalidationSubtree()) {
diff --git a/third_party/blink/renderer/core/paint/paint_invalidator.h b/third_party/blink/renderer/core/paint/paint_invalidator.h index ece8c65..7cb3e82 100644 --- a/third_party/blink/renderer/core/paint/paint_invalidator.h +++ b/third_party/blink/renderer/core/paint/paint_invalidator.h
@@ -14,6 +14,7 @@ class NGPaintFragment; class PrePaintTreeWalk; + struct CORE_EXPORT PaintInvalidatorContext { DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); @@ -42,8 +43,7 @@ ParentContext()->paint_invalidation_container_for_stacked_contents), painting_layer(ParentContext()->painting_layer) {} - void MapLocalRectToVisualRectInBacking(const LayoutObject&, - LayoutRect&) const; + void MapLocalRectToVisualRect(const LayoutObject&, LayoutRect&) const; bool NeedsVisualRectUpdate(const LayoutObject& object) const { #if DCHECK_IS_ON() @@ -116,21 +116,9 @@ PaintLayer* painting_layer = nullptr; - // Store the old visual rect in the paint invalidation backing's coordinates. - // It does *not* account for composited scrolling. - // See LayoutObject::AdjustVisualRectForCompositedScrolling(). + // The previous VisualRect and PaintOffset of FragmentData. LayoutRect old_visual_rect; - // Use LayoutObject::VisualRect() to get the new visual rect. - - // This field and LayoutObject::LocationInBacking() store the old and new - // origins of the object's local coordinates in the paint invalidation - // backing's coordinates. They are used to detect layoutObject shifts that - // force a full invalidation and invalidation check in subtree. - // The points do *not* account for composited scrolling. See - // LayoutObject::adjustVisualRectForCompositedScrolling(). - // This field will be removed for SPv175. - LayoutPoint old_location; - // Use LayoutObject::LocationInBacking() to get the new location. + LayoutPoint old_paint_offset; const FragmentData* fragment_data; @@ -142,7 +130,6 @@ #if DCHECK_IS_ON() bool tree_builder_context_actually_needed_ = false; - friend class FindVisualRectNeedingUpdateScope; friend class FindVisualRectNeedingUpdateScopeBase; mutable bool force_visual_rect_update_for_checking_ = false; #endif @@ -171,22 +158,18 @@ const PaintInvalidatorContext&, Rect&); template <typename Rect, typename Point> - static LayoutRect MapLocalRectToVisualRectInBacking( - const LayoutObject&, - const Rect&, - const PaintInvalidatorContext&, - bool disable_flip = false); + static LayoutRect MapLocalRectToVisualRect(const LayoutObject&, + const Rect&, + const PaintInvalidatorContext&, + bool disable_flip = false); - ALWAYS_INLINE LayoutRect - ComputeVisualRectInBacking(const LayoutObject&, - const PaintInvalidatorContext&); + ALWAYS_INLINE LayoutRect ComputeVisualRect(const LayoutObject&, + const PaintInvalidatorContext&); ALWAYS_INLINE LayoutRect MapFragmentLocalRectToVisualRect(const LayoutRect&, const LayoutObject&, const NGPaintFragment&, const PaintInvalidatorContext&); - ALWAYS_INLINE LayoutPoint - ComputeLocationInBacking(const LayoutObject&, const PaintInvalidatorContext&); ALWAYS_INLINE void UpdatePaintingLayer(const LayoutObject&, PaintInvalidatorContext&); ALWAYS_INLINE void UpdatePaintInvalidationContainer(const LayoutObject&,
diff --git a/third_party/blink/renderer/core/paint/paint_layer.cc b/third_party/blink/renderer/core/paint/paint_layer.cc index 0c79f08f..5c6c8a3 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.cc +++ b/third_party/blink/renderer/core/paint/paint_layer.cc
@@ -1676,7 +1676,7 @@ void PaintLayer::AppendSingleFragmentIgnoringPagination( PaintLayerFragments& fragments, const PaintLayer* root_layer, - const LayoutRect& dirty_rect, + const LayoutRect* dirty_rect, OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior, ShouldRespectOverflowClipType respect_overflow_clip, const LayoutPoint* offset_from_root, @@ -1715,7 +1715,7 @@ void PaintLayer::CollectFragments( PaintLayerFragments& fragments, const PaintLayer* root_layer, - const LayoutRect& dirty_rect, + const LayoutRect* dirty_rect, OverlayScrollbarClipBehavior overlay_scrollbar_clip_behavior, ShouldRespectOverflowClipType respect_overflow_clip, const LayoutPoint* offset_from_root, @@ -1756,6 +1756,13 @@ return LayoutRect(frame_view->VisibleContentRect()); } +PaintLayer::HitTestRecursionData::HitTestRecursionData( + const LayoutRect& rect_arg, + const HitTestLocation& location_arg) + : rect(rect_arg), + location(location_arg), + intersects_location(location_arg.Intersects(rect_arg)) {} + bool PaintLayer::HitTest(HitTestResult& result) { DCHECK(IsSelfPaintingLayer() || HasSelfPaintingLayerDescendant()); @@ -1775,8 +1782,9 @@ } } - PaintLayer* inside_layer = HitTestLayer(this, nullptr, result, hit_test_area, - hit_test_location, false); + HitTestRecursionData recursion_data(hit_test_area, hit_test_location); + PaintLayer* inside_layer = + HitTestLayer(this, nullptr, result, recursion_data, false); if (!inside_layer && IsRootLayer()) { bool fallback = false; // If we didn't hit any layers but are still inside the document @@ -1855,8 +1863,7 @@ scoped_refptr<HitTestingTransformState> PaintLayer::CreateLocalTransformState( PaintLayer* root_layer, PaintLayer* container_layer, - const LayoutRect& hit_test_rect, - const HitTestLocation& hit_test_location, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* container_transform_state, const LayoutPoint& translation_offset) const { scoped_refptr<HitTestingTransformState> transform_state; @@ -1870,10 +1877,10 @@ } else { // If this is the first time we need to make transform state, then base it // off of hitTestLocation, which is relative to rootLayer. - transform_state = - HitTestingTransformState::Create(hit_test_location.TransformedPoint(), - hit_test_location.TransformedRect(), - FloatQuad(FloatRect(hit_test_rect))); + transform_state = HitTestingTransformState::Create( + recursion_data.location.TransformedPoint(), + recursion_data.location.TransformedRect(), + FloatQuad(FloatRect(recursion_data.rect))); ConvertToLayerCoords(root_layer, offset); } offset.MoveBy(translation_offset); @@ -1939,8 +1946,7 @@ PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult& result, - const LayoutRect& hit_test_rect, - const HitTestLocation& hit_test_location, + const HitTestRecursionData& recursion_data, bool applied_transform, const HitTestingTransformState* transform_state, double* z_offset) { @@ -1965,8 +1971,8 @@ if (use_transform && !applied_transform) { if (EnclosingPaginationLayer()) { return HitTestTransformedLayerInFragments( - root_layer, container_layer, result, hit_test_rect, hit_test_location, - transform_state, z_offset, clip_behavior); + root_layer, container_layer, result, recursion_data, transform_state, + z_offset, clip_behavior); } // Make sure the parent's clip rects have been calculated. @@ -1979,17 +1985,17 @@ clip_behavior), clip_rect); // Go ahead and test the enclosing clip now. - if (!clip_rect.Intersects(hit_test_location)) + if (!clip_rect.Intersects(recursion_data.location)) return nullptr; } return HitTestLayerByApplyingTransform(root_layer, container_layer, result, - hit_test_rect, hit_test_location, - transform_state, z_offset); + recursion_data, transform_state, + z_offset); } if (layout_object.HasClipPath() && - HitTestClippedOutByClipPath(root_layer, hit_test_location)) + HitTestClippedOutByClipPath(root_layer, recursion_data.location)) return nullptr; // The natural thing would be to keep HitTestingTransformState on the stack, @@ -2005,9 +2011,8 @@ Preserves3D()) { // We need transform state for the first time, or to offset the container // state, so create it here. - local_transform_state = - CreateLocalTransformState(root_layer, container_layer, hit_test_rect, - hit_test_location, transform_state); + local_transform_state = CreateLocalTransformState( + root_layer, container_layer, recursion_data, transform_state); } // Check for hit test on backface if backface-visibility is 'hidden' @@ -2057,10 +2062,9 @@ // Begin by walking our list of positive layers from highest z-index down to // the lowest z-index. PaintLayer* hit_layer = HitTestChildren( - kPositiveZOrderChildren, root_layer, result, hit_test_rect, - hit_test_location, local_transform_state.get(), - z_offset_for_descendants_ptr, z_offset, unflattened_transform_state.get(), - depth_sort_descendants); + kPositiveZOrderChildren, root_layer, result, recursion_data, + local_transform_state.get(), z_offset_for_descendants_ptr, z_offset, + unflattened_transform_state.get(), depth_sort_descendants); if (hit_layer) { if (!depth_sort_descendants) return hit_layer; @@ -2069,7 +2073,7 @@ // Now check our overflow objects. hit_layer = HitTestChildren( - kNormalFlowChildren, root_layer, result, hit_test_rect, hit_test_location, + kNormalFlowChildren, root_layer, result, recursion_data, local_transform_state.get(), z_offset_for_descendants_ptr, z_offset, unflattened_transform_state.get(), depth_sort_descendants); if (hit_layer) { @@ -2080,78 +2084,82 @@ // Collect the fragments. This will compute the clip rectangles for each layer // fragment. - PaintLayerFragments layer_fragments; - if (applied_transform) { - DCHECK(root_layer == this); - LayoutPoint offset; - AppendSingleFragmentIgnoringPagination( - layer_fragments, root_layer, hit_test_rect, - kExcludeOverlayScrollbarSizeForHitTesting, clip_behavior, &offset); - } else { - CollectFragments(layer_fragments, root_layer, hit_test_rect, - kExcludeOverlayScrollbarSizeForHitTesting, clip_behavior); - } + base::Optional<PaintLayerFragments> layer_fragments; + LayoutPoint offset; + if (recursion_data.intersects_location) { + layer_fragments.emplace(); + if (applied_transform) { + DCHECK(root_layer == this); + LayoutPoint ignored; + AppendSingleFragmentIgnoringPagination( + *layer_fragments, root_layer, nullptr, + kExcludeOverlayScrollbarSizeForHitTesting, clip_behavior, &ignored); + } else { + CollectFragments(*layer_fragments, root_layer, nullptr, + kExcludeOverlayScrollbarSizeForHitTesting, + clip_behavior); + } - if (scrollable_area_ && scrollable_area_->HitTestResizerInFragments( - layer_fragments, hit_test_location)) { - layout_object.UpdateHitTestResult(result, hit_test_location.Point()); - return this; - } + if (scrollable_area_ && scrollable_area_->HitTestResizerInFragments( + *layer_fragments, recursion_data.location)) { + layout_object.UpdateHitTestResult(result, + recursion_data.location.Point()); + return this; + } - LayoutPoint offset = -LayoutBoxLocation(); + // Next we want to see if the mouse pos is inside the child LayoutObjects of + // the layer. Check every fragment in reverse order. + if (IsSelfPaintingLayer()) { + offset = -LayoutBoxLocation(); + // Hit test with a temporary HitTestResult, because we only want to commit + // to 'result' if we know we're frontmost. + HitTestResult temp_result(result.GetHitTestRequest(), + result.GetHitTestLocation()); + bool inside_fragment_foreground_rect = false; - // Next we want to see if the mouse pos is inside the child LayoutObjects of - // the layer. Check every fragment in reverse order. - if (IsSelfPaintingLayer()) { - // Hit test with a temporary HitTestResult, because we only want to commit - // to 'result' if we know we're frontmost. - HitTestResult temp_result(result.GetHitTestRequest(), - result.GetHitTestLocation()); - bool inside_fragment_foreground_rect = false; - - if (HitTestContentsForFragments(layer_fragments, offset, temp_result, - hit_test_location, kHitTestDescendants, - inside_fragment_foreground_rect) && - IsHitCandidate(this, false, z_offset_for_contents_ptr, - unflattened_transform_state.get())) { - if (result.GetHitTestRequest().ListBased()) + if (HitTestContentsForFragments( + *layer_fragments, offset, temp_result, recursion_data.location, + kHitTestDescendants, inside_fragment_foreground_rect) && + IsHitCandidate(this, false, z_offset_for_contents_ptr, + unflattened_transform_state.get())) { + if (result.GetHitTestRequest().ListBased()) + result.Append(temp_result); + else + result = temp_result; + if (!depth_sort_descendants) + return this; + // Foreground can depth-sort with descendant layers, so keep this as a + // candidate. + candidate_layer = this; + } else if (inside_fragment_foreground_rect && + result.GetHitTestRequest().ListBased()) { result.Append(temp_result); - else - result = temp_result; - if (!depth_sort_descendants) - return this; - // Foreground can depth-sort with descendant layers, so keep this as a - // candidate. - candidate_layer = this; - } else if (inside_fragment_foreground_rect && - result.GetHitTestRequest().ListBased()) { - result.Append(temp_result); + } } } // Now check our negative z-index children. hit_layer = HitTestChildren( - kNegativeZOrderChildren, root_layer, result, hit_test_rect, - hit_test_location, local_transform_state.get(), - z_offset_for_descendants_ptr, z_offset, unflattened_transform_state.get(), - depth_sort_descendants); + kNegativeZOrderChildren, root_layer, result, recursion_data, + local_transform_state.get(), z_offset_for_descendants_ptr, z_offset, + unflattened_transform_state.get(), depth_sort_descendants); if (hit_layer) { if (!depth_sort_descendants) return hit_layer; candidate_layer = hit_layer; } - // If we found a layer, return. Child layers, and foreground always render in - // front of background. + // If we found a layer, return. Child layers, and foreground always render + // in front of background. if (candidate_layer) return candidate_layer; - if (IsSelfPaintingLayer()) { + if (recursion_data.intersects_location && IsSelfPaintingLayer()) { HitTestResult temp_result(result.GetHitTestRequest(), result.GetHitTestLocation()); bool inside_fragment_background_rect = false; - if (HitTestContentsForFragments(layer_fragments, offset, temp_result, - hit_test_location, kHitTestSelf, + if (HitTestContentsForFragments(*layer_fragments, offset, temp_result, + recursion_data.location, kHitTestSelf, inside_fragment_background_rect) && IsHitCandidate(this, false, z_offset_for_contents_ptr, unflattened_transform_state.get())) { @@ -2201,8 +2209,7 @@ PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult& result, - const LayoutRect& hit_test_rect, - const HitTestLocation& hit_test_location, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* transform_state, double* z_offset, ShouldRespectOverflowClipType clip_behavior) { @@ -2210,7 +2217,7 @@ // FIXME: We're missing a sub-pixel offset here crbug.com/348728 EnclosingPaginationLayer()->CollectFragments( - enclosing_pagination_fragments, root_layer, hit_test_rect, + enclosing_pagination_fragments, root_layer, nullptr, kExcludeOverlayScrollbarSizeForHitTesting, clip_behavior, nullptr, LayoutSize()); @@ -2218,12 +2225,12 @@ // Apply the page/column clip for this fragment, as well as any clips // established by layers in between us and the enclosing pagination layer. LayoutRect clip_rect = fragment.background_rect.Rect(); - if (!hit_test_location.Intersects(clip_rect)) + if (!recursion_data.location.Intersects(clip_rect)) continue; PaintLayer* hit_layer = HitTestLayerByApplyingTransform( - root_layer, container_layer, result, hit_test_rect, hit_test_location, - transform_state, z_offset, fragment.pagination_offset); + root_layer, container_layer, result, recursion_data, transform_state, + z_offset, fragment.pagination_offset); if (hit_layer) return hit_layer; } @@ -2235,16 +2242,14 @@ PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult& result, - const LayoutRect& hit_test_rect, - const HitTestLocation& hit_test_location, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* transform_state, double* z_offset, const LayoutPoint& translation_offset) { // Create a transform state to accumulate this transform. scoped_refptr<HitTestingTransformState> new_transform_state = - CreateLocalTransformState(root_layer, container_layer, hit_test_rect, - hit_test_location, transform_state, - translation_offset); + CreateLocalTransformState(root_layer, container_layer, recursion_data, + transform_state, translation_offset); // If the transform can't be inverted, then don't hit test this layer at all. if (!new_transform_state->accumulated_transform_.IsInvertible()) @@ -2259,17 +2264,17 @@ // been flattened (losing z) by our container. FloatPoint local_point = new_transform_state->MappedPoint(); FloatQuad local_point_quad = new_transform_state->MappedQuad(); - LayoutRect local_hit_test_rect = new_transform_state->BoundsOfMappedArea(); - HitTestLocation new_hit_test_location; - if (hit_test_location.IsRectBasedTest()) - new_hit_test_location = HitTestLocation(local_point, local_point_quad); + LayoutRect bounds_of_mapped_area = new_transform_state->BoundsOfMappedArea(); + base::Optional<HitTestLocation> new_location; + if (recursion_data.location.IsRectBasedTest()) + new_location.emplace(local_point, local_point_quad); else - new_hit_test_location = HitTestLocation(local_point); + new_location.emplace(local_point); + HitTestRecursionData new_recursion_data(bounds_of_mapped_area, *new_location); // Now do a hit test with the root layer shifted to be us. - return HitTestLayer(this, container_layer, result, local_hit_test_rect, - new_hit_test_location, true, new_transform_state.get(), - z_offset); + return HitTestLayer(this, container_layer, result, new_recursion_data, true, + new_transform_state.get(), z_offset); } bool PaintLayer::HitTestContents(HitTestResult& result, @@ -2324,8 +2329,7 @@ ChildrenIteration childrento_visit, PaintLayer* root_layer, HitTestResult& result, - const LayoutRect& hit_test_rect, - const HitTestLocation& hit_test_location, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* transform_state, double* z_offset_for_descendants, double* z_offset, @@ -2357,8 +2361,8 @@ HitTestResult temp_result(result.GetHitTestRequest(), result.GetHitTestLocation()); hit_layer = child_layer->HitTestLayer( - root_layer, this, temp_result, hit_test_rect, hit_test_location, false, - transform_state, z_offset_for_descendants); + root_layer, this, temp_result, recursion_data, false, transform_state, + z_offset_for_descendants); // If it is a list-based test, we can safely append the temporary result // since it might had hit nodes but not necesserily had hitLayer set.
diff --git a/third_party/blink/renderer/core/paint/paint_layer.h b/third_party/blink/renderer/core/paint/paint_layer.h index cbc6721..3290abad 100644 --- a/third_party/blink/renderer/core/paint/paint_layer.h +++ b/third_party/blink/renderer/core/paint/paint_layer.h
@@ -907,7 +907,7 @@ void AppendSingleFragmentIgnoringPagination( PaintLayerFragments&, const PaintLayer* root_layer, - const LayoutRect& dirty_rect, + const LayoutRect* dirty_rect, OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize, ShouldRespectOverflowClipType = kRespectOverflowClip, const LayoutPoint* offset_from_root = nullptr, @@ -916,7 +916,7 @@ void CollectFragments( PaintLayerFragments&, const PaintLayer* root_layer, - const LayoutRect& dirty_rect, + const LayoutRect* dirty_rect, OverlayScrollbarClipBehavior = kIgnorePlatformOverlayScrollbarSize, ShouldRespectOverflowClipType = kRespectOverflowClip, const LayoutPoint* offset_from_root = nullptr, @@ -1091,11 +1091,20 @@ void SetLastChild(PaintLayer* last) { last_ = last; } void UpdateHasSelfPaintingLayerDescendant() const; + + struct HitTestRecursionData { + const LayoutRect& rect; + // Whether location.Intersects(rect) returns true. + const HitTestLocation& location; + const bool intersects_location; + HitTestRecursionData(const LayoutRect& rect_arg, + const HitTestLocation& location_arg); + }; + PaintLayer* HitTestLayer(PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult&, - const LayoutRect& hit_test_rect, - const HitTestLocation&, + const HitTestRecursionData& recursion_data, bool applied_transform, const HitTestingTransformState* = nullptr, double* z_offset = nullptr); @@ -1103,8 +1112,7 @@ PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult&, - const LayoutRect& hit_test_rect, - const HitTestLocation&, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* = nullptr, double* z_offset = nullptr, const LayoutPoint& translation_offset = LayoutPoint()); @@ -1112,8 +1120,7 @@ ChildrenIteration, PaintLayer* root_layer, HitTestResult&, - const LayoutRect& hit_test_rect, - const HitTestLocation&, + const HitTestRecursionData& recursion_data, const HitTestingTransformState*, double* z_offset_for_descendants, double* z_offset, @@ -1123,8 +1130,7 @@ scoped_refptr<HitTestingTransformState> CreateLocalTransformState( PaintLayer* root_layer, PaintLayer* container_layer, - const LayoutRect& hit_test_rect, - const HitTestLocation&, + const HitTestRecursionData& recursion_data, const HitTestingTransformState* container_transform_state, const LayoutPoint& translation_offset = LayoutPoint()) const; @@ -1142,8 +1148,7 @@ PaintLayer* root_layer, PaintLayer* container_layer, HitTestResult&, - const LayoutRect& hit_test_rect, - const HitTestLocation&, + const HitTestRecursionData&, const HitTestingTransformState*, double* z_offset, ShouldRespectOverflowClipType);
diff --git a/third_party/blink/renderer/core/paint/paint_layer_clipper.cc b/third_party/blink/renderer/core/paint/paint_layer_clipper.cc index a9956b9..21e014c 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_clipper.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_clipper.cc
@@ -221,8 +221,11 @@ CalculateBackgroundClipRectWithGeometryMapper( context, layer_.GetLayoutObject().FirstFragment(), kRespectOverflowClip, clip_rect); - LayoutRect premapped_rect = clip_rect.Rect(); + if (clip_rect.IsInfinite()) + return clip_rect.Rect(); + + LayoutRect premapped_rect = clip_rect.Rect(); // The rect now needs to be transformed to the local space of this // PaintLayer. // TODO(chrishtr): not correct for fragmentation. @@ -251,14 +254,13 @@ LayoutRect layer_bounds; ClipRect background_rect, foreground_rect; - CalculateRects(context, nullptr, LayoutRect(LayoutRect::InfiniteIntRect()), - layer_bounds, background_rect, foreground_rect); + CalculateRects(context, nullptr, nullptr, layer_bounds, background_rect, + foreground_rect); + + if (background_rect.IsInfinite()) + return background_rect.Rect(); LayoutRect clip_rect = background_rect.Rect(); - // TODO(chrishtr): avoid converting to IntRect and back. - if (clip_rect == LayoutRect(LayoutRect::InfiniteIntRect())) - return clip_rect; - LayoutPoint clipping_root_offset; layer_.ConvertToLayerCoords(&clipping_root_layer, clipping_root_offset); clip_rect.MoveBy(-clipping_root_offset); @@ -269,7 +271,7 @@ void PaintLayerClipper::CalculateRectsWithGeometryMapper( const ClipRectsContext& context, const FragmentData& fragment_data, - const LayoutRect& paint_dirty_rect, + const LayoutRect* paint_dirty_rect, LayoutRect& layer_bounds, ClipRect& background_rect, ClipRect& foreground_rect, @@ -329,7 +331,9 @@ CalculateBackgroundClipRectWithGeometryMapper( context, fragment_data, kRespectOverflowClip, background_rect); - background_rect.Intersect(paint_dirty_rect); + + if (paint_dirty_rect) + background_rect.Intersect(*paint_dirty_rect); if (ShouldClipOverflow(context)) { LayoutBoxModelObject& layout_object = layer_.GetLayoutObject(); @@ -348,7 +352,7 @@ void PaintLayerClipper::CalculateRects( const ClipRectsContext& context, const FragmentData* fragment_data, - const LayoutRect& paint_dirty_rect, + const LayoutRect* paint_dirty_rect, LayoutRect& layer_bounds, ClipRect& background_rect, ClipRect& foreground_rect, @@ -374,10 +378,9 @@ if (!is_clipping_root && layer_.Parent()) { CalculateBackgroundClipRect(context, background_rect); background_rect.Move(context.sub_pixel_accumulation); - background_rect.Intersect(paint_dirty_rect); - } else { - background_rect = paint_dirty_rect; } + if (paint_dirty_rect) + background_rect.Intersect(*paint_dirty_rect); foreground_rect = background_rect; @@ -530,10 +533,12 @@ output.SetRect(clipped_rect_in_root_layer_space); } - // TODO(chrishtr): generalize to multiple fragments. - output.MoveBy( - -context.root_layer->GetLayoutObject().FirstFragment().PaintOffset()); - output.Move(context.sub_pixel_accumulation); + if (!output.IsInfinite()) { + // TODO(chrishtr): generalize to multiple fragments. + output.MoveBy( + -context.root_layer->GetLayoutObject().FirstFragment().PaintOffset()); + output.Move(context.sub_pixel_accumulation); + } } void PaintLayerClipper::InitializeCommonClipRectState(
diff --git a/third_party/blink/renderer/core/paint/paint_layer_clipper.h b/third_party/blink/renderer/core/paint/paint_layer_clipper.h index 3f830db..9df1f85 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_clipper.h +++ b/third_party/blink/renderer/core/paint/paint_layer_clipper.h
@@ -188,9 +188,11 @@ // include subpixel accumualation. Otherwise it is set to the offset from // |layer_| to |root_layer|, plus |context.sub_pixel_accumuation|. // |fragment_data| is only used in kUseGeometryMapper mode. + // If |paint_dirty_rect| is provided, intersects |background_rect| + // and |foreground_rect| with it. void CalculateRects(const ClipRectsContext&, const FragmentData*, - const LayoutRect& paint_dirty_rect, + const LayoutRect* paint_dirty_rect, LayoutRect& layer_bounds, ClipRect& background_rect, ClipRect& foreground_rect, @@ -227,7 +229,7 @@ ALWAYS_INLINE void CalculateRectsWithGeometryMapper( const ClipRectsContext&, const FragmentData&, - const LayoutRect& paint_dirty_rect, + const LayoutRect* paint_dirty_rect, LayoutRect& layer_bounds, ClipRect& background_rect, ClipRect& foreground_rect,
diff --git a/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc b/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc index 5d9aec5f..aadfe40 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_clipper_test.cc
@@ -144,8 +144,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(FloatRect(8.25, 8.35, 200, 300)), background_rect.Rect()); @@ -174,8 +173,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); #if defined(OS_MACOSX) // If the PaintLayer clips overflow, the background rect is intersected with // the PaintLayer bounds... @@ -214,8 +212,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // Only the foreground rect gets hasRadius set for overflow clipping // of descendants. @@ -253,8 +250,7 @@ child_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &child_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(0, 0, 200, 300), background_rect.Rect()); EXPECT_TRUE(background_rect.HasRadius()); @@ -290,8 +286,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // The control clip for a select excludes the area for the down arrow. #if defined(OS_MACOSX) EXPECT_EQ(LayoutRect(16, 9, 79, 13), foreground_rect.Rect()); @@ -323,8 +318,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(8, 8, 200, 300), background_rect.Rect()); EXPECT_EQ(LayoutRect(8, 8, 200, 300), foreground_rect.Rect()); EXPECT_EQ(LayoutRect(8, 8, 400, 0), layer_bounds); @@ -338,7 +332,6 @@ </div> )HTML"); - LayoutRect infinite_rect(LayoutRect::InfiniteIntRect()); PaintLayer* layer = ToLayoutBoxModelObject(GetLayoutObjectByElementId("target"))->Layer(); ClipRectsContext context(layer, kPaintingClipRectsIgnoringOverflowClip, @@ -349,8 +342,7 @@ layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &layer->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_GE(background_rect.Rect().Size().Width().ToInt(), 33554422); EXPECT_GE(background_rect.Rect().Size().Height().ToInt(), 33554422); EXPECT_EQ(background_rect.Rect(), foreground_rect.Rect()); @@ -360,8 +352,7 @@ layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context_clip, &layer->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(0, 0, 200, 200), background_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 200), foreground_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 200), layer_bounds); @@ -376,7 +367,6 @@ </div> )HTML"); - LayoutRect infinite_rect(LayoutRect::InfiniteIntRect()); PaintLayer* layer = ToLayoutBoxModelObject(GetLayoutObjectByElementId("target"))->Layer(); ClipRectsContext context( @@ -387,8 +377,7 @@ layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &layer->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(0, 0, 200, 400), background_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 400), foreground_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 400), layer_bounds); @@ -397,8 +386,7 @@ layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context_clip, &layer->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(0, 0, 200, 200), background_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 200), foreground_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 200, 400), layer_bounds); @@ -416,7 +404,6 @@ </div> )HTML"); - LayoutRect infinite_rect(LayoutRect::InfiniteIntRect()); PaintLayer* transformed = ToLayoutBoxModelObject(GetLayoutObjectByElementId("transformed")) ->Layer(); @@ -522,8 +509,7 @@ ClipRect foreground_rect(infinite_rect); target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(0, 0, 50, 100), background_rect.Rect()); EXPECT_EQ(LayoutRect(0, 0, 50, 100), foreground_rect.Rect()); @@ -552,8 +538,7 @@ ClipRect foreground_rect(infinite_rect); target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // The background rect is used to clip stacking context (layer) output. // In this case, nothing is above us, thus the infinite rect. However we do @@ -567,8 +552,8 @@ background_rect = infinite_rect; foreground_rect = infinite_rect; target->Clipper(PaintLayer::kDoNotUseGeometryMapper) - .CalculateRects(context, nullptr, infinite_rect, layer_bounds, - background_rect, foreground_rect); + .CalculateRects(context, nullptr, nullptr, layer_bounds, background_rect, + foreground_rect); // The non-GeometryMapper path applies the immediate filter effect in // background rect. EXPECT_EQ(LayoutRect(-12, -9, 204, 304), background_rect.Rect()); @@ -580,8 +565,7 @@ foreground_rect = infinite_rect; target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(root_context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // This includes the filter effect because it's applied before mapping the // background rect to the root layer. EXPECT_EQ(LayoutRect(38, 41, 204, 304), background_rect.Rect()); @@ -591,7 +575,7 @@ background_rect = infinite_rect; foreground_rect = infinite_rect; target->Clipper(PaintLayer::kDoNotUseGeometryMapper) - .CalculateRects(root_context, nullptr, infinite_rect, layer_bounds, + .CalculateRects(root_context, nullptr, nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(38, 41, 204, 304), background_rect.Rect()); EXPECT_EQ(LayoutRect(90, 90, 100, 200), foreground_rect.Rect()); @@ -633,8 +617,7 @@ ClipRect foreground_rect(infinite_rect); target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_TRUE(IsInfinite(background_rect.Rect())); EXPECT_TRUE(IsInfinite(foreground_rect.Rect())); @@ -669,8 +652,7 @@ ClipRect foreground_rect(infinite_rect); target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_TRUE(IsInfinite(background_rect.Rect())); EXPECT_TRUE(IsInfinite(foreground_rect.Rect())); @@ -706,8 +688,7 @@ ClipRect foreground_rect(infinite_rect); target->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target->GetLayoutObject().FirstFragment(), - infinite_rect, layer_bounds, background_rect, - foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_TRUE(IsInfinite(background_rect.Rect())); EXPECT_TRUE(IsInfinite(foreground_rect.Rect())); @@ -745,8 +726,7 @@ target_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &target_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(FloatRect(-1.0e6, -1.0e6, 1.0001e6, 1.0001e6)), background_rect.Rect()); @@ -758,8 +738,7 @@ .CalculateRects( context, target_paint_layer->GetLayoutObject().FirstFragment().NextFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); EXPECT_EQ(LayoutRect(FloatRect(100, 0, 1000000, 999900)), background_rect.Rect()); @@ -796,8 +775,7 @@ child_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &child_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // The background and foreground rect are clipped by the scrollbar size. EXPECT_EQ(LayoutRect(0, 0, 193, 293), background_rect.Rect()); @@ -805,9 +783,8 @@ EXPECT_EQ(LayoutRect(0, 0, 500, 500), layer_bounds); child_paint_layer->Clipper(PaintLayer::kDoNotUseGeometryMapper) - .CalculateRects(context, nullptr, - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + .CalculateRects(context, nullptr, nullptr, layer_bounds, background_rect, + foreground_rect); // The background and foreground rect are clipped by the scrollbar size. EXPECT_EQ(LayoutRect(0, 0, 193, 293), background_rect.Rect()); @@ -841,8 +818,7 @@ child_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &child_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // The background and foreground rect are clipped by the scrollbar size. EXPECT_EQ(LayoutRect(8, 8, 193, 293), background_rect.Rect()); @@ -850,9 +826,8 @@ EXPECT_EQ(LayoutRect(8, 8, 500, 500), layer_bounds); child_paint_layer->Clipper(PaintLayer::kDoNotUseGeometryMapper) - .CalculateRects(context, nullptr, - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + .CalculateRects(context, nullptr, nullptr, layer_bounds, background_rect, + foreground_rect); // The background and foreground rect are clipped by the scrollbar size. EXPECT_EQ(LayoutRect(8, 8, 193, 293), background_rect.Rect()); @@ -887,8 +862,7 @@ parent_paint_layer->Clipper(PaintLayer::kUseGeometryMapper) .CalculateRects(context, &child_paint_layer->GetLayoutObject().FirstFragment(), - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + nullptr, layer_bounds, background_rect, foreground_rect); // Only the foreground is clipped by the scrollbar size, because we // called CalculateRects on the root layer. @@ -897,9 +871,8 @@ EXPECT_EQ(LayoutRect(0, 0, 200, 300), layer_bounds); parent_paint_layer->Clipper(PaintLayer::kDoNotUseGeometryMapper) - .CalculateRects(context, nullptr, - LayoutRect(LayoutRect::InfiniteIntRect()), layer_bounds, - background_rect, foreground_rect); + .CalculateRects(context, nullptr, nullptr, layer_bounds, background_rect, + foreground_rect); // Only the foreground is clipped by the scrollbar size, because we // called CalculateRects on the root layer.
diff --git a/third_party/blink/renderer/core/paint/paint_layer_painter.cc b/third_party/blink/renderer/core/paint/paint_layer_painter.cc index 362435d4..91a5a13 100644 --- a/third_party/blink/renderer/core/paint/paint_layer_painter.cc +++ b/third_party/blink/renderer/core/paint/paint_layer_painter.cc
@@ -523,7 +523,7 @@ // PaintLayerWithTransform() path. paint_layer_for_fragments->AppendSingleFragmentIgnoringPagination( layer_fragments, local_painting_info.root_layer, - local_painting_info.paint_dirty_rect, + &local_painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, respect_overflow_clip, &offset_from_root, local_painting_info.sub_pixel_accumulation); layer_fragments[0].fragment_data = fragment->fragment_data; @@ -533,7 +533,7 @@ PaintLayerFragments single_fragment; paint_layer_for_fragments->AppendSingleFragmentIgnoringPagination( single_fragment, local_painting_info.root_layer, - local_painting_info.paint_dirty_rect, + &local_painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, respect_overflow_clip, &offset_from_root, local_painting_info.sub_pixel_accumulation); RepeatFixedPositionObjectInPages(single_fragment[0], painting_info, @@ -566,7 +566,7 @@ } else { paint_layer_for_fragments->CollectFragments( layer_fragments, local_painting_info.root_layer, - local_painting_info.paint_dirty_rect, + &local_painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, respect_overflow_clip, &offset_from_root, local_painting_info.sub_pixel_accumulation); @@ -611,7 +611,7 @@ PaintLayerFragments filter_fragments; paint_layer_.AppendSingleFragmentIgnoringPagination( filter_fragments, local_painting_info.root_layer, - local_painting_info.paint_dirty_rect, + &local_painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, respect_overflow_clip, &offset_from_root, local_painting_info.sub_pixel_accumulation); @@ -921,7 +921,7 @@ ShouldRespectOverflowClip(paint_flags, paint_layer_.GetLayoutObject()); paint_layer_.CollectFragments( layer_fragments, painting_info.root_layer, - painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, + &painting_info.paint_dirty_rect, kIgnorePlatformOverlayScrollbarSize, respect_overflow_clip, nullptr, painting_info.sub_pixel_accumulation); // PaintLayer::CollectFragments depends on the paint dirty rect in // complicated ways. For now, always assume a partially painted output
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc index 81d91ac..c46afc4 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.cc
@@ -1626,6 +1626,7 @@ object_, fragment_data_, full_context_.is_actually_needed); #endif + context_.old_paint_offset = fragment_data_.PaintOffset(); UpdatePaintOffset(); UpdateForPaintOffsetTranslation(paint_offset_translation); @@ -1634,20 +1635,7 @@ // the entire subtree on paint offset changes. full_context_.force_subtree_update = true; - if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) { - // TODO(wangxianzhu): Move this logic into PaintInvalidator. - if (RoundedIntPoint(fragment_data_.PaintOffset()) == - RoundedIntPoint(context_.current.paint_offset)) { - // Most paintings are pixel-snapped so subpixel change of paint offset - // is unlikely to cause full invalidation. Let the object's paint - // invalidator determine the right invalidation. - object_.GetMutableForPainting().SetMayNeedPaintInvalidation(); - } else { - object_.GetMutableForPainting().SetShouldDoFullPaintInvalidation( - PaintInvalidationReason::kGeometry); - } - } - + object_.GetMutableForPainting().SetMayNeedPaintInvalidation(); fragment_data_.SetPaintOffset(context_.current.paint_offset); fragment_data_.InvalidateClipPathCache(); }
diff --git a/third_party/blink/renderer/core/paint/paint_property_tree_builder.h b/third_party/blink/renderer/core/paint/paint_property_tree_builder.h index 1fb0746f..4248108a 100644 --- a/third_party/blink/renderer/core/paint/paint_property_tree_builder.h +++ b/third_party/blink/renderer/core/paint/paint_property_tree_builder.h
@@ -107,6 +107,8 @@ // The repeated paintings need to add an adjustment to the calculated paint // offset to paint at the desired place. LayoutSize repeating_paint_offset_adjustment; + + LayoutPoint old_paint_offset; }; struct PaintPropertyTreeBuilderContext {
diff --git a/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc b/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc index 6c17359..1cd1ee95 100644 --- a/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc +++ b/third_party/blink/renderer/core/paint/pre_paint_tree_walk.cc
@@ -7,6 +7,7 @@ #include "base/auto_reset.h" #include "third_party/blink/renderer/core/dom/document_lifecycle.h" #include "third_party/blink/renderer/core/frame/event_handler_registry.h" +#include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/local_frame_view.h" #include "third_party/blink/renderer/core/frame/settings.h" @@ -144,16 +145,29 @@ } namespace { -bool HasBlockingTouchEventHandler(const LayoutObject& object) { - auto* node = object.GetNode(); - if (!node || !node->HasEventListeners()) +bool HasBlockingTouchEventHandler(const LocalFrame& frame, + EventTarget& target) { + if (!target.HasEventListeners()) return false; - const auto& registry = object.GetFrame()->GetEventHandlerRegistry(); + const auto& registry = frame.GetEventHandlerRegistry(); const auto* blocking = registry.EventHandlerTargets( EventHandlerRegistry::kTouchStartOrMoveEventBlocking); const auto* blocking_low_latency = registry.EventHandlerTargets( EventHandlerRegistry::kTouchStartOrMoveEventBlocking); - return blocking->Contains(node) || blocking_low_latency->Contains(node); + return blocking->Contains(&target) || blocking_low_latency->Contains(&target); +} + +bool HasBlockingTouchEventHandler(const LayoutObject& object) { + if (object.IsLayoutView()) { + auto* frame = object.GetFrame(); + if (HasBlockingTouchEventHandler(*frame, *frame->DomWindow())) + return true; + } + + auto* node = object.GetNode(); + if (!node) + return false; + return HasBlockingTouchEventHandler(*object.GetFrame(), *node); } } // namespace
diff --git a/third_party/blink/renderer/core/paint/table_cell_paint_invalidator.cc b/third_party/blink/renderer/core/paint/table_cell_paint_invalidator.cc index 30f82f28..82d52ed7 100644 --- a/third_party/blink/renderer/core/paint/table_cell_paint_invalidator.cc +++ b/third_party/blink/renderer/core/paint/table_cell_paint_invalidator.cc
@@ -45,7 +45,7 @@ // and the row or table paints collapsed borders. If the cell's geometry // changed and the containers which will paint backgrounds and/or collapsed // borders haven't been full invalidated, invalidate the containers. - if (context_.old_location != context_.fragment_data->LocationInBacking() || + if (context_.old_paint_offset != context_.fragment_data->PaintOffset() || cell_.Size() != cell_.PreviousSize()) { const auto& row = *cell_.Row(); const auto& section = *row.Section();
diff --git a/third_party/blink/renderer/core/svg/graphics/svg_image.cc b/third_party/blink/renderer/core/svg/graphics/svg_image.cc index b6c1dec..3acfc2ed 100644 --- a/third_party/blink/renderer/core/svg/graphics/svg_image.cc +++ b/third_party/blink/renderer/core/svg/graphics/svg_image.cc
@@ -636,11 +636,12 @@ LocalFrameView* frame_view = ToLocalFrame(page_->MainFrame())->View(); frame_view->UpdateAllLifecyclePhasesExceptPaint(); - if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled()) { - // For SPv2 we run UpdateAnimations after the paint phase, but per above - // comment we don't want to run lifecycle through to paint for SVG images. - // Since we know SVG images never have composited animations we can update - // animations directly without worrying about including + if (RuntimeEnabledFeatures::SlimmingPaintV2Enabled() || + RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) { + // For SPv2/BGPT we run UpdateAnimations after the paint phase, but per the + // above comment, we don't want to run lifecycle through to paint for SVG + // images. Since we know SVG images never have composited animations we can + // update animations directly without worrying about including // PaintArtifactCompositor analysis of whether animations should be // composited. base::Optional<CompositorElementIdSet> composited_element_ids;
diff --git a/third_party/blink/renderer/devtools/readme.md b/third_party/blink/renderer/devtools/readme.md index 1f7a75a..a18a1f08 100644 --- a/third_party/blink/renderer/devtools/readme.md +++ b/third_party/blink/renderer/devtools/readme.md
@@ -45,6 +45,7 @@ * [Debugging protocol docs](https://developer.chrome.com/devtools/docs/debugger-protocol) and [Chrome Debugging Protocol Viewer](http://chromedevtools.github.io/debugger-protocol-viewer/) * [awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools): recommended tools and resources * Contributing to DevTools: [bit.ly/devtools-contribution-guide](http://bit.ly/devtools-contribution-guide) +* Contributing To Chrome DevTools Protocol: [docs.google.com](https://docs.google.com/document/d/1c-COD2kaK__5iMM5SEx-PzNA7HFmgttcYfOHHX0HaOM/edit?usp=sharing) ### Useful Commands
diff --git a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc index 8f39e71..65a72ac 100644 --- a/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc +++ b/third_party/blink/renderer/modules/accessibility/ax_object_cache_impl.cc
@@ -411,7 +411,6 @@ node_object_mapping_.Set(node, ax_id); new_obj->Init(); new_obj->SetLastKnownIsIgnoredValue(new_obj->AccessibilityIsIgnored()); - MaybeNewRelationTarget(node, new_obj); return new_obj; @@ -889,12 +888,13 @@ // If so, fire activedescendantchanged event now. // This is only for ARIA active descendants, not in a native control like a // listbox, which has its own initial active descendant handling. - AXObject* focus = FocusedObject(); - if (!focus) - return; - - if (focus->ActiveDescendant() == obj && obj->CanBeActiveDescendant()) - focus->HandleActiveDescendantChanged(); + Node* focused_node = document_->FocusedElement(); + if (focused_node) { + AXObject* focus = Get(focused_node); + if (focus && focus->ActiveDescendant() == obj && + obj->CanBeActiveDescendant()) + focus->HandleActiveDescendantChanged(); + } } void AXObjectCacheImpl::HandleActiveDescendantChanged(Node* node) { @@ -1150,7 +1150,7 @@ void AXObjectCacheImpl::HandleUpdateActiveMenuOption(LayoutMenuList* menu_list, int option_index) { - AXObject* obj = GetOrCreate(menu_list); + AXObject* obj = Get(menu_list); if (!obj || !obj->IsMenuList()) return;
diff --git a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css index d98ab28..1bec0051 100644 --- a/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css +++ b/third_party/blink/renderer/modules/media_controls/resources/modernMediaControls.css
@@ -795,6 +795,12 @@ background-image: -webkit-image-set(url(ic_check_blue.svg) 1x); } +video::-webkit-media-controls-overlay-enclosure { + position: absolute; + width: 100%; + height: 100%; +} + /** * Audio Controls */
diff --git a/third_party/blink/renderer/modules/modules_idl_files.gni b/third_party/blink/renderer/modules/modules_idl_files.gni index 4f60eef..a382ddc 100644 --- a/third_party/blink/renderer/modules/modules_idl_files.gni +++ b/third_party/blink/renderer/modules/modules_idl_files.gni
@@ -424,6 +424,7 @@ "xr/xr_coordinate_system.idl", "xr/xr_device.idl", "xr/xr_device_pose.idl", + "xr/xr_frame.idl", "xr/xr_frame_of_reference.idl", "xr/xr_hit_result.idl", "xr/xr_input_pose.idl", @@ -431,7 +432,6 @@ "xr/xr_input_source_event.idl", "xr/xr_layer.idl", "xr/xr_presentation_context.idl", - "xr/xr_presentation_frame.idl", "xr/xr_session.idl", "xr/xr_session_event.idl", "xr/xr_stage_bounds.idl",
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_data_channel_init.idl b/third_party/blink/renderer/modules/peerconnection/rtc_data_channel_init.idl index 6ecbe841..c699b0cd 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_data_channel_init.idl +++ b/third_party/blink/renderer/modules/peerconnection/rtc_data_channel_init.idl
@@ -6,9 +6,11 @@ dictionary RTCDataChannelInit { boolean ordered = true; - // TODO(guidou): Rename |maxRetransmitTime| to |maxPacketLifeTime|. - // https://crbug.com/696681 + // TODO(crbug.com/696681): Deprecate maxRetransmitTime in favor of + // maxPacketLifeTime (they're the same thing, maxRetransmitTime is just the + // older name) unsigned short maxRetransmitTime; + unsigned short maxPacketLifeTime; unsigned short maxRetransmits; USVString protocol = ""; boolean negotiated = false;
diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc index b6ffdeda..a01aeb47 100644 --- a/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc +++ b/third_party/blink/renderer/modules/peerconnection/rtc_peer_connection.cc
@@ -1528,7 +1528,16 @@ WebRTCDataChannelInit init; init.ordered = data_channel_dict.ordered(); ExecutionContext* context = ExecutionContext::From(script_state); - if (data_channel_dict.hasMaxRetransmitTime()) { + // maxPacketLifeTime and maxRetransmitTime are two names for the same thing, + // but maxPacketLifeTime is the standardized name so it takes precedence. + if (data_channel_dict.hasMaxPacketLifeTime()) { + UseCounter::Count( + context, + WebFeature::kRTCPeerConnectionCreateDataChannelMaxPacketLifeTime); + init.max_retransmit_time = data_channel_dict.maxPacketLifeTime(); + } else if (data_channel_dict.hasMaxRetransmitTime()) { + Deprecation::CountDeprecation( + context, WebFeature::kRTCDataChannelInitMaxRetransmitTime); UseCounter::Count( context, WebFeature::kRTCPeerConnectionCreateDataChannelMaxRetransmitTime);
diff --git a/third_party/blink/renderer/modules/xr/BUILD.gn b/third_party/blink/renderer/modules/xr/BUILD.gn index 4bb0c5f2..689c7af 100644 --- a/third_party/blink/renderer/modules/xr/BUILD.gn +++ b/third_party/blink/renderer/modules/xr/BUILD.gn
@@ -16,6 +16,8 @@ "xr_device.h", "xr_device_pose.cc", "xr_device_pose.h", + "xr_frame.cc", + "xr_frame.h", "xr_frame_of_reference.cc", "xr_frame_of_reference.h", "xr_frame_provider.cc", @@ -34,8 +36,6 @@ "xr_layer.h", "xr_presentation_context.cc", "xr_presentation_context.h", - "xr_presentation_frame.cc", - "xr_presentation_frame.h", "xr_session.cc", "xr_session.h", "xr_session_event.cc",
diff --git a/third_party/blink/renderer/modules/xr/xr_presentation_frame.cc b/third_party/blink/renderer/modules/xr/xr_frame.cc similarity index 88% rename from third_party/blink/renderer/modules/xr/xr_presentation_frame.cc rename to third_party/blink/renderer/modules/xr/xr_frame.cc index 5b413d5d..259962a 100644 --- a/third_party/blink/renderer/modules/xr/xr_presentation_frame.cc +++ b/third_party/blink/renderer/modules/xr/xr_frame.cc
@@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "third_party/blink/renderer/modules/xr/xr_presentation_frame.h" +#include "third_party/blink/renderer/modules/xr/xr_frame.h" #include "third_party/blink/renderer/modules/xr/xr_coordinate_system.h" #include "third_party/blink/renderer/modules/xr/xr_device_pose.h" @@ -13,14 +13,13 @@ namespace blink { -XRPresentationFrame::XRPresentationFrame(XRSession* session) - : session_(session) {} +XRFrame::XRFrame(XRSession* session) : session_(session) {} -const HeapVector<Member<XRView>>& XRPresentationFrame::views() const { +const HeapVector<Member<XRView>>& XRFrame::views() const { return session_->views(); } -XRDevicePose* XRPresentationFrame::getDevicePose( +XRDevicePose* XRFrame::getDevicePose( XRCoordinateSystem* coordinate_system) const { session_->LogGetPose(); @@ -45,7 +44,7 @@ return new XRDevicePose(session(), std::move(pose)); } -XRInputPose* XRPresentationFrame::getInputPose( +XRInputPose* XRFrame::getInputPose( XRInputSource* input_source, XRCoordinateSystem* coordinate_system) const { if (!input_source || !coordinate_system) { @@ -118,12 +117,11 @@ return nullptr; } -void XRPresentationFrame::SetBasePoseMatrix( - const TransformationMatrix& base_pose_matrix) { +void XRFrame::SetBasePoseMatrix(const TransformationMatrix& base_pose_matrix) { base_pose_matrix_ = TransformationMatrix::Create(base_pose_matrix); } -void XRPresentationFrame::Trace(blink::Visitor* visitor) { +void XRFrame::Trace(blink::Visitor* visitor) { visitor->Trace(session_); ScriptWrappable::Trace(visitor); }
diff --git a/third_party/blink/renderer/modules/xr/xr_presentation_frame.h b/third_party/blink/renderer/modules/xr/xr_frame.h similarity index 83% rename from third_party/blink/renderer/modules/xr/xr_presentation_frame.h rename to third_party/blink/renderer/modules/xr/xr_frame.h index 109ca75..0af9ba5 100644 --- a/third_party/blink/renderer/modules/xr/xr_presentation_frame.h +++ b/third_party/blink/renderer/modules/xr/xr_frame.h
@@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_PRESENTATION_FRAME_H_ -#define THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_PRESENTATION_FRAME_H_ +#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_FRAME_H_ +#define THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_FRAME_H_ #include "device/vr/public/mojom/vr_service.mojom-blink.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" @@ -21,11 +21,11 @@ class XRSession; class XRView; -class XRPresentationFrame final : public ScriptWrappable { +class XRFrame final : public ScriptWrappable { DEFINE_WRAPPERTYPEINFO(); public: - explicit XRPresentationFrame(XRSession*); + explicit XRFrame(XRSession*); XRSession* session() const { return session_; }
diff --git a/third_party/blink/renderer/modules/xr/xr_presentation_frame.idl b/third_party/blink/renderer/modules/xr/xr_frame.idl similarity index 82% rename from third_party/blink/renderer/modules/xr/xr_presentation_frame.idl rename to third_party/blink/renderer/modules/xr/xr_frame.idl index 9e22213..bfa5a79 100644 --- a/third_party/blink/renderer/modules/xr/xr_presentation_frame.idl +++ b/third_party/blink/renderer/modules/xr/xr_frame.idl
@@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// https://immersive-web.github.io/webxr/#xrpresentationframe-interface +// https://immersive-web.github.io/webxr/#xrframe [ SecureContext, OriginTrialEnabled=WebXR -] interface XRPresentationFrame { +] interface XRFrame { readonly attribute XRSession session; readonly attribute FrozenArray<XRView> views;
diff --git a/third_party/blink/renderer/modules/xr/xr_frame_request_callback.idl b/third_party/blink/renderer/modules/xr/xr_frame_request_callback.idl index 74ed911..916e35d 100644 --- a/third_party/blink/renderer/modules/xr/xr_frame_request_callback.idl +++ b/third_party/blink/renderer/modules/xr/xr_frame_request_callback.idl
@@ -3,4 +3,4 @@ // found in the LICENSE file. // https://immersive-web.github.io/webxr/#callbackdef-xrframerequestcallback -callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRPresentationFrame frame); +callback XRFrameRequestCallback = void (DOMHighResTimeStamp time, XRFrame frame);
diff --git a/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.cc b/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.cc index cf47dc1..2f9db6e 100644 --- a/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.cc +++ b/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.cc
@@ -7,7 +7,7 @@ #include "third_party/blink/renderer/bindings/modules/v8/v8_xr_frame_request_callback.h" #include "third_party/blink/renderer/core/inspector/inspector_trace_events.h" #include "third_party/blink/renderer/core/probe/core_probes.h" -#include "third_party/blink/renderer/modules/xr/xr_presentation_frame.h" +#include "third_party/blink/renderer/modules/xr/xr_frame.h" #include "third_party/blink/renderer/modules/xr/xr_session.h" namespace blink { @@ -33,9 +33,8 @@ } } -void XRFrameRequestCallbackCollection::ExecuteCallbacks( - XRSession* session, - XRPresentationFrame* frame) { +void XRFrameRequestCallbackCollection::ExecuteCallbacks(XRSession* session, + XRFrame* frame) { // First, generate a list of callbacks to consider. Callbacks registered from // this point on are considered only for the "next" frame, not this one. DCHECK(callbacks_to_invoke_.IsEmpty());
diff --git a/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.h b/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.h index ec8fbbc9..e97e470 100644 --- a/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.h +++ b/third_party/blink/renderer/modules/xr/xr_frame_request_callback_collection.h
@@ -12,7 +12,7 @@ class ExecutionContext; class V8XRFrameRequestCallback; -class XRPresentationFrame; +class XRFrame; class XRSession; class XRFrameRequestCallbackCollection final : public TraceWrapperBase { @@ -24,7 +24,7 @@ using CallbackId = int; CallbackId RegisterCallback(V8XRFrameRequestCallback*); void CancelCallback(CallbackId); - void ExecuteCallbacks(XRSession*, XRPresentationFrame*); + void ExecuteCallbacks(XRSession*, XRFrame*); bool IsEmpty() const { return !callbacks_.size(); }
diff --git a/third_party/blink/renderer/modules/xr/xr_input_source.h b/third_party/blink/renderer/modules/xr/xr_input_source.h index 18daf0b..eae92ea 100644 --- a/third_party/blink/renderer/modules/xr/xr_input_source.h +++ b/third_party/blink/renderer/modules/xr/xr_input_source.h
@@ -46,7 +46,7 @@ bool selection_cancelled = false; private: - friend class XRPresentationFrame; + friend class XRFrame; const Member<XRSession> session_; const uint32_t source_id_;
diff --git a/third_party/blink/renderer/modules/xr/xr_input_source_event.cc b/third_party/blink/renderer/modules/xr/xr_input_source_event.cc index ce47b89..c9e918a5 100644 --- a/third_party/blink/renderer/modules/xr/xr_input_source_event.cc +++ b/third_party/blink/renderer/modules/xr/xr_input_source_event.cc
@@ -9,7 +9,7 @@ XRInputSourceEvent::XRInputSourceEvent() {} XRInputSourceEvent::XRInputSourceEvent(const AtomicString& type, - XRPresentationFrame* frame, + XRFrame* frame, XRInputSource* input_source) : Event(type, Bubbles::kYes, Cancelable::kNo), frame_(frame),
diff --git a/third_party/blink/renderer/modules/xr/xr_input_source_event.h b/third_party/blink/renderer/modules/xr/xr_input_source_event.h index 3df0491..a94b263b 100644 --- a/third_party/blink/renderer/modules/xr/xr_input_source_event.h +++ b/third_party/blink/renderer/modules/xr/xr_input_source_event.h
@@ -6,9 +6,9 @@ #define THIRD_PARTY_BLINK_RENDERER_MODULES_XR_XR_INPUT_SOURCE_EVENT_H_ #include "third_party/blink/renderer/modules/event_modules.h" +#include "third_party/blink/renderer/modules/xr/xr_frame.h" #include "third_party/blink/renderer/modules/xr/xr_input_source.h" #include "third_party/blink/renderer/modules/xr/xr_input_source_event_init.h" -#include "third_party/blink/renderer/modules/xr/xr_presentation_frame.h" namespace blink { @@ -18,7 +18,7 @@ public: static XRInputSourceEvent* Create() { return new XRInputSourceEvent; } static XRInputSourceEvent* Create(const AtomicString& type, - XRPresentationFrame* frame, + XRFrame* frame, XRInputSource* input_source) { return new XRInputSourceEvent(type, frame, input_source); } @@ -30,7 +30,7 @@ ~XRInputSourceEvent() override; - XRPresentationFrame* frame() const { return frame_.Get(); } + XRFrame* frame() const { return frame_.Get(); } XRInputSource* inputSource() const { return input_source_.Get(); } const AtomicString& InterfaceName() const override; @@ -39,12 +39,10 @@ private: XRInputSourceEvent(); - XRInputSourceEvent(const AtomicString& type, - XRPresentationFrame*, - XRInputSource*); + XRInputSourceEvent(const AtomicString& type, XRFrame*, XRInputSource*); XRInputSourceEvent(const AtomicString&, const XRInputSourceEventInit&); - Member<XRPresentationFrame> frame_; + Member<XRFrame> frame_; Member<XRInputSource> input_source_; };
diff --git a/third_party/blink/renderer/modules/xr/xr_input_source_event.idl b/third_party/blink/renderer/modules/xr/xr_input_source_event.idl index cbcb28c..0c8fe9f3 100644 --- a/third_party/blink/renderer/modules/xr/xr_input_source_event.idl +++ b/third_party/blink/renderer/modules/xr/xr_input_source_event.idl
@@ -7,6 +7,6 @@ OriginTrialEnabled=WebXR, Constructor(DOMString type, XRInputSourceEventInit eventInitDict) ] interface XRInputSourceEvent : Event { - readonly attribute XRPresentationFrame frame; + readonly attribute XRFrame frame; readonly attribute XRInputSource inputSource; };
diff --git a/third_party/blink/renderer/modules/xr/xr_input_source_event_init.idl b/third_party/blink/renderer/modules/xr/xr_input_source_event_init.idl index b24af31..e5ca3ac 100644 --- a/third_party/blink/renderer/modules/xr/xr_input_source_event_init.idl +++ b/third_party/blink/renderer/modules/xr/xr_input_source_event_init.idl
@@ -5,6 +5,6 @@ [ SecureContext ] dictionary XRInputSourceEventInit : EventInit { - required XRPresentationFrame frame; + required XRFrame frame; required XRInputSource inputSource; }; \ No newline at end of file
diff --git a/third_party/blink/renderer/modules/xr/xr_session.cc b/third_party/blink/renderer/modules/xr/xr_session.cc index 6d6da6b..bb8669f 100644 --- a/third_party/blink/renderer/modules/xr/xr_session.cc +++ b/third_party/blink/renderer/modules/xr/xr_session.cc
@@ -19,6 +19,7 @@ #include "third_party/blink/renderer/modules/xr/xr.h" #include "third_party/blink/renderer/modules/xr/xr_canvas_input_provider.h" #include "third_party/blink/renderer/modules/xr/xr_device.h" +#include "third_party/blink/renderer/modules/xr/xr_frame.h" #include "third_party/blink/renderer/modules/xr/xr_frame_of_reference.h" #include "third_party/blink/renderer/modules/xr/xr_frame_of_reference_options.h" #include "third_party/blink/renderer/modules/xr/xr_frame_provider.h" @@ -26,7 +27,6 @@ #include "third_party/blink/renderer/modules/xr/xr_input_source_event.h" #include "third_party/blink/renderer/modules/xr/xr_layer.h" #include "third_party/blink/renderer/modules/xr/xr_presentation_context.h" -#include "third_party/blink/renderer/modules/xr/xr_presentation_frame.h" #include "third_party/blink/renderer/modules/xr/xr_session_event.h" #include "third_party/blink/renderer/modules/xr/xr_view.h" #include "third_party/blink/renderer/modules/xr/xr_webgl_layer.h" @@ -444,7 +444,7 @@ if (!base_layer_) return; - XRPresentationFrame* presentation_frame = CreatePresentationFrame(); + XRFrame* presentation_frame = CreatePresentationFrame(); if (pending_frame_) { pending_frame_ = false; @@ -494,8 +494,8 @@ } } -XRPresentationFrame* XRSession::CreatePresentationFrame() { - XRPresentationFrame* presentation_frame = new XRPresentationFrame(this); +XRFrame* XRSession::CreatePresentationFrame() { + XRFrame* presentation_frame = new XRFrame(this); if (base_pose_matrix_) { presentation_frame->SetBasePoseMatrix(*base_pose_matrix_); } @@ -687,7 +687,7 @@ XRInputSourceEvent* XRSession::CreateInputSourceEvent( const AtomicString& type, XRInputSource* input_source) { - XRPresentationFrame* presentation_frame = CreatePresentationFrame(); + XRFrame* presentation_frame = CreatePresentationFrame(); return XRInputSourceEvent::Create(type, presentation_frame, input_source); }
diff --git a/third_party/blink/renderer/modules/xr/xr_session.h b/third_party/blink/renderer/modules/xr/xr_session.h index 876f290..79e2ae6 100644 --- a/third_party/blink/renderer/modules/xr/xr_session.h +++ b/third_party/blink/renderer/modules/xr/xr_session.h
@@ -137,7 +137,7 @@ private: class XRSessionResizeObserverDelegate; - XRPresentationFrame* CreatePresentationFrame(); + XRFrame* CreatePresentationFrame(); void UpdateCanvasDimensions(Element*); void UpdateInputSourceState(
diff --git a/third_party/blink/renderer/modules/xr/xr_view.cc b/third_party/blink/renderer/modules/xr/xr_view.cc index 556378a6..2486ab6 100644 --- a/third_party/blink/renderer/modules/xr/xr_view.cc +++ b/third_party/blink/renderer/modules/xr/xr_view.cc
@@ -4,7 +4,7 @@ #include "third_party/blink/renderer/modules/xr/xr_view.h" -#include "third_party/blink/renderer/modules/xr/xr_presentation_frame.h" +#include "third_party/blink/renderer/modules/xr/xr_frame.h" #include "third_party/blink/renderer/modules/xr/xr_session.h" #include "third_party/blink/renderer/platform/geometry/float_point_3d.h"
diff --git a/third_party/blink/renderer/platform/exported/web_runtime_features.cc b/third_party/blink/renderer/platform/exported/web_runtime_features.cc index 01240a9..17d7ee3 100644 --- a/third_party/blink/renderer/platform/exported/web_runtime_features.cc +++ b/third_party/blink/renderer/platform/exported/web_runtime_features.cc
@@ -120,6 +120,10 @@ RuntimeEnabledFeatures::SetCSSHexAlphaColorEnabled(enable); } +void WebRuntimeFeatures::EnableCSSFragmentIdentifiers(bool enable) { + RuntimeEnabledFeatures::SetCSSFragmentIdentifiersEnabled(enable); +} + void WebRuntimeFeatures::EnableScrollTopLeftInterop(bool enable) { RuntimeEnabledFeatures::SetScrollTopLeftInteropEnabled(enable); }
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5 index 6d86d7d..e945696 100644 --- a/third_party/blink/renderer/platform/runtime_enabled_features.json5 +++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -265,6 +265,9 @@ status: "experimental", }, { + name: "CSSFragmentIdentifiers" + }, + { name: "CSSHexAlphaColor", status: "stable", },
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc index 05e2c09..605d487 100644 --- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc +++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.cc
@@ -24,6 +24,8 @@ #include "services/metrics/public/cpp/ukm_builders.h" #include "third_party/blink/public/common/page/launching_process_state.h" #include "third_party/blink/public/platform/scheduler/renderer_process_type.h" +#include "third_party/blink/public/platform/web_mouse_wheel_event.h" +#include "third_party/blink/public/platform/web_touch_event.h" #include "third_party/blink/renderer/platform/instrumentation/resource_coordinator/blink_resource_coordinator_base.h" #include "third_party/blink/renderer/platform/instrumentation/resource_coordinator/renderer_resource_coordinator.h" #include "third_party/blink/renderer/platform/runtime_enabled_features.h" @@ -237,6 +239,22 @@ return base::FeatureList::IsEnabled(kHighPriorityInput); } +bool IsBlockingEvent(const blink::WebInputEvent& web_input_event) { + blink::WebInputEvent::Type type = web_input_event.GetType(); + DCHECK(type == blink::WebInputEvent::kTouchStart || + type == blink::WebInputEvent::kMouseWheel); + + if (type == blink::WebInputEvent::kTouchStart) { + const WebTouchEvent& touch_event = + static_cast<const WebTouchEvent&>(web_input_event); + return touch_event.dispatch_type == blink::WebInputEvent::kBlocking; + } + + const WebMouseWheelEvent& mouse_event = + static_cast<const WebMouseWheelEvent&>(web_input_event); + return mouse_event.dispatch_type == blink::WebInputEvent::kBlocking; +} + } // namespace MainThreadSchedulerImpl::MainThreadSchedulerImpl( @@ -459,11 +477,12 @@ main_thread_scheduler_impl, &main_thread_scheduler_impl->tracing_controller_, YesNoStateToString), - touchstart_expected_soon(false, - "Scheduler.TouchstartExpectedSoon", - main_thread_scheduler_impl, - &main_thread_scheduler_impl->tracing_controller_, - YesNoStateToString), + blocking_input_expected_soon( + false, + "Scheduler.BlockingInputExpectedSoon", + main_thread_scheduler_impl, + &main_thread_scheduler_impl->tracing_controller_, + YesNoStateToString), have_seen_a_begin_main_frame( false, "Scheduler.HasSeenBeginMainFrame", @@ -587,9 +606,9 @@ main_thread_scheduler_impl, &main_thread_scheduler_impl->tracing_controller_, YesNoStateToString), - have_seen_a_potentially_blocking_gesture( + have_seen_a_blocking_gesture( false, - "Scheduler.HaveSeenPotentiallyBlockingGesture", + "Scheduler.HaveSeenBlockingGesture", main_thread_scheduler_impl, &main_thread_scheduler_impl->tracing_controller_, YesNoStateToString), @@ -1060,6 +1079,12 @@ return policy_may_need_update_.IsSet(); } +void MainThreadSchedulerImpl::SetHaveSeenABlockingGestureForTesting( + bool status) { + base::AutoLock lock(any_thread_lock_); + any_thread().have_seen_a_blocking_gesture = status; +} + // static bool MainThreadSchedulerImpl::ShouldPrioritizeInputEvent( const blink::WebInputEvent& web_input_event) { @@ -1092,7 +1117,7 @@ if (!ShouldPrioritizeInputEvent(web_input_event)) return; - UpdateForInputEventOnCompositorThread(web_input_event.GetType(), event_state); + UpdateForInputEventOnCompositorThread(web_input_event, event_state); } void MainThreadSchedulerImpl::DidAnimateForInputOnCompositorThread() { @@ -1105,11 +1130,13 @@ } void MainThreadSchedulerImpl::UpdateForInputEventOnCompositorThread( - blink::WebInputEvent::Type type, + const blink::WebInputEvent& web_input_event, InputEventState input_event_state) { base::AutoLock lock(any_thread_lock_); base::TimeTicks now = helper_.NowTicks(); + blink::WebInputEvent::Type type = web_input_event.GetType(); + // TODO(alexclarke): Move WebInputEventTraits where we can access it from here // and record the name rather than the integer representation. TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("renderer.scheduler"), @@ -1136,12 +1163,13 @@ // |last_gesture_was_compositor_driven| to the default. We don't know // yet where the gesture will run. any_thread().last_gesture_was_compositor_driven = false; - any_thread().have_seen_a_potentially_blocking_gesture = true; // Assume the default gesture is prevented until we see evidence // otherwise. any_thread().default_gesture_prevented = true; - break; + if (IsBlockingEvent(web_input_event)) + any_thread().have_seen_a_blocking_gesture = true; + break; case blink::WebInputEvent::kTouchMove: // Observation of consecutive touchmoves is a strong signal that the // page is consuming the touch sequence, in which case touchstart @@ -1194,13 +1222,13 @@ any_thread().last_gesture_was_compositor_driven = input_event_state == InputEventState::EVENT_CONSUMED_BY_COMPOSITOR; any_thread().awaiting_touch_start_response = false; - any_thread().have_seen_a_potentially_blocking_gesture = true; // If the event was sent to the main thread, assume the default gesture is // prevented until we see evidence otherwise. any_thread().default_gesture_prevented = !any_thread().last_gesture_was_compositor_driven; + if (IsBlockingEvent(web_input_event)) + any_thread().have_seen_a_blocking_gesture = true; break; - case blink::WebInputEvent::kUndefined: break; @@ -1252,7 +1280,7 @@ // The touchstart, synchronized gesture and main-thread gesture use cases // indicate a strong likelihood of high-priority work in the near future. UseCase use_case = main_thread_only().current_use_case; - return main_thread_only().touchstart_expected_soon || + return main_thread_only().blocking_input_expected_soon || use_case == UseCase::kTouchstart || use_case == UseCase::kMainThreadGesture || use_case == UseCase::kMainThreadCustomInputHandling || @@ -1273,13 +1301,13 @@ switch (main_thread_only().current_use_case) { case UseCase::kCompositorGesture: case UseCase::kNone: - return main_thread_only().touchstart_expected_soon; + return main_thread_only().blocking_input_expected_soon; case UseCase::kMainThreadGesture: case UseCase::kMainThreadCustomInputHandling: case UseCase::kSynchronizedGesture: return compositor_task_queue_->HasTaskToRunImmediately() || - main_thread_only().touchstart_expected_soon; + main_thread_only().blocking_input_expected_soon; case UseCase::kTouchstart: return true; @@ -1349,15 +1377,14 @@ main_thread_only().current_use_case = ComputeCurrentUseCase(now, &expected_use_case_duration); - base::TimeDelta touchstart_expected_flag_valid_for_duration; - // TODO(skyostil): Consider handlers for all types of blocking gestures (e.g., - // mouse wheel) instead of just touchstart. - bool touchstart_expected_soon = false; - if (main_thread_only().has_visible_render_widget_with_touch_handler) { - touchstart_expected_soon = any_thread().user_model.IsGestureExpectedSoon( - now, &touchstart_expected_flag_valid_for_duration); + base::TimeDelta gesture_expected_flag_valid_for_duration; + + main_thread_only().blocking_input_expected_soon = false; + if (any_thread().have_seen_a_blocking_gesture) { + main_thread_only().blocking_input_expected_soon = + any_thread().user_model.IsGestureExpectedSoon( + now, &gesture_expected_flag_valid_for_duration); } - main_thread_only().touchstart_expected_soon = touchstart_expected_soon; base::TimeDelta longest_jank_free_task_duration = EstimateLongestJankFreeTaskDuration(); @@ -1381,13 +1408,13 @@ loading_tasks_seem_expensive; // The |new_policy_duration| is the minimum of |expected_use_case_duration| - // and |touchstart_expected_flag_valid_for_duration| unless one is zero in + // and |gesture_expected_flag_valid_for_duration| unless one is zero in // which case we choose the other. base::TimeDelta new_policy_duration = expected_use_case_duration; if (new_policy_duration.is_zero() || - (touchstart_expected_flag_valid_for_duration > base::TimeDelta() && - new_policy_duration > touchstart_expected_flag_valid_for_duration)) { - new_policy_duration = touchstart_expected_flag_valid_for_duration; + (gesture_expected_flag_valid_for_duration > base::TimeDelta() && + new_policy_duration > gesture_expected_flag_valid_for_duration)) { + new_policy_duration = gesture_expected_flag_valid_for_duration; } if (new_policy_duration > base::TimeDelta()) { @@ -1414,7 +1441,7 @@ switch (new_policy.use_case()) { case UseCase::kCompositorGesture: - if (touchstart_expected_soon) { + if (main_thread_only().blocking_input_expected_soon) { new_policy.rail_mode() = v8::PERFORMANCE_RESPONSE; expensive_task_policy = ExpensiveTaskPolicy::kBlock; new_policy.compositor_priority() = @@ -1433,7 +1460,7 @@ new_policy.compositor_priority() = main_thread_compositing_is_fast ? TaskQueue::kHighestPriority : TaskQueue::kNormalPriority; - if (touchstart_expected_soon) { + if (main_thread_only().blocking_input_expected_soon) { new_policy.rail_mode() = v8::PERFORMANCE_RESPONSE; expensive_task_policy = ExpensiveTaskPolicy::kBlock; } else { @@ -1459,7 +1486,7 @@ // handling over other tasks. new_policy.compositor_priority() = TaskQueue::QueuePriority::kHighestPriority; - if (touchstart_expected_soon) { + if (main_thread_only().blocking_input_expected_soon) { new_policy.rail_mode() = v8::PERFORMANCE_RESPONSE; expensive_task_policy = ExpensiveTaskPolicy::kBlock; } else { @@ -1480,7 +1507,7 @@ case UseCase::kNone: // It's only safe to block tasks that if we are expecting a compositor // driven gesture. - if (touchstart_expected_soon && + if (main_thread_only().blocking_input_expected_soon && any_thread().last_gesture_was_compositor_driven) { new_policy.rail_mode() = v8::PERFORMANCE_RESPONSE; expensive_task_policy = ExpensiveTaskPolicy::kBlock; @@ -2023,8 +2050,8 @@ state->SetBoolean( "compositor_will_send_main_frame_not_expected", main_thread_only().compositor_will_send_main_frame_not_expected); - state->SetBoolean("touchstart_expected_soon", - main_thread_only().touchstart_expected_soon); + state->SetBoolean("blocking_input_expected_soon", + main_thread_only().blocking_input_expected_soon); state->SetString("idle_period_state", IdleHelper::IdlePeriodStateToString( idle_helper_.SchedulerIdlePeriodState())); @@ -2273,7 +2300,7 @@ helper_.CheckOnValidThread(); any_thread_lock_.AssertAcquired(); any_thread().user_model.Reset(helper_.NowTicks()); - any_thread().have_seen_a_potentially_blocking_gesture = false; + any_thread().have_seen_a_blocking_gesture = false; any_thread().waiting_for_meaningful_paint = true; any_thread().have_seen_input_since_navigation = false; main_thread_only().loading_task_cost_estimator.Clear();
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h index c467050..a01aba5 100644 --- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h +++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h
@@ -343,6 +343,8 @@ main_thread_only().current_use_case = use_case; } + void SetHaveSeenABlockingGestureForTesting(bool status); + private: friend class WebRenderWidgetSchedulingState; friend class MainThreadMetricsHelper; @@ -602,7 +604,7 @@ std::unique_ptr<base::SingleSampleMetric> CreateMaxQueueingTimeMetric(); // An input event of some sort happened, the policy may need updating. - void UpdateForInputEventOnCompositorThread(WebInputEvent::Type type, + void UpdateForInputEventOnCompositorThread(const WebInputEvent& event, InputEventState input_event_state); // The task cost estimators and the UserModel need to be reset upon page @@ -763,7 +765,8 @@ timer_task_estimated_cost; TraceableState<bool, kTracingCategoryNameInfo> loading_tasks_seem_expensive; TraceableState<bool, kTracingCategoryNameInfo> timer_tasks_seem_expensive; - TraceableState<bool, kTracingCategoryNameDefault> touchstart_expected_soon; + TraceableState<bool, kTracingCategoryNameDefault> + blocking_input_expected_soon; TraceableState<bool, kTracingCategoryNameDebug> have_seen_a_begin_main_frame; TraceableState<bool, kTracingCategoryNameDebug> @@ -837,8 +840,7 @@ TraceableState<bool, kTracingCategoryNameInfo> last_gesture_was_compositor_driven; TraceableState<bool, kTracingCategoryNameInfo> default_gesture_prevented; - TraceableState<bool, kTracingCategoryNameInfo> - have_seen_a_potentially_blocking_gesture; + TraceableState<bool, kTracingCategoryNameInfo> have_seen_a_blocking_gesture; TraceableState<bool, kTracingCategoryNameInfo> waiting_for_meaningful_paint; TraceableState<bool, kTracingCategoryNameInfo> have_seen_input_since_navigation;
diff --git a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc index cb6e044..1fb2d27 100644 --- a/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc +++ b/third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl_unittest.cc
@@ -21,6 +21,8 @@ #include "testing/gmock/include/gmock/gmock.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/blink/public/common/page/launching_process_state.h" +#include "third_party/blink/public/platform/web_mouse_wheel_event.h" +#include "third_party/blink/public/platform/web_touch_event.h" #include "third_party/blink/renderer/platform/scheduler/base/real_time_domain.h" #include "third_party/blink/renderer/platform/scheduler/base/test/task_queue_manager_for_test.h" #include "third_party/blink/renderer/platform/scheduler/child/features.h" @@ -49,6 +51,30 @@ WebInputEvent::GetStaticTimeStampForTests()) {} }; +class FakeTouchEvent : public blink::WebTouchEvent { + public: + explicit FakeTouchEvent( + blink::WebInputEvent::Type event_type, + DispatchType dispatch_type = blink::WebInputEvent::kBlocking) + : WebTouchEvent(event_type, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests()) { + this->dispatch_type = dispatch_type; + } +}; + +class FakeMouseWheelEvent : public blink::WebMouseWheelEvent { + public: + explicit FakeMouseWheelEvent( + blink::WebInputEvent::Type event_type, + DispatchType dispatch_type = blink::WebInputEvent::kBlocking) + : WebMouseWheelEvent(event_type, + WebInputEvent::kNoModifiers, + WebInputEvent::GetStaticTimeStampForTests()) { + this->dispatch_type = dispatch_type; + } +}; + void AppendToVectorTestTask(std::vector<std::string>* vector, std::string value) { vector->push_back(value); @@ -167,7 +193,7 @@ case SimulateInputType::kTouchStart: scheduler->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); break; @@ -204,6 +230,7 @@ using MainThreadSchedulerImpl::OnPendingTasksChanged; using MainThreadSchedulerImpl::V8TaskQueue; using MainThreadSchedulerImpl::VirtualTimeControlTaskQueue; + using MainThreadSchedulerImpl::SetHaveSeenABlockingGestureForTesting; MainThreadSchedulerImplForTest( std::unique_ptr<base::sequence_manager::SequenceManager> manager, @@ -217,8 +244,8 @@ std::string use_case = MainThreadSchedulerImpl::UseCaseToString( main_thread_only().current_use_case); - if (main_thread_only().touchstart_expected_soon) { - use_cases_.push_back(use_case + " touchstart expected"); + if (main_thread_only().blocking_input_expected_soon) { + use_cases_.push_back(use_case + " blocking input expected"); } else { use_cases_.push_back(use_case); } @@ -348,7 +375,7 @@ scheduler_->WillBeginFrame(begin_frame_args); } - void ForceTouchStartToBeExpectedSoon() { + void ForceBlockingInputToBeExpectedSoon() { scheduler_->DidHandleInputEventOnCompositorThread( FakeInputEvent(blink::WebInputEvent::kGestureScrollUpdate), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); @@ -381,7 +408,7 @@ void SimulateCompositorGestureStart(TouchEventPolicy touch_event_policy) { if (touch_event_policy == TouchEventPolicy::kSendTouchStart) { scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnCompositorThread( FakeInputEvent(blink::WebInputEvent::kTouchMove), @@ -404,7 +431,7 @@ // driven gesture. void SimulateMainThreadGestureWithoutScrollUpdates() { scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnCompositorThread( FakeInputEvent(blink::WebInputEvent::kTouchMove), @@ -423,7 +450,7 @@ // scheduled. void SimulateMainThreadGestureWithoutPreventDefault() { scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); // Touchstart policy update. @@ -468,10 +495,10 @@ blink::WebInputEvent::Type gesture_type) { if (touch_event_policy == TouchEventPolicy::kSendTouchStart) { scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); scheduler_->DidHandleInputEventOnCompositorThread( @@ -545,8 +572,8 @@ return scheduler_->main_thread_only().begin_frame_not_expected_soon; } - bool TouchStartExpectedSoon() { - return scheduler_->main_thread_only().touchstart_expected_soon; + bool BlockingInputExpectedSoon() { + return scheduler_->main_thread_only().blocking_input_expected_soon; } bool HaveSeenABeginMainframe() { @@ -565,6 +592,11 @@ return scheduler_->main_thread_only().estimated_next_frame_begin; } + bool HaveSeenABlockingGesture() { + base::AutoLock lock(scheduler_->any_thread_lock_); + return scheduler_->any_thread().have_seen_a_blocking_gesture; + } + void AdvanceTimeWithTask(double duration) { scoped_refptr<MainThreadTaskQueue> fake_queue = scheduler_->NewLoadingTaskQueue( @@ -957,7 +989,6 @@ TEST_F(MainThreadSchedulerImplTest, TestCompositorPolicy_CompositorHandlesInput_LongGestureDuration) { - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); EnableIdleTasks(); SimulateCompositorGestureStart(TouchEventPolicy::kSendTouchStart); @@ -1051,10 +1082,10 @@ scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledApplication); base::RunLoop().RunUntilIdle(); // Because the main thread is performing custom input handling, we let all @@ -1075,10 +1106,10 @@ scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); base::RunLoop().RunUntilIdle(); // Because we are still waiting for the touchstart to be processed, @@ -1142,7 +1173,7 @@ PostTestTasks(&run_order, "C1 T1"); base::RunLoop().RunUntilIdle(); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_EQ(UseCase::kMainThreadGesture, CurrentUseCase()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("C1"))); @@ -1161,7 +1192,7 @@ PostTestTasks(&run_order, "C1 T1"); base::RunLoop().RunUntilIdle(); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_EQ(UseCase::kMainThreadCustomInputHandling, CurrentUseCase()); EXPECT_THAT(run_order, @@ -1181,7 +1212,7 @@ PostTestTasks(&run_order, "C1 T1"); base::RunLoop().RunUntilIdle(); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_EQ(UseCase::kMainThreadCustomInputHandling, CurrentUseCase()); EXPECT_THAT(run_order, @@ -1195,7 +1226,7 @@ // Observation of touchstart should defer execution of timer, idle and loading // tasks. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); EnableIdleTasks(); base::RunLoop().RunUntilIdle(); @@ -1236,10 +1267,10 @@ // Observation of touchstart should defer execution of timer, idle and loading // tasks. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); EnableIdleTasks(); base::RunLoop().RunUntilIdle(); @@ -1405,7 +1436,7 @@ SimulateMainThreadGestureStart(TouchEventPolicy::kSendTouchStart, blink::WebInputEvent::kGestureScrollUpdate); base::RunLoop().RunUntilIdle(); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_EQ(UseCase::kMainThreadGesture, CurrentUseCase()); // Now start a main thread mouse touch gesture. It should be detected as main @@ -1467,7 +1498,7 @@ EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kMouseWheel), + FakeMouseWheelEvent(blink::WebInputEvent::kMouseWheel), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); base::RunLoop().RunUntilIdle(); // Note compositor tasks are not prioritized. @@ -1485,7 +1516,7 @@ EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kMouseWheel), + FakeMouseWheelEvent(blink::WebInputEvent::kMouseWheel), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); base::RunLoop().RunUntilIdle(); // Note compositor tasks are prioritized (since they are fast). @@ -1503,7 +1534,7 @@ EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kMouseWheel), + FakeMouseWheelEvent(blink::WebInputEvent::kMouseWheel), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnCompositorThread( FakeInputEvent(blink::WebInputEvent::kGestureScrollBegin), @@ -1531,7 +1562,7 @@ EnableIdleTasks(); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kMouseWheel), + FakeMouseWheelEvent(blink::WebInputEvent::kMouseWheel), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnCompositorThread( FakeInputEvent(blink::WebInputEvent::kGestureScrollBegin), @@ -1646,7 +1677,7 @@ PostTestTasks(&run_order, "L1 D1 C1 D2 C2"); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); base::RunLoop().RunUntilIdle(); EXPECT_THAT(run_order, @@ -1674,7 +1705,7 @@ // Observation of touchstart should defer execution of idle and loading tasks. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); base::RunLoop().RunUntilIdle(); EXPECT_THAT(run_order, @@ -1702,7 +1733,7 @@ bool is_anticipated_before = false; bool is_anticipated_after = false; - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); default_task_runner_->PostTask( FROM_HERE, base::BindOnce(&AnticipationTestTask, scheduler_.get(), SimulateInputType::kNone, @@ -1747,7 +1778,7 @@ // use case but with scrolling expected where high-priority work is still // anticipated. EXPECT_EQ(UseCase::kNone, CurrentUseCase()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_TRUE(is_anticipated_before); EXPECT_TRUE(is_anticipated_after); @@ -1761,7 +1792,7 @@ // Eventually the scheduler should go into the default use case where // high-priority work is no longer anticipated. EXPECT_EQ(UseCase::kNone, CurrentUseCase()); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_FALSE(is_anticipated_before); EXPECT_FALSE(is_anticipated_after); } @@ -1805,7 +1836,7 @@ // there's no immediately pending work in the compositor queue. EXPECT_FALSE(scheduler_->ShouldYieldForHighPriorityWork()); scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); EXPECT_TRUE(scheduler_->ShouldYieldForHighPriorityWork()); base::RunLoop().RunUntilIdle(); @@ -1872,14 +1903,14 @@ // We expect DidHandleInputEventOnCompositorThread to post an urgent policy // update. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); EXPECT_EQ(0, scheduler_->update_policy_count_); base::RunLoop().RunUntilIdle(); EXPECT_EQ(1, scheduler_->update_policy_count_); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); EXPECT_EQ(1, scheduler_->update_policy_count_); @@ -1894,14 +1925,15 @@ // We expect DidHandleInputEventOnCompositorThread to post // an urgent policy update. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart, + blink::WebInputEvent::kEventNonBlocking), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); EXPECT_EQ(0, scheduler_->update_policy_count_); base::RunLoop().RunUntilIdle(); EXPECT_EQ(1, scheduler_->update_policy_count_); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); EXPECT_EQ(1, scheduler_->update_policy_count_); @@ -1943,14 +1975,15 @@ // We expect DidHandleInputEventOnCompositorThread to post an urgent policy // update. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart, + blink::WebInputEvent::kEventNonBlocking), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); EXPECT_EQ(0, scheduler_->update_policy_count_); base::RunLoop().RunUntilIdle(); EXPECT_EQ(1, scheduler_->update_policy_count_); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); EXPECT_EQ(1, scheduler_->update_policy_count_); test_task_runner_->FastForwardBy(base::TimeDelta::FromSeconds(1)); @@ -2005,7 +2038,7 @@ InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); scheduler_->DidHandleInputEventOnMainThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), WebInputEventResult::kHandledSystem); scheduler_->DidHandleInputEventOnMainThread( FakeInputEvent(blink::WebInputEvent::kTouchMove), @@ -2027,8 +2060,24 @@ scheduler_->use_cases_, testing::ElementsAre( std::string("none"), std::string("compositor_gesture"), - std::string("compositor_gesture touchstart expected"), - std::string("none touchstart expected"), std::string("none"))); + std::string("compositor_gesture blocking input expected"), + std::string("none blocking input expected"), std::string("none"))); +} + +TEST_F(MainThreadSchedulerImplTest, + BlockingInputExpectedSoonWhenBlockInputEventSeen) { + SimulateCompositorGestureStart(TouchEventPolicy::kSendTouchStart); + EXPECT_TRUE(HaveSeenABlockingGesture()); + ForceBlockingInputToBeExpectedSoon(); + EXPECT_TRUE(BlockingInputExpectedSoon()); +} + +TEST_F(MainThreadSchedulerImplTest, + BlockingInputNotExpectedSoonWhenNoBlockInputEventSeen) { + SimulateCompositorGestureStart(TouchEventPolicy::kDontSendTouchStart); + EXPECT_FALSE(HaveSeenABlockingGesture()); + ForceBlockingInputToBeExpectedSoon(); + EXPECT_FALSE(BlockingInputExpectedSoon()); } class MainThreadSchedulerImplWithMessageLoopTest @@ -2239,7 +2288,7 @@ // Observation of touchstart should defer the start of the long idle period. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); scheduler_->BeginFrameNotExpectedSoon(); base::RunLoop().RunUntilIdle(); @@ -2472,9 +2521,9 @@ ExpensiveLoadingTasksNotBlockedTillFirstBeginMainFrame) { std::vector<std::string> run_order; - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); SimulateExpensiveTasks(loading_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); PostTestTasks(&run_order, "L1 D1"); base::RunLoop().RunUntilIdle(); @@ -2482,7 +2531,7 @@ EXPECT_FALSE(HaveSeenABeginMainframe()); EXPECT_TRUE(LoadingTasksSeemExpensive()); EXPECT_FALSE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("L1"), std::string("D1"))); @@ -2497,7 +2546,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_TRUE(LoadingTasksSeemExpensive()); EXPECT_FALSE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode()); } @@ -2509,7 +2558,7 @@ scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(false); DoMainFrame(); SimulateExpensiveTasks(loading_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); PostTestTasks(&run_order, "L1 D1"); base::RunLoop().RunUntilIdle(); @@ -2517,7 +2566,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_TRUE(LoadingTasksSeemExpensive()); EXPECT_FALSE(TimerTasksSeemExpensive()); - EXPECT_FALSE(TouchStartExpectedSoon()); + EXPECT_FALSE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("L1"), std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_ANIMATION, GetRAILMode()); @@ -2527,10 +2576,10 @@ ExpensiveTimerTaskBlocked_UseCase_NONE_PreviousCompositorGesture) { std::vector<std::string> run_order; - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); DoMainFrame(); SimulateExpensiveTasks(timer_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); PostTestTasks(&run_order, "T1 D1"); base::RunLoop().RunUntilIdle(); @@ -2539,7 +2588,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_FALSE(LoadingTasksSeemExpensive()); EXPECT_TRUE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode()); } @@ -2575,7 +2624,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_FALSE(LoadingTasksSeemExpensive()); EXPECT_TRUE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("T1"), std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_ANIMATION, GetRAILMode()); @@ -2585,10 +2634,10 @@ ExpensiveTimerTaskBlocked_UseCase_kCompositorGesture) { std::vector<std::string> run_order; - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); DoMainFrame(); SimulateExpensiveTasks(timer_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); scheduler_->DidAnimateForInputOnCompositorThread(); PostTestTasks(&run_order, "T1 D1"); @@ -2599,7 +2648,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_FALSE(LoadingTasksSeemExpensive()); EXPECT_TRUE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode()); } @@ -2608,10 +2657,10 @@ ExpensiveTimerTaskBlocked_EvenIfBeginMainFrameNotExpectedSoon) { std::vector<std::string> run_order; - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); DoMainFrame(); SimulateExpensiveTasks(timer_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); scheduler_->BeginFrameNotExpectedSoon(); PostTestTasks(&run_order, "T1 D1"); @@ -2621,7 +2670,7 @@ EXPECT_TRUE(HaveSeenABeginMainframe()); EXPECT_FALSE(LoadingTasksSeemExpensive()); EXPECT_TRUE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_THAT(run_order, testing::ElementsAre(std::string("D1"))); EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode()); } @@ -2631,9 +2680,9 @@ std::vector<std::string> run_order; DoMainFrame(); - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); SimulateExpensiveTasks(loading_task_runner_); - ForceTouchStartToBeExpectedSoon(); + ForceBlockingInputToBeExpectedSoon(); PostTestTasks(&run_order, "L1 D1"); base::RunLoop().RunUntilIdle(); @@ -2929,7 +2978,7 @@ TEST_F(MainThreadSchedulerImplTest, SYNCHRONIZED_GESTURE_TimerTaskThrottling_task_expensive) { - SimulateCompositorGestureStart(TouchEventPolicy::kSendTouchStart); + SimulateCompositorGestureStart(TouchEventPolicy::kDontSendTouchStart); base::TimeTicks first_throttled_run_time = TaskQueueThrottler::AlignedThrottledRunTime(Now()); @@ -3084,11 +3133,12 @@ } TEST_F(MainThreadSchedulerImplTest, - ExpensiveTimerTaskBlocked_SYNCHRONIZED_GESTURE_TouchStartExpected) { + ExpensiveTimerTaskBlocked_SYNCHRONIZED_GESTURE_GestureExpected) { SimulateExpensiveTasks(timer_task_runner_); - SimulateCompositorGestureStart(TouchEventPolicy::kSendTouchStart); - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); - ForceTouchStartToBeExpectedSoon(); + scheduler_->DidHandleInputEventOnCompositorThread( + FakeTouchEvent(blink::WebInputEvent::kTouchStart), + InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); + ForceBlockingInputToBeExpectedSoon(); // Bump us into SYNCHRONIZED_GESTURE. scheduler_->DidHandleInputEventOnCompositorThread( @@ -3106,13 +3156,13 @@ ForceUpdatePolicyAndGetCurrentUseCase()); EXPECT_TRUE(TimerTasksSeemExpensive()); - EXPECT_TRUE(TouchStartExpectedSoon()); + EXPECT_TRUE(BlockingInputExpectedSoon()); EXPECT_FALSE(timer_task_runner_->IsQueueEnabled()); } TEST_F(MainThreadSchedulerImplTest, DenyLongIdleDuringTouchStart) { scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_CONSUMED_BY_COMPOSITOR); EXPECT_EQ(UseCase::kTouchstart, ForceUpdatePolicyAndGetCurrentUseCase()); @@ -3141,7 +3191,7 @@ // Make sure TouchStart causes a policy change. scheduler_->DidHandleInputEventOnCompositorThread( - FakeInputEvent(blink::WebInputEvent::kTouchStart), + FakeTouchEvent(blink::WebInputEvent::kTouchStart), InputEventState::EVENT_FORWARDED_TO_MAIN_THREAD); EXPECT_EQ(UseCase::kTouchstart, ForceUpdatePolicyAndGetCurrentUseCase()); } @@ -3275,8 +3325,8 @@ scheduler_->SetRAILModeObserver(&observer); EXPECT_CALL(observer, OnRAILModeChanged(v8::PERFORMANCE_RESPONSE)); - scheduler_->SetHasVisibleRenderWidgetWithTouchHandler(true); - ForceTouchStartToBeExpectedSoon(); + scheduler_->SetHaveSeenABlockingGestureForTesting(true); + ForceBlockingInputToBeExpectedSoon(); EXPECT_EQ(UseCase::kNone, ForceUpdatePolicyAndGetCurrentUseCase()); EXPECT_EQ(v8::PERFORMANCE_RESPONSE, GetRAILMode()); scheduler_->SetRAILModeObserver(nullptr);
diff --git a/tools/mb/mb_config.pyl b/tools/mb/mb_config.pyl index 3dbb589..ef70fd4c 100644 --- a/tools/mb/mb_config.pyl +++ b/tools/mb/mb_config.pyl
@@ -128,7 +128,7 @@ 'ToTLinuxCoverage': 'clang_tot_coverage_minimal_symbols_shared_release_with_libfuzzer', 'ToTLinux (dbg)': 'clang_tot_shared_debug', 'ToTLinuxASan': 'clang_tot_asan_lsan_static_release', - 'ToTLinuxASanLibfuzzer': 'release_libfuzzer_asan_clang_tot', + 'ToTLinuxASanLibfuzzer': 'libfuzzer_asan_clang_tot_release', 'ToTLinuxMSan': 'clang_tot_msan_release', 'ToTLinuxThinLTO': 'clang_tot_release_minimal_symbols_thin_lto_static_use_lld', 'ToTLinuxUBSanVptr': 'clang_tot_edge_ubsan_no_recover_hack_static_release', @@ -151,7 +151,7 @@ }, 'chromium.fyi': { - 'Afl Upload Linux ASan': 'release_afl_asan', + 'Afl Upload Linux ASan': 'afl_asan_release_bot', 'Android Builder (dbg)': 'android_debug_static_bot_vrdata', 'Android Builder (dbg) Goma Canary': 'android_debug_static_bot_vrdata', @@ -203,11 +203,11 @@ 'MD Top Chrome ChromeOS non-material': 'chromeos_with_codecs_debug_bot', 'MD Top Chrome Win material': 'debug_bot_minimal_symbols', 'MD Top Chrome Linux material': 'debug_bot', - 'Libfuzzer Upload Linux ASan': 'release_libfuzzer_asan', - 'Libfuzzer Upload Linux ASan Debug': 'debug_libfuzzer_asan', - 'Libfuzzer Upload Linux MSan': 'release_libfuzzer_msan', - 'Libfuzzer Upload Linux UBSan': 'release_libfuzzer_ubsan', - 'Libfuzzer Upload Mac ASan': 'release_libfuzzer_mac_asan', + 'Libfuzzer Upload Linux ASan': 'libfuzzer_asan_release_bot', + 'Libfuzzer Upload Linux ASan Debug': 'libfuzzer_asan_debug_bot', + 'Libfuzzer Upload Linux MSan': 'libfuzzer_msan_release_bot', + 'Libfuzzer Upload Linux UBSan': 'libfuzzer_ubsan_release_bot', + 'Libfuzzer Upload Mac ASan': 'libfuzzer_mac_asan_release_bot', 'Linux ARM': 'release_bot_arm', 'Linux ARM (dbg)': 'debug_bot_arm', 'Linux ARM64': 'release_bot_arm64', @@ -718,6 +718,10 @@ # is not necessarily so (i.e., we might have mac, win, and linux # bots all using the 'release_bot' config). 'configs': { + 'afl_asan_release_bot': [ + 'afl', 'asan', 'release_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + 'android_binary_size': [ 'android', 'chrome_with_codecs', 'goma', 'minimal_symbols', 'official_optimize', ], @@ -1233,8 +1237,8 @@ 'debug_bot', 'x86', 'minimal_symbols', 'no_com_init_hooks', 'chrome_with_codecs' ], - 'debug_libfuzzer_asan': [ - 'debug', 'libfuzzer', 'asan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + 'libfuzzer_asan_debug_bot': [ + 'libfuzzer', 'asan', 'debug_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', ], 'debug_trybot': [ @@ -1368,6 +1372,30 @@ 'jumbo_non_goma_chunks', 'release_bot', 'minimal_symbols' ], + 'libfuzzer_asan_debug_bot': [ + 'libfuzzer', 'asan', 'debug_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + 'libfuzzer_asan_release_bot': [ + 'libfuzzer', 'asan', 'release_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + + + 'libfuzzer_asan_clang_tot_release': [ + 'libfuzzer', 'asan', 'clang_tot', 'release', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', + ], + + 'libfuzzer_mac_asan_release_bot': [ + 'libfuzzer', 'asan', 'release_bot', 'chrome_with_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + + 'libfuzzer_msan_release_bot': [ + 'libfuzzer', 'msan', 'release_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + + 'libfuzzer_ubsan_release_bot': [ + 'libfuzzer', 'ubsan_security', 'release_bot', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', + ], + 'linux_chromium_analysis': [ 'analysis' ], @@ -1441,10 +1469,6 @@ 'error', ], - 'release_afl_asan': [ - 'release', 'afl', 'asan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', - ], - 'release_bot': [ 'release_bot', ], @@ -1511,26 +1535,6 @@ 'release_bot', 'x86', 'minimal_symbols', 'no_com_init_hooks', 'chrome_with_codecs' ], - 'release_libfuzzer_asan': [ - 'release', 'libfuzzer', 'asan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', - ], - - 'release_libfuzzer_asan_clang_tot': [ - 'clang_tot', 'release', 'libfuzzer', 'asan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', - ], - - 'release_libfuzzer_mac_asan': [ - 'release', 'libfuzzer', 'asan', 'chrome_with_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', - ], - - 'release_libfuzzer_msan': [ - 'release', 'libfuzzer', 'msan', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', - ], - - 'release_libfuzzer_ubsan': [ - 'release', 'libfuzzer', 'ubsan_security', 'chromeos_codecs', 'pdf_xfa', 'disable_nacl', 'optimize_for_fuzzing', - ], - 'release_trybot': [ 'release_trybot', ],
diff --git a/tools/metrics/histograms/enums.xml b/tools/metrics/histograms/enums.xml index a93f81d..d4ba306 100644 --- a/tools/metrics/histograms/enums.xml +++ b/tools/metrics/histograms/enums.xml
@@ -19025,6 +19025,9 @@ <int value="2475" label="MediaElementSourceOnOfflineContext"/> <int value="2476" label="MediaStreamDestinationOnOfflineContext"/> <int value="2477" label="MediaStreamSourceOnOfflineContext"/> + <int value="2478" label="RTCDataChannelInitMaxRetransmitTime"/> + <int value="2479" + label="RTCPeerConnectionCreateDataChannelMaxPacketLifeTime"/> </enum> <enum name="FeedbackSource"> @@ -21923,6 +21926,11 @@ <int value="17" label="SIGN_IN_FAILED"/> <int value="18" label="SERVICE_UPDATING"/> <int value="1500" label="DRIVE_EXTERNAL_STORAGE_REQUIRED"/> + <int value="12000" label="SAFE_BROWSING_UNSUPPORTED_THREAT_TYPES"/> + <int value="12001" label="SAFE_BROWSING_MISSING_API_KEY"/> + <int value="12002" label="SAFE_BROWSING_API_NOT_AVAILABLE"/> + <int value="12006" label="UNSUPPORTED_SDK_VERSION"/> + <int value="12009" label="SAFE_BROWSING_API_NOT_INITIALIZED"/> </enum> <enum name="GooglePlayServicesErrorHandlerAction"> @@ -27480,6 +27488,7 @@ label="AutofillToolkitViewsCreditCardDialogsMac:disabled"/> <int value="-802348444" label="disable-site-engagement-service"/> <int value="-798187384" label="try-supported-channel-layouts"/> + <int value="-797310986" label="CSSFragmentIdentifiers:disabled"/> <int value="-795600188" label="disable-async-dns"/> <int value="-793921836" label="ShowAllDialogsWithViewsToolkit:disabled"/> <int value="-792079435" label="EnableAppsGridGapFeature:disabled"/> @@ -27885,6 +27894,7 @@ <int value="118991027" label="enable-accelerated-fixed-root-background"/> <int value="119185738" label="OmniboxUIExperimentMaxAutocompleteMatches:disabled"/> + <int value="119309423" label="WebAssemblyThreads:disabled"/> <int value="120429808" label="disable-new-profile-management"/> <int value="121684313" label="QuickUnlockPin:enabled"/> <int value="121858954" label="enable-supervised-user-safesites"/> @@ -28067,6 +28077,7 @@ <int value="565406673" label="EnableVirtualKeyboardMdUi:enabled"/> <int value="567368307" label="enable-experimental-canvas-features"/> <int value="575394365" label="AndroidPaymentApps:disabled"/> + <int value="576701073" label="WebPaymentsJustInTimePaymentApp:disabled"/> <int value="576878329" label="enable-background-blur"/> <int value="581118445" label="enable-eol-notification"/> <int value="581355159" label="ContentSuggestionsCategoryRanker:disabled"/> @@ -28292,6 +28303,7 @@ <int value="1049885154" label="OfflinePagesPrefetching:disabled"/> <int value="1050048304" label="enable-font-cache-scaling"/> <int value="1050321458" label="new-profile-management"/> + <int value="1050664817" label="CSSFragmentIdentifiers:enabled"/> <int value="1053743655" label="NewOverviewAnimations:enabled"/> <int value="1054910800" label="enable-timezone-tracking-option"/> <int value="1057887829" label="AutofillScanThemeDialog:disabled"/> @@ -28636,6 +28648,7 @@ <int value="1803465156" label="enable-zero-suggest-most-visited"/> <int value="1803470125" label="SyncUSSSessions:enabled"/> <int value="1809940714" label="SpeculativeLaunchServiceWorker:disabled"/> + <int value="1810311887" label="WebAssemblyThreads:enabled"/> <int value="1812368073" label="enable-new-app-list-mixer"/> <int value="1814671708" label="disable-password-manager-reauthentication"/> <int value="1816843861" label="ServiceWorkerServicification:enabled"/> @@ -28727,6 +28740,7 @@ <int value="1969604362" label="enable-pinch-virtual-viewport"/> <int value="1971964569" label="NewEncodeCpuLoadEstimator:disabled"/> <int value="1972232935" label="DisplayMoveWindowAccels:enabled"/> + <int value="1972720114" label="WebPaymentsJustInTimePaymentApp:enabled"/> <int value="1980011075" label="debug-packed-apps"/> <int value="1980648371" label="PointerEventV1SpecCapturing:enabled"/> <int value="1988506961" label="EnableManualSaving:enabled"/> @@ -40596,14 +40610,6 @@ <int value="19" label="BLOOM_MISS_PREFIX_HIT"/> </enum> -<enum name="SB2RemoteCallInternalErrorStatusCode"> - <int value="0" label="UNEXPECTED"/> - <int value="1" label="UNSUPPORTED_THREAT_TYPES"/> - <int value="2" label="MISSING_API_KEY"/> - <int value="3" label="API_NOT_AVAILABLE"/> - <int value="4" label="API_NOT_INITIALIZED"/> -</enum> - <enum name="SB2RemoteCallResult"> <int value="0" label="INTERNAL_ERROR"/> <int value="1" label="TIMEOUT"/> @@ -47876,6 +47882,7 @@ <int value="12" label="SSL client certificate selector was suppressed in VR"/> <int value="13" label="Media router presentation request dialog was suppressed in VR"/> + <int value="14" label="Context menu was suppressed in VR"/> </enum> <enum name="VRUnsupportedMode">
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 594a41a..6fe75051 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -8631,7 +8631,7 @@ <histogram name="Blink.UseCounter.Features_TestBrowserProcessLogging" enum="FeatureObserver"> <obsolete> - Renamed to Blink.UseCounter.Features in 03/2019, M67. The old blink + Renamed to Blink.UseCounter.Features in 03/2018, M67. The old blink UseCounter is flawed in OOPIF, so moved to the browser side (this) instead. </obsolete> <owner>loonybear@chromium.org</owner> @@ -8645,6 +8645,10 @@ <histogram name="Blink.UseCounter.SVGImage.AnimatedCSSProperties" enum="MappedCSSProperties"> + <obsolete> + Removed in 06/2018, M69 since the histogram is not really useful. See + https://crbug.com/804645. + </obsolete> <owner>loonybear@chromium.org</owner> <summary> Like Blink.UseCounter.AnimatedCSSProperties but specifically for the case of @@ -8661,6 +8665,10 @@ <histogram name="Blink.UseCounter.SVGImage.CSSProperties" enum="MappedCSSProperties"> + <obsolete> + Removed in 06/2018, M69 since the histogram is not really useful. See + https://crbug.com/804645. + </obsolete> <owner>loonybear@chromium.org</owner> <summary> Like Blink.UseCounter.CSSProperties but specifically for the case of CSS @@ -42599,6 +42607,7 @@ <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocator2" --> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> The browser process's memory usage reported by the memory instrumentation service in MB. @@ -42608,6 +42617,7 @@ <histogram base="true" name="Memory.Experimental.Browser2.Small" units="KB"> <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocatorSmall2" --> + <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary> The browser process's memory usage reported by the memory instrumentation @@ -42689,6 +42699,7 @@ <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocator2" --> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> The extension process's memory usage reported by the memory instrumentation service in MB. @@ -42698,6 +42709,7 @@ <histogram base="true" name="Memory.Experimental.Extension2.Small" units="KB"> <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocatorSmall2" --> + <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary> The extension process's memory usage reported by the memory instrumentation @@ -42730,6 +42742,7 @@ <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocator2" --> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> The gpu process's memory usage reported by the memory instrumentation service in MB. @@ -42739,6 +42752,7 @@ <histogram base="true" name="Memory.Experimental.Gpu2.Small" units="KB"> <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocatorSmall2" --> + <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary> The gpu process's memory usage reported by the memory instrumentation @@ -42940,6 +42954,7 @@ <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocator2" --> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> The renderer process's memory usage reported by the memory instrumentation service in MB. @@ -42949,6 +42964,7 @@ <histogram base="true" name="Memory.Experimental.Renderer2.Small" units="KB"> <!-- Name completed by histogram_suffixes name="ProcessMemoryAllocatorSmall2" --> + <owner>erikchen@chromium.org</owner> <owner>ssid@chromium.org</owner> <summary> The renderer process's memory usage reported by the memory instrumentation @@ -42991,6 +43007,7 @@ <histogram name="Memory.Experimental.Total2.PrivateMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the private memory footprint of all processes. </summary> @@ -43011,6 +43028,7 @@ <histogram name="Memory.Extension.PrivateMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the private memory footprint of the extension process. Recorded once per process per UMA ping. @@ -43019,6 +43037,7 @@ <histogram name="Memory.Extension.SharedMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the shared memory footprint of the extension process. Recorded once per process per UMA ping. @@ -43069,6 +43088,7 @@ <histogram name="Memory.Gpu.PrivateMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the private memory footprint of the gpu process. Recorded once per UMA ping. @@ -43086,6 +43106,7 @@ <histogram name="Memory.Gpu.SharedMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the shared memory footprint of the gpu process. Recorded once per UMA ping. @@ -43419,6 +43440,7 @@ <histogram name="Memory.Renderer.PrivateMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the private memory footprint of the renderer process. Recorded once per process per UMA ping. @@ -43427,6 +43449,7 @@ <histogram name="Memory.Renderer.SharedMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the shared memory footprint of the renderer process. Recorded once per process per UMA ping. @@ -43992,6 +44015,7 @@ <histogram name="Memory.Total.PrivateMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the private memory footprint of all processes. Recorded once per UMA ping. @@ -44000,6 +44024,7 @@ <histogram name="Memory.Total.SharedMemoryFootprint" units="MB"> <owner>erikchen@chromium.org</owner> + <owner>ssid@chromium.org</owner> <summary> A rough estimate of the shared memory footprint of all processes. Recorded once per UMA ping. @@ -83191,8 +83216,22 @@ </summary> </histogram> -<histogram name="SB2.RemoteCall.InternalErrorStatusCode" - enum="SB2RemoteCallInternalErrorStatusCode"> +<histogram name="SB2.RemoteCall.InternalErrorStatusCode"> + <obsolete> + No longer generated. Replaced by SB2.RemoteCall.InternalErrorStatusCode2 + </obsolete> + <owner>vakh@chromium.org</owner> + <summary> + The status code provided by GmsCore if it is unable to respond to a URL + check request due to incorrect initialization, not being ready, etc. Logged + on each URL check that hits the internal error condition. The total number + of these should add up to the INTERNAL_ERROR reports under + SB2.RemoteCall.Result. + </summary> +</histogram> + +<histogram name="SB2.RemoteCall.InternalErrorStatusCode2" + enum="GooglePlayServicesConnectionResult"> <owner>vakh@chromium.org</owner> <summary> The status code provided by GmsCore if it is unable to respond to a URL @@ -100616,6 +100655,50 @@ </summary> </histogram> +<histogram name="Tabs.Tasks.AverageTabGroupSize" units="tabs"> + <owner>yusufo@chromium.org</owner> + <owner>wychen@chromium.org</owner> + <summary> + The average tab group size, average number of tabs in a group, on a cold + start after all tabs are restored. + </summary> +</histogram> + +<histogram name="Tabs.Tasks.TabGroupCount" units="groups"> + <owner>yusufo@chromium.org</owner> + <owner>wychen@chromium.org</owner> + <summary> + The number of tab groups on a cold start after all tabs are restored. + </summary> +</histogram> + +<histogram name="Tabs.Tasks.TabGroupDensity" units="%"> + <owner>yusufo@chromium.org</owner> + <owner>wychen@chromium.org</owner> + <summary> + The tab group density, the ratio of the number of tab groups to the total + number of tabs, on a cold start after all tabs are restored. + </summary> +</histogram> + +<histogram name="Tabs.Tasks.TabsInGroupCount" units="tabs"> + <owner>yusufo@chromium.org</owner> + <owner>wychen@chromium.org</owner> + <summary> + The number of tabs is belonging to a tab group on a cold start after all + tabs are restored. + </summary> +</histogram> + +<histogram name="Tabs.Tasks.TabsInGroupRatio" units="%"> + <owner>yusufo@chromium.org</owner> + <owner>wychen@chromium.org</owner> + <summary> + The ratio of all tabs in tab groups to the total number of tabs on a cold + start after all tabs are restored. + </summary> +</histogram> + <histogram name="Tabs.TimeSinceLastInteraction" units="ms"> <owner>alexmos@chromium.org</owner> <owner>dcheng@chromium.org</owner>
diff --git a/tools/perf/contrib/cluster_telemetry/OWNERS b/tools/perf/contrib/cluster_telemetry/OWNERS index 8b9b217..36e9836 100644 --- a/tools/perf/contrib/cluster_telemetry/OWNERS +++ b/tools/perf/contrib/cluster_telemetry/OWNERS
@@ -1,6 +1,8 @@ rmistry@chromium.org -per-file loading_ct.py=nednguyen@google.com +per-file loading_ct.py=tdresser@chromium.org +per-file loading_ct.py=maxlg@chromium.org +per-file loading_ct.py=dproy@chromium.org per-file repaint*=wkorman@chromium.org per-file leak_detection_ct.py=yuzus@chromium.org per-file memory_ct.py=nednguyen@google.com
diff --git a/tools/perf/core/shard_maps/pixel2_shard_map.json b/tools/perf/core/shard_maps/pixel2_7_shard_map.json similarity index 100% rename from tools/perf/core/shard_maps/pixel2_shard_map.json rename to tools/perf/core/shard_maps/pixel2_7_shard_map.json
diff --git a/tools/perf/core/shard_maps/pixel2_webview_shard_map.json b/tools/perf/core/shard_maps/pixel2_webview_7_shard_map.json similarity index 100% rename from tools/perf/core/shard_maps/pixel2_webview_shard_map.json rename to tools/perf/core/shard_maps/pixel2_webview_7_shard_map.json
diff --git a/tools/perf/process_perf_results.py b/tools/perf/process_perf_results.py index 6e5af07..9da4b82 100755 --- a/tools/perf/process_perf_results.py +++ b/tools/perf/process_perf_results.py
@@ -298,7 +298,8 @@ return merged_results -def _merge_perf_results(results_filename, directories): +def _merge_perf_results(benchmark_name, results_filename, directories): + begin_time = time.time() collected_results = [] for directory in directories: filename = join(directory, 'perf_results.json') @@ -316,6 +317,10 @@ with open(results_filename, 'w') as rf: json.dump(merged_results, rf) + end_time = time.time() + print_duration(('%s results merging' % (benchmark_name)), + begin_time, end_time) + def _handle_perf_results( benchmark_enabled_map, benchmark_directory_map, configuration_name, @@ -352,7 +357,7 @@ os.makedirs(merge_perf_dir) results_filename = os.path.join( merge_perf_dir, 'merged_perf_results.json') - _merge_perf_results(results_filename, directories) + _merge_perf_results(benchmark_name, results_filename, directories) else: # It was only written to one shard, use that shards data results_filename = join(directories[0], 'perf_results.json')
diff --git a/ui/android/java/src/org/chromium/ui/base/ActivityAndroidPermissionDelegate.java b/ui/android/java/src/org/chromium/ui/base/ActivityAndroidPermissionDelegate.java index 0d2c751..a525592 100644 --- a/ui/android/java/src/org/chromium/ui/base/ActivityAndroidPermissionDelegate.java +++ b/ui/android/java/src/org/chromium/ui/base/ActivityAndroidPermissionDelegate.java
@@ -107,7 +107,7 @@ } @Override - public void onRequestPermissionsResult( + public boolean handlePermissionResult( int requestCode, String[] permissions, int[] grantResults) { Activity activity = mActivity.get(); assert activity != null; @@ -120,8 +120,9 @@ PermissionCallback callback = mOutstandingPermissionRequests.get(requestCode); mOutstandingPermissionRequests.delete(requestCode); - if (callback == null) return; + if (callback == null) return false; callback.onRequestPermissionsResult(permissions, grantResults); + return true; } protected void logUMAOnRequestPermissionDenied(String permission) {}
diff --git a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java index cd6c04b4..93375c5 100644 --- a/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java +++ b/ui/android/java/src/org/chromium/ui/base/ActivityWindowAndroid.java
@@ -33,6 +33,8 @@ private int mNextRequestCode; + private boolean mListenToActivityState; + /** * Creates an Activity-specific WindowAndroid with associated intent functionality. * TODO(jdduke): Remove this overload when all callsites have been updated to @@ -54,6 +56,7 @@ if (activity == null) { throw new IllegalArgumentException("Context is not and does not wrap an Activity"); } + mListenToActivityState = listenToActivityState; if (listenToActivityState) { ApplicationStatus.registerStateListenerForActivity(this, activity); } @@ -162,20 +165,6 @@ return false; } - /** - * Responds to a pending permission result. - * @param requestCode The unique code for the permission request. - * @param permissions The list of permissions in the result. - * @param grantResults Whether the permissions were granted. - * @return Whether the permission request corresponding to a pending permission request. - */ - public boolean onRequestPermissionsResult(int requestCode, String[] permissions, - int[] grantResults) { - getAndroidPermissionDelegate().onRequestPermissionsResult( - requestCode, permissions, grantResults); - return true; - } - @Override public WeakReference<Activity> getActivity() { return new WeakReference<Activity>(activityFromContext(getContext().get())); @@ -195,6 +184,13 @@ } @Override + @ActivityState + public int getActivityState() { + return mListenToActivityState ? ApplicationStatus.getStateForActivity(getActivity().get()) + : super.getActivityState(); + } + + @Override public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { keyboardVisibilityPossiblyChanged(UiUtils.isKeyboardShowing(getActivity().get(), v));
diff --git a/ui/android/java/src/org/chromium/ui/base/AndroidPermissionDelegate.java b/ui/android/java/src/org/chromium/ui/base/AndroidPermissionDelegate.java index 4eb0411..67b3ccf 100644 --- a/ui/android/java/src/org/chromium/ui/base/AndroidPermissionDelegate.java +++ b/ui/android/java/src/org/chromium/ui/base/AndroidPermissionDelegate.java
@@ -45,10 +45,11 @@ void requestPermissions(String[] permissions, PermissionCallback callback); /** - * Callback for the result from requesting permissions. + * Handle the result from requesting permissions. * @param requestCode The request code passed in requestPermissions. * @param permissions The list of requested permissions. * @param grantResults The grant results for the corresponding permissions. + * @return True if the result was handled. */ - void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults); + boolean handlePermissionResult(int requestCode, String[] permissions, int[] grantResults); }
diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java index d0415da..3c7fe8c 100644 --- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java +++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
@@ -25,6 +25,7 @@ import android.view.Window; import android.view.accessibility.AccessibilityManager; +import org.chromium.base.ActivityState; import org.chromium.base.ApiCompatibilityUtils; import org.chromium.base.Callback; import org.chromium.base.ContextUtils; @@ -46,7 +47,7 @@ * The window base class that has the minimum functionality. */ @JNINamespace("ui") -public class WindowAndroid { +public class WindowAndroid implements AndroidPermissionDelegate { private static final String TAG = "WindowAndroid"; @TargetApi(Build.VERSION_CODES.KITKAT) @@ -265,14 +266,6 @@ } /** - * @return the delegate to interact with the android permissions system, or null if not - * available - */ - public AndroidPermissionDelegate getAndroidPermissionDelegate() { - return mPermissionDelegate; - } - - /** * Set the delegate that will handle android permissions requests. */ @VisibleForTesting @@ -377,6 +370,7 @@ * @return Whether access to the permission is granted. */ @CalledByNative + @Override public final boolean hasPermission(String permission) { if (mPermissionDelegate != null) return mPermissionDelegate.hasPermission(permission); @@ -398,6 +392,7 @@ * @return Whether the requesting the permission is allowed. */ @CalledByNative + @Override public final boolean canRequestPermission(String permission) { if (mPermissionDelegate != null) { return mPermissionDelegate.canRequestPermission(permission); @@ -416,6 +411,7 @@ * @param permission The permission name. * @return Whether the permission is revoked by policy and the user has no ability to change it. */ + @Override public final boolean isPermissionRevokedByPolicy(String permission) { if (mPermissionDelegate != null) { return mPermissionDelegate.isPermissionRevokedByPolicy(permission); @@ -433,6 +429,7 @@ * @param permissions The list of permissions to request access to. * @param callback The callback to be notified whether the permissions were granted. */ + @Override public final void requestPermissions(String[] permissions, PermissionCallback callback) { if (mPermissionDelegate != null) { mPermissionDelegate.requestPermissions(permissions, callback); @@ -443,6 +440,16 @@ assert false : "Failed to request permissions using a WindowAndroid without an Activity"; } + @Override + public boolean handlePermissionResult( + int requestCode, String[] permissions, int[] grantResults) { + if (mPermissionDelegate != null) { + return mPermissionDelegate.handlePermissionResult( + requestCode, permissions, grantResults); + } + return false; + } + /** * Displays an error message with a provided error message string. * @param error The error message string to be displayed. @@ -576,6 +583,15 @@ mActivityStateObservers.removeObserver(observer); } + /** + * @return Current state of the associated {@link Activity}. Can be overriden + * to return the correct state. {@code ActivityState.DESTROYED} by default. + */ + @ActivityState + public int getActivityState() { + return ActivityState.DESTROYED; + } + @CalledByNative private void requestVSyncUpdate() { if (mVSyncPaused) {
diff --git a/ui/aura/BUILD.gn b/ui/aura/BUILD.gn index fd59a7d..d0660a6 100644 --- a/ui/aura/BUILD.gn +++ b/ui/aura/BUILD.gn
@@ -50,6 +50,7 @@ "mus/focus_synchronizer_observer.h", "mus/in_flight_change.h", "mus/input_method_mus.h", + "mus/input_method_mus_delegate.h", "mus/mus_context_factory.h", "mus/mus_mouse_location_updater.h", "mus/mus_types.h",
diff --git a/ui/aura/mus/input_method_mus.cc b/ui/aura/mus/input_method_mus.cc index 5dfb0f21..7d1f500 100644 --- a/ui/aura/mus/input_method_mus.cc +++ b/ui/aura/mus/input_method_mus.cc
@@ -9,9 +9,8 @@ #include "services/ui/public/interfaces/constants.mojom.h" #include "services/ui/public/interfaces/ime/ime.mojom.h" #include "services/ui/public/interfaces/window_tree_constants.mojom.h" +#include "ui/aura/mus/input_method_mus_delegate.h" #include "ui/aura/mus/text_input_client_impl.h" -#include "ui/aura/mus/window_port_mus.h" -#include "ui/aura/window.h" #include "ui/base/ime/text_input_client.h" #include "ui/events/event.h" #include "ui/platform_window/mojo/ime_type_converters.h" @@ -24,9 +23,10 @@ //////////////////////////////////////////////////////////////////////////////// // InputMethodMus, public: -InputMethodMus::InputMethodMus(ui::internal::InputMethodDelegate* delegate, - Window* window) - : window_(window) { +InputMethodMus::InputMethodMus( + ui::internal::InputMethodDelegate* delegate, + InputMethodMusDelegate* input_method_mus_delegate) + : input_method_mus_delegate_(input_method_mus_delegate) { SetDelegate(delegate); } @@ -185,12 +185,11 @@ ui::TextInputType type = GetTextInputType(); ui::mojom::TextInputStatePtr state = ui::mojom::TextInputState::New(); state->type = mojo::ConvertTo<ui::mojom::TextInputType>(type); - if (window_) { - WindowPortMus* window_impl_mus = WindowPortMus::Get(window_); + if (input_method_mus_delegate_) { if (type != ui::TEXT_INPUT_TYPE_NONE) - window_impl_mus->SetImeVisibility(true, std::move(state)); + input_method_mus_delegate_->SetImeVisibility(true, std::move(state)); else - window_impl_mus->SetTextInputState(std::move(state)); + input_method_mus_delegate_->SetTextInputState(std::move(state)); } }
diff --git a/ui/aura/mus/input_method_mus.h b/ui/aura/mus/input_method_mus.h index 8a495646..f47be86 100644 --- a/ui/aura/mus/input_method_mus.h +++ b/ui/aura/mus/input_method_mus.h
@@ -21,15 +21,16 @@ namespace aura { +class InputMethodMusDelegate; class InputMethodMusTestApi; class TextInputClientImpl; -class Window; class AURA_EXPORT InputMethodMus : public ui::InputMethodBase { public: using EventResultCallback = base::OnceCallback<void(ui::mojom::EventResult)>; - InputMethodMus(ui::internal::InputMethodDelegate* delegate, Window* window); + InputMethodMus(ui::internal::InputMethodDelegate* delegate, + InputMethodMusDelegate* input_method_mus_delegate); ~InputMethodMus() override; void Init(service_manager::Connector* connector); @@ -72,9 +73,9 @@ const ui::KeyEvent& event, bool handled); - // The toplevel window which is not owned by this class. This may be null - // for tests. - Window* window_; + // Delegate used to update window related ime state. This may be null in + // tests. + InputMethodMusDelegate* input_method_mus_delegate_; // May be null in tests. ui::mojom::IMEDriverPtr ime_driver_;
diff --git a/ui/aura/mus/input_method_mus_delegate.h b/ui/aura/mus/input_method_mus_delegate.h new file mode 100644 index 0000000..789c590 --- /dev/null +++ b/ui/aura/mus/input_method_mus_delegate.h
@@ -0,0 +1,27 @@ +// Copyright 2018 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_AURA_MUS_INPUT_METHOD_MUS_DELEGATE_H_ +#define UI_AURA_MUS_INPUT_METHOD_MUS_DELEGATE_H_ + +#include "services/ui/public/interfaces/ime/ime.mojom.h" +#include "ui/aura/aura_export.h" + +namespace aura { + +// Used by InputMethodMus to update the ime related state of the associated +// window. +class AURA_EXPORT InputMethodMusDelegate { + public: + virtual void SetTextInputState(ui::mojom::TextInputStatePtr state) = 0; + virtual void SetImeVisibility(bool visible, + ui::mojom::TextInputStatePtr state) = 0; + + protected: + virtual ~InputMethodMusDelegate() {} +}; + +} // namespace aura + +#endif // UI_AURA_MUS_INPUT_METHOD_MUS_DELEGATE_H_
diff --git a/ui/aura/mus/input_method_mus_unittest.cc b/ui/aura/mus/input_method_mus_unittest.cc index db8c7f84..c3c1bd6 100644 --- a/ui/aura/mus/input_method_mus_unittest.cc +++ b/ui/aura/mus/input_method_mus_unittest.cc
@@ -9,7 +9,6 @@ #include "services/ui/public/interfaces/ime/ime.mojom.h" #include "ui/aura/test/aura_test_base.h" #include "ui/aura/test/mus/input_method_mus_test_api.h" -#include "ui/aura/window.h" #include "ui/base/ime/dummy_text_input_client.h" #include "ui/base/ime/input_method_delegate.h" @@ -94,13 +93,11 @@ } // namespace TEST_F(InputMethodMusTest, PendingCallbackRunFromDestruction) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); bool was_event_result_callback_run = false; // Create an InputMethodMus and foward an event to it. { TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); @@ -130,13 +127,11 @@ } TEST_F(InputMethodMusTest, PendingCallbackRunFromOnDidChangeFocusedClient) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); bool was_event_result_callback_run = false; ui::DummyTextInputClient test_input_client; // Create an InputMethodMus and foward an event to it. TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); EventResultCallback callback = base::BindOnce(&RunFunctionWithEventResult, @@ -160,12 +155,10 @@ TEST_F(InputMethodMusTest, PendingCallbackRunFromOnDidChangeFocusedClientToNull) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); bool was_event_result_callback_run = false; // Create an InputMethodMus and foward an event to it. TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); EventResultCallback callback = base::BindOnce(&RunFunctionWithEventResult, @@ -222,13 +215,11 @@ // SetFocusedTextInputClient() is called. This verifies we don't crash in this // scenario and the callback is correctly called. TEST_F(InputMethodMusTest, ChangeTextInputTypeWhileProcessingCallback) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); bool was_event_result_callback_run = false; ui::DummyTextInputClient test_input_client; // Create an InputMethodMus and foward an event to it. TestInputMethodDelegate2 input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); input_method_delegate.SetInputMethodAndClient(&input_method_mus, &test_input_client); TestInputMethod test_input_method; @@ -253,13 +244,11 @@ // Calling OnTextInputTypeChanged from unfocused client should // not trigger OnTextInputTypeChanged on mus side. TEST_F(InputMethodMusTest, ChangeTextInputTypeFromUnfocusedClient) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); ui::DummyTextInputClient focused_input_client; ui::DummyTextInputClient unfocused_input_client; // Create an InputMethodMus and set initial text input client. TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); InputMethodMusTestApi::CallOnDidChangeFocusedClient( @@ -274,13 +263,11 @@ // Calling OnCaretBoundsChanged from unfocused client should // not trigger OnCaretBoundsChanged on mus side. TEST_F(InputMethodMusTest, ChangeCaretBoundsFromUnfocusedClient) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); ui::DummyTextInputClient focused_input_client; ui::DummyTextInputClient unfocused_input_client; // Create an InputMethodMus and set initial text input client. TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); InputMethodMusTestApi::CallOnDidChangeFocusedClient( @@ -295,13 +282,11 @@ // Calling CancelComposition from unfocused client should // not trigger CancelComposition on mus side. TEST_F(InputMethodMusTest, CancelCompositionFromUnfocusedClient) { - aura::Window window(nullptr); - window.Init(ui::LAYER_NOT_DRAWN); ui::DummyTextInputClient focused_input_client; ui::DummyTextInputClient unfocused_input_client; // Create an InputMethodMus and set initial text input client. TestInputMethodDelegate input_method_delegate; - InputMethodMus input_method_mus(&input_method_delegate, &window); + InputMethodMus input_method_mus(&input_method_delegate, nullptr); TestInputMethod test_input_method; InputMethodMusTestApi::SetInputMethod(&input_method_mus, &test_input_method); InputMethodMusTestApi::CallOnDidChangeFocusedClient(
diff --git a/ui/aura/mus/window_tree_host_mus.cc b/ui/aura/mus/window_tree_host_mus.cc index adc3c2a..1fe190d 100644 --- a/ui/aura/mus/window_tree_host_mus.cc +++ b/ui/aura/mus/window_tree_host_mus.cc
@@ -90,7 +90,7 @@ if (!init_params.use_classic_ime) { // NOTE: This creates one InputMethodMus per display, despite the // call to SetSharedInputMethod() below. - input_method_ = std::make_unique<InputMethodMus>(this, window()); + input_method_ = std::make_unique<InputMethodMus>(this, this); input_method_->Init(init_params.window_tree_client->connector()); SetSharedInputMethod(input_method_.get()); } @@ -257,4 +257,13 @@ return display_id_; } +void WindowTreeHostMus::SetTextInputState(ui::mojom::TextInputStatePtr state) { + WindowPortMus::Get(window())->SetTextInputState(std::move(state)); +} + +void WindowTreeHostMus::SetImeVisibility(bool visible, + ui::mojom::TextInputStatePtr state) { + WindowPortMus::Get(window())->SetImeVisibility(visible, std::move(state)); +} + } // namespace aura
diff --git a/ui/aura/mus/window_tree_host_mus.h b/ui/aura/mus/window_tree_host_mus.h index ac4e43804..1ce0eec 100644 --- a/ui/aura/mus/window_tree_host_mus.h +++ b/ui/aura/mus/window_tree_host_mus.h
@@ -14,6 +14,7 @@ #include "services/service_manager/public/cpp/connector.h" #include "services/ui/public/interfaces/window_tree_constants.mojom.h" #include "ui/aura/aura_export.h" +#include "ui/aura/mus/input_method_mus_delegate.h" #include "ui/aura/window_tree_host_platform.h" namespace display { @@ -29,7 +30,8 @@ struct DisplayInitParams; struct WindowTreeHostMusInitParams; -class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform { +class AURA_EXPORT WindowTreeHostMus : public WindowTreeHostPlatform, + public InputMethodMusDelegate { public: explicit WindowTreeHostMus(WindowTreeHostMusInitParams init_params); @@ -110,6 +112,11 @@ gfx::Transform GetRootTransformForLocalEventCoordinates() const override; int64_t GetDisplayId() override; + // InputMethodMusDelegate: + void SetTextInputState(ui::mojom::TextInputStatePtr state) override; + void SetImeVisibility(bool visible, + ui::mojom::TextInputStatePtr state) override; + private: int64_t display_id_;
diff --git a/ui/base/ui_base_features.cc b/ui/base/ui_base_features.cc index 29a7b820..5d36b9d 100644 --- a/ui/base/ui_base_features.cc +++ b/ui/base/ui_base_features.cc
@@ -46,15 +46,7 @@ // Applies the material design mode to elements throughout Chrome (not just top // Chrome). const base::Feature kSecondaryUiMd = {"SecondaryUiMd", -// Enabled by default on Windows, Mac and Desktop Linux. -// http://crbug.com/775847. -#if defined(OS_WIN) || defined(OS_MACOSX) || \ - (defined(OS_LINUX) && !defined(OS_CHROMEOS)) - base::FEATURE_ENABLED_BY_DEFAULT -#else - base::FEATURE_DISABLED_BY_DEFAULT -#endif -}; + base::FEATURE_ENABLED_BY_DEFAULT}; // Allows system keyboard event capture when |features::kKeyboardLockApi| is on. const base::Feature kSystemKeyboardLock{"SystemKeyboardLock",
diff --git a/ui/file_manager/audio_player/elements/BUILD.gn b/ui/file_manager/audio_player/elements/BUILD.gn index 1b3a658..3b3a504 100644 --- a/ui/file_manager/audio_player/elements/BUILD.gn +++ b/ui/file_manager/audio_player/elements/BUILD.gn
@@ -7,6 +7,7 @@ js_type_check("closure_compile") { deps = [ ":audio_player", + ":closure_compile_externs", ":control_panel", ":repeat_button", ":track_info_panel", @@ -14,6 +15,11 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [] +} + js_library("audio_player") { deps = [ ":control_panel",
diff --git a/ui/file_manager/audio_player/js/BUILD.gn b/ui/file_manager/audio_player/js/BUILD.gn index 300f780..4130979 100644 --- a/ui/file_manager/audio_player/js/BUILD.gn +++ b/ui/file_manager/audio_player/js/BUILD.gn
@@ -8,11 +8,29 @@ deps = [ ":audio_player", ":background", + ":closure_compile_externs", ":error_util", ":metadata_worker", ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "../../externs/audio_player_foreground.js", + "../../externs/entry_location.js", + "../../externs/platform.js", + "../../externs/volume_info.js", + "../../externs/volume_info_list.js", + "../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("audio_player") { deps = [ "../../file_manager/common/js:util", @@ -22,10 +40,6 @@ "../elements:audio_player", "../elements:track_list", ] - externs_list = [ - "../../externs/audio_player_foreground.js", - "$externs_path/file_manager_private.js", - ] } js_library("background") {
diff --git a/ui/file_manager/file_manager/background/js/BUILD.gn b/ui/file_manager/file_manager/background/js/BUILD.gn index f0edfd6..60fdb2a 100644 --- a/ui/file_manager/file_manager/background/js/BUILD.gn +++ b/ui/file_manager/file_manager/background/js/BUILD.gn
@@ -10,6 +10,7 @@ ":app_windows", ":background", ":background_base", + ":closure_compile_externs", ":device_handler", ":drive_sync_handler", ":duplicate_finder", @@ -34,20 +35,40 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "../../../externs/background/file_browser_background.js", + "../../../externs/background/file_browser_background_full.js", + "../../../externs/background/import_history.js", + "../../../externs/background/import_runner.js", + "../../../externs/background/media_scanner.js", + "../../../externs/background_window.js", + "../../../externs/css_rule.js", + "../../../externs/entry_location.js", + "../../../externs/file_operation_progress_event.js", + "../../../externs/launcher_search_provider.js", + "../../../externs/platform.js", + "../../../externs/volume_info.js", + "../../../externs/volume_info_list.js", + "../../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("app_window_wrapper") { deps = [ ":app_windows", "../../common/js:async_util", "../../common/js:util", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("app_windows") { - externs_list = [ - "../../../externs/app_window_common.js", - "$externs_path/chrome_extensions.js", - ] } js_library("background") { @@ -68,11 +89,6 @@ "../../common/js:util", "../../common/js:volume_manager_common", ] - externs_list = [ - "../../../externs/background/file_browser_background_full.js", - "../../../externs/volume_manager.js", - "$externs_path/chrome_extensions.js", - ] } js_library("background_base") { @@ -83,7 +99,6 @@ "//ui/webui/resources/js:assert", "//ui/webui/resources/js:load_time_data", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("device_handler") { @@ -94,10 +109,6 @@ "//ui/webui/resources/js:cr", "//ui/webui/resources/js/cr:event_target", ] - externs_list = [ - "$externs_path/chrome_extensions.js", - "$externs_path/file_manager_private.js", - ] } js_library("drive_sync_handler") { @@ -114,18 +125,12 @@ "../../common/js:lru_cache", "../../common/js:metrics", ] - externs_list = [ - "//third_party/analytics/externs.js", - "../../../externs/volume_manager.js", - "$externs_path/file_manager_private.js", - ] } js_library("entry_location_impl") { deps = [ "../../common/js:volume_manager_common", ] - externs_list = [ "../../../externs/entry_location.js" ] } js_library("file_operation_handler") { @@ -142,7 +147,6 @@ ":volume_manager_factory", "//ui/webui/resources/js:cr", ] - externs_list = [ "../../../externs/volume_manager.js" ] } js_library("file_operation_util") { @@ -151,7 +155,6 @@ "../../common/js:async_util", "../../common/js:util", ] - externs_list = [ "../../../externs/file_operation_progress_event.js" ] } js_library("metadata_proxy") { @@ -168,7 +171,6 @@ "../../common/js:metrics_events", "../../common/js:util", ] - externs_list = [ "../../../externs/background/import_history.js" ] } js_library("launcher") { @@ -185,10 +187,6 @@ "../../common/js:file_type", "../../common/js:util", ] - externs_list = [ - "../../../externs/launcher_search_provider.js", - "$externs_path/file_manager_private.js", - ] } js_library("media_import_handler") { @@ -201,7 +199,6 @@ "../../common/js:importer_common", "../../common/js:metrics", ] - externs_list = [ "../../../externs/background/import_runner.js" ] } js_library("media_scanner") { @@ -209,11 +206,6 @@ ":file_operation_util", "../../common/js:importer_common", ] - externs_list = [ - "../../../externs/platform.js", - "../../../externs/background/media_scanner.js", - "$externs_path/file_manager_private.js", - ] } js_library("mock_volume_manager") { @@ -223,12 +215,6 @@ ":volume_manager_factory", "../../common/js:mock_entry", ] - externs_list = [ - "../../../externs/entry_location.js", - "../../../externs/volume_info_list.js", - "../../../externs/volume_info.js", - "../../../externs/volume_manager.js", - ] } js_library("progress_center") { @@ -238,7 +224,6 @@ "../../common/js:util", "../../foreground/js/ui:progress_center_panel", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("task_queue") { @@ -252,11 +237,6 @@ deps = [ "../../common/js:volume_manager_common", ] - externs_list = [ - "../../../externs/platform.js", - "../../../externs/volume_info.js", - "$externs_path/command_line_private.js", - ] } js_library("volume_info_list_impl") { @@ -267,10 +247,6 @@ "//ui/webui/resources/js/cr:ui", "//ui/webui/resources/js/cr/ui:array_data_model", ] - externs_list = [ - "../../../externs/volume_info.js", - "../../../externs/volume_info_list.js", - ] } js_library("volume_manager_impl") { @@ -280,14 +256,12 @@ ":volume_manager_util", "../../common/js:async_util", ] - externs_list = [ "../../../externs/volume_manager.js" ] } js_library("volume_manager_factory") { deps = [ ":volume_manager_impl", ] - externs_list = [ "../../../externs/volume_manager.js" ] } js_library("volume_manager_util") {
diff --git a/ui/file_manager/file_manager/common/js/BUILD.gn b/ui/file_manager/file_manager/common/js/BUILD.gn index 3937d63..cbf90af 100644 --- a/ui/file_manager/file_manager/common/js/BUILD.gn +++ b/ui/file_manager/file_manager/common/js/BUILD.gn
@@ -7,6 +7,7 @@ js_type_check("closure_compile") { deps = [ ":async_util", + ":closure_compile_externs", ":error_util", ":file_type", ":importer_common", @@ -21,6 +22,23 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "../../../externs/app_window_common.js", + "../../../externs/background/file_browser_background.js", + "../../../externs/background_window.js", + "../../../externs/entry_location.js", + "../../../externs/platform.js", + "../../../externs/volume_info.js", + "//third_party/analytics/externs.js", + ] +} + js_library("async_util") { } @@ -35,13 +53,6 @@ ":file_type", ":volume_manager_common", ] - externs_list = [ - "../../../externs/background_window.js", - "../../../externs/background/file_browser_background.js", - "//third_party/analytics/externs.js", - "$externs_path/chrome_extensions.js", - "$externs_path/command_line_private.js", - ] } js_library("lru_cache") { @@ -52,22 +63,15 @@ ":metrics_base", "//ui/webui/resources/js:assert", ] - externs_list = [ - "$externs_path/file_manager_private.js", - "$externs_path/chrome_extensions.js", - "//third_party/analytics/externs.js", - ] } js_library("metrics_base") { - externs_list = [ "$externs_path/metrics_private.js" ] } js_library("metrics_events") { deps = [ ":metrics_base", ] - externs_list = [ "//third_party/analytics/externs.js" ] } js_library("mock_entry") { @@ -88,19 +92,10 @@ "//ui/webui/resources/js/cr:event_target", "//ui/webui/resources/js/cr:ui", ] - externs_list = [ - "../../../externs/app_window_common.js", - "../../../externs/entry_location.js", - "../../../externs/platform.js", - "$externs_path/chrome_extensions.js", - "$externs_path/command_line_private.js", - "$externs_path/file_manager_private.js", - ] } js_library("volume_manager_common") { deps = [ "//ui/webui/resources/js:assert", ] - externs_list = [ "../../../externs/volume_info.js" ] }
diff --git a/ui/file_manager/file_manager/foreground/elements/BUILD.gn b/ui/file_manager/file_manager/foreground/elements/BUILD.gn index cb0aa4b..d30d015f 100644 --- a/ui/file_manager/file_manager/foreground/elements/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/elements/BUILD.gn
@@ -6,6 +6,7 @@ js_type_check("closure_compile") { deps = [ + ":closure_compile_externs", ":files_icon_button", ":files_metadata_box", ":files_metadata_entry", @@ -19,6 +20,15 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/web_animations.js", + "../../../externs/webview_tag.js", + ] +} + js_library("files_icon_button") { deps = [ "//third_party/polymer/v1_0/components-chromium/iron-behaviors:iron-button-state-extracted", @@ -36,17 +46,12 @@ deps = [ ":files_metadata_box", ] - externs_list = [ - "../../../externs/webview_tag.js", - "$externs_path/chrome_extensions.js", - ] } js_library("files_ripple") { deps = [ "//ui/webui/resources/js:assert", ] - externs_list = [ "$externs_path/web_animations.js" ] } js_library("files_safe_media") { @@ -56,11 +61,9 @@ } js_library("files_toast") { - externs_list = [ "$externs_path/web_animations.js" ] } js_library("files_toggle_ripple") { - externs_list = [ "$externs_path/web_animations.js" ] } js_library("files_tooltip") {
diff --git a/ui/file_manager/file_manager/foreground/js/BUILD.gn b/ui/file_manager/file_manager/foreground/js/BUILD.gn index 9f34ba6..e5273ea 100644 --- a/ui/file_manager/file_manager/foreground/js/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/BUILD.gn
@@ -9,6 +9,7 @@ ":actions_controller", ":actions_model", ":app_state_controller", + ":closure_compile_externs", ":column_visibility_controller", ":constants", ":dialog_action_controller", @@ -62,6 +63,46 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "$externs_path/web_animations.js", + "../../../externs/app_window_common.js", + "../../../externs/background/drive_sync_handler.js", + "../../../externs/background/file_browser_background.js", + "../../../externs/background/file_browser_background_full.js", + "../../../externs/background/file_operation_manager.js", + "../../../externs/background/import_history.js", + "../../../externs/background/import_history_enum.js", + "../../../externs/background/import_runner.js", + "../../../externs/background/media_import_handler.js", + "../../../externs/background/media_scanner.js", + "../../../externs/background/progress_center.js", + "../../../externs/background/volume_manager_factory.js", + "../../../externs/background_window.js", + "../../../externs/chrome_echo_private.js", + "../../../externs/chrome_webstore_widget_private.js", + "../../../externs/command_handler_deps.js", + "../../../externs/css_rule.js", + "../../../externs/directory_change_event.js", + "../../../externs/drag_target.js", + "../../../externs/entries_changed_event.js", + "../../../externs/entry_location.js", + "../../../externs/gallery_foreground.js", + "../../../externs/menu_item_update_event.js", + "../../../externs/paper_elements.js", + "../../../externs/platform.js", + "../../../externs/search_item.js", + "../../../externs/volume_info.js", + "../../../externs/volume_info_list.js", + "../../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("actions_controller") { deps = [ ":actions_model", @@ -84,10 +125,6 @@ "ui:share_dialog", "//ui/webui/resources/js:cr", ] - externs_list = [ - "../../../externs/background/drive_sync_handler.js", - "$externs_path/file_manager_private.js", - ] } js_library("app_state_controller") { @@ -140,7 +177,6 @@ "//ui/webui/resources/js:cr", "//ui/webui/resources/js/cr/ui:array_data_model", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("directory_model") { @@ -152,10 +188,6 @@ "../../common/js:metrics_events", "ui:file_list_selection_model", ] - externs_list = [ - "../../../externs/background/file_operation_manager.js", - "../../../externs/entries_changed_event.js", - ] } js_library("navigation_uma") { @@ -179,7 +211,6 @@ } js_library("elements_importer") { - externs_list = [ "$externs_path/metrics_private.js" ] } js_library("empty_folder_controller") { @@ -236,18 +267,6 @@ "ui:file_manager_ui", "//ui/webui/resources/js/cr/ui:list_selection_model", ] - externs_list = [ - "../../../externs/background/drive_sync_handler.js", - "../../../externs/background/file_browser_background_full.js", - "../../../externs/background/file_operation_manager.js", - "../../../externs/background/import_history.js", - "../../../externs/background/import_history_enum.js", - "../../../externs/background/import_runner.js", - "../../../externs/background/media_import_handler.js", - "../../../externs/background/media_scanner.js", - "../../../externs/background/progress_center.js", - "../../../externs/background_window.js", - ] } js_library("file_manager_commands") { @@ -267,11 +286,6 @@ "ui:directory_tree", "ui:file_manager_ui", ] - externs_list = [ - "../../../externs/background_window.js", - "../../../externs/command_handler_deps.js", - "../../../externs/background/file_operation_manager.js", - ] } js_library("file_selection") { @@ -287,7 +301,6 @@ "//ui/webui/resources/js:assert", "//ui/webui/resources/js:cr", ] - externs_list = [ "../../../externs/background/file_operation_manager.js" ] } js_library("file_tasks") { @@ -316,10 +329,6 @@ "ui:multi_profile_share_dialog", "ui:progress_center_panel", ] - externs_list = [ - "../../../externs/background/file_operation_manager.js", - "../../../externs/background/progress_center.js", - ] } js_library("file_watcher") { @@ -329,7 +338,6 @@ "../../common/js:volume_manager_common", "//ui/webui/resources/js:assert", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("folder_shortcuts_data_model") { @@ -340,7 +348,6 @@ "../../common/js:util", "../../common/js:volume_manager_common", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("gear_menu_controller") { @@ -351,7 +358,6 @@ "ui:gear_menu", "//ui/webui/resources/js/cr/ui:context_menu_button", ] - externs_list = [ "../../../externs/directory_change_event.js" ] } js_library("import_controller") { @@ -369,12 +375,6 @@ "ui:directory_tree", "ui:file_manager_ui", ] - externs_list = [ - "../../../externs/background/import_runner.js", - "../../../externs/background/media_import_handler.js", - "../../../externs/background/media_scanner.js", - "../../../externs/command_handler_deps.js", - ] } js_library("last_modified_controller") { @@ -422,7 +422,6 @@ ":volume_manager_wrapper", "ui:file_manager_ui", ] - externs_list = [ "../../../externs/directory_change_event.js" ] } js_library("metadata_box_controller") { @@ -434,7 +433,6 @@ "metadata:metadata_model", "ui:file_metadata_formatter", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("metadata_update_controller") { @@ -472,7 +470,6 @@ "//ui/webui/resources/js/cr:event_target", "//ui/webui/resources/js/cr/ui:array_data_model", ] - externs_list = [ "../../../externs/volume_info.js" ] } js_library("progress_center_item_group") { @@ -487,7 +484,6 @@ ":volume_manager_wrapper", "//ui/webui/resources/js:assert", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("quick_view_controller") { @@ -538,7 +534,6 @@ "ui:location_line", "ui:search_box", ] - externs_list = [ "../../../externs/volume_manager.js" ] } js_library("selection_menu_controller") { @@ -554,15 +549,6 @@ "../../common/js:volume_manager_common", "//ui/webui/resources/js/cr:event_target", ] - externs_list = [ - "../../../externs/entry_location.js", - "../../../externs/gallery_foreground.js", - "../../../externs/volume_info.js", - "../../../externs/volume_info_list.js", - "../../../externs/volume_manager.js", - "../../../externs/webview_tag.js", - "$externs_path/chrome_extensions.js", - ] } js_library("sort_menu_controller") { @@ -597,7 +583,6 @@ deps = [ "//ui/webui/resources/js/cr:event_target", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("thumbnail_loader") { @@ -627,14 +612,6 @@ "//ui/webui/resources/js/cr:event_target", "//ui/webui/resources/js/cr/ui:array_data_model", ] - externs_list = [ - "../../../externs/background/volume_manager_factory.js", - "../../../externs/entry_location.js", - "../../../externs/volume_info.js", - "../../../externs/volume_info_list.js", - "../../../externs/volume_manager.js", - "$externs_path/chrome_extensions.js", - ] } js_library("web_store_utils") {
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn index b027451..651f025 100644 --- a/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/metadata/BUILD.gn
@@ -7,6 +7,7 @@ js_type_check("closure_compile") { deps = [ ":byte_reader", + ":closure_compile_externs", ":content_metadata_provider", ":exif_constants", ":exif_parser", @@ -31,6 +32,21 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "../../../../externs/app_window_common.js", + "../../../../externs/entry_location.js", + "../../../../externs/exif_entry.js", + "../../../../externs/metadata_worker_window.js", + "../../../../externs/platform.js", + "../../../../externs/volume_info.js", + ] +} + js_library("byte_reader") { } @@ -40,7 +56,6 @@ "../../../common/js:file_type", "../../../common/js:util", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("exif_constants") { @@ -52,14 +67,12 @@ ":image_parsers", ":metadata_parser", ] - externs_list = [ "../../../../externs/exif_entry.js" ] } js_library("external_metadata_provider") { deps = [ ":metadata_provider", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("file_system_metadata_provider") { @@ -120,10 +133,6 @@ deps = [ ":metadata_parser", ] - externs_list = [ - "../../../../externs/metadata_worker_window.js", - "../../../../externs/platform.js", - ] } js_library("metadata_item") { @@ -146,7 +155,6 @@ deps = [ ":byte_reader", ] - externs_list = [ "../../../../externs/metadata_worker_window.js" ] } js_library("metadata_provider") {
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/exif_parser.js b/ui/file_manager/file_manager/foreground/js/metadata/exif_parser.js index a7f9b88..d969dad 100644 --- a/ui/file_manager/file_manager/foreground/js/metadata/exif_parser.js +++ b/ui/file_manager/file_manager/foreground/js/metadata/exif_parser.js
@@ -4,13 +4,21 @@ /** * Protocol + host parts of extension URL. + * + * The __FILE_NAME suffix is because the same string constant is used in + * multiple JS files, and JavaScript doesn't have C's #define mechanism (which + * only affects the file its in). Without the suffix, we'd have "constant + * FILE_MANAGER_HOST assigned a value more than once" compiler warnings. + * * @type {string} * @const */ -var FILE_MANAGER_HOST = 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; +var FILE_MANAGER_HOST__EXIF_PARSER = + 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; importScripts( - FILE_MANAGER_HOST + '/foreground/js/metadata/exif_constants.js'); + FILE_MANAGER_HOST__EXIF_PARSER + + '/foreground/js/metadata/exif_constants.js'); function ExifParser(parent) { ImageParser.call(this, parent, 'jpeg', /\.jpe?g$/i); @@ -311,8 +319,9 @@ * @param {boolean=} opt_signed */ function unsafeRead(size, opt_readFunction, opt_signed) { - var readFunction = opt_readFunction || - function(size) { return br.readScalar(size, opt_signed) }; + var readFunction = opt_readFunction || function(size) { + return br.readScalar(size, opt_signed); + }; var totalSize = tag.componentCount * size; if (totalSize < 1) {
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/id3_parser.js b/ui/file_manager/file_manager/foreground/js/metadata/id3_parser.js index 302bc5e..1583056 100644 --- a/ui/file_manager/file_manager/foreground/js/metadata/id3_parser.js +++ b/ui/file_manager/file_manager/foreground/js/metadata/id3_parser.js
@@ -4,15 +4,24 @@ /** * Protocol + host parts of extension URL. + * + * The __FILE_NAME suffix is because the same string constant is used in + * multiple JS files, and JavaScript doesn't have C's #define mechanism (which + * only affects the file its in). Without the suffix, we'd have "constant + * FILE_MANAGER_HOST assigned a value more than once" compiler warnings. + * * @type {string} * @const */ -var FILE_MANAGER_HOST = 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; +var FILE_MANAGER_HOST__ID3_PARSER = + 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; importScripts( - FILE_MANAGER_HOST + '/foreground/js/metadata/function_sequence.js'); + FILE_MANAGER_HOST__ID3_PARSER + + '/foreground/js/metadata/function_sequence.js'); importScripts( - FILE_MANAGER_HOST + '/foreground/js/metadata/function_parallel.js'); + FILE_MANAGER_HOST__ID3_PARSER + + '/foreground/js/metadata/function_parallel.js'); /** * ID3 parser.
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_dispatcher.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_dispatcher.js index 8c6dae56..a385bf63 100644 --- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_dispatcher.js +++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_dispatcher.js
@@ -4,16 +4,27 @@ /** * Protocol + host parts of extension URL. + * + * The __FILE_NAME suffix is because the same string constant is used in + * multiple JS files, and JavaScript doesn't have C's #define mechanism (which + * only affects the file its in). Without the suffix, we'd have "constant + * FILE_MANAGER_HOST assigned a value more than once" compiler warnings. + * * @type {string} * @const */ -var FILE_MANAGER_HOST = 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; +var FILE_MANAGER_HOST__METADATA_DISPATCHER = + 'chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj'; // All of these scripts could be imported with a single call to importScripts, // but then load and compile time errors would all be reported from the same // line. -importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/metadata_parser.js'); -importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/byte_reader.js'); +importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/metadata_parser.js'); +importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/byte_reader.js'); /** * Dispatches metadata requests to the correct parser. @@ -29,10 +40,18 @@ // Make sure to update component_extension_resources.grd // when adding new parsers. - importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/exif_parser.js'); - importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/image_parsers.js'); - importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/mpeg_parser.js'); - importScripts(FILE_MANAGER_HOST + '/foreground/js/metadata/id3_parser.js'); + importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/exif_parser.js'); + importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/image_parsers.js'); + importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/mpeg_parser.js'); + importScripts( + FILE_MANAGER_HOST__METADATA_DISPATCHER + + '/foreground/js/metadata/id3_parser.js'); var patterns = [];
diff --git a/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn b/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn index d2f3d30..beb0f02 100644 --- a/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn +++ b/ui/file_manager/file_manager/foreground/js/ui/BUILD.gn
@@ -8,6 +8,7 @@ deps = [ ":actions_submenu", ":banners", + ":closure_compile_externs", ":combobutton", ":commandbutton", ":default_task_dialog", @@ -39,6 +40,39 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "$externs_path/web_animations.js", + "../../../../externs/app_window_common.js", + "../../../../externs/background/drive_sync_handler.js", + "../../../../externs/background/file_browser_background.js", + "../../../../externs/background/file_operation_manager.js", + "../../../../externs/background/import_history.js", + "../../../../externs/background/import_history_enum.js", + "../../../../externs/background/volume_manager_factory.js", + "../../../../externs/background_window.js", + "../../../../externs/chrome_echo_private.js", + "../../../../externs/chrome_webstore_widget_private.js", + "../../../../externs/css_rule.js", + "../../../../externs/drag_target.js", + "../../../../externs/entries_changed_event.js", + "../../../../externs/entry_location.js", + "../../../../externs/gallery_foreground.js", + "../../../../externs/menu_item_update_event.js", + "../../../../externs/paper_elements.js", + "../../../../externs/platform.js", + "../../../../externs/search_item.js", + "../../../../externs/volume_info.js", + "../../../../externs/volume_info_list.js", + "../../../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("actions_submenu") { deps = [ "..:actions_model", @@ -57,11 +91,6 @@ "//ui/webui/resources/js:assert", "//ui/webui/resources/js/cr:event_target", ] - externs_list = [ - "../../../../externs/chrome_echo_private.js", - "$externs_path/chrome_extensions.js", - "$externs_path/file_manager_private.js", - ] } js_library("combobutton") { @@ -111,10 +140,6 @@ "//ui/webui/resources/js/cr/ui:menu", "//ui/webui/resources/js/cr/ui:tree", ] - externs_list = [ - "../../../../externs/background/file_operation_manager.js", - "../../../../externs/menu_item_update_event.js", - ] } js_library("drag_selector") { @@ -122,7 +147,6 @@ "//ui/webui/resources/js/cr:ui", "//ui/webui/resources/js/cr/ui:list", ] - externs_list = [ "../../../../externs/drag_target.js" ] } js_library("empty_folder") { @@ -149,10 +173,6 @@ "../metadata:metadata_model", "//ui/webui/resources/js/cr/ui:grid", ] - externs_list = [ - "../../../../externs/background/import_history.js", - "../../../../externs/background/import_history_enum.js", - ] } js_library("file_list_selection_model") { @@ -168,7 +188,6 @@ "//ui/webui/resources/js/cr:ui", "//ui/webui/resources/js/cr/ui:dialogs", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("file_manager_ui") { @@ -224,10 +243,6 @@ "//ui/webui/resources/js:cr", "//ui/webui/resources/js/cr/ui:table", ] - externs_list = [ - "../../../../externs/background/import_history.js", - "../../../../externs/background/import_history_enum.js", - ] } js_library("file_table_list") { @@ -266,10 +281,6 @@ "//ui/webui/resources/js/cr/ui:menu", "//ui/webui/resources/js/cr/ui:menu_item", ] - externs_list = [ - "../../../../externs/paper_elements.js", - "$externs_path/web_animations.js", - ] } js_library("gear_menu") { @@ -293,10 +304,6 @@ "../../../common/js:util", "../../../common/js:volume_manager_common", ] - externs_list = [ - "../../../../externs/platform.js", - "../../../../externs/volume_manager.js", - ] } js_library("multi_profile_share_dialog") { @@ -304,7 +311,6 @@ ":file_manager_dialog_base", "../../../common/js:util", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("progress_center_panel") { @@ -312,7 +318,6 @@ "..:progress_center_item_group", "../../../common/js:progress_center_common", ] - externs_list = [ "../../../../externs/css_rule.js" ] } js_library("providers_menu") { @@ -323,7 +328,6 @@ "//ui/webui/resources/js/cr/ui:menu", "//ui/webui/resources/js/cr/ui:position_util", ] - externs_list = [ "../../../../externs/menu_item_update_event.js" ] } js_library("search_box") { @@ -338,7 +342,6 @@ "//ui/webui/resources/js/cr:ui", "//ui/webui/resources/js/cr/ui:autocomplete_list", ] - externs_list = [ "../../../../externs/search_item.js" ] } js_library("share_dialog") { @@ -348,7 +351,6 @@ "../../../common/js:async_util", "../../../common/js:util", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("suggest_apps_dialog") { @@ -363,8 +365,4 @@ "../../../common/js:volume_manager_common", "//components/chrome_apps/webstore_widget/cws_widget:cws_widget_container", ] - externs_list = [ - "../../../../externs/chrome_webstore_widget_private.js", - "$externs_path/file_manager_private.js", - ] }
diff --git a/ui/file_manager/gallery/js/BUILD.gn b/ui/file_manager/gallery/js/BUILD.gn index 23fa7a7..f6b28d1 100644 --- a/ui/file_manager/gallery/js/BUILD.gn +++ b/ui/file_manager/gallery/js/BUILD.gn
@@ -7,6 +7,7 @@ js_type_check("closure_compile") { deps = [ ":background", + ":closure_compile_externs", ":dimmable_ui_controller", ":entry_list_watcher", ":error_banner", @@ -22,6 +23,25 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "$externs_path/web_animations.js", + "../../externs/entry_location.js", + "../../externs/paper_elements.js", + "../../externs/platform.js", + "../../externs/volume_info.js", + "../../externs/volume_info_list.js", + "../../externs/volume_manager.js", + "../../externs/webview_tag.js", + "//third_party/analytics/externs.js", + ] +} + js_library("background") { deps = [ "../../file_manager/background/js:app_window_wrapper", @@ -36,7 +56,6 @@ "image_editor:image_editor_prompt", "//ui/webui/resources/js:assert", ] - externs_list = [ "$externs_path/chrome_extensions.js" ] } js_library("entry_list_watcher") { @@ -44,10 +63,6 @@ "//ui/webui/resources/js:assert", "//ui/webui/resources/js/cr/ui:array_data_model", ] - externs_list = [ - "../../externs/platform.js", - "$externs_path/file_manager_private.js", - ] } js_library("error_banner") { @@ -68,7 +83,6 @@ "../../gallery/js:slide_mode", "//ui/webui/resources/js:i18n_template_no_process", ] - externs_list = [ "../../externs/volume_manager.js" ] } js_library("gallery_constants") { @@ -119,7 +133,6 @@ "//ui/webui/resources/js/cr/ui:array_data_model", "//ui/webui/resources/js/cr/ui:list_selection_model", ] - externs_list = [ "../../externs/gallery_event.js" ] } js_library("slide_mode") { @@ -141,10 +154,6 @@ "image_editor:viewport", "//third_party/polymer/v1_0/components-chromium/paper-progress:paper-progress-extracted", ] - externs_list = [ - "$externs_path/chrome_extensions.js", - "../../externs/gallery_foreground.js", - ] } js_library("thumbnail_mode") {
diff --git a/ui/file_manager/gallery/js/image_editor/BUILD.gn b/ui/file_manager/gallery/js/image_editor/BUILD.gn index 16073855..396ee4aa 100644 --- a/ui/file_manager/gallery/js/image_editor/BUILD.gn +++ b/ui/file_manager/gallery/js/image_editor/BUILD.gn
@@ -6,6 +6,7 @@ js_type_check("closure_compile") { deps = [ + ":closure_compile_externs", ":commands", ":exif_encoder", ":filter", @@ -26,6 +27,27 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "$externs_path/web_animations.js", + "../../../externs/app_window_common.js", + "../../../externs/background/volume_manager_factory.js", + "../../../externs/entry_location.js", + "../../../externs/exif_entry.js", + "../../../externs/paper_elements.js", + "../../../externs/platform.js", + "../../../externs/volume_info.js", + "../../../externs/volume_info_list.js", + "../../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("commands") { deps = [ ":filter", @@ -43,7 +65,6 @@ "../../../file_manager/foreground/js/metadata:exif_constants", "../../../file_manager/foreground/js/metadata:metadata_item", ] - externs_list = [ "../../../externs/exif_entry.js" ] } js_library("filter") { @@ -99,7 +120,6 @@ "../../../file_manager/common/js:util", "../../../file_manager/foreground/elements:files_tooltip", ] - externs_list = [ "../../../externs/paper_elements.js" ] } js_library("image_encoder") {
diff --git a/ui/file_manager/image_loader/BUILD.gn b/ui/file_manager/image_loader/BUILD.gn index 8e72cf5..2975ff0 100644 --- a/ui/file_manager/image_loader/BUILD.gn +++ b/ui/file_manager/image_loader/BUILD.gn
@@ -8,6 +8,7 @@ deps = [ ":background", ":cache", + ":closure_compile_externs", ":image_loader", ":image_loader_client", ":image_loader_util", @@ -17,6 +18,16 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/file_manager_private.js", + "$externs_path/metrics_private.js", + "//third_party/analytics/externs.js", + ] +} + js_library("background") { deps = [ ":image_loader", @@ -33,10 +44,6 @@ ":request", ":scheduler", ] - externs_list = [ - "$externs_path/chrome_extensions.js", - "$externs_path/file_manager_private.js", - ] } js_library("image_loader_util") { @@ -44,24 +51,18 @@ ":piex_loader", "//ui/webui/resources/js:assert", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("image_loader_client") { deps = [ "../file_manager/common/js:lru_cache", ] - externs_list = [ - "$externs_path/chrome_extensions.js", - "$externs_path/metrics_private.js", - ] } js_library("piex_loader") { deps = [ "../file_manager/foreground/js/metadata:image_orientation", ] - externs_list = [ "$externs_path/file_manager_private.js" ] } js_library("request") {
diff --git a/ui/file_manager/video_player/js/BUILD.gn b/ui/file_manager/video_player/js/BUILD.gn index 3fe8cc7..deeeec4 100644 --- a/ui/file_manager/video_player/js/BUILD.gn +++ b/ui/file_manager/video_player/js/BUILD.gn
@@ -7,6 +7,7 @@ js_type_check("closure_compile") { deps = [ ":background", + ":closure_compile_externs", ":error_util", ":media_controls", ":video_player", @@ -14,6 +15,24 @@ ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/media_player_private.js", + "$externs_path/metrics_private.js", + "../../externs/chrome_cast.js", + "../../externs/entry_location.js", + "../../externs/platform.js", + "../../externs/volume_info.js", + "../../externs/volume_info_list.js", + "../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("background") { deps = [ ":error_util", @@ -31,7 +50,6 @@ "//third_party/polymer/v1_0/components-chromium/paper-slider:paper-slider-extracted", "//ui/webui/resources/js/cr/ui:menu_button", ] - externs_list = [ "$externs_path/media_player_private.js" ] } js_library("video_player") { @@ -50,7 +68,6 @@ "//ui/webui/resources/js/cr/ui:menu", "//ui/webui/resources/js/cr/ui:menu_item", ] - externs_list = [ "../../externs/chrome_cast.js" ] } js_library("video_player_metrics") {
diff --git a/ui/file_manager/video_player/js/cast/BUILD.gn b/ui/file_manager/video_player/js/cast/BUILD.gn index fd7335e0..2d10b23 100644 --- a/ui/file_manager/video_player/js/cast/BUILD.gn +++ b/ui/file_manager/video_player/js/cast/BUILD.gn
@@ -9,10 +9,31 @@ ":cast_extension_discoverer", ":cast_video_element", ":caster", + ":closure_compile_externs", ":media_manager", ] } +js_library("closure_compile_externs") { + sources = [] + externs_list = [ + "$externs_path/chrome_extensions.js", + "$externs_path/command_line_private.js", + "$externs_path/file_manager_private.js", + "$externs_path/media_player_private.js", + "$externs_path/metrics_private.js", + "../../../externs/app_window_common.js", + "../../../externs/background/volume_manager_factory.js", + "../../../externs/chrome_cast.js", + "../../../externs/entry_location.js", + "../../../externs/platform.js", + "../../../externs/volume_info.js", + "../../../externs/volume_info_list.js", + "../../../externs/volume_manager.js", + "//third_party/analytics/externs.js", + ] +} + js_library("cast_extension_discoverer") { deps = [ "..:error_util", @@ -26,10 +47,6 @@ "..:video_player_metrics", "//ui/webui/resources/js/cr:event_target", ] - externs_list = [ - "../../../externs/chrome_cast.js", - "../../../externs/platform.js", - ] } js_library("caster") { @@ -37,9 +54,7 @@ ":cast_extension_discoverer", "..:video_player", ] - externs_list = [ "../../../externs/chrome_cast.js" ] } js_library("media_manager") { - externs_list = [ "$externs_path/file_manager_private.js" ] }
diff --git a/ui/login/display_manager.js b/ui/login/display_manager.js index ca22fefc..74e2c6e 100644 --- a/ui/login/display_manager.js +++ b/ui/login/display_manager.js
@@ -847,6 +847,12 @@ screen.classList.remove('right'); screen.classList.remove('left'); } + if (this.showingViewsLogin) { + // Hide the shelf and version info because these should be displayed in + // views. + $('login-header-bar').hidden = true; + $('top-header-bar').hidden = true; + } }, /**
diff --git a/ui/views/controls/button/menu_button_unittest.cc b/ui/views/controls/button/menu_button_unittest.cc index e12bae6e..969b67c8 100644 --- a/ui/views/controls/button/menu_button_unittest.cc +++ b/ui/views/controls/button/menu_button_unittest.cc
@@ -264,7 +264,7 @@ // True while receiving ui::LocatedEvents for drag operations. bool drag_in_progress_; - // Target window where drag operations are occuring. + // Target window where drag operations are occurring. aura::Window* target_; DISALLOW_COPY_AND_ASSIGN(TestDragDropClient); @@ -411,7 +411,7 @@ pressed_lock1.reset(); EXPECT_EQ(Button::STATE_PRESSED, button()->state()); - // Reseting the final lock should return the button's state to normal... + // Resetting the final lock should return the button's state to normal... pressed_lock2.reset(); EXPECT_EQ(Button::STATE_NORMAL, button()->state()); @@ -568,8 +568,8 @@ // Tests that the MenuButton does not become pressed if it can be dragged, and a // DragDropClient is processing the events. TEST_F(MenuButtonTest, DraggableMenuButtonDoesNotActivateOnDrag) { - // TODO: test uses GetContext(), which is not applicable to aura-mus. - // http://crbug.com/663809. + // TODO(https://crbug.com/663809): test uses GetContext(), which is not + // applicable to aura-mus. if (IsMus()) return; TestMenuButtonListener menu_button_listener;
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h index 5751796..9efa3d6 100644 --- a/ui/views/controls/menu/menu_controller.h +++ b/ui/views/controls/menu/menu_controller.h
@@ -10,6 +10,7 @@ #include <list> #include <memory> #include <set> +#include <utility> #include <vector> #include "base/compiler_specific.h" @@ -118,7 +119,7 @@ // WARNING: this may be NULL. Widget* owner() { return owner_; } - // Get the anchor position wich is used to show this menu. + // Get the anchor position which is used to show this menu. MenuAnchorPosition GetAnchorPosition() { return state_.anchor; } // Cancels the current Run. See ExitType for a description of what happens @@ -230,18 +231,18 @@ // Values supplied to SetSelection. enum SetSelectionTypes { - SELECTION_DEFAULT = 0, + SELECTION_DEFAULT = 0, // If set submenus are opened immediately, otherwise submenus are only - // openned after a timer fires. - SELECTION_UPDATE_IMMEDIATELY = 1 << 0, + // opened after a timer fires. + SELECTION_UPDATE_IMMEDIATELY = 1 << 0, // If set and the menu_item has a submenu, the submenu is shown. - SELECTION_OPEN_SUBMENU = 1 << 1, + SELECTION_OPEN_SUBMENU = 1 << 1, // SetSelection is being invoked as the result exiting or cancelling the // menu. This is used for debugging. - SELECTION_EXIT = 1 << 2, + SELECTION_EXIT = 1 << 2, }; // Direction for IncrementSelection and FindInitialSelectableMenuItem. @@ -323,7 +324,7 @@ // Sets the selection to |menu_item|. A value of NULL unselects // everything. |types| is a bitmask of |SetSelectionTypes|. // - // Internally this updates pending_state_ immediatley. state_ is only updated + // Internally this updates pending_state_ immediately. state_ is only updated // immediately if SELECTION_UPDATE_IMMEDIATELY is set. If // SELECTION_UPDATE_IMMEDIATELY is not set CommitPendingSelection is invoked // to show/hide submenus and update state_. @@ -560,7 +561,7 @@ // Sets exit type. Calling this can terminate the active nested message-loop. void SetExitType(ExitType type); - // Performs the teardown of menus. This will notifiy the |delegate_|. If + // Performs the teardown of menus. This will notify the |delegate_|. If // |exit_type_| is EXIT_ALL all nested runs will be exited. void ExitMenu();
diff --git a/ui/views/controls/menu/menu_controller_unittest.cc b/ui/views/controls/menu/menu_controller_unittest.cc index cff3563..45293087 100644 --- a/ui/views/controls/menu/menu_controller_unittest.cc +++ b/ui/views/controls/menu/menu_controller_unittest.cc
@@ -12,8 +12,6 @@ #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" -#include "ui/aura/scoped_window_targeter.h" -#include "ui/aura/window.h" #include "ui/events/event.h" #include "ui/events/event_constants.h" #include "ui/events/event_handler.h" @@ -119,7 +117,7 @@ class SubmenuViewShown : public SubmenuView { public: - SubmenuViewShown(MenuItemView* parent) : SubmenuView(parent) {} + using SubmenuView::SubmenuView; ~SubmenuViewShown() override {} bool IsShowing() override { return true; } @@ -132,7 +130,7 @@ TestEventHandler() : outstanding_touches_(0) {} void OnTouchEvent(ui::TouchEvent* event) override { - switch(event->type()) { + switch (event->type()) { case ui::ET_TOUCH_PRESSED: outstanding_touches_++; break; @@ -246,7 +244,8 @@ class TestMenuItemViewShown : public MenuItemView { public: - TestMenuItemViewShown(MenuDelegate* delegate) : MenuItemView(delegate) { + explicit TestMenuItemViewShown(MenuDelegate* delegate) + : MenuItemView(delegate) { submenu_ = new SubmenuViewShown(this); } ~TestMenuItemViewShown() override {} @@ -1083,7 +1082,7 @@ controller_delegate->on_menu_closed_notify_type()); } -// Tests that if a menu is destroyed while drag operations are occuring, that +// Tests that if a menu is destroyed while drag operations are occurring, that // the MenuHost does not crash as the drag completes. TEST_F(MenuControllerTest, AsynchronousDragHostDeleted) { SubmenuView* submenu = menu_item()->GetSubmenu(); @@ -1118,8 +1117,8 @@ root_view->OnMouseMoved(event); } -// Tets that an asynchronous menu nested within an asynchronous menu closes both -// menus, and notifies both delegates. +// Tests that an asynchronous menu nested within an asynchronous menu closes +// both menus, and notifies both delegates. TEST_F(MenuControllerTest, DoubleAsynchronousNested) { MenuController* controller = menu_controller(); TestMenuControllerDelegate* delegate = menu_controller_delegate(); @@ -1166,7 +1165,7 @@ controller->OnGestureEvent(sub_menu, &event2); EXPECT_EQ(CountOwnerOnGestureEvent(), 2); - // ET_GESTURE_END resets the |send_gesture_events_to_owner_| flag, so futher + // ET_GESTURE_END resets the |send_gesture_events_to_owner_| flag, so further // gesture events should not be sent to the owner. controller->OnGestureEvent(sub_menu, &event2); EXPECT_EQ(CountOwnerOnGestureEvent(), 2); @@ -1423,7 +1422,7 @@ ->SetContentsView(base_submenu->GetScrollViewContainer()); // Build the submenu to have an empty menu item. Additionally hook up - // appropriate Widget and View containersm with counds, so that hit testing + // appropriate Widget and View containers with bounds, so that hit testing // works. std::unique_ptr<TestMenuDelegate> sub_menu_item_delegate = std::make_unique<TestMenuDelegate>(); @@ -1508,7 +1507,7 @@ gfx::Rect(150, 50, 100, 100), MENU_ANCHOR_TOPLEFT, true, false); - // The escapce key should only close the nested menu. SelectByChar should not + // The escape key should only close the nested menu. SelectByChar should not // crash. TestAsyncEscapeKey(); EXPECT_EQ(nested_controller_delegate_2->on_menu_closed_called(), 1);
diff --git a/ui/webui/resources/cr_components/chromeos/BUILD.gn b/ui/webui/resources/cr_components/chromeos/BUILD.gn index 45863c8c..0fd1a54 100644 --- a/ui/webui/resources/cr_components/chromeos/BUILD.gn +++ b/ui/webui/resources/cr_components/chromeos/BUILD.gn
@@ -21,8 +21,8 @@ js_library("bluetooth_dialog") { deps = [ "//third_party/polymer/v1_0/components-chromium/iron-resizable-behavior:iron-resizable-behavior-extracted", - "//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted", "//ui/webui/resources/cr_elements/cr_dialog:cr_dialog", + "//ui/webui/resources/cr_elements/cr_input:cr_input", "//ui/webui/resources/js:assert", "//ui/webui/resources/js:cr", "//ui/webui/resources/js:i18n_behavior",
diff --git a/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.html b/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.html index fad3844..f2cb53a 100644 --- a/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.html +++ b/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.html
@@ -1,6 +1,7 @@ <link rel="import" href="chrome://resources/html/polymer.html"> <link rel="import" href="chrome://resources/cr_elements/cr_dialog/cr_dialog.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html"> <link rel="import" href="chrome://resources/cr_elements/paper_button_style_css.html"> <link rel="import" href="chrome://resources/html/cr.html"> @@ -8,7 +9,6 @@ <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-flex-layout-classes.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-list/iron-list.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <dom-module id="bluetooth-dialog"> <template> @@ -17,7 +17,7 @@ margin-bottom: 10px; } - #pairing paper-input { + #pairing cr-input { text-align: center; } @@ -91,14 +91,14 @@ [[getMessage_(pairingDevice, pairingEvent_)]] </div> <div hidden$="[[!showEnterPincode_(pairingEvent_)]]"> - <paper-input id="pincode" minlength="1" maxlength="16" + <cr-input id="pincode" minlength="1" maxlength="16" type="text" auto-validate value="{{pinOrPass_}}"> - </paper-input> + </cr-input> </div> <div hidden$="[[!showEnterPasskey_(pairingEvent_)]]"> - <paper-input id="passkey" minlength="6" maxlength="6" + <cr-input id="passkey" minlength="6" maxlength="6" type="text" auto-validate value="{{pinOrPass_}}"> - </paper-input> + </cr-input> </div> <div id="pinDiv" class="layout horizontal center center-justified" hidden="[[!showDisplayPassOrPin_(pairingEvent_)]]">
diff --git a/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.js b/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.js index 386e2dae..78a8d631d 100644 --- a/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.js +++ b/ui/webui/resources/cr_components/chromeos/bluetooth_dialog.js
@@ -326,10 +326,10 @@ (this.pairingEvent_.pairing == PairingEventType.REQUEST_PINCODE) ? '#pincode' : '#passkey'; - var paperInput = /** @type {!PaperInputElement} */ (this.$$(inputId)); - assert(paperInput); - /** @type {string} */ var value = paperInput.value; - return !!value && paperInput.validate(); + var crInput = /** @type {!CrInputElement} */ (this.$$(inputId)); + assert(crInput); + /** @type {string} */ var value = crInput.value; + return !!value && crInput.validate(); }, /**
diff --git a/ui/webui/resources/cr_components/chromeos/compiled_resources2.gyp b/ui/webui/resources/cr_components/chromeos/compiled_resources2.gyp index 02bc35a..7f8f0726 100644 --- a/ui/webui/resources/cr_components/chromeos/compiled_resources2.gyp +++ b/ui/webui/resources/cr_components/chromeos/compiled_resources2.gyp
@@ -21,11 +21,11 @@ 'target_name': 'bluetooth_dialog', 'dependencies': [ '<(DEPTH)/ui/webui/resources/cr_elements/cr_dialog/compiled_resources2.gyp:cr_dialog', + '<(DEPTH)/ui/webui/resources/cr_elements/cr_input/compiled_resources2.gyp:cr_input', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:assert', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:cr', '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', '<(DEPTH)/third_party/polymer/v1_0/components-chromium/iron-resizable-behavior/compiled_resources2.gyp:iron-resizable-behavior-extracted', - '<(DEPTH)/third_party/polymer/v1_0/components-chromium/paper-input/compiled_resources2.gyp:paper-input-extracted', '<(EXTERNS_GYP):bluetooth', '<(EXTERNS_GYP):bluetooth_private', '<(INTERFACES_GYP):bluetooth_interface',
diff --git a/ui/webui/resources/cr_components/chromeos/quick_unlock/BUILD.gn b/ui/webui/resources/cr_components/chromeos/quick_unlock/BUILD.gn index c027d4c..a024915 100644 --- a/ui/webui/resources/cr_components/chromeos/quick_unlock/BUILD.gn +++ b/ui/webui/resources/cr_components/chromeos/quick_unlock/BUILD.gn
@@ -13,7 +13,7 @@ js_library("pin_keyboard") { deps = [ "//third_party/polymer/v1_0/components-chromium/paper-button:paper-button-extracted", - "//third_party/polymer/v1_0/components-chromium/paper-input:paper-input-extracted", + "//ui/webui/resources/cr_elements/cr_input:cr_input", "//ui/webui/resources/js:i18n_behavior", ] }
diff --git a/ui/webui/resources/cr_components/chromeos/quick_unlock/compiled_resources2.gyp b/ui/webui/resources/cr_components/chromeos/quick_unlock/compiled_resources2.gyp index eff59d1..4d592c21 100644 --- a/ui/webui/resources/cr_components/chromeos/quick_unlock/compiled_resources2.gyp +++ b/ui/webui/resources/cr_components/chromeos/quick_unlock/compiled_resources2.gyp
@@ -8,7 +8,7 @@ 'dependencies': [ '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:i18n_behavior', '<(DEPTH)/third_party/polymer/v1_0/components-chromium/paper-button/compiled_resources2.gyp:paper-button-extracted', - '<(DEPTH)/third_party/polymer/v1_0/components-chromium/paper-input/compiled_resources2.gyp:paper-input-extracted', + '<(DEPTH)/ui/webui/resources/cr_elements/cr_input/compiled_resources2.gyp:cr_input', ], 'includes': ['../../../../../../third_party/closure_compiler/compile_js2.gypi'], },
diff --git a/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.html b/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.html index 96988de..80145de 100644 --- a/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.html +++ b/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.html
@@ -4,12 +4,12 @@ <link rel="import" href="chrome://resources/html/polymer.html"> +<link rel="import" href="chrome://resources/cr_elements/cr_input/cr_input.html"> <link rel="import" href="chrome://resources/cr_elements/icons.html"> <link rel="import" href="chrome://resources/cr_elements/shared_vars_css.html"> <link rel="import" href="chrome://resources/html/i18n_behavior.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input.html"> <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/color.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html"> <link rel="import" href="chrome://resources/polymer/v1_0/iron-iconset-svg/iron-iconset-svg.html"> @@ -138,10 +138,6 @@ position: relative; text-align: center; width: 180px; - - --paper-input-container-input: { - caret-color: var(--paper-input-container-focus-color); - } } #pinInput[has-content] { @@ -152,16 +148,6 @@ direction: rtl; } - #pinInput[type=number]::-webkit-inner-spin-button, - #pinInput[type=number]::-webkit-outer-spin-button { - -webkit-appearance: none; - margin: 0; - } - - :host([has-error]) #pinInput { - --paper-input-container-focus-color: var(--paper-red-500); - } - /* Ensure that all children of paper-button do not consume events. This * simplifies the event handler code. */ paper-button * { @@ -171,13 +157,12 @@ <div id="root" on-contextmenu="onContextMenu_" on-tap="focusInput_"> <div id="pinInputDiv" class="row"> - <paper-input id="pinInput" type="password" no-label-float - value="{{value}}" + <cr-input id="pinInput" type="password" value="{{value}}" is-input-rtl$="[[isInputRtl_(value)]]" - has-content$="[[hasInput_(value)]]" - label="[[getInputPlaceholder_(enablePassword)]]" + has-content$="[[hasInput_(value)]]" invalid="[[hasError]]" + placeholder="[[getInputPlaceholder_(enablePassword)]]" on-keydown="onInputKeyDown_"> - </paper-input> + </cr-input> </div> <slot select="[problem]"></slot> <div class="row">
diff --git a/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js b/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js index 66f79182..0f7e3da6 100644 --- a/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js +++ b/ui/webui/resources/cr_components/chromeos/quick_unlock/pin_keyboard.js
@@ -65,10 +65,12 @@ value: false, }, + hasError: Boolean, + /** * The password element the pin keyboard is associated with. If this is not * set, then a default input element is shown and used. - * @type {?Element} + * @type {?HTMLElement} * @private */ passwordElement: Object, @@ -395,7 +397,8 @@ passwordElement_: function() { // |passwordElement| is null by default. It can be set to override the // input field that will be populated with the keypad. - return this.passwordElement || this.$.pinInput.inputElement.inputElement; + return this.passwordElement || + (/** @type {CrInputElement} */ (this.$.pinInput)).inputElement; }, }); })();
diff --git a/ui/webui/resources/cr_elements/cr_input/compiled_resources2.gyp b/ui/webui/resources/cr_elements/cr_input/compiled_resources2.gyp new file mode 100644 index 0000000..7d419b9 --- /dev/null +++ b/ui/webui/resources/cr_elements/cr_input/compiled_resources2.gyp
@@ -0,0 +1,11 @@ +# Copyright 2018 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. +{ + 'targets': [ + { + 'target_name': 'cr_input', + 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], + }, + ], +}
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input.html b/ui/webui/resources/cr_elements/cr_input/cr_input.html index bd430f5..ebefd966 100644 --- a/ui/webui/resources/cr_elements/cr_input/cr_input.html +++ b/ui/webui/resources/cr_elements/cr_input/cr_input.html
@@ -105,7 +105,7 @@ value="{{value::input}}" tabindex$="[[tabIndex]]" type="[[type]]" readonly$="[[readonly]]" maxlength$="[[maxlength]]" pattern="[[pattern]]" required="[[required]]" - incremental="[[incremental]]"> + incremental="[[incremental]]" minlength$="[[minlength]]"> <div id="underline"></div> </div> <slot name="suffix"></slot>
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input.js b/ui/webui/resources/cr_elements/cr_input/cr_input.js index 82e426b..6ad8bde 100644 --- a/ui/webui/resources/cr_elements/cr_input/cr_input.js +++ b/ui/webui/resources/cr_elements/cr_input/cr_input.js
@@ -10,6 +10,7 @@ * disabled * incremental (only applicable when type="search") * maxlength + * minlength * pattern * placeholder * readonly @@ -71,6 +72,11 @@ reflectToAttribute: true, }, + minlength: { + type: Number, + reflectToAttribute: true, + }, + pattern: { type: String, reflectToAttribute: true, @@ -162,7 +168,7 @@ /** @private */ onValueChanged_: function() { if (this.autoValidate) - this.invalid = !this.inputElement.checkValidity(); + this.validate(); }, /** @@ -184,4 +190,10 @@ else this.removeAttribute('focused_'); }, + + /** @return {boolean} */ + validate: function() { + this.invalid = !this.inputElement.checkValidity(); + return !this.invalid; + }, }); \ No newline at end of file
diff --git a/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html b/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html index e39b1fd..6783d16a 100644 --- a/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html +++ b/ui/webui/resources/cr_elements/cr_input/cr_input_style_css.html
@@ -28,6 +28,8 @@ overflow: hidden; position: relative; width: var(--cr-input-width, 100%); + + @apply --cr-input-container; } #input { @@ -42,6 +44,7 @@ font-size: inherit; line-height: inherit; outline: none; + text-align: inherit; width: 100%; /**