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

Side by Side Diff: sky/engine/core/rendering/RenderObject.cpp

Issue 961053002: Assorted cleanup of RenderLayer. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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
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, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
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 1414 matching lines...) Expand 10 before | Expand all | Expand 10 after
1425 { 1425 {
1426 transform.makeIdentity(); 1426 transform.makeIdentity();
1427 transform.translate(offsetInContainer.width().toFloat(), offsetInContainer.h eight().toFloat()); 1427 transform.translate(offsetInContainer.width().toFloat(), offsetInContainer.h eight().toFloat());
1428 RenderLayer* layer = hasLayer() ? toRenderBox(this)->layer() : 0; 1428 RenderLayer* layer = hasLayer() ? toRenderBox(this)->layer() : 0;
1429 if (layer && layer->transform()) 1429 if (layer && layer->transform())
1430 transform.multiply(*layer->transform()); 1430 transform.multiply(*layer->transform());
1431 1431
1432 if (containerObject && containerObject->hasLayer() && containerObject->style ()->hasPerspective()) { 1432 if (containerObject && containerObject->hasLayer() && containerObject->style ()->hasPerspective()) {
1433 // Perpsective on the container affects us, so we have to factor it in h ere. 1433 // Perpsective on the container affects us, so we have to factor it in h ere.
1434 ASSERT(containerObject->hasLayer()); 1434 ASSERT(containerObject->hasLayer());
1435 FloatPoint perspectiveOrigin = toRenderBox(containerObject)->layer()->pe rspectiveOrigin(); 1435 FloatPoint perspectiveOrigin = toRenderBox(containerObject)->perspective Origin();
1436 1436
1437 TransformationMatrix perspectiveMatrix; 1437 TransformationMatrix perspectiveMatrix;
1438 perspectiveMatrix.applyPerspective(containerObject->style()->perspective ()); 1438 perspectiveMatrix.applyPerspective(containerObject->style()->perspective ());
1439 1439
1440 transform.translateRight3d(-perspectiveOrigin.x(), -perspectiveOrigin.y( ), 0); 1440 transform.translateRight3d(-perspectiveOrigin.x(), -perspectiveOrigin.y( ), 0);
1441 transform = perspectiveMatrix * transform; 1441 transform = perspectiveMatrix * transform;
1442 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0); 1442 transform.translateRight3d(perspectiveOrigin.x(), perspectiveOrigin.y(), 0);
1443 } 1443 }
1444 } 1444 }
1445 1445
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1972 { 1972 {
1973 if (object1) { 1973 if (object1) {
1974 const blink::RenderObject* root = object1; 1974 const blink::RenderObject* root = object1;
1975 while (root->parent()) 1975 while (root->parent())
1976 root = root->parent(); 1976 root = root->parent();
1977 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 1977 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
1978 } 1978 }
1979 } 1979 }
1980 1980
1981 #endif 1981 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderLayer.cpp ('k') | sky/engine/core/rendering/RenderTreeAsText.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698