Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| diff --git a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| index 6227c6d6293da1a0824d170335fb272c5a04f007..bca30c42278d8b2e450954ffb23a2cd28a5b675c 100644 |
| --- a/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| +++ b/third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp |
| @@ -121,7 +121,7 @@ static CSSValueList* createPositionListForLayer(CSSPropertyID propertyID, |
| positionList->append( |
| *zoomAdjustedPixelValueForLength(layer.xPosition(), style)); |
| if (layer.isBackgroundYOriginSet()) { |
| - ASSERT(propertyID == CSSPropertyBackgroundPosition || |
| + DCHECK(propertyID == CSSPropertyBackgroundPosition || |
| propertyID == CSSPropertyWebkitMaskPosition); |
| positionList->append( |
| *CSSIdentifierValue::create(layer.backgroundYOrigin())); |
| @@ -519,7 +519,7 @@ static CSSValueList* valueForItemPositionWithOverflowAlignment( |
| if (data.position() >= ItemPositionCenter && |
| data.overflow() != OverflowAlignmentDefault) |
| result->append(*CSSIdentifierValue::create(data.overflow())); |
| - ASSERT(result->length() <= 2); |
| + DCHECK_LE(result->length(), static_cast<unsigned>(2)); |
|
tkent
2017/03/28 14:44:55
static_cast<unsigned>(2) -> 2u
nikhil.sahni
2017/03/30 12:17:57
Done.
|
| return result; |
| } |
| @@ -534,7 +534,7 @@ static CSSValueList* valuesForGridShorthand( |
| const CSSValue* value = ComputedStyleCSSValueMapping::get( |
| shorthand.properties()[i], style, layoutObject, styledNode, |
| allowVisitedStyle); |
| - ASSERT(value); |
| + DCHECK(value); |
| list->append(*value); |
| } |
| return list; |
| @@ -551,7 +551,7 @@ static CSSValueList* valuesForShorthandProperty( |
| const CSSValue* value = ComputedStyleCSSValueMapping::get( |
| shorthand.properties()[i], style, layoutObject, styledNode, |
| allowVisitedStyle); |
| - ASSERT(value); |
| + DCHECK(value); |
| list->append(*value); |
| } |
| return list; |
| @@ -600,7 +600,7 @@ static CSSValue* valuesForFontVariantProperty(const ComputedStyle& style, |
| const CSSValue* value = ComputedStyleCSSValueMapping::get( |
| fontVariantShorthand().properties()[i], style, layoutObject, |
| styledNode, allowVisitedStyle); |
| - ASSERT(value); |
| + DCHECK(value); |
| if (value->isIdentifierValue() && |
| toCSSIdentifierValue(value)->getValueID() == CSSValueNone) { |
| list->append(*expandNoneLigaturesValue()); |
| @@ -632,7 +632,7 @@ static CSSValueList* valuesForBackgroundShorthand( |
| const CSSValue* value = ComputedStyleCSSValueMapping::get( |
| CSSPropertyBackgroundColor, style, layoutObject, styledNode, |
| allowVisitedStyle); |
| - ASSERT(value); |
| + DCHECK(value); |
| beforeSlash->append(*value); |
| } |
| beforeSlash->append(currLayer->image() |
| @@ -673,8 +673,8 @@ valueForContentPositionAndDistributionWithOverflowAlignment( |
| data.distribution() != ContentDistributionDefault) && |
| data.overflow() != OverflowAlignmentDefault) |
| result->append(*CSSIdentifierValue::create(data.overflow())); |
| - ASSERT(result->length() > 0); |
| - ASSERT(result->length() <= 3); |
| + DCHECK_GT(result->length(), static_cast<unsigned>(0)); |
|
tkent
2017/03/28 14:44:55
static_cast<unsigned>(0) -> 0u
|
| + DCHECK_LE(result->length(), static_cast<unsigned>(3)); |
|
tkent
2017/03/28 14:44:55
static_cast<unsigned>(3) -> 3u
nikhil.sahni
2017/03/30 12:17:57
Done.
|
| return result; |
| } |
| @@ -892,7 +892,7 @@ static CSSValue* specifiedValueForGridTrackSize(const GridTrackSize& trackSize, |
| return fitContentTrackBreadth; |
| } |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |
| @@ -1129,7 +1129,7 @@ static CSSValue* valueForTextDecorationStyle( |
| return CSSIdentifierValue::create(CSSValueWavy); |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return CSSInitialValue::create(); |
| } |
| @@ -1171,7 +1171,7 @@ static CSSValue* touchActionFlagsToCSSValue(TouchAction touchAction) { |
| list->append(*CSSIdentifierValue::create(CSSValuePinchZoom)); |
| } |
| - ASSERT(list->length()); |
| + DCHECK(list->length()); |
| return list; |
| } |
| @@ -1216,7 +1216,7 @@ static CSSValue* valueForAnimationDirection( |
| case Timing::PlaybackDirection::ALTERNATE_REVERSE: |
| return CSSIdentifierValue::create(CSSValueAlternateReverse); |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |
| } |
| @@ -1246,7 +1246,7 @@ static CSSValue* valueForAnimationFillMode(Timing::FillMode fillMode) { |
| case Timing::FillMode::BOTH: |
| return CSSIdentifierValue::create(CSSValueBoth); |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |
| } |
| @@ -1261,7 +1261,7 @@ static CSSValue* valueForAnimationIterationCount(double iterationCount) { |
| static CSSValue* valueForAnimationPlayState(EAnimPlayState playState) { |
| if (playState == AnimPlayStatePlaying) |
| return CSSIdentifierValue::create(CSSValueRunning); |
| - ASSERT(playState == AnimPlayStatePaused); |
| + DCHECK_EQ(playState, AnimPlayStatePaused); |
| return CSSIdentifierValue::create(CSSValuePaused); |
| } |
| @@ -1288,7 +1288,7 @@ static CSSValue* createTimingFunctionValue( |
| valueId = CSSValueEaseInOut; |
| break; |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |
| return CSSIdentifierValue::create(valueId); |
| @@ -1449,7 +1449,7 @@ static CSSValue* createTransitionPropertyValue( |
| return CSSIdentifierValue::create(CSSValueNone); |
| if (property.propertyType == CSSTransitionData::TransitionUnknownProperty) |
| return CSSCustomIdentValue::create(property.propertyString); |
| - ASSERT(property.propertyType == CSSTransitionData::TransitionKnownProperty); |
| + DCHECK_EQ(property.propertyType, CSSTransitionData::TransitionKnownProperty); |
| return CSSCustomIdentValue::create( |
| getPropertyNameAtomicString(property.unresolvedProperty)); |
| } |
| @@ -1478,7 +1478,7 @@ CSSValueID valueForQuoteType(const QuoteType quoteType) { |
| case OPEN_QUOTE: |
| return CSSValueOpenQuote; |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return CSSValueInvalid; |
| } |
| @@ -1489,7 +1489,7 @@ static CSSValue* valueForContentData(const ComputedStyle& style) { |
| if (contentData->isCounter()) { |
| const CounterContent* counter = |
| toCounterContentData(contentData)->counter(); |
| - ASSERT(counter); |
| + DCHECK(counter); |
| CSSCustomIdentValue* identifier = |
| CSSCustomIdentValue::create(counter->identifier()); |
| CSSStringValue* separator = CSSStringValue::create(counter->separator()); |
| @@ -1505,7 +1505,7 @@ static CSSValue* valueForContentData(const ComputedStyle& style) { |
| list->append(*CSSCounterValue::create(identifier, listStyle, separator)); |
| } else if (contentData->isImage()) { |
| const StyleImage* image = toImageContentData(contentData)->image(); |
| - ASSERT(image); |
| + DCHECK(image); |
| list->append(*image->computedCSSValue()); |
| } else if (contentData->isText()) { |
| list->append( |
| @@ -1514,7 +1514,7 @@ static CSSValue* valueForContentData(const ComputedStyle& style) { |
| const QuoteType quoteType = toQuoteContentData(contentData)->quote(); |
| list->append(*CSSIdentifierValue::create(valueForQuoteType(quoteType))); |
| } else { |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| } |
| } |
| return list; |
| @@ -1560,7 +1560,7 @@ static CSSValue* valueForShape(const ComputedStyle& style, |
| return CSSIdentifierValue::create(CSSValueNone); |
| } |
| - ASSERT(shapeValue->type() == ShapeValue::Shape); |
| + DCHECK_EQ(shapeValue->type(), ShapeValue::Shape); |
| CSSValueList* list = CSSValueList::createSpaceSeparated(); |
| list->append(*valueForBasicShape(style, shapeValue->shape())); |
| @@ -1689,7 +1689,7 @@ static CSSValue* paintOrderToCSSValueList(const SVGComputedStyle& svgStyle) { |
| break; |
| case PT_NONE: |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| break; |
| } |
| } |
| @@ -1839,7 +1839,7 @@ CSSValue* ComputedStyleCSSValueMapping::valueForFilter( |
| break; |
| } |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| break; |
| } |
| list->append(*filterValue); |
| @@ -2432,7 +2432,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| list->append(*CSSIdentifierValue::create(CSSValueColumn)); |
| break; |
| default: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| } |
| switch (style.getGridAutoFlow()) { |
| @@ -2490,7 +2490,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| styledNode, allowVisitedStyle); |
| case CSSPropertyGridTemplateAreas: |
| if (!style.namedGridAreaRowCount()) { |
| - ASSERT(!style.namedGridAreaColumnCount()); |
| + DCHECK(!style.namedGridAreaColumnCount()); |
| return CSSIdentifierValue::create(CSSValueNone); |
| } |
| @@ -2781,7 +2781,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| case TextEmphasisMarkCustom: |
| return CSSStringValue::create(style.textEmphasisCustomMark()); |
| case TextEmphasisMarkAuto: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| // Fall through |
| case TextEmphasisMarkDot: |
| case TextEmphasisMarkCircle: |
| @@ -2856,7 +2856,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| return zoomAdjustedPixelValueForLength(style.getVerticalAlignLength(), |
| style); |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| case CSSPropertyVisibility: |
| return CSSIdentifierValue::create(style.visibility()); |
| @@ -3418,7 +3418,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| case CSSPropertyWebkitMinLogicalHeight: |
| case CSSPropertyWebkitMaxLogicalWidth: |
| case CSSPropertyWebkitMaxLogicalHeight: |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| // Unimplemented @font-face properties. |
| @@ -3540,7 +3540,7 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| return zoomAdjustedPixelValueForLength(svgStyle.baselineShiftValue(), |
| style); |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |
| case CSSPropertyBufferedRendering: |
| @@ -3665,19 +3665,19 @@ const CSSValue* ComputedStyleCSSValueMapping::get( |
| list->append(*CSSIdentifierValue::create(CSSValuePaint)); |
| if (style.containsSize()) |
| list->append(*CSSIdentifierValue::create(CSSValueSize)); |
| - ASSERT(list->length()); |
| + DCHECK(list->length()); |
| return list; |
| } |
| case CSSPropertyVariable: |
| // Variables are retrieved via get(AtomicString). |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| case CSSPropertyAll: |
| return nullptr; |
| default: |
| break; |
| } |
| - ASSERT_NOT_REACHED(); |
| + NOTREACHED(); |
| return nullptr; |
| } |