Bug 248567 - SVG text is always underlined when SVG is wrapped by an A element
Summary: SVG text is always underlined when SVG is wrapped by an A element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-11-30 15:46 PST by Ahmad Saleem
Modified: 2023-06-06 06:03 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-11-30 15:46:27 PST
Hi Team,

While going through Blink's commit, I came across another failing test case in Safari:

Failing Test case - https://jsfiddle.net/fhcw9w50/2/

^ "Some Text" should not be underlined like other browsers.

Blink Commit - https://src.chromium.org/viewvc/blink?view=revision&revision=199132

Just wanted to raise bug so it can be fixed in future.

Thanks!
Comment 1 Ahmad Saleem 2022-11-30 15:52:29 PST
Note - this is not 1:1 because this commit changed the code:

https://github.com/WebKit/WebKit/commit/af6b61d40471b08d5d6c1acb90c5d533d92805d8
Comment 2 Radar WebKit Bug Importer 2022-12-07 15:47:17 PST
<rdar://problem/103093226>
Comment 3 Ahmad Saleem 2023-06-05 11:25:20 PDT
Fixed it locally by adding following:

in StyleAdjuster.cpp

static bool isOutermostSVGElement (const Element* element)
{
    return element && element->isSVGElement() && downcast<SVGElement>(*element).isOutermostSVGSVGElement();
}

and

following in 'shouldInheritTextDecorationsInEffect':

if (isOutermostSVGElement(element))
        return false;
Comment 4 EWS 2023-06-06 06:03:43 PDT
Committed 264894@main (b3a3c589507e): <https://commits.webkit.org/264894@main>

Reviewed commits have been landed. Closing PR #14681 and removing active labels.