| 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 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1211 } | 1211 } |
| 1212 | 1212 |
| 1213 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA
ncestors(const RenderLayerModelObject* paintInvalidationContainer) const | 1213 const RenderLayerModelObject* RenderObject::adjustCompositedContainerForSpecialA
ncestors(const RenderLayerModelObject* paintInvalidationContainer) const |
| 1214 { | 1214 { |
| 1215 // FIXME(sky): We shouldn't have any special ancestors and we don't have com
posited containers | 1215 // FIXME(sky): We shouldn't have any special ancestors and we don't have com
posited containers |
| 1216 if (paintInvalidationContainer) | 1216 if (paintInvalidationContainer) |
| 1217 return paintInvalidationContainer; | 1217 return paintInvalidationContainer; |
| 1218 return view(); | 1218 return view(); |
| 1219 } | 1219 } |
| 1220 | 1220 |
| 1221 LayoutRect RenderObject::computePaintInvalidationRect(const RenderLayerModelObje
ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS
tate) const | |
| 1222 { | |
| 1223 return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, p
aintInvalidationState); | |
| 1224 } | |
| 1225 | |
| 1226 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb
ject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidatio
nState) const | |
| 1227 { | |
| 1228 if (!paintInvalidationContainer) | |
| 1229 return computePaintInvalidationRect(paintInvalidationContainer, paintInv
alidationState); | |
| 1230 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont
ainer->layer(), paintInvalidationState); | |
| 1231 } | |
| 1232 | |
| 1233 IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const | |
| 1234 { | |
| 1235 return pixelSnappedIntRect(absoluteClippedOverflowRect()); | |
| 1236 } | |
| 1237 | |
| 1238 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) | 1221 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) |
| 1239 { | 1222 { |
| 1240 // If we didn't need paint invalidation then our children don't need as well
. | 1223 // If we didn't need paint invalidation then our children don't need as well
. |
| 1241 // Skip walking down the tree as everything should be fine below us. | 1224 // Skip walking down the tree as everything should be fine below us. |
| 1242 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 1225 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| 1243 return; | 1226 return; |
| 1244 | 1227 |
| 1245 clearPaintInvalidationState(paintInvalidationState); | 1228 clearPaintInvalidationState(paintInvalidationState); |
| 1246 | 1229 |
| 1247 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 1230 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
| 1248 if (!child->isOutOfFlowPositioned()) | 1231 if (!child->isOutOfFlowPositioned()) |
| 1249 child->invalidateTreeIfNeeded(paintInvalidationState); | 1232 child->invalidateTreeIfNeeded(paintInvalidationState); |
| 1250 } | 1233 } |
| 1251 } | 1234 } |
| 1252 | 1235 |
| 1253 LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInval
idationState* paintInvalidationState) const | |
| 1254 { | |
| 1255 LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContai
ner, paintInvalidationState)); | |
| 1256 r.inflate(outlineWidth); | |
| 1257 return r; | |
| 1258 } | |
| 1259 | |
| 1260 LayoutRect RenderObject::absoluteClippedOverflowRect() const | |
| 1261 { | |
| 1262 return clippedOverflowRectForPaintInvalidation(view()); | |
| 1263 } | |
| 1264 | |
| 1265 LayoutRect RenderObject::clippedOverflowRectForPaintInvalidation(const RenderLay
erModelObject*, const PaintInvalidationState*) const | |
| 1266 { | |
| 1267 ASSERT_NOT_REACHED(); | |
| 1268 return LayoutRect(); | |
| 1269 } | |
| 1270 | |
| 1271 void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObjec
t* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* p
aintInvalidationState) const | 1236 void RenderObject::mapRectToPaintInvalidationBacking(const RenderLayerModelObjec
t* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidationState* p
aintInvalidationState) const |
| 1272 { | 1237 { |
| 1273 if (paintInvalidationContainer == this) | 1238 if (paintInvalidationContainer == this) |
| 1274 return; | 1239 return; |
| 1275 | 1240 |
| 1276 if (RenderObject* o = parent()) { | 1241 if (RenderObject* o = parent()) { |
| 1277 if (o->hasOverflowClip()) { | 1242 if (o->hasOverflowClip()) { |
| 1278 RenderBox* boxParent = toRenderBox(o); | 1243 RenderBox* boxParent = toRenderBox(o); |
| 1279 boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(rect); | 1244 boxParent->applyCachedClipAndScrollOffsetForPaintInvalidation(rect); |
| 1280 if (rect.isEmpty()) | 1245 if (rect.isEmpty()) |
| 1281 return; | 1246 return; |
| 1282 } | 1247 } |
| 1283 | 1248 |
| 1284 o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, p
aintInvalidationState); | 1249 o->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, p
aintInvalidationState); |
| 1285 } | 1250 } |
| 1286 } | 1251 } |
| 1287 | 1252 |
| 1288 void RenderObject::computeFloatRectForPaintInvalidation(const RenderLayerModelOb
ject*, FloatRect&, const PaintInvalidationState*) const | |
| 1289 { | |
| 1290 ASSERT_NOT_REACHED(); | |
| 1291 } | |
| 1292 | |
| 1293 void RenderObject::dirtyLinesFromChangedChild(RenderObject*) | 1253 void RenderObject::dirtyLinesFromChangedChild(RenderObject*) |
| 1294 { | 1254 { |
| 1295 } | 1255 } |
| 1296 | 1256 |
| 1297 #ifndef NDEBUG | 1257 #ifndef NDEBUG |
| 1298 | 1258 |
| 1299 void RenderObject::showTreeForThis() const | 1259 void RenderObject::showTreeForThis() const |
| 1300 { | 1260 { |
| 1301 if (node()) | 1261 if (node()) |
| 1302 node()->showTreeForThis(); | 1262 node()->showTreeForThis(); |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2333 { | 2293 { |
| 2334 if (object1) { | 2294 if (object1) { |
| 2335 const blink::RenderObject* root = object1; | 2295 const blink::RenderObject* root = object1; |
| 2336 while (root->parent()) | 2296 while (root->parent()) |
| 2337 root = root->parent(); | 2297 root = root->parent(); |
| 2338 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2298 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2339 } | 2299 } |
| 2340 } | 2300 } |
| 2341 | 2301 |
| 2342 #endif | 2302 #endif |
| OLD | NEW |