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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTestHelper.h

Issue 1516893002: Second reland: Fix incorrect sign in scroll and content box offset in absoluteToLocalPoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef LayoutTestHelper_h 5 #ifndef LayoutTestHelper_h
6 #define LayoutTestHelper_h 6 #define LayoutTestHelper_h
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameHost.h" 9 #include "core/frame/FrameHost.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 20 matching lines...) Expand all
31 31
32 Document& document() const { return m_pageHolder->document(); } 32 Document& document() const { return m_pageHolder->document(); }
33 33
34 // Both sets the inner html and runs the document lifecycle. 34 // Both sets the inner html and runs the document lifecycle.
35 void setBodyInnerHTML(const String& htmlContent) 35 void setBodyInnerHTML(const String& htmlContent)
36 { 36 {
37 document().body()->setInnerHTML(htmlContent, ASSERT_NO_EXCEPTION); 37 document().body()->setInnerHTML(htmlContent, ASSERT_NO_EXCEPTION);
38 document().view()->updateAllLifecyclePhases(); 38 document().view()->updateAllLifecyclePhases();
39 } 39 }
40 40
41 // Returns the Document for the iframe.
42 Document& setupChildIframe(const AtomicString& iframeElementId, const String & htmlContentOfIframe);
43
41 // Both enables compositing and runs the document lifecycle. 44 // Both enables compositing and runs the document lifecycle.
42 void enableCompositing() 45 void enableCompositing()
43 { 46 {
44 m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true); 47 m_pageHolder->page().settings().setAcceleratedCompositingEnabled(true);
45 document().view()->updateAllLifecyclePhases(); 48 document().view()->updateAllLifecyclePhases();
46 } 49 }
47 50
48 private: 51 private:
52 RefPtrWillBePersistent<LocalFrame> m_subframe;
53 OwnPtrWillBePersistent<FrameLoaderClient> m_frameLoaderClient;
49 OwnPtr<DummyPageHolder> m_pageHolder; 54 OwnPtr<DummyPageHolder> m_pageHolder;
50 }; 55 };
51 56
52 class SingleChildFrameLoaderClient final : public EmptyFrameLoaderClient { 57 class SingleChildFrameLoaderClient final : public EmptyFrameLoaderClient {
53 public: 58 public:
54 static PassOwnPtrWillBeRawPtr<SingleChildFrameLoaderClient> create() { retur n adoptPtrWillBeNoop(new SingleChildFrameLoaderClient); } 59 static PassOwnPtrWillBeRawPtr<SingleChildFrameLoaderClient> create() { retur n adoptPtrWillBeNoop(new SingleChildFrameLoaderClient); }
55 60
56 DEFINE_INLINE_VIRTUAL_TRACE() 61 DEFINE_INLINE_VIRTUAL_TRACE()
57 { 62 {
58 visitor->trace(m_child); 63 visitor->trace(m_child);
(...skipping 28 matching lines...) Expand all
87 92
88 private: 93 private:
89 explicit FrameLoaderClientWithParent(Frame* parent) : m_parent(parent) { } 94 explicit FrameLoaderClientWithParent(Frame* parent) : m_parent(parent) { }
90 95
91 RefPtrWillBeMember<Frame> m_parent; 96 RefPtrWillBeMember<Frame> m_parent;
92 }; 97 };
93 98
94 } // namespace blink 99 } // namespace blink
95 100
96 #endif // LayoutTestHelper_h 101 #endif // LayoutTestHelper_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTestHelper.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698