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

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

Issue 965013003: Move transforms from RenderLayer to RenderBox. (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
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2317 const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderBox * ancestorToStopAt, RenderGeometryMap& geometryMap) const 2317 const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderBox * ancestorToStopAt, RenderGeometryMap& geometryMap) const
2318 { 2318 {
2319 ASSERT(ancestorToStopAt != this); 2319 ASSERT(ancestorToStopAt != this);
2320 2320
2321 bool ancestorSkipped; 2321 bool ancestorSkipped;
2322 RenderObject* container = this->container(ancestorToStopAt, &ancestorSkipped ); 2322 RenderObject* container = this->container(ancestorToStopAt, &ancestorSkipped );
2323 if (!container) 2323 if (!container)
2324 return 0; 2324 return 0;
2325 2325
2326 bool isInline = isRenderInline(); 2326 bool isInline = isRenderInline();
2327 bool hasTransform = !isInline && hasLayer() && toRenderBox(this)->layer()->t ransform(); 2327 bool hasTransform = !isInline && isBox() && toRenderBox(this)->transform();
2328 2328
2329 LayoutSize adjustmentForSkippedAncestor; 2329 LayoutSize adjustmentForSkippedAncestor;
2330 if (ancestorSkipped) { 2330 if (ancestorSkipped) {
2331 // There can't be a transform between paintInvalidationContainer and o, because transforms create containers, so it should be safe 2331 // There can't be a transform between paintInvalidationContainer and o, because transforms create containers, so it should be safe
2332 // to just subtract the delta between the ancestor and o. 2332 // to just subtract the delta between the ancestor and o.
2333 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container); 2333 adjustmentForSkippedAncestor = -ancestorToStopAt->offsetFromAncestorCont ainer(container);
2334 } 2334 }
2335 2335
2336 bool offsetDependsOnPoint = false; 2336 bool offsetDependsOnPoint = false;
2337 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), & offsetDependsOnPoint); 2337 LayoutSize containerOffset = offsetFromContainer(container, LayoutPoint(), & offsetDependsOnPoint);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
2394 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); 2394 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent());
2395 for (RenderObject* child = slowFirstChild(); child; ) { 2395 for (RenderObject* child = slowFirstChild(); child; ) {
2396 // Save our next sibling as moveChildTo will clear it. 2396 // Save our next sibling as moveChildTo will clear it.
2397 RenderObject* nextSibling = child->nextSibling(); 2397 RenderObject* nextSibling = child->nextSibling();
2398 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); 2398 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert);
2399 child = nextSibling; 2399 child = nextSibling;
2400 } 2400 }
2401 } 2401 }
2402 2402
2403 } // namespace blink 2403 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderBox.cpp ('k') | sky/engine/core/rendering/RenderLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698