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

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

Issue 1408913002: Invalidate scrolling contents on scrolling contents layer only (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NeedsRebaselines Created 5 years, 2 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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2010 Google Inc. All rights reserved. 7 * Copyright (C) 2010 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason); 400 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason);
401 } 401 }
402 } 402 }
403 403
404 void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayIte mClientWrapper& displayItemClient, PaintInvalidationReason invalidationReason, c onst LayoutRect& previousPaintInvalidationRect, const LayoutRect& newPaintInvali dationRect) const 404 void LayoutBoxModelObject::invalidateDisplayItemClientOnBacking(const DisplayIte mClientWrapper& displayItemClient, PaintInvalidationReason invalidationReason, c onst LayoutRect& previousPaintInvalidationRect, const LayoutRect& newPaintInvali dationRect) const
405 { 405 {
406 if (layer()->groupedMapping()) { 406 if (layer()->groupedMapping()) {
407 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer()) 407 if (GraphicsLayer* squashingLayer = layer()->groupedMapping()->squashing Layer())
408 squashingLayer->invalidateDisplayItemClient(displayItemClient, inval idationReason, enclosingIntRect(previousPaintInvalidationRect), enclosingIntRect (newPaintInvalidationRect)); 408 squashingLayer->invalidateDisplayItemClient(displayItemClient, inval idationReason, enclosingIntRect(previousPaintInvalidationRect), enclosingIntRect (newPaintInvalidationRect));
409 } else if (CompositedLayerMapping* compositedLayerMapping = layer()->composi tedLayerMapping()) { 409 } else if (CompositedLayerMapping* compositedLayerMapping = layer()->composi tedLayerMapping()) {
410 compositedLayerMapping->invalidateDisplayItemClient(displayItemClient, i nvalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect); 410 if (this->displayItemClient() != displayItemClient.displayItemClient() & & isBox() && toLayoutBox(this)->usesCompositedScrolling())
411 compositedLayerMapping->invalidateDisplayItemClientOnScrollingConten tsLayer(displayItemClient, invalidationReason, previousPaintInvalidationRect, ne wPaintInvalidationRect);
chrishtr 2015/10/16 00:55:38 This conditional doesn't need to be protected by S
Xianzhu 2015/10/16 17:38:05 A scrolling content is on the scrolling contents l
412 else
413 compositedLayerMapping->invalidateDisplayItemClient(displayItemClien t, invalidationReason, previousPaintInvalidationRect, newPaintInvalidationRect);
411 } 414 }
412 } 415 }
413 416
414 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const 417 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const
415 { 418 {
416 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) { 419 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli ng()) {
417 // Outlines of out-of-flow positioned descendants are handled in LayoutB lock::addOutlineRects(). 420 // Outlines of out-of-flow positioned descendants are handled in LayoutB lock::addOutlineRects().
418 if (child->isOutOfFlowPositioned()) 421 if (child->isOutOfFlowPositioned())
419 continue; 422 continue;
420 423
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 if (rootElementStyle->hasBackground()) 1053 if (rootElementStyle->hasBackground())
1051 return false; 1054 return false;
1052 1055
1053 if (node() != document().firstBodyElement()) 1056 if (node() != document().firstBodyElement())
1054 return false; 1057 return false;
1055 1058
1056 return true; 1059 return true;
1057 } 1060 }
1058 1061
1059 } // namespace blink 1062 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698