Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(848)

Unified Diff: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp

Issue 2197953002: Remove unnecessary uses of HTMLDocument (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
index 81889c2ac6d43269b1672f928f4a7847846e3b99..7b38498ab83cbef6661d94ea2076f583f10cfcf6 100644
--- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
+++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DAPITest.cpp
@@ -4,10 +4,10 @@
#include "modules/canvas2d/CanvasRenderingContext2D.h"
+#include "core/dom/Document.h"
#include "core/frame/FrameView.h"
#include "core/frame/Settings.h"
#include "core/html/HTMLCanvasElement.h"
-#include "core/html/HTMLDocument.h"
#include "core/html/ImageData.h"
#include "core/loader/EmptyClients.h"
#include "core/testing/DummyPageHolder.h"
@@ -32,7 +32,7 @@ protected:
void SetUp() override;
DummyPageHolder& page() const { return *m_dummyPageHolder; }
- HTMLDocument& document() const { return *m_document; }
+ Document& document() const { return *m_document; }
HTMLCanvasElement& canvasElement() const { return *m_canvasElement; }
CanvasRenderingContext2D* context2d() const;
@@ -40,7 +40,7 @@ protected:
private:
std::unique_ptr<DummyPageHolder> m_dummyPageHolder;
- Persistent<HTMLDocument> m_document;
+ Persistent<Document> m_document;
Persistent<HTMLCanvasElement> m_canvasElement;
};
@@ -71,7 +71,7 @@ void CanvasRenderingContext2DAPITest::SetUp()
Page::PageClients pageClients;
fillWithEmptyClients(pageClients);
m_dummyPageHolder = DummyPageHolder::create(IntSize(800, 600), &pageClients);
- m_document = toHTMLDocument(&m_dummyPageHolder->document());
+ m_document = &m_dummyPageHolder->document();
m_document->documentElement()->setInnerHTML("<body><canvas id='c'></canvas></body>", ASSERT_NO_EXCEPTION);
m_document->view()->updateAllLifecyclePhases();
m_canvasElement = toHTMLCanvasElement(m_document->getElementById("c"));
@@ -260,7 +260,7 @@ TEST_F(CanvasRenderingContext2DAPITest, GetImageDataTooBig)
EXPECT_EQ(V8RangeError, exceptionState.code());
}
-void resetCanvasForAccessibilityRectTest(HTMLDocument& document)
+void resetCanvasForAccessibilityRectTest(Document& document)
{
document.documentElement()->setInnerHTML(
"<canvas id='canvas' style='position:absolute; top:0px; left:0px; padding:10px; margin:5px;'>"

Powered by Google App Engine
This is Rietveld 408576698