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

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

Issue 1491193003: Fix several corner case issues of scrollbar paint invalidation (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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(root Layer()); 329 CompositingInputsUpdater::assertNeedsCompositingInputsUpdateBitsCleared(root Layer());
330 #endif 330 #endif
331 } 331 }
332 332
333 static void forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(LayoutObject* layoutObject) 333 static void forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(LayoutObject* layoutObject)
334 { 334 {
335 // We clear the previous paint invalidation rect as it's wrong (paint invali ation container 335 // We clear the previous paint invalidation rect as it's wrong (paint invali ation container
336 // changed, ...). Forcing a full invalidation will make us recompute it. Als o we are not 336 // changed, ...). Forcing a full invalidation will make us recompute it. Als o we are not
337 // changing the previous position from our paint invalidation container, whi ch is fine as 337 // changing the previous position from our paint invalidation container, whi ch is fine as
338 // we want a full paint invalidation anyway. 338 // we want a full paint invalidation anyway.
339 layoutObject->setPreviousPaintInvalidationRect(LayoutRect()); 339 layoutObject->setPreviousPaintInvalidationRect(LayoutRect());
chrishtr 2015/12/03 18:52:36 Add a new virtual method LayoutObject::clearPrevio
Xianzhu 2015/12/03 22:13:27 Done.
340 if (layoutObject->isBox()) {
341 if (PaintLayerScrollableArea* scrollableArea = toLayoutBox(layoutObject) ->scrollableArea())
342 scrollableArea->clearPreviousPaintInvalidationRects();
343 }
340 layoutObject->setShouldDoFullPaintInvalidation(); 344 layoutObject->setShouldDoFullPaintInvalidation();
341 345
342 for (LayoutObject* child = layoutObject->slowFirstChild(); child; child = ch ild->nextSibling()) { 346 for (LayoutObject* child = layoutObject->slowFirstChild(); child; child = ch ild->nextSibling()) {
343 if (!child->isPaintInvalidationContainer()) 347 if (!child->isPaintInvalidationContainer())
344 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(child); 348 forceRecomputePaintInvalidationRectsIncludingNonCompositingDescendan ts(child);
345 } 349 }
346 } 350 }
347 351
348 352
349 void PaintLayerCompositor::updateIfNeeded() 353 void PaintLayerCompositor::updateIfNeeded()
(...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
1192 } else if (graphicsLayer == m_scrollLayer.get()) { 1196 } else if (graphicsLayer == m_scrollLayer.get()) {
1193 name = "Frame Scrolling Layer"; 1197 name = "Frame Scrolling Layer";
1194 } else { 1198 } else {
1195 ASSERT_NOT_REACHED(); 1199 ASSERT_NOT_REACHED();
1196 } 1200 }
1197 1201
1198 return name; 1202 return name;
1199 } 1203 }
1200 1204
1201 } // namespace blink 1205 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698