| 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 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1802 if (a->unit != CSSPrimitiveValue::CSS_IDENT) | 1802 if (a->unit != CSSPrimitiveValue::CSS_IDENT) |
| 1803 return nullptr; | 1803 return nullptr; |
| 1804 | 1804 |
| 1805 String attrName = a->string; | 1805 String attrName = a->string; |
| 1806 // CSS allows identifiers with "-" at the start, like "-webkit-mask-image". | 1806 // CSS allows identifiers with "-" at the start, like "-webkit-mask-image". |
| 1807 // But HTML attribute names can't have those characters, and we should not | 1807 // But HTML attribute names can't have those characters, and we should not |
| 1808 // even parse them inside attr(). | 1808 // even parse them inside attr(). |
| 1809 if (attrName[0] == '-') | 1809 if (attrName[0] == '-') |
| 1810 return nullptr; | 1810 return nullptr; |
| 1811 | 1811 |
| 1812 if (m_context.isHTMLDocument()) | |
| 1813 attrName = attrName.lower(); | |
| 1814 | |
| 1815 return cssValuePool().createValue(attrName, CSSPrimitiveValue::CSS_ATTR); | 1812 return cssValuePool().createValue(attrName, CSSPrimitiveValue::CSS_ATTR); |
| 1816 } | 1813 } |
| 1817 | 1814 |
| 1818 PassRefPtr<CSSValue> CSSPropertyParser::parseBackgroundColor() | 1815 PassRefPtr<CSSValue> CSSPropertyParser::parseBackgroundColor() |
| 1819 { | 1816 { |
| 1820 CSSValueID id = m_valueList->current()->id; | 1817 CSSValueID id = m_valueList->current()->id; |
| 1821 if (id == CSSValueCurrentcolor) | 1818 if (id == CSSValueCurrentcolor) |
| 1822 return cssValuePool().createIdentifierValue(id); | 1819 return cssValuePool().createIdentifierValue(id); |
| 1823 return parseColor(); | 1820 return parseColor(); |
| 1824 } | 1821 } |
| (...skipping 4307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6132 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 6129 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 6133 } | 6130 } |
| 6134 | 6131 |
| 6135 bool CSSPropertyParser::isSystemColor(int id) | 6132 bool CSSPropertyParser::isSystemColor(int id) |
| 6136 { | 6133 { |
| 6137 // FIXME(sky): remove | 6134 // FIXME(sky): remove |
| 6138 return false; | 6135 return false; |
| 6139 } | 6136 } |
| 6140 | 6137 |
| 6141 } // namespace blink | 6138 } // namespace blink |
| OLD | NEW |