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

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

Issue 2080593002: Revert of Let FrameView track object paint invalidations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TrackInvalidation
Patch Set: Created 4 years, 6 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
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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 1223
1224 // This conditional handles situations where non-rooted (and hence non-compo sited) frames are 1224 // This conditional handles situations where non-rooted (and hence non-compo sited) frames are
1225 // painted, such as SVG images. 1225 // painted, such as SVG images.
1226 if (!paintInvalidationContainer.isPaintInvalidationContainer()) 1226 if (!paintInvalidationContainer.isPaintInvalidationContainer())
1227 invalidatePaintRectangleOnWindow(paintInvalidationContainer, enclosingIn tRect(dirtyRect)); 1227 invalidatePaintRectangleOnWindow(paintInvalidationContainer, enclosingIn tRect(dirtyRect));
1228 1228
1229 if (paintInvalidationContainer.view()->usesCompositing() && paintInvalidatio nContainer.isPaintInvalidationContainer()) 1229 if (paintInvalidationContainer.view()->usesCompositing() && paintInvalidatio nContainer.isPaintInvalidationContainer())
1230 paintInvalidationContainer.setBackingNeedsPaintInvalidationInRect(dirtyR ect, invalidationReason, *this); 1230 paintInvalidationContainer.setBackingNeedsPaintInvalidationInRect(dirtyR ect, invalidationReason, *this);
1231 } 1231 }
1232 1232
1233 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClient& client, PaintInvalidationReason reason) const 1233 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClient& displayI temClient) const
1234 { 1234 {
1235 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set. 1235 if (PaintLayer* paintingLayer = this->paintingLayer()) {
1236 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use 1236 paintingLayer->setNeedsRepaint();
1237 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost.
1238 client.setDisplayItemsUncached();
1239 1237
1240 if (FrameView* frameView = this->frameView()) 1238 #if !ENABLE(ASSERT)
1241 frameView->trackObjectPaintInvalidation(client, reason); 1239 // This is a fast path when we don't need to inform the GraphicsLayer ab out this paint invalidation.
1240 FrameView* frameView = this->frameView();
1241 if (!frameView || !frameView->isTrackingPaintInvalidations()) {
1242 displayItemClient.setDisplayItemsUncached();
1243 return;
1244 }
1245 #endif
1246 // This is valid because we want to invalidate the client in the display item list of the current backing.
1247 DisableCompositingQueryAsserts disabler;
1248 if (const PaintLayer* paintInvalidationLayer = paintingLayer->enclosingL ayerForPaintInvalidationCrossingFrameBoundaries())
1249 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO nBacking(displayItemClient, PaintInvalidationFull);
1250 }
1242 } 1251 }
1243 1252
1244 void LayoutObject::setPaintingLayerNeedsRepaintAndInvalidateDisplayItemClient(co nst PaintInvalidationState& paintInvalidationState, const DisplayItemClient& cli ent, PaintInvalidationReason reason) const 1253 void LayoutObject::setPaintingLayerNeedsRepaint() const
1245 {
1246 paintInvalidationState.paintingLayer().setNeedsRepaint();
1247 invalidateDisplayItemClient(client, reason);
1248 }
1249
1250 void LayoutObject::slowSetPaintingLayerNeedsRepaint() const
1251 { 1254 {
1252 if (PaintLayer* paintingLayer = this->paintingLayer()) 1255 if (PaintLayer* paintingLayer = this->paintingLayer())
1253 paintingLayer->setNeedsRepaint(); 1256 paintingLayer->setNeedsRepaint();
1254 } 1257 }
1255 1258
1256 void LayoutObject::invalidateDisplayItemClients(PaintInvalidationReason reason) const 1259 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason) const
1257 { 1260 {
1258 invalidateDisplayItemClient(*this, reason); 1261 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set.
1262 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use
1263 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost.
1264 ASSERT(!paintingLayer() || paintingLayer()->needsRepaint());
1265 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this, inval idationReason, this);
1259 } 1266 }
1260 1267
1261 void LayoutObject::invalidateDisplayItemClientsWithPaintInvalidationState(const PaintInvalidationState& paintInvalidationState, PaintInvalidationReason reason) const 1268 void LayoutObject::invalidateDisplayItemClientsWithPaintInvalidationState(const LayoutBoxModelObject& paintInvalidationContainer, const PaintInvalidationState& paintInvalidationState, PaintInvalidationReason invalidationReason) const
1262 { 1269 {
1263 paintInvalidationState.paintingLayer().setNeedsRepaint(); 1270 paintInvalidationState.paintingLayer().setNeedsRepaint();
1264 invalidateDisplayItemClients(reason); 1271 invalidateDisplayItemClients(paintInvalidationContainer, invalidationReason) ;
1265 } 1272 }
1266 1273
1274
1267 bool LayoutObject::compositedScrollsWithRespectTo(const LayoutBoxModelObject& pa intInvalidationContainer) const 1275 bool LayoutObject::compositedScrollsWithRespectTo(const LayoutBoxModelObject& pa intInvalidationContainer) const
1268 { 1276 {
1269 return paintInvalidationContainer.usesCompositedScrolling() && this != &pain tInvalidationContainer; 1277 return paintInvalidationContainer.usesCompositedScrolling() && this != &pain tInvalidationContainer;
1270 } 1278 }
1271 1279
1272 void LayoutObject::invalidatePaintRectangle(const LayoutRect& dirtyRect) const 1280 const LayoutBoxModelObject* LayoutObject::invalidatePaintRectangleInternal(const LayoutRect& dirtyRect) const
1273 { 1281 {
1274 RELEASE_ASSERT(isRooted()); 1282 RELEASE_ASSERT(isRooted());
1275 1283
1276 if (dirtyRect.isEmpty()) 1284 if (dirtyRect.isEmpty())
1277 return; 1285 return nullptr;
1278 1286
1279 if (view()->document().printing()) 1287 if (view()->document().printing())
1280 return; // Don't invalidate paints if we're printing. 1288 return nullptr; // Don't invalidate paints if we're printing.
1281 1289
1282 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validation(); 1290 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validation();
1283 LayoutRect dirtyRectOnBacking = dirtyRect; 1291 LayoutRect dirtyRectOnBacking = dirtyRect;
1284 PaintLayer::mapRectToPaintInvalidationBacking(*this, paintInvalidationContai ner, dirtyRectOnBacking); 1292 PaintLayer::mapRectToPaintInvalidationBacking(*this, paintInvalidationContai ner, dirtyRectOnBacking);
1285 1293
1286 // Composited scrolling should not be included in the bounds of composited-s crolled items. 1294 // Composited scrolling should not be included in the bounds of composited-s crolled items.
1287 if (compositedScrollsWithRespectTo(paintInvalidationContainer)) { 1295 if (compositedScrollsWithRespectTo(paintInvalidationContainer)) {
1288 LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrol ledContentOffset()); 1296 LayoutSize inverseOffset(toLayoutBox(&paintInvalidationContainer)->scrol ledContentOffset());
1289 dirtyRectOnBacking.move(inverseOffset); 1297 dirtyRectOnBacking.move(inverseOffset);
1290 } 1298 }
1291 1299
1292 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking , PaintInvalidationRectangle); 1300 invalidatePaintUsingContainer(paintInvalidationContainer, dirtyRectOnBacking , PaintInvalidationRectangle);
1301 return &paintInvalidationContainer;
1302 }
1293 1303
1294 slowSetPaintingLayerNeedsRepaint(); 1304 void LayoutObject::invalidatePaintRectangle(const LayoutRect& rect) const
1295 invalidateDisplayItemClients(PaintInvalidationRectangle); 1305 {
1306 setPaintingLayerNeedsRepaint();
1307 const LayoutBoxModelObject* paintInvalidationContainer = invalidatePaintRect angleInternal(rect);
1308 if (paintInvalidationContainer)
1309 invalidateDisplayItemClients(*paintInvalidationContainer, PaintInvalidat ionRectangle);
1310 }
1311
1312 void LayoutObject::invalidatePaintRectangleNotInvalidatingDisplayItemClients(con st LayoutRect& r) const
1313 {
1314 invalidatePaintRectangleInternal(r);
1296 } 1315 }
1297 1316
1298 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState) 1317 void LayoutObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInv alidationState)
1299 { 1318 {
1300 ASSERT(!needsLayout()); 1319 ASSERT(!needsLayout());
1301 1320
1302 // If we didn't need paint invalidation then our children don't need as well . 1321 // If we didn't need paint invalidation then our children don't need as well .
1303 // Skip walking down the tree as everything should be fine below us. 1322 // Skip walking down the tree as everything should be fine below us.
1304 if (!shouldCheckForPaintInvalidation(paintInvalidationState)) 1323 if (!shouldCheckForPaintInvalidation(paintInvalidationState))
1305 return; 1324 return;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 newSelectionRect.move(inverseOffset); 1407 newSelectionRect.move(inverseOffset);
1389 } 1408 }
1390 } 1409 }
1391 1410
1392 setPreviousSelectionRectForPaintInvalidation(newSelectionRect); 1411 setPreviousSelectionRectForPaintInvalidation(newSelectionRect);
1393 1412
1394 // TODO(wangxianzhu): Combine the following two conditions when removing Lay outView::doingFullPaintInvalidation(). 1413 // TODO(wangxianzhu): Combine the following two conditions when removing Lay outView::doingFullPaintInvalidation().
1395 if (!fullInvalidation) 1414 if (!fullInvalidation)
1396 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelect ion, oldSelectionRect, newSelectionRect); 1415 fullyInvalidatePaint(paintInvalidationContainer, PaintInvalidationSelect ion, oldSelectionRect, newSelectionRect);
1397 if (shouldInvalidateSelection()) 1416 if (shouldInvalidateSelection())
1398 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidation State, PaintInvalidationSelection); 1417 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidation Container, paintInvalidationState, PaintInvalidationSelection);
1399 } 1418 }
1400 1419
1401 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalid ationState& paintInvalidationState) 1420 PaintInvalidationReason LayoutObject::invalidatePaintIfNeeded(const PaintInvalid ationState& paintInvalidationState)
1402 { 1421 {
1403 ASSERT(&paintInvalidationState.currentObject() == this); 1422 ASSERT(&paintInvalidationState.currentObject() == this);
1404 1423
1405 if (styleRef().hasOutline()) { 1424 if (styleRef().hasOutline()) {
1406 PaintLayer& layer = paintInvalidationState.paintingLayer(); 1425 PaintLayer& layer = paintInvalidationState.paintingLayer();
1407 if (layer.layoutObject() != this) 1426 if (layer.layoutObject() != this)
1408 layer.setNeedsPaintPhaseDescendantOutlines(); 1427 layer.setNeedsPaintPhaseDescendantOutlines();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
1452 invalidationReason = PaintInvalidationBackgroundObscurationChange; 1471 invalidationReason = PaintInvalidationBackgroundObscurationChange;
1453 m_bitfields.setLastBoxDecorationBackgroundObscured(boxDecorationBackgroundOb scured); 1472 m_bitfields.setLastBoxDecorationBackgroundObscured(boxDecorationBackgroundOb scured);
1454 1473
1455 if (invalidationReason == PaintInvalidationNone) { 1474 if (invalidationReason == PaintInvalidationNone) {
1456 // TODO(trchen): Currently we don't keep track of paint offset of layout objects. 1475 // TODO(trchen): Currently we don't keep track of paint offset of layout objects.
1457 // There are corner cases that the display items need to be invalidated for paint offset 1476 // There are corner cases that the display items need to be invalidated for paint offset
1458 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based 1477 // mutation, but incurs no pixel difference (i.e. bounds stay the same) so no rect-based
1459 // invalidation is issued. See crbug.com/508383 and crbug.com/515977. 1478 // invalidation is issued. See crbug.com/508383 and crbug.com/515977.
1460 // This is a workaround to force display items to update paint offset. 1479 // This is a workaround to force display items to update paint offset.
1461 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paint InvalidationState.forcedSubtreeInvalidationCheckingWithinContainer()) 1480 if (!RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && paint InvalidationState.forcedSubtreeInvalidationCheckingWithinContainer())
1462 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalida tionState, invalidationReason); 1481 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalida tionContainer, paintInvalidationState, invalidationReason);
1463 1482
1464 return invalidationReason; 1483 return invalidationReason;
1465 } 1484 }
1466 1485
1467 if (invalidationReason == PaintInvalidationIncremental) 1486 if (invalidationReason == PaintInvalidationIncremental)
1468 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB ounds, newLocation); 1487 incrementallyInvalidatePaint(paintInvalidationContainer, oldBounds, newB ounds, newLocation);
1469 else 1488 else
1470 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, old Bounds, newBounds); 1489 fullyInvalidatePaint(paintInvalidationContainer, invalidationReason, old Bounds, newBounds);
1471 1490
1472 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidationStat e, invalidationReason); 1491 invalidateDisplayItemClientsWithPaintInvalidationState(paintInvalidationCont ainer, paintInvalidationState, invalidationReason);
1473 return invalidationReason; 1492 return invalidationReason;
1474 } 1493 }
1475 1494
1476 PaintInvalidationReason LayoutObject::getPaintInvalidationReason(const PaintInva lidationState& paintInvalidationState, 1495 PaintInvalidationReason LayoutObject::getPaintInvalidationReason(const PaintInva lidationState& paintInvalidationState,
1477 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida tionBacking, 1496 const LayoutRect& oldBounds, const LayoutPoint& oldPositionFromPaintInvalida tionBacking,
1478 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida tionBacking) const 1497 const LayoutRect& newBounds, const LayoutPoint& newPositionFromPaintInvalida tionBacking) const
1479 { 1498 {
1480 if (paintInvalidationState.forcedSubtreeFullInvalidationWithinContainer()) 1499 if (paintInvalidationState.forcedSubtreeFullInvalidationWithinContainer())
1481 return PaintInvalidationSubtree; 1500 return PaintInvalidationSubtree;
1482 1501
(...skipping 2066 matching lines...) Expand 10 before | Expand all | Expand 10 after
3549 3568
3550 // If a paint invalidation container is not a stacking context, 3569 // If a paint invalidation container is not a stacking context,
3551 // some of its descendants may belong to the parent container. 3570 // some of its descendants may belong to the parent container.
3552 findNonCompositedDescendantLayerToTraverse(*descendant, functor); 3571 findNonCompositedDescendantLayerToTraverse(*descendant, functor);
3553 descendant = descendant->nextInPreOrderAfterChildren(&object); 3572 descendant = descendant->nextInPreOrderAfterChildren(&object);
3554 } 3573 }
3555 } 3574 }
3556 3575
3557 } // unnamed namespace 3576 } // unnamed namespace
3558 3577
3559 void LayoutObject::invalidateDisplayItemClientsIncludingNonCompositingDescendant s(PaintInvalidationReason reason) const 3578 void LayoutObject::invalidateDisplayItemClientsIncludingNonCompositingDescendant s(const LayoutBoxModelObject* paintInvalidationContainer, PaintInvalidationReaso n paintInvalidationReason) const
3560 { 3579 {
3561 // This is valid because we want to invalidate the client in the display ite m list of the current backing. 3580 // This is valid because we want to invalidate the client in the display ite m list of the current backing.
3562 DisableCompositingQueryAsserts disabler; 3581 DisableCompositingQueryAsserts disabler;
3582 if (!paintInvalidationContainer) {
3583 paintInvalidationContainer = enclosingCompositedContainer();
3584 if (!paintInvalidationContainer)
3585 return;
3586 }
3563 3587
3564 slowSetPaintingLayerNeedsRepaint(); 3588 traverseNonCompositingDescendants(const_cast<LayoutObject&>(*this), [&paintI nvalidationContainer, paintInvalidationReason](LayoutObject& object) {
3565 traverseNonCompositingDescendants(const_cast<LayoutObject&>(*this), [reason] (LayoutObject& object) { 3589 if (object.hasLayer())
3566 if (object.hasLayer() && toLayoutBoxModelObject(object).hasSelfPaintingL ayer())
3567 toLayoutBoxModelObject(object).layer()->setNeedsRepaint(); 3590 toLayoutBoxModelObject(object).layer()->setNeedsRepaint();
3568 object.invalidateDisplayItemClients(reason); 3591 object.invalidateDisplayItemClients(*paintInvalidationContainer, paintIn validationReason);
3569 }); 3592 });
3570 } 3593 }
3571 3594
3572 void LayoutObject::invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBo xModelObject& paintInvalidationContainer, PaintInvalidationReason reason) 3595 void LayoutObject::invalidatePaintOfPreviousPaintInvalidationRect(const LayoutBo xModelObject& paintInvalidationContainer, PaintInvalidationReason reason)
3573 { 3596 {
3574 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set. 3597 // It's caller's responsibility to ensure enclosingSelfPaintingLayer's needs Repaint is set.
3575 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use 3598 // Don't set the flag here because getting enclosingSelfPaintLayer has cost and the caller can use
3576 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost. 3599 // various ways (e.g. PaintInvalidatinState::enclosingSelfPaintingLayer()) t o reduce the cost.
3577 ASSERT(!paintingLayer() || paintingLayer()->needsRepaint()); 3600 ASSERT(!paintingLayer() || paintingLayer()->needsRepaint());
3578 3601
3579 // These disablers are valid because we want to use the current compositing/ invalidation status. 3602 // These disablers are valid because we want to use the current compositing/ invalidation status.
3580 DisablePaintInvalidationStateAsserts invalidationDisabler; 3603 DisablePaintInvalidationStateAsserts invalidationDisabler;
3581 DisableCompositingQueryAsserts compositingDisabler; 3604 DisableCompositingQueryAsserts compositingDisabler;
3582 3605
3583 LayoutRect invalidationRect = previousPaintInvalidationRect(); 3606 LayoutRect invalidationRect = previousPaintInvalidationRect();
3584 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect, reason); 3607 invalidatePaintUsingContainer(paintInvalidationContainer, invalidationRect, reason);
3585 invalidateDisplayItemClients(reason); 3608 invalidateDisplayItemClients(paintInvalidationContainer, reason);
3586 3609
3587 // This method may be used to invalidate paint of an object changing paint i nvalidation container. 3610 // This method may be used to invalidate paint of an object changing paint i nvalidation container.
3588 // Clear previous paint invalidation rect on the original paint invalidation container to avoid 3611 // Clear previous paint invalidation rect on the original paint invalidation container to avoid
3589 // under-invalidation if the new paint invalidation rect on the new paint in validation container 3612 // under-invalidation if the new paint invalidation rect on the new paint in validation container
3590 // happens to be the same as the old one. 3613 // happens to be the same as the old one.
3591 clearPreviousPaintInvalidationRects(); 3614 clearPreviousPaintInvalidationRects();
3592 } 3615 }
3593 3616
3594 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants() 3617 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants()
3595 { 3618 {
(...skipping 10 matching lines...) Expand all
3606 { 3629 {
3607 // Clear first because PaintInvalidationSubtree overrides other full paint i nvalidation reasons. 3630 // Clear first because PaintInvalidationSubtree overrides other full paint i nvalidation reasons.
3608 clearShouldDoFullPaintInvalidation(); 3631 clearShouldDoFullPaintInvalidation();
3609 setShouldDoFullPaintInvalidation(PaintInvalidationSubtree); 3632 setShouldDoFullPaintInvalidation(PaintInvalidationSubtree);
3610 } 3633 }
3611 3634
3612 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendantsIntern al(const LayoutBoxModelObject& paintInvalidationContainer) 3635 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendantsIntern al(const LayoutBoxModelObject& paintInvalidationContainer)
3613 { 3636 {
3614 invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationContainer, P aintInvalidationSubtree); 3637 invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationContainer, P aintInvalidationSubtree);
3615 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { 3638 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) {
3639 if (child->hasLayer())
3640 toLayoutBoxModelObject(child)->layer()->setNeedsRepaint();
3616 if (!child->hasLayer() || !toLayoutBoxModelObject(child)->layer()->isSel fPaintingLayer()) 3641 if (!child->hasLayer() || !toLayoutBoxModelObject(child)->layer()->isSel fPaintingLayer())
3617 child->invalidatePaintIncludingNonSelfPaintingLayerDescendantsIntern al(paintInvalidationContainer); 3642 child->invalidatePaintIncludingNonSelfPaintingLayerDescendantsIntern al(paintInvalidationContainer);
3618 } 3643 }
3619 } 3644 }
3620 3645
3621 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBoxModelObject& paintInvalidationContainer) 3646 void LayoutObject::invalidatePaintIncludingNonSelfPaintingLayerDescendants(const LayoutBoxModelObject& paintInvalidationContainer)
3622 { 3647 {
3623 slowSetPaintingLayerNeedsRepaint(); 3648 setPaintingLayerNeedsRepaint();
3624 invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(paintInvalid ationContainer); 3649 invalidatePaintIncludingNonSelfPaintingLayerDescendantsInternal(paintInvalid ationContainer);
3625 } 3650 }
3626 3651
3627 void LayoutObject::setIsBackgroundAttachmentFixedObject(bool isBackgroundAttachm entFixedObject) 3652 void LayoutObject::setIsBackgroundAttachmentFixedObject(bool isBackgroundAttachm entFixedObject)
3628 { 3653 {
3629 ASSERT(frameView()); 3654 ASSERT(frameView());
3630 if (m_bitfields.isBackgroundAttachmentFixedObject() == isBackgroundAttachmen tFixedObject) 3655 if (m_bitfields.isBackgroundAttachmentFixedObject() == isBackgroundAttachmen tFixedObject)
3631 return; 3656 return;
3632 m_bitfields.setIsBackgroundAttachmentFixedObject(isBackgroundAttachmentFixed Object); 3657 m_bitfields.setIsBackgroundAttachmentFixedObject(isBackgroundAttachmentFixed Object);
3633 if (isBackgroundAttachmentFixedObject) 3658 if (isBackgroundAttachmentFixedObject)
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
3689 const blink::LayoutObject* root = object1; 3714 const blink::LayoutObject* root = object1;
3690 while (root->parent()) 3715 while (root->parent())
3691 root = root->parent(); 3716 root = root->parent();
3692 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3717 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3693 } else { 3718 } else {
3694 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3719 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3695 } 3720 }
3696 } 3721 }
3697 3722
3698 #endif 3723 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698