| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 virtual bool isScrollCornerVisible() const OVERRIDE { return false; } | 122 virtual bool isScrollCornerVisible() const OVERRIDE { return false; } |
| 123 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); } | 123 virtual IntRect scrollCornerRect() const OVERRIDE { return IntRect(); } |
| 124 virtual int visibleWidth() const OVERRIDE { return 10; } | 124 virtual int visibleWidth() const OVERRIDE { return 10; } |
| 125 virtual int visibleHeight() const OVERRIDE { return 10; } | 125 virtual int visibleHeight() const OVERRIDE { return 10; } |
| 126 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); } | 126 virtual IntSize contentsSize() const OVERRIDE { return IntSize(100, 100); } |
| 127 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; } | 127 virtual bool scrollbarsCanBeActive() const OVERRIDE { return false; } |
| 128 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE { return 0;
} | 128 virtual ScrollableArea* enclosingScrollableArea() const OVERRIDE { return 0;
} |
| 129 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect(
); } | 129 virtual IntRect scrollableAreaBoundingBox() const OVERRIDE { return IntRect(
); } |
| 130 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE {
} | 130 virtual void invalidateScrollbarRect(Scrollbar*, const IntRect&) OVERRIDE {
} |
| 131 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { } | 131 virtual void invalidateScrollCornerRect(const IntRect&) OVERRIDE { } |
| 132 virtual bool isHorizontallyScrollable() const OVERRIDE { return true; } |
| 133 virtual bool isVerticallyScrollable() const OVERRIDE { return true; } |
| 132 | 134 |
| 133 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro
llPosition = scrollOffset; } | 135 virtual void setScrollOffset(const IntPoint& scrollOffset) OVERRIDE { m_scro
llPosition = scrollOffset; } |
| 134 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition;
} | 136 virtual IntPoint scrollPosition() const OVERRIDE { return m_scrollPosition;
} |
| 135 | 137 |
| 136 private: | 138 private: |
| 137 IntPoint m_scrollPosition; | 139 IntPoint m_scrollPosition; |
| 138 }; | 140 }; |
| 139 | 141 |
| 140 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) | 142 TEST_F(GraphicsLayerTest, applyScrollToScrollableArea) |
| 141 { | 143 { |
| (...skipping 13 matching lines...) Expand all Loading... |
| 155 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); | 157 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); |
| 156 | 158 |
| 157 m_graphicsLayer->setContentsToSolidColor(Color::white); | 159 m_graphicsLayer->setContentsToSolidColor(Color::white); |
| 158 EXPECT_TRUE(m_graphicsLayer->contentsLayer()); | 160 EXPECT_TRUE(m_graphicsLayer->contentsLayer()); |
| 159 | 161 |
| 160 m_graphicsLayer->setContentsToSolidColor(Color()); | 162 m_graphicsLayer->setContentsToSolidColor(Color()); |
| 161 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); | 163 EXPECT_FALSE(m_graphicsLayer->contentsLayer()); |
| 162 } | 164 } |
| 163 | 165 |
| 164 } // namespace | 166 } // namespace |
| OLD | NEW |