<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>22539</bug_id>
          
          <creation_ts>2008-11-28 00:28:02 -0800</creation_ts>
          <short_desc>An empty &lt;a&gt; element inside an HTML document taints the following elements&apos; CSS type information</short_desc>
          <delta_ts>2022-07-27 14:48:03 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=61697</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Alexander Mitin">Alexander.Mitin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>100582</commentid>
    <comment_count>0</comment_count>
    <who name="Alexander Mitin">Alexander.Mitin</who>
    <bug_when>2008-11-28 00:28:02 -0800</bug_when>
    <thetext>I beleive I&apos;ve found a bug while rendering the xhtml transitional document by WebKit nightly (28.11.2008), Safari 3.2.1 and the latest Chrome affected as well.
Here is the simple test case:

test.html:
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt; 
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
&lt;head&gt; 
    &lt;title&gt;test&lt;/title&gt; 
    &lt;link rel=&quot;stylesheet&quot; href=&quot;default.css&quot; type=&quot;text/css&quot; /&gt;
&lt;/head&gt; 
&lt;body&gt; 
&lt;table border=&quot;1&quot;&gt; 
    &lt;tr&gt;&lt;td&gt; &lt;a name=&quot;top&quot; /&gt; 
    &lt;table&gt; 
        &lt;tr&gt;&lt;td&gt; &lt;a name=&quot;23&quot; /&gt; 
        &lt;table border=&quot;1&quot;&gt; 
            &lt;tr&gt;
                &lt;td&gt;text1&lt;/td&gt;
                &lt;td&gt;text2&lt;/td&gt;
            &lt;/tr&gt; 
            &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;a href=&quot;#top&quot;&gt;top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt; 
        &lt;/td&gt;&lt;/tr&gt; 
        &lt;tr&gt;&lt;td&gt; &lt;a name=&quot;12&quot; /&gt; 
        &lt;table border=&quot;1&quot;&gt; 
            &lt;tr&gt;
                &lt;td&gt;text3&lt;/td&gt;
                &lt;td&gt;text4&lt;/td&gt;
            &lt;/tr&gt; 
            &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;a href=&quot;#top&quot;&gt;top&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;/table&gt; 
        &lt;/td&gt;&lt;/tr&gt; 
    &lt;/table&gt;
    &lt;/td&gt;&lt;/tr&gt; 
&lt;/table&gt;
&lt;/body&gt; 
&lt;/html&gt; 

default.css:
a:link, a:active, a:visited
{ 
	color: #006699;
	text-decoration:none;
}
a:hover
{
	text-decoration:none;
	color: #EE4000;
}

The document passes the validation by w3c online at http://validator.w3.org/

Actual behaviour:
Text in table cells change its color by mouse hovering on it as if it surrounded by &lt;a&gt; tag.
Expected behaviour:
Text in table cells stay black.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108890</commentid>
    <comment_count>1</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2009-02-08 06:36:22 -0800</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108988</commentid>
    <comment_count>2</comment_count>
    <who name="Alexander Mitin">Alexander.Mitin</who>
    <bug_when>2009-02-09 10:37:19 -0800</bug_when>
    <thetext>When I saw this behavior the Content-Type was set to &apos;text/html&apos;. Sorry, can&apos;t test it using the Content-Type set to &apos;application/xhtml+xml&apos; 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. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109428</commentid>
    <comment_count>3</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2009-02-11 21:38:30 -0800</bug_when>
    <thetext>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 &lt;a&gt; tags seem to contain other elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>109429</commentid>
    <comment_count>4</comment_count>
      <attachid>27586</attachid>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2009-02-11 21:41:42 -0800</bug_when>
    <thetext>Created attachment 27586
Reduction (based on Alexander Mitin&apos;s example)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887084</commentid>
    <comment_count>5</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-27 09:36:04 -0700</bug_when>
    <thetext>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!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887100</commentid>
    <comment_count>6</comment_count>
    <who name="Alexander Mitin">Alexander.Mitin</who>
    <bug_when>2022-07-27 10:39:30 -0700</bug_when>
    <thetext>Wow, it&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887175</commentid>
    <comment_count>7</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2022-07-27 14:48:03 -0700</bug_when>
    <thetext>Self closing anchor tag isn&apos;t really a thing in HTML as you can see in Web Inspector. All browsers match in their behaviors. -&gt; Config Changed</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>27586</attachid>
            <date>2009-02-11 21:41:42 -0800</date>
            <delta_ts>2009-02-11 21:41:42 -0800</delta_ts>
            <desc>Reduction (based on Alexander Mitin&apos;s example)</desc>
            <filename>bug22539-empty-a-issue.html</filename>
            <type>text/html</type>
            <size>714</size>
            <attacher name="Julien Chaffraix">jchaffraix</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlvbmFs
Ly9FTiIKImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRpb25h
bC5kdGQiPgo8aHRtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCIgeG1sOmxh
bmc9ImVuIiBsYW5nPSJlbiI+CjxoZWFkPgogICAgPHRpdGxlPnRlc3Q8L3RpdGxlPgo8c3R5bGU+
CmE6aG92ZXIKewogICAgICAgIHRleHQtZGVjb3JhdGlvbjpub25lOwogICAgICAgIGNvbG9yOiAj
RUU0MDAwOwp9CmRpdjpob3Zlcgp7CiAgICAgICAgdGV4dC1kZWNvcmF0aW9uOm5vbmU7CiAgICAg
ICAgY29sb3I6ICNFRTRGRjA7Cn0KPC9zdHlsZT4KPC9oZWFkPgo8Ym9keT4KPGEgbmFtZT0iMjMi
IC8+Cjx0YWJsZSBib3JkZXI9IjEiPgogICAgPHRyPjx0ZD5UaGUgZW1wdHktJmx0O2EvJmd0OyBo
YXMgdGFpbnRlZCB0YWJsZSBhbmQgd2UgYXJlIG1hcmtlZCBhcyAmbHQ7YSZndDsgdGFnIGZvciBD
U1MuPC90ZD48L3RyPgo8L3RhYmxlPgo8ZGl2IC8+Cjx0YWJsZSBib3JkZXI9IjEiPgogICAgPHRy
Pjx0ZD5UaGUgZW1wdHktJmx0O2Rpdi8mZ3Q7IGFuZCAmbHQ7YS8mZ3Q7IGhhdmUgdGFpbnRlZCB0
aGUgdGFibGUgYW5kIHdlIGFyZSBtYXJrZWQgYXMgYm90aCB0aGUgdGFncyBmb3IgQ1NTLjwvdGQ+
PC90cj4KPC90YWJsZT4KPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
      

    </bug>

</bugzilla>