| 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 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 if (translate->dependsOnBoxSize()) | 372 if (translate->dependsOnBoxSize()) |
| 373 return true; | 373 return true; |
| 374 } | 374 } |
| 375 return style.transform().dependsOnBoxSize() | 375 return style.transform().dependsOnBoxSize() |
| 376 || (style.transformOriginX() != Length(50, Percent) && style.transformOr
iginX().hasPercent()) | 376 || (style.transformOriginX() != Length(50, Percent) && style.transformOr
iginX().hasPercent()) |
| 377 || (style.transformOriginY() != Length(50, Percent) && style.transformOr
iginY().hasPercent()); | 377 || (style.transformOriginY() != Length(50, Percent) && style.transformOr
iginY().hasPercent()); |
| 378 } | 378 } |
| 379 | 379 |
| 380 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) | 380 void LayoutBoxModelObject::invalidateTreeIfNeeded(const PaintInvalidationState&
paintInvalidationState) |
| 381 { | 381 { |
| 382 ASSERT(!needsLayout()); | 382 ensureIsReadyForPaintInvalidation(); |
| 383 | 383 |
| 384 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); | 384 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); |
| 385 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) | 385 if (!shouldCheckForPaintInvalidation(newPaintInvalidationState)) |
| 386 return; | 386 return; |
| 387 | 387 |
| 388 if (mayNeedPaintInvalidationSubtree()) | 388 if (mayNeedPaintInvalidationSubtree()) |
| 389 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); | 389 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); |
| 390 | 390 |
| 391 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); | 391 LayoutRect previousPaintInvalidationRect = this->previousPaintInvalidationRe
ct(); |
| 392 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking(
); | 392 LayoutPoint previousPosition = previousPositionFromPaintInvalidationBacking(
); |
| 393 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); | 393 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); |
| 394 clearPaintInvalidationFlags(newPaintInvalidationState); | 394 clearPaintInvalidationFlags(); |
| 395 | 395 |
| 396 if (previousPosition != previousPositionFromPaintInvalidationBacking()) | 396 if (previousPosition != previousPositionFromPaintInvalidationBacking()) |
| 397 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); | 397 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); |
| 398 | 398 |
| 399 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. | 399 // TODO(wangxianzhu): Combine this function into LayoutObject::invalidateTre
eIfNeeded() when removing the following workarounds. |
| 400 | 400 |
| 401 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove
when we enable paint offset caching. | 401 // TODO(wangxianzhu): This is a workaround for crbug.com/533277. Will remove
when we enable paint offset caching. |
| 402 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) | 402 if (reason != PaintInvalidationNone && hasPercentageTransform(styleRef())) |
| 403 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); | 403 newPaintInvalidationState.setForceSubtreeInvalidationCheckingWithinConta
iner(); |
| 404 | 404 |
| (...skipping 724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1129 if (rootElementStyle->hasBackground()) | 1129 if (rootElementStyle->hasBackground()) |
| 1130 return false; | 1130 return false; |
| 1131 | 1131 |
| 1132 if (node() != document().firstBodyElement()) | 1132 if (node() != document().firstBodyElement()) |
| 1133 return false; | 1133 return false; |
| 1134 | 1134 |
| 1135 return true; | 1135 return true; |
| 1136 } | 1136 } |
| 1137 | 1137 |
| 1138 } // namespace blink | 1138 } // namespace blink |
| OLD | NEW |