| 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 1784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1795 else if (updatedDiff.needsPositionedMovementLayout()) | 1795 else if (updatedDiff.needsPositionedMovementLayout()) |
| 1796 setNeedsPositionedMovementLayout(); | 1796 setNeedsPositionedMovementLayout(); |
| 1797 } | 1797 } |
| 1798 | 1798 |
| 1799 if (diff.transformChanged() && !needsLayout()) { | 1799 if (diff.transformChanged() && !needsLayout()) { |
| 1800 if (LayoutBlock* container = containingBlock()) | 1800 if (LayoutBlock* container = containingBlock()) |
| 1801 container->setNeedsOverflowRecalcAfterStyleChange(); | 1801 container->setNeedsOverflowRecalcAfterStyleChange(); |
| 1802 } | 1802 } |
| 1803 | 1803 |
| 1804 if (updatedDiff.needsPaintInvalidationLayer()) | 1804 if (updatedDiff.needsPaintInvalidationLayer()) |
| 1805 toLayoutBoxModelObject(this)->layer()->setShouldDoFullPaintInvalidationI
ncludingNonCompositingDescendants(); | 1805 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
| 1806 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali
dationObject()) | 1806 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali
dationObject()) |
| 1807 setShouldDoFullPaintInvalidation(); | 1807 setShouldDoFullPaintInvalidation(); |
| 1808 } | 1808 } |
| 1809 | 1809 |
| 1810 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) | 1810 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) |
| 1811 { | 1811 { |
| 1812 return layoutObject && layoutObject->hasBackground(); | 1812 return layoutObject && layoutObject->hasBackground(); |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne
wStyle) | 1815 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne
wStyle) |
| (...skipping 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3266 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintInval
idationRect(), PaintInvalidationLayer); | 3266 invalidatePaintUsingContainer(paintInvalidationContainer, previousPaintInval
idationRect(), PaintInvalidationLayer); |
| 3267 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) | 3267 if (RuntimeEnabledFeatures::slimmingPaintEnabled()) |
| 3268 invalidateDisplayItemClients(*paintInvalidationContainer); | 3268 invalidateDisplayItemClients(*paintInvalidationContainer); |
| 3269 | 3269 |
| 3270 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 3270 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
| 3271 if (!child->isPaintInvalidationContainer()) | 3271 if (!child->isPaintInvalidationContainer()) |
| 3272 child->invalidatePaintIncludingNonCompositingDescendantsInternal(pai
ntInvalidationContainer); | 3272 child->invalidatePaintIncludingNonCompositingDescendantsInternal(pai
ntInvalidationContainer); |
| 3273 } | 3273 } |
| 3274 } | 3274 } |
| 3275 | 3275 |
| 3276 static void setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsIn
ternal(LayoutObject* object) |
| 3277 { |
| 3278 object->setShouldDoFullPaintInvalidation(); |
| 3279 for (LayoutObject* child = object->slowFirstChild(); child; child = child->n
extSibling()) { |
| 3280 if (!child->isPaintInvalidationContainer()) |
| 3281 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsIn
ternal(child); |
| 3282 } |
| 3283 } |
| 3284 |
| 3285 // FIXME: If we had a flag to force invalidations in a whole subtree, we could g
et rid of this function (crbug.com/410097). |
| 3286 void LayoutObject::setShouldDoFullPaintInvalidationIncludingNonCompositingDescen
dants() |
| 3287 { |
| 3288 // Need to access the current compositing status. |
| 3289 DisableCompositingQueryAsserts disabler; |
| 3290 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendantsInternal(t
his); |
| 3291 } |
| 3276 | 3292 |
| 3277 } // namespace blink | 3293 } // namespace blink |
| 3278 | 3294 |
| 3279 #ifndef NDEBUG | 3295 #ifndef NDEBUG |
| 3280 | 3296 |
| 3281 void showTree(const blink::LayoutObject* object) | 3297 void showTree(const blink::LayoutObject* object) |
| 3282 { | 3298 { |
| 3283 if (object) | 3299 if (object) |
| 3284 object->showTreeForThis(); | 3300 object->showTreeForThis(); |
| 3285 else | 3301 else |
| (...skipping 19 matching lines...) Expand all Loading... |
| 3305 const blink::LayoutObject* root = object1; | 3321 const blink::LayoutObject* root = object1; |
| 3306 while (root->parent()) | 3322 while (root->parent()) |
| 3307 root = root->parent(); | 3323 root = root->parent(); |
| 3308 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3324 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3309 } else { | 3325 } else { |
| 3310 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3326 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3311 } | 3327 } |
| 3312 } | 3328 } |
| 3313 | 3329 |
| 3314 #endif | 3330 #endif |
| OLD | NEW |