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

Side by Side Diff: Source/core/rendering/style/RenderStyle.cpp

Issue 360103008: Remove dead StyleDifference::needsRecompositeLayer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 } 395 }
396 } 396 }
397 397
398 if (diffNeedsRepaintLayer(other)) 398 if (diffNeedsRepaintLayer(other))
399 diff.setNeedsRepaintLayer(); 399 diff.setNeedsRepaintLayer();
400 else if (diffNeedsRepaintObject(other)) 400 else if (diffNeedsRepaintObject(other))
401 diff.setNeedsRepaintObject(); 401 diff.setNeedsRepaintObject();
402 402
403 changedContextSensitiveProperties = computeChangedContextSensitiveProperties (other, diff); 403 changedContextSensitiveProperties = computeChangedContextSensitiveProperties (other, diff);
404 404
405 if (diff.hasNoChange() && diffNeedsRecompositeLayer(other))
406 diff.setNeedsRecompositeLayer();
407
408 // Cursors are not checked, since they will be set appropriately in response to mouse events, 405 // Cursors are not checked, since they will be set appropriately in response to mouse events,
409 // so they don't need to cause any repaint or layout. 406 // so they don't need to cause any repaint or layout.
410 407
411 // Animations don't need to be checked either. We always set the new style o n the RenderObject, so we will get a chance to fire off 408 // Animations don't need to be checked either. We always set the new style o n the RenderObject, so we will get a chance to fire off
412 // the resulting transition properly. 409 // the resulting transition properly.
413 410
414 return diff; 411 return diff;
415 } 412 }
416 413
417 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const 414 bool RenderStyle::diffNeedsFullLayoutAndRepaint(const RenderStyle& other) const
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
660 || rareNonInheritedData->m_objectFit != other.rareNonInheritedData-> m_objectFit 657 || rareNonInheritedData->m_objectFit != other.rareNonInheritedData-> m_objectFit
661 || rareNonInheritedData->m_objectPosition != other.rareNonInheritedD ata->m_objectPosition 658 || rareNonInheritedData->m_objectPosition != other.rareNonInheritedD ata->m_objectPosition
662 || rareNonInheritedData->m_shapeOutside != other.rareNonInheritedDat a->m_shapeOutside 659 || rareNonInheritedData->m_shapeOutside != other.rareNonInheritedDat a->m_shapeOutside
663 || rareNonInheritedData->m_clipPath != other.rareNonInheritedData->m _clipPath) 660 || rareNonInheritedData->m_clipPath != other.rareNonInheritedData->m _clipPath)
664 return true; 661 return true;
665 } 662 }
666 663
667 return false; 664 return false;
668 } 665 }
669 666
670 bool RenderStyle::diffNeedsRecompositeLayer(const RenderStyle& other) const
671 {
672 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
673 if (rareNonInheritedData->m_transformStyle3D != other.rareNonInheritedDa ta->m_transformStyle3D
674 || rareNonInheritedData->m_backfaceVisibility != other.rareNonInheri tedData->m_backfaceVisibility
675 || rareNonInheritedData->m_perspective != other.rareNonInheritedData ->m_perspective
676 || rareNonInheritedData->m_perspectiveOriginX != other.rareNonInheri tedData->m_perspectiveOriginX
677 || rareNonInheritedData->m_perspectiveOriginY != other.rareNonInheri tedData->m_perspectiveOriginY
678 || hasWillChangeCompositingHint() != other.hasWillChangeCompositingH int())
679 return true;
680 }
681
682 return false;
683 }
684
685 unsigned RenderStyle::computeChangedContextSensitiveProperties(const RenderStyle & other, StyleDifference diff) const 667 unsigned RenderStyle::computeChangedContextSensitiveProperties(const RenderStyle & other, StyleDifference diff) const
686 { 668 {
687 unsigned changedContextSensitiveProperties = ContextSensitivePropertyNone; 669 unsigned changedContextSensitiveProperties = ContextSensitivePropertyNone;
688 670
689 // StyleAdjuster has ensured that zIndex is non-auto only if it's applicable . 671 // StyleAdjuster has ensured that zIndex is non-auto only if it's applicable .
690 if (m_box->zIndex() != other.m_box->zIndex() || m_box->hasAutoZIndex() != ot her.m_box->hasAutoZIndex()) 672 if (m_box->zIndex() != other.m_box->zIndex() || m_box->hasAutoZIndex() != ot her.m_box->hasAutoZIndex())
691 changedContextSensitiveProperties |= ContextSensitivePropertyZIndex; 673 changedContextSensitiveProperties |= ContextSensitivePropertyZIndex;
692 674
693 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { 675 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
694 if (!transformDataEquivalent(other)) 676 if (!transformDataEquivalent(other))
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1707 // right 1689 // right
1708 radiiSum = radii.topRight().height() + radii.bottomRight().height(); 1690 radiiSum = radii.topRight().height() + radii.bottomRight().height();
1709 if (radiiSum > rect.height()) 1691 if (radiiSum > rect.height())
1710 factor = std::min(rect.height() / radiiSum, factor); 1692 factor = std::min(rect.height() / radiiSum, factor);
1711 1693
1712 ASSERT(factor <= 1); 1694 ASSERT(factor <= 1);
1713 return factor; 1695 return factor;
1714 } 1696 }
1715 1697
1716 } // namespace WebCore 1698 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.cpp ('k') | Source/core/rendering/style/StyleDifference.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698