| 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 358 | 358 |
| 359 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) | 359 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) |
| 360 { | 360 { |
| 361 ASSERT(!needsLayout()); | 361 ASSERT(!needsLayout()); |
| 362 | 362 |
| 363 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); | 363 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); |
| 364 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) | 364 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) |
| 365 return; | 365 return; |
| 366 | 366 |
| 367 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); | 367 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); |
| 368 | |
| 369 // TODO(wangxianzhu): Enable this assert after we fix all paintInvalidationC
ontainer mismatch issues. crbug.com/360286 | |
| 370 // ASSERT(&newPaintInvalidationState.paintInvalidationContainer() == &contai
nerForPaintInvalidation()); | |
| 371 | |
| 372 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); | 368 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); |
| 373 clearPaintInvalidationFlags(newPaintInvalidationState); | 369 clearPaintInvalidationFlags(newPaintInvalidationState); |
| 374 | 370 |
| 375 if (reason == PaintInvalidationDelayedFull) | 371 if (reason == PaintInvalidationDelayedFull) |
| 376 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); | 372 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); |
| 377 | 373 |
| 378 if (reason == PaintInvalidationLocationChange) | 374 if (reason == PaintInvalidationLocationChange) |
| 379 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); | 375 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); |
| 380 | 376 |
| 381 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. | 377 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 973 if (rootElementStyle->hasBackground()) | 969 if (rootElementStyle->hasBackground()) |
| 974 return false; | 970 return false; |
| 975 | 971 |
| 976 if (node() != document().firstBodyElement()) | 972 if (node() != document().firstBodyElement()) |
| 977 return false; | 973 return false; |
| 978 | 974 |
| 979 return true; | 975 return true; |
| 980 } | 976 } |
| 981 | 977 |
| 982 } // namespace blink | 978 } // namespace blink |
| OLD | NEW |