| 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 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1349 if (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidati
onContainer != this) { | 1349 if (paintInvalidationContainer.usesCompositedScrolling() && &paintInvalidati
onContainer != this) { |
| 1350 LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrol
ledContentOffset()); | 1350 LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrol
ledContentOffset()); |
| 1351 newLocation.move(inverseOffset); | 1351 newLocation.move(inverseOffset); |
| 1352 newBounds.move(inverseOffset); | 1352 newBounds.move(inverseOffset); |
| 1353 } | 1353 } |
| 1354 | 1354 |
| 1355 setPreviousPaintInvalidationRect(newBounds); | 1355 setPreviousPaintInvalidationRect(newBounds); |
| 1356 if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()) | 1356 if (!RuntimeEnabledFeatures::slimmingPaintOffsetCachingEnabled()) |
| 1357 setPreviousPositionFromPaintInvalidationBacking(newLocation); | 1357 setPreviousPositionFromPaintInvalidationBacking(newLocation); |
| 1358 | 1358 |
| 1359 if (!shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() &&
!paintInvalidationState.forcedSubtreeInvalidationWithinContainer()) { |
| 1360 ASSERT(paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinC
ontainer()); |
| 1361 return PaintInvalidationNone; |
| 1362 } |
| 1363 |
| 1359 PaintInvalidationReason invalidationReason = paintInvalidationReason(paintIn
validationContainer, oldBounds, oldLocation, newBounds, newLocation); | 1364 PaintInvalidationReason invalidationReason = paintInvalidationReason(paintIn
validationContainer, oldBounds, oldLocation, newBounds, newLocation); |
| 1360 | 1365 |
| 1361 // We need to invalidate the selection before checking for whether we are do
ing a full invalidation. | 1366 // We need to invalidate the selection before checking for whether we are do
ing a full invalidation. |
| 1362 // This is because we need to update the old rect regardless. | 1367 // This is because we need to update the old rect regardless. |
| 1363 invalidateSelectionIfNeeded(paintInvalidationContainer, invalidationReason); | 1368 invalidateSelectionIfNeeded(paintInvalidationContainer, invalidationReason); |
| 1364 | 1369 |
| 1365 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject:
:invalidatePaintIfNeeded()", | 1370 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("blink.invalidation"), "LayoutObject:
:invalidatePaintIfNeeded()", |
| 1366 "object", this->debugName().ascii(), | 1371 "object", this->debugName().ascii(), |
| 1367 "info", jsonObjectForOldAndNewRects(oldBounds, oldLocation, newBounds, n
ewLocation)); | 1372 "info", jsonObjectForOldAndNewRects(oldBounds, oldLocation, newBounds, n
ewLocation)); |
| 1368 | 1373 |
| (...skipping 1816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3185 return; | 3190 return; |
| 3186 m_bitfields.setMayNeedPaintInvalidation(true); | 3191 m_bitfields.setMayNeedPaintInvalidation(true); |
| 3187 markContainerChainForPaintInvalidation(); | 3192 markContainerChainForPaintInvalidation(); |
| 3188 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). | 3193 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is
called outside of FrameView::updateLayoutAndStyleForPainting(). |
| 3189 } | 3194 } |
| 3190 | 3195 |
| 3191 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai
ntInvalidationState) | 3196 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai
ntInvalidationState) |
| 3192 { | 3197 { |
| 3193 // paintInvalidationStateIsDirty should be kept in sync with the | 3198 // paintInvalidationStateIsDirty should be kept in sync with the |
| 3194 // booleans that are cleared below. | 3199 // booleans that are cleared below. |
| 3195 ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() ||
paintInvalidationStateIsDirty()); | 3200 ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() ||
paintInvalidationState.forcedSubtreeInvalidationRectUpdateWithinContainer() || p
aintInvalidationStateIsDirty()); |
| 3196 clearShouldDoFullPaintInvalidation(); | 3201 clearShouldDoFullPaintInvalidation(); |
| 3197 m_bitfields.setChildShouldCheckForPaintInvalidation(false); | 3202 m_bitfields.setChildShouldCheckForPaintInvalidation(false); |
| 3198 m_bitfields.setNeededLayoutBecauseOfChildren(false); | 3203 m_bitfields.setNeededLayoutBecauseOfChildren(false); |
| 3199 m_bitfields.setShouldInvalidateOverflowForPaint(false); | 3204 m_bitfields.setShouldInvalidateOverflowForPaint(false); |
| 3200 m_bitfields.setMayNeedPaintInvalidation(false); | 3205 m_bitfields.setMayNeedPaintInvalidation(false); |
| 3201 m_bitfields.setShouldInvalidateSelection(false); | 3206 m_bitfields.setShouldInvalidateSelection(false); |
| 3202 } | 3207 } |
| 3203 | 3208 |
| 3204 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) | 3209 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) |
| 3205 { | 3210 { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3394 const blink::LayoutObject* root = object1; | 3399 const blink::LayoutObject* root = object1; |
| 3395 while (root->parent()) | 3400 while (root->parent()) |
| 3396 root = root->parent(); | 3401 root = root->parent(); |
| 3397 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3402 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3398 } else { | 3403 } else { |
| 3399 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3404 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3400 } | 3405 } |
| 3401 } | 3406 } |
| 3402 | 3407 |
| 3403 #endif | 3408 #endif |
| OLD | NEW |