Title: [261752] trunk
Revision
261752
Author
[email protected]
Date
2020-05-15 11:45:43 -0700 (Fri, 15 May 2020)

Log Message

The initial value of "transform-box" should be "view-box"
https://bugs.webkit.org/show_bug.cgi?id=211927

Patch by Said Abou-Hallawa <[email protected]> on 2020-05-15
Reviewed by Simon Fraser.

Source/WebCore:

Specs: https://drafts.csswg.org/css-transforms/#transform-box.

Test: svg/transforms/svg-transform-box-initial.html

* css/CSSProperties.json:
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::initialTransformBox):

LayoutTests:

* fast/css/transform-box-parsing-expected.txt:
* fast/css/transform-box-parsing.html:
* svg/transforms/svg-transform-box-initial-expected.html: Added.
* svg/transforms/svg-transform-box-initial.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (261751 => 261752)


--- trunk/LayoutTests/ChangeLog	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/LayoutTests/ChangeLog	2020-05-15 18:45:43 UTC (rev 261752)
@@ -1,3 +1,15 @@
+2020-05-15  Said Abou-Hallawa  <[email protected]>
+
+        The initial value of "transform-box" should be "view-box"
+        https://bugs.webkit.org/show_bug.cgi?id=211927
+
+        Reviewed by Simon Fraser.
+
+        * fast/css/transform-box-parsing-expected.txt:
+        * fast/css/transform-box-parsing.html:
+        * svg/transforms/svg-transform-box-initial-expected.html: Added.
+        * svg/transforms/svg-transform-box-initial.html: Added.
+
 2020-05-15  Jason Lawrence  <[email protected]>
 
         REGRESSION: [ iOS wk2 Debug ] multiple fast/text/international/system-language tests are flaky crashing - WTFCrashWithInfo - WebKit::ResourceLoadStatisticsDatabaseStore::openAndUpdateSchemaIfNecessary()

Modified: trunk/LayoutTests/fast/css/transform-box-parsing-expected.txt (261751 => 261752)


--- trunk/LayoutTests/fast/css/transform-box-parsing-expected.txt	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/LayoutTests/fast/css/transform-box-parsing-expected.txt	2020-05-15 18:45:43 UTC (rev 261752)
@@ -9,7 +9,7 @@
 PASS testPropertyValue("transform-box: content-box", "transform-box") is "content-box"
 PASS testPropertyValue("transform-box: stroke-box", "transform-box") is "stroke-box"
 
-PASS testComputedStyle("", "transform-box") is "border-box"
+PASS testComputedStyle("", "transform-box") is "view-box"
 PASS testComputedStyle("transform-box: fill-box", "transform-box") is "fill-box"
 PASS testComputedStyle("transform-box: view-box", "transform-box") is "view-box"
 PASS testComputedStyle("transform-box: content-box", "transform-box") is "content-box"
@@ -24,9 +24,9 @@
 PASS testComputedStyleOnElementWithId("foreignObject") is "view-box"
 
 Test default value on elements with CSS layout boxes
-PASS testComputedStyleOnElementWithId("svgRoot") is "border-box"
-PASS testComputedStyleOnElementWithId("nested-svg") is "border-box"
-PASS testComputedStyleOnElementWithId("inside-foreign-object") is "border-box"
+PASS testComputedStyleOnElementWithId("svgRoot") is "view-box"
+PASS testComputedStyleOnElementWithId("nested-svg") is "view-box"
+PASS testComputedStyleOnElementWithId("inside-foreign-object") is "view-box"
 
 PASS successfullyParsed is true
 

Modified: trunk/LayoutTests/fast/css/transform-box-parsing.html (261751 => 261752)


--- trunk/LayoutTests/fast/css/transform-box-parsing.html	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/LayoutTests/fast/css/transform-box-parsing.html	2020-05-15 18:45:43 UTC (rev 261752)
@@ -66,7 +66,7 @@
         shouldBeEqualToString('testPropertyValue("transform-box: stroke-box", "transform-box")', 'stroke-box');
 
         debug('');
-        shouldBeEqualToString('testComputedStyle("", "transform-box")', 'border-box');
+        shouldBeEqualToString('testComputedStyle("", "transform-box")', 'view-box');
         shouldBeEqualToString('testComputedStyle("transform-box: fill-box", "transform-box")', 'fill-box');
         shouldBeEqualToString('testComputedStyle("transform-box: view-box", "transform-box")', 'view-box');
         shouldBeEqualToString('testComputedStyle("transform-box: content-box", "transform-box")', 'content-box');
@@ -84,9 +84,9 @@
 
         debug('');
         debug('Test default value on elements with CSS layout boxes');
