Diff
Modified: trunk/Source/WebCore/ChangeLog (175453 => 175454)
--- trunk/Source/WebCore/ChangeLog 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/ChangeLog 2014-11-01 22:18:38 UTC (rev 175454)
@@ -1,3 +1,24 @@
+2014-11-01 Sam Weinig <[email protected]>
+
+ Move the -webkit-transform property to the new StyleBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=138283
+
+ Reviewed by Chris Dumez.
+
+ Move the -webkit-transform property from StyleResolver to the new
+ generated StyleBuilder. Adds a converter for TransformOperations.
+
+ * css/CSSPropertyNames.in:
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertTransform):
+ * css/StyleResolver.cpp:
+ (WebCore::StyleResolver::applyProperty):
+ * css/TransformFunctions.cpp:
+ (WebCore::transformsForValue):
+ * css/TransformFunctions.h:
+ * css/WebKitCSSMatrix.cpp:
+ (WebCore::WebKitCSSMatrix::setMatrixValue):
+
2014-11-01 Benjamin Poulain <[email protected]>
Fix the specificity of the extended :not() selector
Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (175453 => 175454)
--- trunk/Source/WebCore/css/CSSPropertyNames.in 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in 2014-11-01 22:18:38 UTC (rev 175454)
@@ -489,7 +489,7 @@
-webkit-text-stroke [Inherited]
-webkit-text-stroke-color [Inherited]
-webkit-text-stroke-width [Inherited]
--webkit-transform
+-webkit-transform [NewStyleBuilder, Converter=Transform]
-webkit-transform-origin
-webkit-transform-origin-x [NewStyleBuilder, Converter=Length]
-webkit-transform-origin-y [NewStyleBuilder, Converter=Length]
Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (175453 => 175454)
--- trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h 2014-11-01 22:18:38 UTC (rev 175454)
@@ -32,6 +32,7 @@
#include "Length.h"
#include "Pair.h"
#include "StyleResolver.h"
+#include "TransformFunctions.h"
namespace WebCore {
@@ -51,6 +52,7 @@
template <CSSPropertyID property> static NinePieceImage convertBorderImage(StyleResolver&, CSSValue&);
template <CSSPropertyID property> static NinePieceImage convertBorderMask(StyleResolver&, CSSValue&);
template <CSSPropertyID property> static PassRefPtr<StyleImage> convertBorderImageSource(StyleResolver&, CSSValue&);
+ static TransformOperations convertTransform(StyleResolver&, CSSValue&);
private:
static Length convertToRadiusLength(CSSToLengthConversionData&, CSSPrimitiveValue&);
@@ -240,6 +242,13 @@
return styleResolver.styleImage(property, &value);
}
+inline TransformOperations StyleBuilderConverter::convertTransform(StyleResolver& styleResolver, CSSValue& value)
+{
+ TransformOperations operations;
+ transformsForValue(value, styleResolver.state().cssToLengthConversionData(), operations);
+ return operations;
+}
+
} // namespace WebCore
#endif // StyleBuilderConverter_h
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (175453 => 175454)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2014-11-01 22:18:38 UTC (rev 175454)
@@ -2553,13 +2553,6 @@
state.style()->setTextStrokeWidth(width);
return;
}
- case CSSPropertyWebkitTransform: {
- HANDLE_INHERIT_AND_INITIAL(transform, Transform);
- TransformOperations operations;
- transformsForValue(value, state.cssToLengthConversionData(), operations);
- state.style()->setTransform(operations);
- return;
- }
case CSSPropertyWebkitPerspective: {
HANDLE_INHERIT_AND_INITIAL(perspective, Perspective)
Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (175453 => 175454)
--- trunk/Source/WebCore/css/TransformFunctions.cpp 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp 2014-11-01 22:18:38 UTC (rev 175454)
@@ -81,15 +81,15 @@
return primitiveValue ? primitiveValue->convertToLength<FixedFloatConversion | PercentConversion | CalculatedConversion>(conversionData) : Length(Undefined);
}
-bool transformsForValue(CSSValue* value, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
+bool transformsForValue(CSSValue& value, const CSSToLengthConversionData& conversionData, TransformOperations& outOperations)
{
- if (!value || !value->isValueList()) {
+ if (!value.isValueList()) {
outOperations.clear();
return false;
}
TransformOperations operations;
- for (CSSValueListIterator i = value; i.hasMore(); i.advance()) {
+ for (CSSValueListIterator i = &value; i.hasMore(); i.advance()) {
CSSValue& currValue = *i.value();
if (!is<WebKitCSSTransformValue>(currValue))
Modified: trunk/Source/WebCore/css/TransformFunctions.h (175453 => 175454)
--- trunk/Source/WebCore/css/TransformFunctions.h 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/TransformFunctions.h 2014-11-01 22:18:38 UTC (rev 175454)
@@ -39,7 +39,7 @@
class RenderStyle;
class WebKitCSSTransformValue;
-bool transformsForValue(CSSValue*, const CSSToLengthConversionData&, TransformOperations&);
+bool transformsForValue(CSSValue&, const CSSToLengthConversionData&, TransformOperations&);
}
#endif
Modified: trunk/Source/WebCore/css/WebKitCSSMatrix.cpp (175453 => 175454)
--- trunk/Source/WebCore/css/WebKitCSSMatrix.cpp 2014-11-01 18:11:11 UTC (rev 175453)
+++ trunk/Source/WebCore/css/WebKitCSSMatrix.cpp 2014-11-01 22:18:38 UTC (rev 175454)
@@ -67,7 +67,7 @@
return;
TransformOperations operations;
- if (!transformsForValue(value.get(), CSSToLengthConversionData(), operations)) {
+ if (!transformsForValue(*value, CSSToLengthConversionData(), operations)) {
ec = SYNTAX_ERR;
return;
}