Diff
Modified: trunk/LayoutTests/ChangeLog (209804 => 209805)
--- trunk/LayoutTests/ChangeLog 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/ChangeLog 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,3 +1,20 @@
+2016-12-14 Dave Hyatt <[email protected]>
+
+ [CSS Parser] Remove WebkitCSSTransformValue
+ https://bugs.webkit.org/show_bug.cgi?id=165844
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/css/getFloatValueForUnit-expected.txt:
+ * fast/css/getFloatValueForUnit.html:
+ * platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt:
+ * platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt:
+ * platform/mac/fast/dom/wrapper-classes-objc-expected.txt:
+ * platform/mac/fast/dom/wrapper-classes-objc.html:
+ * platform/mac/js/dom/global-constructors-attributes-expected.txt:
+ * transforms/2d/transform-value-types-expected.txt:
+ * transforms/2d/transform-value-types.html:
+
2016-12-14 Yusuke Suzuki <[email protected]>
Unreviewed, LayoutTest http/tests/misc/module-script-async.html is a flaky timeout
Modified: trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt (209804 => 209805)
--- trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/fast/css/getFloatValueForUnit-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -10,10 +10,6 @@
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_PC) is 0.833333
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_PX) is 13.333333
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_NUMBER) is 13.333333
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_DEG) is 90
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_RAD) is 1.570796
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_GRAD) is 100
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_NUMBER) is 90
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_MS) is 200
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_S) is 0.2
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER) is 200
@@ -22,11 +18,6 @@
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_HZ) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_DEG) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
PASS getFloatValue('font-size', CSSPrimitiveValue.CSS_RGBCOLOR) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_PERCENTAGE) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_PX) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_MS) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_HZ) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
-PASS getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_RGBCOLOR) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PERCENTAGE) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PX) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
PASS getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_DEG) threw exception InvalidAccessError (DOM Exception 15): The object does not support the operation or argument..
Modified: trunk/LayoutTests/fast/css/getFloatValueForUnit.html (209804 => 209805)
--- trunk/LayoutTests/fast/css/getFloatValueForUnit.html 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/fast/css/getFloatValueForUnit.html 2016-12-14 16:34:48 UTC (rev 209805)
@@ -32,10 +32,6 @@
shouldBe("getFloatValue('font-size', CSSPrimitiveValue.CSS_PC)", "0.833333");
shouldBe("getFloatValue('font-size', CSSPrimitiveValue.CSS_PX)", "13.333333");
shouldBe("getFloatValue('font-size', CSSPrimitiveValue.CSS_NUMBER)", "13.333333");
-shouldBe("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_DEG)", "90");
-shouldBe("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_RAD)", "1.570796");
-shouldBe("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_GRAD)", "100");
-shouldBe("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_NUMBER)", "90");
shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_MS)", "200");
shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_S)", "0.2");
shouldBe("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_NUMBER)", "200");
@@ -46,12 +42,6 @@
shouldThrow("getFloatValue('font-size', CSSPrimitiveValue.CSS_DEG)", "invalidAccessError");
shouldThrow("getFloatValue('font-size', CSSPrimitiveValue.CSS_RGBCOLOR)", "invalidAccessError");
-shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_PERCENTAGE)", "invalidAccessError");
-shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_PX)", "invalidAccessError");
-shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_MS)", "invalidAccessError");
-shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_HZ)", "invalidAccessError");
-shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS_RGBCOLOR)", "invalidAccessError");
-
shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PERCENTAGE)", "invalidAccessError");
shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PX)", "invalidAccessError");
shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_DEG)", "invalidAccessError");
Modified: trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt (209804 => 209805)
--- trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -46,8 +46,6 @@
PASS objCWrapperClass(stylesheet.cssRules.item(0).style.getPropertyCSSValue('clip').getRectValue()) is 'DOMRect'
PASS objCWrapperClass(stylesheet.cssRules.item(0).style.getPropertyCSSValue('content')) is 'DOMCSSValueList'
PASS objCWrapperClass(stylesheet.cssRules.item(0).style.getPropertyCSSValue('content').item(0).getCounterValue()) is 'DOMCounter'
-PASS objCWrapperClass(stylesheet.cssRules.item(0).style.getPropertyCSSValue('-webkit-transform')) is 'DOMCSSValueList'
-PASS objCWrapperClass(stylesheet.cssRules.item(0).style.getPropertyCSSValue('-webkit-transform').item(0)) is 'DOMCSSValueList'
PASS objCWrapperClass(stylesheet.media) is 'DOMMediaList'
XPath
Modified: trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html (209804 => 209805)
--- trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/platform/mac/fast/dom/wrapper-classes-objc.html 2016-12-14 16:34:48 UTC (rev 209805)
@@ -6,7 +6,6 @@
color: rgb(0, 0, 0);
clip: rect(0, 0, 1, 1);
content: counter(dummy, square);
- -webkit-transform: translate(10px, 20px);
}
</style>
</head>
@@ -132,8 +131,6 @@
test("stylesheet.cssRules.item(0).style.getPropertyCSSValue('clip').getRectValue()", "Rect");
test("stylesheet.cssRules.item(0).style.getPropertyCSSValue('content')", "CSSValueList");
test("stylesheet.cssRules.item(0).style.getPropertyCSSValue('content').item(0).getCounterValue()", "Counter");
- test("stylesheet.cssRules.item(0).style.getPropertyCSSValue('-webkit-transform')", "CSSValueList");
- test("stylesheet.cssRules.item(0).style.getPropertyCSSValue('-webkit-transform').item(0)", "CSSValueList");
test("stylesheet.media", "MediaList");
debug('');
Modified: trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt (209804 => 209805)
--- trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -2393,11 +2393,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').value is WebKitCSSTransformValue
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').value is WebKitDataCue
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt (209804 => 209805)
--- trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -2363,11 +2363,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').value is WebKitCSSTransformValue
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').value is WebKitDataCue
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt (209804 => 209805)
--- trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -2388,11 +2388,6 @@
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').hasOwnProperty('set') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').enumerable is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSRegionRule').configurable is true
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').value is WebKitCSSTransformValue
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('get') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').hasOwnProperty('set') is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').enumerable is false
-PASS Object.getOwnPropertyDescriptor(global, 'WebKitCSSTransformValue').configurable is true
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').value is WebKitDataCue
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('get') is false
PASS Object.getOwnPropertyDescriptor(global, 'WebKitDataCue').hasOwnProperty('set') is false
Modified: trunk/LayoutTests/transforms/2d/transform-value-types-expected.txt (209804 => 209805)
--- trunk/LayoutTests/transforms/2d/transform-value-types-expected.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/transforms/2d/transform-value-types-expected.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,36 +1,22 @@
PASS jsWrapperClass(transformRule) is 'CSSValueList'
PASS jsWrapperClass(transformRule.__proto__) is 'CSSValueListPrototype'
PASS jsWrapperClass(transformRule.constructor) is 'Function'
-PASS jsWrapperClass(transformRule[0]) is 'WebKitCSSTransformValue'
-PASS jsWrapperClass(transformRule[0].__proto__) is 'WebKitCSSTransformValuePrototype'
+PASS jsWrapperClass(transformRule[0]) is 'CSSValue'
+PASS jsWrapperClass(transformRule[0].__proto__) is 'CSSValuePrototype'
PASS jsWrapperClass(transformRule[0].constructor) is 'Function'
-PASS transformRule[0].operationType is WebKitCSSTransformValue.CSS_TRANSLATE
PASS transformRule[0].cssText is 'translate(10px)'
-PASS transformRule[1].operationType is WebKitCSSTransformValue.CSS_TRANSLATEX
-PASS transformRule[1].cssText is 'translateX(10px)'
-PASS transformRule[2].operationType is WebKitCSSTransformValue.CSS_TRANSLATEY
-PASS transformRule[2].cssText is 'translateY(10px)'
-PASS transformRule[3].operationType is WebKitCSSTransformValue.CSS_ROTATE
+PASS transformRule[1].cssText is 'translatex(10px)'
+PASS transformRule[2].cssText is 'translatey(10px)'
PASS transformRule[3].cssText is 'rotate(10deg)'
-PASS transformRule[4].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[4].cssText is 'rotate(11rad)'
-PASS transformRule[5].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[5].cssText is 'rotate(12grad)'
-PASS transformRule[6].operationType is WebKitCSSTransformValue.CSS_ROTATE
PASS transformRule[6].cssText is 'rotate(13turn)'
-PASS transformRule[7].operationType is WebKitCSSTransformValue.CSS_SCALE
PASS transformRule[7].cssText is 'scale(2)'
-PASS transformRule[8].operationType is WebKitCSSTransformValue.CSS_SCALEX
-PASS transformRule[8].cssText is 'scaleX(1.2)'
-PASS transformRule[9].operationType is WebKitCSSTransformValue.CSS_SCALEY
-PASS transformRule[9].cssText is 'scaleY(1.2)'
-PASS transformRule[10].operationType is WebKitCSSTransformValue.CSS_SKEW
+PASS transformRule[8].cssText is 'scalex(1.2)'
+PASS transformRule[9].cssText is 'scaley(1.2)'
PASS transformRule[10].cssText is 'skew(10deg, 10rad)'
-PASS transformRule[11].operationType is WebKitCSSTransformValue.CSS_SKEWX
-PASS transformRule[11].cssText is 'skewX(10deg)'
-PASS transformRule[12].operationType is WebKitCSSTransformValue.CSS_SKEWY
-PASS transformRule[12].cssText is 'skewY(11grad)'
-PASS transformRule[13].operationType is WebKitCSSTransformValue.CSS_MATRIX
+PASS transformRule[11].cssText is 'skewx(10deg)'
+PASS transformRule[12].cssText is 'skewy(11grad)'
PASS transformRule[13].cssText is 'matrix(1, 0, 0, 1, 0, 0)'
PASS successfullyParsed is true
Modified: trunk/LayoutTests/transforms/2d/transform-value-types.html (209804 => 209805)
--- trunk/LayoutTests/transforms/2d/transform-value-types.html 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/LayoutTests/transforms/2d/transform-value-types.html 2016-12-14 16:34:48 UTC (rev 209805)
@@ -51,48 +51,34 @@
var transformRule = stylesheet.cssRules.item(0).style.getPropertyCSSValue('-webkit-transform');
test("transformRule", "CSSValueList");
- test("transformRule[0]", "WebKitCSSTransformValue");
+ test("transformRule[0]", "CSSValue");
- shouldBe("transformRule[0].operationType", "WebKitCSSTransformValue.CSS_TRANSLATE");
shouldBe("transformRule[0].cssText", "'translate(10px)'");
- shouldBe("transformRule[1].operationType", "WebKitCSSTransformValue.CSS_TRANSLATEX");
- shouldBe("transformRule[1].cssText", "'translateX(10px)'");
+ shouldBe("transformRule[1].cssText", "'translatex(10px)'");
- shouldBe("transformRule[2].operationType", "WebKitCSSTransformValue.CSS_TRANSLATEY");
- shouldBe("transformRule[2].cssText", "'translateY(10px)'");
+ shouldBe("transformRule[2].cssText", "'translatey(10px)'");
- shouldBe("transformRule[3].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[3].cssText", "'rotate(10deg)'");
- shouldBe("transformRule[4].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[4].cssText", "'rotate(11rad)'");
- shouldBe("transformRule[5].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[5].cssText", "'rotate(12grad)'");
- shouldBe("transformRule[6].operationType", "WebKitCSSTransformValue.CSS_ROTATE");
shouldBe("transformRule[6].cssText", "'rotate(13turn)'");
- shouldBe("transformRule[7].operationType", "WebKitCSSTransformValue.CSS_SCALE");
shouldBe("transformRule[7].cssText", "'scale(2)'");
- shouldBe("transformRule[8].operationType", "WebKitCSSTransformValue.CSS_SCALEX");
- shouldBe("transformRule[8].cssText", "'scaleX(1.2)'");
+ shouldBe("transformRule[8].cssText", "'scalex(1.2)'");
- shouldBe("transformRule[9].operationType", "WebKitCSSTransformValue.CSS_SCALEY");
- shouldBe("transformRule[9].cssText", "'scaleY(1.2)'");
+ shouldBe("transformRule[9].cssText", "'scaley(1.2)'");
- shouldBe("transformRule[10].operationType", "WebKitCSSTransformValue.CSS_SKEW");
shouldBe("transformRule[10].cssText", "'skew(10deg, 10rad)'");
- shouldBe("transformRule[11].operationType", "WebKitCSSTransformValue.CSS_SKEWX");
- shouldBe("transformRule[11].cssText", "'skewX(10deg)'");
+ shouldBe("transformRule[11].cssText", "'skewx(10deg)'");
- shouldBe("transformRule[12].operationType", "WebKitCSSTransformValue.CSS_SKEWY");
- shouldBe("transformRule[12].cssText", "'skewY(11grad)'");
+ shouldBe("transformRule[12].cssText", "'skewy(11grad)'");
- shouldBe("transformRule[13].operationType", "WebKitCSSTransformValue.CSS_MATRIX");
shouldBe("transformRule[13].cssText", "'matrix(1, 0, 0, 1, 0, 0)'");
</script>
Modified: trunk/Source/WebCore/CMakeLists.txt (209804 => 209805)
--- trunk/Source/WebCore/CMakeLists.txt 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/CMakeLists.txt 2016-12-14 16:34:48 UTC (rev 209805)
@@ -371,7 +371,6 @@
css/StyleSheetList.idl
css/WebKitCSSMatrix.idl
css/WebKitCSSRegionRule.idl
- css/WebKitCSSTransformValue.idl
css/WebKitCSSViewportRule.idl
dom/AnimationEvent.idl
@@ -1366,7 +1365,6 @@
css/ViewportStyleResolver.cpp
css/WebKitCSSMatrix.cpp
css/WebKitCSSRegionRule.cpp
- css/WebKitCSSTransformValue.cpp
css/WebKitCSSViewportRule.cpp
css/parser/CSSAtRuleID.cpp
Modified: trunk/Source/WebCore/ChangeLog (209804 => 209805)
--- trunk/Source/WebCore/ChangeLog 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/ChangeLog 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,3 +1,49 @@
+2016-12-14 Dave Hyatt <[email protected]>
+
+ [CSS Parser] Remove WebkitCSSTransformValue
+ https://bugs.webkit.org/show_bug.cgi?id=165844
+
+ Reviewed by Zalan Bujtas.
+
+ Remove WebkitCSSTransformValue and just use a CSSFunctionValue instead. No other
+ browsers support it, and the information it provides is easily obtainable from cssText.
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCSSValueCustom.cpp:
+ (WebCore::toJSNewlyCreated):
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::matrixTransformValue):
+ * css/CSSValue.cpp:
+ (WebCore::CSSValue::equals):
+ (WebCore::CSSValue::cssText):
+ (WebCore::CSSValue::destroy):
+ (WebCore::CSSValue::cloneForCSSOM):
+ * css/CSSValue.h:
+ (WebCore::CSSValue::isSpringTimingFunctionValue):
+ (WebCore::CSSValue::isWebKitCSSTransformValue): Deleted.
+ * css/StyleResolver.cpp:
+ * css/TransformFunctions.cpp:
+ (WebCore::transformOperationType):
+ (WebCore::transformsForValue):
+ * css/TransformFunctions.h:
+ * css/WebKitCSSTransformValue.cpp: Removed.
+ * css/WebKitCSSTransformValue.h: Removed.
+ * css/WebKitCSSTransformValue.idl: Removed.
+ * css/parser/CSSParserFastPaths.cpp:
+ (WebCore::parseTransformTranslateArguments):
+ (WebCore::parseTransformNumberArguments):
+ (WebCore::parseSimpleTransformValue):
+ (WebCore::parseSimpleTransformList):
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::consumeTranslate3d):
+ (WebCore::consumeNumbers):
+ (WebCore::consumePerspective):
+ (WebCore::consumeTransformValue):
+ (WebCore::transformOperationForCSSValueID): Deleted.
+
2016-12-14 Antti Koivisto <[email protected]>
Make Style::Update const in RenderTreeUpdater
Modified: trunk/Source/WebCore/DerivedSources.cpp (209804 => 209805)
--- trunk/Source/WebCore/DerivedSources.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/DerivedSources.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -642,7 +642,6 @@
#include "JSVoidCallback.cpp"
#include "JSWaveShaperNode.cpp"
#include "JSWebKitAnimationEvent.cpp"
-#include "JSWebKitCSSTransformValue.cpp"
#include "JSWebKitCSSMatrix.cpp"
#include "JSWebKitCSSRegionRule.cpp"
#include "JSWebKitCSSViewportRule.cpp"
Modified: trunk/Source/WebCore/DerivedSources.make (209804 => 209805)
--- trunk/Source/WebCore/DerivedSources.make 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/DerivedSources.make 2016-12-14 16:34:48 UTC (rev 209805)
@@ -296,7 +296,6 @@
$(WebCore)/css/StyleSheetList.idl \
$(WebCore)/css/WebKitCSSMatrix.idl \
$(WebCore)/css/WebKitCSSRegionRule.idl \
- $(WebCore)/css/WebKitCSSTransformValue.idl \
$(WebCore)/css/WebKitCSSViewportRule.idl \
$(WebCore)/dom/AnimationEvent.idl \
$(WebCore)/dom/Attr.idl \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (209804 => 209805)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1361,8 +1361,6 @@
314BE3A61B3103FB00141982 /* NamedImageGeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */; };
314BE3A71B3103FB00141982 /* NamedImageGeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = 314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */; };
316023F01532C40C00D50FF4 /* Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 316023EF1532C40C00D50FF4 /* Dictionary.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 31611E5A0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */; };
- 31611E5B0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */; };
316FE0710E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */; };
316FE0720E6CCBEE00BF6088 /* JSCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */; };
316FE0730E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 316FE06F0E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp */; };
@@ -5382,8 +5380,6 @@
BC97E413109154FA0010D361 /* JSHTMLAllCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC97E411109154FA0010D361 /* JSHTMLAllCollection.h */; };
BC97E42C10915B060010D361 /* JSHTMLAllCollectionCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC97E42B10915B060010D361 /* JSHTMLAllCollectionCustom.cpp */; };
BC98A27D0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC98A27C0C0C9950004BEBF7 /* JSStyleSheetCustom.cpp */; };
- BC9ADD230CC4032600098C4C /* WebKitCSSTransformValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */; settings = {ATTRIBUTES = (Private, ); }; };
- BC9ADD800CC4092200098C4C /* WebKitCSSTransformValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */; };
BCA169A20BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCA169A00BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp */; };
BCA169A30BFD55B40019CA76 /* JSHTMLTableCaptionElement.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA169A10BFD55B40019CA76 /* JSHTMLTableCaptionElement.h */; };
BCA257151293C010007A263D /* VerticalPositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA257141293C010007A263D /* VerticalPositionCache.h */; };
@@ -8485,9 +8481,6 @@
314BE3A41B3103FB00141982 /* NamedImageGeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NamedImageGeneratedImage.cpp; sourceTree = "<group>"; };
314BE3A51B3103FB00141982 /* NamedImageGeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NamedImageGeneratedImage.h; sourceTree = "<group>"; };
316023EF1532C40C00D50FF4 /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Dictionary.h; sourceTree = "<group>"; };
- 31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebKitCSSTransformValue.idl; sourceTree = "<group>"; };
- 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSTransformValue.cpp; sourceTree = "<group>"; };
- 31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitCSSTransformValue.h; sourceTree = "<group>"; };
316FE06D0E6CCBEE00BF6088 /* JSCSSKeyframeRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframeRule.cpp; sourceTree = "<group>"; };
316FE06E0E6CCBEE00BF6088 /* JSCSSKeyframeRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCSSKeyframeRule.h; sourceTree = "<group>"; };
316FE06F0E6CCBEE00BF6088 /* JSCSSKeyframesRule.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSCSSKeyframesRule.cpp; sourceTree = "<group>"; };
@@ -13248,8 +13241,6 @@
BC9A6144146859D9006057FD /* make_dom_exceptions.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = make_dom_exceptions.pl; sourceTree = "<group>"; };
BC9A6145146859D9006057FD /* make_event_factory.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = make_event_factory.pl; sourceTree = "<group>"; };
BC9A6146146859D9006057FD /* make_names.pl */ = {isa = PBXFileReference; lastKnownFileType = text.script.perl; path = make_names.pl; sourceTree = "<group>"; };
- BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebKitCSSTransformValue.h; sourceTree = "<group>"; };
- BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSTransformValue.cpp; sourceTree = "<group>"; };
BCA169A00BFD55B40019CA76 /* JSHTMLTableCaptionElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTableCaptionElement.cpp; sourceTree = "<group>"; };
BCA169A10BFD55B40019CA76 /* JSHTMLTableCaptionElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSHTMLTableCaptionElement.h; sourceTree = "<group>"; };
BCA257141293C010007A263D /* VerticalPositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VerticalPositionCache.h; sourceTree = "<group>"; };
@@ -20365,8 +20356,6 @@
4983913E0F1E767500C23782 /* JSWebKitCSSMatrix.h */,
8ACC24CD148E24B200EFCC0D /* JSWebKitCSSRegionRule.cpp */,
8ACC24CE148E24B200EFCC0D /* JSWebKitCSSRegionRule.h */,
- 31611E580E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp */,
- 31611E590E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h */,
3F2B33E9165AF15500E3987C /* JSWebKitCSSViewportRule.cpp */,
3F2B33EA165AF15500E3987C /* JSWebKitCSSViewportRule.h */,
);
@@ -23550,9 +23539,6 @@
8AA61CFD144D595B00F37350 /* WebKitCSSRegionRule.cpp */,
8AA61CFE144D595B00F37350 /* WebKitCSSRegionRule.h */,
8AD0A55614C87425000D83C5 /* WebKitCSSRegionRule.idl */,
- BC9ADD7F0CC4092200098C4C /* WebKitCSSTransformValue.cpp */,
- BC9ADD220CC4032600098C4C /* WebKitCSSTransformValue.h */,
- 31611E540E1C4D4A00F6A579 /* WebKitCSSTransformValue.idl */,
3FFFF9A6159D9A550020BBD5 /* WebKitCSSViewportRule.cpp */,
3FFFF9A7159D9A550020BBD5 /* WebKitCSSViewportRule.h */,
3F2B33E3165ABD3500E3987C /* WebKitCSSViewportRule.idl */,
@@ -26556,7 +26542,6 @@
31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */,
498391400F1E767500C23782 /* JSWebKitCSSMatrix.h in Headers */,
8AD0A59514C88336000D83C5 /* JSWebKitCSSRegionRule.h in Headers */,
- 31611E5B0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.h in Headers */,
3F2B33EF165AF15600E3987C /* JSWebKitCSSViewportRule.h in Headers */,
7CC69941191EC5F500AF2270 /* JSWebKitNamespace.h in Headers */,
0FDA7C271883333200C954B5 /* JSWebKitPlaybackTargetAvailabilityEvent.h in Headers */,
@@ -28147,7 +28132,6 @@
976D6C7C122B8A3D001FD1F7 /* BlobBuilder.h in Headers */,
498391590F1E776900C23782 /* WebKitCSSMatrix.h in Headers */,
8AA61D00144D595B00F37350 /* WebKitCSSRegionRule.h in Headers */,
- BC9ADD230CC4032600098C4C /* WebKitCSSTransformValue.h in Headers */,
3FFFF9A9159D9A550020BBD5 /* WebKitCSSViewportRule.h in Headers */,
2D0621451DA639BA00A7FB26 /* WebKitMediaKeyMessageEvent.h in Headers */,
2D0621511DA63A9F00A7FB26 /* WebKitMediaKeyNeededEvent.h in Headers */,
@@ -30358,7 +30342,6 @@
31C0FF3D0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.cpp in Sources */,
4983913F0F1E767500C23782 /* JSWebKitCSSMatrix.cpp in Sources */,
8AD0A59414C88336000D83C5 /* JSWebKitCSSRegionRule.cpp in Sources */,
- 31611E5A0E1C4DE000F6A579 /* JSWebKitCSSTransformValue.cpp in Sources */,
3F2B33EE165AF15600E3987C /* JSWebKitCSSViewportRule.cpp in Sources */,
CDA98DA31601464100FEA3B1 /* JSWebKitMediaKeyError.cpp in Sources */,
CDA98DDF16026A3700FEA3B1 /* JSWebKitMediaKeyMessageEvent.cpp in Sources */,
@@ -31637,7 +31620,6 @@
976D6C7B122B8A3D001FD1F7 /* BlobBuilder.cpp in Sources */,
498391580F1E776900C23782 /* WebKitCSSMatrix.cpp in Sources */,
8AA61CFF144D595B00F37350 /* WebKitCSSRegionRule.cpp in Sources */,
- BC9ADD800CC4092200098C4C /* WebKitCSSTransformValue.cpp in Sources */,
3FFFF9A8159D9A550020BBD5 /* WebKitCSSViewportRule.cpp in Sources */,
1A1414B513A0F0500019996C /* WebKitFontFamilyNames.cpp in Sources */,
2D0621441DA639B600A7FB26 /* WebKitMediaKeyMessageEvent.cpp in Sources */,
Modified: trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp (209804 => 209805)
--- trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/bindings/js/JSCSSValueCustom.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -31,8 +31,6 @@
#include "JSCSSPrimitiveValue.h"
#include "JSCSSValueList.h"
#include "JSNode.h"
-#include "JSWebKitCSSTransformValue.h"
-#include "WebKitCSSTransformValue.h"
using namespace JSC;
@@ -60,8 +58,6 @@
JSValue toJSNewlyCreated(ExecState*, JSDOMGlobalObject* globalObject, Ref<CSSValue>&& value)
{
- if (value->isWebKitCSSTransformValue())
- return createWrapper<WebKitCSSTransformValue>(globalObject, WTFMove(value));
if (value->isValueList())
return createWrapper<CSSValueList>(globalObject, WTFMove(value));
if (value->isPrimitiveValue())
Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -75,7 +75,6 @@
#include "StyleResolver.h"
#include "StyleScope.h"
#include "Text.h"
-#include "WebKitCSSTransformValue.h"
#include "WebKitFontFamilyNames.h"
#include "WillChangeData.h"
#include <wtf/NeverDestroyed.h>
@@ -818,12 +817,12 @@
return box.style().boxSizing() == BORDER_BOX ? box.borderBoxRect() : box.computedCSSContentBoxRect();
}
-static Ref<WebKitCSSTransformValue> matrixTransformValue(const TransformationMatrix& transform, const RenderStyle& style)
+static Ref<CSSFunctionValue> matrixTransformValue(const TransformationMatrix& transform, const RenderStyle& style)
{
- RefPtr<WebKitCSSTransformValue> transformValue;
+ RefPtr<CSSFunctionValue> transformValue;
auto& cssValuePool = CSSValuePool::singleton();
if (transform.isAffine()) {
- transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue::MatrixTransformOperation);
+ transformValue = CSSFunctionValue::create(CSSValueMatrix);
transformValue->append(cssValuePool.createValue(transform.a(), CSSPrimitiveValue::CSS_NUMBER));
transformValue->append(cssValuePool.createValue(transform.b(), CSSPrimitiveValue::CSS_NUMBER));
@@ -832,7 +831,7 @@
transformValue->append(zoomAdjustedNumberValue(transform.e(), style));
transformValue->append(zoomAdjustedNumberValue(transform.f(), style));
} else {
- transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue::Matrix3DTransformOperation);
+ transformValue = CSSFunctionValue::create(CSSValueMatrix3d);
transformValue->append(cssValuePool.createValue(transform.m11(), CSSPrimitiveValue::CSS_NUMBER));
transformValue->append(cssValuePool.createValue(transform.m12(), CSSPrimitiveValue::CSS_NUMBER));
Modified: trunk/Source/WebCore/css/CSSValue.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/CSSValue.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/CSSValue.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -61,7 +61,6 @@
#include "CSSUnsetValue.h"
#include "CSSValueList.h"
#include "CSSVariableReferenceValue.h"
-#include "WebKitCSSTransformValue.h"
#if ENABLE(CSS_GRID_LAYOUT)
#include "CSSGridAutoRepeatValue.h"
@@ -218,8 +217,6 @@
return compareCSSValues<CSSUnicodeRangeValue>(*this, other);
case ValueListClass:
return compareCSSValues<CSSValueList>(*this, other);
- case WebKitCSSTransformClass:
- return compareCSSValues<WebKitCSSTransformValue>(*this, other);
case LineBoxContainClass:
return compareCSSValues<CSSLineBoxContainValue>(*this, other);
case CalculationClass:
@@ -322,8 +319,6 @@
return downcast<CSSUnicodeRangeValue>(*this).customCSSText();
case ValueListClass:
return downcast<CSSValueList>(*this).customCSSText();
- case WebKitCSSTransformClass:
- return downcast<WebKitCSSTransformValue>(*this).customCSSText();
case LineBoxContainClass:
return downcast<CSSLineBoxContainValue>(*this).customCSSText();
case CalculationClass:
@@ -451,9 +446,6 @@
case ValueListClass:
delete downcast<CSSValueList>(this);
return;
- case WebKitCSSTransformClass:
- delete downcast<WebKitCSSTransformValue>(this);
- return;
case LineBoxContainClass:
delete downcast<CSSLineBoxContainValue>(this);
return;
@@ -500,8 +492,6 @@
case ImageClass:
case CursorImageClass:
return downcast<CSSImageValue>(*this).cloneForCSSOM();
- case WebKitCSSTransformClass:
- return downcast<WebKitCSSTransformValue>(*this).cloneForCSSOM();
case ImageSetClass:
return downcast<CSSImageSetValue>(*this).cloneForCSSOM();
default:
Modified: trunk/Source/WebCore/css/CSSValue.h (209804 => 209805)
--- trunk/Source/WebCore/css/CSSValue.h 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/CSSValue.h 2016-12-14 16:34:48 UTC (rev 209805)
@@ -105,7 +105,6 @@
bool isCubicBezierTimingFunctionValue() const { return m_classType == CubicBezierTimingFunctionClass; }
bool isStepsTimingFunctionValue() const { return m_classType == StepsTimingFunctionClass; }
bool isSpringTimingFunctionValue() const { return m_classType == SpringTimingFunctionClass; }
- bool isWebKitCSSTransformValue() const { return m_classType == WebKitCSSTransformClass; }
bool isLineBoxContainValue() const { return m_classType == LineBoxContainClass; }
bool isCalcValue() const {return m_classType == CalculationClass; }
bool isFilterImageValue() const { return m_classType == FilterImageClass; }
@@ -199,10 +198,11 @@
VariableReferenceClass,
PendingSubstitutionValueClass,
- // List class types must appear after ValueListClass.
+ // List class types must appear after ValueListClass. Note CSSFunctionValue
+ // is deliberately excluded, since we don't want it exposed to the CSS OM
+ // as a list.
ValueListClass,
ImageSetClass,
- WebKitCSSTransformClass,
#if ENABLE(CSS_GRID_LAYOUT)
GridLineNamesClass,
GridAutoRepeatClass,
Modified: trunk/Source/WebCore/css/StyleResolver.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/StyleResolver.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/StyleResolver.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -134,7 +134,6 @@
#include "ViewportStyleResolver.h"
#include "VisitedLinkState.h"
#include "WebKitCSSRegionRule.h"
-#include "WebKitCSSTransformValue.h"
#include "WebKitFontFamilyNames.h"
#include "XMLNames.h"
#include <bitset>
Modified: trunk/Source/WebCore/css/TransformFunctions.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/TransformFunctions.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/TransformFunctions.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -32,6 +32,7 @@
#include "config.h"
#include "TransformFunctions.h"
+#include "CSSFunctionValue.h"
#include "CSSPrimitiveValueMappings.h"
#include "CSSValueList.h"
#include "CSSValuePool.h"
@@ -42,35 +43,56 @@
#include "ScaleTransformOperation.h"
#include "SkewTransformOperation.h"
#include "TranslateTransformOperation.h"
-#include "WebKitCSSTransformValue.h"
namespace WebCore {
-static TransformOperation::OperationType transformOperationType(WebKitCSSTransformValue::TransformOperationType type)
+static TransformOperation::OperationType transformOperationType(CSSValueID type)
{
switch (type) {
- case WebKitCSSTransformValue::ScaleTransformOperation: return TransformOperation::SCALE;
- case WebKitCSSTransformValue::ScaleXTransformOperation: return TransformOperation::SCALE_X;
- case WebKitCSSTransformValue::ScaleYTransformOperation: return TransformOperation::SCALE_Y;
- case WebKitCSSTransformValue::ScaleZTransformOperation: return TransformOperation::SCALE_Z;
- case WebKitCSSTransformValue::Scale3DTransformOperation: return TransformOperation::SCALE_3D;
- case WebKitCSSTransformValue::TranslateTransformOperation: return TransformOperation::TRANSLATE;
- case WebKitCSSTransformValue::TranslateXTransformOperation: return TransformOperation::TRANSLATE_X;
- case WebKitCSSTransformValue::TranslateYTransformOperation: return TransformOperation::TRANSLATE_Y;
- case WebKitCSSTransformValue::TranslateZTransformOperation: return TransformOperation::TRANSLATE_Z;
- case WebKitCSSTransformValue::Translate3DTransformOperation: return TransformOperation::TRANSLATE_3D;
- case WebKitCSSTransformValue::RotateTransformOperation: return TransformOperation::ROTATE;
- case WebKitCSSTransformValue::RotateXTransformOperation: return TransformOperation::ROTATE_X;
- case WebKitCSSTransformValue::RotateYTransformOperation: return TransformOperation::ROTATE_Y;
- case WebKitCSSTransformValue::RotateZTransformOperation: return TransformOperation::ROTATE_Z;
- case WebKitCSSTransformValue::Rotate3DTransformOperation: return TransformOperation::ROTATE_3D;
- case WebKitCSSTransformValue::SkewTransformOperation: return TransformOperation::SKEW;
- case WebKitCSSTransformValue::SkewXTransformOperation: return TransformOperation::SKEW_X;
- case WebKitCSSTransformValue::SkewYTransformOperation: return TransformOperation::SKEW_Y;
- case WebKitCSSTransformValue::MatrixTransformOperation: return TransformOperation::MATRIX;
- case WebKitCSSTransformValue::Matrix3DTransformOperation: return TransformOperation::MATRIX_3D;
- case WebKitCSSTransformValue::PerspectiveTransformOperation: return TransformOperation::PERSPECTIVE;
- case WebKitCSSTransformValue::UnknownTransformOperation: return TransformOperation::NONE;
+ case CSSValueScale:
+ return TransformOperation::SCALE;
+ case CSSValueScalex:
+ return TransformOperation::SCALE_X;
+ case CSSValueScaley:
+ return TransformOperation::SCALE_Y;
+ case CSSValueScalez:
+ return TransformOperation::SCALE_Z;
+ case CSSValueScale3d:
+ return TransformOperation::SCALE_3D;
+ case CSSValueTranslate:
+ return TransformOperation::TRANSLATE;
+ case CSSValueTranslatex:
+ return TransformOperation::TRANSLATE_X;
+ case CSSValueTranslatey:
+ return TransformOperation::TRANSLATE_Y;
+ case CSSValueTranslatez:
+ return TransformOperation::TRANSLATE_Z;
+ case CSSValueTranslate3d:
+ return TransformOperation::TRANSLATE_3D;
+ case CSSValueRotate:
+ return TransformOperation::ROTATE;
+ case CSSValueRotatex:
+ return TransformOperation::ROTATE_X;
+ case CSSValueRotatey:
+ return TransformOperation::ROTATE_Y;
+ case CSSValueRotatez:
+ return TransformOperation::ROTATE_Z;
+ case CSSValueRotate3d:
+ return TransformOperation::ROTATE_3D;
+ case CSSValueSkew:
+ return TransformOperation::SKEW;
+ case CSSValueSkewx:
+ return TransformOperation::SKEW_X;
+ case CSSValueSkewy:
+ return TransformOperation::SKEW_Y;
+ case CSSValueMatrix:
+ return TransformOperation::MATRIX;
+ case CSSValueMatrix3d:
+ return TransformOperation::MATRIX_3D;
+ case CSSValuePerspective:
+ return TransformOperation::PERSPECTIVE;
+ default:
+ break;
}
return TransformOperation::NONE;
}
@@ -89,10 +111,10 @@
TransformOperations operations;
for (auto& currentValue : downcast<CSSValueList>(value)) {
- if (!is<WebKitCSSTransformValue>(currentValue.get()))
+ if (!is<CSSFunctionValue>(currentValue.get()))
continue;
- auto& transformValue = downcast<WebKitCSSTransformValue>(currentValue.get());
+ auto& transformValue = downcast<CSSFunctionValue>(currentValue.get());
if (!transformValue.length())
continue;
@@ -108,17 +130,17 @@
auto& firstValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0));
- switch (transformValue.operationType()) {
- case WebKitCSSTransformValue::ScaleTransformOperation:
- case WebKitCSSTransformValue::ScaleXTransformOperation:
- case WebKitCSSTransformValue::ScaleYTransformOperation: {
+ switch (transformValue.name()) {
+ case CSSValueScale:
+ case CSSValueScalex:
+ case CSSValueScaley: {
double sx = 1.0;
double sy = 1.0;
- if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ if (transformValue.name() == CSSValueScaley)
sy = firstValue.doubleValue();
else {
sx = firstValue.doubleValue();
- if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue.name() != CSSValueScalex) {
if (transformValue.length() > 1) {
auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
sy = secondValue.doubleValue();
@@ -126,21 +148,21 @@
sy = sx;
}
}
- operations.operations().append(ScaleTransformOperation::create(sx, sy, 1.0, transformOperationType(transformValue.operationType())));
+ operations.operations().append(ScaleTransformOperation::create(sx, sy, 1.0, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::ScaleZTransformOperation:
- case WebKitCSSTransformValue::Scale3DTransformOperation: {
+ case CSSValueScalez:
+ case CSSValueScale3d: {
double sx = 1.0;
double sy = 1.0;
double sz = 1.0;
- if (transformValue.operationType() == WebKitCSSTransformValue::ScaleZTransformOperation)
+ if (transformValue.name() == CSSValueScalez)
sz = firstValue.doubleValue();
- else if (transformValue.operationType() == WebKitCSSTransformValue::ScaleYTransformOperation)
+ else if (transformValue.name() == CSSValueScaley)
sy = firstValue.doubleValue();
else {
sx = firstValue.doubleValue();
- if (transformValue.operationType() != WebKitCSSTransformValue::ScaleXTransformOperation) {
+ if (transformValue.name() != CSSValueScalex) {
if (transformValue.length() > 2) {
auto& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
sz = thirdValue.doubleValue();
@@ -152,19 +174,19 @@
sy = sx;
}
}
- operations.operations().append(ScaleTransformOperation::create(sx, sy, sz, transformOperationType(transformValue.operationType())));
+ operations.operations().append(ScaleTransformOperation::create(sx, sy, sz, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::TranslateTransformOperation:
- case WebKitCSSTransformValue::TranslateXTransformOperation:
- case WebKitCSSTransformValue::TranslateYTransformOperation: {
+ case CSSValueTranslate:
+ case CSSValueTranslatex:
+ case CSSValueTranslatey: {
Length tx = Length(0, Fixed);
Length ty = Length(0, Fixed);
- if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ if (transformValue.name() == CSSValueTranslatey)
ty = convertToFloatLength(&firstValue, conversionData);
else {
tx = convertToFloatLength(&firstValue, conversionData);
- if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue.name() != CSSValueTranslatex) {
if (transformValue.length() > 1) {
auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
ty = convertToFloatLength(&secondValue, conversionData);
@@ -175,21 +197,21 @@
if (tx.isUndefined() || ty.isUndefined())
return false;
- operations.operations().append(TranslateTransformOperation::create(tx, ty, Length(0, Fixed), transformOperationType(transformValue.operationType())));
+ operations.operations().append(TranslateTransformOperation::create(tx, ty, Length(0, Fixed), transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::TranslateZTransformOperation:
- case WebKitCSSTransformValue::Translate3DTransformOperation: {
+ case CSSValueTranslatez:
+ case CSSValueTranslate3d: {
Length tx = Length(0, Fixed);
Length ty = Length(0, Fixed);
Length tz = Length(0, Fixed);
- if (transformValue.operationType() == WebKitCSSTransformValue::TranslateZTransformOperation)
+ if (transformValue.name() == CSSValueTranslatez)
tz = convertToFloatLength(&firstValue, conversionData);
- else if (transformValue.operationType() == WebKitCSSTransformValue::TranslateYTransformOperation)
+ else if (transformValue.name() == CSSValueTranslatey)
ty = convertToFloatLength(&firstValue, conversionData);
else {
tx = convertToFloatLength(&firstValue, conversionData);
- if (transformValue.operationType() != WebKitCSSTransformValue::TranslateXTransformOperation) {
+ if (transformValue.name() != CSSValueTranslatex) {
if (transformValue.length() > 2) {
auto& thirdValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(2));
tz = convertToFloatLength(&thirdValue, conversionData);
@@ -204,32 +226,32 @@
if (tx.isUndefined() || ty.isUndefined() || tz.isUndefined())
return false;
- operations.operations().append(TranslateTransformOperation::create(tx, ty, tz, transformOperationType(transformValue.operationType())));
+ operations.operations().append(TranslateTransformOperation::create(tx, ty, tz, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::RotateTransformOperation: {
+ case CSSValueRotate: {
double angle = firstValue.computeDegrees();
- operations.operations().append(RotateTransformOperation::create(0, 0, 1, angle, transformOperationType(transformValue.operationType())));
+ operations.operations().append(RotateTransformOperation::create(0, 0, 1, angle, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::RotateXTransformOperation:
- case WebKitCSSTransformValue::RotateYTransformOperation:
- case WebKitCSSTransformValue::RotateZTransformOperation: {
+ case CSSValueRotatex:
+ case CSSValueRotatey:
+ case CSSValueRotatez: {
double x = 0;
double y = 0;
double z = 0;
double angle = firstValue.computeDegrees();
- if (transformValue.operationType() == WebKitCSSTransformValue::RotateXTransformOperation)
+ if (transformValue.name() == CSSValueRotatex)
x = 1;
- else if (transformValue.operationType() == WebKitCSSTransformValue::RotateYTransformOperation)
+ else if (transformValue.name() == CSSValueRotatey)
y = 1;
else
z = 1;
- operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.operationType())));
+ operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::Rotate3DTransformOperation: {
+ case CSSValueRotate3d: {
if (transformValue.length() < 4)
break;
auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
@@ -239,20 +261,20 @@
double y = secondValue.doubleValue();
double z = thirdValue.doubleValue();
double angle = fourthValue.computeDegrees();
- operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.operationType())));
+ operations.operations().append(RotateTransformOperation::create(x, y, z, angle, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::SkewTransformOperation:
- case WebKitCSSTransformValue::SkewXTransformOperation:
- case WebKitCSSTransformValue::SkewYTransformOperation: {
+ case CSSValueSkew:
+ case CSSValueSkewx:
+ case CSSValueSkewy: {
double angleX = 0;
double angleY = 0;
double angle = firstValue.computeDegrees();
- if (transformValue.operationType() == WebKitCSSTransformValue::SkewYTransformOperation)
+ if (transformValue.name() == CSSValueSkewy)
angleY = angle;
else {
angleX = angle;
- if (transformValue.operationType() == WebKitCSSTransformValue::SkewTransformOperation) {
+ if (transformValue.name() == CSSValueSkew) {
if (transformValue.length() > 1) {
auto& secondValue = downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(1));
angleY = secondValue.computeDegrees();
@@ -259,10 +281,10 @@
}
}
}
- operations.operations().append(SkewTransformOperation::create(angleX, angleY, transformOperationType(transformValue.operationType())));
+ operations.operations().append(SkewTransformOperation::create(angleX, angleY, transformOperationType(transformValue.name())));
break;
}
- case WebKitCSSTransformValue::MatrixTransformOperation: {
+ case CSSValueMatrix: {
if (transformValue.length() < 6)
break;
double a = firstValue.doubleValue();
@@ -274,7 +296,7 @@
operations.operations().append(MatrixTransformOperation::create(a, b, c, d, e, f));
break;
}
- case WebKitCSSTransformValue::Matrix3DTransformOperation: {
+ case CSSValueMatrix3d: {
if (transformValue.length() < 16)
break;
TransformationMatrix matrix(downcast<CSSPrimitiveValue>(*transformValue.itemWithoutBoundsCheck(0)).doubleValue(),
@@ -296,7 +318,7 @@
operations.operations().append(Matrix3DTransformOperation::create(matrix));
break;
}
- case WebKitCSSTransformValue::PerspectiveTransformOperation: {
+ case CSSValuePerspective: {
Length p = Length(0, Fixed);
if (firstValue.isLength())
p = convertToFloatLength(&firstValue, conversionData);
@@ -312,7 +334,7 @@
operations.operations().append(PerspectiveTransformOperation::create(p));
break;
}
- case WebKitCSSTransformValue::UnknownTransformOperation:
+ default:
ASSERT_NOT_REACHED();
break;
}
Modified: trunk/Source/WebCore/css/TransformFunctions.h (209804 => 209805)
--- trunk/Source/WebCore/css/TransformFunctions.h 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/TransformFunctions.h 2016-12-14 16:34:48 UTC (rev 209805)
@@ -37,7 +37,6 @@
class CSSToLengthConversionData;
class CSSValue;
class RenderStyle;
-class WebKitCSSTransformValue;
struct Length;
Deleted: trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/WebKitCSSTransformValue.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "WebKitCSSTransformValue.h"
-
-#include "CSSValueList.h"
-#include <wtf/text/WTFString.h>
-
-namespace WebCore {
-
-// These names must be kept in sync with TransformOperationType.
-const char* const transformNamePrefixes[] = {
- nullptr,
- "translate(",
- "translateX(",
- "translateY(",
- "rotate(",
- "scale(",
- "scaleX(",
- "scaleY(",
- "skew(",
- "skewX(",
- "skewY(",
- "matrix(",
- "translateZ(",
- "translate3d(",
- "rotateX(",
- "rotateY(",
- "rotateZ(",
- "rotate3d(",
- "scaleZ(",
- "scale3d(",
- "perspective(",
- "matrix3d("
-};
-
-static inline String transformValueToCssString(WebKitCSSTransformValue::TransformOperationType operation, const String& value)
-{
- if (operation != WebKitCSSTransformValue::UnknownTransformOperation) {
- ASSERT_WITH_SECURITY_IMPLICATION(static_cast<size_t>(operation) < WTF_ARRAY_LENGTH(transformNamePrefixes));
- return makeString(transformNamePrefixes[operation], value, ')');
- }
- return String();
-}
-
-WebKitCSSTransformValue::WebKitCSSTransformValue(TransformOperationType op)
- : CSSValueList(WebKitCSSTransformClass, CommaSeparator)
- , m_type(op)
-{
-}
-
-String WebKitCSSTransformValue::customCSSText() const
-{
- return transformValueToCssString(m_type, CSSValueList::customCSSText());
-}
-
-WebKitCSSTransformValue::WebKitCSSTransformValue(const WebKitCSSTransformValue& cloneFrom)
- : CSSValueList(cloneFrom)
- , m_type(cloneFrom.m_type)
-{
-}
-
-Ref<WebKitCSSTransformValue> WebKitCSSTransformValue::cloneForCSSOM() const
-{
- return adoptRef(*new WebKitCSSTransformValue(*this));
-}
-
-}
Deleted: trunk/Source/WebCore/css/WebKitCSSTransformValue.h (209804 => 209805)
--- trunk/Source/WebCore/css/WebKitCSSTransformValue.h 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/WebKitCSSTransformValue.h 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include "CSSValueList.h"
-
-namespace WebCore {
-
-class WebKitCSSTransformValue final : public CSSValueList {
-public:
- // NOTE: these have to match the values in the IDL
- enum TransformOperationType {
- UnknownTransformOperation,
- TranslateTransformOperation,
- TranslateXTransformOperation,
- TranslateYTransformOperation,
- RotateTransformOperation,
- ScaleTransformOperation,
- ScaleXTransformOperation,
- ScaleYTransformOperation,
- SkewTransformOperation,
- SkewXTransformOperation,
- SkewYTransformOperation,
- MatrixTransformOperation,
- TranslateZTransformOperation,
- Translate3DTransformOperation,
- RotateXTransformOperation,
- RotateYTransformOperation,
- RotateZTransformOperation,
- Rotate3DTransformOperation,
- ScaleZTransformOperation,
- Scale3DTransformOperation,
- PerspectiveTransformOperation,
- Matrix3DTransformOperation
- };
-
- static Ref<WebKitCSSTransformValue> create(TransformOperationType type)
- {
- return adoptRef(*new WebKitCSSTransformValue(type));
- }
-
- String customCSSText() const;
- bool equals(const WebKitCSSTransformValue& other) const { return m_type == other.m_type && CSSValueList::equals(other); }
-
- TransformOperationType operationType() const { return m_type; }
-
- Ref<WebKitCSSTransformValue> cloneForCSSOM() const;
-
-private:
- WebKitCSSTransformValue(TransformOperationType);
- WebKitCSSTransformValue(const WebKitCSSTransformValue& cloneFrom);
-
- TransformOperationType m_type;
-};
-
-} // namespace WebCore
-
-SPECIALIZE_TYPE_TRAITS_CSS_VALUE(WebKitCSSTransformValue, isWebKitCSSTransformValue())
Deleted: trunk/Source/WebCore/css/WebKitCSSTransformValue.idl (209804 => 209805)
--- trunk/Source/WebCore/css/WebKitCSSTransformValue.idl 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/WebKitCSSTransformValue.idl 2016-12-14 16:34:48 UTC (rev 209805)
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- DoNotCheckConstants,
- ImplementationLacksVTable,
-] interface WebKitCSSTransformValue : CSSValueList {
-
- // OperationTypes
-
- const unsigned short CSS_TRANSLATE = 1;
- const unsigned short CSS_TRANSLATEX = 2;
- const unsigned short CSS_TRANSLATEY = 3;
- const unsigned short CSS_ROTATE = 4;
- const unsigned short CSS_SCALE = 5;
- const unsigned short CSS_SCALEX = 6;
- const unsigned short CSS_SCALEY = 7;
- const unsigned short CSS_SKEW = 8;
- const unsigned short CSS_SKEWX = 9;
- const unsigned short CSS_SKEWY = 10;
- const unsigned short CSS_MATRIX = 11;
- const unsigned short CSS_TRANSLATEZ = 12;
- const unsigned short CSS_TRANSLATE3D = 13;
- const unsigned short CSS_ROTATEX = 14;
- const unsigned short CSS_ROTATEY = 15;
- const unsigned short CSS_ROTATEZ = 16;
- const unsigned short CSS_ROTATE3D = 17;
- const unsigned short CSS_SCALEZ = 18;
- const unsigned short CSS_SCALE3D = 19;
- const unsigned short CSS_PERSPECTIVE = 20;
- const unsigned short CSS_MATRIX3D = 21;
-
- readonly attribute unsigned short operationType;
-
- getter CSSValue (unsigned long index);
-};
-
Modified: trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/parser/CSSParserFastPaths.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -43,7 +43,6 @@
#include "StyleColor.h"
#include "StylePropertyShorthand.h"
#include "StyleSheetContents.h"
-#include "WebKitCSSTransformValue.h"
namespace WebCore {
@@ -1064,7 +1063,7 @@
}
template <typename CharType>
-static bool parseTransformTranslateArguments(CharType*& pos, CharType* end, unsigned expectedCount, WebKitCSSTransformValue* transformValue)
+static bool parseTransformTranslateArguments(CharType*& pos, CharType* end, unsigned expectedCount, CSSFunctionValue* transformValue)
{
while (expectedCount) {
size_t delimiter = WTF::find(pos, end - pos, expectedCount == 1 ? ')' : ',');
@@ -1077,7 +1076,7 @@
return false;
if (!number && unit == CSSPrimitiveValue::CSS_NUMBER)
unit = CSSPrimitiveValue::UnitType::CSS_PX;
- if (unit == CSSPrimitiveValue::UnitType::CSS_NUMBER || (unit == CSSPrimitiveValue::UnitType::CSS_PERCENTAGE && (transformValue->operationType() == WebKitCSSTransformValue::TranslateZTransformOperation || (transformValue->operationType() == WebKitCSSTransformValue::Translate3DTransformOperation && expectedCount == 1))))
+ if (unit == CSSPrimitiveValue::UnitType::CSS_NUMBER || (unit == CSSPrimitiveValue::UnitType::CSS_PERCENTAGE && (transformValue->name() == CSSValueTranslatez || (transformValue->name() == CSSValueTranslate3d && expectedCount == 1))))
return false;
transformValue->append(CSSPrimitiveValue::create(number, unit));
pos += argumentLength + 1;
@@ -1087,7 +1086,7 @@
}
template <typename CharType>
-static bool parseTransformNumberArguments(CharType*& pos, CharType* end, unsigned expectedCount, WebKitCSSTransformValue* transformValue)
+static bool parseTransformNumberArguments(CharType*& pos, CharType* end, unsigned expectedCount, CSSFunctionValue* transformValue)
{
while (expectedCount) {
size_t delimiter = WTF::find(pos, end - pos, expectedCount == 1 ? ')' : ',');
@@ -1107,9 +1106,8 @@
static const int kShortestValidTransformStringLength = 12;
-// FIXME-NEWPARSER: Should use CSSFunctionValue and ditch WebkitCSSTransformValue.
template <typename CharType>
-static RefPtr<WebKitCSSTransformValue> parseSimpleTransformValue(CharType*& pos, CharType* end)
+static RefPtr<CSSFunctionValue> parseSimpleTransformValue(CharType*& pos, CharType* end)
{
if (end - pos < kShortestValidTransformStringLength)
return nullptr;
@@ -1125,22 +1123,22 @@
&& toASCIILower(pos[8]) == 'e';
if (isTranslate) {
- WebKitCSSTransformValue::TransformOperationType transformType;
+ CSSValueID transformType;
unsigned expectedArgumentCount = 1;
unsigned argumentStart = 11;
CharType c9 = toASCIILower(pos[9]);
if (c9 == 'x' && pos[10] == '(') {
- transformType = WebKitCSSTransformValue::TranslateXTransformOperation;
+ transformType = CSSValueTranslatex;
} else if (c9 == 'y' && pos[10] == '(') {
- transformType = WebKitCSSTransformValue::TranslateYTransformOperation;
+ transformType = CSSValueTranslatey;
} else if (c9 == 'z' && pos[10] == '(') {
- transformType = WebKitCSSTransformValue::TranslateZTransformOperation;
+ transformType = CSSValueTranslatez;
} else if (c9 == '(') {
- transformType = WebKitCSSTransformValue::TranslateTransformOperation;
+ transformType = CSSValueTranslate;
expectedArgumentCount = 2;
argumentStart = 10;
} else if (c9 == '3' && toASCIILower(pos[10]) == 'd' && pos[11] == '(') {
- transformType = WebKitCSSTransformValue::Translate3DTransformOperation;
+ transformType = CSSValueTranslate3d;
expectedArgumentCount = 3;
argumentStart = 12;
} else {
@@ -1147,7 +1145,7 @@
return nullptr;
}
pos += argumentStart;
- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(transformType);
+ RefPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(transformType);
if (!parseTransformTranslateArguments(pos, end, expectedArgumentCount, transformValue.get()))
return nullptr;
return transformValue;
@@ -1165,7 +1163,7 @@
if (isMatrix3d) {
pos += 9;
- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue::Matrix3DTransformOperation);
+ RefPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(CSSValueMatrix3d);
if (!parseTransformNumberArguments(pos, end, 16, transformValue.get()))
return nullptr;
return transformValue;
@@ -1182,7 +1180,7 @@
if (isScale3d) {
pos += 8;
- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(WebKitCSSTransformValue::Scale3DTransformOperation);
+ RefPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(CSSValueScale3d);
if (!parseTransformNumberArguments(pos, end, 3, transformValue.get()))
return nullptr;
return transformValue;
@@ -1251,7 +1249,7 @@
++pos;
if (pos >= end)
break;
- RefPtr<WebKitCSSTransformValue> transformValue = parseSimpleTransformValue(pos, end);
+ RefPtr<CSSFunctionValue> transformValue = parseSimpleTransformValue(pos, end);
if (!transformValue)
return nullptr;
if (!transformList)
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (209804 => 209805)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-12-14 16:19:05 UTC (rev 209804)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2016-12-14 16:34:48 UTC (rev 209805)
@@ -80,7 +80,6 @@
#include "SVGPathUtilities.h"
#include "StylePropertyShorthand.h"
#include "StylePropertyShorthandFunctions.h"
-#include "WebKitCSSTransformValue.h"
#include <bitset>
#include <memory>
#include <wtf/text/StringBuilder.h>
@@ -1712,7 +1711,7 @@
return consumeLineWidth(range, cssParserMode, UnitlessQuirk::Forbid);
}
-static bool consumeTranslate3d(CSSParserTokenRange& args, CSSParserMode cssParserMode, RefPtr<WebKitCSSTransformValue>& transformValue)
+static bool consumeTranslate3d(CSSParserTokenRange& args, CSSParserMode cssParserMode, RefPtr<CSSFunctionValue>& transformValue)
{
unsigned numberOfArguments = 2;
RefPtr<CSSValue> parsedValue;
@@ -1731,7 +1730,7 @@
return true;
}
-static bool consumeNumbers(CSSParserTokenRange& args, RefPtr<WebKitCSSTransformValue>& transformValue, unsigned numberOfArguments)
+static bool consumeNumbers(CSSParserTokenRange& args, RefPtr<CSSFunctionValue>& transformValue, unsigned numberOfArguments)
{
do {
RefPtr<CSSPrimitiveValue> parsedValue = consumeNumber(args, ValueRangeAll);
@@ -1744,7 +1743,7 @@
return true;
}
-static bool consumePerspective(CSSParserTokenRange& args, CSSParserMode cssParserMode, RefPtr<WebKitCSSTransformValue>& transformValue)
+static bool consumePerspective(CSSParserTokenRange& args, CSSParserMode cssParserMode, RefPtr<CSSFunctionValue>& transformValue)
{
RefPtr<CSSPrimitiveValue> parsedValue = consumeLength(args, cssParserMode, ValueRangeNonNegative);
if (!parsedValue) {
@@ -1759,58 +1758,6 @@
return true;
}
-// FIXME-NEWPARSER: This has no reason to exist once we eliminate WebkitCSSTransformValue in favor
-// of CSSFunctionValue.
-static WebKitCSSTransformValue::TransformOperationType transformOperationForCSSValueID(CSSValueID functionId)
-{
- switch (functionId) {
- case CSSValueRotate:
- return WebKitCSSTransformValue::RotateTransformOperation;
- case CSSValueRotatex:
- return WebKitCSSTransformValue::RotateXTransformOperation;
- case CSSValueRotatey:
- return WebKitCSSTransformValue::RotateYTransformOperation;
- case CSSValueRotatez:
- return WebKitCSSTransformValue::RotateZTransformOperation;
- case CSSValueSkewx:
- return WebKitCSSTransformValue::SkewXTransformOperation;
- case CSSValueSkewy:
- return WebKitCSSTransformValue::SkewYTransformOperation;
- case CSSValueSkew:
- return WebKitCSSTransformValue::SkewTransformOperation;
- case CSSValueScalex:
- return WebKitCSSTransformValue::ScaleXTransformOperation;
- case CSSValueScaley:
- return WebKitCSSTransformValue::ScaleYTransformOperation;
- case CSSValueScalez:
- return WebKitCSSTransformValue::ScaleZTransformOperation;
- case CSSValueScale:
- return WebKitCSSTransformValue::ScaleTransformOperation;
- case CSSValuePerspective:
- return WebKitCSSTransformValue::PerspectiveTransformOperation;
- case CSSValueTranslatex:
- return WebKitCSSTransformValue::TranslateXTransformOperation;
- case CSSValueTranslatey:
- return WebKitCSSTransformValue::TranslateYTransformOperation;
- case CSSValueTranslate:
- return WebKitCSSTransformValue::TranslateTransformOperation;
- case CSSValueTranslatez:
- return WebKitCSSTransformValue::TranslateZTransformOperation;
- case CSSValueMatrix:
- return WebKitCSSTransformValue::MatrixTransformOperation;
- case CSSValueMatrix3d:
- return WebKitCSSTransformValue::Matrix3DTransformOperation;
- case CSSValueScale3d:
- return WebKitCSSTransformValue::Scale3DTransformOperation;
- case CSSValueRotate3d:
- return WebKitCSSTransformValue::Rotate3DTransformOperation;
- case CSSValueTranslate3d:
- return WebKitCSSTransformValue::Translate3DTransformOperation;
- default:
- return WebKitCSSTransformValue::UnknownTransformOperation;
- }
-}
-
static RefPtr<CSSValue> consumeTransformValue(CSSParserTokenRange& range, CSSParserMode cssParserMode)
{
CSSValueID functionId = range.peek().functionId();
@@ -1820,9 +1767,7 @@
if (args.atEnd())
return nullptr;
- // FIXME-NEWPARSER: Do we really need WebkitCSSTransformValue? A CSSFunctionValue is good
- // enough and has the CSSValueID as the operation type. Blink has eliminated it.
- RefPtr<WebKitCSSTransformValue> transformValue = WebKitCSSTransformValue::create(transformOperationForCSSValueID(functionId));
+ RefPtr<CSSFunctionValue> transformValue = CSSFunctionValue::create(functionId);
RefPtr<CSSValue> parsedValue;
switch (functionId) {
case CSSValueRotate: