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

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

Issue 1475483003: Revert of Call PaintLayer::setNeedsRepaint in LayoutBoxModelObject::invalidateDisplayItemClientOnBacking() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | 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 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 1242
1243 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d isplayItemClient) const 1243 void LayoutObject::invalidateDisplayItemClient(const DisplayItemClientWrapper& d isplayItemClient) const
1244 { 1244 {
1245 // TODO(wangxianzhu): Ensure correct bounds for the client will be or has be en passed to PaintController. crbug.com/547119. 1245 // TODO(wangxianzhu): Ensure correct bounds for the client will be or has be en passed to PaintController. crbug.com/547119.
1246 // Not using enclosingCompositedContainer() directly because this object may be in an orphaned subtree. 1246 // Not using enclosingCompositedContainer() directly because this object may be in an orphaned subtree.
1247 if (PaintLayer* enclosingLayer = this->enclosingLayer()) { 1247 if (PaintLayer* enclosingLayer = this->enclosingLayer()) {
1248 // This is valid because we want to invalidate the client in the display item list of the current backing. 1248 // This is valid because we want to invalidate the client in the display item list of the current backing.
1249 DisableCompositingQueryAsserts disabler; 1249 DisableCompositingQueryAsserts disabler;
1250 if (const PaintLayer* paintInvalidationLayer = enclosingLayer->enclosing LayerForPaintInvalidationCrossingFrameBoundaries()) 1250 if (const PaintLayer* paintInvalidationLayer = enclosingLayer->enclosing LayerForPaintInvalidationCrossingFrameBoundaries())
1251 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO nBacking(displayItemClient, PaintInvalidationFull, nullptr); 1251 paintInvalidationLayer->layoutObject()->invalidateDisplayItemClientO nBacking(displayItemClient, PaintInvalidationFull, nullptr);
1252 enclosingLayer->setNeedsRepaint();
1252 } 1253 }
1253 } 1254 }
1254 1255
1255 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout Rect* paintInvalidationRect) const 1256 void LayoutObject::invalidateDisplayItemClients(const LayoutBoxModelObject& pain tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout Rect* paintInvalidationRect) const
1256 { 1257 {
1257 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this, inval idationReason, paintInvalidationRect); 1258 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*this, inval idationReason, paintInvalidationRect);
1259
1260 if (PaintLayer* enclosingLayer = this->enclosingLayer())
1261 enclosingLayer->setNeedsRepaint();
1258 } 1262 }
1259 1263
1260 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS tate) const 1264 LayoutRect LayoutObject::boundsRectForPaintInvalidation(const LayoutBoxModelObje ct* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationS tate) const
1261 { 1265 {
1262 if (!paintInvalidationContainer) 1266 if (!paintInvalidationContainer)
1263 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState); 1267 return computePaintInvalidationRect(paintInvalidationContainer, paintInv alidationState);
1264 return PaintLayer::computePaintInvalidationRect(this, paintInvalidationConta iner->layer(), paintInvalidationState); 1268 return PaintLayer::computePaintInvalidationRect(this, paintInvalidationConta iner->layer(), paintInvalidationState);
1265 } 1269 }
1266 1270
1267 const LayoutBoxModelObject* LayoutObject::invalidatePaintRectangleInternal(const LayoutRect& dirtyRect) const 1271 const LayoutBoxModelObject* LayoutObject::invalidatePaintRectangleInternal(const LayoutRect& dirtyRect) const
(...skipping 2216 matching lines...) Expand 10 before | Expand all | Expand 10 after
3484 const blink::LayoutObject* root = object1; 3488 const blink::LayoutObject* root = object1;
3485 while (root->parent()) 3489 while (root->parent())
3486 root = root->parent(); 3490 root = root->parent();
3487 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3491 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3488 } else { 3492 } else {
3489 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3493 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3490 } 3494 }
3491 } 3495 }
3492 3496
3493 #endif 3497 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698