Chromium Code Reviews| Index: content/browser/host_zoom_map.cc |
| =================================================================== |
| --- content/browser/host_zoom_map.cc (revision 109526) |
| +++ content/browser/host_zoom_map.cc (working copy) |
| @@ -14,6 +14,7 @@ |
| #include "content/public/browser/browser_thread.h" |
| #include "content/public/browser/notification_service.h" |
| #include "content/public/browser/notification_types.h" |
| +#include "content/public/common/page_zoom.h" |
| #include "googleurl/src/gurl.h" |
| #include "net/base/net_util.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| @@ -56,7 +57,8 @@ |
| { |
| base::AutoLock auto_lock(lock_); |
| - if (level == default_zoom_level_) |
| + |
| + if (std::fabs(level - default_zoom_level_) <= content::kPageZoomEpsilon) |
|
James Hawkins
2011/11/14 18:09:05
I'm seeing this a lot; can we refactor this somewh
csilv
2011/11/15 02:26:49
Done.
|
| host_zoom_levels_.erase(host); |
| else |
| host_zoom_levels_[host] = level; |