| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "modules/canvas2d/CanvasRenderingContext2D.h" | 5 #include "modules/canvas2d/CanvasRenderingContext2D.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/frame/Settings.h" | 8 #include "core/frame/Settings.h" |
| 9 #include "core/html/HTMLCanvasElement.h" | 9 #include "core/html/HTMLCanvasElement.h" |
| 10 #include "core/html/HTMLDocument.h" | 10 #include "core/html/HTMLDocument.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 DummyPageHolder& page() const { return *m_dummyPageHolder; } | 33 DummyPageHolder& page() const { return *m_dummyPageHolder; } |
| 34 HTMLDocument& document() const { return *m_document; } | 34 HTMLDocument& document() const { return *m_document; } |
| 35 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; } | 35 HTMLCanvasElement& canvasElement() const { return *m_canvasElement; } |
| 36 CanvasRenderingContext2D* context2d() const; | 36 CanvasRenderingContext2D* context2d() const; |
| 37 | 37 |
| 38 void createContext(OpacityMode); | 38 void createContext(OpacityMode); |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 OwnPtr<DummyPageHolder> m_dummyPageHolder; | 41 OwnPtr<DummyPageHolder> m_dummyPageHolder; |
| 42 RefPtrWillBePersistent<HTMLDocument> m_document; | 42 Persistent<HTMLDocument> m_document; |
| 43 RefPtrWillBePersistent<HTMLCanvasElement> m_canvasElement; | 43 Persistent<HTMLCanvasElement> m_canvasElement; |
| 44 | 44 |
| 45 }; | 45 }; |
| 46 | 46 |
| 47 CanvasRenderingContext2DAPITest::CanvasRenderingContext2DAPITest() | 47 CanvasRenderingContext2DAPITest::CanvasRenderingContext2DAPITest() |
| 48 { } | 48 { } |
| 49 | 49 |
| 50 CanvasRenderingContext2D* CanvasRenderingContext2DAPITest::context2d() const | 50 CanvasRenderingContext2D* CanvasRenderingContext2DAPITest::context2d() const |
| 51 { | 51 { |
| 52 // If the following check fails, perhaps you forgot to call createContext | 52 // If the following check fails, perhaps you forgot to call createContext |
| 53 // in your test? | 53 // in your test? |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX
ObjectCache()); | 318 AXObjectCacheImpl* axObjectCache = toAXObjectCacheImpl(document().existingAX
ObjectCache()); |
| 319 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); | 319 AXObject* axObject = axObjectCache->getOrCreate(buttonElement); |
| 320 | 320 |
| 321 EXPECT_EQ(25, axObject->elementRect().x().toInt()); | 321 EXPECT_EQ(25, axObject->elementRect().x().toInt()); |
| 322 EXPECT_EQ(25, axObject->elementRect().y().toInt()); | 322 EXPECT_EQ(25, axObject->elementRect().y().toInt()); |
| 323 EXPECT_EQ(40, axObject->elementRect().width().toInt()); | 323 EXPECT_EQ(40, axObject->elementRect().width().toInt()); |
| 324 EXPECT_EQ(40, axObject->elementRect().height().toInt()); | 324 EXPECT_EQ(40, axObject->elementRect().height().toInt()); |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace blink | 327 } // namespace blink |
| OLD | NEW |