-        shouldBeEqualToString('testComputedStyleOnElementWithId("svgRoot")', 'border-box');
-        shouldBeEqualToString('testComputedStyleOnElementWithId("nested-svg")', 'border-box');
-        shouldBeEqualToString('testComputedStyleOnElementWithId("inside-foreign-object")', 'border-box');
+        shouldBeEqualToString('testComputedStyleOnElementWithId("svgRoot")', 'view-box');
+        shouldBeEqualToString('testComputedStyleOnElementWithId("nested-svg")', 'view-box');
+        shouldBeEqualToString('testComputedStyleOnElementWithId("inside-foreign-object")', 'view-box');
 
         debug('');
     </script>

Added: trunk/LayoutTests/svg/transforms/svg-transform-box-initial-expected.html (0 => 261752)


--- trunk/LayoutTests/svg/transforms/svg-transform-box-initial-expected.html	                        (rev 0)
+++ trunk/LayoutTests/svg/transforms/svg-transform-box-initial-expected.html	2020-05-15 18:45:43 UTC (rev 261752)
@@ -0,0 +1,11 @@
+<style>
+    .box {
+        display: inline-block;
+        background-color: green;
+        width: 100px;
+        height: 100px;
+    }
+</style>
+<body>
+    <div class="box"></div>
+</body>

Added: trunk/LayoutTests/svg/transforms/svg-transform-box-initial.html (0 => 261752)


--- trunk/LayoutTests/svg/transforms/svg-transform-box-initial.html	                        (rev 0)
+++ trunk/LayoutTests/svg/transforms/svg-transform-box-initial.html	2020-05-15 18:45:43 UTC (rev 261752)
@@ -0,0 +1,31 @@
+<style>
+    rect {
+        transition: transform 50ms;
+        transform-box: unset;
+        transform-origin: 0px 0px;
+        fill: green;
+    }
+
+    rect.animated {
+        transform: rotate(-180deg);
+    }
+</style>
+<body>
+    <svg>
+        <rect id="rect" x="-100" y="-100" width="100" height="100" />
+    </svg>
+    <script>
+        if (window.testRunner)
+            testRunner.waitUntilDone();
+
+        window.addEventListener('load', () => {
+            const rect = document.querySelector('#rect');
+            rect.classList.add("animated");
+
+            rect.addEventListener('transitionend', () => {
+            if (window.testRunner)
+                testRunner.notifyDone();
+            });
+        });
+    </script>
+</body>

Modified: trunk/Source/WebCore/ChangeLog (261751 => 261752)


--- trunk/Source/WebCore/ChangeLog	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/Source/WebCore/ChangeLog	2020-05-15 18:45:43 UTC (rev 261752)
@@ -1,3 +1,18 @@
+2020-05-15  Said Abou-Hallawa  <[email protected]>
+
+        The initial value of "transform-box" should be "view-box"
+        https://bugs.webkit.org/show_bug.cgi?id=211927
+
+        Reviewed by Simon Fraser.
+
+        Specs: https://drafts.csswg.org/css-transforms/#transform-box.
+
+        Test: svg/transforms/svg-transform-box-initial.html
+
+        * css/CSSProperties.json:
+        * rendering/style/RenderStyle.h:
+        (WebCore::RenderStyle::initialTransformBox):
+
 2020-05-15  Andres Gonzalez  <[email protected]>
 
         Fix for crash in accessibility/mac/replace-text-with-range-on-webarea-element.html in isolated tree mode.

Modified: trunk/Source/WebCore/css/CSSProperties.json (261751 => 261752)


--- trunk/Source/WebCore/css/CSSProperties.json	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/Source/WebCore/css/CSSProperties.json	2020-05-15 18:45:43 UTC (rev 261752)
@@ -6385,13 +6385,14 @@
         },
         "transform-box": {
             "values" : [
+                "content-box",
                 "border-box",
                 "fill-box",
-                "view-box",
                 "stroke-box",
-                "content-box"
+                "view-box"
             ],
             "codegen-properties": {
+                "initial": "initialTransformBox"
             },
             "specification": {
                 "category": "css-transforms",

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (261751 => 261752)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2020-05-15 18:33:21 UTC (rev 261751)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2020-05-15 18:45:43 UTC (rev 261752)
@@ -1586,7 +1586,7 @@
     static const TransformOperations& initialTransform() { static NeverDestroyed<TransformOperations> ops; return ops; }
     static Length initialTransformOriginX() { return Length(50.0f, Percent); }
     static Length initialTransformOriginY() { return Length(50.0f, Percent); }
-    static TransformBox initialTransformBox() { return TransformBox::BorderBox; }
+    static TransformBox initialTransformBox() { return TransformBox::ViewBox; }
     static PointerEvents initialPointerEvents() { return PointerEvents::Auto; }
     static float initialTransformOriginZ() { return 0; }
     static TransformStyle3D initialTransformStyle3D() { return TransformStyle3D::Flat; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to