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

Side by Side Diff: Source/core/css/LayoutStyleCSSValueMapping.cpp

Issue 962763003: Use Length for the stroke-dashoffset property in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Make font-size explicit. Created 5 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/AnimatedStyleBuilder.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) 2004 Zack Rusin <zack@kde.org> 2 * Copyright (C) 2004 Zack Rusin <zack@kde.org>
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 4 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
6 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 6 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
7 * Copyright (C) 2015 Google Inc. All rights reserved. 7 * Copyright (C) 2015 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public 10 * modify it under the terms of the GNU Lesser General Public
(...skipping 2502 matching lines...) Expand 10 before | Expand all | Expand 10 after
2513 return CSSPrimitiveValue::createIdentifier(CSSValueNone); 2513 return CSSPrimitiveValue::createIdentifier(CSSValueNone);
2514 case CSSPropertyMarkerStart: 2514 case CSSPropertyMarkerStart:
2515 if (!svgStyle.markerStartResource().isEmpty()) 2515 if (!svgStyle.markerStartResource().isEmpty())
2516 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt yle.markerStartResource()), CSSPrimitiveValue::CSS_URI); 2516 return CSSPrimitiveValue::create(serializeAsFragmentIdentifier(svgSt yle.markerStartResource()), CSSPrimitiveValue::CSS_URI);
2517 return CSSPrimitiveValue::createIdentifier(CSSValueNone); 2517 return CSSPrimitiveValue::createIdentifier(CSSValueNone);
2518 case CSSPropertyStroke: 2518 case CSSPropertyStroke:
2519 return adjustSVGPaintForCurrentColor(svgStyle.strokePaintType(), svgStyl e.strokePaintUri(), svgStyle.strokePaintColor(), style.color()); 2519 return adjustSVGPaintForCurrentColor(svgStyle.strokePaintType(), svgStyl e.strokePaintUri(), svgStyle.strokePaintColor(), style.color());
2520 case CSSPropertyStrokeDasharray: 2520 case CSSPropertyStrokeDasharray:
2521 return strokeDashArrayToCSSValueList(svgStyle.strokeDashArray()); 2521 return strokeDashArrayToCSSValueList(svgStyle.strokeDashArray());
2522 case CSSPropertyStrokeDashoffset: 2522 case CSSPropertyStrokeDashoffset:
2523 return SVGLength::toCSSPrimitiveValue(svgStyle.strokeDashOffset()); 2523 return zoomAdjustedPixelValueForLength(svgStyle.strokeDashOffset(), styl e);
2524 case CSSPropertyStrokeWidth: 2524 case CSSPropertyStrokeWidth:
2525 return SVGLength::toCSSPrimitiveValue(svgStyle.strokeWidth()); 2525 return SVGLength::toCSSPrimitiveValue(svgStyle.strokeWidth());
2526 case CSSPropertyBaselineShift: { 2526 case CSSPropertyBaselineShift: {
2527 switch (svgStyle.baselineShift()) { 2527 switch (svgStyle.baselineShift()) {
2528 case BS_SUPER: 2528 case BS_SUPER:
2529 return CSSPrimitiveValue::createIdentifier(CSSValueSuper); 2529 return CSSPrimitiveValue::createIdentifier(CSSValueSuper);
2530 case BS_SUB: 2530 case BS_SUB:
2531 return CSSPrimitiveValue::createIdentifier(CSSValueSub); 2531 return CSSPrimitiveValue::createIdentifier(CSSValueSub);
2532 case BS_LENGTH: 2532 case BS_LENGTH:
2533 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue() , style); 2533 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue() , style);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2566 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style); 2566 return zoomAdjustedPixelValueForLength(svgStyle.ry(), style);
2567 2567
2568 case CSSPropertyAll: 2568 case CSSPropertyAll:
2569 return nullptr; 2569 return nullptr;
2570 } 2570 }
2571 ASSERT_NOT_REACHED(); 2571 ASSERT_NOT_REACHED();
2572 return nullptr; 2572 return nullptr;
2573 } 2573 }
2574 2574
2575 } 2575 }
OLDNEW
« no previous file with comments | « Source/core/css/CSSProperties.in ('k') | Source/core/css/resolver/AnimatedStyleBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698