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

Side by Side Diff: third_party/WebKit/Source/web/tests/FrameThrottlingTest.cpp

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: Rebase Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "bindings/core/v8/ScriptController.h" 5 #include "bindings/core/v8/ScriptController.h"
6 #include "bindings/core/v8/ScriptSourceCode.h" 6 #include "bindings/core/v8/ScriptSourceCode.h"
7 #include "core/dom/Document.h" 7 #include "core/dom/Document.h"
8 #include "core/dom/Element.h" 8 #include "core/dom/Element.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 25 matching lines...) Expand all
36 using namespace HTMLNames; 36 using namespace HTMLNames;
37 37
38 // NOTE: This test uses <iframe sandbox> to create cross origin iframes. 38 // NOTE: This test uses <iframe sandbox> to create cross origin iframes.
39 39
40 namespace { 40 namespace {
41 41
42 class MockWebDisplayItemList : public WebDisplayItemList { 42 class MockWebDisplayItemList : public WebDisplayItemList {
43 public: 43 public:
44 ~MockWebDisplayItemList() override {} 44 ~MockWebDisplayItemList() override {}
45 45
46 MOCK_METHOD2(appendDrawingItem, void(const WebRect&, sk_sp<const SkPicture>)); 46 MOCK_METHOD2(appendDrawingItem,
47 void(const WebRect&, sk_sp<const PaintRecord>));
47 }; 48 };
48 49
49 void paintRecursively(GraphicsLayer* layer, WebDisplayItemList* displayItems) { 50 void paintRecursively(GraphicsLayer* layer, WebDisplayItemList* displayItems) {
50 if (layer->drawsContent()) { 51 if (layer->drawsContent()) {
51 layer->setNeedsDisplay(); 52 layer->setNeedsDisplay();
52 layer->contentLayerDelegateForTesting()->paintContents( 53 layer->contentLayerDelegateForTesting()->paintContents(
53 displayItems, ContentLayerDelegate::PaintDefaultBehaviorForTest); 54 displayItems, ContentLayerDelegate::PaintDefaultBehaviorForTest);
54 } 55 }
55 for (const auto& child : layer->children()) 56 for (const auto& child : layer->children())
56 paintRecursively(child, displayItems); 57 paintRecursively(child, displayItems);
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 // The first update unthrottles the frame, the second actually update layout 972 // The first update unthrottles the frame, the second actually update layout
972 // and paint properties etc. 973 // and paint properties etc.
973 compositeFrame(); 974 compositeFrame();
974 compositeFrame(); 975 compositeFrame();
975 EXPECT_FALSE(frameDocument->view()->canThrottleRendering()); 976 EXPECT_FALSE(frameDocument->view()->canThrottleRendering());
976 EXPECT_EQ(TransformationMatrix().translate(0, 20), 977 EXPECT_EQ(TransformationMatrix().translate(0, 20),
977 innerDiv->layoutObject()->paintProperties()->transform()->matrix()); 978 innerDiv->layoutObject()->paintProperties()->transform()->matrix());
978 } 979 }
979 980
980 } // namespace blink 981 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698