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

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

Issue 2254893005: Fix visual rect for background box painting in composited scrollers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Deal with delayed-invalidation object. Created 4 years, 4 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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 squashingLayer->setNeedsDisplayInRect(enclosingIntRect(paintInvalida tionRect), invalidationReason, object); 432 squashingLayer->setNeedsDisplayInRect(enclosingIntRect(paintInvalida tionRect), invalidationReason, object);
433 } 433 }
434 } else if (object.compositedScrollsWithRespectTo(*this)) { 434 } else if (object.compositedScrollsWithRespectTo(*this)) {
435 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayInRect (r, invalidationReason, object); 435 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayInRect (r, invalidationReason, object);
436 } else if (usesCompositedScrolling()) { 436 } else if (usesCompositedScrolling()) {
437 if (layer()->compositedLayerMapping()->shouldPaintBackgroundOntoScrollin gContentsLayer()) { 437 if (layer()->compositedLayerMapping()->shouldPaintBackgroundOntoScrollin gContentsLayer()) {
438 // TODO(flackr): Get a correct rect in the context of the scrolling contents layer to update 438 // TODO(flackr): Get a correct rect in the context of the scrolling contents layer to update
439 // rather than updating the entire rect. 439 // rather than updating the entire rect.
440 const LayoutRect& scrollingContentsRect = toLayoutBox(this)->layoutO verflowRect(); 440 const LayoutRect& scrollingContentsRect = toLayoutBox(this)->layoutO verflowRect();
441 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayIn Rect(scrollingContentsRect, invalidationReason, object); 441 layer()->compositedLayerMapping()->setScrollingContentsNeedDisplayIn Rect(scrollingContentsRect, invalidationReason, object);
442 layer()->setNeedsRepaint();
chrishtr 2016/08/22 17:34:54 Why is this line needed?
wkorman 2016/08/22 17:42:27 Copying my comment from https://codereview.chromiu
chrishtr 2016/08/22 17:46:33 No it's ok I think. Thanks for the context.
443 invalidateDisplayItemClient(*layer()->compositedLayerMapping()->scro llingContentsLayer(), invalidationReason);
442 } 444 }
443 layer()->compositedLayerMapping()->setNonScrollingContentsNeedDisplayInR ect(r, invalidationReason, object); 445 layer()->compositedLayerMapping()->setNonScrollingContentsNeedDisplayInR ect(r, invalidationReason, object);
444 } else { 446 } else {
445 // Otherwise invalidate everything. 447 // Otherwise invalidate everything.
446 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason, object); 448 layer()->compositedLayerMapping()->setContentsNeedDisplayInRect(r, inval idationReason, object);
447 } 449 }
448 } 450 }
449 451
450 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const 452 void LayoutBoxModelObject::addOutlineRectsForNormalChildren(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset, IncludeBlockVisualOverflowOrNot incl udeBlockOverflows) const
451 { 453 {
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 if (rootElementStyle->hasBackground()) 1138 if (rootElementStyle->hasBackground())
1137 return false; 1139 return false;
1138 1140
1139 if (node() != document().firstBodyElement()) 1141 if (node() != document().firstBodyElement())
1140 return false; 1142 return false;
1141 1143
1142 return true; 1144 return true;
1143 } 1145 }
1144 1146
1145 } // namespace blink 1147 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698