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 5444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5455 } else | 5455 } else |
5456 return false; | 5456 return false; |
5457 } | 5457 } |
5458 | 5458 |
5459 return true; | 5459 return true; |
5460 } | 5460 } |
5461 | 5461 |
5462 // This class tracks parsing state for shadow values. If it goes out of scope (
e.g., due to an early return) | 5462 // This class tracks parsing state for shadow values. If it goes out of scope (
e.g., due to an early return) |
5463 // without the allowBreak bit being set, then it will clean up all of the object
s and destroy them. | 5463 // without the allowBreak bit being set, then it will clean up all of the object
s and destroy them. |
5464 class ShadowParseContext { | 5464 class ShadowParseContext { |
5465 DISALLOW_ALLOCATION(); | 5465 STACK_ALLOCATED(); |
5466 public: | 5466 public: |
5467 ShadowParseContext(CSSPropertyID prop, CSSPropertyParser* parser) | 5467 ShadowParseContext(CSSPropertyID prop, CSSPropertyParser* parser) |
5468 : property(prop) | 5468 : property(prop) |
5469 , m_parser(parser) | 5469 , m_parser(parser) |
5470 , allowX(true) | 5470 , allowX(true) |
5471 , allowY(false) | 5471 , allowY(false) |
5472 , allowBlur(false) | 5472 , allowBlur(false) |
5473 , allowSpread(false) | 5473 , allowSpread(false) |
5474 , allowColor(true) | 5474 , allowColor(true) |
5475 , allowStyle(prop == CSSPropertyWebkitBoxShadow || prop == CSSPropertyBo
xShadow) | 5475 , allowStyle(prop == CSSPropertyWebkitBoxShadow || prop == CSSPropertyBo
xShadow) |
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6005 secondValue = firstValue; | 6005 secondValue = firstValue; |
6006 } | 6006 } |
6007 } else | 6007 } else |
6008 secondValue = firstValue; | 6008 secondValue = firstValue; |
6009 | 6009 |
6010 result = createPrimitiveValuePair(firstValue, secondValue); | 6010 result = createPrimitiveValuePair(firstValue, secondValue); |
6011 return true; | 6011 return true; |
6012 } | 6012 } |
6013 | 6013 |
6014 class BorderImageSliceParseContext { | 6014 class BorderImageSliceParseContext { |
6015 DISALLOW_ALLOCATION(); | 6015 STACK_ALLOCATED(); |
6016 public: | 6016 public: |
6017 BorderImageSliceParseContext(CSSPropertyParser* parser) | 6017 BorderImageSliceParseContext(CSSPropertyParser* parser) |
6018 : m_parser(parser) | 6018 : m_parser(parser) |
6019 , m_allowNumber(true) | 6019 , m_allowNumber(true) |
6020 , m_allowFill(true) | 6020 , m_allowFill(true) |
6021 , m_allowFinalCommit(false) | 6021 , m_allowFinalCommit(false) |
6022 , m_fill(false) | 6022 , m_fill(false) |
6023 { } | 6023 { } |
6024 | 6024 |
6025 bool allowNumber() const { return m_allowNumber; } | 6025 bool allowNumber() const { return m_allowNumber; } |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6120 | 6120 |
6121 // Need to fully commit as a single value. | 6121 // Need to fully commit as a single value. |
6122 result = context.commitBorderImageSlice(); | 6122 result = context.commitBorderImageSlice(); |
6123 return true; | 6123 return true; |
6124 } | 6124 } |
6125 | 6125 |
6126 return false; | 6126 return false; |
6127 } | 6127 } |
6128 | 6128 |
6129 class BorderImageQuadParseContext { | 6129 class BorderImageQuadParseContext { |
| 6130 STACK_ALLOCATED(); |
6130 public: | 6131 public: |
6131 BorderImageQuadParseContext(CSSPropertyParser* parser) | 6132 BorderImageQuadParseContext(CSSPropertyParser* parser) |
6132 : m_parser(parser) | 6133 : m_parser(parser) |
6133 , m_allowNumber(true) | 6134 , m_allowNumber(true) |
6134 , m_allowFinalCommit(false) | 6135 , m_allowFinalCommit(false) |
6135 { } | 6136 { } |
6136 | 6137 |
6137 bool allowNumber() const { return m_allowNumber; } | 6138 bool allowNumber() const { return m_allowNumber; } |
6138 bool allowFinalCommit() const { return m_allowFinalCommit; } | 6139 bool allowFinalCommit() const { return m_allowFinalCommit; } |
6139 CSSPrimitiveValue* top() const { return m_top.get(); } | 6140 CSSPrimitiveValue* top() const { return m_top.get(); } |
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8453 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); | 8454 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueFill)); |
8454 if (!seenStroke) | 8455 if (!seenStroke) |
8455 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); | 8456 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueStroke)
); |
8456 if (!seenMarkers) | 8457 if (!seenMarkers) |
8457 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); | 8458 parsedValues->append(CSSPrimitiveValue::createIdentifier(CSSValueMarkers
)); |
8458 | 8459 |
8459 return parsedValues.release(); | 8460 return parsedValues.release(); |
8460 } | 8461 } |
8461 | 8462 |
8462 } // namespace WebCore | 8463 } // namespace WebCore |
OLD | NEW |