OLD | NEW |
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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 if (!graphicsLayer->contentsAreVisible()) | 112 if (!graphicsLayer->contentsAreVisible()) |
113 layerObject->setInvisible(true); | 113 layerObject->setInvisible(true); |
114 const TransformationMatrix& transform = graphicsLayer->transform(); | 114 const TransformationMatrix& transform = graphicsLayer->transform(); |
115 if (!transform.isIdentity()) { | 115 if (!transform.isIdentity()) { |
116 TransformationMatrix::FloatMatrix4 flattenedMatrix; | 116 TransformationMatrix::FloatMatrix4 flattenedMatrix; |
117 transform.toColumnMajorFloatArray(flattenedMatrix); | 117 transform.toColumnMajorFloatArray(flattenedMatrix); |
118 RefPtr<TypeBuilder::Array<double> > transformArray = TypeBuilder::Array<
double>::create(); | 118 RefPtr<TypeBuilder::Array<double> > transformArray = TypeBuilder::Array<
double>::create(); |
119 for (size_t i = 0; i < WTF_ARRAY_LENGTH(flattenedMatrix); ++i) | 119 for (size_t i = 0; i < WTF_ARRAY_LENGTH(flattenedMatrix); ++i) |
120 transformArray->addItem(flattenedMatrix[i]); | 120 transformArray->addItem(flattenedMatrix[i]); |
121 layerObject->setTransform(transformArray); | 121 layerObject->setTransform(transformArray); |
122 const FloatPoint3D& anchor = graphicsLayer->anchorPoint(); | 122 const FloatPoint3D& transformOrigin = graphicsLayer->transformOrigin(); |
123 layerObject->setAnchorX(anchor.x()); | 123 // FIXME: rename these to setTransformOrigin* |
124 layerObject->setAnchorY(anchor.y()); | 124 layerObject->setAnchorX(transformOrigin.x()); |
125 layerObject->setAnchorZ(anchor.z()); | 125 layerObject->setAnchorY(transformOrigin.y()); |
| 126 layerObject->setAnchorZ(transformOrigin.z()); |
126 } | 127 } |
127 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::ScrollRect> > scrollRects
= buildScrollRectsForLayer(graphicsLayer); | 128 RefPtr<TypeBuilder::Array<TypeBuilder::LayerTree::ScrollRect> > scrollRects
= buildScrollRectsForLayer(graphicsLayer); |
128 if (scrollRects) | 129 if (scrollRects) |
129 layerObject->setScrollRects(scrollRects.release()); | 130 layerObject->setScrollRects(scrollRects.release()); |
130 return layerObject; | 131 return layerObject; |
131 } | 132 } |
132 | 133 |
133 InspectorLayerTreeAgent::InspectorLayerTreeAgent(Page* page) | 134 InspectorLayerTreeAgent::InspectorLayerTreeAgent(Page* page) |
134 : InspectorBaseAgent<InspectorLayerTreeAgent>("LayerTree") | 135 : InspectorBaseAgent<InspectorLayerTreeAgent>("LayerTree") |
135 , m_frontend(0) | 136 , m_frontend(0) |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
398 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) | 399 void InspectorLayerTreeAgent::didRemovePageOverlay(const GraphicsLayer* layer) |
399 { | 400 { |
400 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); | 401 size_t index = m_pageOverlayLayerIds.find(layer->platformLayer()->id()); |
401 if (index == WTF::kNotFound) | 402 if (index == WTF::kNotFound) |
402 return; | 403 return; |
403 m_pageOverlayLayerIds.remove(index); | 404 m_pageOverlayLayerIds.remove(index); |
404 } | 405 } |
405 | 406 |
406 | 407 |
407 } // namespace WebCore | 408 } // namespace WebCore |
OLD | NEW |