Bug 5771 - WebKit does not implicitly close anchor tags when its containing block ends
Summary: WebKit does not implicitly close anchor tags when its containing block ends
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.gnome.org/~michael/activit...
Keywords: HasReduction, InRadar
Depends on:
Blocks: 3483
  Show dependency treegraph
 
Reported: 2005-11-18 09:59 PST by Daniel Udey
Modified: 2023-10-03 08:39 PDT (History)
9 users (show)

See Also:


Attachments
Testcase for bug 5771, the unclosing link bug (465 bytes, text/html)
2005-11-18 10:00 PST, Daniel Udey
no flags Details
test case 2 (684 bytes, text/html)
2006-08-21 05:12 PDT, Ryan Schmidt
no flags Details
STP179, WebKit ToT, Chrome Canary 119 and FX120 (495.98 KB, image/png)
2023-10-03 08:38 PDT, Ahmad Saleem
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Udey 2005-11-18 09:59:33 PST
When an anchor tag is not closed but its containing element closes, WebKit continues to treat all text 
afterwards as a link regardless. From my understanding of the HTML spec, the anchor tag should be 
implicitly closed when its containing block ends, and this behaviour is thus incorrect.
Comment 1 Daniel Udey 2005-11-18 10:00:06 PST
Created attachment 4725 [details]
Testcase for bug 5771, the unclosing link bug
Comment 2 Eric Seidel (no email) 2005-12-27 16:13:44 PST
Related to 3905  They don't really depend, but there is no other good way to show relations in bugzilla.
Comment 3 Darin Adler 2006-03-07 09:34:57 PST
We actually go out of our way to re-open the anchor tag, using the "residual style" mechanism. It should be possible to change the rules around.
Comment 4 Ryan Schmidt 2006-08-21 05:12:45 PDT
Created attachment 10141 [details]
test case 2

This bug has been responsible for some weirdness over at http://pecl.php.net/ :

http://pear.php.net/bugs/bug.php?id=7183

The original test case attached to this bug looks the same to me in Safari and Firefox, so I don't know how wrong the behavior is. But I have a test case which shows how Safari is behaving differently from Firefox, attached as "test case 2." In Safari, the entire document is red, but in Firefox, the text "not a link 1" is shown in black, because Firefox has auto-closed the open anchor before going into the table. And presumably Safari should do the same.
Comment 5 Robert Hogan 2013-06-04 10:54:50 PDT
The bug is now that 'not a link 1' in test case 2 displays red but with no underline. So close, but no cigar.
Comment 6 Brent Fulgham 2022-07-06 13:22:37 PDT
Testcase 2 still shows "not a link 1" as not underlined, while Firefox and Chrome show with an underline.
Comment 7 Radar WebKit Bug Importer 2022-07-06 13:22:56 PDT
<rdar://problem/96543957>
Comment 8 Ahmad Saleem 2023-10-03 08:38:32 PDT
Created attachment 468048 [details]
STP179, WebKit ToT, Chrome Canary 119 and FX120

All matching each other.