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

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

Issue 1934833002: Ensure filter and reflection outsets are applied on paint invalidation rect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 return true; 528 return true;
529 529
530 if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other.rareNon InheritedData->m_deprecatedFlexibleBox.get() 530 if (rareNonInheritedData->m_deprecatedFlexibleBox.get() != other.rareNon InheritedData->m_deprecatedFlexibleBox.get()
531 && *rareNonInheritedData->m_deprecatedFlexibleBox.get() != *other.ra reNonInheritedData->m_deprecatedFlexibleBox.get()) 531 && *rareNonInheritedData->m_deprecatedFlexibleBox.get() != *other.ra reNonInheritedData->m_deprecatedFlexibleBox.get())
532 return true; 532 return true;
533 533
534 if (rareNonInheritedData->m_flexibleBox.get() != other.rareNonInheritedD ata->m_flexibleBox.get() 534 if (rareNonInheritedData->m_flexibleBox.get() != other.rareNonInheritedD ata->m_flexibleBox.get()
535 && *rareNonInheritedData->m_flexibleBox.get() != *other.rareNonInher itedData->m_flexibleBox.get()) 535 && *rareNonInheritedData->m_flexibleBox.get() != *other.rareNonInher itedData->m_flexibleBox.get())
536 return true; 536 return true;
537 537
538 if (!rareNonInheritedData->reflectionDataEquivalent(*other.rareNonInheri tedData.get()))
539 return true;
540
541 if (rareNonInheritedData->m_multiCol.get() != other.rareNonInheritedData ->m_multiCol.get() 538 if (rareNonInheritedData->m_multiCol.get() != other.rareNonInheritedData ->m_multiCol.get()
542 && *rareNonInheritedData->m_multiCol.get() != *other.rareNonInherite dData->m_multiCol.get()) 539 && *rareNonInheritedData->m_multiCol.get() != *other.rareNonInherite dData->m_multiCol.get())
543 return true; 540 return true;
544 541
545 // If the counter directives change, trigger a relayout to re-calculate counter values and rebuild the counter node tree. 542 // If the counter directives change, trigger a relayout to re-calculate counter values and rebuild the counter node tree.
546 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirecti ves.get(); 543 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirecti ves.get();
547 const CounterDirectiveMap* mapB = other.rareNonInheritedData->m_counterD irectives.get(); 544 const CounterDirectiveMap* mapB = other.rareNonInheritedData->m_counterD irectives.get();
548 if (!(mapA == mapB || (mapA && mapB && *mapA == *mapB))) 545 if (!(mapA == mapB || (mapA && mapB && *mapA == *mapB)))
549 return true; 546 return true;
550 547
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 } 688 }
692 689
693 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { 690 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) {
694 if (rareNonInheritedData->m_alignContent != other.rareNonInheritedData-> m_alignContent 691 if (rareNonInheritedData->m_alignContent != other.rareNonInheritedData-> m_alignContent
695 || rareNonInheritedData->m_alignItems != other.rareNonInheritedData- >m_alignItems 692 || rareNonInheritedData->m_alignItems != other.rareNonInheritedData- >m_alignItems
696 || rareNonInheritedData->m_alignSelf != other.rareNonInheritedData-> m_alignSelf 693 || rareNonInheritedData->m_alignSelf != other.rareNonInheritedData-> m_alignSelf
697 || rareNonInheritedData->m_justifyContent != other.rareNonInheritedD ata->m_justifyContent 694 || rareNonInheritedData->m_justifyContent != other.rareNonInheritedD ata->m_justifyContent
698 || rareNonInheritedData->m_justifyItems != other.rareNonInheritedDat a->m_justifyItems 695 || rareNonInheritedData->m_justifyItems != other.rareNonInheritedDat a->m_justifyItems
699 || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData ->m_justifySelf) 696 || rareNonInheritedData->m_justifySelf != other.rareNonInheritedData ->m_justifySelf)
700 return true; 697 return true;
698
699 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && !rareNonInh eritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
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::diffNeedsPaintInvalidationLayer(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
717 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat a->m_maskBoxImage) 717 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat a->m_maskBoxImage)
718 return true; 718 return true;
719
720 if (!RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && !rareNonInh eritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
721 return true;
719 } 722 }
720 723
721 return false; 724 return false;
722 } 725 }
723 726
724 bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other) const 727 bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other) const
725 { 728 {
726 if (!m_background->outline().visuallyEqual(other.m_background->outline())) 729 if (!m_background->outline().visuallyEqual(other.m_background->outline()))
727 return true; 730 return true;
728 731
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 780
778 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt er) 781 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt er)
779 diff.setFilterChanged(); 782 diff.setFilterChanged();
780 783
781 if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedD ata.get())) 784 if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedD ata.get()))
782 diff.setNeedsRecomputeOverflow(); 785 diff.setNeedsRecomputeOverflow();
783 786
784 if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData ->m_backdropFilter) 787 if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData ->m_backdropFilter)
785 diff.setBackdropFilterChanged(); 788 diff.setBackdropFilterChanged();
786 789
787 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && rareNonInher itedData->m_boxReflect != other.rareNonInheritedData->m_boxReflect) 790 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && !rareNonInhe ritedData->reflectionDataEquivalent(*other.rareNonInheritedData.get()))
788 diff.setFilterChanged(); 791 diff.setFilterChanged();
789 } 792 }
790 793
791 if (!m_background->outline().visuallyEqual(other.m_background->outline()) || !surround->border.visualOverflowEqual(other.surround->border)) 794 if (!m_background->outline().visuallyEqual(other.m_background->outline()) || !surround->border.visualOverflowEqual(other.surround->border))
792 diff.setNeedsRecomputeOverflow(); 795 diff.setNeedsRecomputeOverflow();
793 796
794 if (!diff.needsPaintInvalidation()) { 797 if (!diff.needsPaintInvalidation()) {
795 if (inherited->color != other.inherited->color 798 if (inherited->color != other.inherited->color
796 || inherited->visitedLinkColor != other.inherited->visitedLinkColor 799 || inherited->visitedLinkColor != other.inherited->visitedLinkColor
797 || inherited_flags.m_textUnderline != other.inherited_flags.m_textUn derline 800 || inherited_flags.m_textUnderline != other.inherited_flags.m_textUn derline
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 if (!shadowList) 1806 if (!shadowList)
1804 return false; 1807 return false;
1805 for (size_t i = shadowList->shadows().size(); i--; ) { 1808 for (size_t i = shadowList->shadows().size(); i--; ) {
1806 if (shadowList->shadows()[i].color().isCurrentColor()) 1809 if (shadowList->shadows()[i].color().isCurrentColor())
1807 return true; 1810 return true;
1808 } 1811 }
1809 return false; 1812 return false;
1810 } 1813 }
1811 1814
1812 } // namespace blink 1815 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698