| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |