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

Side by Side Diff: Source/core/css/resolver/StyleBuilderConverter.cpp

Issue 1162793003: Add CSS image-orientation: from-image (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add converter Created 5 years, 5 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/resolver/StyleBuilderConverter.h ('k') | Source/core/frame/UseCounter.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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 double sy = sx; 971 double sy = sx;
972 double sz = 1; 972 double sz = 1;
973 if (list.length() >= 2) 973 if (list.length() >= 2)
974 sy = toCSSPrimitiveValue(list.item(1))->getDoubleValue(); 974 sy = toCSSPrimitiveValue(list.item(1))->getDoubleValue();
975 if (list.length() == 3) 975 if (list.length() == 3)
976 sz = toCSSPrimitiveValue(list.item(2))->getDoubleValue(); 976 sz = toCSSPrimitiveValue(list.item(2))->getDoubleValue();
977 977
978 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale 3D); 978 return ScaleTransformOperation::create(sx, sy, sz, TransformOperation::Scale 3D);
979 } 979 }
980 980
981 RespectImageOrientationEnum StyleBuilderConverter::convertImageOrientation(Style ResolverState& state, CSSValue* value)
982 {
983 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
984 return primitiveValue->getValueID() == CSSValueFromImage ? RespectImageOrien tation : DoNotRespectImageOrientation;
985 }
986
987
981 } // namespace blink 988 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.h ('k') | Source/core/frame/UseCounter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698