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

Unified Diff: third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp

Issue 1603193002: Move two shape related properties into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: V5 Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
diff --git a/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp b/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
index 432805181e45b1292d8cc04b37eb99bcdf730828..3a2651b77dfe6060c0afae203a1f84efadd4b32a 100644
--- a/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
+++ b/third_party/WebKit/Source/core/css/CSSBasicShapeValues.cpp
@@ -88,10 +88,10 @@ static PassRefPtrWillBeRawPtr<CSSValuePair> buildSerializablePositionOffset(Pass
side = defaultSide;
amount = cssValuePool().createValue(50, CSSPrimitiveValue::UnitType::Percentage);
} else if ((side == CSSValueRight || side == CSSValueBottom)
- && amount->isPercentage()) {
+ && amount && amount->isPercentage()) {
Timothy Loh 2016/01/27 00:44:03 What changed to make us need this?
rwlbuis 2016/01/27 20:02:39 parseFillPosition has a special ResolveValuesAsPer
side = defaultSide;
amount = cssValuePool().createValue(100 - amount->getFloatValue(), CSSPrimitiveValue::UnitType::Percentage);
- } else if (amount->isLength() && !amount->getFloatValue()) {
+ } else if (!amount || (amount->isLength() && !amount->getFloatValue())) {
if (side == CSSValueRight || side == CSSValueBottom)
amount = cssValuePool().createValue(100, CSSPrimitiveValue::UnitType::Percentage);
else

Powered by Google App Engine
This is Rietveld 408576698