Title: [272601] trunk/Source/WebCore
Revision
272601
Author
[email protected]
Date
2021-02-09 12:24:36 -0800 (Tue, 09 Feb 2021)

Log Message

[LFC][Integration] Style change on an inline box should trigger invalidation
https://bugs.webkit.org/show_bug.cgi?id=221573

Reviewed by Antti Koivisto.

Invalidate the line layout path when the inline box (RenderInline) needs layout.
e.g. the font-family property change in imported/w3c/web-platform-tests/css/css-fonts/generic-family-keywords-001.html
(This is sadly a full invalidation at this point.)

* rendering/RenderInline.cpp:
(WebCore::RenderInline::styleDidChange):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (272600 => 272601)


--- trunk/Source/WebCore/ChangeLog	2021-02-09 20:21:09 UTC (rev 272600)
+++ trunk/Source/WebCore/ChangeLog	2021-02-09 20:24:36 UTC (rev 272601)
@@ -1,3 +1,17 @@
+2021-02-09  Zalan Bujtas  <[email protected]>
+
+        [LFC][Integration] Style change on an inline box should trigger invalidation
+        https://bugs.webkit.org/show_bug.cgi?id=221573
+
+        Reviewed by Antti Koivisto.
+
+        Invalidate the line layout path when the inline box (RenderInline) needs layout.
+        e.g. the font-family property change in imported/w3c/web-platform-tests/css/css-fonts/generic-family-keywords-001.html
+        (This is sadly a full invalidation at this point.)
+
+        * rendering/RenderInline.cpp:
+        (WebCore::RenderInline::styleDidChange):
+
 2021-02-09  Aditya Keerthi  <[email protected]>
 
         [iOS][FCR] Use UIColorPickerViewController for color inputs

Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (272600 => 272601)


--- trunk/Source/WebCore/rendering/RenderInline.cpp	2021-02-09 20:21:09 UTC (rev 272600)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp	2021-02-09 20:24:36 UTC (rev 272601)
@@ -197,8 +197,14 @@
 
 #if ENABLE(LAYOUT_FORMATTING_CONTEXT)
     if (diff >= StyleDifference::Repaint) {
-        if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this))
-            lineLayout->updateStyle(*this);
+        if (auto* lineLayout = LayoutIntegration::LineLayout::containing(*this)) {
+            if (selfNeedsLayout()) {
+                // FIXME: Add support for partial invalidation.
+                if (auto* container = LayoutIntegration::LineLayout::blockContainer(*this))
+                    container->invalidateLineLayoutPath();
+            } else
+                lineLayout->updateStyle(*this);
+        }
     }
 #endif
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to