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 801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 m_transform.clear(); | 812 m_transform.clear(); |
813 | 813 |
814 // Layers with transforms act as clip rects roots, so clear the cached c
lip rects here. | 814 // Layers with transforms act as clip rects roots, so clear the cached c
lip rects here. |
815 clearClipRectsIncludingDescendants(); | 815 clearClipRectsIncludingDescendants(); |
816 } | 816 } |
817 | 817 |
818 if (hasTransform) { | 818 if (hasTransform) { |
819 RenderBox* box = renderBox(); | 819 RenderBox* box = renderBox(); |
820 ASSERT(box); | 820 ASSERT(box); |
821 m_transform->makeIdentity(); | 821 m_transform->makeIdentity(); |
822 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec
t().size(), RenderStyle::IncludeTransformOrigin); | 822 box->style()->applyTransform(*m_transform, box->pixelSnappedBorderBoxRec
t().size(), RenderStyle::IncludeTransformOrigin, renderer()->view()); |
823 makeMatrixRenderable(*m_transform, canRender3DTransforms()); | 823 makeMatrixRenderable(*m_transform, canRender3DTransforms()); |
824 } | 824 } |
825 | 825 |
826 if (had3DTransform != has3DTransform()) | 826 if (had3DTransform != has3DTransform()) |
827 dirty3DTransformedDescendantStatus(); | 827 dirty3DTransformedDescendantStatus(); |
828 } | 828 } |
829 | 829 |
830 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
igin applyOrigin) const | 830 TransformationMatrix RenderLayer::currentTransform(RenderStyle::ApplyTransformOr
igin applyOrigin) const |
831 { | 831 { |
832 if (!m_transform) | 832 if (!m_transform) |
833 return TransformationMatrix(); | 833 return TransformationMatrix(); |
834 | 834 |
835 if (renderer()->style()->isRunningAcceleratedAnimation()) { | 835 if (renderer()->style()->isRunningAcceleratedAnimation()) { |
836 TransformationMatrix currTransform; | 836 TransformationMatrix currTransform; |
837 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleFor
Renderer(renderer()); | 837 RefPtr<RenderStyle> style = renderer()->animation()->getAnimatedStyleFor
Renderer(renderer()); |
838 style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxR
ect().size(), applyOrigin); | 838 style->applyTransform(currTransform, renderBox()->pixelSnappedBorderBoxR
ect().size(), applyOrigin, renderer()->view()); |
839 makeMatrixRenderable(currTransform, canRender3DTransforms()); | 839 makeMatrixRenderable(currTransform, canRender3DTransforms()); |
840 return currTransform; | 840 return currTransform; |
841 } | 841 } |
842 | 842 |
843 // m_transform includes transform-origin, so we need to recompute the transf
orm here. | 843 // m_transform includes transform-origin, so we need to recompute the transf
orm here. |
844 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { | 844 if (applyOrigin == RenderStyle::ExcludeTransformOrigin) { |
845 RenderBox* box = renderBox(); | 845 RenderBox* box = renderBox(); |
846 TransformationMatrix currTransform; | 846 TransformationMatrix currTransform; |
847 box->style()->applyTransform(currTransform, box->pixelSnappedBorderBoxRe
ct().size(), RenderStyle::ExcludeTransformOrigin); | 847 box->style()->applyTransform(currTransform, box->pixelSnappedBorderBoxRe
ct().size(), RenderStyle::ExcludeTransformOrigin, renderer()->view()); |
848 makeMatrixRenderable(currTransform, canRender3DTransforms()); | 848 makeMatrixRenderable(currTransform, canRender3DTransforms()); |
849 return currTransform; | 849 return currTransform; |
850 } | 850 } |
851 | 851 |
852 return *m_transform; | 852 return *m_transform; |
853 } | 853 } |
854 | 854 |
855 TransformationMatrix RenderLayer::renderableTransform(PaintBehavior paintBehavio
r) const | 855 TransformationMatrix RenderLayer::renderableTransform(PaintBehavior paintBehavio
r) const |
856 { | 856 { |
857 if (!m_transform) | 857 if (!m_transform) |
(...skipping 5493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6351 } | 6351 } |
6352 } | 6352 } |
6353 | 6353 |
6354 void showLayerTree(const WebCore::RenderObject* renderer) | 6354 void showLayerTree(const WebCore::RenderObject* renderer) |
6355 { | 6355 { |
6356 if (!renderer) | 6356 if (!renderer) |
6357 return; | 6357 return; |
6358 showLayerTree(renderer->enclosingLayer()); | 6358 showLayerTree(renderer->enclosingLayer()); |
6359 } | 6359 } |
6360 #endif | 6360 #endif |
OLD | NEW |