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

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

Issue 2755493004: Replace ASSERT, ASSERT_NOT_REACHED, and RELEASE_ASSERT in core/css/ (Closed)
Patch Set: All windows error are Resolved now. Created 3 years, 8 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. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org> 5 * Copyright (C) 2007 Alexey Proskuryakov <ap@webkit.org>
6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> 6 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com>
7 * Copyright (C) 2011 Sencha, Inc. All rights reserved. 7 * Copyright (C) 2011 Sencha, Inc. All rights reserved.
8 * Copyright (C) 2015 Google Inc. All rights reserved. 8 * Copyright (C) 2015 Google Inc. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 CSSValueList* positionList = CSSValueList::createSpaceSeparated(); 114 CSSValueList* positionList = CSSValueList::createSpaceSeparated();
115 if (layer.isBackgroundXOriginSet()) { 115 if (layer.isBackgroundXOriginSet()) {
116 DCHECK(propertyID == CSSPropertyBackgroundPosition || 116 DCHECK(propertyID == CSSPropertyBackgroundPosition ||
117 propertyID == CSSPropertyWebkitMaskPosition); 117 propertyID == CSSPropertyWebkitMaskPosition);
118 positionList->append( 118 positionList->append(
119 *CSSIdentifierValue::create(layer.backgroundXOrigin())); 119 *CSSIdentifierValue::create(layer.backgroundXOrigin()));
120 } 120 }
121 positionList->append( 121 positionList->append(
122 *zoomAdjustedPixelValueForLength(layer.xPosition(), style)); 122 *zoomAdjustedPixelValueForLength(layer.xPosition(), style));
123 if (layer.isBackgroundYOriginSet()) { 123 if (layer.isBackgroundYOriginSet()) {
124 ASSERT(propertyID == CSSPropertyBackgroundPosition || 124 DCHECK(propertyID == CSSPropertyBackgroundPosition ||
125 propertyID == CSSPropertyWebkitMaskPosition); 125 propertyID == CSSPropertyWebkitMaskPosition);
126 positionList->append( 126 positionList->append(
127 *CSSIdentifierValue::create(layer.backgroundYOrigin())); 127 *CSSIdentifierValue::create(layer.backgroundYOrigin()));
128 } 128 }
129 positionList->append( 129 positionList->append(
130 *zoomAdjustedPixelValueForLength(layer.yPosition(), style)); 130 *zoomAdjustedPixelValueForLength(layer.yPosition(), style));
131 return positionList; 131 return positionList;
132 } 132 }
133 133
134 CSSValue* ComputedStyleCSSValueMapping::currentColorOrValidColor( 134 CSSValue* ComputedStyleCSSValueMapping::currentColorOrValidColor(
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 result->append( 512 result->append(
513 *CSSValuePair::create(CSSIdentifierValue::create(CSSValueLast), 513 *CSSValuePair::create(CSSIdentifierValue::create(CSSValueLast),
514 CSSIdentifierValue::create(CSSValueBaseline), 514 CSSIdentifierValue::create(CSSValueBaseline),
515 CSSValuePair::DropIdenticalValues)); 515 CSSValuePair::DropIdenticalValues));
516 } else { 516 } else {
517 result->append(*CSSIdentifierValue::create(data.position())); 517 result->append(*CSSIdentifierValue::create(data.position()));
518 } 518 }
519 if (data.position() >= ItemPositionCenter && 519 if (data.position() >= ItemPositionCenter &&
520 data.overflow() != OverflowAlignmentDefault) 520 data.overflow() != OverflowAlignmentDefault)
521 result->append(*CSSIdentifierValue::create(data.overflow())); 521 result->append(*CSSIdentifierValue::create(data.overflow()));
522 ASSERT(result->length() <= 2); 522 DCHECK_LE(result->length(), 2u);
523 return result; 523 return result;
524 } 524 }
525 525
526 static CSSValueList* valuesForGridShorthand( 526 static CSSValueList* valuesForGridShorthand(
527 const StylePropertyShorthand& shorthand, 527 const StylePropertyShorthand& shorthand,
528 const ComputedStyle& style, 528 const ComputedStyle& style,
529 const LayoutObject* layoutObject, 529 const LayoutObject* layoutObject,
530 Node* styledNode, 530 Node* styledNode,
531 bool allowVisitedStyle) { 531 bool allowVisitedStyle) {
532 CSSValueList* list = CSSValueList::createSlashSeparated(); 532 CSSValueList* list = CSSValueList::createSlashSeparated();
533 for (size_t i = 0; i < shorthand.length(); ++i) { 533 for (size_t i = 0; i < shorthand.length(); ++i) {
534 const CSSValue* value = ComputedStyleCSSValueMapping::get( 534 const CSSValue* value = ComputedStyleCSSValueMapping::get(
535 shorthand.properties()[i], style, layoutObject, styledNode, 535 shorthand.properties()[i], style, layoutObject, styledNode,
536 allowVisitedStyle); 536 allowVisitedStyle);
537 ASSERT(value); 537 DCHECK(value);
538 list->append(*value); 538 list->append(*value);
539 } 539 }
540 return list; 540 return list;
541 } 541 }
542 542
543 static CSSValueList* valuesForShorthandProperty( 543 static CSSValueList* valuesForShorthandProperty(
544 const StylePropertyShorthand& shorthand, 544 const StylePropertyShorthand& shorthand,
545 const ComputedStyle& style, 545 const ComputedStyle& style,
546 const LayoutObject* layoutObject, 546 const LayoutObject* layoutObject,
547 Node* styledNode, 547 Node* styledNode,
548 bool allowVisitedStyle) { 548 bool allowVisitedStyle) {
549 CSSValueList* list = CSSValueList::createSpaceSeparated(); 549 CSSValueList* list = CSSValueList::createSpaceSeparated();
550 for (size_t i = 0; i < shorthand.length(); ++i) { 550 for (size_t i = 0; i < shorthand.length(); ++i) {
551 const CSSValue* value = ComputedStyleCSSValueMapping::get( 551 const CSSValue* value = ComputedStyleCSSValueMapping::get(
552 shorthand.properties()[i], style, layoutObject, styledNode, 552 shorthand.properties()[i], style, layoutObject, styledNode,
553 allowVisitedStyle); 553 allowVisitedStyle);
554 ASSERT(value); 554 DCHECK(value);
555 list->append(*value); 555 list->append(*value);
556 } 556 }
557 return list; 557 return list;
558 } 558 }
559 559
560 static CSSValue* expandNoneLigaturesValue() { 560 static CSSValue* expandNoneLigaturesValue() {
561 CSSValueList* list = CSSValueList::createSpaceSeparated(); 561 CSSValueList* list = CSSValueList::createSpaceSeparated();
562 list->append(*CSSIdentifierValue::create(CSSValueNoCommonLigatures)); 562 list->append(*CSSIdentifierValue::create(CSSValueNoCommonLigatures));
563 list->append(*CSSIdentifierValue::create(CSSValueNoDiscretionaryLigatures)); 563 list->append(*CSSIdentifierValue::create(CSSValueNoDiscretionaryLigatures));
564 list->append(*CSSIdentifierValue::create(CSSValueNoHistoricalLigatures)); 564 list->append(*CSSIdentifierValue::create(CSSValueNoHistoricalLigatures));
(...skipping 28 matching lines...) Expand all
593 case AllNormal: 593 case AllNormal:
594 return CSSIdentifierValue::create(CSSValueNormal); 594 return CSSIdentifierValue::create(CSSValueNormal);
595 case NoneLigatures: 595 case NoneLigatures:
596 return CSSIdentifierValue::create(CSSValueNone); 596 return CSSIdentifierValue::create(CSSValueNone);
597 case ConcatenateNonNormal: { 597 case ConcatenateNonNormal: {
598 CSSValueList* list = CSSValueList::createSpaceSeparated(); 598 CSSValueList* list = CSSValueList::createSpaceSeparated();
599 for (size_t i = 0; i < fontVariantShorthand().length(); ++i) { 599 for (size_t i = 0; i < fontVariantShorthand().length(); ++i) {
600 const CSSValue* value = ComputedStyleCSSValueMapping::get( 600 const CSSValue* value = ComputedStyleCSSValueMapping::get(
601 fontVariantShorthand().properties()[i], style, layoutObject, 601 fontVariantShorthand().properties()[i], style, layoutObject,
602 styledNode, allowVisitedStyle); 602 styledNode, allowVisitedStyle);
603 ASSERT(value); 603 DCHECK(value);
604 if (value->isIdentifierValue() && 604 if (value->isIdentifierValue() &&
605 toCSSIdentifierValue(value)->getValueID() == CSSValueNone) { 605 toCSSIdentifierValue(value)->getValueID() == CSSValueNone) {
606 list->append(*expandNoneLigaturesValue()); 606 list->append(*expandNoneLigaturesValue());
607 } else if (!(value->isIdentifierValue() && 607 } else if (!(value->isIdentifierValue() &&
608 toCSSIdentifierValue(value)->getValueID() == 608 toCSSIdentifierValue(value)->getValueID() ==
609 CSSValueNormal)) { 609 CSSValueNormal)) {
610 list->append(*value); 610 list->append(*value);
611 } 611 }
612 } 612 }
613 return list; 613 return list;
(...skipping 11 matching lines...) Expand all
625 bool allowVisitedStyle) { 625 bool allowVisitedStyle) {
626 CSSValueList* ret = CSSValueList::createCommaSeparated(); 626 CSSValueList* ret = CSSValueList::createCommaSeparated();
627 const FillLayer* currLayer = &style.backgroundLayers(); 627 const FillLayer* currLayer = &style.backgroundLayers();
628 for (; currLayer; currLayer = currLayer->next()) { 628 for (; currLayer; currLayer = currLayer->next()) {
629 CSSValueList* list = CSSValueList::createSlashSeparated(); 629 CSSValueList* list = CSSValueList::createSlashSeparated();
630 CSSValueList* beforeSlash = CSSValueList::createSpaceSeparated(); 630 CSSValueList* beforeSlash = CSSValueList::createSpaceSeparated();
631 if (!currLayer->next()) { // color only for final layer 631 if (!currLayer->next()) { // color only for final layer
632 const CSSValue* value = ComputedStyleCSSValueMapping::get( 632 const CSSValue* value = ComputedStyleCSSValueMapping::get(
633 CSSPropertyBackgroundColor, style, layoutObject, styledNode, 633 CSSPropertyBackgroundColor, style, layoutObject, styledNode,
634 allowVisitedStyle); 634 allowVisitedStyle);
635 ASSERT(value); 635 DCHECK(value);
636 beforeSlash->append(*value); 636 beforeSlash->append(*value);
637 } 637 }
638 beforeSlash->append(currLayer->image() 638 beforeSlash->append(currLayer->image()
639 ? *currLayer->image()->computedCSSValue() 639 ? *currLayer->image()->computedCSSValue()
640 : *CSSIdentifierValue::create(CSSValueNone)); 640 : *CSSIdentifierValue::create(CSSValueNone));
641 beforeSlash->append( 641 beforeSlash->append(
642 *valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY())); 642 *valueForFillRepeat(currLayer->repeatX(), currLayer->repeatY()));
643 beforeSlash->append(*CSSIdentifierValue::create(currLayer->attachment())); 643 beforeSlash->append(*CSSIdentifierValue::create(currLayer->attachment()));
644 beforeSlash->append(*createPositionListForLayer( 644 beforeSlash->append(*createPositionListForLayer(
645 CSSPropertyBackgroundPosition, *currLayer, style)); 645 CSSPropertyBackgroundPosition, *currLayer, style));
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 break; 682 break;
683 default: 683 default:
684 result->append(*CSSIdentifierValue::create(data.position())); 684 result->append(*CSSIdentifierValue::create(data.position()));
685 } 685 }
686 686
687 // Handle overflow-alignment (only allowed for content-position values) 687 // Handle overflow-alignment (only allowed for content-position values)
688 if ((data.position() >= ContentPositionCenter || 688 if ((data.position() >= ContentPositionCenter ||
689 data.distribution() != ContentDistributionDefault) && 689 data.distribution() != ContentDistributionDefault) &&
690 data.overflow() != OverflowAlignmentDefault) 690 data.overflow() != OverflowAlignmentDefault)
691 result->append(*CSSIdentifierValue::create(data.overflow())); 691 result->append(*CSSIdentifierValue::create(data.overflow()));
692 ASSERT(result->length() > 0); 692 DCHECK_GT(result->length(), 0u);
693 ASSERT(result->length() <= 3); 693 DCHECK_LE(result->length(), 3u);
694 return result; 694 return result;
695 } 695 }
696 696
697 static CSSValue* valueForLineHeight(const ComputedStyle& style) { 697 static CSSValue* valueForLineHeight(const ComputedStyle& style) {
698 Length length = style.lineHeight(); 698 Length length = style.lineHeight();
699 if (length.isNegative()) 699 if (length.isNegative())
700 return CSSIdentifierValue::create(CSSValueNormal); 700 return CSSIdentifierValue::create(CSSValueNormal);
701 701
702 return zoomAdjustedPixelValue( 702 return zoomAdjustedPixelValue(
703 floatValueForLength(length, style.getFontDescription().computedSize()), 703 floatValueForLength(length, style.getFontDescription().computedSize()),
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
901 return minMaxTrackBreadths; 901 return minMaxTrackBreadths;
902 } 902 }
903 case FitContentTrackSizing: { 903 case FitContentTrackSizing: {
904 auto* fitContentTrackBreadth = 904 auto* fitContentTrackBreadth =
905 CSSFunctionValue::create(CSSValueFitContent); 905 CSSFunctionValue::create(CSSValueFitContent);
906 fitContentTrackBreadth->append(*specifiedValueForGridTrackBreadth( 906 fitContentTrackBreadth->append(*specifiedValueForGridTrackBreadth(
907 trackSize.fitContentTrackBreadth(), style)); 907 trackSize.fitContentTrackBreadth(), style));
908 return fitContentTrackBreadth; 908 return fitContentTrackBreadth;
909 } 909 }
910 } 910 }
911 ASSERT_NOT_REACHED(); 911 NOTREACHED();
912 return nullptr; 912 return nullptr;
913 } 913 }
914 914
915 class OrderedNamedLinesCollector { 915 class OrderedNamedLinesCollector {
916 STACK_ALLOCATED(); 916 STACK_ALLOCATED();
917 WTF_MAKE_NONCOPYABLE(OrderedNamedLinesCollector); 917 WTF_MAKE_NONCOPYABLE(OrderedNamedLinesCollector);
918 918
919 public: 919 public:
920 OrderedNamedLinesCollector(const ComputedStyle& style, 920 OrderedNamedLinesCollector(const ComputedStyle& style,
921 bool isRowAxis, 921 bool isRowAxis,
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 case TextDecorationStyleDouble: 1138 case TextDecorationStyleDouble:
1139 return CSSIdentifierValue::create(CSSValueDouble); 1139 return CSSIdentifierValue::create(CSSValueDouble);
1140 case TextDecorationStyleDotted: 1140 case TextDecorationStyleDotted:
1141 return CSSIdentifierValue::create(CSSValueDotted); 1141 return CSSIdentifierValue::create(CSSValueDotted);
1142 case TextDecorationStyleDashed: 1142 case TextDecorationStyleDashed:
1143 return CSSIdentifierValue::create(CSSValueDashed); 1143 return CSSIdentifierValue::create(CSSValueDashed);
1144 case TextDecorationStyleWavy: 1144 case TextDecorationStyleWavy:
1145 return CSSIdentifierValue::create(CSSValueWavy); 1145 return CSSIdentifierValue::create(CSSValueWavy);
1146 } 1146 }
1147 1147
1148 ASSERT_NOT_REACHED(); 1148 NOTREACHED();
1149 return CSSInitialValue::create(); 1149 return CSSInitialValue::create();
1150 } 1150 }
1151 1151
1152 static CSSValue* valueForTextDecorationSkip( 1152 static CSSValue* valueForTextDecorationSkip(
1153 TextDecorationSkip textDecorationSkip) { 1153 TextDecorationSkip textDecorationSkip) {
1154 CSSValueList* list = CSSValueList::createSpaceSeparated(); 1154 CSSValueList* list = CSSValueList::createSpaceSeparated();
1155 if (textDecorationSkip & TextDecorationSkipObjects) 1155 if (textDecorationSkip & TextDecorationSkipObjects)
1156 list->append(*CSSIdentifierValue::create(CSSValueObjects)); 1156 list->append(*CSSIdentifierValue::create(CSSValueObjects));
1157 if (textDecorationSkip & TextDecorationSkipInk) 1157 if (textDecorationSkip & TextDecorationSkipInk)
1158 list->append(*CSSIdentifierValue::create(CSSValueInk)); 1158 list->append(*CSSIdentifierValue::create(CSSValueInk));
(...skipping 21 matching lines...) Expand all
1180 list->append(*CSSIdentifierValue::create(CSSValuePanY)); 1180 list->append(*CSSIdentifierValue::create(CSSValuePanY));
1181 else if (touchAction & TouchActionPanUp) 1181 else if (touchAction & TouchActionPanUp)
1182 list->append(*CSSIdentifierValue::create(CSSValuePanUp)); 1182 list->append(*CSSIdentifierValue::create(CSSValuePanUp));
1183 else if (touchAction & TouchActionPanDown) 1183 else if (touchAction & TouchActionPanDown)
1184 list->append(*CSSIdentifierValue::create(CSSValuePanDown)); 1184 list->append(*CSSIdentifierValue::create(CSSValuePanDown));
1185 1185
1186 if ((touchAction & TouchActionPinchZoom) == TouchActionPinchZoom) 1186 if ((touchAction & TouchActionPinchZoom) == TouchActionPinchZoom)
1187 list->append(*CSSIdentifierValue::create(CSSValuePinchZoom)); 1187 list->append(*CSSIdentifierValue::create(CSSValuePinchZoom));
1188 } 1188 }
1189 1189
1190 ASSERT(list->length()); 1190 DCHECK(list->length());
1191 return list; 1191 return list;
1192 } 1192 }
1193 1193
1194 static CSSValue* valueForWillChange( 1194 static CSSValue* valueForWillChange(
1195 const Vector<CSSPropertyID>& willChangeProperties, 1195 const Vector<CSSPropertyID>& willChangeProperties,
1196 bool willChangeContents, 1196 bool willChangeContents,
1197 bool willChangeScrollPosition) { 1197 bool willChangeScrollPosition) {
1198 CSSValueList* list = CSSValueList::createCommaSeparated(); 1198 CSSValueList* list = CSSValueList::createCommaSeparated();
1199 if (willChangeContents) 1199 if (willChangeContents)
1200 list->append(*CSSIdentifierValue::create(CSSValueContents)); 1200 list->append(*CSSIdentifierValue::create(CSSValueContents));
(...skipping 24 matching lines...) Expand all
1225 switch (direction) { 1225 switch (direction) {
1226 case Timing::PlaybackDirection::NORMAL: 1226 case Timing::PlaybackDirection::NORMAL:
1227 return CSSIdentifierValue::create(CSSValueNormal); 1227 return CSSIdentifierValue::create(CSSValueNormal);
1228 case Timing::PlaybackDirection::ALTERNATE_NORMAL: 1228 case Timing::PlaybackDirection::ALTERNATE_NORMAL:
1229 return CSSIdentifierValue::create(CSSValueAlternate); 1229 return CSSIdentifierValue::create(CSSValueAlternate);
1230 case Timing::PlaybackDirection::REVERSE: 1230 case Timing::PlaybackDirection::REVERSE:
1231 return CSSIdentifierValue::create(CSSValueReverse); 1231 return CSSIdentifierValue::create(CSSValueReverse);
1232 case Timing::PlaybackDirection::ALTERNATE_REVERSE: 1232 case Timing::PlaybackDirection::ALTERNATE_REVERSE:
1233 return CSSIdentifierValue::create(CSSValueAlternateReverse); 1233 return CSSIdentifierValue::create(CSSValueAlternateReverse);
1234 default: 1234 default:
1235 ASSERT_NOT_REACHED(); 1235 NOTREACHED();
1236 return nullptr; 1236 return nullptr;
1237 } 1237 }
1238 } 1238 }
1239 1239
1240 static CSSValue* valueForAnimationDuration(const CSSTimingData* timingData) { 1240 static CSSValue* valueForAnimationDuration(const CSSTimingData* timingData) {
1241 CSSValueList* list = CSSValueList::createCommaSeparated(); 1241 CSSValueList* list = CSSValueList::createCommaSeparated();
1242 if (timingData) { 1242 if (timingData) {
1243 for (size_t i = 0; i < timingData->durationList().size(); ++i) 1243 for (size_t i = 0; i < timingData->durationList().size(); ++i)
1244 list->append(*CSSPrimitiveValue::create( 1244 list->append(*CSSPrimitiveValue::create(
1245 timingData->durationList()[i], CSSPrimitiveValue::UnitType::Seconds)); 1245 timingData->durationList()[i], CSSPrimitiveValue::UnitType::Seconds));
1246 } else { 1246 } else {
1247 list->append( 1247 list->append(
1248 *CSSPrimitiveValue::create(CSSTimingData::initialDuration(), 1248 *CSSPrimitiveValue::create(CSSTimingData::initialDuration(),
1249 CSSPrimitiveValue::UnitType::Seconds)); 1249 CSSPrimitiveValue::UnitType::Seconds));
1250 } 1250 }
1251 return list; 1251 return list;
1252 } 1252 }
1253 1253
1254 static CSSValue* valueForAnimationFillMode(Timing::FillMode fillMode) { 1254 static CSSValue* valueForAnimationFillMode(Timing::FillMode fillMode) {
1255 switch (fillMode) { 1255 switch (fillMode) {
1256 case Timing::FillMode::NONE: 1256 case Timing::FillMode::NONE:
1257 return CSSIdentifierValue::create(CSSValueNone); 1257 return CSSIdentifierValue::create(CSSValueNone);
1258 case Timing::FillMode::FORWARDS: 1258 case Timing::FillMode::FORWARDS:
1259 return CSSIdentifierValue::create(CSSValueForwards); 1259 return CSSIdentifierValue::create(CSSValueForwards);
1260 case Timing::FillMode::BACKWARDS: 1260 case Timing::FillMode::BACKWARDS:
1261 return CSSIdentifierValue::create(CSSValueBackwards); 1261 return CSSIdentifierValue::create(CSSValueBackwards);
1262 case Timing::FillMode::BOTH: 1262 case Timing::FillMode::BOTH:
1263 return CSSIdentifierValue::create(CSSValueBoth); 1263 return CSSIdentifierValue::create(CSSValueBoth);
1264 default: 1264 default:
1265 ASSERT_NOT_REACHED(); 1265 NOTREACHED();
1266 return nullptr; 1266 return nullptr;
1267 } 1267 }
1268 } 1268 }
1269 1269
1270 static CSSValue* valueForAnimationIterationCount(double iterationCount) { 1270 static CSSValue* valueForAnimationIterationCount(double iterationCount) {
1271 if (iterationCount == std::numeric_limits<double>::infinity()) 1271 if (iterationCount == std::numeric_limits<double>::infinity())
1272 return CSSIdentifierValue::create(CSSValueInfinite); 1272 return CSSIdentifierValue::create(CSSValueInfinite);
1273 return CSSPrimitiveValue::create(iterationCount, 1273 return CSSPrimitiveValue::create(iterationCount,
1274 CSSPrimitiveValue::UnitType::Number); 1274 CSSPrimitiveValue::UnitType::Number);
1275 } 1275 }
1276 1276
1277 static CSSValue* valueForAnimationPlayState(EAnimPlayState playState) { 1277 static CSSValue* valueForAnimationPlayState(EAnimPlayState playState) {
1278 if (playState == AnimPlayStatePlaying) 1278 if (playState == AnimPlayStatePlaying)
1279 return CSSIdentifierValue::create(CSSValueRunning); 1279 return CSSIdentifierValue::create(CSSValueRunning);
1280 ASSERT(playState == AnimPlayStatePaused); 1280 DCHECK_EQ(playState, AnimPlayStatePaused);
1281 return CSSIdentifierValue::create(CSSValuePaused); 1281 return CSSIdentifierValue::create(CSSValuePaused);
1282 } 1282 }
1283 1283
1284 static CSSValue* createTimingFunctionValue( 1284 static CSSValue* createTimingFunctionValue(
1285 const TimingFunction* timingFunction) { 1285 const TimingFunction* timingFunction) {
1286 switch (timingFunction->getType()) { 1286 switch (timingFunction->getType()) {
1287 case TimingFunction::Type::CUBIC_BEZIER: { 1287 case TimingFunction::Type::CUBIC_BEZIER: {
1288 const CubicBezierTimingFunction* bezierTimingFunction = 1288 const CubicBezierTimingFunction* bezierTimingFunction =
1289 toCubicBezierTimingFunction(timingFunction); 1289 toCubicBezierTimingFunction(timingFunction);
1290 if (bezierTimingFunction->getEaseType() != 1290 if (bezierTimingFunction->getEaseType() !=
1291 CubicBezierTimingFunction::EaseType::CUSTOM) { 1291 CubicBezierTimingFunction::EaseType::CUSTOM) {
1292 CSSValueID valueId = CSSValueInvalid; 1292 CSSValueID valueId = CSSValueInvalid;
1293 switch (bezierTimingFunction->getEaseType()) { 1293 switch (bezierTimingFunction->getEaseType()) {
1294 case CubicBezierTimingFunction::EaseType::EASE: 1294 case CubicBezierTimingFunction::EaseType::EASE:
1295 valueId = CSSValueEase; 1295 valueId = CSSValueEase;
1296 break; 1296 break;
1297 case CubicBezierTimingFunction::EaseType::EASE_IN: 1297 case CubicBezierTimingFunction::EaseType::EASE_IN:
1298 valueId = CSSValueEaseIn; 1298 valueId = CSSValueEaseIn;
1299 break; 1299 break;
1300 case CubicBezierTimingFunction::EaseType::EASE_OUT: 1300 case CubicBezierTimingFunction::EaseType::EASE_OUT:
1301 valueId = CSSValueEaseOut; 1301 valueId = CSSValueEaseOut;
1302 break; 1302 break;
1303 case CubicBezierTimingFunction::EaseType::EASE_IN_OUT: 1303 case CubicBezierTimingFunction::EaseType::EASE_IN_OUT:
1304 valueId = CSSValueEaseInOut; 1304 valueId = CSSValueEaseInOut;
1305 break; 1305 break;
1306 default: 1306 default:
1307 ASSERT_NOT_REACHED(); 1307 NOTREACHED();
1308 return nullptr; 1308 return nullptr;
1309 } 1309 }
1310 return CSSIdentifierValue::create(valueId); 1310 return CSSIdentifierValue::create(valueId);
1311 } 1311 }
1312 return CSSCubicBezierTimingFunctionValue::create( 1312 return CSSCubicBezierTimingFunctionValue::create(
1313 bezierTimingFunction->x1(), bezierTimingFunction->y1(), 1313 bezierTimingFunction->x1(), bezierTimingFunction->y1(),
1314 bezierTimingFunction->x2(), bezierTimingFunction->y2()); 1314 bezierTimingFunction->x2(), bezierTimingFunction->y2());
1315 } 1315 }
1316 1316
1317 case TimingFunction::Type::STEPS: { 1317 case TimingFunction::Type::STEPS: {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1458 1458
1459 return list; 1459 return list;
1460 } 1460 }
1461 1461
1462 static CSSValue* createTransitionPropertyValue( 1462 static CSSValue* createTransitionPropertyValue(
1463 const CSSTransitionData::TransitionProperty& property) { 1463 const CSSTransitionData::TransitionProperty& property) {
1464 if (property.propertyType == CSSTransitionData::TransitionNone) 1464 if (property.propertyType == CSSTransitionData::TransitionNone)
1465 return CSSIdentifierValue::create(CSSValueNone); 1465 return CSSIdentifierValue::create(CSSValueNone);
1466 if (property.propertyType == CSSTransitionData::TransitionUnknownProperty) 1466 if (property.propertyType == CSSTransitionData::TransitionUnknownProperty)
1467 return CSSCustomIdentValue::create(property.propertyString); 1467 return CSSCustomIdentValue::create(property.propertyString);
1468 ASSERT(property.propertyType == CSSTransitionData::TransitionKnownProperty); 1468 DCHECK_EQ(property.propertyType, CSSTransitionData::TransitionKnownProperty);
1469 return CSSCustomIdentValue::create( 1469 return CSSCustomIdentValue::create(
1470 getPropertyNameAtomicString(property.unresolvedProperty)); 1470 getPropertyNameAtomicString(property.unresolvedProperty));
1471 } 1471 }
1472 1472
1473 static CSSValue* valueForTransitionProperty( 1473 static CSSValue* valueForTransitionProperty(
1474 const CSSTransitionData* transitionData) { 1474 const CSSTransitionData* transitionData) {
1475 CSSValueList* list = CSSValueList::createCommaSeparated(); 1475 CSSValueList* list = CSSValueList::createCommaSeparated();
1476 if (transitionData) { 1476 if (transitionData) {
1477 for (size_t i = 0; i < transitionData->propertyList().size(); ++i) 1477 for (size_t i = 0; i < transitionData->propertyList().size(); ++i)
1478 list->append( 1478 list->append(
1479 *createTransitionPropertyValue(transitionData->propertyList()[i])); 1479 *createTransitionPropertyValue(transitionData->propertyList()[i]));
1480 } else { 1480 } else {
1481 list->append(*CSSIdentifierValue::create(CSSValueAll)); 1481 list->append(*CSSIdentifierValue::create(CSSValueAll));
1482 } 1482 }
1483 return list; 1483 return list;
1484 } 1484 }
1485 1485
1486 CSSValueID valueForQuoteType(const QuoteType quoteType) { 1486 CSSValueID valueForQuoteType(const QuoteType quoteType) {
1487 switch (quoteType) { 1487 switch (quoteType) {
1488 case NO_OPEN_QUOTE: 1488 case NO_OPEN_QUOTE:
1489 return CSSValueNoOpenQuote; 1489 return CSSValueNoOpenQuote;
1490 case NO_CLOSE_QUOTE: 1490 case NO_CLOSE_QUOTE:
1491 return CSSValueNoCloseQuote; 1491 return CSSValueNoCloseQuote;
1492 case CLOSE_QUOTE: 1492 case CLOSE_QUOTE:
1493 return CSSValueCloseQuote; 1493 return CSSValueCloseQuote;
1494 case OPEN_QUOTE: 1494 case OPEN_QUOTE:
1495 return CSSValueOpenQuote; 1495 return CSSValueOpenQuote;
1496 } 1496 }
1497 ASSERT_NOT_REACHED(); 1497 NOTREACHED();
1498 return CSSValueInvalid; 1498 return CSSValueInvalid;
1499 } 1499 }
1500 1500
1501 static CSSValue* valueForContentData(const ComputedStyle& style) { 1501 static CSSValue* valueForContentData(const ComputedStyle& style) {
1502 CSSValueList* list = CSSValueList::createSpaceSeparated(); 1502 CSSValueList* list = CSSValueList::createSpaceSeparated();
1503 for (const ContentData* contentData = style.contentData(); contentData; 1503 for (const ContentData* contentData = style.contentData(); contentData;
1504 contentData = contentData->next()) { 1504 contentData = contentData->next()) {
1505 if (contentData->isCounter()) { 1505 if (contentData->isCounter()) {
1506 const CounterContent* counter = 1506 const CounterContent* counter =
1507 toCounterContentData(contentData)->counter(); 1507 toCounterContentData(contentData)->counter();
1508 ASSERT(counter); 1508 DCHECK(counter);
1509 CSSCustomIdentValue* identifier = 1509 CSSCustomIdentValue* identifier =
1510 CSSCustomIdentValue::create(counter->identifier()); 1510 CSSCustomIdentValue::create(counter->identifier());
1511 CSSStringValue* separator = CSSStringValue::create(counter->separator()); 1511 CSSStringValue* separator = CSSStringValue::create(counter->separator());
1512 CSSValueID listStyleIdent = CSSValueNone; 1512 CSSValueID listStyleIdent = CSSValueNone;
1513 if (counter->listStyle() != EListStyleType::kNone) { 1513 if (counter->listStyle() != EListStyleType::kNone) {
1514 // TODO(sashab): Change this to use a converter instead of 1514 // TODO(sashab): Change this to use a converter instead of
1515 // CSSPrimitiveValueMappings. 1515 // CSSPrimitiveValueMappings.
1516 listStyleIdent = 1516 listStyleIdent =
1517 CSSIdentifierValue::create(counter->listStyle())->getValueID(); 1517 CSSIdentifierValue::create(counter->listStyle())->getValueID();
1518 } 1518 }
1519 CSSIdentifierValue* listStyle = 1519 CSSIdentifierValue* listStyle =
1520 CSSIdentifierValue::create(listStyleIdent); 1520 CSSIdentifierValue::create(listStyleIdent);
1521 list->append(*CSSCounterValue::create(identifier, listStyle, separator)); 1521 list->append(*CSSCounterValue::create(identifier, listStyle, separator));
1522 } else if (contentData->isImage()) { 1522 } else if (contentData->isImage()) {
1523 const StyleImage* image = toImageContentData(contentData)->image(); 1523 const StyleImage* image = toImageContentData(contentData)->image();
1524 ASSERT(image); 1524 DCHECK(image);
1525 list->append(*image->computedCSSValue()); 1525 list->append(*image->computedCSSValue());
1526 } else if (contentData->isText()) { 1526 } else if (contentData->isText()) {
1527 list->append( 1527 list->append(
1528 *CSSStringValue::create(toTextContentData(contentData)->text())); 1528 *CSSStringValue::create(toTextContentData(contentData)->text()));
1529 } else if (contentData->isQuote()) { 1529 } else if (contentData->isQuote()) {
1530 const QuoteType quoteType = toQuoteContentData(contentData)->quote(); 1530 const QuoteType quoteType = toQuoteContentData(contentData)->quote();
1531 list->append(*CSSIdentifierValue::create(valueForQuoteType(quoteType))); 1531 list->append(*CSSIdentifierValue::create(valueForQuoteType(quoteType)));
1532 } else { 1532 } else {
1533 ASSERT_NOT_REACHED(); 1533 NOTREACHED();
1534 } 1534 }
1535 } 1535 }
1536 return list; 1536 return list;
1537 } 1537 }
1538 1538
1539 static CSSValue* valueForCounterDirectives(const ComputedStyle& style, 1539 static CSSValue* valueForCounterDirectives(const ComputedStyle& style,
1540 CSSPropertyID propertyID) { 1540 CSSPropertyID propertyID) {
1541 const CounterDirectiveMap* map = style.counterDirectives(); 1541 const CounterDirectiveMap* map = style.counterDirectives();
1542 if (!map) 1542 if (!map)
1543 return CSSIdentifierValue::create(CSSValueNone); 1543 return CSSIdentifierValue::create(CSSValueNone);
(...skipping 25 matching lines...) Expand all
1569 if (!shapeValue) 1569 if (!shapeValue)
1570 return CSSIdentifierValue::create(CSSValueNone); 1570 return CSSIdentifierValue::create(CSSValueNone);
1571 if (shapeValue->type() == ShapeValue::Box) 1571 if (shapeValue->type() == ShapeValue::Box)
1572 return CSSIdentifierValue::create(shapeValue->cssBox()); 1572 return CSSIdentifierValue::create(shapeValue->cssBox());
1573 if (shapeValue->type() == ShapeValue::Image) { 1573 if (shapeValue->type() == ShapeValue::Image) {
1574 if (shapeValue->image()) 1574 if (shapeValue->image())
1575 return shapeValue->image()->computedCSSValue(); 1575 return shapeValue->image()->computedCSSValue();
1576 return CSSIdentifierValue::create(CSSValueNone); 1576 return CSSIdentifierValue::create(CSSValueNone);
1577 } 1577 }
1578 1578
1579 ASSERT(shapeValue->type() == ShapeValue::Shape); 1579 DCHECK_EQ(shapeValue->type(), ShapeValue::Shape);
1580 1580
1581 CSSValueList* list = CSSValueList::createSpaceSeparated(); 1581 CSSValueList* list = CSSValueList::createSpaceSeparated();
1582 list->append(*valueForBasicShape(style, shapeValue->shape())); 1582 list->append(*valueForBasicShape(style, shapeValue->shape()));
1583 if (shapeValue->cssBox() != BoxMissing) 1583 if (shapeValue->cssBox() != BoxMissing)
1584 list->append(*CSSIdentifierValue::create(shapeValue->cssBox())); 1584 list->append(*CSSIdentifierValue::create(shapeValue->cssBox()));
1585 return list; 1585 return list;
1586 } 1586 }
1587 1587
1588 static CSSValueList* valuesForSidesShorthand( 1588 static CSSValueList* valuesForSidesShorthand(
1589 const StylePropertyShorthand& shorthand, 1589 const StylePropertyShorthand& shorthand,
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1698 for (int i = 0; i < 3; i++) { 1698 for (int i = 0; i < 3; i++) {
1699 EPaintOrderType paintOrderType = svgStyle.paintOrderType(i); 1699 EPaintOrderType paintOrderType = svgStyle.paintOrderType(i);
1700 switch (paintOrderType) { 1700 switch (paintOrderType) {
1701 case PT_FILL: 1701 case PT_FILL:
1702 case PT_STROKE: 1702 case PT_STROKE:
1703 case PT_MARKERS: 1703 case PT_MARKERS:
1704 list->append(*CSSIdentifierValue::create(paintOrderType)); 1704 list->append(*CSSIdentifierValue::create(paintOrderType));
1705 break; 1705 break;
1706 case PT_NONE: 1706 case PT_NONE:
1707 default: 1707 default:
1708 ASSERT_NOT_REACHED(); 1708 NOTREACHED();
1709 break; 1709 break;
1710 } 1710 }
1711 } 1711 }
1712 1712
1713 return list; 1713 return list;
1714 } 1714 }
1715 1715
1716 static CSSValue* adjustSVGPaintForCurrentColor(SVGPaintType paintType, 1716 static CSSValue* adjustSVGPaintForCurrentColor(SVGPaintType paintType,
1717 const String& url, 1717 const String& url,
1718 const Color& color, 1718 const Color& color,
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 const auto& dropShadowOperation = 1848 const auto& dropShadowOperation =
1849 toDropShadowFilterOperation(*filterOperation); 1849 toDropShadowFilterOperation(*filterOperation);
1850 filterValue = CSSFunctionValue::create(CSSValueDropShadow); 1850 filterValue = CSSFunctionValue::create(CSSValueDropShadow);
1851 // We want our computed style to look like that of a text shadow (has 1851 // We want our computed style to look like that of a text shadow (has
1852 // neither spread nor inset style). 1852 // neither spread nor inset style).
1853 filterValue->append( 1853 filterValue->append(
1854 *valueForShadowData(dropShadowOperation.shadow(), style, false)); 1854 *valueForShadowData(dropShadowOperation.shadow(), style, false));
1855 break; 1855 break;
1856 } 1856 }
1857 default: 1857 default:
1858 ASSERT_NOT_REACHED(); 1858 NOTREACHED();
1859 break; 1859 break;
1860 } 1860 }
1861 list->append(*filterValue); 1861 list->append(*filterValue);
1862 } 1862 }
1863 1863
1864 return list; 1864 return list;
1865 } 1865 }
1866 1866
1867 CSSValue* ComputedStyleCSSValueMapping::valueForFont( 1867 CSSValue* ComputedStyleCSSValueMapping::valueForFont(
1868 const ComputedStyle& style) { 1868 const ComputedStyle& style) {
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
2441 switch (style.getGridAutoFlow()) { 2441 switch (style.getGridAutoFlow()) {
2442 case AutoFlowRow: 2442 case AutoFlowRow:
2443 case AutoFlowRowDense: 2443 case AutoFlowRowDense:
2444 list->append(*CSSIdentifierValue::create(CSSValueRow)); 2444 list->append(*CSSIdentifierValue::create(CSSValueRow));
2445 break; 2445 break;
2446 case AutoFlowColumn: 2446 case AutoFlowColumn:
2447 case AutoFlowColumnDense: 2447 case AutoFlowColumnDense:
2448 list->append(*CSSIdentifierValue::create(CSSValueColumn)); 2448 list->append(*CSSIdentifierValue::create(CSSValueColumn));
2449 break; 2449 break;
2450 default: 2450 default:
2451 ASSERT_NOT_REACHED(); 2451 NOTREACHED();
2452 } 2452 }
2453 2453
2454 switch (style.getGridAutoFlow()) { 2454 switch (style.getGridAutoFlow()) {
2455 case AutoFlowRowDense: 2455 case AutoFlowRowDense:
2456 case AutoFlowColumnDense: 2456 case AutoFlowColumnDense:
2457 list->append(*CSSIdentifierValue::create(CSSValueDense)); 2457 list->append(*CSSIdentifierValue::create(CSSValueDense));
2458 break; 2458 break;
2459 default: 2459 default:
2460 // Do nothing. 2460 // Do nothing.
2461 break; 2461 break;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 styledNode, allowVisitedStyle); 2499 styledNode, allowVisitedStyle);
2500 case CSSPropertyGridTemplate: 2500 case CSSPropertyGridTemplate:
2501 return valuesForGridShorthand(gridTemplateShorthand(), style, 2501 return valuesForGridShorthand(gridTemplateShorthand(), style,
2502 layoutObject, styledNode, 2502 layoutObject, styledNode,
2503 allowVisitedStyle); 2503 allowVisitedStyle);
2504 case CSSPropertyGrid: 2504 case CSSPropertyGrid:
2505 return valuesForGridShorthand(gridShorthand(), style, layoutObject, 2505 return valuesForGridShorthand(gridShorthand(), style, layoutObject,
2506 styledNode, allowVisitedStyle); 2506 styledNode, allowVisitedStyle);
2507 case CSSPropertyGridTemplateAreas: 2507 case CSSPropertyGridTemplateAreas:
2508 if (!style.namedGridAreaRowCount()) { 2508 if (!style.namedGridAreaRowCount()) {
2509 ASSERT(!style.namedGridAreaColumnCount()); 2509 DCHECK(!style.namedGridAreaColumnCount());
2510 return CSSIdentifierValue::create(CSSValueNone); 2510 return CSSIdentifierValue::create(CSSValueNone);
2511 } 2511 }
2512 2512
2513 return CSSGridTemplateAreasValue::create( 2513 return CSSGridTemplateAreasValue::create(
2514 style.namedGridArea(), style.namedGridAreaRowCount(), 2514 style.namedGridArea(), style.namedGridAreaRowCount(),
2515 style.namedGridAreaColumnCount()); 2515 style.namedGridAreaColumnCount());
2516 case CSSPropertyGridColumnGap: 2516 case CSSPropertyGridColumnGap:
2517 return zoomAdjustedPixelValueForLength(style.gridColumnGap(), style); 2517 return zoomAdjustedPixelValueForLength(style.gridColumnGap(), style);
2518 case CSSPropertyGridRowGap: 2518 case CSSPropertyGridRowGap:
2519 return zoomAdjustedPixelValueForLength(style.gridRowGap(), style); 2519 return zoomAdjustedPixelValueForLength(style.gridRowGap(), style);
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
2791 return currentColorOrValidColor(style, style.textEmphasisColor()); 2791 return currentColorOrValidColor(style, style.textEmphasisColor());
2792 case CSSPropertyWebkitTextEmphasisPosition: 2792 case CSSPropertyWebkitTextEmphasisPosition:
2793 return CSSIdentifierValue::create(style.getTextEmphasisPosition()); 2793 return CSSIdentifierValue::create(style.getTextEmphasisPosition());
2794 case CSSPropertyWebkitTextEmphasisStyle: 2794 case CSSPropertyWebkitTextEmphasisStyle:
2795 switch (style.getTextEmphasisMark()) { 2795 switch (style.getTextEmphasisMark()) {
2796 case TextEmphasisMarkNone: 2796 case TextEmphasisMarkNone:
2797 return CSSIdentifierValue::create(CSSValueNone); 2797 return CSSIdentifierValue::create(CSSValueNone);
2798 case TextEmphasisMarkCustom: 2798 case TextEmphasisMarkCustom:
2799 return CSSStringValue::create(style.textEmphasisCustomMark()); 2799 return CSSStringValue::create(style.textEmphasisCustomMark());
2800 case TextEmphasisMarkAuto: 2800 case TextEmphasisMarkAuto:
2801 ASSERT_NOT_REACHED(); 2801 NOTREACHED();
2802 // Fall through 2802 // Fall through
2803 case TextEmphasisMarkDot: 2803 case TextEmphasisMarkDot:
2804 case TextEmphasisMarkCircle: 2804 case TextEmphasisMarkCircle:
2805 case TextEmphasisMarkDoubleCircle: 2805 case TextEmphasisMarkDoubleCircle:
2806 case TextEmphasisMarkTriangle: 2806 case TextEmphasisMarkTriangle:
2807 case TextEmphasisMarkSesame: { 2807 case TextEmphasisMarkSesame: {
2808 CSSValueList* list = CSSValueList::createSpaceSeparated(); 2808 CSSValueList* list = CSSValueList::createSpaceSeparated();
2809 list->append( 2809 list->append(
2810 *CSSIdentifierValue::create(style.getTextEmphasisFill())); 2810 *CSSIdentifierValue::create(style.getTextEmphasisFill()));
2811 list->append( 2811 list->append(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
2866 case EVerticalAlign::kTop: 2866 case EVerticalAlign::kTop:
2867 return CSSIdentifierValue::create(CSSValueTop); 2867 return CSSIdentifierValue::create(CSSValueTop);
2868 case EVerticalAlign::kBottom: 2868 case EVerticalAlign::kBottom:
2869 return CSSIdentifierValue::create(CSSValueBottom); 2869 return CSSIdentifierValue::create(CSSValueBottom);
2870 case EVerticalAlign::kBaselineMiddle: 2870 case EVerticalAlign::kBaselineMiddle:
2871 return CSSIdentifierValue::create(CSSValueWebkitBaselineMiddle); 2871 return CSSIdentifierValue::create(CSSValueWebkitBaselineMiddle);
2872 case EVerticalAlign::kLength: 2872 case EVerticalAlign::kLength:
2873 return zoomAdjustedPixelValueForLength(style.getVerticalAlignLength(), 2873 return zoomAdjustedPixelValueForLength(style.getVerticalAlignLength(),
2874 style); 2874 style);
2875 } 2875 }
2876 ASSERT_NOT_REACHED(); 2876 NOTREACHED();
2877 return nullptr; 2877 return nullptr;
2878 case CSSPropertyVisibility: 2878 case CSSPropertyVisibility:
2879 return CSSIdentifierValue::create(style.visibility()); 2879 return CSSIdentifierValue::create(style.visibility());
2880 case CSSPropertyWhiteSpace: 2880 case CSSPropertyWhiteSpace:
2881 return CSSIdentifierValue::create(style.whiteSpace()); 2881 return CSSIdentifierValue::create(style.whiteSpace());
2882 case CSSPropertyWidows: 2882 case CSSPropertyWidows:
2883 return CSSPrimitiveValue::create(style.widows(), 2883 return CSSPrimitiveValue::create(style.widows(),
2884 CSSPrimitiveValue::UnitType::Number); 2884 CSSPrimitiveValue::UnitType::Number);
2885 case CSSPropertyWidth: 2885 case CSSPropertyWidth:
2886 if (layoutObject) { 2886 if (layoutObject) {
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
3428 case CSSPropertyWebkitPaddingEnd: 3428 case CSSPropertyWebkitPaddingEnd:
3429 case CSSPropertyWebkitPaddingStart: 3429 case CSSPropertyWebkitPaddingStart:
3430 case CSSPropertyWebkitPaddingAfter: 3430 case CSSPropertyWebkitPaddingAfter:
3431 case CSSPropertyWebkitPaddingBefore: 3431 case CSSPropertyWebkitPaddingBefore:
3432 case CSSPropertyWebkitLogicalWidth: 3432 case CSSPropertyWebkitLogicalWidth:
3433 case CSSPropertyWebkitLogicalHeight: 3433 case CSSPropertyWebkitLogicalHeight:
3434 case CSSPropertyWebkitMinLogicalWidth: 3434 case CSSPropertyWebkitMinLogicalWidth:
3435 case CSSPropertyWebkitMinLogicalHeight: 3435 case CSSPropertyWebkitMinLogicalHeight:
3436 case CSSPropertyWebkitMaxLogicalWidth: 3436 case CSSPropertyWebkitMaxLogicalWidth:
3437 case CSSPropertyWebkitMaxLogicalHeight: 3437 case CSSPropertyWebkitMaxLogicalHeight:
3438 ASSERT_NOT_REACHED(); 3438 NOTREACHED();
3439 return nullptr; 3439 return nullptr;
3440 3440
3441 // Unimplemented @font-face properties. 3441 // Unimplemented @font-face properties.
3442 case CSSPropertySrc: 3442 case CSSPropertySrc:
3443 case CSSPropertyUnicodeRange: 3443 case CSSPropertyUnicodeRange:
3444 return nullptr; 3444 return nullptr;
3445 3445
3446 // Other unimplemented properties. 3446 // Other unimplemented properties.
3447 case CSSPropertyPage: // for @page 3447 case CSSPropertyPage: // for @page
3448 case CSSPropertySize: // for @page 3448 case CSSPropertySize: // for @page
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3550 case CSSPropertyBaselineShift: { 3550 case CSSPropertyBaselineShift: {
3551 switch (svgStyle.baselineShift()) { 3551 switch (svgStyle.baselineShift()) {
3552 case BS_SUPER: 3552 case BS_SUPER:
3553 return CSSIdentifierValue::create(CSSValueSuper); 3553 return CSSIdentifierValue::create(CSSValueSuper);
3554 case BS_SUB: 3554 case BS_SUB:
3555 return CSSIdentifierValue::create(CSSValueSub); 3555 return CSSIdentifierValue::create(CSSValueSub);
3556 case BS_LENGTH: 3556 case BS_LENGTH:
3557 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue(), 3557 return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue(),
3558 style); 3558 style);
3559 } 3559 }
3560 ASSERT_NOT_REACHED(); 3560 NOTREACHED();
3561 return nullptr; 3561 return nullptr;
3562 } 3562 }
3563 case CSSPropertyBufferedRendering: 3563 case CSSPropertyBufferedRendering:
3564 return CSSIdentifierValue::create(svgStyle.bufferedRendering()); 3564 return CSSIdentifierValue::create(svgStyle.bufferedRendering());
3565 case CSSPropertyPaintOrder: 3565 case CSSPropertyPaintOrder:
3566 return paintOrderToCSSValueList(svgStyle); 3566 return paintOrderToCSSValueList(svgStyle);
3567 case CSSPropertyVectorEffect: 3567 case CSSPropertyVectorEffect:
3568 return CSSIdentifierValue::create(svgStyle.vectorEffect()); 3568 return CSSIdentifierValue::create(svgStyle.vectorEffect());
3569 case CSSPropertyMaskType: 3569 case CSSPropertyMaskType:
3570 return CSSIdentifierValue::create(svgStyle.maskType()); 3570 return CSSIdentifierValue::create(svgStyle.maskType());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
3675 3675
3676 CSSValueList* list = CSSValueList::createSpaceSeparated(); 3676 CSSValueList* list = CSSValueList::createSpaceSeparated();
3677 if (style.containsStyle()) 3677 if (style.containsStyle())
3678 list->append(*CSSIdentifierValue::create(CSSValueStyle)); 3678 list->append(*CSSIdentifierValue::create(CSSValueStyle));
3679 if (style.contain() & ContainsLayout) 3679 if (style.contain() & ContainsLayout)
3680 list->append(*CSSIdentifierValue::create(CSSValueLayout)); 3680 list->append(*CSSIdentifierValue::create(CSSValueLayout));
3681 if (style.containsPaint()) 3681 if (style.containsPaint())
3682 list->append(*CSSIdentifierValue::create(CSSValuePaint)); 3682 list->append(*CSSIdentifierValue::create(CSSValuePaint));
3683 if (style.containsSize()) 3683 if (style.containsSize())
3684 list->append(*CSSIdentifierValue::create(CSSValueSize)); 3684 list->append(*CSSIdentifierValue::create(CSSValueSize));
3685 ASSERT(list->length()); 3685 DCHECK(list->length());
3686 return list; 3686 return list;
3687 } 3687 }
3688 case CSSPropertyVariable: 3688 case CSSPropertyVariable:
3689 // Variables are retrieved via get(AtomicString). 3689 // Variables are retrieved via get(AtomicString).
3690 ASSERT_NOT_REACHED(); 3690 NOTREACHED();
3691 return nullptr; 3691 return nullptr;
3692 case CSSPropertyAll: 3692 case CSSPropertyAll:
3693 return nullptr; 3693 return nullptr;
3694 default: 3694 default:
3695 break; 3695 break;
3696 } 3696 }
3697 ASSERT_NOT_REACHED(); 3697 NOTREACHED();
3698 return nullptr; 3698 return nullptr;
3699 } 3699 }
3700 3700
3701 } // namespace blink 3701 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSViewportRule.cpp ('k') | third_party/WebKit/Source/core/css/DOMWindowCSS.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698