Title: [276370] trunk
Revision
276370
Author
[email protected]
Date
2021-04-21 10:08:28 -0700 (Wed, 21 Apr 2021)

Log Message

RenderGeometryMap should know about individual transform properties
https://bugs.webkit.org/show_bug.cgi?id=224856

Patch by Rob Buis <[email protected]> on 2021-04-21
Reviewed by Simon Fraser.

Source/WebCore:

RenderGeometryMap should know about individual transform properties.

Test: fast/transforms/textarea-individual-transform-properties-crash.html

* rendering/RenderGeometryMap.cpp:
(WebCore::RenderGeometryMap::mapToContainer const):
(WebCore::canMapBetweenRenderersViaLayers):

LayoutTests:

Add test for this.

* fast/transforms/textarea-individual-transform-properties-crash-expected.txt: Added.
* fast/transforms/textarea-individual-transform-properties-crash.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (276369 => 276370)


--- trunk/LayoutTests/ChangeLog	2021-04-21 16:37:10 UTC (rev 276369)
+++ trunk/LayoutTests/ChangeLog	2021-04-21 17:08:28 UTC (rev 276370)
@@ -1,3 +1,15 @@
+2021-04-21  Rob Buis  <[email protected]>
+
+        RenderGeometryMap should know about individual transform properties
+        https://bugs.webkit.org/show_bug.cgi?id=224856
+
+        Reviewed by Simon Fraser.
+
+        Add test for this.
+
+        * fast/transforms/textarea-individual-transform-properties-crash-expected.txt: Added.
+        * fast/transforms/textarea-individual-transform-properties-crash.html: Added.
+
 2021-04-21  Aditya Keerthi  <[email protected]>
 
         [iOS][FCR] <select> decorations should match the text color

Added: trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash-expected.txt (0 => 276370)


--- trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash-expected.txt	2021-04-21 17:08:28 UTC (rev 276370)
@@ -0,0 +1 @@
+Apply individual transform properties to textarea. This should not crash.

Added: trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash.html (0 => 276370)


--- trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash.html	                        (rev 0)
+++ trunk/LayoutTests/fast/transforms/textarea-individual-transform-properties-crash.html	2021-04-21 17:08:28 UTC (rev 276370)
@@ -0,0 +1,15 @@
+<html>
+  <head>
+    <script>
+      if (window.testRunner)
+        testRunner.dumpAsText();
+    </script>
+    </style>
+  </head>
+<body>
+    Apply individual transform properties to textarea. This should not crash.
+    <textarea style="translate: 1px 0px"></textarea>
+    <textarea style="scale: 2"></textarea>
+    <textarea style="rotate: 45deg"></textarea>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (276369 => 276370)


--- trunk/Source/WebCore/ChangeLog	2021-04-21 16:37:10 UTC (rev 276369)
+++ trunk/Source/WebCore/ChangeLog	2021-04-21 17:08:28 UTC (rev 276370)
@@ -1,3 +1,18 @@
+2021-04-21  Rob Buis  <[email protected]>
+
+        RenderGeometryMap should know about individual transform properties
+        https://bugs.webkit.org/show_bug.cgi?id=224856
+
+        Reviewed by Simon Fraser.
+
+        RenderGeometryMap should know about individual transform properties.
+
+        Test: fast/transforms/textarea-individual-transform-properties-crash.html
+
+        * rendering/RenderGeometryMap.cpp:
+        (WebCore::RenderGeometryMap::mapToContainer const):
+        (WebCore::canMapBetweenRenderersViaLayers):
+
 2021-04-21  Don Olmstead  <[email protected]>
 
         [CMake] Add OpenGLES2 targets

Modified: trunk/Source/WebCore/rendering/RenderGeometryMap.cpp (276369 => 276370)


--- trunk/Source/WebCore/rendering/RenderGeometryMap.cpp	2021-04-21 16:37:10 UTC (rev 276369)
+++ trunk/Source/WebCore/rendering/RenderGeometryMap.cpp	2021-04-21 17:08:28 UTC (rev 276370)
@@ -105,7 +105,7 @@
 #if ASSERT_ENABLED
     FloatPoint rendererMappedResult = m_mapping.last().m_renderer->localToAbsolute(p, m_mapCoordinatesFlags);
 #endif
-    
+
     if (!hasFixedPositionStep() && !hasTransformStep() && !hasNonUniformStep() && (!container || (m_mapping.size() && container == m_mapping[0].m_renderer))) {
         result = p + roundedIntSize(m_accumulatedOffset);
         // Should convert to a LayoutPoint because of the uniqueness of LayoutUnit::round
@@ -154,7 +154,7 @@
         if (current->isFixedPositioned() || style.isFlippedBlocksWritingMode())
             return false;
 
-        if (current->hasTransformRelatedProperty() && (current->style().hasTransform() || current->style().hasPerspective()))
+        if (current->hasTransformRelatedProperty() && !current->style().preserves3D())
             return false;
         
         if (current->isRenderFragmentedFlow())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to