Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 84a4a18b9d5d794f8cc440c2640ab2dc4851789e
https://github.com/WebKit/WebKit/commit/84a4a18b9d5d794f8cc440c2640ab2dc4851789e
Author: Sammy Gill <[email protected]>
Date: 2024-11-11 (Mon, 11 Nov 2024)
Changed paths:
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-svg-text-expected.html
A
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-svg-text.html
M Source/WebCore/rendering/svg/RenderSVGText.cpp
M Source/WebCore/rendering/svg/RenderSVGText.h
Log Message:
-----------
thesession.org: [content-visibility] SVG text not shown in
content-visibility: auto subtree.
https://bugs.webkit.org/show_bug.cgi?id=281570
rdar://138040315
Reviewed by Alan Baradlay.
RenderSVGText expects to be able to perform some sort of initialization on its
first pass
of layout by checking everHadLayout(). Unfortunately, if this renderer is in a
content-visibility: auto subtree, the content-visibility logic will descend
down that
subtree, clearing layout on all the renderers, which ends up setting the "ever
had layout,"
bit. This ends up confusing RenderSVGText since it thinks it has gone through
layout and
assumes that it had performed this initialization, which can result in us not
computing
the proper geometry for the content.
To address this, let's keep track of a bit on RenderSVGText that indicates if
it has ever
performed a full pass of layout. We can use this in the same places we were
previously
using everHadLayout().
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-svg-text-expected.html:
Added.
*
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/content-visibility/content-visibility-auto-svg-text.html:
Added.
* Source/WebCore/rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::shouldHandleSubtreeMutations const):
(WebCore::RenderSVGText::subtreeTextDidChange):
(WebCore::RenderSVGText::layout):
* Source/WebCore/rendering/svg/RenderSVGText.h:
Canonical link: https://commits.webkit.org/286447@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes