| 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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1223 return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, p
aintInvalidationState); | 1223 return clippedOverflowRectForPaintInvalidation(paintInvalidationContainer, p
aintInvalidationState); |
| 1224 } | 1224 } |
| 1225 | 1225 |
| 1226 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb
ject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidatio
nState) const | 1226 LayoutRect RenderObject::boundsRectForPaintInvalidation(const RenderLayerModelOb
ject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidatio
nState) const |
| 1227 { | 1227 { |
| 1228 if (!paintInvalidationContainer) | 1228 if (!paintInvalidationContainer) |
| 1229 return computePaintInvalidationRect(paintInvalidationContainer, paintInv
alidationState); | 1229 return computePaintInvalidationRect(paintInvalidationContainer, paintInv
alidationState); |
| 1230 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont
ainer->layer(), paintInvalidationState); | 1230 return RenderLayer::computePaintInvalidationRect(this, paintInvalidationCont
ainer->layer(), paintInvalidationState); |
| 1231 } | 1231 } |
| 1232 | 1232 |
| 1233 // FIXME(sky): Remove | |
| 1234 void RenderObject::invalidatePaintRectangle(const LayoutRect& r) const | |
| 1235 { | |
| 1236 } | |
| 1237 | |
| 1238 IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const | 1233 IntRect RenderObject::pixelSnappedAbsoluteClippedOverflowRect() const |
| 1239 { | 1234 { |
| 1240 return pixelSnappedIntRect(absoluteClippedOverflowRect()); | 1235 return pixelSnappedIntRect(absoluteClippedOverflowRect()); |
| 1241 } | 1236 } |
| 1242 | 1237 |
| 1243 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) | 1238 void RenderObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv
alidationState) |
| 1244 { | 1239 { |
| 1245 // If we didn't need paint invalidation then our children don't need as well
. | 1240 // If we didn't need paint invalidation then our children don't need as well
. |
| 1246 // Skip walking down the tree as everything should be fine below us. | 1241 // Skip walking down the tree as everything should be fine below us. |
| 1247 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) | 1242 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) |
| 1248 return; | 1243 return; |
| 1249 | 1244 |
| 1250 clearPaintInvalidationState(paintInvalidationState); | 1245 clearPaintInvalidationState(paintInvalidationState); |
| 1251 | 1246 |
| 1252 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 1247 for (RenderObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
| 1253 if (!child->isOutOfFlowPositioned()) | 1248 if (!child->isOutOfFlowPositioned()) |
| 1254 child->invalidateTreeIfNeeded(paintInvalidationState); | 1249 child->invalidateTreeIfNeeded(paintInvalidationState); |
| 1255 } | 1250 } |
| 1256 } | 1251 } |
| 1257 | 1252 |
| 1258 bool RenderObject::checkForPaintInvalidation() const | |
| 1259 { | |
| 1260 return !document().view()->needsFullPaintInvalidation() && everHadLayout(); | |
| 1261 } | |
| 1262 | |
| 1263 LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInval
idationState* paintInvalidationState) const | 1253 LayoutRect RenderObject::rectWithOutlineForPaintInvalidation(const RenderLayerMo
delObject* paintInvalidationContainer, LayoutUnit outlineWidth, const PaintInval
idationState* paintInvalidationState) const |
| 1264 { | 1254 { |
| 1265 LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContai
ner, paintInvalidationState)); | 1255 LayoutRect r(clippedOverflowRectForPaintInvalidation(paintInvalidationContai
ner, paintInvalidationState)); |
| 1266 r.inflate(outlineWidth); | 1256 r.inflate(outlineWidth); |
| 1267 return r; | 1257 return r; |
| 1268 } | 1258 } |
| 1269 | 1259 |
| 1270 LayoutRect RenderObject::absoluteClippedOverflowRect() const | 1260 LayoutRect RenderObject::absoluteClippedOverflowRect() const |
| 1271 { | 1261 { |
| 1272 return clippedOverflowRectForPaintInvalidation(view()); | 1262 return clippedOverflowRectForPaintInvalidation(view()); |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2343 { | 2333 { |
| 2344 if (object1) { | 2334 if (object1) { |
| 2345 const blink::RenderObject* root = object1; | 2335 const blink::RenderObject* root = object1; |
| 2346 while (root->parent()) | 2336 while (root->parent()) |
| 2347 root = root->parent(); | 2337 root = root->parent(); |
| 2348 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2338 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2349 } | 2339 } |
| 2350 } | 2340 } |
| 2351 | 2341 |
| 2352 #endif | 2342 #endif |
| OLD | NEW |