<?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>21092</bug_id>
          
          <creation_ts>2008-09-25 00:41:12 -0700</creation_ts>
          <short_desc>Tables with display:inline don&apos;t render as expected in strict mode</short_desc>
          <delta_ts>2025-01-16 18:16:44 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tables</component>
          <version>525.x (Safari 3.1)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>125640</blocked>
          <everconfirmed>0</everconfirmed>
          <reporter>gmtfn</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>sachin.puranik</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>92682</commentid>
    <comment_count>0</comment_count>
    <who name="">gmtfn</who>
    <bug_when>2008-09-25 00:41:12 -0700</bug_when>
    <thetext>Consider the sample code below. With the DOCTYPE specified, the tables aren&apos;t rendered as specified (inline), and backgrounds are ignored. However, removing the DOCTYPE makes browsers that use Webkit (Safari and Google Chrome) render the code as expected -- like all other browsers (Firefox, IE, and Opera) do.

I don&apos;t know how far reaching this problem is.


&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot; 
	&quot;http://www.w3.org/TR/html4/strict.dtd&quot;&gt;

&lt;html&gt;
&lt;body&gt;
&lt;table style=&quot;display:inline; background: green; width: 100px;&quot;&gt;
&lt;tr&gt;&lt;td&gt;inline table 1&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt; 

&lt;table style=&quot;display:inline; background: blue; width: 100px;&quot;&gt;
&lt;tr&gt;&lt;td&gt;inline table 2&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt; 

&lt;/body&gt;
&lt;/html&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185900</commentid>
    <comment_count>1</comment_count>
    <who name="sachin Puranik">sachin.puranik</who>
    <bug_when>2010-01-29 10:08:02 -0800</bug_when>
    <thetext>Below are my findings for this bug.

After DOCTYPE parsing stack flows to void HTMLDocument::determineParseMode(). This decides the parse mode of the document and passes the same to the Style objects which eventually decides the look and feel of the Object.

While in HTMLDocument::determineParseMode().  does not find the entry for the given doctype using function 
     findDoctypeEntry(pubIDStr.data(), pubIDStr.length());

So the document parse mode is set as &quot;setParseMode(AlmostStrict);&quot; This inturn affects the style object and changes the output.

Not sure if this is the real bug or expected behavior. Can somebody please guide. if this is a valid bug i can try to fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>185998</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2010-01-29 16:22:48 -0800</bug_when>
    <thetext>&gt;So the document parse mode is set as &quot;setParseMode(AlmostStrict);&quot;

When doctype is not in the list, the mode is actually set to strict.

I don&apos;t know if this bug is valid, but the workaround is obvious - one can just not specify a doctype, and use the quirks mode.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>199979</commentid>
    <comment_count>3</comment_count>
    <who name="">gmtfn</who>
    <bug_when>2010-03-15 21:11:56 -0700</bug_when>
    <thetext>Alexey, in a world in which only Webkit browsers existed, your proposal would be fine. However, in our current world, this would affect users of major browsers, IE and Firefox.

When I filed this report, Google Chrome just appeared (in beta version), and I was hoping that this bug would get removed soon. It&apos;s been about a year and half, and Chrome has become pretty popular and is gaining market share. A page on my site is f...-up in it. So, I will have to change my code to compensate for this defect in Webkit.

So... thanks, guys :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>200001</commentid>
    <comment_count>4</comment_count>
    <who name="">gmtfn</who>
    <bug_when>2010-03-15 21:59:07 -0700</bug_when>
    <thetext>this bug may be related to one described in bug 23008</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>200004</commentid>
    <comment_count>5</comment_count>
    <who name="">gmtfn</who>
    <bug_when>2010-03-15 22:11:52 -0700</bug_when>
    <thetext>Here&apos;s what Mozilla people did for the same issue: http://weblogs.mozillazine.org/roc/archives/2005/06/displayinline_a.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1899804</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-09-20 06:55:54 -0700</bug_when>
    <thetext>I changed the test case from Comment 01 (with DOCTYPE below):

Link - https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10749

