| 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/CSSTransformValue.h" | 5 #include "core/css/cssom/CSSTransformValue.h" |
| 6 | 6 |
| 7 #include "core/css/CSSValueList.h" | 7 #include "core/css/CSSValueList.h" |
| 8 #include "core/css/cssom/CSSTransformComponent.h" | 8 #include "core/css/cssom/CSSTransformComponent.h" |
| 9 | 9 |
| 10 namespace blink { | 10 namespace blink { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 } | 56 } |
| 57 | 57 |
| 58 ValueIterable<CSSTransformComponent*>::IterationSource* CSSTransformValue::start
Iteration(ScriptState*, ExceptionState&) | 58 ValueIterable<CSSTransformComponent*>::IterationSource* CSSTransformValue::start
Iteration(ScriptState*, ExceptionState&) |
| 59 { | 59 { |
| 60 return new TransformValueIterationSource(this); | 60 return new TransformValueIterationSource(this); |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool CSSTransformValue::is2D() const | 63 bool CSSTransformValue::is2D() const |
| 64 { | 64 { |
| 65 for (size_t i = 0; i < m_transformComponents.size(); i++) { | 65 for (size_t i = 0; i < m_transformComponents.size(); i++) { |
| 66 if (!m_transformComponents[i]->is2DComponent()) { | 66 if (!m_transformComponents[i]->is2D()) { |
| 67 return false; | 67 return false; |
| 68 } | 68 } |
| 69 } | 69 } |
| 70 return true; | 70 return true; |
| 71 } | 71 } |
| 72 | 72 |
| 73 CSSValue* CSSTransformValue::toCSSValue() const | 73 CSSValue* CSSTransformValue::toCSSValue() const |
| 74 { | 74 { |
| 75 CSSValueList* transformCSSValue = CSSValueList::createSpaceSeparated(); | 75 CSSValueList* transformCSSValue = CSSValueList::createSpaceSeparated(); |
| 76 for (size_t i = 0; i < m_transformComponents.size(); i++) { | 76 for (size_t i = 0; i < m_transformComponents.size(); i++) { |
| 77 transformCSSValue->append(*m_transformComponents[i]->toCSSValue()); | 77 transformCSSValue->append(*m_transformComponents[i]->toCSSValue()); |
| 78 } | 78 } |
| 79 return transformCSSValue; | 79 return transformCSSValue; |
| 80 } | 80 } |
| 81 | 81 |
| 82 } // namespace blink | 82 } // namespace blink |
| OLD | NEW |