OLD | NEW |
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 Loading... |
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 // FIXME: We should add an optimized form of layout that just recomputes
visual overflow. | |
539 if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedD
ata.get())) | |
540 return true; | |
541 | |
542 if (!rareNonInheritedData->reflectionDataEquivalent(*other.rareNonInheri
tedData.get())) | 538 if (!rareNonInheritedData->reflectionDataEquivalent(*other.rareNonInheri
tedData.get())) |
543 return true; | 539 return true; |
544 | 540 |
545 if (rareNonInheritedData->m_multiCol.get() != other.rareNonInheritedData
->m_multiCol.get() | 541 if (rareNonInheritedData->m_multiCol.get() != other.rareNonInheritedData
->m_multiCol.get() |
546 && *rareNonInheritedData->m_multiCol.get() != *other.rareNonInherite
dData->m_multiCol.get()) | 542 && *rareNonInheritedData->m_multiCol.get() != *other.rareNonInherite
dData->m_multiCol.get()) |
547 return true; | 543 return true; |
548 | 544 |
549 // If the counter directives change, trigger a relayout to re-calculate
counter values and rebuild the counter node tree. | 545 // If the counter directives change, trigger a relayout to re-calculate
counter values and rebuild the counter node tree. |
550 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirecti
ves.get(); | 546 const CounterDirectiveMap* mapA = rareNonInheritedData->m_counterDirecti
ves.get(); |
551 const CounterDirectiveMap* mapB = other.rareNonInheritedData->m_counterD
irectives.get(); | 547 const CounterDirectiveMap* mapB = other.rareNonInheritedData->m_counterD
irectives.get(); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
652 return true; | 648 return true; |
653 } else if (noninherited_flags.effectiveDisplay == LIST_ITEM) { | 649 } else if (noninherited_flags.effectiveDisplay == LIST_ITEM) { |
654 if (inherited_flags._list_style_type != other.inherited_flags._list_styl
e_type | 650 if (inherited_flags._list_style_type != other.inherited_flags._list_styl
e_type |
655 || inherited_flags._list_style_position != other.inherited_flags._li
st_style_position) | 651 || inherited_flags._list_style_position != other.inherited_flags._li
st_style_position) |
656 return true; | 652 return true; |
657 } | 653 } |
658 | 654 |
659 if ((visibility() == COLLAPSE) != (other.visibility() == COLLAPSE)) | 655 if ((visibility() == COLLAPSE) != (other.visibility() == COLLAPSE)) |
660 return true; | 656 return true; |
661 | 657 |
662 if (!m_background->outline().visuallyEqual(other.m_background->outline())) { | |
663 // FIXME: We only really need to recompute the overflow but we don't hav
e an optimized layout for it. | |
664 return true; | |
665 } | |
666 | |
667 if (hasPseudoStyle(PseudoIdScrollbar) != other.hasPseudoStyle(PseudoIdScroll
bar)) | 658 if (hasPseudoStyle(PseudoIdScrollbar) != other.hasPseudoStyle(PseudoIdScroll
bar)) |
668 return true; | 659 return true; |
669 | 660 |
670 // Movement of non-static-positioned object is special cased in ComputedStyl
e::visualInvalidationDiff(). | 661 // Movement of non-static-positioned object is special cased in ComputedStyl
e::visualInvalidationDiff(). |
671 | 662 |
672 return false; | 663 return false; |
673 } | 664 } |
674 | 665 |
675 bool ComputedStyle::diffNeedsFullLayout(const ComputedStyle& other) const | 666 bool ComputedStyle::diffNeedsFullLayout(const ComputedStyle& other) const |
676 { | 667 { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask | 716 if (rareNonInheritedData->m_mask != other.rareNonInheritedData->m_mask |
726 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat
a->m_maskBoxImage) | 717 || rareNonInheritedData->m_maskBoxImage != other.rareNonInheritedDat
a->m_maskBoxImage) |
727 return true; | 718 return true; |
728 } | 719 } |
729 | 720 |
730 return false; | 721 return false; |
731 } | 722 } |
732 | 723 |
733 bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other)
const | 724 bool ComputedStyle::diffNeedsPaintInvalidationObject(const ComputedStyle& other)
const |
734 { | 725 { |
| 726 if (!m_background->outline().visuallyEqual(other.m_background->outline())) |
| 727 return true; |
| 728 |
735 if (inherited_flags._visibility != other.inherited_flags._visibility | 729 if (inherited_flags._visibility != other.inherited_flags._visibility |
736 || inherited_flags.m_printColorAdjust != other.inherited_flags.m_printCo
lorAdjust | 730 || inherited_flags.m_printColorAdjust != other.inherited_flags.m_printCo
lorAdjust |
737 || inherited_flags._insideLink != other.inherited_flags._insideLink | 731 || inherited_flags._insideLink != other.inherited_flags._insideLink |
738 || !surround->border.visuallyEqual(other.surround->border) | 732 || !surround->border.visuallyEqual(other.surround->border) |
739 || !m_background->visuallyEqual(*other.m_background)) | 733 || !m_background->visuallyEqual(*other.m_background)) |
740 return true; | 734 return true; |
741 | 735 |
742 if (rareInheritedData.get() != other.rareInheritedData.get()) { | 736 if (rareInheritedData.get() != other.rareInheritedData.get()) { |
743 if (rareInheritedData->userModify != other.rareInheritedData->userModify | 737 if (rareInheritedData->userModify != other.rareInheritedData->userModify |
744 || rareInheritedData->userSelect != other.rareInheritedData->userSel
ect | 738 || rareInheritedData->userSelect != other.rareInheritedData->userSel
ect |
745 || rareInheritedData->m_imageRendering != other.rareInheritedData->m
_imageRendering) | 739 || rareInheritedData->m_imageRendering != other.rareInheritedData->m
_imageRendering) |
746 return true; | 740 return true; |
747 } | 741 } |
748 | 742 |
749 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 743 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
750 if (rareNonInheritedData->userDrag != other.rareNonInheritedData->userDr
ag | 744 if (rareNonInheritedData->userDrag != other.rareNonInheritedData->userDr
ag |
751 || rareNonInheritedData->m_objectFit != other.rareNonInheritedData->
m_objectFit | 745 || rareNonInheritedData->m_objectFit != other.rareNonInheritedData->
m_objectFit |
752 || rareNonInheritedData->m_objectPosition != other.rareNonInheritedD
ata->m_objectPosition | 746 || rareNonInheritedData->m_objectPosition != other.rareNonInheritedD
ata->m_objectPosition |
| 747 || !rareNonInheritedData->shadowDataEquivalent(*other.rareNonInherit
edData.get()) |
753 || !rareNonInheritedData->shapeOutsideDataEquivalent(*other.rareNonI
nheritedData.get()) | 748 || !rareNonInheritedData->shapeOutsideDataEquivalent(*other.rareNonI
nheritedData.get()) |
754 || !rareNonInheritedData->clipPathDataEquivalent(*other.rareNonInher
itedData.get()) | 749 || !rareNonInheritedData->clipPathDataEquivalent(*other.rareNonInher
itedData.get()) |
755 || (visitedLinkBorderLeftColor() != other.visitedLinkBorderLeftColor
() && borderLeftWidth()) | 750 || (visitedLinkBorderLeftColor() != other.visitedLinkBorderLeftColor
() && borderLeftWidth()) |
756 || (visitedLinkBorderRightColor() != other.visitedLinkBorderRightCol
or() && borderRightWidth()) | 751 || (visitedLinkBorderRightColor() != other.visitedLinkBorderRightCol
or() && borderRightWidth()) |
757 || (visitedLinkBorderBottomColor() != other.visitedLinkBorderBottomC
olor() && borderBottomWidth()) | 752 || (visitedLinkBorderBottomColor() != other.visitedLinkBorderBottomC
olor() && borderBottomWidth()) |
758 || (visitedLinkBorderTopColor() != other.visitedLinkBorderTopColor()
&& borderTopWidth()) | 753 || (visitedLinkBorderTopColor() != other.visitedLinkBorderTopColor()
&& borderTopWidth()) |
759 || (visitedLinkOutlineColor() != other.visitedLinkOutlineColor() &&
outlineWidth()) | 754 || (visitedLinkOutlineColor() != other.visitedLinkOutlineColor() &&
outlineWidth()) |
760 || (visitedLinkBackgroundColor() != other.visitedLinkBackgroundColor
())) | 755 || (visitedLinkBackgroundColor() != other.visitedLinkBackgroundColor
())) |
761 return true; | 756 return true; |
762 } | 757 } |
(...skipping 13 matching lines...) Expand all Loading... |
776 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { | 771 if (rareNonInheritedData.get() != other.rareNonInheritedData.get()) { |
777 if (!transformDataEquivalent(other)) | 772 if (!transformDataEquivalent(other)) |
778 diff.setTransformChanged(); | 773 diff.setTransformChanged(); |
779 | 774 |
780 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) | 775 if (rareNonInheritedData->opacity != other.rareNonInheritedData->opacity
) |
781 diff.setOpacityChanged(); | 776 diff.setOpacityChanged(); |
782 | 777 |
783 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) | 778 if (rareNonInheritedData->m_filter != other.rareNonInheritedData->m_filt
er) |
784 diff.setFilterChanged(); | 779 diff.setFilterChanged(); |
785 | 780 |
| 781 if (!rareNonInheritedData->shadowDataEquivalent(*other.rareNonInheritedD
ata.get())) |
| 782 diff.setNeedsRecomputeOverflow(); |
| 783 |
786 if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData
->m_backdropFilter) | 784 if (rareNonInheritedData->m_backdropFilter != other.rareNonInheritedData
->m_backdropFilter) |
787 diff.setBackdropFilterChanged(); | 785 diff.setBackdropFilterChanged(); |
788 | 786 |
789 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && rareNonInher
itedData->m_boxReflect != other.rareNonInheritedData->m_boxReflect) | 787 if (RuntimeEnabledFeatures::cssBoxReflectFilterEnabled() && rareNonInher
itedData->m_boxReflect != other.rareNonInheritedData->m_boxReflect) |
790 diff.setFilterChanged(); | 788 diff.setFilterChanged(); |
791 } | 789 } |
792 | 790 |
| 791 if (!m_background->outline().visuallyEqual(other.m_background->outline()) ||
!surround->border.visualOverflowEqual(other.surround->border)) |
| 792 diff.setNeedsRecomputeOverflow(); |
| 793 |
793 if (!diff.needsPaintInvalidation()) { | 794 if (!diff.needsPaintInvalidation()) { |
794 if (inherited->color != other.inherited->color | 795 if (inherited->color != other.inherited->color |
795 || inherited->visitedLinkColor != other.inherited->visitedLinkColor | 796 || inherited->visitedLinkColor != other.inherited->visitedLinkColor |
796 || inherited_flags.m_textUnderline != other.inherited_flags.m_textUn
derline | 797 || inherited_flags.m_textUnderline != other.inherited_flags.m_textUn
derline |
797 || visual->textDecoration != other.visual->textDecoration) { | 798 || visual->textDecoration != other.visual->textDecoration) { |
798 diff.setTextDecorationOrColorChanged(); | 799 diff.setTextDecorationOrColorChanged(); |
799 } else if (rareNonInheritedData.get() != other.rareNonInheritedData.get(
) | 800 } else if (rareNonInheritedData.get() != other.rareNonInheritedData.get(
) |
800 && (rareNonInheritedData->m_textDecorationStyle != other.rareNonInhe
ritedData->m_textDecorationStyle | 801 && (rareNonInheritedData->m_textDecorationStyle != other.rareNonInhe
ritedData->m_textDecorationStyle |
801 || rareNonInheritedData->m_textDecorationColor != other.rareNonI
nheritedData->m_textDecorationColor | 802 || rareNonInheritedData->m_textDecorationColor != other.rareNonI
nheritedData->m_textDecorationColor |
802 || rareNonInheritedData->m_visitedLinkTextDecorationColor != oth
er.rareNonInheritedData->m_visitedLinkTextDecorationColor)) { | 803 || rareNonInheritedData->m_visitedLinkTextDecorationColor != oth
er.rareNonInheritedData->m_visitedLinkTextDecorationColor)) { |
(...skipping 999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1802 if (!shadowList) | 1803 if (!shadowList) |
1803 return false; | 1804 return false; |
1804 for (size_t i = shadowList->shadows().size(); i--; ) { | 1805 for (size_t i = shadowList->shadows().size(); i--; ) { |
1805 if (shadowList->shadows()[i].color().isCurrentColor()) | 1806 if (shadowList->shadows()[i].color().isCurrentColor()) |
1806 return true; | 1807 return true; |
1807 } | 1808 } |
1808 return false; | 1809 return false; |
1809 } | 1810 } |
1810 | 1811 |
1811 } // namespace blink | 1812 } // namespace blink |
OLD | NEW |