summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authortfarina <tfarina@chromium.org>2015-11-04 11:21:23 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-04 19:22:10 +0000
commit23f406f957bfc311337e2d9ee83ea1b44ff8e82e (patch)
treec48e0034af03c83d90ee29ce6f47689b77de2fbd /ui
parent8f21b4928cb021fcfb743b56413b658ce7e867aa (diff)
downloadchromium_src-23f406f957bfc311337e2d9ee83ea1b44ff8e82e.zip
chromium_src-23f406f957bfc311337e2d9ee83ea1b44ff8e82e.tar.gz
chromium_src-23f406f957bfc311337e2d9ee83ea1b44ff8e82e.tar.bz2
ui/gfx/geometry: Rename empty() method to IsEmpty() on Insets APIs.
BUG=None R=danakj@chromium.org TBR=sky@chromium.org Review URL: https://codereview.chromium.org/1410873010 Cr-Commit-Position: refs/heads/master@{#357866}
Diffstat (limited to 'ui')
-rw-r--r--ui/aura/window.cc2
-rw-r--r--ui/gfx/geometry/insets.h2
-rw-r--r--ui/gfx/geometry/insets_f.h2
-rw-r--r--ui/gfx/geometry/insets_unittest.cc4
-rw-r--r--ui/views/controls/styled_label_unittest.cc4
-rw-r--r--ui/views/win/hwnd_message_handler.cc2
6 files changed, 8 insertions, 8 deletions
diff --git a/ui/aura/window.cc b/ui/aura/window.cc
index 79ef0ce..6ff6c76 100644
--- a/ui/aura/window.cc
+++ b/ui/aura/window.cc
@@ -758,7 +758,7 @@ Window* Window::GetWindowForPoint(const gfx::Point& local_point,
// Check if I should claim this event and not pass it to my children because
// the location is inside my hit test override area. For details, see
// set_hit_test_bounds_override_inner().
- if (for_event_handling && !hit_test_bounds_override_inner_.empty()) {
+ if (for_event_handling && !hit_test_bounds_override_inner_.IsEmpty()) {
gfx::Rect inset_local_bounds(gfx::Point(), bounds().size());
inset_local_bounds.Inset(hit_test_bounds_override_inner_);
// We know we're inside the normal local bounds, so if we're outside the
diff --git a/ui/gfx/geometry/insets.h b/ui/gfx/geometry/insets.h
index 8d5344f75..0466d94 100644
--- a/ui/gfx/geometry/insets.h
+++ b/ui/gfx/geometry/insets.h
@@ -34,7 +34,7 @@ class GFX_EXPORT Insets {
int height() const { return top_ + bottom_; }
// Returns true if the insets are empty.
- bool empty() const { return width() == 0 && height() == 0; }
+ bool IsEmpty() const { return width() == 0 && height() == 0; }
void Set(int top, int left, int bottom, int right) {
top_ = top;
diff --git a/ui/gfx/geometry/insets_f.h b/ui/gfx/geometry/insets_f.h
index 4ef07c6..90592d7 100644
--- a/ui/gfx/geometry/insets_f.h
+++ b/ui/gfx/geometry/insets_f.h
@@ -32,7 +32,7 @@ class GFX_EXPORT InsetsF {
float height() const { return top_ + bottom_; }
// Returns true if the insets are empty.
- bool empty() const { return width() == 0.f && height() == 0.f; }
+ bool IsEmpty() const { return width() == 0.f && height() == 0.f; }
void Set(float top, float left, float bottom, float right) {
top_ = top;
diff --git a/ui/gfx/geometry/insets_unittest.cc b/ui/gfx/geometry/insets_unittest.cc
index b20a9d3..0d33459 100644
--- a/ui/gfx/geometry/insets_unittest.cc
+++ b/ui/gfx/geometry/insets_unittest.cc
@@ -14,7 +14,7 @@ TEST(InsetsTest, InsetsDefault) {
EXPECT_EQ(0, insets.right());
EXPECT_EQ(0, insets.width());
EXPECT_EQ(0, insets.height());
- EXPECT_TRUE(insets.empty());
+ EXPECT_TRUE(insets.IsEmpty());
}
TEST(InsetsTest, Insets) {
@@ -25,7 +25,7 @@ TEST(InsetsTest, Insets) {
EXPECT_EQ(4, insets.right());
EXPECT_EQ(6, insets.width()); // Left + right.
EXPECT_EQ(4, insets.height()); // Top + bottom.
- EXPECT_FALSE(insets.empty());
+ EXPECT_FALSE(insets.IsEmpty());
}
TEST(InsetsTest, Set) {
diff --git a/ui/views/controls/styled_label_unittest.cc b/ui/views/controls/styled_label_unittest.cc
index 6efcd66..7a2a7f5 100644
--- a/ui/views/controls/styled_label_unittest.cc
+++ b/ui/views/controls/styled_label_unittest.cc
@@ -155,7 +155,7 @@ TEST_F(StyledLabelTest, CreateLinks) {
InitStyledLabel(text);
// Without links, there should be no focus border.
- EXPECT_TRUE(styled()->GetInsets().empty());
+ EXPECT_TRUE(styled()->GetInsets().IsEmpty());
// Now let's add some links.
styled()->AddStyleRange(gfx::Range(0, 1),
@@ -168,7 +168,7 @@ TEST_F(StyledLabelTest, CreateLinks) {
StyledLabel::RangeStyleInfo::CreateForLink());
// Now there should be a focus border because there are non-empty Links.
- EXPECT_FALSE(styled()->GetInsets().empty());
+ EXPECT_FALSE(styled()->GetInsets().IsEmpty());
// Verify layout creates the right number of children.
styled()->SetBounds(0, 0, 1000, 1000);
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 7d4857d..035df76 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -1070,7 +1070,7 @@ void HWNDMessageHandler::ClientAreaSizeChanged() {
bool HWNDMessageHandler::GetClientAreaInsets(gfx::Insets* insets) const {
if (delegate_->GetClientAreaInsets(insets))
return true;
- DCHECK(insets->empty());
+ DCHECK(insets->IsEmpty());
// Returning false causes the default handling in OnNCCalcSize() to
// be invoked.