| OLD | NEW | 
|    1 /* |    1 /* | 
|    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved. |    2  * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 
|    3  * |    3  * | 
|    4  * Redistribution and use in source and binary forms, with or without |    4  * Redistribution and use in source and binary forms, with or without | 
|    5  * modification, are permitted provided that the following conditions |    5  * modification, are permitted provided that the following conditions | 
|    6  * are met: |    6  * are met: | 
|    7  * 1. Redistributions of source code must retain the above copyright |    7  * 1. Redistributions of source code must retain the above copyright | 
|    8  *    notice, this list of conditions and the following disclaimer. |    8  *    notice, this list of conditions and the following disclaimer. | 
|    9  * 2. Redistributions in binary form must reproduce the above copyright |    9  * 2. Redistributions in binary form must reproduce the above copyright | 
|   10  *    notice, this list of conditions and the following disclaimer in the |   10  *    notice, this list of conditions and the following disclaimer in the | 
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   62     if (string.isEmpty()) |   62     if (string.isEmpty()) | 
|   63         return; |   63         return; | 
|   64  |   64  | 
|   65     // FIXME: crbug.com/154772 - should this continue to use legacy style parsin
     g? |   65     // FIXME: crbug.com/154772 - should this continue to use legacy style parsin
     g? | 
|   66     if (RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(CSSProp
     ertyWebkitTransform, string)) { |   66     if (RefPtrWillBeRawPtr<CSSValue> value = CSSParser::parseSingleValue(CSSProp
     ertyWebkitTransform, string)) { | 
|   67         // Check for a "none" transform. In these cases we can use the default i
     dentity matrix. |   67         // Check for a "none" transform. In these cases we can use the default i
     dentity matrix. | 
|   68         if (value->isPrimitiveValue() && (toCSSPrimitiveValue(value.get()))->get
     ValueID() == CSSValueNone) |   68         if (value->isPrimitiveValue() && (toCSSPrimitiveValue(value.get()))->get
     ValueID() == CSSValueNone) | 
|   69             return; |   69             return; | 
|   70  |   70  | 
|   71         // FIXME: This has a null pointer crash if we use ex units (crbug.com/41
     4145) |   71         // FIXME: This has a null pointer crash if we use ex units (crbug.com/41
     4145) | 
|   72         DEFINE_STATIC_REF(LayoutStyle, defaultStyle, LayoutStyle::createDefaultS
     tyle()); |   72         DEFINE_STATIC_REF(LayoutStyle, initialStyle, LayoutStyle::create()); | 
|   73         TransformOperations operations; |   73         TransformOperations operations; | 
|   74         if (!TransformBuilder::createTransformOperations(value.get(), CSSToLengt
     hConversionData(defaultStyle, defaultStyle, nullptr, 1.0f), operations)) { |   74         if (!TransformBuilder::createTransformOperations(value.get(), CSSToLengt
     hConversionData(initialStyle, initialStyle, nullptr, 1.0f), operations)) { | 
|   75             exceptionState.throwDOMException(SyntaxError, "Failed to interpret '
     " + string + "' as a transformation operation."); |   75             exceptionState.throwDOMException(SyntaxError, "Failed to interpret '
     " + string + "' as a transformation operation."); | 
|   76             return; |   76             return; | 
|   77         } |   77         } | 
|   78  |   78  | 
|   79         // Convert transform operations to a TransformationMatrix. This can fail |   79         // Convert transform operations to a TransformationMatrix. This can fail | 
|   80         // if a param has a percentage ('%') |   80         // if a param has a percentage ('%') | 
|   81         if (operations.dependsOnBoxSize()) |   81         if (operations.dependsOnBoxSize()) | 
|   82             exceptionState.throwDOMException(SyntaxError, "The transformation de
     pends on the box size, which is not supported."); |   82             exceptionState.throwDOMException(SyntaxError, "The transformation de
     pends on the box size, which is not supported."); | 
|   83         TransformationMatrix t; |   83         TransformationMatrix t; | 
|   84         operations.apply(FloatSize(0, 0), t); |   84         operations.apply(FloatSize(0, 0), t); | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  184     if (m_matrix.isAffine()) |  184     if (m_matrix.isAffine()) | 
|  185         return String::format("matrix(%f, %f, %f, %f, %f, %f)", m_matrix.a(), m_
     matrix.b(), m_matrix.c(), m_matrix.d(), m_matrix.e(), m_matrix.f()); |  185         return String::format("matrix(%f, %f, %f, %f, %f, %f)", m_matrix.a(), m_
     matrix.b(), m_matrix.c(), m_matrix.d(), m_matrix.e(), m_matrix.f()); | 
|  186     return String::format("matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, 
     %f, %f, %f, %f, %f)", |  186     return String::format("matrix3d(%f, %f, %f, %f, %f, %f, %f, %f, %f, %f, %f, 
     %f, %f, %f, %f, %f)", | 
|  187     m_matrix.m11(), m_matrix.m12(), m_matrix.m13(), m_matrix.m14(), |  187     m_matrix.m11(), m_matrix.m12(), m_matrix.m13(), m_matrix.m14(), | 
|  188     m_matrix.m21(), m_matrix.m22(), m_matrix.m23(), m_matrix.m24(), |  188     m_matrix.m21(), m_matrix.m22(), m_matrix.m23(), m_matrix.m24(), | 
|  189     m_matrix.m31(), m_matrix.m32(), m_matrix.m33(), m_matrix.m34(), |  189     m_matrix.m31(), m_matrix.m32(), m_matrix.m33(), m_matrix.m34(), | 
|  190     m_matrix.m41(), m_matrix.m42(), m_matrix.m43(), m_matrix.m44()); |  190     m_matrix.m41(), m_matrix.m42(), m_matrix.m43(), m_matrix.m44()); | 
|  191 } |  191 } | 
|  192  |  192  | 
|  193 } // namespace blink |  193 } // namespace blink | 
| OLD | NEW |