OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/css/cssom/PerspectiveTransformComponent.h" | 5 #include "core/css/cssom/PerspectiveTransformComponent.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionState.h" | 7 #include "bindings/core/v8/ExceptionState.h" |
8 | 8 |
9 namespace blink { | 9 namespace blink { |
10 | 10 |
11 PerspectiveTransformComponent* PerspectiveTransformComponent::create(const Lengt
hValue* length, ExceptionState& exceptionState) | 11 PerspectiveTransformComponent* PerspectiveTransformComponent::create(const Lengt
hValue* length, ExceptionState& exceptionState) |
12 { | 12 { |
13 if (length->containsPercent()) { | 13 if (length->containsPercent()) { |
14 exceptionState.throwTypeError("PerspectiveTransformComponent does not su
pport LengthValues with percent units"); | 14 exceptionState.throwTypeError("PerspectiveTransformComponent does not su
pport LengthValues with percent units"); |
15 return nullptr; | 15 return nullptr; |
16 } | 16 } |
17 return new PerspectiveTransformComponent(length); | 17 return new PerspectiveTransformComponent(length); |
18 } | 18 } |
19 | 19 |
20 RawPtr<CSSFunctionValue> PerspectiveTransformComponent::toCSSValue() const | 20 CSSFunctionValue* PerspectiveTransformComponent::toCSSValue() const |
21 { | 21 { |
22 RawPtr<CSSFunctionValue> result = CSSFunctionValue::create(CSSValuePerspecti
ve); | 22 CSSFunctionValue* result = CSSFunctionValue::create(CSSValuePerspective); |
23 result->append(m_length->toCSSValue()); | 23 result->append(m_length->toCSSValue()); |
24 return result.release(); | 24 return result; |
25 } | 25 } |
26 | 26 |
27 } // namespace blink | 27 } // namespace blink |
OLD | NEW |