Commit 1018cb1
<view> elements should apply to the root element
https://bugs.webkit.org/show_bug.cgi?id=298206
Reviewed by Said Abou-Hallawa.
This patch aligns WebKit with Gecko / Firefox and Blink / Chromium.
Inspired by: https://chromium.googlesource.com/chromium/src.git/+/17ee10504ffe050b3926fa4be7262f8a21ac4e2d
As the comment here indicates, it wasn't clear which <svg> a <view>
element should apply to. This was clarified in SVG2 [1] to be the "root
'svg' element", which is the same as for a "svgView(...)" fragment.
The comment is updated to reflect the new spec text and 'findRootAnchor'
was updated to align with specification.
[1] https://svgwg.org/svg2-draft/linking.html#SVGFragmentIdentifiersDefinitions
* Source/WebCore/svg/SVGSVGElement.cpp:
(WebCore::SVGSVGElement::findRootAnchor const):
(WebCore::SVGSVGElement::scrollToFragment):
* LayoutTests/svg/as-image/resources/view-in-inner-svg.svg: Added.
* LayoutTests/svg/as-image/view-in-inner-svg-expected.html: Added.
* LayoutTests/svg/as-image/view-in-inner-svg.html: Added.
Canonical link: https://commits.webkit.org/299459@main1 parent f30213f commit 1018cb1
4 files changed
Lines changed: 18 additions & 3 deletions
File tree
- LayoutTests/svg/as-image
- resources
- Source/WebCore/svg
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
700 | 700 | | |
701 | 701 | | |
702 | 702 | | |
703 | | - | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
704 | 708 | | |
705 | 709 | | |
706 | 710 | | |
| |||
743 | 747 | | |
744 | 748 | | |
745 | 749 | | |
746 | | - | |
| 750 | + | |
747 | 751 | | |
748 | | - | |
| 752 | + | |
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
| |||
0 commit comments