RESOLVED FIXED Bug 13696
anchor tag not recognized
https://bugs.webkit.org/show_bug.cgi?id=13696
Summary anchor tag not recognized
Ton Bäcker
Reported 2007-05-12 03:59:21 PDT
Extra tags <EDOCS:DELETE>...</EDOCS:DELETE> prevent proper parsing of the anchor tag. Because of this bug i cannot view my phone bill invoices from the major dutch telecom operator KPN.
Attachments
testcase anchor tag (318 bytes, text/html)
2007-05-12 04:01 PDT, Ton Bäcker
no flags
Residual style doesn't reopen across spans/custom tags (40 bytes, text/html)
2007-05-12 15:28 PDT, Dave Hyatt
no flags
Patch to fix <span> bug (861 bytes, patch)
2007-05-12 16:11 PDT, Dave Hyatt
hyatt: review-
Patch to fix bug by using a set to exclude rather than a set to include. (4.36 KB, patch)
2007-05-12 22:06 PDT, Dave Hyatt
no flags
This took a long time. Giant test case that covers all markup container tags. (156.59 KB, patch)
2007-05-12 23:07 PDT, Dave Hyatt
oliver: review+
Ton Bäcker
Comment 1 2007-05-12 04:01:05 PDT
Created attachment 14515 [details] testcase anchor tag
Ton Bäcker
Comment 2 2007-05-12 06:27:49 PDT
Failed in Safari 2.0.4 (419.3) MacOS 10.4.8, works in Firefox 1.5.0.11
Dave Hyatt
Comment 3 2007-05-12 15:02:39 PDT
That is some amusingly misnested HTML.
Dave Hyatt
Comment 4 2007-05-12 15:28:29 PDT
Created attachment 14522 [details] Residual style doesn't reopen across spans/custom tags Here is another test case (just to show that this has nothing to do with custom tags or links specifically).
Dave Hyatt
Comment 5 2007-05-12 15:44:24 PDT
isAffectedByResidualStyle is the problem. We only run the residual style algorithm when certain close tags are encountered (this was done out of concern over performance, i.e., trying to limit the scope of the algorithm). Adding <span> and "custom" tags to this set would fix both test cases. We should probably study the HTML5 spec to see what it says.
Dave Hyatt
Comment 6 2007-05-12 16:11:53 PDT
Created attachment 14524 [details] Patch to fix <span> bug This patch at least fixes the span case. The custom tag case is a bit harder, since we have no way of telling that a tag is custom. We would probably have to modify the init method of HTMLNames to add all the tags to a hash that could then be queried. I think I'd like to land the span fix separately and then worry about the custom tag problem later.
Dave Hyatt
Comment 7 2007-05-12 16:23:39 PDT
Comment on attachment 14524 [details] Patch to fix <span> bug NVM, I'm going to try to fix this completely.
Dave Hyatt
Comment 8 2007-05-12 16:40:39 PDT
I started making a master test case, going through every tag. By the time I got up to F, Firefox was just opening every last one. It's clear to me that we can just remove the whole concept of "being affected by residual style" and just make it always applied. Hopefully it won't hurt perf too much.
Dave Hyatt
Comment 9 2007-05-12 22:06:03 PDT
Created attachment 14529 [details] Patch to fix bug by using a set to exclude rather than a set to include.
Dave Hyatt
Comment 10 2007-05-12 22:06:57 PDT
I was wrong in comment #8. There are a few exceptions. I tried to make the set as minimal as possible. Layout tests actually already covered some of these.
Dave Hyatt
Comment 11 2007-05-12 22:13:58 PDT
Comment on attachment 14529 [details] Patch to fix bug by using a set to exclude rather than a set to include. Need to get my test finished. Removing for now.
Dave Hyatt
Comment 12 2007-05-12 23:07:41 PDT
Created attachment 14530 [details] This took a long time. Giant test case that covers all markup container tags.
Oliver Hunt
Comment 13 2007-05-12 23:14:37 PDT
Comment on attachment 14530 [details] This took a long time. Giant test case that covers all markup container tags. Wow.. all those tags i didn't even know existed..
Dave Hyatt
Comment 14 2007-05-12 23:24:08 PDT
Fixed in r21439.
Ian 'Hixie' Hickson
Comment 15 2007-05-13 14:39:57 PDT
HTML5 limits residual style to a very specific set of elements -- did that not work for you?
Note You need to log in before you can comment on or make changes to this bug.