Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: Source/platform/graphics/GraphicsLayerTest.cpp

Issue 260353003: isActiveFocus() is a more meaningful name (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderListBox.cpp ('k') | Source/platform/scroll/FramelessScrollView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 m_graphicsLayer->setShouldFlattenTransform(true); 119 m_graphicsLayer->setShouldFlattenTransform(true);
120 120
121 m_platformLayer = m_graphicsLayer->platformLayer(); 121 m_platformLayer = m_graphicsLayer->platformLayer();
122 ASSERT_TRUE(m_platformLayer); 122 ASSERT_TRUE(m_platformLayer);
123 123
124 ASSERT_FALSE(m_platformLayer->hasActiveAnimation()); 124 ASSERT_FALSE(m_platformLayer->hasActiveAnimation());
125 } 125 }
126 126
127 class FakeScrollableArea : public ScrollableArea { 127 class FakeScrollableArea : public ScrollableArea {
128 public: 128 public:
129 virtual bool isActive() const OVERRIDE { return false; } 129 virtual bool isActiveFocus() const OVERRIDE { return false; }
130 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE { return 100; } 130 virtual int scrollSize(ScrollbarOrientation) const OVERRIDE { return 100; }
131 virtual bool isScrollCornerVisible() const OVERRIDE { return false; } 131 virtual bool isScrollCornerVisible() const OVERRIDE { return false; }
132 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); } 132 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); }
133 virtual int visibleWidth() const OVERRIDE { return 10; } 133 virtual int visibleWidth() const OVERRIDE { return 10; }
134 virtual int visibleHeight() const OVERRIDE { return 10; } 134 virtual int visibleHeight() const OVERRIDE { return 10; }
135 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); } 135 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); }
136 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; } 136 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; }
137 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect( ); } 137 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect( ); }
138 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE { } 138 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE { }
139 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { } 139 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { }
(...skipping 19 matching lines...) Expand all
159 m_graphicsLayer->setScrollableArea(&scrollableArea, false); 159 m_graphicsLayer->setScrollableArea(&scrollableArea, false);
160 160
161 WebPoint scrollPosition(7, 9); 161 WebPoint scrollPosition(7, 9);
162 m_platformLayer->setScrollPosition(scrollPosition); 162 m_platformLayer->setScrollPosition(scrollPosition);
163 m_graphicsLayer->didScroll(); 163 m_graphicsLayer->didScroll();
164 164
165 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition())); 165 EXPECT_EQ(scrollPosition, WebPoint(scrollableArea.scrollPosition()));
166 } 166 }
167 167
168 } // namespace 168 } // namespace
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderListBox.cpp ('k') | Source/platform/scroll/FramelessScrollView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698