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

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

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/style/ComputedStyle.h ('k') | no next file » | 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 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 case CSSPropertyBottom: 886 case CSSPropertyBottom:
887 case CSSPropertyRight: 887 case CSSPropertyRight:
888 return true; 888 return true;
889 default: 889 default:
890 break; 890 break;
891 } 891 }
892 } 892 }
893 return false; 893 return false;
894 } 894 }
895 895
896 bool ComputedStyle::hasWillChangeTransformHint() const
897 {
898 for (size_t i = 0; i < rareNonInheritedData->m_willChange->m_properties.size (); ++i) {
alancutter (OOO until 2018) 2015/08/29 06:10:04 Can we use for (const auto& property : rareNonInhe
ajuma 2015/08/31 16:43:57 Done.
899 switch (rareNonInheritedData->m_willChange->m_properties[i]) {
900 case CSSPropertyTransform:
901 case CSSPropertyAliasWebkitTransform:
902 return true;
903 default:
904 break;
905 }
906 }
907 return false;
908 }
909
896 bool ComputedStyle::requireTransformOrigin(ApplyTransformOrigin applyOrigin, App lyMotionPath applyMotionPath) const 910 bool ComputedStyle::requireTransformOrigin(ApplyTransformOrigin applyOrigin, App lyMotionPath applyMotionPath) const
897 { 911 {
898 const Vector<RefPtr<TransformOperation>>& transformOperations = transform(). operations(); 912 const Vector<RefPtr<TransformOperation>>& transformOperations = transform(). operations();
899 913
900 // transform-origin brackets the transform with translate operations. 914 // transform-origin brackets the transform with translate operations.
901 // Optimize for the case where the only transform is a translation, since th e transform-origin is irrelevant 915 // Optimize for the case where the only transform is a translation, since th e transform-origin is irrelevant
902 // in that case. 916 // in that case.
903 if (applyOrigin != IncludeTransformOrigin) 917 if (applyOrigin != IncludeTransformOrigin)
904 return false; 918 return false;
905 919
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 } 1789 }
1776 1790
1777 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other) 1791 void ComputedStyle::copyChildDependentFlagsFrom(const ComputedStyle& other)
1778 { 1792 {
1779 setEmptyState(other.emptyState()); 1793 setEmptyState(other.emptyState());
1780 if (other.hasExplicitlyInheritedProperties()) 1794 if (other.hasExplicitlyInheritedProperties())
1781 setHasExplicitlyInheritedProperties(); 1795 setHasExplicitlyInheritedProperties();
1782 } 1796 }
1783 1797
1784 } // namespace blink 1798 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698