Bug 13696 - anchor tag not recognized
Summary: anchor tag not recognized
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Dave Hyatt
URL:
Keywords: HasReduction
Depends on:
Blocks:
 
Reported: 2007-05-12 03:59 PDT by Ton Bäcker
Modified: 2007-05-13 15:06 PDT (History)
2 users (show)

See Also:


Attachments
testcase anchor tag (318 bytes, text/html)
2007-05-12 04:01 PDT, Ton Bäcker
no flags Details
Residual style doesn't reopen across spans/custom tags (40 bytes, text/html)
2007-05-12 15:28 PDT, Dave Hyatt
no flags Details
Patch to fix <span> bug (861 bytes, patch)
2007-05-12 16:11 PDT, Dave Hyatt
hyatt: review-
Details | Formatted Diff | Diff
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 Details | Formatted Diff | Diff
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+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ton Bäcker 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.
Comment 1 Ton Bäcker 2007-05-12 04:01:05 PDT
Created attachment 14515 [details]
testcase anchor tag
Comment 2 Ton Bäcker 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
Comment 3 Dave Hyatt 2007-05-12 15:02:39 PDT
That is some amusingly misnested HTML.
Comment 4 Dave Hyatt 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).
Comment 5 Dave Hyatt 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.
Comment 6 Dave Hyatt 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.
Comment 7 Dave Hyatt 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.
Comment 8 Dave Hyatt 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.
Comment 9 Dave Hyatt 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.
Comment 10 Dave Hyatt 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.
Comment 11 Dave Hyatt 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.
Comment 12 Dave Hyatt 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.
Comment 13 Oliver Hunt 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..
Comment 14 Dave Hyatt 2007-05-12 23:24:08 PDT
Fixed in r21439.
Comment 15 Ian 'Hixie' Hickson 2007-05-13 14:39:57 PDT
HTML5 limits residual style to a very specific set of elements -- did that not work for you?