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

Unified Diff: Source/core/css/resolver/StyleBuilderCustom.cpp

Issue 108653006: Assert that convertToLength succeeds instead of returning Length(Undefined) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/css/resolver/TransformBuilder.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleBuilderCustom.cpp
diff --git a/Source/core/css/resolver/StyleBuilderCustom.cpp b/Source/core/css/resolver/StyleBuilderCustom.cpp
index 8f239d8cb6440d8e969046c805dcbab652dfb3aa..94571af76199a0b685025c2c31e40f1ae42108b0 100755
--- a/Source/core/css/resolver/StyleBuilderCustom.cpp
+++ b/Source/core/css/resolver/StyleBuilderCustom.cpp
@@ -539,7 +539,6 @@ void StyleBuilderFunctions::applyValueCSSPropertyTextIndent(StyleResolverState&
CSSValueList* valueList = toCSSValueList(value);
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(valueList->itemWithoutBoundsCheck(0));
Length lengthOrPercentageValue = primitiveValue->convertToLength<FixedConversion | PercentConversion>(state.cssToLengthConversionData());
- ASSERT(!lengthOrPercentageValue.isUndefined());
state.style()->setTextIndent(lengthOrPercentageValue);
ASSERT(valueList->length() <= 2);
@@ -705,9 +704,8 @@ void StyleBuilderFunctions::applyValueCSSPropertyInternalMarqueeIncrement(StyleR
break;
}
} else {
- Length marqueeLength = primitiveValue ? primitiveValue->convertToLength<FixedConversion | PercentConversion>(state.cssToLengthConversionData()) : Length(Undefined);
- if (!marqueeLength.isUndefined())
- state.style()->setMarqueeIncrement(marqueeLength);
+ Length marqueeLength = primitiveValue->convertToLength<FixedConversion | PercentConversion>(state.cssToLengthConversionData());
+ state.style()->setMarqueeIncrement(marqueeLength);
}
}
@@ -881,9 +879,6 @@ static bool createGridTrackBreadth(CSSPrimitiveValue* primitiveValue, const Styl
}
workingLength = primitiveValue->convertToLength<FixedConversion | PercentConversion | AutoConversion>(state.cssToLengthConversionData());
- if (workingLength.length().isUndefined())
- return false;
-
if (primitiveValue->isLength())
workingLength.length().setQuirk(primitiveValue->isQuirkValue());
« no previous file with comments | « Source/core/css/resolver/StyleBuilderConverter.cpp ('k') | Source/core/css/resolver/TransformBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698