| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |