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 8751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8762 ASSERT_NOT_REACHED(); | 8762 ASSERT_NOT_REACHED(); |
8763 return false; | 8763 return false; |
8764 } | 8764 } |
8765 | 8765 |
8766 return value; | 8766 return value; |
8767 } | 8767 } |
8768 | 8768 |
8769 void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr<CSSVa lue> value, bool important) | 8769 void CSSParser::addTextDecorationProperty(CSSPropertyID propId, PassRefPtr<CSSVa lue> value, bool important) |
8770 { | 8770 { |
8771 // The text-decoration-line property takes priority over text-decoration, un less the latter has important priority set. | 8771 // The text-decoration-line property takes priority over text-decoration, un less the latter has important priority set. |
8772 if (propId == CSSPropertyTextDecoration && !important && m_currentShorthand == CSSPropertyInvalid) { | 8772 if (propId == CSSPropertyTextDecoration && !important && !inShorthand()) { |
8773 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { | 8773 for (unsigned i = 0; i < m_parsedProperties.size(); ++i) { |
8774 if (m_parsedProperties[i].id() == CSSPropertyTextDecorationLine) | 8774 if (m_parsedProperties[i].id() == CSSPropertyTextDecorationLine) |
8775 return; | 8775 return; |
8776 } | 8776 } |
8777 } | 8777 } |
8778 addProperty(propId, value, important); | 8778 addProperty(propId, value, important); |
8779 } | 8779 } |
8780 | 8780 |
8781 bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important) | 8781 bool CSSParser::parseTextDecoration(CSSPropertyID propId, bool important) |
8782 { | 8782 { |
8783 if (propId == CSSPropertyTextDecorationLine | 8783 if (propId == CSSPropertyTextDecorationLine |
8784 && !RuntimeEnabledFeatures::css3TextDecorationsEnabled()) | 8784 && !RuntimeEnabledFeatures::css3TextDecorationsEnabled()) |
8785 return false; | 8785 return false; |
8786 | 8786 |
8787 CSSParserValue* value = m_valueList->current(); | 8787 CSSParserValue* value = m_valueList->current(); |
8788 if (value->id == CSSValueNone) { | 8788 if (value && value->id == CSSValueNone) { |
Julien - ping for review
2013/07/24 20:57:28
As said on IRC, it would have been better to keep
| |
8789 addTextDecorationProperty(propId, cssValuePool().createIdentifierValue(C SSValueNone), important); | 8789 addTextDecorationProperty(propId, cssValuePool().createIdentifierValue(C SSValueNone), important); |
8790 m_valueList->next(); | 8790 m_valueList->next(); |
8791 return true; | 8791 return true; |
8792 } | 8792 } |
8793 | 8793 |
8794 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); | 8794 RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated(); |
8795 bool isValid = true; | 8795 bool isValid = true; |
8796 while (isValid && value) { | 8796 while (isValid && value) { |
8797 switch (value->id) { | 8797 switch (value->id) { |
8798 case CSSValueUnderline: | 8798 case CSSValueUnderline: |
(...skipping 2870 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11669 { | 11669 { |
11670 // The tokenizer checks for the construct of an+b. | 11670 // The tokenizer checks for the construct of an+b. |
11671 // However, since the {ident} rule precedes the {nth} rule, some of those | 11671 // However, since the {ident} rule precedes the {nth} rule, some of those |
11672 // tokens are identified as string literal. Furthermore we need to accept | 11672 // tokens are identified as string literal. Furthermore we need to accept |
11673 // "odd" and "even" which does not match to an+b. | 11673 // "odd" and "even" which does not match to an+b. |
11674 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11674 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11675 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11675 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11676 } | 11676 } |
11677 | 11677 |
11678 } | 11678 } |
OLD | NEW |