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

Side by Side Diff: WebCore/rendering/RenderObject.cpp

Issue 3404021: Merge 68158 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 2 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
« no previous file with comments | « LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt ('k') | no next file » | 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) 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
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->hasLayer() && containerObject->style ()->hasPerspective()) { 1991 if (containerObject && containerObject->isBox() && 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 = toRenderBox(containerObject)->layer()->pe rspectiveOrigin();
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);
(...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « LayoutTests/compositing/overflow/get-transform-from-non-box-container-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698