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

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

Issue 956553004: Use Length for baselineShiftValue in SVGLayoutStyle (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop SVGLengthContext changes for now. 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 | Annotate | Revision Log
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 2514 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_BASELINE: 2528 case BS_BASELINE:
2529 return CSSPrimitiveValue::createIdentifier(CSSValueBaseline); 2529 return CSSPrimitiveValue::createIdentifier(CSSValueBaseline);
2530 case BS_SUPER: 2530 case BS_SUPER:
2531 return CSSPrimitiveValue::createIdentifier(CSSValueSuper); 2531 return CSSPrimitiveValue::createIdentifier(CSSValueSuper);
2532 case BS_SUB: 2532 case BS_SUB:
2533 return CSSPrimitiveValue::createIdentifier(CSSValueSub); 2533 return CSSPrimitiveValue::createIdentifier(CSSValueSub);
2534 case BS_LENGTH: 2534 case BS_LENGTH:
2535 return SVGLength::toCSSPrimitiveValue(svgStyle.baselineShiftValue()) ; 2535 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue() , style);
2536 } 2536 }
2537 ASSERT_NOT_REACHED(); 2537 ASSERT_NOT_REACHED();
2538 return nullptr; 2538 return nullptr;
2539 } 2539 }
2540 case CSSPropertyBufferedRendering: 2540 case CSSPropertyBufferedRendering:
2541 return CSSPrimitiveValue::create(svgStyle.bufferedRendering()); 2541 return CSSPrimitiveValue::create(svgStyle.bufferedRendering());
2542 case CSSPropertyGlyphOrientationHorizontal: 2542 case CSSPropertyGlyphOrientationHorizontal:
2543 return glyphOrientationToCSSPrimitiveValue(svgStyle.glyphOrientationHori zontal()); 2543 return glyphOrientationToCSSPrimitiveValue(svgStyle.glyphOrientationHori zontal());
2544 case CSSPropertyGlyphOrientationVertical: { 2544 case CSSPropertyGlyphOrientationVertical: {
2545 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> value = glyphOrientationToCSSP rimitiveValue(svgStyle.glyphOrientationVertical())) 2545 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> value = glyphOrientationToCSSP rimitiveValue(svgStyle.glyphOrientationVertical()))
(...skipping 18 matching lines...) Expand all
2564 return zoomAdjustedPixelValueForLength(svgStyle.y(), style); 2564 return zoomAdjustedPixelValueForLength(svgStyle.y(), style);
2565 2565
2566 case CSSPropertyAll: 2566 case CSSPropertyAll:
2567 return nullptr; 2567 return nullptr;
2568 } 2568 }
2569 ASSERT_NOT_REACHED(); 2569 ASSERT_NOT_REACHED();
2570 return nullptr; 2570 return nullptr;
2571 } 2571 }
2572 2572
2573 } 2573 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698