Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1331053002: Propagate resource-triggered repaints to text node children of <text> (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Name/comment updates. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1354 matching lines...) Expand 10 before | Expand all | Expand 10 after
1365 if (!isFullPaintInvalidationReason(invalidationReason) && boxDecorationBackg roundObscured != m_bitfields.lastBoxDecorationBackgroundObscured()) 1365 if (!isFullPaintInvalidationReason(invalidationReason) && boxDecorationBackg roundObscured != m_bitfields.lastBoxDecorationBackgroundObscured())
1366 invalidationReason = PaintInvalidationBackgroundObscurationChange; 1366 invalidationReason = PaintInvalidationBackgroundObscurationChange;
1367 m_bitfields.setLastBoxDecorationBackgroundObscured(boxDecorationBackgroundOb scured); 1367 m_bitfields.setLastBoxDecorationBackgroundObscured(boxDecorationBackgroundOb scured);
1368 1368
1369 if (invalidationReason == PaintInvalidationNone) { 1369 if (invalidationReason == PaintInvalidationNone) {
1370 // TODO(trchen): Currently we don't keep track of paint offset of layout objects. 1370 // TODO(trchen): Currently we don't keep track of paint offset of layout objects.
1371 // There are corner cases that the display items need to be invalidated for paint offset 1371 // There are corner cases that the display items need to be invalidated for paint offset
1372 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based 1372 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based
1373 // invalidation is issued. See crbug.com/508383 and crbug.com/515977. 1373 // invalidation is issued. See crbug.com/508383 and crbug.com/515977.
1374 // This is a workaround to force display items to update paint offset. 1374 // This is a workaround to force display items to update paint offset.
1375 if (paintInvalidationState.ancestorHadPaintInvalidationForLocationChange ()) 1375 if (paintInvalidationState.forcedSubtreeInvalidationWithinContainer())
1376 invalidateDisplayItemClients(paintInvalidationContainer); 1376 invalidateDisplayItemClients(paintInvalidationContainer);
1377 1377
1378 return invalidationReason; 1378 return invalidationReason;
1379 } 1379 }
1380 1380
1381 invalidateDisplayItemClients(paintInvalidationContainer); 1381 invalidateDisplayItemClients(paintInvalidationContainer);
1382 1382
1383 if (invalidationReason == PaintInvalidationIncremental) { 1383 if (invalidationReason == PaintInvalidationIncremental) {
1384 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB ounds, newLocation); 1384 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB ounds, newLocation);
1385 return invalidationReason; 1385 return invalidationReason;
(...skipping 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after
3179 return; 3179 return;
3180 m_bitfields.setMayNeedPaintInvalidation(true); 3180 m_bitfields.setMayNeedPaintInvalidation(true);
3181 markContainerChainForPaintInvalidation(); 3181 markContainerChainForPaintInvalidation();
3182 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting(). 3182 frame()->page()->animator().scheduleVisualUpdate(); // In case that this is called outside of FrameView::updateLayoutAndStyleForPainting().
3183 } 3183 }
3184 3184
3185 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai ntInvalidationState) 3185 void LayoutObject::clearPaintInvalidationState(const PaintInvalidationState& pai ntInvalidationState)
3186 { 3186 {
3187 // paintInvalidationStateIsDirty should be kept in sync with the 3187 // paintInvalidationStateIsDirty should be kept in sync with the
3188 // booleans that are cleared below. 3188 // booleans that are cleared below.
3189 ASSERT(paintInvalidationState.ancestorHadPaintInvalidationForLocationChange( ) || paintInvalidationStateIsDirty()); 3189 ASSERT(paintInvalidationState.forcedSubtreeInvalidationWithinContainer() || paintInvalidationStateIsDirty());
3190 clearShouldDoFullPaintInvalidation(); 3190 clearShouldDoFullPaintInvalidation();
3191 m_bitfields.setChildShouldCheckForPaintInvalidation(false); 3191 m_bitfields.setChildShouldCheckForPaintInvalidation(false);
3192 m_bitfields.setNeededLayoutBecauseOfChildren(false); 3192 m_bitfields.setNeededLayoutBecauseOfChildren(false);
3193 m_bitfields.setShouldInvalidateOverflowForPaint(false); 3193 m_bitfields.setShouldInvalidateOverflowForPaint(false);
3194 m_bitfields.setMayNeedPaintInvalidation(false); 3194 m_bitfields.setMayNeedPaintInvalidation(false);
3195 m_bitfields.setShouldInvalidateSelection(false); 3195 m_bitfields.setShouldInvalidateSelection(false);
3196 } 3196 }
3197 3197
3198 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document) 3198 bool LayoutObject::isAllowedToModifyLayoutTreeStructure(Document& document)
3199 { 3199 {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
3388 const blink::LayoutObject* root = object1; 3388 const blink::LayoutObject* root = object1;
3389 while (root->parent()) 3389 while (root->parent())
3390 root = root->parent(); 3390 root = root->parent();
3391 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3391 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3392 } else { 3392 } else {
3393 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3393 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3394 } 3394 }
3395 } 3395 }
3396 3396
3397 #endif 3397 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutObject.h ('k') | Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698