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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.cpp

Issue 1950573003: Improve handling of PaintInvalidationLayer (renamed to PaintInvalidationSubtree) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@LocationChange
Patch Set: Created 4 years, 7 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 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. 4 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 } 472 }
473 473
474 if (!diff.needsFullLayout() && position() != StaticPosition && surround->off set != other.surround->offset) { 474 if (!diff.needsFullLayout() && position() != StaticPosition && surround->off set != other.surround->offset) {
475 // Optimize for the case where a positioned layer is moving but not chan ging size. 475 // Optimize for the case where a positioned layer is moving but not chan ging size.
476 if (dependenceOnContentHeightHasChanged(*this, other)) 476 if (dependenceOnContentHeightHasChanged(*this, other))
477 diff.setNeedsFullLayout(); 477 diff.setNeedsFullLayout();
478 else 478 else
479 diff.setNeedsPositionedMovementLayout(); 479 diff.setNeedsPositionedMovementLayout();
480 } 480 }
481 481
482 if (diffNeedsPaintInvalidationLayer(other)) 482 if (diffNeedsPaintInvalidationSubtree(other))
483 diff.setNeedsPaintInvalidationLayer(); 483 diff.setNeedsPaintInvalidationSubtree();
484 else if (diffNeedsPaintInvalidationObject(other)) 484 else if (diffNeedsPaintInvalidationObject(other))
485 diff.setNeedsPaintInvalidationObject(); 485 diff.setNeedsPaintInvalidationObject();
486 486
487 updatePropertySpecificDifferences(other, diff); 487 updatePropertySpecificDifferences(other, diff);
488 488
489 // Cursors are not checked, since they will be set appropriately in response to mouse events, 489 // Cursors are not checked, since they will be set appropriately in response to mouse events,
490 // so they don't need to cause any paint invalidation or layout. 490 // so they don't need to cause any paint invalidation or layout.
491 491
492 // Animations don't need to be checked either. We always set the new style o n the layoutObject, so we will get a chance to fire off 492 // Animations don't need to be checked either. We always set the new style o n the layoutObject, so we will get a chance to fire off
493 // the resulting transition properly. 493 // the resulting transition properly.
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
696 || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData ->m_justifySelf) 696 || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData ->m_justifySelf)
697 return true; 697 return true;
698 698
699 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && !rareNonInh eritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get())) 699 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && !rareNonInh eritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
700 return true; 700 return true;
701 } 701 }
702 702
703 return false; 703 return false;
704 } 704 }
705 705
706 bool ComputedStyle::diffNeedsPaintInvalidationLayer(const ComputedStyle& other) const 706 bool ComputedStyle::diffNeedsPaintInvalidationSubtree(const ComputedStyle& other ) const
707 { 707 {
708 if (position() != StaticPosition && (visual->clip != other.visual->clip || v isual->hasAutoClip != other.visual->hasAutoClip)) 708 if (position() != StaticPosition && (visual->clip != other.visual->clip || v isual->hasAutoClip != other.visual->hasAutoClip))
709 return true; 709 return true;
710 710
711 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { 711 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
712 if (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInherited Data->m_effectiveBlendMode 712 if (rareNonInheritedData->m_effectiveBlendMode != other.rareNonInherited Data->m_effectiveBlendMode
713 || rareNonInheritedData->m_isolation != other.rareNonInheritedData-> m_isolation) 713 || rareNonInheritedData->m_isolation != other.rareNonInheritedData-> m_isolation)
714 return true; 714 return true;
715 715
716 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask 716 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 if (!shadowList) 1806 if (!shadowList)
1807 return false; 1807 return false;
1808 for (size_t i = shadowList->shadows().size(); i--; ) { 1808 for (size_t i = shadowList->shadows().size(); i--; ) {
1809 if (shadowList->shadows()[i].color().isCurrentColor()) 1809 if (shadowList->shadows()[i].color().isCurrentColor())
1810 return true; 1810 return true;
1811 } 1811 }
1812 return false; 1812 return false;
1813 } 1813 }
1814 1814
1815 } // namespace blink 1815 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | third_party/WebKit/Source/core/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698