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

Side by Side Diff: Source/core/rendering/RenderingTestHelper.cpp

Issue 723103002: Revert "Move ViewDisplayList to GraphicsLayer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/rendering/RenderingTestHelper.h"
7
8 #include "core/loader/EmptyClients.h"
9 #include "platform/graphics/GraphicsLayer.h"
10 #include "platform/graphics/GraphicsLayerFactory.h"
11
12 namespace blink {
13
14 class FakeGraphicsLayerFactory : public GraphicsLayerFactory {
15 public:
16 virtual PassOwnPtr<GraphicsLayer> createGraphicsLayer(GraphicsLayerClient* c lient) override
17 {
18 return adoptPtr(new GraphicsLayer(client));
19 }
20 };
21
22 class FakeChromeClient : public EmptyChromeClient {
23 public:
24 virtual GraphicsLayerFactory* graphicsLayerFactory() const
25 {
26 static FakeGraphicsLayerFactory* factory = adoptPtr(new FakeGraphicsLaye rFactory).leakPtr();
27 return factory;
28 }
29 };
30
31 void RenderingTest::SetUp()
32 {
33 fillWithEmptyClients(m_pageClients);
34 static FakeChromeClient* chromeClient = adoptPtr(new FakeChromeClient).leakP tr();
35 m_pageClients.chromeClient = chromeClient;
36 m_pageHolder = DummyPageHolder::create(IntSize(800, 600), &m_pageClients);
37
38 document().settings()->setRegionBasedColumnsEnabled(true);
39
40 // This ensures that the minimal DOM tree gets attached
41 // correctly for tests that don't call setBodyInnerHTML.
42 document().view()->updateLayoutAndStyleIfNeededRecursive();
43 }
44
45
46 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderingTestHelper.h ('k') | Source/core/rendering/compositing/CompositedLayerMapping.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698