Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
| diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
| index f524d8b8c694f7299213f76f673518d94f713dec..923f44ee5d67f0429641f95abbc451d35592c95b 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp |
| @@ -33,7 +33,6 @@ |
| #include "core/css/CSSContentDistributionValue.h" |
| #include "core/css/CSSCounterValue.h" |
| #include "core/css/CSSCrossfadeValue.h" |
| -#include "core/css/CSSCursorImageValue.h" |
| #include "core/css/CSSCustomIdentValue.h" |
| #include "core/css/CSSFunctionValue.h" |
| #include "core/css/CSSGridLineNamesValue.h" |
| @@ -260,7 +259,7 @@ inline PassRefPtrWillBeRawPtr<CSSCustomIdentValue> CSSPropertyParser::createPrim |
| return CSSCustomIdentValue::create(value->string); |
| } |
| -inline PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const AtomicString& rawValue, const KURL& url) |
| +/*inline*/ PassRefPtrWillBeRawPtr<CSSValue> CSSPropertyParser::createCSSImageValueWithReferrer(const AtomicString& rawValue, const KURL& url) |
|
Timothy Loh
2015/11/20 04:09:07
?
|
| { |
| RefPtrWillBeRawPtr<CSSValue> imageValue = CSSImageValue::create(rawValue, url); |
| toCSSImageValue(imageValue.get())->setReferrer(m_context.referrer()); |
| @@ -430,83 +429,6 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
| m_valueList->next(); |
| break; |
| - case CSSPropertyCursor: { |
| - // Grammar defined by CSS3 UI and modified by CSS4 images: |
| - // [ [<image> [<x> <y>]?,]* |
| - // [ auto | crosshair | default | pointer | progress | move | e-resize | ne-resize | |
| - // nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | ew-resize | |
| - // ns-resize | nesw-resize | nwse-resize | col-resize | row-resize | text | wait | help | |
| - // vertical-text | cell | context-menu | alias | copy | no-drop | not-allowed | all-scroll | |
| - // zoom-in | zoom-out | -webkit-grab | -webkit-grabbing | -webkit-zoom-in | -webkit-zoom-out ] ] | inherit |
| - RefPtrWillBeRawPtr<CSSValueList> list = nullptr; |
| - while (value) { |
| - RefPtrWillBeRawPtr<CSSValue> image = nullptr; |
| - if (value->m_unit == CSSParserValue::URI) { |
| - AtomicString uri = value->string; |
| - if (!uri.isNull()) |
| - image = createCSSImageValueWithReferrer(uri, completeURL(uri)); |
| - } else if (value->m_unit == CSSParserValue::Function && value->function->id == CSSValueWebkitImageSet) { |
| - image = parseImageSet(m_valueList); |
| - if (!image) |
| - break; |
| - } else |
| - break; |
| - |
| - Vector<int> coords; |
| - value = m_valueList->next(); |
| - while (value && validUnit(value, FNumber)) { |
| - coords.append(int(value->fValue)); |
| - value = m_valueList->next(); |
| - } |
| - bool hotSpotSpecified = false; |
| - IntPoint hotSpot(-1, -1); |
| - int nrcoords = coords.size(); |
| - if (nrcoords > 0 && nrcoords != 2) |
| - return false; |
| - if (nrcoords == 2) { |
| - hotSpotSpecified = true; |
| - hotSpot = IntPoint(coords[0], coords[1]); |
| - } |
| - |
| - if (!list) |
| - list = CSSValueList::createCommaSeparated(); |
| - |
| - if (image) |
| - list->append(CSSCursorImageValue::create(image, hotSpotSpecified, hotSpot)); |
| - |
| - if (!consumeComma(m_valueList)) |
| - return false; |
| - value = m_valueList->current(); |
| - } |
| - if (value && m_context.useCounter()) { |
| - if (value->id == CSSValueWebkitZoomIn) |
| - m_context.useCounter()->count(UseCounter::PrefixedCursorZoomIn); |
| - else if (value->id == CSSValueWebkitZoomOut) |
| - m_context.useCounter()->count(UseCounter::PrefixedCursorZoomOut); |
| - } |
| - if (list) { |
| - if (!value) |
| - return false; |
| - if (inQuirksMode() && value->id == CSSValueHand) // MSIE 5 compatibility :/ |
| - list->append(cssValuePool().createIdentifierValue(CSSValuePointer)); |
| - else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZoomOut) || value->id == CSSValueCopy || value->id == CSSValueNone) |
| - list->append(cssValuePool().createIdentifierValue(value->id)); |
| - m_valueList->next(); |
| - parsedValue = list.release(); |
| - break; |
| - } else if (value) { |
| - id = value->id; |
| - if (inQuirksMode() && value->id == CSSValueHand) { // MSIE 5 compatibility :/ |
| - id = CSSValuePointer; |
| - validPrimitive = true; |
| - } else if ((value->id >= CSSValueAuto && value->id <= CSSValueWebkitZoomOut) || value->id == CSSValueCopy || value->id == CSSValueNone) |
| - validPrimitive = true; |
| - } else { |
| - ASSERT_NOT_REACHED(); |
| - return false; |
| - } |
| - break; |
| - } |
| case CSSPropertyImageOrientation: |
| if (RuntimeEnabledFeatures::imageOrientationEnabled()) |
| validPrimitive = value->id == CSSValueFromImage || (value->unit() != CSSPrimitiveValue::UnitType::Number && validUnit(value, FAngle) && value->fValue == 0); |
| @@ -1159,6 +1081,7 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import |
| case CSSPropertyFlexGrow: |
| case CSSPropertyFlexShrink: |
| case CSSPropertyFlexFlow: |
| + case CSSPropertyCursor: |
| validPrimitive = false; |
| break; |