OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 bool isActive() const override { return false; } | 193 bool isActive() const override { return false; } |
194 int scrollSize(ScrollbarOrientation) const override { return 100; } | 194 int scrollSize(ScrollbarOrientation) const override { return 100; } |
195 bool isScrollCornerVisible() const override { return false; } | 195 bool isScrollCornerVisible() const override { return false; } |
196 IntRect scrollCornerRect() const override { return IntRect(); } | 196 IntRect scrollCornerRect() const override { return IntRect(); } |
197 int visibleWidth() const override { return 10; } | 197 int visibleWidth() const override { return 10; } |
198 int visibleHeight() const override { return 10; } | 198 int visibleHeight() const override { return 10; } |
199 IntSize contentsSize() const override { return IntSize(100, 100); } | 199 IntSize contentsSize() const override { return IntSize(100, 100); } |
200 bool scrollbarsCanBeActive() const override { return false; } | 200 bool scrollbarsCanBeActive() const override { return false; } |
201 IntRect scrollableAreaBoundingBox() const override { return IntRect(); } | 201 IntRect scrollableAreaBoundingBox() const override { return IntRect(); } |
202 void invalidateScrollbarRect(Scrollbar*, const IntRect&) override { } | 202 void scrollControlWasSetNeedsPaintInvalidation() override { } |
203 void invalidateScrollCornerRect(const IntRect&) override { } | |
204 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} | 203 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} |
205 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } | 204 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } |
206 int pageStep(ScrollbarOrientation) const override { return 0; } | 205 int pageStep(ScrollbarOrientation) const override { return 0; } |
207 IntPoint minimumScrollPosition() const override { return IntPoint(); } | 206 IntPoint minimumScrollPosition() const override { return IntPoint(); } |
208 IntPoint maximumScrollPosition() const override | 207 IntPoint maximumScrollPosition() const override |
209 { | 208 { |
210 return IntPoint(contentsSize().width() - visibleWidth(), contentsSize().
height() - visibleHeight()); | 209 return IntPoint(contentsSize().width() - visibleWidth(), contentsSize().
height() - visibleHeight()); |
211 } | 210 } |
212 | 211 |
213 void setScrollOffset(const IntPoint& scrollOffset, ScrollType) override { m_
scrollPosition = scrollOffset; } | 212 void setScrollOffset(const IntPoint& scrollOffset, ScrollType) override { m_
scrollPosition = scrollOffset; } |
(...skipping 17 matching lines...) Expand all Loading... |
231 | 230 |
232 WebDoublePoint scrollPosition(7, 9); | 231 WebDoublePoint scrollPosition(7, 9); |
233 m_platformLayer->setScrollPositionDouble(scrollPosition); | 232 m_platformLayer->setScrollPositionDouble(scrollPosition); |
234 m_graphicsLayer->didScroll(); | 233 m_graphicsLayer->didScroll(); |
235 | 234 |
236 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); | 235 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); |
237 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); | 236 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); |
238 } | 237 } |
239 | 238 |
240 } // namespace blink | 239 } // namespace blink |
OLD | NEW |