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