<?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>56982</bug_id>
          
          <creation_ts>2011-03-23 18:04:45 -0700</creation_ts>
          <short_desc>table{border:value} causes cell borders to disappear on &lt;table border=value&gt;</short_desc>
          <delta_ts>2022-07-12 14:30:28 -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>CSS</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>
          
          
          <bug_file_loc>http://software.hixie.ch/utilities/js/live-dom-viewer/saved/892</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="Leif Halvard Silli">xn--mlform-iua</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>davidbarr</cc>
    
    <cc>dbates</cc>
    
    <cc>eric.carlson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>372586</commentid>
    <comment_count>0</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2011-03-23 18:04:45 -0700</bug_when>
    <thetext>* HTML5 says that the presence of @border attribute on a table element, should lead to 1px wide borders for all cells in the table.
   http://dev.w3.org/html5/spec/rendering.html#decohints
   (See bottom of the code examples of this section.)

* Thus, according to HTML5, @border, when used inside &lt;table&gt;, in practise is a boolean attribute.

   And, apart from the bug(s) documented in this very bug, this is what Webkit does too.

   The bug, though, is this: if the author adds a border on the parent element - that is: on the &lt;table&gt; element, then the borders aroun the cells disappear.
   The same does not happen in IE, Opera, Firefox.

Example 1: Here there is a border around all cells in all Web browsers:
     &lt;table border=&quot;1&quot;&gt;&lt;tr&gt;&lt;td&gt;...&lt;td&gt;...&lt;/tr&gt;&lt;/table&gt;

Example 2: Here there is a border around all cells in &quot;all&quot; Web browsers - EXCEPT in Webkit
      &lt;style&gt;table{border:1px solid blue}
     &lt;table border=&quot;1&quot;&gt;&lt;tr&gt;&lt;td&gt;...&lt;td&gt;...&lt;/tr&gt;&lt;/table&gt;

Example3: This example is like Ex 2, except that it uses inline CSS - then the borders do not disappear.
     &lt;table style=&quot;border:1px solid&quot; border=&quot;1&quot;&gt;&lt;tr&gt;&lt;td&gt;...&lt;/tr&gt;&lt;/table&gt;

Example 4:  When the value of border = &quot;0&quot;, what then? Well, according to HTML5, there should be a 1px wide border still. And at any rate, it should be possible to undoo the styling caused by the @border. However, &lt;table border=0&gt; have similar bugs as documented in Example 2 and 3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>373725</commentid>
    <comment_count>1</comment_count>
    <who name="Leif Halvard Silli">xn--mlform-iua</who>
    <bug_when>2011-03-25 14:27:43 -0700</bug_when>
    <thetext>Replaced old test (http://software.hixie.ch/utilities/js/live-dom-viewer/saved/888) with one that perhaps is clearer: http://software.hixie.ch/utilities/js/live-dom-viewer/saved/892</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>610346</commentid>
    <comment_count>2</comment_count>
    <who name="David Barr">davidbarr</who>
    <bug_when>2012-04-25 21:58:00 -0700</bug_when>
    <thetext>Confirmed in WebKit Nightly Version 5.1.5 (6534.55.3, r115022).

Relevant text quoted from: http://dev.w3.org/html5/spec/rendering.html#decohints

The table element&apos;s border attribute maps to the pixel length properties &apos;border-top-width&apos;, &apos;border-right-width&apos;, &apos;border-bottom-width&apos;, &apos;border-left-width&apos; on the element. If the attribute is present but parsing the attribute&apos;s value using the rules for parsing non-negative integers generates an error, a default value of 1px is expected to be used for that property instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1001425</commentid>
    <comment_count>3</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2014-04-16 17:27:48 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 102112 ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1001432</commentid>
    <comment_count>4</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2014-04-16 17:49:07 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; 
&gt; *** This bug has been marked as a duplicate of bug 102112 ***

Actually, this bug isn&apos;t a duplicate of bug #102112. As of shipping Safari Version 7.0.3 (9537.75.14), example 1, 2 (*), and 3 appear to be fixed. From my understanding of the HTML5 standard (as of the time of writing), as quoted by David Barr in comment #2, the border width should be 0 in example 4 since 0 is a non-negative integer. I&apos;m re-opening this bug so that we can land layout tests to ensure we don&apos;t regress the issues mentioned in this bug.

(*) Assuming we add a &lt;/style&gt; before the &lt;table&gt;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882588</commentid>
    <comment_count>5</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-12 14:30:28 -0700</bug_when>
    <thetext>Safari, Chrome, and Firefox all agree on rendering for this test case. I don&apos;t believe there is any remaining compatibility issue.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>