| 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) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. | 5 * Copyright (C) 2009 - 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserve
d. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 | 283 |
| 284 bool parseFontFaceSrcURI(CSSValueList*); | 284 bool parseFontFaceSrcURI(CSSValueList*); |
| 285 bool parseFontFaceSrcLocal(CSSValueList*); | 285 bool parseFontFaceSrcLocal(CSSValueList*); |
| 286 | 286 |
| 287 enum PropertyType { | 287 enum PropertyType { |
| 288 PropertyExplicit, | 288 PropertyExplicit, |
| 289 PropertyImplicit | 289 PropertyImplicit |
| 290 }; | 290 }; |
| 291 | 291 |
| 292 class ImplicitScope { | 292 class ImplicitScope { |
| 293 STACK_ALLOCATED(); |
| 293 WTF_MAKE_NONCOPYABLE(ImplicitScope); | 294 WTF_MAKE_NONCOPYABLE(ImplicitScope); |
| 294 public: | 295 public: |
| 295 ImplicitScope(CSSPropertyParser* parser, PropertyType propertyType) | 296 ImplicitScope(CSSPropertyParser* parser, PropertyType propertyType) |
| 296 : m_parser(parser) | 297 : m_parser(parser) |
| 297 { | 298 { |
| 298 m_parser->m_implicitShorthand = propertyType == CSSPropertyParser::P
ropertyImplicit; | 299 m_parser->m_implicitShorthand = propertyType == CSSPropertyParser::P
ropertyImplicit; |
| 299 } | 300 } |
| 300 | 301 |
| 301 ~ImplicitScope() | 302 ~ImplicitScope() |
| 302 { | 303 { |
| 303 m_parser->m_implicitShorthand = false; | 304 m_parser->m_implicitShorthand = false; |
| 304 } | 305 } |
| 305 | 306 |
| 306 private: | 307 private: |
| 307 CSSPropertyParser* m_parser; | 308 CSSPropertyParser* m_parser; |
| 308 }; | 309 }; |
| 309 | 310 |
| 310 // FIXME: MSVC doesn't like ShorthandScope being private | |
| 311 // since ~OwnPtr can't access its destructor if non-inlined. | |
| 312 public: | |
| 313 class ShorthandScope { | 311 class ShorthandScope { |
| 314 WTF_MAKE_FAST_ALLOCATED; | 312 STACK_ALLOCATED(); |
| 315 public: | 313 public: |
| 316 ShorthandScope(CSSPropertyParser* parser, CSSPropertyID propId) : m_pars
er(parser) | 314 ShorthandScope(CSSPropertyParser* parser, CSSPropertyID propId) : m_pars
er(parser) |
| 317 { | 315 { |
| 318 if (!(m_parser->m_inParseShorthand++)) | 316 if (!(m_parser->m_inParseShorthand++)) |
| 319 m_parser->m_currentShorthand = propId; | 317 m_parser->m_currentShorthand = propId; |
| 320 } | 318 } |
| 321 ~ShorthandScope() | 319 ~ShorthandScope() |
| 322 { | 320 { |
| 323 if (!(--m_parser->m_inParseShorthand)) | 321 if (!(--m_parser->m_inParseShorthand)) |
| 324 m_parser->m_currentShorthand = CSSPropertyInvalid; | 322 m_parser->m_currentShorthand = CSSPropertyInvalid; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 CSSPropertyID cssPropertyID(const CSSParserString&); | 396 CSSPropertyID cssPropertyID(const CSSParserString&); |
| 399 CSSPropertyID cssPropertyID(const String&); | 397 CSSPropertyID cssPropertyID(const String&); |
| 400 CSSValueID cssValueKeywordID(const CSSParserString&); | 398 CSSValueID cssValueKeywordID(const CSSParserString&); |
| 401 | 399 |
| 402 bool isKeywordPropertyID(CSSPropertyID); | 400 bool isKeywordPropertyID(CSSPropertyID); |
| 403 bool isValidKeywordPropertyAndValue(CSSPropertyID, int valueID, const CSSParserC
ontext&); | 401 bool isValidKeywordPropertyAndValue(CSSPropertyID, int valueID, const CSSParserC
ontext&); |
| 404 | 402 |
| 405 } // namespace WebCore | 403 } // namespace WebCore |
| 406 | 404 |
| 407 #endif // CSSPropertyParser_h | 405 #endif // CSSPropertyParser_h |
| OLD | NEW |