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

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

Issue 323053002: Unapply effectiveZoom during SVG layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add tests Created 6 years, 6 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
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 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 shadows.append(ShadowData(FloatPoint(x, y), blur, spread, shadowStyle, c olor)); 397 shadows.append(ShadowData(FloatPoint(x, y), blur, spread, shadowStyle, c olor));
398 } 398 }
399 return ShadowList::adopt(shadows); 399 return ShadowList::adopt(shadows);
400 } 400 }
401 401
402 float StyleBuilderConverter::convertSpacing(StyleResolverState& state, CSSValue* value) 402 float StyleBuilderConverter::convertSpacing(StyleResolverState& state, CSSValue* value)
403 { 403 {
404 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 404 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
405 if (primitiveValue->getValueID() == CSSValueNormal) 405 if (primitiveValue->getValueID() == CSSValueNormal)
406 return 0; 406 return 0;
407 if (state.useSVGZoomRules())
408 return primitiveValue->computeLength<float>(state.cssToLengthConversionD ata().copyWithAdjustedZoom(1));
409 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( )); 407 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( ));
410 } 408 }
411 409
412 PassRefPtr<SVGLengthList> StyleBuilderConverter::convertStrokeDasharray(StyleRes olverState&, CSSValue* value) 410 PassRefPtr<SVGLengthList> StyleBuilderConverter::convertStrokeDasharray(StyleRes olverState&, CSSValue* value)
413 { 411 {
414 if (!value->isValueList()) { 412 if (!value->isValueList()) {
415 return SVGRenderStyle::initialStrokeDashArray(); 413 return SVGRenderStyle::initialStrokeDashArray();
416 } 414 }
417 415
418 CSSValueList* dashes = toCSSValueList(value); 416 CSSValueList* dashes = toCSSValueList(value);
(...skipping 30 matching lines...) Expand all
449 { 447 {
450 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value); 448 CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
451 if (primitiveValue->getValueID()) { 449 if (primitiveValue->getValueID()) {
452 float multiplier = convertLineWidth<float>(state, value); 450 float multiplier = convertLineWidth<float>(state, value);
453 return CSSPrimitiveValue::create(multiplier / 48, CSSPrimitiveValue::CSS _EMS)->computeLength<float>(state.cssToLengthConversionData()); 451 return CSSPrimitiveValue::create(multiplier / 48, CSSPrimitiveValue::CSS _EMS)->computeLength<float>(state.cssToLengthConversionData());
454 } 452 }
455 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( )); 453 return primitiveValue->computeLength<float>(state.cssToLengthConversionData( ));
456 } 454 }
457 455
458 } // namespace WebCore 456 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/svg/custom/zoomed-word-spacing-expected.html ('k') | Source/core/css/resolver/StyleResolverState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698