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

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

Issue 735033003: Remove a bunch of dead code from RenderLayer (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: cr comments Created 6 years 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/RenderObject.h ('k') | sky/engine/core/rendering/RenderReplaced.cpp » ('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) 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 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 current->addAbsoluteRectForLayer(result); 1200 current->addAbsoluteRectForLayer(result);
1201 return result; 1201 return result;
1202 } 1202 }
1203 1203
1204 void RenderObject::paint(PaintInfo&, const LayoutPoint&) 1204 void RenderObject::paint(PaintInfo&, const LayoutPoint&)
1205 { 1205 {
1206 } 1206 }
1207 1207
1208 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons t 1208 const RenderLayerModelObject* RenderObject::containerForPaintInvalidation() cons t
1209 { 1209 {
1210 if (!isRooted()) 1210 return isRooted() ? view() : 0;
1211 return 0;
1212
1213 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta iner());
1214 }
1215
1216 const RenderLayerModelObject* RenderObject::enclosingCompositedContainer() const
1217 {
1218 RenderLayerModelObject* container = 0;
1219 if (RenderLayer* compositingLayer = enclosingLayer()->enclosingLayerForPaint InvalidationCrossingFrameBoundaries())
1220 container = compositingLayer->renderer();
1221 return container;
1222 } 1211 }
1223 1212
1224 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA ncestors(const RenderLayerModelObject* paintInvalidationContainer) const 1213 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA ncestors(const RenderLayerModelObject* paintInvalidationContainer) const
1225 { 1214 {
1215 // FIXME(sky): We shouldn't have any special ancestors and we don't have com posited containers
1226 if (paintInvalidationContainer) 1216 if (paintInvalidationContainer)
1227 return paintInvalidationContainer; 1217 return paintInvalidationContainer;
1228 1218 return view();
1229 RenderView* renderView = view();
1230 return renderView;
1231 }
1232
1233 bool RenderObject::isPaintInvalidationContainer() const
1234 {
1235 return hasLayer() && toRenderLayerModelObject(this)->layer()->isPaintInvalid ationContainer();
1236 } 1219 }
1237 1220
1238 template <typename T> 1221 template <typename T>
1239 void addJsonObjectForRect(TracedValue* value, const char* name, const T& rect) 1222 void addJsonObjectForRect(TracedValue* value, const char* name, const T& rect)
1240 { 1223 {
1241 value->beginDictionary(name); 1224 value->beginDictionary(name);
1242 value->setDouble("x", rect.x()); 1225 value->setDouble("x", rect.x());
1243 value->setDouble("y", rect.y()); 1226 value->setDouble("y", rect.y());
1244 value->setDouble("width", rect.width()); 1227 value->setDouble("width", rect.width());
1245 value->setDouble("height", rect.height()); 1228 value->setDouble("height", rect.height());
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2589 { 2572 {
2590 if (object1) { 2573 if (object1) {
2591 const blink::RenderObject* root = object1; 2574 const blink::RenderObject* root = object1;
2592 while (root->parent()) 2575 while (root->parent())
2593 root = root->parent(); 2576 root = root->parent();
2594 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 2577 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
2595 } 2578 }
2596 } 2579 }
2597 2580
2598 #endif 2581 #endif
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderObject.h ('k') | sky/engine/core/rendering/RenderReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698