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

Side by Side Diff: third_party/WebKit/Source/core/css/cssom/TranslationTransformComponent.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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/TranslationTransformComponent.h" 5 #include "core/css/cssom/TranslationTransformComponent.h"
6 6
7 #include "bindings/core/v8/ExceptionState.h" 7 #include "bindings/core/v8/ExceptionState.h"
8 #include "core/css/CSSPrimitiveValue.h" 8 #include "core/css/CSSPrimitiveValue.h"
9 #include "core/css/CSSValuePool.h" 9 #include "core/css/CSSValuePool.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 TranslationTransformComponent* TranslationTransformComponent::create(LengthValue * x, LengthValue* y, LengthValue* z, ExceptionState& exceptionState) 13 TranslationTransformComponent* TranslationTransformComponent::create(LengthValue * x, LengthValue* y, LengthValue* z, ExceptionState& exceptionState)
14 { 14 {
15 if (z->containsPercent()) { 15 if (z->containsPercent()) {
16 exceptionState.throwTypeError("TranslationTransformComponent does not su pport z LengthValue with percent units"); 16 exceptionState.throwTypeError("TranslationTransformComponent does not su pport z LengthValue with percent units");
17 return nullptr; 17 return nullptr;
18 } 18 }
19 return new TranslationTransformComponent(x, y, z); 19 return new TranslationTransformComponent(x, y, z);
20 } 20 }
21 21
22 RawPtr<CSSFunctionValue> TranslationTransformComponent::toCSSValue() const 22 CSSFunctionValue* TranslationTransformComponent::toCSSValue() const
23 { 23 {
24 RawPtr<CSSFunctionValue> result = CSSFunctionValue::create(is2D() ? CSSValue Translate : CSSValueTranslate3d); 24 CSSFunctionValue* result = CSSFunctionValue::create(is2D() ? CSSValueTransla te : CSSValueTranslate3d);
25 result->append(m_x->toCSSValue()); 25 result->append(m_x->toCSSValue());
26 result->append(m_y->toCSSValue()); 26 result->append(m_y->toCSSValue());
27 if (!is2D()) 27 if (!is2D())
28 result->append(m_z->toCSSValue()); 28 result->append(m_z->toCSSValue());
29 return result.release(); 29 return result;
30 } 30 }
31 31
32 } // namespace blink 32 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698