mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 09:06:08 +00:00
Meta: Ignore tag namespace when rewriting paths in the WPT importer
This allows us to import SVG tests, which distinguish between HTML and SVG script tags using namespaces.
This commit is contained in:
parent
c5362e832d
commit
c5eca713e9
Notes:
github-actions[bot]
2025-06-27 06:37:42 +00:00
Author: https://github.com/tcl3
Commit: c5eca713e9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5230
Reviewed-by: https://github.com/gmta ✅
1 changed files with 4 additions and 0 deletions
|
@ -77,6 +77,8 @@ class LinkedResourceFinder(HTMLParser):
|
|||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
self._tag_stack_.append(tag)
|
||||
if ":" in tag:
|
||||
tag = tag.split(":", 1)[-1]
|
||||
if tag in ["script", "img", "iframe"]:
|
||||
attr_dict = dict(attrs)
|
||||
if "src" in attr_dict:
|
||||
|
@ -114,6 +116,8 @@ class TestTypeIdentifier(HTMLParser):
|
|||
self.ref_test_link_found = False
|
||||
|
||||
def handle_starttag(self, tag, attrs):
|
||||
if ":" in tag:
|
||||
tag = tag.split(":", 1)[-1]
|
||||
if tag == "link":
|
||||
attr_dict = dict(attrs)
|
||||
if "rel" in attr_dict and (attr_dict["rel"] == "match" or attr_dict["rel"] == "mismatch"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue