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

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

Issue 896773002: [svg2] Make 'x' and 'y' presentation attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 10 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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 } 499 }
500 500
501 Length StyleBuilderConverter::convertLengthOrAuto(const StyleResolverState& stat e, CSSValue* value) 501 Length StyleBuilderConverter::convertLengthOrAuto(const StyleResolverState& stat e, CSSValue* value)
502 { 502 {
503 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 503 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
504 if (primitiveValue->getValueID() == CSSValueAuto) 504 if (primitiveValue->getValueID() == CSSValueAuto)
505 return Length(Auto); 505 return Length(Auto);
506 return primitiveValue->convertToLength(state.cssToLengthConversionData()); 506 return primitiveValue->convertToLength(state.cssToLengthConversionData());
507 } 507 }
508 508
509 Length StyleBuilderConverter::convertLengthUnzoomed(const StyleResolverState& st ate, CSSValue* value)
510 {
511 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
512 CSSToLengthConversionData conversionData = state.cssToLengthConversionData() .copyWithAdjustedZoom(1.0f);
513 return primitiveValue->convertToLength(conversionData);
514 }
515
509 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS Value* value) 516 Length StyleBuilderConverter::convertLengthSizing(StyleResolverState& state, CSS Value* value)
510 { 517 {
511 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 518 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
512 switch (primitiveValue->getValueID()) { 519 switch (primitiveValue->getValueID()) {
513 case CSSValueInvalid: 520 case CSSValueInvalid:
514 return convertLength(state, value); 521 return convertLength(state, value);
515 case CSSValueIntrinsic: 522 case CSSValueIntrinsic:
516 return Length(Intrinsic); 523 return Length(Intrinsic);
517 case CSSValueMinIntrinsic: 524 case CSSValueMinIntrinsic:
518 return Length(MinIntrinsic); 525 return Length(MinIntrinsic);
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2)); 860 CSSPrimitiveValue* primitiveValueZ = toCSSPrimitiveValue(list->item(2));
854 861
855 return TransformOrigin( 862 return TransformOrigin(
856 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX) , 863 convertOriginLength<CSSValueLeft, CSSValueRight>(state, primitiveValueX) ,
857 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY) , 864 convertOriginLength<CSSValueTop, CSSValueBottom>(state, primitiveValueY) ,
858 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu eZ) 865 StyleBuilderConverter::convertComputedLength<float>(state, primitiveValu eZ)
859 ); 866 );
860 } 867 }
861 868
862 } // namespace blink 869 } // 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