Safari 16 and Chrome Canary 108 render this same while Firefox Nightly 108 render it same but it seems the inside &quot;text&quot; is outside more than both other browsers. I don&apos;t know whether it is much of concern or is acceptable but just want to highlight latest results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2087921</commentid>
    <comment_count>7</comment_count>
      <attachid>473928</attachid>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-16 18:10:18 -0800</bug_when>
    <thetext>Created attachment 473928
testcase with doctype</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2087922</commentid>
    <comment_count>8</comment_count>
      <attachid>473929</attachid>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-16 18:10:39 -0800</bug_when>
    <thetext>Created attachment 473929
testcase without doctype</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2087923</commentid>
    <comment_count>9</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-01-16 18:16:44 -0800</bug_when>
    <thetext>Both with doctype and without doctype the renderings are very similar. 
The current test cases do not show any significant differences. 

Roc blog&apos;s post is still readable at 
https://web.archive.org/web/20060218001756/http://weblogs.mozillazine.org/roc/archives/2005/06/displayinline_a.html

I think we can close. If there&apos;s a major difference affecting the layout, there is still the possibility to open a new bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>473928</attachid>
            <date>2025-01-16 18:10:18 -0800</date>
            <delta_ts>2025-01-16 18:10:18 -0800</delta_ts>
            <desc>testcase with doctype</desc>
            <filename>testcase-with-doctype.html</filename>
            <type>text/html</type>
            <size>423</size>
            <attacher name="Karl Dubost">karlcow</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+Cgk8bWV0YSBjaGFyc2V0PSJV
VEYtOCI+Cgk8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRo
LCBpbml0aWFsLXNjYWxlPTEuMCI+Cgk8dGl0bGU+RG9jdW1lbnQ8L3RpdGxlPgo8L2hlYWQ+Cjxi
b2R5PgoJPHRhYmxlIHN0eWxlPSJkaXNwbGF5OmlubGluZTsgYmFja2dyb3VuZDogZ3JlZW47IHdp
ZHRoOiAxMDBweDsiPgoJCTx0cj48dGQ+aW5saW5lIHRhYmxlIDE8L3RkPjwvdHI+CgkJPC90YWJs
ZT4gCgkJCgkJPHRhYmxlIHN0eWxlPSJkaXNwbGF5OmlubGluZTsgYmFja2dyb3VuZDogYmx1ZTsg
d2lkdGg6IDEwMHB4OyI+CgkJPHRyPjx0ZD5pbmxpbmUgdGFibGUgMjwvdGQ+PC90cj4KCQk8L3Rh
YmxlPiAKCQkKPC9ib2R5Pgo8L2h0bWw+
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>473929</attachid>
            <date>2025-01-16 18:10:39 -0800</date>
            <delta_ts>2025-01-16 18:10:39 -0800</delta_ts>
            <desc>testcase without doctype</desc>
            <filename>testcase-without-doctype.html</filename>
            <type>text/html</type>
            <size>407</size>
            <attacher name="Karl Dubost">karlcow</attacher>
            
              <data encoding="base64">PGh0bWwgbGFuZz0iZW4iPgo8aGVhZD4KCTxtZXRhIGNoYXJzZXQ9IlVURi04Ij4KCTxtZXRhIG5h
bWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9
MS4wIj4KCTx0aXRsZT5Eb2N1bWVudDwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+Cgk8dGFibGUgc3R5
bGU9ImRpc3BsYXk6aW5saW5lOyBiYWNrZ3JvdW5kOiBncmVlbjsgd2lkdGg6IDEwMHB4OyI+CgkJ
PHRyPjx0ZD5pbmxpbmUgdGFibGUgMTwvdGQ+PC90cj4KCQk8L3RhYmxlPiAKCQkKCQk8dGFibGUg
c3R5bGU9ImRpc3BsYXk6aW5saW5lOyBiYWNrZ3JvdW5kOiBibHVlOyB3aWR0aDogMTAwcHg7Ij4K
CQk8dHI+PHRkPmlubGluZSB0YWJsZSAyPC90ZD48L3RyPgoJCTwvdGFibGU+IAoJCQo8L2JvZHk+
CjwvaHRtbD4=
</data>

          </attachment>
      

    </bug>

</bugzilla>