Chromium Code Reviews| 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, 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 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 if (!isRooted()) |
| 1211 return 0; | 1211 return 0; |
| 1212 | 1212 // ?? |
|
ojan
2014/11/29 01:48:15
Yup. This is right for now. All paint invalidation
| |
| 1213 return adjustCompositedContainerForSpecialAncestors(enclosingCompositedConta iner()); | 1213 return view(); |
| 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 } | 1214 } |
| 1223 | 1215 |
| 1224 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA ncestors(const RenderLayerModelObject* paintInvalidationContainer) const | 1216 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA ncestors(const RenderLayerModelObject* paintInvalidationContainer) const |
| 1225 { | 1217 { |
| 1226 if (paintInvalidationContainer) | 1218 if (paintInvalidationContainer) |
| 1227 return paintInvalidationContainer; | 1219 return paintInvalidationContainer; |
| 1228 | 1220 // ?? |
|
ojan
2014/11/29 01:48:15
We can get rid of the concept now. We shouldn't ha
| |
| 1229 RenderView* renderView = view(); | 1221 return view(); |
| 1230 return renderView; | |
| 1231 } | |
| 1232 | |
| 1233 bool RenderObject::isPaintInvalidationContainer() const | |
| 1234 { | |
| 1235 return hasLayer() && toRenderLayerModelObject(this)->layer()->isPaintInvalid ationContainer(); | |
| 1236 } | 1222 } |
| 1237 | 1223 |
| 1238 template <typename T> | 1224 template <typename T> |
| 1239 void addJsonObjectForRect(TracedValue* value, const char* name, const T& rect) | 1225 void addJsonObjectForRect(TracedValue* value, const char* name, const T& rect) |
| 1240 { | 1226 { |
| 1241 value->beginDictionary(name); | 1227 value->beginDictionary(name); |
| 1242 value->setDouble("x", rect.x()); | 1228 value->setDouble("x", rect.x()); |
| 1243 value->setDouble("y", rect.y()); | 1229 value->setDouble("y", rect.y()); |
| 1244 value->setDouble("width", rect.width()); | 1230 value->setDouble("width", rect.width()); |
| 1245 value->setDouble("height", rect.height()); | 1231 value->setDouble("height", rect.height()); |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2589 { | 2575 { |
| 2590 if (object1) { | 2576 if (object1) { |
| 2591 const blink::RenderObject* root = object1; | 2577 const blink::RenderObject* root = object1; |
| 2592 while (root->parent()) | 2578 while (root->parent()) |
| 2593 root = root->parent(); | 2579 root = root->parent(); |
| 2594 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2580 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2595 } | 2581 } |
| 2596 } | 2582 } |
| 2597 | 2583 |
| 2598 #endif | 2584 #endif |
| OLD | NEW |