| 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 3175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3186 } | 3186 } |
| 3187 | 3187 |
| 3188 void LayoutObject::setShouldInvalidateSelection() | 3188 void LayoutObject::setShouldInvalidateSelection() |
| 3189 { | 3189 { |
| 3190 if (!canUpdateSelectionOnRootLineBoxes()) | 3190 if (!canUpdateSelectionOnRootLineBoxes()) |
| 3191 return; | 3191 return; |
| 3192 | 3192 |
| 3193 m_bitfields.setShouldInvalidateSelection(true); | 3193 m_bitfields.setShouldInvalidateSelection(true); |
| 3194 markContainerChainForPaintInvalidation(); | 3194 markContainerChainForPaintInvalidation(); |
| 3195 } | 3195 } |
| 3196 |
| 3196 void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas
on) | 3197 void LayoutObject::setShouldDoFullPaintInvalidation(PaintInvalidationReason reas
on) |
| 3197 { | 3198 { |
| 3198 // Only full invalidation reasons are allowed. | 3199 // Only full invalidation reasons are allowed. |
| 3199 ASSERT(isFullPaintInvalidationReason(reason)); | 3200 ASSERT(isFullPaintInvalidationReason(reason)); |
| 3200 | 3201 |
| 3201 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone) { | 3202 if (m_bitfields.fullPaintInvalidationReason() == PaintInvalidationNone) { |
| 3202 if (reason == PaintInvalidationFull) | 3203 if (reason == PaintInvalidationFull) |
| 3203 reason = documentLifecycleBasedPaintInvalidationReason(document().li
fecycle()); | 3204 reason = documentLifecycleBasedPaintInvalidationReason(document().li
fecycle()); |
| 3204 m_bitfields.setFullPaintInvalidationReason(reason); | 3205 m_bitfields.setFullPaintInvalidationReason(reason); |
| 3206 |
| 3207 if (RuntimeEnabledFeatures::slimmingPaintEnabled() && isBody()) { |
| 3208 // The rootObject paints view's background. We need to invalidate it
when |
| 3209 // view's background changes because of change of body's style. |
| 3210 // FIXME: The condition is broader than needed for simplicity. |
| 3211 // Might remove this when fixing crbug.com/475115. |
| 3212 if (LayoutObject* rootObject = document().documentElement()->layoutO
bject()) |
| 3213 rootObject->setShouldDoFullPaintInvalidation(); |
| 3214 } |
| 3205 } | 3215 } |
| 3206 | 3216 |
| 3207 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidat
ion); | 3217 ASSERT(document().lifecycle().state() != DocumentLifecycle::InPaintInvalidat
ion); |
| 3208 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). | 3218 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). |
| 3209 markContainerChainForPaintInvalidation(); | 3219 markContainerChainForPaintInvalidation(); |
| 3210 } | 3220 } |
| 3211 | 3221 |
| 3212 void LayoutObject::setMayNeedPaintInvalidation() | 3222 void LayoutObject::setMayNeedPaintInvalidation() |
| 3213 { | 3223 { |
| 3214 if (mayNeedPaintInvalidation()) | 3224 if (mayNeedPaintInvalidation()) |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3307 { | 3317 { |
| 3308 if (object1) { | 3318 if (object1) { |
| 3309 const blink::LayoutObject* root = object1; | 3319 const blink::LayoutObject* root = object1; |
| 3310 while (root->parent()) | 3320 while (root->parent()) |
| 3311 root = root->parent(); | 3321 root = root->parent(); |
| 3312 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3322 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3313 } | 3323 } |
| 3314 } | 3324 } |
| 3315 | 3325 |
| 3316 #endif | 3326 #endif |
| OLD | NEW |