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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "core/css/CSSValuePool.h" | 48 #include "core/css/CSSValuePool.h" |
49 #include "core/css/CSSVariableReferenceValue.h" | 49 #include "core/css/CSSVariableReferenceValue.h" |
50 #include "core/css/parser/CSSParserFastPaths.h" | 50 #include "core/css/parser/CSSParserFastPaths.h" |
51 #include "core/css/parser/CSSParserValues.h" | 51 #include "core/css/parser/CSSParserValues.h" |
52 #include "core/frame/UseCounter.h" | 52 #include "core/frame/UseCounter.h" |
53 #include "core/style/GridCoordinate.h" | 53 #include "core/style/GridCoordinate.h" |
54 #include "platform/RuntimeEnabledFeatures.h" | 54 #include "platform/RuntimeEnabledFeatures.h" |
55 | 55 |
56 namespace blink { | 56 namespace blink { |
57 | 57 |
58 template <unsigned N> | |
59 static bool equalIgnoringCase(const CSSParserString& a, const char (&b)[N]) | |
60 { | |
61 unsigned length = N - 1; // Ignore the trailing null character | |
62 if (a.length() != length) | |
63 return false; | |
64 | |
65 return a.is8Bit() ? WTF::equalIgnoringCase(b, a.characters8(), length) : WTF
::equalIgnoringCase(b, a.characters16(), length); | |
66 } | |
67 | |
68 void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr
<CSSValue> value, bool important, bool implicit) | 58 void CSSPropertyParser::addProperty(CSSPropertyID propId, PassRefPtrWillBeRawPtr
<CSSValue> value, bool important, bool implicit) |
69 { | 59 { |
70 ASSERT(!isPropertyAlias(propId)); | 60 ASSERT(!isPropertyAlias(propId)); |
71 | 61 |
72 int shorthandIndex = 0; | 62 int shorthandIndex = 0; |
73 bool setFromShorthand = false; | 63 bool setFromShorthand = false; |
74 | 64 |
75 if (m_currentShorthand) { | 65 if (m_currentShorthand) { |
76 Vector<StylePropertyShorthand, 4> shorthands; | 66 Vector<StylePropertyShorthand, 4> shorthands; |
77 getMatchingShorthandsForLonghand(propId, &shorthands); | 67 getMatchingShorthandsForLonghand(propId, &shorthands); |
(...skipping 4137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4215 ASSERT(!m_parsedCalculation); | 4205 ASSERT(!m_parsedCalculation); |
4216 m_parsedCalculation = CSSCalcValue::create(args, range); | 4206 m_parsedCalculation = CSSCalcValue::create(args, range); |
4217 | 4207 |
4218 if (!m_parsedCalculation) | 4208 if (!m_parsedCalculation) |
4219 return false; | 4209 return false; |
4220 | 4210 |
4221 return true; | 4211 return true; |
4222 } | 4212 } |
4223 | 4213 |
4224 } // namespace blink | 4214 } // namespace blink |
OLD | NEW |