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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 testing::runPendingTasks(); | 75 testing::runPendingTasks(); |
76 return displayItems; | 76 return displayItems; |
77 } | 77 } |
78 | 78 |
79 // Number of rectangles that make up the root layer's touch handler region. | 79 // Number of rectangles that make up the root layer's touch handler region. |
80 size_t touchHandlerRegionSize() { | 80 size_t touchHandlerRegionSize() { |
81 size_t result = 0; | 81 size_t result = 0; |
82 PaintLayer* layer = | 82 PaintLayer* layer = |
83 webView().mainFrameImpl()->frame()->contentLayoutObject()->layer(); | 83 webView().mainFrameImpl()->frame()->contentLayoutObject()->layer(); |
84 GraphicsLayer* ownGraphicsLayer = | 84 GraphicsLayer* ownGraphicsLayer = |
85 layer->graphicsLayerBacking(layer->layoutObject()); | 85 layer->graphicsLayerBacking(&layer->layoutObject()); |
86 if (ownGraphicsLayer) { | 86 if (ownGraphicsLayer) { |
87 result += | 87 result += |
88 ownGraphicsLayer->platformLayer()->touchEventHandlerRegion().size(); | 88 ownGraphicsLayer->platformLayer()->touchEventHandlerRegion().size(); |
89 } | 89 } |
90 GraphicsLayer* childGraphicsLayer = layer->graphicsLayerBacking(); | 90 GraphicsLayer* childGraphicsLayer = layer->graphicsLayerBacking(); |
91 if (childGraphicsLayer && childGraphicsLayer != ownGraphicsLayer) { | 91 if (childGraphicsLayer && childGraphicsLayer != ownGraphicsLayer) { |
92 result += | 92 result += |
93 childGraphicsLayer->platformLayer()->touchEventHandlerRegion().size(); | 93 childGraphicsLayer->platformLayer()->touchEventHandlerRegion().size(); |
94 } | 94 } |
95 return result; | 95 return result; |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 compositeFrame(); | 1045 compositeFrame(); |
1046 EXPECT_TRUE(frameDocument->view()->canThrottleRendering()); | 1046 EXPECT_TRUE(frameDocument->view()->canThrottleRendering()); |
1047 | 1047 |
1048 // Setting display:none unthrottles the frame. | 1048 // Setting display:none unthrottles the frame. |
1049 frameElement->setAttribute(styleAttr, "display: none"); | 1049 frameElement->setAttribute(styleAttr, "display: none"); |
1050 compositeFrame(); | 1050 compositeFrame(); |
1051 EXPECT_FALSE(frameDocument->view()->canThrottleRendering()); | 1051 EXPECT_FALSE(frameDocument->view()->canThrottleRendering()); |
1052 } | 1052 } |
1053 | 1053 |
1054 } // namespace blink | 1054 } // namespace blink |
OLD | NEW |