Summary: | An empty <a> element inside an HTML document taints the following elements' CSS type information | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alexander Mitin <Alexander.Mitin> | ||||
Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED CONFIGURATION CHANGED | ||||||
Severity: | Normal | CC: | ahmad.saleem792, ap, bfulgham, jchaffraix, rniwa, simon.fraser, zalan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=61697 | ||||||
Attachments: |
|
Description
Alexander Mitin
2008-11-28 00:28:02 PST
While trying to reproduce the bug, I noticed something with your test case. I made the mistake of serving it with a Content-Type of text/html and I could definitely reproduce the bug. However if I served it with a Content-Type of application/xhtml+xml, the behaviour is correct. Could you confirm that you fell into the same pitfall so that we can update the bug and reduce the test case a bit more? When I saw this behavior the Content-Type was set to 'text/html'. Sorry, can't test it using the Content-Type set to 'application/xhtml+xml' but I believe that it would work as expected. And one more thing: when I created the test case I loaded it into browser directly using file: proto (not using http-server) and the error persisted. Thanks for your reply. I have tweaked the bug information with your comment and to reflect my research on this. FYI the Inspector suggests strongly an HTML DOM bug as the empty <a> tags seem to contain other elements. Created attachment 27586 [details]
Reduction (based on Alexander Mitin's example)
I am not able to get expected result from the reduction attached test case in Safari 15.6 on macOS 12.5 and text in table cell change color based on text-decoration. It is same in Chrome Canary 106. Although for some reason, Firefox is extending text-decoration to table borders as well and changing table border color accordingly. Is it web-spec clarity issue or is Firefox is doing right? I am not sure but just wanted to share latest results. Thanks! Wow, it's almost 14 years passed since I reported this bug so I just forgot about it. :) Probably, the WebKit code base has been significantly changed since then, and this issue has been fixed by itself or someone silently or accidentally fixed it. Sorry, no any idea about Firefox. Self closing anchor tag isn't really a thing in HTML as you can see in Web Inspector. All browsers match in their behaviors. -> Config Changed |