summaryrefslogtreecommitdiffstats
path: root/chrome/views/view.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 19:15:08 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-10 19:15:08 +0000
commit4a8d3279cc9f2149c90d36550a55d01a264ba0a3 (patch)
tree10686a040d5bbb5af5dc4686564ceec0189fee22 /chrome/views/view.cc
parenta724b6ad91affee34adc5c3ab25b05536bb51f6d (diff)
downloadchromium_src-4a8d3279cc9f2149c90d36550a55d01a264ba0a3.zip
chromium_src-4a8d3279cc9f2149c90d36550a55d01a264ba0a3.tar.gz
chromium_src-4a8d3279cc9f2149c90d36550a55d01a264ba0a3.tar.bz2
Unrevert 11294.
- include stub fix so that linux/mac still build. - fix DCHECK in views code. - fix unit test. Review URL: http://codereview.chromium.org/41020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/view.cc')
-rw-r--r--chrome/views/view.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/chrome/views/view.cc b/chrome/views/view.cc
index aada086..5b5af2e 100644
--- a/chrome/views/view.cc
+++ b/chrome/views/view.cc
@@ -151,7 +151,8 @@ gfx::Rect View::GetLocalBounds(bool include_border) const {
gfx::Insets insets;
border_->GetInsets(&insets);
return gfx::Rect(insets.left(), insets.top(),
- width() - insets.width(), height() - insets.height());
+ std::max(0, width() - insets.width()),
+ std::max(0, height() - insets.height()));
}
gfx::Point View::GetPosition() const {