Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2881)

Unified Diff: ash/wm/system_modal_container_layout_manager.cc

Issue 196723009: Not submitted - Fixing invalid visibility states with layers which showed up in unittests ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/wm/system_modal_container_layout_manager.cc
diff --git a/ash/wm/system_modal_container_layout_manager.cc b/ash/wm/system_modal_container_layout_manager.cc
index 42cbb05dd8ede6e2fde35c7d4bd9a7123e2d956f..0b774b278584c4b256b5d02a9123320b9fd1251d 100644
--- a/ash/wm/system_modal_container_layout_manager.cc
+++ b/ash/wm/system_modal_container_layout_manager.cc
@@ -160,7 +160,10 @@ void SystemModalContainerLayoutManager::CreateModalBackground() {
contents_view->set_background(
views::Background::CreateSolidBackground(SK_ColorBLACK));
modal_background_->SetContentsView(contents_view);
- modal_background_->GetNativeView()->layer()->SetOpacity(0.0f);
+ // The layer should at the beginning be invisible and fade then in. Since
+ // the visibility is true an opacity of 0.0 would be illegal and Show()
+ // will complaint, we have to start with a slightly bigger value.
+ modal_background_->GetNativeView()->layer()->SetOpacity(0.001f);
}
ui::ScopedLayerAnimationSettings settings(

Powered by Google App Engine
This is Rietveld 408576698