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

Side by Side Diff: Source/core/inspector/InspectorLayerTreeAgent.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.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 /* 1 /*
2 * Copyright (C) 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2012 Apple Inc. All rights reserved.
3 * Copyright (C) 2013 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 LayerIdToNodeIdMap layerIdToNodeIdMap; 225 LayerIdToNodeIdMap layerIdToNodeIdMap;
226 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil der::Array<TypeBuilder::LayerTree::Layer>::create(); 226 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::Layer> > layers = TypeBuil der::Array<TypeBuilder::LayerTree::Layer>::create();
227 buildLayerIdToNodeIdMap(compositor->rootLayer(), layerIdToNodeIdMap); 227 buildLayerIdToNodeIdMap(compositor->rootLayer(), layerIdToNodeIdMap);
228 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers); 228 gatherGraphicsLayers(rootGraphicsLayer(), layerIdToNodeIdMap, layers);
229 return layers.release(); 229 return layers.release();
230 } 230 }
231 231
232 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(Layer* root, LayerIdToNode IdMap& layerIdToNodeIdMap) 232 void InspectorLayerTreeAgent::buildLayerIdToNodeIdMap(Layer* root, LayerIdToNode IdMap& layerIdToNodeIdMap)
233 { 233 {
234 if (root->hasCompositedLayerMapping()) { 234 if (root->hasCompositedLayerMapping()) {
235 if (Node* node = root->renderer()->generatingNode()) { 235 if (Node* node = root->layoutObject()->generatingNode()) {
236 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child ForSuperlayers(); 236 GraphicsLayer* graphicsLayer = root->compositedLayerMapping()->child ForSuperlayers();
237 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo de(node)); 237 layerIdToNodeIdMap.set(graphicsLayer->platformLayer()->id(), idForNo de(node));
238 } 238 }
239 } 239 }
240 for (Layer* child = root->firstChild(); child; child = child->nextSibling()) 240 for (Layer* child = root->firstChild(); child; child = child->nextSibling())
241 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap); 241 buildLayerIdToNodeIdMap(child, layerIdToNodeIdMap);
242 if (!root->renderer()->isLayoutIFrame()) 242 if (!root->layoutObject()->isLayoutIFrame())
243 return; 243 return;
244 FrameView* childFrameView = toFrameView(toLayoutPart(root->renderer())->widg et()); 244 FrameView* childFrameView = toFrameView(toLayoutPart(root->layoutObject())-> widget());
245 if (LayoutView* childLayoutView = childFrameView->layoutView()) { 245 if (LayoutView* childLayoutView = childFrameView->layoutView()) {
246 if (LayerCompositor* childCompositor = childLayoutView->compositor()) 246 if (LayerCompositor* childCompositor = childLayoutView->compositor())
247 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeI dMap); 247 buildLayerIdToNodeIdMap(childCompositor->rootLayer(), layerIdToNodeI dMap);
248 } 248 }
249 } 249 }
250 250
251 void InspectorLayerTreeAgent::gatherGraphicsLayers(GraphicsLayer* root, HashMap< int, int>& layerIdToNodeIdMap, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree: :Layer> >& layers) 251 void InspectorLayerTreeAgent::gatherGraphicsLayers(GraphicsLayer* root, HashMap< int, int>& layerIdToNodeIdMap, RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree: :Layer> >& layers)
252 { 252 {
253 int layerId = root->platformLayer()->id(); 253 int layerId = root->platformLayer()->id();
254 if (m_pageOverlayLayerIds.find(layerId) != WTF::kNotFound) 254 if (m_pageOverlayLayerIds.find(layerId) != WTF::kNotFound)
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) 487 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer)
488 { 488 {
489 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); 489 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id());
490 if (index == WTF::kNotFound) 490 if (index == WTF::kNotFound)
491 return; 491 return;
492 m_pageOverlayLayerIds.remove(index); 492 m_pageOverlayLayerIds.remove(index);
493 } 493 }
494 494
495 495
496 } // namespace blink 496 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.cpp ('k') | Source/core/inspector/InspectorOverlay.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698