<?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>22771</bug_id>
          
          <creation_ts>2008-12-09 17:04:17 -0800</creation_ts>
          <short_desc>table with display: inline; does not work with proper DOCTYPE</short_desc>
          <delta_ts>2012-10-02 11:33:00 -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>Tables</component>
          <version>525.x (Safari 3.2)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</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>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="jasneet">jasneet</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>jasneet</cc>
    
    <cc>mrahaman</cc>
    
    <cc>mustaf.here</cc>
    
    <cc>robert</cc>
    
    <cc>spottabathini</cc>
    
    <cc>vswap65</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>102042</commentid>
    <comment_count>0</comment_count>
    <who name="jasneet">jasneet</who>
    <bug_when>2008-12-09 17:04:17 -0800</bug_when>
    <thetext>I Steps:
Go to attached testcase

II Issue:
The table should be next to the input because it has &quot;display: inline;&quot;

III Other Browsers:
IE7: ok
FF3: ok

IV Nightly tested: 39088

Bug in Chromium : http://code.google.com/p/chromium/issues/detail?id=2032</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>102043</commentid>
    <comment_count>1</comment_count>
      <attachid>25905</attachid>
    <who name="jasneet">jasneet</who>
    <bug_when>2008-12-09 17:04:36 -0800</bug_when>
    <thetext>Created attachment 25905
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409484</commentid>
    <comment_count>2</comment_count>
    <who name="Mustafizur Rahaman (rahaman)">mustaf.here</who>
    <bug_when>2011-05-24 23:20:52 -0700</bug_when>
    <thetext>The issue description (Bug in Chromium : http://code.google.com/p/chromium/issues/detail?id=2032 ) mentions that the issue is present if we have the DOCTYPE, removing the DOCTYPE renders the table inline as expected.

Upon investigation, it is found that RenderStyle for RenderObject (Table element ) is noninherited_flags._effectiveDisplay = 7 (INLINE_TABLE) , when DOCTYPE is NOT mentioned &amp; table renders inline. 

But when DOCTYPE is mentioned, the same property has value 0 (INLINE) &amp; the table does not render inline. The display type setting is done in 

CSSStyleSelector::adjustRenderStyle()
{
    if (style-&gt;display() != NONE) {
        // If we have a &lt;td&gt; that specifies a float property, in quirks mode we just drop the float
        // property.
        // Sites also commonly use display:inline/block on &lt;td&gt;s and &lt;table&gt;s.  In quirks mode we force
        // these tags to retain their display types.
        if (!m_checker.m_strictParsing &amp;&amp; e) {
            if (e-&gt;hasTagName(tdTag)) {
                style-&gt;setDisplay(TABLE_CELL);
                style-&gt;setFloating(FNONE);
            }
            else if (e-&gt;hasTagName(tableTag))
                style-&gt;setDisplay(style-&gt;isDisplayInlineType() ? INLINE_TABLE : TABLE);
        }
}

Further analysis found that when DOCTYPE is mentioned, the document m_compatibilityMode = LimitedQuirksMode, therefore m_checker.m_strictParsing = TRUE. When DOCTYPE is NOT mentioned m_compatibilityMode == QuirksMode, therefore m_checker.m_strictParsing = FALSE

So, as we can see from above, when m_checker.m_strictParsing = FALSE, we set the display for table element as INLINE_TABLE. If m_checker.m_strictParsing == TRUE (DOCTYPE is mentioned), the if block is ommitted &amp; the display is NOT set to INLINE.

Can any one help me understand why this code is present in CSSStyleSelector::adjustRenderStyle(), I think if we remove this, the issue would be fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>409915</commentid>
    <comment_count>3</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2011-05-25 14:19:14 -0700</bug_when>
    <thetext>Did you try following svn blame to find out when this code was added?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>410177</commentid>
    <comment_count>4</comment_count>
    <who name="Mustafizur Rahaman (rahaman)">mustaf.here</who>
    <bug_when>2011-05-25 21:25:22 -0700</bug_when>
    <thetext>Thanks Alexey. I got some info as to when this code was added by using svn blame.

However, I finally found that it is the problem with the test case. To make a table display inline, &quot;display:inline&quot; is not enough, we have to specify &quot;display:inline-table&quot; (enum INLINE_TABLE in the code). Please refer to 
http://www.webkit.org/blog/115/webcore-rendering-ii-blocks-and-inlines/ as well
http://www.w3schools.com/css/pr_class_display.asp

When DOCTYPE is not mentioned i.e. in Quirk mode, the code applies lesser strictness, therefore allow &quot;display:inline&quot; to be displayed as inline table. But when we mention DOCTYPE, applying of style becomes more strict &amp; it displays an inline table if &amp; only if we mention &quot;display:inline-table&quot;.

I have verified by making the following changes in the test case &amp; now the table is rendered inline in Winlauncher &amp; Safari.

&lt;table style=&quot;display:inline-table&quot;&gt;

Therefore, it is a test case issue, no problem with the code.

Can I change the status of the bug &amp; How?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>544881</commentid>
    <comment_count>5</comment_count>
    <who name="Mustafizur Rahaman( :rahaman)">mrahaman</who>
    <bug_when>2012-01-29 21:53:50 -0800</bug_when>
    <thetext>Based on the discussion above, can someone please mark the issue as RESOLVED WONTFIX?</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>25905</attachid>
            <date>2008-12-09 17:04:36 -0800</date>
            <delta_ts>2008-12-09 17:04:36 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>testcase.zip</filename>
            <type>application/zip</type>
            <size>728</size>
            <attacher name="jasneet">jasneet</attacher>
            
              <data encoding="base64">UEsDBAoAAAAAAG2IiTkAAAAAAAAAAAAAAAAJAAAAdGVzdGNhc2UvUEsDBBQAAAAIAHqJdTkRzoEc
uAAAAPUAAAARAAAAdGVzdGNhc2Uvb3JnLmh0bWxNjc0KwjAQhO+C77Dm4smu0pvWHmwLCv4UiajH
SoINxLSkK23e3kYqeNiZYZdvJ5qkp4Tf8wxKemnIL5v9LgE2Q7yGCWLKU7ht+WEPi2AO3BamUaQq
U2jE7MiAlUT1ErFt26ANg8o+kZ+x878WHh7ijP7IQJBg8XgU+ZP3RyWcd2XqNwG5Wq4ZyY4YAPo9
FQ8toSGn5XoqVFPrwi1BGa2MXE3jiGw/IibZUIR96MX28sU8j78CHBo/UEsDBBQAAAAIABqLdTng
/EzsvAAAAAUBAAAbAAAAdGVzdGNhc2UvdGVzdF9zdGFuZGFyZC5odG1sTY7NCsIwEITvgu+w5uLJ
rsVbbXuwLSj4h0TUYyVBAzENzUrbt7cpCp7mY2dnduNJfsj47VjAk14ajufVdpMBmyFeFhliznO4
rvluC2EwB16XxilSlSk1YrFnwJ5ENkJsmiZoFkFVP5CfsPVdoQ9/cUZ/yUCQYOl4FHvL670SnVdl
7JuAOisTRrIlBoB+TuVdS3DUaZlMhXJWl10Eymhl5HLabwDEVA/qSaQkHcXYw2Dh4PXiawb6HcTv
Bx9QSwECFAAKAAAAAABtiIk5AAAAAAAAAAAAAAAACQAAAAAAAAAAABAAAAAAAAAAdGVzdGNhc2Uv
UEsBAhQAFAAAAAgAeol1ORHOgRy4AAAA9QAAABEAAAAAAAAAAAAgAAAAJwAAAHRlc3RjYXNlL29y
Zy5odG1sUEsBAhQAFAAAAAgAGot1OeD8TOy8AAAABQEAABsAAAAAAAAAAAAgAAAADgEAAHRlc3Rj
YXNlL3Rlc3Rfc3RhbmRhcmQuaHRtbFBLBQYAAAAAAwADAL8AAAADAgAAAAA=
</data>

          </attachment>
      

    </bug>

</bugzilla>