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

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

Issue 2539693002: Early-out from the prepaint tree walk (Closed)
Patch Set: Address chrishtrs comments Created 4 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. 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 2717 matching lines...) Expand 10 before | Expand all | Expand 10 after
2728 // Clear the bit first so that anchor.clear() doesn't recurse into 2728 // Clear the bit first so that anchor.clear() doesn't recurse into
2729 // findReferencingScrollAnchors. 2729 // findReferencingScrollAnchors.
2730 m_bitfields.setIsScrollAnchorObject(false); 2730 m_bitfields.setIsScrollAnchorObject(false);
2731 findReferencingScrollAnchors(this, Clear); 2731 findReferencingScrollAnchors(this, Clear);
2732 } 2732 }
2733 } 2733 }
2734 2734
2735 void LayoutObject::setNeedsPaintPropertyUpdate() { 2735 void LayoutObject::setNeedsPaintPropertyUpdate() {
2736 m_bitfields.setNeedsPaintPropertyUpdate(true); 2736 m_bitfields.setNeedsPaintPropertyUpdate(true);
2737 2737
2738 // Mark all ancestors as having a descendant needing paint property updates.
2739 // |paintInvalidationParent()| is used to ensure we continue marking across
2740 // frame boundaries.
2741 LayoutObject* ancestor = paintInvalidationParent(); 2738 LayoutObject* ancestor = paintInvalidationParent();
2742 while (ancestor && !ancestor->descendantNeedsPaintPropertyUpdate()) { 2739 while (ancestor && !ancestor->descendantNeedsPaintPropertyUpdate()) {
2743 ancestor->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true); 2740 ancestor->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true);
2744 ancestor = ancestor->paintInvalidationParent(); 2741 ancestor = ancestor->paintInvalidationParent();
2745 } 2742 }
2746 } 2743 }
2747 2744
2748 void LayoutObject::setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling() { 2745 void LayoutObject::setAncestorsNeedPaintPropertyUpdateForMainThreadScrolling() {
2749 LayoutObject* ancestor = paintInvalidationParent(); 2746 LayoutObject* ancestor = paintInvalidationParent();
2750 while (ancestor) { 2747 while (ancestor) {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
3502 const blink::LayoutObject* root = object1; 3499 const blink::LayoutObject* root = object1;
3503 while (root->parent()) 3500 while (root->parent())
3504 root = root->parent(); 3501 root = root->parent();
3505 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3506 } else { 3503 } else {
3507 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3504 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3508 } 3505 }
3509 } 3506 }
3510 3507
3511 #endif 3508 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698