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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutObject.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) 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 3390 matching lines...) Expand 10 before | Expand all | Expand 10 after
3401 3401
3402 // The PaintController may have changed. Pass the previous paint invalidatio n rect to the new PaintController. 3402 // The PaintController may have changed. Pass the previous paint invalidatio n rect to the new PaintController.
3403 // The rect will be updated if it changes during the next paint invalidation . 3403 // The rect will be updated if it changes during the next paint invalidation .
3404 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidationLa yer, &invalidationRect); 3404 invalidateDisplayItemClients(paintInvalidationContainer, PaintInvalidationLa yer, &invalidationRect);
3405 3405
3406 // This method may be used to invalidate paint of an object changing paint i nvalidation container. 3406 // This method may be used to invalidate paint of an object changing paint i nvalidation container.
3407 // Clear previous paint invalidation rect on the original paint invalidation container to avoid 3407 // Clear previous paint invalidation rect on the original paint invalidation container to avoid
3408 // under-invalidation if the new paint invalidation rect on the new paint in validation container 3408 // under-invalidation if the new paint invalidation rect on the new paint in validation container
3409 // happens to be the same as the old one. 3409 // happens to be the same as the old one.
3410 setPreviousPaintInvalidationRect(LayoutRect()); 3410 setPreviousPaintInvalidationRect(LayoutRect());
3411 if (isBox()) {
3412 if (PaintLayerScrollableArea* scrollableArea = toLayoutBox(this)->scroll ableArea())
3413 scrollableArea->clearPreviousPaintInvalidationRects();
3414 }
3411 } 3415 }
3412 3416
3413 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants() 3417 void LayoutObject::invalidatePaintIncludingNonCompositingDescendants()
3414 { 3418 {
3415 // Since we're only painting non-composited layers, we know that they all sh are the same paintInvalidationContainer. 3419 // Since we're only painting non-composited layers, we know that they all sh are the same paintInvalidationContainer.
3416 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validation(); 3420 const LayoutBoxModelObject& paintInvalidationContainer = containerForPaintIn validation();
3417 traverseNonCompositingDescendants(*this, [&paintInvalidationContainer](Layou tObject& object) { 3421 traverseNonCompositingDescendants(*this, [&paintInvalidationContainer](Layou tObject& object) {
3418 object.invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationC ontainer, PaintInvalidationLayer); 3422 object.invalidatePaintOfPreviousPaintInvalidationRect(paintInvalidationC ontainer, PaintInvalidationLayer);
3419 }); 3423 });
3420 } 3424 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
3499 const blink::LayoutObject* root = object1; 3503 const blink::LayoutObject* root = object1;
3500 while (root->parent()) 3504 while (root->parent())
3501 root = root->parent(); 3505 root = root->parent();
3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3506 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3503 } else { 3507 } else {
3504 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3508 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3505 } 3509 }
3506 } 3510 }
3507 3511
3508 #endif 3512 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698