OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. |
7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 1970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1981 | 1981 |
1982 void RenderObject::getTransformFromContainer(const RenderObject* containerObject
, const IntSize& offsetInContainer, TransformationMatrix& transform) const | 1982 void RenderObject::getTransformFromContainer(const RenderObject* containerObject
, const IntSize& offsetInContainer, TransformationMatrix& transform) const |
1983 { | 1983 { |
1984 transform.makeIdentity(); | 1984 transform.makeIdentity(); |
1985 transform.translate(offsetInContainer.width(), offsetInContainer.height()); | 1985 transform.translate(offsetInContainer.width(), offsetInContainer.height()); |
1986 RenderLayer* layer; | 1986 RenderLayer* layer; |
1987 if (hasLayer() && (layer = toRenderBoxModelObject(this)->layer()) && layer->
transform()) | 1987 if (hasLayer() && (layer = toRenderBoxModelObject(this)->layer()) && layer->
transform()) |
1988 transform.multLeft(layer->currentTransform()); | 1988 transform.multLeft(layer->currentTransform()); |
1989 | 1989 |
1990 #if ENABLE(3D_RENDERING) | 1990 #if ENABLE(3D_RENDERING) |
1991 if (containerObject && containerObject->isBox() && containerObject->hasLayer
() && containerObject->style()->hasPerspective()) { | 1991 if (containerObject && containerObject->hasLayer() && containerObject->style
()->hasPerspective()) { |
1992 // Perpsective on the container affects us, so we have to factor it in h
ere. | 1992 // Perpsective on the container affects us, so we have to factor it in h
ere. |
1993 ASSERT(containerObject->hasLayer()); | 1993 ASSERT(containerObject->hasLayer()); |
1994 FloatPoint perspectiveOrigin = toRenderBox(containerObject)->layer()->pe
rspectiveOrigin(); | 1994 FloatPoint perspectiveOrigin = toRenderBoxModelObject(containerObject)->
layer()->perspectiveOrigin(); |
1995 | 1995 |
1996 TransformationMatrix perspectiveMatrix; | 1996 TransformationMatrix perspectiveMatrix; |
1997 perspectiveMatrix.applyPerspective(containerObject->style()->perspective
()); | 1997 perspectiveMatrix.applyPerspective(containerObject->style()->perspective
()); |
1998 | 1998 |
1999 transform.translateRight3d(-perspectiveOrigin.x(), -perspectiveOrigin.y(
), 0); | 1999 transform.translateRight3d(-perspectiveOrigin.x(), -perspectiveOrigin.y(
), 0); |
2000 transform.multiply(perspectiveMatrix); | 2000 transform.multiply(perspectiveMatrix); |
2001 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(),
0); | 2001 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(),
0); |
2002 } | 2002 } |
2003 #else | 2003 #else |
2004 UNUSED_PARAM(containerObject); | 2004 UNUSED_PARAM(containerObject); |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2759 { | 2759 { |
2760 if (object1) { | 2760 if (object1) { |
2761 const WebCore::RenderObject* root = object1; | 2761 const WebCore::RenderObject* root = object1; |
2762 while (root->parent()) | 2762 while (root->parent()) |
2763 root = root->parent(); | 2763 root = root->parent(); |
2764 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2764 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
2765 } | 2765 } |
2766 } | 2766 } |
2767 | 2767 |
2768 #endif | 2768 #endif |
OLD | NEW |