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

Side by Side Diff: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp

Issue 1419583002: Remove SVG glyph-orientation-horizontal and glyph-orientation-vertical (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove glyph-orientation-rounding-test Created 5 years, 2 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) 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 1131 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 verticalRadii->append(bottomRightRadius->item(1)); 1142 verticalRadii->append(bottomRightRadius->item(1));
1143 if (showVerticalBottomLeft) 1143 if (showVerticalBottomLeft)
1144 verticalRadii->append(bottomLeftRadius->item(1)); 1144 verticalRadii->append(bottomLeftRadius->item(1));
1145 1145
1146 if (!verticalRadii->equals(*toCSSValueList(list->item(0)))) 1146 if (!verticalRadii->equals(*toCSSValueList(list->item(0))))
1147 list->append(verticalRadii.release()); 1147 list->append(verticalRadii.release());
1148 1148
1149 return list.release(); 1149 return list.release();
1150 } 1150 }
1151 1151
1152 static PassRefPtrWillBeRawPtr<CSSPrimitiveValue> glyphOrientationToCSSPrimitiveV alue(EGlyphOrientation orientation)
1153 {
1154 switch (orientation) {
1155 case GO_0DEG:
1156 return CSSPrimitiveValue::create(0.0f, CSSPrimitiveValue::UnitType::Degr ees);
1157 case GO_90DEG:
1158 return CSSPrimitiveValue::create(90.0f, CSSPrimitiveValue::UnitType::Deg rees);
1159 case GO_180DEG:
1160 return CSSPrimitiveValue::create(180.0f, CSSPrimitiveValue::UnitType::De grees);
1161 case GO_270DEG:
1162 return CSSPrimitiveValue::create(270.0f, CSSPrimitiveValue::UnitType::De grees);
1163 default:
1164 return nullptr;
1165 }
1166 }
1167
1168 static PassRefPtrWillBeRawPtr<CSSValue> strokeDashArrayToCSSValueList(const SVGD ashArray& dashes, const ComputedStyle& style) 1152 static PassRefPtrWillBeRawPtr<CSSValue> strokeDashArrayToCSSValueList(const SVGD ashArray& dashes, const ComputedStyle& style)
1169 { 1153 {
1170 if (dashes.isEmpty()) 1154 if (dashes.isEmpty())
1171 return CSSPrimitiveValue::createIdentifier(CSSValueNone); 1155 return CSSPrimitiveValue::createIdentifier(CSSValueNone);
1172 1156
1173 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated() ; 1157 RefPtrWillBeRawPtr<CSSValueList> list = CSSValueList::createCommaSeparated() ;
1174 for (const Length& dashLength : dashes.vector()) 1158 for (const Length& dashLength : dashes.vector())
1175 list->append(zoomAdjustedPixelValueForLength(dashLength, style)); 1159 list->append(zoomAdjustedPixelValueForLength(dashLength, style));
1176 1160
1177 return list.release(); 1161 return list.release();
(...skipping 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
2611 case BS_SUB: 2595 case BS_SUB:
2612 return CSSPrimitiveValue::createIdentifier(CSSValueSub); 2596 return CSSPrimitiveValue::createIdentifier(CSSValueSub);
2613 case BS_LENGTH: 2597 case BS_LENGTH:
2614 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue() , style); 2598 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue() , style);
2615 } 2599 }
2616 ASSERT_NOT_REACHED(); 2600 ASSERT_NOT_REACHED();
2617 return nullptr; 2601 return nullptr;
2618 } 2602 }
2619 case CSSPropertyBufferedRendering: 2603 case CSSPropertyBufferedRendering:
2620 return CSSPrimitiveValue::create(svgStyle.bufferedRendering()); 2604 return CSSPrimitiveValue::create(svgStyle.bufferedRendering());
2621 case CSSPropertyGlyphOrientationHorizontal:
2622 return glyphOrientationToCSSPrimitiveValue(svgStyle.glyphOrientationHori zontal());
2623 case CSSPropertyGlyphOrientationVertical: {
2624 if (RefPtrWillBeRawPtr<CSSPrimitiveValue> value = glyphOrientationToCSSP rimitiveValue(svgStyle.glyphOrientationVertical()))
2625 return value.release();
2626 if (svgStyle.glyphOrientationVertical() == GO_AUTO)
2627 return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
2628 return nullptr;
2629 }
2630 case CSSPropertyPaintOrder: 2605 case CSSPropertyPaintOrder:
2631 return paintOrderToCSSValueList(svgStyle); 2606 return paintOrderToCSSValueList(svgStyle);
2632 case CSSPropertyVectorEffect: 2607 case CSSPropertyVectorEffect:
2633 return CSSPrimitiveValue::create(svgStyle.vectorEffect()); 2608 return CSSPrimitiveValue::create(svgStyle.vectorEffect());
2634 case CSSPropertyMaskType: 2609 case CSSPropertyMaskType:
2635 return CSSPrimitiveValue::create(svgStyle.maskType()); 2610 return CSSPrimitiveValue::create(svgStyle.maskType());
2636 case CSSPropertyMarker: 2611 case CSSPropertyMarker:
2637 // the above properties are not yet implemented in the engine 2612 // the above properties are not yet implemented in the engine
2638 return nullptr; 2613 return nullptr;
2639 case CSSPropertyCx: 2614 case CSSPropertyCx:
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
2713 case CSSPropertyAll: 2688 case CSSPropertyAll:
2714 return nullptr; 2689 return nullptr;
2715 default: 2690 default:
2716 break; 2691 break;
2717 } 2692 }
2718 ASSERT_NOT_REACHED(); 2693 ASSERT_NOT_REACHED();
2719 return nullptr; 2694 return nullptr;
2720 } 2695 }
2721 2696
2722 } 2697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698