Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: third_party/WebKit/Source/core/css/cssom/StyleValue.cpp

Issue 2036893003: [CSS Typed OM] Rename StyleValue -> CSSStyleValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update more union types Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/css/cssom/StyleValue.cpp
diff --git a/third_party/WebKit/Source/core/css/cssom/StyleValue.cpp b/third_party/WebKit/Source/core/css/cssom/StyleValue.cpp
deleted file mode 100644
index b862a39d85680114d4d6e602e25969cd14c94fe7..0000000000000000000000000000000000000000
--- a/third_party/WebKit/Source/core/css/cssom/StyleValue.cpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2015 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/cssom/StyleValue.h"
-
-#include "bindings/core/v8/ExceptionState.h"
-#include "bindings/core/v8/ScriptValue.h"
-#include "bindings/core/v8/ToV8.h"
-#include "core/StylePropertyShorthand.h"
-#include "core/css/cssom/StyleValueFactory.h"
-#include "core/css/parser/CSSParser.h"
-
-namespace blink {
-
-ScriptValue StyleValue::parse(ScriptState* scriptState, const String& propertyName, const String& value, ExceptionState& exceptionState)
-{
- if (propertyName.isEmpty()) {
- exceptionState.throwTypeError("Property name cannot be empty");
- return ScriptValue::createNull(scriptState);
- }
-
- CSSPropertyID propertyID = cssPropertyID(propertyName);
- if (propertyID == CSSPropertyInvalid) {
- exceptionState.throwTypeError("Invalid property name");
- return ScriptValue::createNull(scriptState);
- }
- if (isShorthandProperty(propertyID)) {
- exceptionState.throwTypeError("Parsing shorthand properties is not supported");
- return ScriptValue::createNull(scriptState);
- }
-
- CSSValue* cssValue = CSSParser::parseSingleValue(propertyID, value, strictCSSParserContext());
- if (!cssValue)
- return ScriptValue::createNull(scriptState);
-
- StyleValue* styleValue = StyleValueFactory::create(propertyID, *cssValue);
- if (!styleValue)
- return ScriptValue::createNull(scriptState);
-
- v8::Local<v8::Value> wrappedValue = toV8(styleValue, scriptState->context()->Global(), scriptState->isolate());
- return ScriptValue(scriptState, wrappedValue);
-}
-
-} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/cssom/StyleValue.h ('k') | third_party/WebKit/Source/core/css/cssom/StyleValue.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698