Title: [294620] trunk
Revision
294620
Author
an...@apple.com
Date
2022-05-22 07:36:15 -0700 (Sun, 22 May 2022)

Log Message

REGRESSION(r293956): Bad color inheritance due to disallowsFastPathInheritance bit missing from RenderStyle::copyNonInheritedFrom
https://bugs.webkit.org/show_bug.cgi?id=240770

Reviewed by Alan Bujtas.

Test: fast/css/color-inheritance-dynamic.html

* Source/WebCore/rendering/style/RenderStyle.h:
(WebCore::RenderStyle::NonInheritedFlags::copyNonInheritedFrom):

Add it.

* LayoutTests/fast/css/color-inheritance-dynamic-expected.html: Added.
* LayoutTests/fast/css/color-inheritance-dynamic.html: Added.

Canonical link: https://commits.webkit.org/250846@main

Modified Paths

Added Paths

Diff

Added: trunk/LayoutTests/fast/css/color-inheritance-dynamic-expected.html (0 => 294620)


--- trunk/LayoutTests/fast/css/color-inheritance-dynamic-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/color-inheritance-dynamic-expected.html	2022-05-22 14:36:15 UTC (rev 294620)
@@ -0,0 +1,5 @@
+<!DOCTYPE html>
+<html>
+<body style="font-family: ahem; font-size: 50px">
+<span style="color:green">A</span><span style="color:green">B</span><span style="color:blue">C</span>
+</html>

Added: trunk/LayoutTests/fast/css/color-inheritance-dynamic.html (0 => 294620)


--- trunk/LayoutTests/fast/css/color-inheritance-dynamic.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/color-inheritance-dynamic.html	2022-05-22 14:36:15 UTC (rev 294620)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body style="font-family: ahem; font-size: 50px">
+<span style="color:green">A</span><span style="color:green">B</span><span>C</span>
+<script>
+document.body.offsetTop;
+document.body.style.color = "blue";
+</script>
+</html>

Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (294619 => 294620)


--- trunk/Source/WebCore/rendering/style/RenderStyle.h	2022-05-22 10:00:56 UTC (rev 294619)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h	2022-05-22 14:36:15 UTC (rev 294620)
@@ -2167,6 +2167,7 @@
     tableLayout = other.tableLayout;
     hasViewportUnits = other.hasViewportUnits;
     hasExplicitlyInheritedProperties = other.hasExplicitlyInheritedProperties;
+    disallowsFastPathInheritance = other.disallowsFastPathInheritance;
 
     // Unlike properties tracked by the other hasExplicitlySet* flags, border-radius is non-inherited
     // and we need to remember whether it's been explicitly set when copying m_surroundData.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to