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

Side by Side Diff: Source/core/style/ComputedStyle.h

Issue 1318273003: Prevent will-change:transform from changing the computed value of transform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 3 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/css/resolver/StyleAdjuster.cpp ('k') | Source/core/style/ComputedStyle.cpp » ('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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); } 874 TextEmphasisPosition textEmphasisPosition() const { return static_cast<TextE mphasisPosition>(rareInheritedData->textEmphasisPosition); }
875 const AtomicString& textEmphasisMarkString() const; 875 const AtomicString& textEmphasisMarkString() const;
876 876
877 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); } 877 RubyPosition rubyPosition() const { return static_cast<RubyPosition>(rareInh eritedData->m_rubyPosition); }
878 878
879 TextOrientation textOrientation() const { return static_cast<TextOrientation >(rareInheritedData->m_textOrientation); } 879 TextOrientation textOrientation() const { return static_cast<TextOrientation >(rareInheritedData->m_textOrientation); }
880 880
881 ObjectFit objectFit() const { return static_cast<ObjectFit>(rareNonInherited Data->m_objectFit); } 881 ObjectFit objectFit() const { return static_cast<ObjectFit>(rareNonInherited Data->m_objectFit); }
882 LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPo sition; } 882 LengthPoint objectPosition() const { return rareNonInheritedData->m_objectPo sition; }
883 883
884 // Return true if any transform related property (currently transform/motion Path, transformStyle3D or perspective) 884 // Return true if any transform related property (currently transform/motion Path, transformStyle3D, perspective,
885 // indicates that we are transforming 885 // or will-change:transform) indicates that we are transforming. will-change :transform should result in
886 bool hasTransformRelatedProperty() const { return hasTransform() || preserve s3D() || hasPerspective(); } 886 // the same rendering behavior as having a transform, including the creation of a containing block
887 // for fixed position descendants.
888 bool hasTransformRelatedProperty() const { return hasTransform() || preserve s3D() || hasPerspective() || hasWillChangeTransformHint(); }
887 889
888 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin } ; 890 enum ApplyTransformOrigin { IncludeTransformOrigin, ExcludeTransformOrigin } ;
889 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath }; 891 enum ApplyMotionPath { IncludeMotionPath, ExcludeMotionPath };
890 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper ties , ExcludeIndependentTransformProperties }; 892 enum ApplyIndependentTransformProperties { IncludeIndependentTransformProper ties , ExcludeIndependentTransformProperties };
891 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons t; 893 void applyTransform(TransformationMatrix&, const LayoutSize& borderBoxSize, ApplyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) cons t;
892 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const; 894 void applyTransform(TransformationMatrix&, const FloatRect& boundingBox, App lyTransformOrigin, ApplyMotionPath, ApplyIndependentTransformProperties) const;
893 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); } 895 bool hasMask() const { return rareNonInheritedData->m_mask.hasImage() || rar eNonInheritedData->m_maskBoxImage.hasImage(); }
894 896
895 TextCombine textCombine() const { return static_cast<TextCombine>(rareInheri tedData->m_textCombine); } 897 TextCombine textCombine() const { return static_cast<TextCombine>(rareInheri tedData->m_textCombine); }
896 bool hasTextCombine() const { return textCombine() != TextCombineNone; } 898 bool hasTextCombine() const { return textCombine() != TextCombineNone; }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 ScrollSnapType scrollSnapType() const { return static_cast<ScrollSnapType>(r areNonInheritedData->m_scrollSnapType); } 974 ScrollSnapType scrollSnapType() const { return static_cast<ScrollSnapType>(r areNonInheritedData->m_scrollSnapType); }
973 ScrollSnapPoints scrollSnapPointsX() const { return rareNonInheritedData->m_ scrollSnap->m_xPoints; } 975 ScrollSnapPoints scrollSnapPointsX() const { return rareNonInheritedData->m_ scrollSnap->m_xPoints; }
974 ScrollSnapPoints scrollSnapPointsY() const { return rareNonInheritedData->m_ scrollSnap->m_yPoints; } 976 ScrollSnapPoints scrollSnapPointsY() const { return rareNonInheritedData->m_ scrollSnap->m_yPoints; }
975 Vector<LengthPoint> scrollSnapCoordinate() const { return rareNonInheritedDa ta->m_scrollSnap->m_coordinates; } 977 Vector<LengthPoint> scrollSnapCoordinate() const { return rareNonInheritedDa ta->m_scrollSnap->m_coordinates; }
976 LengthPoint scrollSnapDestination() const { return rareNonInheritedData->m_s crollSnap->m_destination; } 978 LengthPoint scrollSnapDestination() const { return rareNonInheritedData->m_s crollSnap->m_destination; }
977 979
978 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; } 980 const Vector<CSSPropertyID>& willChangeProperties() const { return rareNonIn heritedData->m_willChange->m_properties; }
979 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; } 981 bool willChangeContents() const { return rareNonInheritedData->m_willChange- >m_contents; }
980 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; } 982 bool willChangeScrollPosition() const { return rareNonInheritedData->m_willC hange->m_scrollPosition; }
981 bool hasWillChangeCompositingHint() const; 983 bool hasWillChangeCompositingHint() const;
984 bool hasWillChangeTransformHint() const;
982 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; } 985 bool subtreeWillChangeContents() const { return rareInheritedData->m_subtree WillChangeContents; }
983 986
984 // attribute setter methods 987 // attribute setter methods
985 988
986 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; } 989 void setDisplay(EDisplay v) { noninherited_flags.effectiveDisplay = v; }
987 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v ; } 990 void setOriginalDisplay(EDisplay v) { noninherited_flags.originalDisplay = v ; }
988 void setPosition(EPosition v) { noninherited_flags.position = v; } 991 void setPosition(EPosition v) { noninherited_flags.position = v; }
989 void setFloating(EFloat v) { noninherited_flags.floating = v; } 992 void setFloating(EFloat v) { noninherited_flags.floating = v; }
990 993
991 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); } 994 void setLeft(const Length& v) { SET_VAR(surround, offset.m_left, v); }
(...skipping 967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1959 } 1962 }
1960 1963
1961 inline bool ComputedStyle::hasPseudoElementStyle() const 1964 inline bool ComputedStyle::hasPseudoElementStyle() const
1962 { 1965 {
1963 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK; 1966 return noninherited_flags.pseudoBits & PSEUDO_ELEMENT_MASK;
1964 } 1967 }
1965 1968
1966 } // namespace blink 1969 } // namespace blink
1967 1970
1968 #endif // ComputedStyle_h 1971 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleAdjuster.cpp ('k') | Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698