Chromium Code Reviews| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier); | 307 ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier); |
| 308 return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType ::String); | 308 return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType ::String); |
| 309 } | 309 } |
| 310 | 310 |
| 311 inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimit iveCustomIdentValue(CSSParserValue* value) | 311 inline PassRefPtrWillBeRawPtr<CSSPrimitiveValue> CSSPropertyParser::createPrimit iveCustomIdentValue(CSSParserValue* value) |
| 312 { | 312 { |
| 313 ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier); | 313 ASSERT(value->unit() == CSSPrimitiveValue::UnitType::String || value->m_unit == CSSParserValue::Identifier); |
| 314 return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType ::CustomIdentifier); | 314 return cssValuePool().createValue(value->string, CSSPrimitiveValue::UnitType ::CustomIdentifier); |
| 315 } | 315 } |
| 316 | 316 |
| 317 inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWi thReferrer(const String& rawValue, const KURL& url) | 317 inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWi thReferrer(const AtomicString& rawValue, const KURL& url) |
| 318 { | 318 { |
| 319 RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, ur l); | 319 RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, ur l); |
| 320 toCSSImageValue(imageValue.get())->setReferrer(m_context.referrer()); | 320 toCSSImageValue(imageValue.get())->setReferrer(m_context.referrer()); |
| 321 return imageValue; | 321 return imageValue; |
| 322 } | 322 } |
| 323 | 323 |
| 324 static inline bool isComma(CSSParserValue* value) | 324 static inline bool isComma(CSSParserValue* value) |
| 325 { | 325 { |
| 326 ASSERT(value); | 326 ASSERT(value); |
| 327 return value->m_unit == CSSParserValue::Operator && value->iValue == ','; | 327 return value->m_unit == CSSParserValue::Operator && value->iValue == ','; |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 584 // [ [<image> [<x> <y>]?,]* | 584 // [ [<image> [<x> <y>]?,]* |
| 585 // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize | | 585 // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize | |
| 586 // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize | | 586 // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize | |
| 587 // ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | tex t | wait | help | | 587 // ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | tex t | wait | help | |
| 588 // vertical-text | cell | context-menu | alias | copy | no-drop | not-al lowed | all-scroll | | 588 // vertical-text | cell | context-menu | alias | copy | no-drop | not-al lowed | all-scroll | |
| 589 // zoom-in | zoom-out | -webkit-grab | -webkit-grabbing | -webkit-zoom-i n | -webkit-zoom-out ] ] | inherit | 589 // zoom-in | zoom-out | -webkit-grab | -webkit-grabbing | -webkit-zoom-i n | -webkit-zoom-out ] ] | inherit |
| 590 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; | 590 RefPtrWillBeRawPtr<CSSValueList> list = nullptr; |
| 591 while (value) { | 591 while (value) { |
| 592 RefPtrWillBeRawPtr<CSSValue> image = nullptr; | 592 RefPtrWillBeRawPtr<CSSValue> image = nullptr; |
| 593 if (value->unit() == CSSPrimitiveValue::UnitType::URI) { | 593 if (value->unit() == CSSPrimitiveValue::UnitType::URI) { |
| 594 String uri = value->string; | 594 String uri = value->string; |
|
Timothy Loh
2015/09/18 01:52:30
I think this line does a conversion, might as well
hajimehoshi
2015/09/18 04:23:08
Done.
| |
| 595 if (!uri.isNull()) | 595 if (!uri.isNull()) |
| 596 image = createCSSImageValueWithReferrer(uri, completeURL(uri )); | 596 image = createCSSImageValueWithReferrer(AtomicString(uri), c ompleteURL(uri)); |
| 597 } else if (value->m_unit == CSSParserValue::Function && value->funct ion->id == CSSValueWebkitImageSet) { | 597 } else if (value->m_unit == CSSParserValue::Function && value->funct ion->id == CSSValueWebkitImageSet) { |
| 598 image = parseImageSet(m_valueList); | 598 image = parseImageSet(m_valueList); |
| 599 if (!image) | 599 if (!image) |
| 600 break; | 600 break; |
| 601 } else | 601 } else |
| 602 break; | 602 break; |
| 603 | 603 |
| 604 Vector<int> coords; | 604 Vector<int> coords; |
| 605 value = m_valueList->next(); | 605 value = m_valueList->next(); |
| 606 while (value && validUnit(value, FNumber)) { | 606 while (value && validUnit(value, FNumber)) { |
| (...skipping 7487 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 |