| Index: third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..6a7e3d375607c77823ac0e6baa0da8f1a72c7af1
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/core/css/properties/CSSPropertyAPIShapeOutside.cpp
|
| @@ -0,0 +1,36 @@
|
| +// Copyright 2017 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "core/css/properties/CSSPropertyAPIShapeOutside.h"
|
| +
|
| +#include "core/css/CSSValueList.h"
|
| +#include "core/css/parser/CSSParserContext.h"
|
| +#include "core/css/parser/CSSPropertyParserHelpers.h"
|
| +#include "core/css/properties/CSSPropertyShapeUtil.h"
|
| +
|
| +namespace blink {
|
| +
|
| +using namespace CSSPropertyParserHelpers;
|
| +
|
| +const CSSValue* CSSPropertyAPIShapeOutside::parseSingleValue(
|
| + CSSParserTokenRange& range,
|
| + const CSSParserContext* context) {
|
| + if (CSSValue* imageValue = consumeImageOrNone(range, context))
|
| + return imageValue;
|
| + CSSValueList* list = CSSValueList::createSpaceSeparated();
|
| + if (CSSValue* boxValue = consumeShapeBox(range))
|
| + list->append(*boxValue);
|
| + if (CSSValue* shapeValue = CSSPropertyShapeUtil::consumeBasicShape(range, context)) {
|
| + list->append(*shapeValue);
|
| + if (list->length() < 2) {
|
| + if (CSSValue* boxValue = consumeShapeBox(range))
|
| + list->append(*boxValue);
|
| + }
|
| + }
|
| + if (!list->length())
|
| + return nullptr;
|
| + return list;
|
| +}
|
| +
|
| +} // namespace blink
|
|
|