summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 06:11:16 +0000
committertzik@chromium.org <tzik@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-09 06:11:16 +0000
commitc07d20426ea15baf4b43f5dd95a4a63678d0263a (patch)
tree2253be9ab77ec5013aec927c5c452308e7c83024
parent68eeede20e63fbb9a8756ed73e482b87dde57c72 (diff)
downloadchromium_src-c07d20426ea15baf4b43f5dd95a4a63678d0263a.zip
chromium_src-c07d20426ea15baf4b43f5dd95a4a63678d0263a.tar.gz
chromium_src-c07d20426ea15baf4b43f5dd95a4a63678d0263a.tar.bz2
Revert r199090 and r199077 since these two breaks PanelWindowResizerTest.PanelDetachReattachTop and PanelWindowResizerTest.PanelDetachReattachBottom on win8_aura bot.
Revert "Removes the space for notification icon if it's not visible." Revert "Fixes a test expectation broken by r199077" TBR=mukai@chromium.org NOTRY=True Review URL: https://chromiumcodereview.appspot.com/14791011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199146 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/system/status_area_widget_delegate.cc27
-rw-r--r--ash/system/status_area_widget_delegate.h3
-rw-r--r--ash/wm/panels/panel_window_resizer_unittest.cc4
3 files changed, 8 insertions, 26 deletions
diff --git a/ash/system/status_area_widget_delegate.cc b/ash/system/status_area_widget_delegate.cc
index 92a8c71..f4a7b5a 100644
--- a/ash/system/status_area_widget_delegate.cc
+++ b/ash/system/status_area_widget_delegate.cc
@@ -83,38 +83,25 @@ void StatusAreaWidgetDelegate::UpdateLayout() {
views::ColumnSet* columns = layout->AddColumnSet(0);
if (alignment_ == SHELF_ALIGNMENT_BOTTOM ||
alignment_ == SHELF_ALIGNMENT_TOP) {
- bool is_first_visible_child = true;
for (int c = 0; c < child_count(); ++c) {
- views::View* child = child_at(c);
- if (!child->visible())
- continue;
- if (!is_first_visible_child)
+ if (c != 0)
columns->AddPaddingColumn(0, kTraySpacing);
- is_first_visible_child = false;
columns->AddColumn(views::GridLayout::CENTER, views::GridLayout::FILL,
0, /* resize percent */
views::GridLayout::USE_PREF, 0, 0);
}
layout->StartRow(0, 0);
- for (int c = child_count() - 1; c >= 0; --c) {
- views::View* child = child_at(c);
- if (child->visible())
- layout->AddView(child);
- }
+ for (int c = child_count() - 1; c >= 0; --c)
+ layout->AddView(child_at(c));
} else {
columns->AddColumn(views::GridLayout::FILL, views::GridLayout::CENTER,
0, /* resize percent */
views::GridLayout::USE_PREF, 0, 0);
- bool is_first_visible_child = true;
for (int c = child_count() - 1; c >= 0; --c) {
- views::View* child = child_at(c);
- if (!child->visible())
- continue;
- if (!is_first_visible_child)
+ if (c != child_count() - 1)
layout->AddPaddingRow(0, kTraySpacing);
- is_first_visible_child = false;
layout->StartRow(0, 0);
- layout->AddView(child);
+ layout->AddView(child_at(c));
}
}
Layout();
@@ -126,10 +113,6 @@ void StatusAreaWidgetDelegate::ChildPreferredSizeChanged(View* child) {
UpdateWidgetSize();
}
-void StatusAreaWidgetDelegate::ChildVisibilityChanged(View* child) {
- UpdateLayout();
-}
-
void StatusAreaWidgetDelegate::UpdateWidgetSize() {
if (GetWidget())
GetWidget()->SetSize(GetPreferredSize());
diff --git a/ash/system/status_area_widget_delegate.h b/ash/system/status_area_widget_delegate.h
index 751c31b..eaa7253 100644
--- a/ash/system/status_area_widget_delegate.h
+++ b/ash/system/status_area_widget_delegate.h
@@ -50,8 +50,7 @@ class ASH_EXPORT StatusAreaWidgetDelegate : public views::AccessiblePaneView,
protected:
// Overridden from views::View:
- virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
- virtual void ChildVisibilityChanged(views::View* child) OVERRIDE;
+ virtual void ChildPreferredSizeChanged(View* child) OVERRIDE;
private:
void UpdateWidgetSize();
diff --git a/ash/wm/panels/panel_window_resizer_unittest.cc b/ash/wm/panels/panel_window_resizer_unittest.cc
index 406612b..9039de2 100644
--- a/ash/wm/panels/panel_window_resizer_unittest.cc
+++ b/ash/wm/panels/panel_window_resizer_unittest.cc
@@ -263,7 +263,7 @@ TEST_F(PanelWindowResizerTest, MAYBE_PanelDetachReattachMultipleDisplays) {
}
TEST_F(PanelWindowResizerTest, MAYBE_DetachThenDragAcrossDisplays) {
- UpdateDisplay("600x600,600x600");
+ UpdateDisplay("400x400,400x400");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
CreatePanelWindow(gfx::Rect(0, 0, 201, 201)));
@@ -309,7 +309,7 @@ TEST_F(PanelWindowResizerTest, MAYBE_DetachAcrossDisplays) {
}
TEST_F(PanelWindowResizerTest, MAYBE_DetachThenAttachToSecondDisplay) {
- UpdateDisplay("600x400,600x600");
+ UpdateDisplay("400x400,400x600");
Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
scoped_ptr<aura::Window> window(
CreatePanelWindow(gfx::Rect(0, 0, 201, 201)));