Upstream version 11.39.250.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / toolbar / browser_action_view.cc
index 2ae971d..1de0c0f 100644 (file)
@@ -132,6 +132,8 @@ void BrowserActionView::UpdateState() {
 
   if (!IsEnabled(tab_id))
     SetState(views::CustomButton::STATE_DISABLED);
+  else if (state() == views::CustomButton::STATE_DISABLED)
+    SetState(views::CustomButton::STATE_NORMAL);
 
   gfx::ImageSkia icon = *view_controller_->GetIcon(tab_id).ToImageSkia();
 
@@ -154,6 +156,7 @@ void BrowserActionView::UpdateState() {
   SetTooltipText(name);
   SetAccessibleName(name);
 
+  Layout();  // We need to layout since we may have added an icon as a result.
   SchedulePaint();
 }