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 633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
644 | 644 |
645 if (rareNonInheritedData->m_clipPath != other->rareNonInheritedData->m_c lipPath) | 645 if (rareNonInheritedData->m_clipPath != other->rareNonInheritedData->m_c lipPath) |
646 return StyleDifferenceRepaint; | 646 return StyleDifferenceRepaint; |
647 | 647 |
648 if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) { | 648 if (rareNonInheritedData.get() != other->rareNonInheritedData.get()) { |
649 if (rareNonInheritedData->m_transformStyle3D != other->rareNonInheritedD ata->m_transformStyle3D | 649 if (rareNonInheritedData->m_transformStyle3D != other->rareNonInheritedD ata->m_transformStyle3D |
650 || rareNonInheritedData->m_backfaceVisibility != other->rareNonInher itedData->m_backfaceVisibility | 650 || rareNonInheritedData->m_backfaceVisibility != other->rareNonInher itedData->m_backfaceVisibility |
651 || rareNonInheritedData->m_perspective != other->rareNonInheritedDat a->m_perspective | 651 || rareNonInheritedData->m_perspective != other->rareNonInheritedDat a->m_perspective |
652 || rareNonInheritedData->m_perspectiveOriginX != other->rareNonInher itedData->m_perspectiveOriginX | 652 || rareNonInheritedData->m_perspectiveOriginX != other->rareNonInher itedData->m_perspectiveOriginX |
653 || rareNonInheritedData->m_perspectiveOriginY != other->rareNonInher itedData->m_perspectiveOriginY | 653 || rareNonInheritedData->m_perspectiveOriginY != other->rareNonInher itedData->m_perspectiveOriginY |
654 || hasWillChangeCompositingHint() != other->hasWillChangeCompositing Hint()) | 654 || hasWillChangeCompositingHint() != other->hasWillChangeCompositing Hint() |
655 || hasWillChangeGpuRasterizationHint() != other->hasWillChangeGpuRas terizationHint()) | |
655 return StyleDifferenceRecompositeLayer; | 656 return StyleDifferenceRecompositeLayer; |
656 } | 657 } |
657 | 658 |
658 if (inherited->color != other->inherited->color | 659 if (inherited->color != other->inherited->color |
659 || inherited_flags._text_decorations != other->inherited_flags._text_dec orations | 660 || inherited_flags._text_decorations != other->inherited_flags._text_dec orations |
660 || visual->textDecoration != other->visual->textDecoration | 661 || visual->textDecoration != other->visual->textDecoration |
661 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite dData->m_textDecorationStyle | 662 || rareNonInheritedData->m_textDecorationStyle != other->rareNonInherite dData->m_textDecorationStyle |
662 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite dData->m_textDecorationColor | 663 || rareNonInheritedData->m_textDecorationColor != other->rareNonInherite dData->m_textDecorationColor |
663 || rareInheritedData->textFillColor != other->rareInheritedData->textFil lColor | 664 || rareInheritedData->textFillColor != other->rareInheritedData->textFil lColor |
664 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS trokeColor | 665 || rareInheritedData->textStrokeColor != other->rareInheritedData->textS trokeColor |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
844 case CSSPropertyBottom: | 845 case CSSPropertyBottom: |
845 case CSSPropertyWebkitFilter: | 846 case CSSPropertyWebkitFilter: |
846 return true; | 847 return true; |
847 default: | 848 default: |
848 break; | 849 break; |
849 } | 850 } |
850 } | 851 } |
851 return false; | 852 return false; |
852 } | 853 } |
853 | 854 |
855 bool RenderStyle::hasWillChangeGpuRasterizationHint() const | |
856 { | |
857 if (willChangeContents()) | |
858 return true; | |
859 | |
860 for (size_t i = 0; i < rareNonInheritedData->m_willChange->m_properties.size (); ++i) { | |
861 switch (rareNonInheritedData->m_willChange->m_properties[i]) { | |
862 case CSSPropertyWidth: | |
863 case CSSPropertyHeight: | |
Ian Vollick
2014/03/07 15:33:52
Dumb question: do we want background position/colo
ajuma
2014/03/07 17:03:41
Good idea, I've added these to the list.
| |
864 return true; | |
865 default: | |
866 break; | |
867 } | |
868 } | |
869 return false; | |
870 } | |
871 | |
854 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) | 872 inline bool requireTransformOrigin(const Vector<RefPtr<TransformOperation> >& tr ansformOperations, RenderStyle::ApplyTransformOrigin applyOrigin) |
855 { | 873 { |
856 // transform-origin brackets the transform with translate operations. | 874 // transform-origin brackets the transform with translate operations. |
857 // Optimize for the case where the only transform is a translation, since th e transform-origin is irrelevant | 875 // Optimize for the case where the only transform is a translation, since th e transform-origin is irrelevant |
858 // in that case. | 876 // in that case. |
859 if (applyOrigin != RenderStyle::IncludeTransformOrigin) | 877 if (applyOrigin != RenderStyle::IncludeTransformOrigin) |
860 return false; | 878 return false; |
861 | 879 |
862 unsigned size = transformOperations.size(); | 880 unsigned size = transformOperations.size(); |
863 for (unsigned i = 0; i < size; ++i) { | 881 for (unsigned i = 0; i < size; ++i) { |
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1619 } | 1637 } |
1620 | 1638 |
1621 void RenderStyle::setBorderImageOutset(const BorderImageLengthBox& outset) | 1639 void RenderStyle::setBorderImageOutset(const BorderImageLengthBox& outset) |
1622 { | 1640 { |
1623 if (surround->border.m_image.outset() == outset) | 1641 if (surround->border.m_image.outset() == outset) |
1624 return; | 1642 return; |
1625 surround.access()->border.m_image.setOutset(outset); | 1643 surround.access()->border.m_image.setOutset(outset); |
1626 } | 1644 } |
1627 | 1645 |
1628 } // namespace WebCore | 1646 } // namespace WebCore |
OLD | NEW |