Changeset 208111 in webkit
- Timestamp:
- Oct 29, 2016 12:14:10 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r208110 r208111 1 2016-10-29 Dave Hyatt <hyatt@apple.com> 2 3 [CSS Parser] Support -webkit-aspect-ratio 4 https://bugs.webkit.org/show_bug.cgi?id=164187 5 6 Reviewed by Simon Fraser. 7 8 * css/parser/CSSPropertyParser.cpp: 9 (WebCore::consumeWebkitAspectRatio): 10 (WebCore::CSSPropertyParser::parseSingleValue): 11 1 12 2016-10-29 Dave Hyatt <hyatt@apple.com> 2 13 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r208109 r208111 31 31 #include "CSSPropertyParser.h" 32 32 33 #include "CSSAspectRatioValue.h" 33 34 #include "CSSBasicShapes.h" 34 35 #include "CSSBorderImage.h" … … 3245 3246 3246 3247 return consumeAttr(consumeFunction(range), context); 3248 } 3249 3250 static RefPtr<CSSValue> consumeWebkitAspectRatio(CSSParserTokenRange& range) 3251 { 3252 if (range.peek().type() == IdentToken) 3253 return consumeIdent<CSSValueAuto, CSSValueFromDimensions, CSSValueFromIntrinsic>(range); 3254 3255 RefPtr<CSSPrimitiveValue> leftValue = consumeNumber(range, ValueRangeNonNegative); 3256 if (!leftValue || range.atEnd() || !consumeSlashIncludingWhitespace(range)) 3257 return nullptr; 3258 RefPtr<CSSPrimitiveValue> rightValue = consumeNumber(range, ValueRangeNonNegative); 3259 if (!rightValue) 3260 return nullptr; 3261 3262 return CSSAspectRatioValue::create(leftValue->floatValue(), rightValue->floatValue()); 3247 3263 } 3248 3264 … … 3632 3648 case CSSPropertyAlt: 3633 3649 return consumeAlt(m_range, m_context); 3650 case CSSPropertyWebkitAspectRatio: 3651 return consumeWebkitAspectRatio(m_range); 3634 3652 default: 3635 3653 return nullptr;
Note: See TracChangeset
for help on using the changeset viewer.