Changeset 208029 in webkit
- Timestamp:
- Oct 27, 2016 9:11:18 PM (8 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r208028 r208029 1 2016-10-27 Dave Hyatt <hyatt@apple.com> 2 3 [CSS Parser] Add support for a reference box to -webkit-clip-path 4 https://bugs.webkit.org/show_bug.cgi?id=164107 5 6 Reviewed by Simon Fraser. 7 8 * css/parser/CSSPropertyParser.cpp: 9 (WebCore::consumeBasicShape): 10 (WebCore::consumeBasicShapeOrBox): 11 (WebCore::consumeWebkitClipPath): 12 1 13 2016-10-27 Yusuke Suzuki <utatane.tea@gmail.com> 2 14 -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r207759 r208029 2204 2204 else if (id == CSSValueInset) 2205 2205 shape = consumeBasicShapeInset(args, context); 2206 if (!shape || !args.atEnd())2206 if (!shape) 2207 2207 return nullptr; 2208 2208 range = rangeCopy; … … 2211 2211 } 2212 2212 2213 static RefPtr<CSSValue> consumeBasicShapeOrBox(CSSParserTokenRange& range, const CSSParserContext& context) 2214 { 2215 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); 2216 bool shapeFound = false; 2217 bool boxFound = false; 2218 while (!range.atEnd() && !(shapeFound && boxFound)) { 2219 RefPtr<CSSValue> componentValue; 2220 if (range.peek().type() == FunctionToken && !shapeFound) { 2221 componentValue = consumeBasicShape(range, context); 2222 shapeFound = true; 2223 } else if (range.peek().type() == IdentToken && !boxFound) { 2224 componentValue = consumeIdent<CSSValueContentBox, CSSValuePaddingBox, CSSValueBorderBox, CSSValueFill, CSSValueStroke, CSSValueViewBox>(range); 2225 boxFound = true; 2226 } 2227 if (!componentValue) 2228 return nullptr; 2229 list->append(componentValue.releaseNonNull()); 2230 } 2231 2232 if (!range.atEnd()) 2233 return nullptr; 2234 2235 return list; 2236 } 2237 2213 2238 static RefPtr<CSSValue> consumeWebkitClipPath(CSSParserTokenRange& range, const CSSParserContext& context) 2214 2239 { … … 2217 2242 if (RefPtr<CSSPrimitiveValue> url = consumeUrl(range)) 2218 2243 return url; 2219 return consumeBasicShape (range, context);2244 return consumeBasicShapeOrBox(range, context); 2220 2245 } 2221 2246
Note: See TracChangeset
for help on using the changeset viewer.