| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 if (shouldPreserve3D()) | 389 if (shouldPreserve3D()) |
| 390 renderingContext = this; | 390 renderingContext = this; |
| 391 | 391 |
| 392 for (DeprecatedPaintLayer* current = enclosingLayerForContainingBlock(this);
current && current->shouldPreserve3D(); current = enclosingLayerForContainingBl
ock(current)) | 392 for (DeprecatedPaintLayer* current = enclosingLayerForContainingBlock(this);
current && current->shouldPreserve3D(); current = enclosingLayerForContainingBl
ock(current)) |
| 393 renderingContext = current; | 393 renderingContext = current; |
| 394 | 394 |
| 395 return renderingContext; | 395 return renderingContext; |
| 396 } | 396 } |
| 397 | 397 |
| 398 TransformationMatrix DeprecatedPaintLayer::currentTransform(ComputedStyle::Apply
TransformOrigin applyOrigin) const | 398 TransformationMatrix DeprecatedPaintLayer::currentTransform() const |
| 399 { | 399 { |
| 400 if (!m_transform) | 400 if (!m_transform) |
| 401 return TransformationMatrix(); | 401 return TransformationMatrix(); |
| 402 | |
| 403 // m_transform includes transform-origin, so we need to recompute the transf
orm here. | |
| 404 if (applyOrigin == ComputedStyle::ExcludeTransformOrigin) { | |
| 405 LayoutBox* box = layoutBox(); | |
| 406 TransformationMatrix currTransform; | |
| 407 box->style()->applyTransform(currTransform, LayoutSize(box->pixelSnapped
Size()), ComputedStyle::ExcludeTransformOrigin); | |
| 408 makeMatrixRenderable(currTransform, compositor()->hasAcceleratedComposit
ing()); | |
| 409 return currTransform; | |
| 410 } | |
| 411 | |
| 412 return *m_transform; | 402 return *m_transform; |
| 413 } | 403 } |
| 414 | 404 |
| 415 TransformationMatrix DeprecatedPaintLayer::renderableTransform(PaintBehavior pai
ntBehavior) const | 405 TransformationMatrix DeprecatedPaintLayer::renderableTransform(PaintBehavior pai
ntBehavior) const |
| 416 { | 406 { |
| 417 if (!m_transform) | 407 if (!m_transform) |
| 418 return TransformationMatrix(); | 408 return TransformationMatrix(); |
| 419 | 409 |
| 420 if (paintBehavior & PaintBehaviorFlattenCompositingLayers) { | 410 if (paintBehavior & PaintBehaviorFlattenCompositingLayers) { |
| 421 TransformationMatrix matrix = *m_transform; | 411 TransformationMatrix matrix = *m_transform; |
| (...skipping 2341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2763 | 2753 |
| 2764 void showLayerTree(const blink::LayoutObject* layoutObject) | 2754 void showLayerTree(const blink::LayoutObject* layoutObject) |
| 2765 { | 2755 { |
| 2766 if (!layoutObject) { | 2756 if (!layoutObject) { |
| 2767 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); | 2757 fprintf(stderr, "Cannot showLayerTree. Root is (nil)\n"); |
| 2768 return; | 2758 return; |
| 2769 } | 2759 } |
| 2770 showLayerTree(layoutObject->enclosingLayer()); | 2760 showLayerTree(layoutObject->enclosingLayer()); |
| 2771 } | 2761 } |
| 2772 #endif | 2762 #endif |
| OLD | NEW |