| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 | 387 |
| 388 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) | 388 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) |
| 389 { | 389 { |
| 390 ASSERT(!needsLayout()); | 390 ASSERT(!needsLayout()); |
| 391 | 391 |
| 392 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); | 392 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); |
| 393 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) | 393 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) |
| 394 return; | 394 return; |
| 395 | 395 |
| 396 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); | 396 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); |
| 397 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking(
); |
| 397 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); | 398 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); |
| 398 clearPaintInvalidationFlags(newPaintInvalidationState); | 399 clearPaintInvalidationFlags(newPaintInvalidationState); |
| 399 | 400 |
| 400 if (reason == PaintInvalidationDelayedFull) | 401 if (reason == PaintInvalidationDelayedFull) |
| 401 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); | 402 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); |
| 402 | 403 |
| 403 if (reason == PaintInvalidationLocationChange) | 404 if (previousPosition != previousPositionFromPaintInvalidationBacking()) |
| 404 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); | 405 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); |
| 405 | 406 |
| 406 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. | 407 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. |
| 407 | 408 |
| 408 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove
when we enable paint offset caching. | 409 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove
when we enable paint offset caching. |
| 409 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) | 410 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) |
| 410 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); | 411 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); |
| 411 | 412 |
| 412 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha
ve enough saved information to do accurate check | 413 // TODO(wangxianzhu): This is a workaround for crbug.com/490725. We don't ha
ve enough saved information to do accurate check |
| 413 // of clipping change. Will remove when we remove rect-based paint invalidat
ion. | 414 // of clipping change. Will remove when we remove rect-based paint invalidat
ion. |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 if (rootElementStyle->hasBackground()) | 1134 if (rootElementStyle->hasBackground()) |
| 1134 return false; | 1135 return false; |
| 1135 | 1136 |
| 1136 if (node() != document().firstBodyElement()) | 1137 if (node() != document().firstBodyElement()) |
| 1137 return false; | 1138 return false; |
| 1138 | 1139 |
| 1139 return true; | 1140 return true; |
| 1140 } | 1141 } |
| 1141 | 1142 |
| 1142 } // namespace blink | 1143 } // namespace blink |
| OLD | NEW |