| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/dom/DOMMatrixReadOnly.h" | 5 #include "core/dom/DOMMatrixReadOnly.h" |
| 6 | 6 |
| 7 #include "bindings/core/v8/V8ObjectBuilder.h" | 7 #include "bindings/core/v8/V8ObjectBuilder.h" |
| 8 #include "core/css/CSSIdentifierValue.h" | 8 #include "core/css/CSSIdentifierValue.h" |
| 9 #include "core/css/CSSToLengthConversionData.h" | 9 #include "core/css/CSSToLengthConversionData.h" |
| 10 #include "core/css/CSSValueList.h" | 10 #include "core/css/CSSValueList.h" |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 if (TransformBuilder::hasRelativeLengths(toCSSValueList(*value))) { | 373 if (TransformBuilder::hasRelativeLengths(toCSSValueList(*value))) { |
| 374 exceptionState.throwDOMException(SyntaxError, | 374 exceptionState.throwDOMException(SyntaxError, |
| 375 "Lengths must be absolute, not relative"); | 375 "Lengths must be absolute, not relative"); |
| 376 return; | 376 return; |
| 377 } | 377 } |
| 378 | 378 |
| 379 const ComputedStyle& initialStyle = ComputedStyle::initialStyle(); | 379 const ComputedStyle& initialStyle = ComputedStyle::initialStyle(); |
| 380 TransformOperations operations = TransformBuilder::createTransformOperations( | 380 TransformOperations operations = TransformBuilder::createTransformOperations( |
| 381 *value, CSSToLengthConversionData(&initialStyle, &initialStyle, | 381 *value, |
| 382 LayoutViewItem(nullptr), 1.0f)); | 382 CSSToLengthConversionData(&initialStyle, &initialStyle, |
| 383 LayoutViewItem(nullptr), 1.0f)); |
| 383 | 384 |
| 384 if (operations.dependsOnBoxSize()) { | 385 if (operations.dependsOnBoxSize()) { |
| 385 exceptionState.throwDOMException( | 386 exceptionState.throwDOMException( |
| 386 SyntaxError, "Lengths must be absolute, not depend on the box size"); | 387 SyntaxError, "Lengths must be absolute, not depend on the box size"); |
| 387 return; | 388 return; |
| 388 } | 389 } |
| 389 | 390 |
| 390 m_matrix->makeIdentity(); | 391 m_matrix->makeIdentity(); |
| 391 operations.apply(FloatSize(0, 0), *m_matrix); | 392 operations.apply(FloatSize(0, 0), *m_matrix); |
| 392 | 393 |
| 393 m_is2D = !operations.has3DOperation(); | 394 m_is2D = !operations.has3DOperation(); |
| 394 | 395 |
| 395 return; | 396 return; |
| 396 } | 397 } |
| 397 | 398 |
| 398 } // namespace blink | 399 } // namespace blink |
| OLD | NEW |