| 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 2674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2685 return; | 2685 return; |
| 2686 | 2686 |
| 2687 if (numberOfValues == 3) | 2687 if (numberOfValues == 3) |
| 2688 parse3ValuesFillPosition(valueList, value1, value2, parsedValue1.release
(), parsedValue2.release()); | 2688 parse3ValuesFillPosition(valueList, value1, value2, parsedValue1.release
(), parsedValue2.release()); |
| 2689 else | 2689 else |
| 2690 parse4ValuesFillPosition(valueList, value1, value2, parsedValue1.release
(), parsedValue2.release()); | 2690 parse4ValuesFillPosition(valueList, value1, value2, parsedValue1.release
(), parsedValue2.release()); |
| 2691 } | 2691 } |
| 2692 | 2692 |
| 2693 void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList,
RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2) | 2693 void CSSPropertyParser::parse2ValuesFillPosition(CSSParserValueList* valueList,
RefPtrWillBeRawPtr<CSSValue>& value1, RefPtrWillBeRawPtr<CSSValue>& value2) |
| 2694 { | 2694 { |
| 2695 CSSParserValue* value = valueList->current(); | |
| 2696 | |
| 2697 // Parse the first value. We're just making sure that it is one of the vali
d keywords or a percentage/length. | 2695 // Parse the first value. We're just making sure that it is one of the vali
d keywords or a percentage/length. |
| 2698 unsigned cumulativeFlags = 0; | 2696 unsigned cumulativeFlags = 0; |
| 2699 FillPositionFlag value1Flag = InvalidFillPosition; | 2697 FillPositionFlag value1Flag = InvalidFillPosition; |
| 2700 FillPositionFlag value2Flag = InvalidFillPosition; | 2698 FillPositionFlag value2Flag = InvalidFillPosition; |
| 2701 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag); | 2699 value1 = parseFillPositionComponent(valueList, cumulativeFlags, value1Flag); |
| 2702 if (!value1) | 2700 if (!value1) |
| 2703 return; | 2701 return; |
| 2704 | 2702 |
| 2705 // It only takes one value for background-position to be correctly parsed if
it was specified in a shorthand (since we | 2703 // It only takes one value for background-position to be correctly parsed if
it was specified in a shorthand (since we |
| 2706 // can assume that any other values belong to the rest of the shorthand). I
f we're not parsing a shorthand, though, the | 2704 // can assume that any other values belong to the rest of the shorthand). I
f we're not parsing a shorthand, though, the |
| 2707 // value was explicitly specified for our property. | 2705 // value was explicitly specified for our property. |
| 2708 value = valueList->next(); | 2706 CSSParserValue* value = valueList->next(); |
| 2709 | 2707 |
| 2710 // First check for the comma. If so, we are finished parsing this value or
value pair. | 2708 // First check for the comma. If so, we are finished parsing this value or
value pair. |
| 2711 if (isComma(value)) | 2709 if (isComma(value)) |
| 2712 value = 0; | 2710 value = 0; |
| 2713 | 2711 |
| 2714 if (value) { | 2712 if (value) { |
| 2715 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Fl
ag); | 2713 value2 = parseFillPositionComponent(valueList, cumulativeFlags, value2Fl
ag); |
| 2716 if (value2) | 2714 if (value2) |
| 2717 valueList->next(); | 2715 valueList->next(); |
| 2718 else { | 2716 else { |
| (...skipping 5738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8455 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
| 8458 if (!seenStroke) | 8456 if (!seenStroke) |
| 8459 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
| 8460 if (!seenMarkers) | 8458 if (!seenMarkers) |
| 8461 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8459 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
| 8462 | 8460 |
| 8463 return parsedValues.release(); | 8461 return parsedValues.release(); |
| 8464 } | 8462 } |
| 8465 | 8463 |
| 8466 } // namespace WebCore | 8464 } // namespace WebCore |
| OLD | NEW |