OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 if (parsedValue) { | 334 if (parsedValue) { |
335 if (!m_valueList->current() || inShorthand()) | 335 if (!m_valueList->current() || inShorthand()) |
336 return parsedValue.release(); | 336 return parsedValue.release(); |
337 } | 337 } |
338 return nullptr; | 338 return nullptr; |
339 } | 339 } |
340 | 340 |
341 bool CSSPropertyParser::legacyParseShorthand(CSSPropertyID propertyID, bool impo
rtant) | 341 bool CSSPropertyParser::legacyParseShorthand(CSSPropertyID propertyID, bool impo
rtant) |
342 { | 342 { |
343 switch (propertyID) { | 343 switch (propertyID) { |
344 case CSSPropertyBackgroundPosition: | |
345 case CSSPropertyBackgroundRepeat: | |
346 case CSSPropertyWebkitMaskPosition: | |
347 case CSSPropertyWebkitMaskRepeat: { | |
348 RefPtrWillBeRawPtr<CSSValue> val1 = nullptr; | |
349 RefPtrWillBeRawPtr<CSSValue> val2 = nullptr; | |
350 CSSPropertyID propId1, propId2; | |
351 if (parseFillProperty(propertyID, propId1, propId2, val1, val2)) { | |
352 ShorthandScope scope(this, propertyID); | |
353 addProperty(propId1, val1.release(), important); | |
354 if (val2) | |
355 addProperty(propId2, val2.release(), important); | |
356 m_implicitShorthand = false; | |
357 return true; | |
358 } | |
359 m_implicitShorthand = false; | |
360 return true; | |
361 } | |
362 | |
363 case CSSPropertyGridGap: | 344 case CSSPropertyGridGap: |
364 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 345 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
365 return parseGridGapShorthand(important); | 346 return parseGridGapShorthand(important); |
366 | 347 |
367 case CSSPropertyGridColumn: | 348 case CSSPropertyGridColumn: |
368 case CSSPropertyGridRow: | 349 case CSSPropertyGridRow: |
369 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); | 350 ASSERT(RuntimeEnabledFeatures::cssGridLayoutEnabled()); |
370 return parseGridItemPositionShorthand(propertyID, important); | 351 return parseGridItemPositionShorthand(propertyID, important); |
371 | 352 |
372 case CSSPropertyGridArea: | 353 case CSSPropertyGridArea: |
(...skipping 2748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3121 ASSERT(!m_parsedCalculation); | 3102 ASSERT(!m_parsedCalculation); |
3122 m_parsedCalculation = CSSCalcValue::create(args, range); | 3103 m_parsedCalculation = CSSCalcValue::create(args, range); |
3123 | 3104 |
3124 if (!m_parsedCalculation) | 3105 if (!m_parsedCalculation) |
3125 return false; | 3106 return false; |
3126 | 3107 |
3127 return true; | 3108 return true; |
3128 } | 3109 } |
3129 | 3110 |
3130 } // namespace blink | 3111 } // namespace blink |
OLD | NEW |