Title: [277385] trunk
- Revision
- 277385
- Author
- [email protected]
- Date
- 2021-05-12 13:13:55 -0700 (Wed, 12 May 2021)
Log Message
Removing the transform CSS property from the SVG element does not cause invalidation
https://bugs.webkit.org/show_bug.cgi?id=225366
Reviewed by Simon Fraser.
Source/WebCore:
If the new or the old RenderStyle includes a transform, the renderer of
the SVG element needs to be repainted.
Test: svg/css/svg-css-transform-dynamic-remove.html
* rendering/svg/RenderSVGModelObject.cpp:
(WebCore::RenderSVGModelObject::styleDidChange):
LayoutTests:
* svg/css/svg-css-transform-dynamic-remove-expected.html: Added.
* svg/css/svg-css-transform-dynamic-remove.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (277384 => 277385)
--- trunk/LayoutTests/ChangeLog 2021-05-12 20:11:20 UTC (rev 277384)
+++ trunk/LayoutTests/ChangeLog 2021-05-12 20:13:55 UTC (rev 277385)
@@ -1,3 +1,13 @@
+2021-05-12 Said Abou-Hallawa <[email protected]>
+
+ Removing the transform CSS property from the SVG element does not cause invalidation
+ https://bugs.webkit.org/show_bug.cgi?id=225366
+
+ Reviewed by Simon Fraser.
+
+ * svg/css/svg-css-transform-dynamic-remove-expected.html: Added.
+ * svg/css/svg-css-transform-dynamic-remove.html: Added.
+
2021-05-12 Sergio Villar Senin <[email protected]>
ASSERTION FAILED: m_clients.contains(&client) in CSSFontFace::removeClient via CSSSegmentedFontFace::~CSSSegmentedFontFace()
Added: trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove-expected.html (0 => 277385)
--- trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove-expected.html (rev 0)
+++ trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove-expected.html 2021-05-12 20:13:55 UTC (rev 277385)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<style>
+ .green-box {
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+</style>
+<body>
+ <div class="green-box"></div>
+</body>
Added: trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove.html (0 => 277385)
--- trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove.html (rev 0)
+++ trunk/LayoutTests/svg/css/svg-css-transform-dynamic-remove.html 2021-05-12 20:13:55 UTC (rev 277385)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<style>
+ .container[min-width~="400px"] g {
+ transform: translate(-100px, 0);
+ }
+</style>
+<body>
+ <div class="container" min-width="400px">
+ <svg>
+ <g>
+ <rect width="100" height="100" fill="green"/>
+ </g>
+ </svg>
+ </div>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+ requestAnimationFrame(() => {
+ const container = document.querySelector(".container");
+ container.removeAttribute("min-width");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ });
+ </script>
+</body>
Modified: trunk/Source/WebCore/ChangeLog (277384 => 277385)
--- trunk/Source/WebCore/ChangeLog 2021-05-12 20:11:20 UTC (rev 277384)
+++ trunk/Source/WebCore/ChangeLog 2021-05-12 20:13:55 UTC (rev 277385)
@@ -1,3 +1,18 @@
+2021-05-12 Said Abou-Hallawa <[email protected]>
+
+ Removing the transform CSS property from the SVG element does not cause invalidation
+ https://bugs.webkit.org/show_bug.cgi?id=225366
+
+ Reviewed by Simon Fraser.
+
+ If the new or the old RenderStyle includes a transform, the renderer of
+ the SVG element needs to be repainted.
+
+ Test: svg/css/svg-css-transform-dynamic-remove.html
+
+ * rendering/svg/RenderSVGModelObject.cpp:
+ (WebCore::RenderSVGModelObject::styleDidChange):
+
2021-05-12 Sam Weinig <[email protected]>
Remove inline annoatations for static functions in PixelBufferConversion
Modified: trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp (277384 => 277385)
--- trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp 2021-05-12 20:11:20 UTC (rev 277384)
+++ trunk/Source/WebCore/rendering/svg/RenderSVGModelObject.cpp 2021-05-12 20:13:55 UTC (rev 277385)
@@ -101,7 +101,7 @@
{
if (diff == StyleDifference::Layout) {
setNeedsBoundariesUpdate();
- if (style().hasTransform())
+ if (style().hasTransform() || (oldStyle && oldStyle->hasTransform()))
setNeedsTransformUpdate();
}
RenderElement::styleDidChange(diff, oldStyle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes