| 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 402 return cssValuePool().createIdentifierValue(identifier); | 402 return cssValuePool().createIdentifierValue(identifier); |
| 403 if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->unit() <=
CSSPrimitiveValue::UnitType::Kilohertz) | 403 if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->unit() <=
CSSPrimitiveValue::UnitType::Kilohertz) |
| 404 return createPrimitiveNumericValue(value); | 404 return createPrimitiveNumericValue(value); |
| 405 if (value->unit() >= CSSPrimitiveValue::UnitType::Turns && value->unit() <=
CSSPrimitiveValue::UnitType::Chs) | 405 if (value->unit() >= CSSPrimitiveValue::UnitType::Turns && value->unit() <=
CSSPrimitiveValue::UnitType::Chs) |
| 406 return createPrimitiveNumericValue(value); | 406 return createPrimitiveNumericValue(value); |
| 407 if (value->unit() >= CSSPrimitiveValue::UnitType::ViewportWidth && value->un
it() <= CSSPrimitiveValue::UnitType::ViewportMax) | 407 if (value->unit() >= CSSPrimitiveValue::UnitType::ViewportWidth && value->un
it() <= CSSPrimitiveValue::UnitType::ViewportMax) |
| 408 return createPrimitiveNumericValue(value); | 408 return createPrimitiveNumericValue(value); |
| 409 if (value->unit() >= CSSPrimitiveValue::UnitType::DotsPerPixel && value->uni
t() <= CSSPrimitiveValue::UnitType::DotsPerCentimeter) | 409 if (value->unit() >= CSSPrimitiveValue::UnitType::DotsPerPixel && value->uni
t() <= CSSPrimitiveValue::UnitType::DotsPerCentimeter) |
| 410 return createPrimitiveNumericValue(value); | 410 return createPrimitiveNumericValue(value); |
| 411 if (value->unit() == CSSPrimitiveValue::UnitType::QuirkyEms) | 411 if (value->unit() == CSSPrimitiveValue::UnitType::QuirkyEms) |
| 412 return CSSPrimitiveValue::createAllowingMarginQuirk(value->fValue, CSSPr
imitiveValue::UnitType::Ems); | 412 return CSSPrimitiveValue::create(value->fValue, CSSPrimitiveValue::UnitT
ype::QuirkyEms); |
| 413 if (isCalculation(value)) | 413 if (isCalculation(value)) |
| 414 return CSSPrimitiveValue::create(m_parsedCalculation.release()); | 414 return CSSPrimitiveValue::create(m_parsedCalculation.release()); |
| 415 | 415 |
| 416 return nullptr; | 416 return nullptr; |
| 417 } | 417 } |
| 418 | 418 |
| 419 void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRe
fPtrWillBeRawPtr<CSSValue> prpValue, bool important) | 419 void CSSPropertyParser::addExpandedPropertyForValue(CSSPropertyID propId, PassRe
fPtrWillBeRawPtr<CSSValue> prpValue, bool important) |
| 420 { | 420 { |
| 421 const StylePropertyShorthand& shorthand = shorthandForProperty(propId); | 421 const StylePropertyShorthand& shorthand = shorthandForProperty(propId); |
| 422 unsigned shorthandLength = shorthand.length(); | 422 unsigned shorthandLength = shorthand.length(); |
| (...skipping 7333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7756 if (validPrimitive) { | 7756 if (validPrimitive) { |
| 7757 if (id) | 7757 if (id) |
| 7758 parsedValue = CSSPrimitiveValue::createIdentifier(id); | 7758 parsedValue = CSSPrimitiveValue::createIdentifier(id); |
| 7759 else if (value->unit() == CSSPrimitiveValue::UnitType::String) | 7759 else if (value->unit() == CSSPrimitiveValue::UnitType::String) |
| 7760 parsedValue = CSSPrimitiveValue::create(value->string, value->unit()
); | 7760 parsedValue = CSSPrimitiveValue::create(value->string, value->unit()
); |
| 7761 else if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->
unit() <= CSSPrimitiveValue::UnitType::Kilohertz) | 7761 else if (value->unit() >= CSSPrimitiveValue::UnitType::Number && value->
unit() <= CSSPrimitiveValue::UnitType::Kilohertz) |
| 7762 parsedValue = CSSPrimitiveValue::create(value->fValue, value->unit()
); | 7762 parsedValue = CSSPrimitiveValue::create(value->fValue, value->unit()
); |
| 7763 else if (value->unit() == CSSPrimitiveValue::UnitType::Rems || value->un
it() == CSSPrimitiveValue::UnitType::Chs) | 7763 else if (value->unit() == CSSPrimitiveValue::UnitType::Rems || value->un
it() == CSSPrimitiveValue::UnitType::Chs) |
| 7764 parsedValue = CSSPrimitiveValue::create(value->fValue, value->unit()
); | 7764 parsedValue = CSSPrimitiveValue::create(value->fValue, value->unit()
); |
| 7765 else if (value->unit() == CSSPrimitiveValue::UnitType::QuirkyEms) | 7765 else if (value->unit() == CSSPrimitiveValue::UnitType::QuirkyEms) |
| 7766 parsedValue = CSSPrimitiveValue::createAllowingMarginQuirk(value->fV
alue, CSSPrimitiveValue::UnitType::Ems); | 7766 parsedValue = CSSPrimitiveValue::create(value->fValue, CSSPrimitiveV
alue::UnitType::QuirkyEms); |
| 7767 if (isCalculation(value)) { | 7767 if (isCalculation(value)) { |
| 7768 // FIXME calc() http://webkit.org/b/16662 : actually create a CSSPri
mitiveValue here, ie | 7768 // FIXME calc() http://webkit.org/b/16662 : actually create a CSSPri
mitiveValue here, ie |
| 7769 // parsedValue = CSSPrimitiveValue::create(m_parsedCalculation.relea
se()); | 7769 // parsedValue = CSSPrimitiveValue::create(m_parsedCalculation.relea
se()); |
| 7770 m_parsedCalculation.release(); | 7770 m_parsedCalculation.release(); |
| 7771 parsedValue = nullptr; | 7771 parsedValue = nullptr; |
| 7772 } | 7772 } |
| 7773 m_valueList->next(); | 7773 m_valueList->next(); |
| 7774 } | 7774 } |
| 7775 if (!parsedValue || (m_valueList->current() && !inShorthand())) | 7775 if (!parsedValue || (m_valueList->current() && !inShorthand())) |
| 7776 return false; | 7776 return false; |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8094 } | 8094 } |
| 8095 } | 8095 } |
| 8096 | 8096 |
| 8097 if (!list->length()) | 8097 if (!list->length()) |
| 8098 return nullptr; | 8098 return nullptr; |
| 8099 | 8099 |
| 8100 return list.release(); | 8100 return list.release(); |
| 8101 } | 8101 } |
| 8102 | 8102 |
| 8103 } // namespace blink | 8103 } // namespace blink |
| OLD | NEW |