 Chromium Code Reviews
 Chromium Code Reviews Issue 1158603003:
  CSS Independent Transform Properties  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master
    
  
    Issue 1158603003:
  CSS Independent Transform Properties  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/blink.git@master| OLD | NEW | 
|---|---|
| 1 /* | 1 /* | 
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 
| 3 * | 3 * | 
| 4 * * Redistributions of source code must retain the above copyright | 4 * * Redistributions of source code must retain the above copyright | 
| 5 * notice, this list of conditions and the following disclaimer. | 5 * notice, this list of conditions and the following disclaimer. | 
| 6 * * Redistributions in binary form must reproduce the above | 6 * * Redistributions in binary form must reproduce the above | 
| 7 * copyright notice, this list of conditions and the following disclaimer | 7 * copyright notice, this list of conditions and the following disclaimer | 
| 8 * in the documentation and/or other materials provided with the | 8 * in the documentation and/or other materials provided with the | 
| 9 * distribution. | 9 * distribution. | 
| 10 * * Neither the name of Google Inc. nor the names of its | 10 * * Neither the name of Google Inc. nor the names of its | 
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 #include "core/css/resolver/StyleResolverState.h" | 32 #include "core/css/resolver/StyleResolverState.h" | 
| 33 #include "core/layout/LayoutView.h" | 33 #include "core/layout/LayoutView.h" | 
| 34 #include "core/style/QuotesData.h" | 34 #include "core/style/QuotesData.h" | 
| 35 #include "core/style/ShadowList.h" | 35 #include "core/style/ShadowList.h" | 
| 36 #include "core/style/StyleReflection.h" | 36 #include "core/style/StyleReflection.h" | 
| 37 #include "core/style/StyleScrollSnapData.h" | 37 #include "core/style/StyleScrollSnapData.h" | 
| 38 #include "core/style/TransformOrigin.h" | 38 #include "core/style/TransformOrigin.h" | 
| 39 #include "platform/LengthSize.h" | 39 #include "platform/LengthSize.h" | 
| 40 #include "platform/fonts/FontDescription.h" | 40 #include "platform/fonts/FontDescription.h" | 
| 41 #include "platform/text/TabSize.h" | 41 #include "platform/text/TabSize.h" | 
| 42 #include "platform/transforms/RotateTransformOperation.h" | |
| 43 #include "platform/transforms/ScaleTransformOperation.h" | |
| 44 #include "platform/transforms/TranslateTransformOperation.h" | |
| 
alancutter (OOO until 2018)
2015/06/17 07:38:32
Can these just be forward declared instead?
 
soonm
2015/06/17 23:56:53
Done.
 | |
| 42 | 45 | 
| 43 namespace blink { | 46 namespace blink { | 
| 44 | 47 | 
| 45 // Note that we assume the parser only allows valid CSSValue types. | 48 // Note that we assume the parser only allows valid CSSValue types. | 
| 46 | 49 | 
| 47 class StyleBuilderConverter { | 50 class StyleBuilderConverter { | 
| 48 public: | 51 public: | 
| 49 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS SValue*); | 52 static PassRefPtr<StyleReflection> convertBoxReflect(StyleResolverState&, CS SValue*); | 
| 50 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue* ); | 53 static AtomicString convertFragmentIdentifier(StyleResolverState&, CSSValue* ); | 
| 51 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin k = false); | 54 static Color convertColor(StyleResolverState&, CSSValue*, bool forVisitedLin k = false); | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 83 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); | 86 static EPaintOrder convertPaintOrder(StyleResolverState&, CSSValue*); | 
| 84 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); | 87 static PassRefPtr<ShadowList> convertShadow(StyleResolverState&, CSSValue*); | 
| 85 static PassRefPtr<ShapeValue> convertShapeValue(StyleResolverState&, CSSValu e*); | 88 static PassRefPtr<ShapeValue> convertShapeValue(StyleResolverState&, CSSValu e*); | 
| 86 static float convertSpacing(StyleResolverState&, CSSValue*); | 89 static float convertSpacing(StyleResolverState&, CSSValue*); | 
| 87 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol verState&, CSSValue*); | 90 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol verState&, CSSValue*); | 
| 88 static PassRefPtr<SVGDashArray> convertStrokeDasharray(StyleResolverState&, CSSValue*); | 91 static PassRefPtr<SVGDashArray> convertStrokeDasharray(StyleResolverState&, CSSValue*); | 
| 89 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for VisitedLink = false); | 92 static StyleColor convertStyleColor(StyleResolverState&, CSSValue*, bool for VisitedLink = false); | 
| 90 static Color convertSVGColor(StyleResolverState&, CSSValue*); | 93 static Color convertSVGColor(StyleResolverState&, CSSValue*); | 
| 91 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); | 94 static float convertTextStrokeWidth(StyleResolverState&, CSSValue*); | 
| 92 static TransformOrigin convertTransformOrigin(StyleResolverState&, CSSValue* ); | 95 static TransformOrigin convertTransformOrigin(StyleResolverState&, CSSValue* ); | 
| 93 | |
| 94 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); | 96 static bool convertGridTrackList(CSSValue*, Vector<GridTrackSize>&, NamedGri dLinesMap&, OrderedNamedGridLines&, StyleResolverState&); | 
| 95 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection); | 97 static void createImplicitNamedGridLinesFromGridArea(const NamedGridAreaMap& , NamedGridLinesMap&, GridTrackSizingDirection); | 
| 96 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&); | 98 static void convertOrderedNamedGridLinesMapToNamedGridLinesMap(const Ordered NamedGridLines&, NamedGridLinesMap&); | 
| 97 | |
| 98 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, CSSValue*); | 99 static ScrollSnapPoints convertSnapPoints(StyleResolverState&, CSSValue*); | 
| 99 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, CSSVa lue*); | 100 static Vector<LengthPoint> convertSnapCoordinates(StyleResolverState&, CSSVa lue*); | 
| 100 static LengthPoint convertSnapDestination(StyleResolverState&, CSSValue*); | 101 static LengthPoint convertSnapDestination(StyleResolverState&, CSSValue*); | 
| 102 static PassRefPtr<TranslateTransformOperation> convertTranslate(StyleResolve rState&, CSSValue*); | |
| 103 static PassRefPtr<RotateTransformOperation> convertRotate(StyleResolverState &, CSSValue*); | |
| 104 static PassRefPtr<ScaleTransformOperation> convertScale(StyleResolverState&, CSSValue*); | |
| 101 }; | 105 }; | 
| 102 | 106 | 
| 103 template <typename T> | 107 template <typename T> | 
| 104 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value) | 108 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value) | 
| 105 { | 109 { | 
| 106 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers ionData()); | 110 return toCSSPrimitiveValue(value)->computeLength<T>(state.cssToLengthConvers ionData()); | 
| 107 } | 111 } | 
| 108 | 112 | 
| 109 template <typename T> | 113 template <typename T> | 
| 110 T StyleBuilderConverter::convertFlags(StyleResolverState& state, CSSValue* value ) | 114 T StyleBuilderConverter::convertFlags(StyleResolverState& state, CSSValue* value ) | 
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 148 { | 152 { | 
| 149 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 153 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); | 
| 150 if (primitiveValue->getValueID() == IdForNone) | 154 if (primitiveValue->getValueID() == IdForNone) | 
| 151 return nullAtom; | 155 return nullAtom; | 
| 152 return AtomicString(primitiveValue->getStringValue()); | 156 return AtomicString(primitiveValue->getStringValue()); | 
| 153 } | 157 } | 
| 154 | 158 | 
| 155 } // namespace blink | 159 } // namespace blink | 
| 156 | 160 | 
| 157 #endif | 161 #endif | 
| OLD | NEW |