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 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1210 | 1210 |
1211 const char* RenderObject::invalidationReasonToString(InvalidationReason reason)
const | 1211 const char* RenderObject::invalidationReasonToString(InvalidationReason reason)
const |
1212 { | 1212 { |
1213 switch (reason) { | 1213 switch (reason) { |
1214 case InvalidationNone: | 1214 case InvalidationNone: |
1215 return "none"; | 1215 return "none"; |
1216 case InvalidationIncremental: | 1216 case InvalidationIncremental: |
1217 return "incremental"; | 1217 return "incremental"; |
1218 case InvalidationFull: | 1218 case InvalidationFull: |
1219 return "full"; | 1219 return "full"; |
1220 case InvalidationBorderFitLines: | |
1221 return "border fit lines"; | |
1222 case InvalidationBorderBoxChange: | 1220 case InvalidationBorderBoxChange: |
1223 return "border box change"; | 1221 return "border box change"; |
1224 case InvalidationBoundsChange: | 1222 case InvalidationBoundsChange: |
1225 return "bounds change"; | 1223 return "bounds change"; |
1226 case InvalidationLocationChange: | 1224 case InvalidationLocationChange: |
1227 return "location change"; | 1225 return "location change"; |
1228 case InvalidationBecameVisible: | 1226 case InvalidationBecameVisible: |
1229 return "became visible"; | 1227 return "became visible"; |
1230 case InvalidationBecameInvisible: | 1228 case InvalidationBecameInvisible: |
1231 return "became invisible"; | 1229 return "became invisible"; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); | 1312 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, oldBoun
ds, newBounds); |
1315 return invalidationReason; | 1313 return invalidationReason; |
1316 } | 1314 } |
1317 | 1315 |
1318 InvalidationReason RenderObject::getPaintInvalidationReason(const RenderLayerMod
elObject& paintInvalidationContainer, | 1316 InvalidationReason RenderObject::getPaintInvalidationReason(const RenderLayerMod
elObject& paintInvalidationContainer, |
1319 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, const LayoutRect& newBounds, const LayoutPoint& newPositionFromPain
tInvalidationBacking) | 1317 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida
tionBacking, const LayoutRect& newBounds, const LayoutPoint& newPositionFromPain
tInvalidationBacking) |
1320 { | 1318 { |
1321 if (shouldDoFullPaintInvalidation()) | 1319 if (shouldDoFullPaintInvalidation()) |
1322 return m_bitfields.fullPaintInvalidationReason(); | 1320 return m_bitfields.fullPaintInvalidationReason(); |
1323 | 1321 |
1324 // Presumably a background or a border exists if border-fit:lines was specif
ied. | |
1325 if (style()->borderFit() == BorderFitLines) | |
1326 return InvalidationBorderFitLines; | |
1327 | |
1328 if (compositingState() != PaintsIntoOwnBacking && newPositionFromPaintInvali
dationBacking != oldPositionFromPaintInvalidationBacking) | 1322 if (compositingState() != PaintsIntoOwnBacking && newPositionFromPaintInvali
dationBacking != oldPositionFromPaintInvalidationBacking) |
1329 return InvalidationLocationChange; | 1323 return InvalidationLocationChange; |
1330 | 1324 |
1331 // If the bounds are the same then we know that none of the statements below | 1325 // If the bounds are the same then we know that none of the statements below |
1332 // can match, so we can early out since we will not need to do any | 1326 // can match, so we can early out since we will not need to do any |
1333 // invalidation. | 1327 // invalidation. |
1334 if (oldBounds == newBounds) | 1328 if (oldBounds == newBounds) |
1335 return InvalidationNone; | 1329 return InvalidationNone; |
1336 | 1330 |
1337 // If we shifted, we don't know the exact reason so we are conservative and
trigger a full invalidation. Shifting could | 1331 // If we shifted, we don't know the exact reason so we are conservative and
trigger a full invalidation. Shifting could |
(...skipping 1835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3173 { | 3167 { |
3174 if (object1) { | 3168 if (object1) { |
3175 const blink::RenderObject* root = object1; | 3169 const blink::RenderObject* root = object1; |
3176 while (root->parent()) | 3170 while (root->parent()) |
3177 root = root->parent(); | 3171 root = root->parent(); |
3178 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3172 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3179 } | 3173 } |
3180 } | 3174 } |
3181 | 3175 |
3182 #endif | 3176 #endif |
OLD | NEW |