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

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

Issue 2732573003: Skip paint property update and visual rect update if no geometry change (Closed)
Patch Set: - Created 3 years, 8 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) 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. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2009 Google Inc. All rights reserved. 8 * Copyright (C) 2009 Google Inc. All rights reserved.
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved.
10 * (http://www.torchmobile.com/) 10 * (http://www.torchmobile.com/)
(...skipping 3410 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 inline void LayoutObject::markAncestorsForPaintInvalidation() { 3421 inline void LayoutObject::markAncestorsForPaintInvalidation() {
3422 for (LayoutObject* parent = this->paintInvalidationParent(); 3422 for (LayoutObject* parent = this->paintInvalidationParent();
3423 parent && !parent->shouldCheckForPaintInvalidation(); 3423 parent && !parent->shouldCheckForPaintInvalidation();
3424 parent = parent->paintInvalidationParent()) 3424 parent = parent->paintInvalidationParent())
3425 parent->m_bitfields.setMayNeedPaintInvalidation(true); 3425 parent->m_bitfields.setMayNeedPaintInvalidation(true);
3426 } 3426 }
3427 3427
3428 inline void LayoutObject::setNeedsPaintOffsetAndVisualRectUpdate() { 3428 inline void LayoutObject::setNeedsPaintOffsetAndVisualRectUpdate() {
3429 if (needsPaintOffsetAndVisualRectUpdate()) 3429 if (needsPaintOffsetAndVisualRectUpdate())
3430 return; 3430 return;
3431
3431 for (auto* object = this; 3432 for (auto* object = this;
3432 object && !object->needsPaintOffsetAndVisualRectUpdate(); 3433 object && !object->needsPaintOffsetAndVisualRectUpdate();
3433 object = object->paintInvalidationParent()) { 3434 object = object->paintInvalidationParent()) {
3434 object->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true); 3435 object->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true);
3435 3436
3436 // Focus ring is special because continuations affect shape of focus ring. 3437 // Focus ring is special because continuations affect shape of focus ring.
3437 // Mark the start object for paint invalidation if it has focus ring. 3438 // Mark the start object for paint invalidation if it has focus ring.
3438 if (!object->isAnonymous() || !object->isLayoutBlockFlow()) 3439 if (!object->isAnonymous() || !object->isLayoutBlockFlow())
3439 continue; 3440 continue;
3440 auto* blockFlow = toLayoutBlockFlow(object); 3441 auto* blockFlow = toLayoutBlockFlow(object);
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 const blink::LayoutObject* root = object1; 3648 const blink::LayoutObject* root = object1;
3648 while (root->parent()) 3649 while (root->parent())
3649 root = root->parent(); 3650 root = root->parent();
3650 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3651 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3651 } else { 3652 } else {
3652 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3653 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3653 } 3654 }
3654 } 3655 }
3655 3656
3656 #endif 3657 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698