OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010, 2011 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
gReasons reasons) | 212 PassOwnPtr<GraphicsLayer> CompositedLayerMapping::createGraphicsLayer(Compositin
gReasons reasons) |
213 { | 213 { |
214 GraphicsLayerFactory* graphicsLayerFactory = nullptr; | 214 GraphicsLayerFactory* graphicsLayerFactory = nullptr; |
215 if (Page* page = layoutObject()->frame()->page()) | 215 if (Page* page = layoutObject()->frame()->page()) |
216 graphicsLayerFactory = page->chromeClient().graphicsLayerFactory(); | 216 graphicsLayerFactory = page->chromeClient().graphicsLayerFactory(); |
217 | 217 |
218 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFac
tory, this); | 218 OwnPtr<GraphicsLayer> graphicsLayer = GraphicsLayer::create(graphicsLayerFac
tory, this); |
219 | 219 |
220 graphicsLayer->setCompositingReasons(reasons); | 220 graphicsLayer->setCompositingReasons(reasons); |
221 if (Node* owningNode = m_owningLayer.layoutObject()->generatingNode()) | |
222 graphicsLayer->setOwnerNodeId(DOMNodeIds::idForNode(owningNode)); | |
223 | |
224 return graphicsLayer.release(); | 221 return graphicsLayer.release(); |
225 } | 222 } |
226 | 223 |
227 void CompositedLayerMapping::createPrimaryGraphicsLayer() | 224 void CompositedLayerMapping::createPrimaryGraphicsLayer() |
228 { | 225 { |
229 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); | 226 m_graphicsLayer = createGraphicsLayer(m_owningLayer.compositingReasons()); |
230 | 227 |
231 updateOpacity(layoutObject()->styleRef()); | 228 updateOpacity(layoutObject()->styleRef()); |
232 updateTransform(layoutObject()->styleRef()); | 229 updateTransform(layoutObject()->styleRef()); |
233 updateFilters(layoutObject()->styleRef()); | 230 updateFilters(layoutObject()->styleRef()); |
(...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2598 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { | 2595 } else if (graphicsLayer == m_scrollingBlockSelectionLayer.get()) { |
2599 name = "Scrolling Block Selection Layer"; | 2596 name = "Scrolling Block Selection Layer"; |
2600 } else { | 2597 } else { |
2601 ASSERT_NOT_REACHED(); | 2598 ASSERT_NOT_REACHED(); |
2602 } | 2599 } |
2603 | 2600 |
2604 return name; | 2601 return name; |
2605 } | 2602 } |
2606 | 2603 |
2607 } // namespace blink | 2604 } // namespace blink |
OLD | NEW |