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

Side by Side Diff: Source/core/css/resolver/StyleBuilderCustom.h

Issue 24077007: Add support for the object-position CSS property. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master again Created 7 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
« no previous file with comments | « Source/core/css/Pair.h ('k') | Source/core/css/resolver/StyleBuilderCustom.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) 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 26 matching lines...) Expand all
37 // Note that we assume the parser only allows valid CSSValue types. 37 // Note that we assume the parser only allows valid CSSValue types.
38 38
39 class StyleBuilderConverter { 39 class StyleBuilderConverter {
40 public: 40 public:
41 template <typename T> static T convertComputedLength(StyleResolverState&, CS SValue*); 41 template <typename T> static T convertComputedLength(StyleResolverState&, CS SValue*);
42 template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu e*); 42 template <typename T> static T convertLineWidth(StyleResolverState&, CSSValu e*);
43 static Length convertLength(StyleResolverState&, CSSValue*); 43 static Length convertLength(StyleResolverState&, CSSValue*);
44 static Length convertLengthOrAuto(StyleResolverState&, CSSValue*); 44 static Length convertLengthOrAuto(StyleResolverState&, CSSValue*);
45 static Length convertLengthSizing(StyleResolverState&, CSSValue*); 45 static Length convertLengthSizing(StyleResolverState&, CSSValue*);
46 static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*); 46 static Length convertLengthMaxSizing(StyleResolverState&, CSSValue*);
47 static LengthPoint convertLengthPoint(StyleResolverState&, CSSValue*);
47 static LengthSize convertRadius(StyleResolverState&, CSSValue*); 48 static LengthSize convertRadius(StyleResolverState&, CSSValue*);
48 static float convertSpacing(StyleResolverState&, CSSValue*); 49 static float convertSpacing(StyleResolverState&, CSSValue*);
49 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol verState&, CSSValue*); 50 template <CSSValueID IdForNone> static AtomicString convertString(StyleResol verState&, CSSValue*);
50 }; 51 };
51 52
52 template <typename T> 53 template <typename T>
53 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value) 54 T StyleBuilderConverter::convertComputedLength(StyleResolverState& state, CSSVal ue* value)
54 { 55 {
55 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 56 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
56 float zoom = state.style()->effectiveZoom(); 57 float zoom = state.style()->effectiveZoom();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 { 90 {
90 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 91 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
91 if (primitiveValue->getValueID() == IdForNone) 92 if (primitiveValue->getValueID() == IdForNone)
92 return nullAtom; 93 return nullAtom;
93 return primitiveValue->getStringValue(); 94 return primitiveValue->getStringValue();
94 } 95 }
95 96
96 } // namespace WebCore 97 } // namespace WebCore
97 98
98 #endif 99 #endif
OLDNEW
« no previous file with comments | « Source/core/css/Pair.h ('k') | Source/core/css/resolver/StyleBuilderCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698