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

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 3391 matching lines...) Expand 10 before | Expand all | Expand 10 after
3402 inline void LayoutObject::markAncestorsForPaintInvalidation() { 3402 inline void LayoutObject::markAncestorsForPaintInvalidation() {
3403 for (LayoutObject* parent = this->parentCrossingFrames(); 3403 for (LayoutObject* parent = this->parentCrossingFrames();
3404 parent && !parent->shouldCheckForPaintInvalidation(); 3404 parent && !parent->shouldCheckForPaintInvalidation();
3405 parent = parent->parentCrossingFrames()) 3405 parent = parent->parentCrossingFrames())
3406 parent->m_bitfields.setMayNeedPaintInvalidation(true); 3406 parent->m_bitfields.setMayNeedPaintInvalidation(true);
3407 } 3407 }
3408 3408
3409 inline void LayoutObject::setNeedsPaintOffsetAndVisualRectUpdate() { 3409 inline void LayoutObject::setNeedsPaintOffsetAndVisualRectUpdate() {
3410 if (needsPaintOffsetAndVisualRectUpdate()) 3410 if (needsPaintOffsetAndVisualRectUpdate())
3411 return; 3411 return;
3412
3412 for (auto* object = this; 3413 for (auto* object = this;
3413 object && !object->needsPaintOffsetAndVisualRectUpdate(); 3414 object && !object->needsPaintOffsetAndVisualRectUpdate();
3414 object = object->parentCrossingFrames()) { 3415 object = object->parentCrossingFrames()) {
3415 object->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true); 3416 object->m_bitfields.setNeedsPaintOffsetAndVisualRectUpdate(true);
3416 3417
3417 // Focus ring is special because continuations affect shape of focus ring. 3418 // Focus ring is special because continuations affect shape of focus ring.
3418 // Mark the start object for paint invalidation if it has focus ring. 3419 // Mark the start object for paint invalidation if it has focus ring.
3419 if (!object->isAnonymous() || !object->isLayoutBlockFlow()) 3420 if (!object->isAnonymous() || !object->isLayoutBlockFlow())
3420 continue; 3421 continue;
3421 auto* blockFlow = toLayoutBlockFlow(object); 3422 auto* blockFlow = toLayoutBlockFlow(object);
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
3674 const blink::LayoutObject* root = object1; 3675 const blink::LayoutObject* root = object1;
3675 while (root->parent()) 3676 while (root->parent())
3676 root = root->parent(); 3677 root = root->parent();
3677 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3678 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3678 } else { 3679 } else {
3679 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); 3680 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)");
3680 } 3681 }
3681 } 3682 }
3682 3683
3683 #endif 3684 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.h ('k') | third_party/WebKit/Source/core/layout/PaintInvalidationState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698