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 4160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4171 } | 4171 } |
4172 | 4172 |
4173 return nullptr; | 4173 return nullptr; |
4174 } | 4174 } |
4175 | 4175 |
4176 if (argument->id == CSSValueAt) { | 4176 if (argument->id == CSSValueAt) { |
4177 RefPtrWillBeRawPtr<CSSValue> centerX; | 4177 RefPtrWillBeRawPtr<CSSValue> centerX; |
4178 RefPtrWillBeRawPtr<CSSValue> centerY; | 4178 RefPtrWillBeRawPtr<CSSValue> centerY; |
4179 args->next(); // set list to start of position center | 4179 args->next(); // set list to start of position center |
4180 parseFillPosition(args, centerX, centerY); | 4180 parseFillPosition(args, centerX, centerY); |
4181 if (centerX && centerY) { | 4181 if (centerX && centerY && !args->current()) { |
4182 ASSERT(centerX->isPrimitiveValue()); | 4182 ASSERT(centerX->isPrimitiveValue()); |
4183 ASSERT(centerY->isPrimitiveValue()); | 4183 ASSERT(centerY->isPrimitiveValue()); |
4184 shape->setCenterX(toCSSPrimitiveValue(centerX.get())); | 4184 shape->setCenterX(toCSSPrimitiveValue(centerX.get())); |
4185 shape->setCenterY(toCSSPrimitiveValue(centerY.get())); | 4185 shape->setCenterY(toCSSPrimitiveValue(centerY.get())); |
4186 } else { | 4186 } else { |
4187 return nullptr; | 4187 return nullptr; |
4188 } | 4188 } |
4189 } else { | 4189 } else { |
4190 return nullptr; | 4190 return nullptr; |
4191 } | 4191 } |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4274 | 4274 |
4275 return nullptr; | 4275 return nullptr; |
4276 } | 4276 } |
4277 | 4277 |
4278 if (argument->id != CSSValueAt) | 4278 if (argument->id != CSSValueAt) |
4279 return nullptr; | 4279 return nullptr; |
4280 RefPtrWillBeRawPtr<CSSValue> centerX; | 4280 RefPtrWillBeRawPtr<CSSValue> centerX; |
4281 RefPtrWillBeRawPtr<CSSValue> centerY; | 4281 RefPtrWillBeRawPtr<CSSValue> centerY; |
4282 args->next(); // set list to start of position center | 4282 args->next(); // set list to start of position center |
4283 parseFillPosition(args, centerX, centerY); | 4283 parseFillPosition(args, centerX, centerY); |
4284 if (!centerX || !centerY) | 4284 if (!centerX || !centerY || args->current()) |
4285 return nullptr; | 4285 return nullptr; |
4286 | 4286 |
4287 ASSERT(centerX->isPrimitiveValue()); | 4287 ASSERT(centerX->isPrimitiveValue()); |
4288 ASSERT(centerY->isPrimitiveValue()); | 4288 ASSERT(centerY->isPrimitiveValue()); |
4289 shape->setCenterX(toCSSPrimitiveValue(centerX.get())); | 4289 shape->setCenterX(toCSSPrimitiveValue(centerX.get())); |
4290 shape->setCenterY(toCSSPrimitiveValue(centerY.get())); | 4290 shape->setCenterY(toCSSPrimitiveValue(centerY.get())); |
4291 } | 4291 } |
4292 | 4292 |
4293 return shape; | 4293 return shape; |
4294 } | 4294 } |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4512 shape = parseBasicShapePolygon(args); | 4512 shape = parseBasicShapePolygon(args); |
4513 else if (equalIgnoringCase(value->function->name, "inset-rectangle(")) | 4513 else if (equalIgnoringCase(value->function->name, "inset-rectangle(")) |
4514 shape = parseBasicShapeInsetRectangle(args); | 4514 shape = parseBasicShapeInsetRectangle(args); |
4515 else if (equalIgnoringCase(value->function->name, "inset(")) | 4515 else if (equalIgnoringCase(value->function->name, "inset(")) |
4516 shape = parseBasicShapeInset(args); | 4516 shape = parseBasicShapeInset(args); |
4517 | 4517 |
4518 if (!shape) | 4518 if (!shape) |
4519 return nullptr; | 4519 return nullptr; |
4520 | 4520 |
4521 m_valueList->next(); | 4521 m_valueList->next(); |
4522 | |
Bear Travis
2014/03/11 00:15:26
Small nit: extra newline added.
| |
4522 return cssValuePool().createValue(shape.release()); | 4523 return cssValuePool().createValue(shape.release()); |
4523 } | 4524 } |
4524 | 4525 |
4525 // [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-he ight' ]? 'font-family' | 4526 // [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-he ight' ]? 'font-family' |
4526 bool CSSPropertyParser::parseFont(bool important) | 4527 bool CSSPropertyParser::parseFont(bool important) |
4527 { | 4528 { |
4528 // Let's check if there is an inherit or initial somewhere in the shorthand. | 4529 // Let's check if there is an inherit or initial somewhere in the shorthand. |
4529 for (unsigned i = 0; i < m_valueList->size(); ++i) { | 4530 for (unsigned i = 0; i < m_valueList->size(); ++i) { |
4530 if (m_valueList->valueAt(i)->id == CSSValueInherit || m_valueList->value At(i)->id == CSSValueInitial) | 4531 if (m_valueList->valueAt(i)->id == CSSValueInherit || m_valueList->value At(i)->id == CSSValueInitial) |
4531 return false; | 4532 return false; |
(...skipping 3921 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 |