<?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>25016</bug_id>
          
          <creation_ts>2009-04-02 17:59:52 -0700</creation_ts>
          <short_desc>max-width and max-height are not overriding the width and height properties when &apos;display&apos; set to &apos;table&apos;</short_desc>
          <delta_ts>2012-12-18 11:10:05 -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>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          <dependson>98455</dependson>
    
    <dependson>98633</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="jasneet">jasneet</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>daniekatz</cc>
    
    <cc>eric</cc>
    
    <cc>hyatt</cc>
    
    <cc>jamesr</cc>
    
    <cc>jasneet</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>jparent</cc>
    
    <cc>julo</cc>
    
    <cc>pravind.2k4</cc>
    
    <cc>robert</cc>
    
    <cc>stephen.cantini</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>116375</commentid>
    <comment_count>0</comment_count>
    <who name="jasneet">jasneet</who>
    <bug_when>2009-04-02 17:59:52 -0700</bug_when>
    <thetext>I Steps:
1. Go to attached testcase

II Issue: 
width and height are overriding max-width and max-height (max-width and max-height must override width and height)

III Other Browsers:
FF3: OK
IE7: OK 

IV Nightly tested: 42138

Bug in Chromium : http://code.google.com/p/chromium/issues/detail?id=9550</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116376</commentid>
    <comment_count>1</comment_count>
      <attachid>29213</attachid>
    <who name="jasneet">jasneet</who>
    <bug_when>2009-04-02 18:00:37 -0700</bug_when>
    <thetext>Created attachment 29213
testcase</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116393</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Katz">daniekatz</who>
    <bug_when>2009-04-02 22:38:02 -0700</bug_when>
    <thetext>There is a minor mistake in &apos;Other browsers&apos; section: IE7 doesn&apos;t support &apos;display:table&apos; at all, so originally I&apos;ve tested the test case on IE8.

IE8: OK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126041</commentid>
    <comment_count>3</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-15 14:48:01 -0700</bug_when>
    <thetext>Hyatt?

I have confirmed that our behavior does not match FF3.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126051</commentid>
    <comment_count>4</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2009-06-15 15:10:14 -0700</bug_when>
    <thetext>Hyatt says that tables have had this bug forever.  In general our table support needs improving.  Perhaps a member of the Tokyo team would be up to the task.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>454420</commentid>
    <comment_count>5</comment_count>
    <who name="Julius Stroffek">julo</who>
    <bug_when>2011-08-21 13:43:52 -0700</bug_when>
    <thetext>Any chance that somebody will look into this?
Are there any workarounds?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617119</commentid>
    <comment_count>6</comment_count>
    <who name="Stephen Cantini">stephen.cantini</who>
    <bug_when>2012-05-06 10:14:47 -0700</bug_when>
    <thetext>+1 Some time has passed... any news? The only workaround I have found is wrapping the table inside a div with &quot;max-width&quot; set...a css-only solution would be much appreciated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617120</commentid>
    <comment_count>7</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2012-05-06 10:22:23 -0700</bug_when>
    <thetext>The bug is presumably in RenderBox::computeLogicalHeight:
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L2025</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>617125</commentid>
    <comment_count>8</comment_count>
    <who name="Stephen Cantini">stephen.cantini</who>
    <bug_when>2012-05-06 10:49:56 -0700</bug_when>
    <thetext>DISCLAIMER: I&apos;ve never looked at the webkit code before.

Could it be in RenderBox::computeLogicalWidthInRegion() for the ignored &quot;max-width&quot; part? If this is the case, maybe it never reaches this if statement http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L1765</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>730676</commentid>
    <comment_count>9</comment_count>
    <who name="Stephen Cantini">stephen.cantini</who>
    <bug_when>2012-09-28 08:27:04 -0700</bug_when>
    <thetext>Any news from the tokyo team or anybody else on this issue? Is there anything else I can do to help solve it? Someone to contact directly?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>730863</commentid>
    <comment_count>10</comment_count>
    <who name="Tony Chang">tony</who>
    <bug_when>2012-09-28 12:05:24 -0700</bug_when>
    <thetext>The bug is probably in RenderTable::updateLogicalWidth.  You can see that it checks against min-width, but there&apos;s no code for max-width.
http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderTable.cpp?rev=129929#L258

I&apos;m not sure how table height gets computed, but if you look in RenderBox::computeLogicalHeight, it only calculates margins.  I suspect the height is updated by it&apos;s children or something.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>730913</commentid>
    <comment_count>11</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-09-28 13:01:03 -0700</bug_when>
    <thetext>&gt; I&apos;m not sure how table height gets computed, but if you look in RenderBox::computeLogicalHeight, it only calculates margins.  I suspect the height is updated by it&apos;s children or something.

The logical height computation is in RenderTable::layout(). We need to check for the min / max logical height and update |computedLogicalHeight| accordingly.

Note that the effect of min / max width / height on tables is undefined in CSS 2.1 (http://www.w3.org/TR/CSS21/visudet.html#propdef-max-width) so we will need to evaluate what other browsers are doing in some corner cases (e.g. should we shrink our content if max-height is defined? (we never shrink our height currently as it would violate CSS 2.1 tables: we could make a cell smaller than the minimum height for its content))</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>793846</commentid>
    <comment_count>12</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2012-12-18 11:10:05 -0800</bug_when>
    <thetext>After bug 98455 and bug 98633, this is fixed.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>29213</attachid>
            <date>2009-04-02 18:00:37 -0700</date>
            <delta_ts>2009-04-02 18:00:37 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>maxwidth_maxheight_chrome.htm</filename>
            <type>text/html</type>
            <size>1661</size>
            <attacher name="jasneet">jasneet</attacher>
            
              <data encoding="base64">77u/PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFRNTCAxLjAgVHJhbnNpdGlv
bmFsLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL1RSL3hodG1sMS9EVEQveGh0bWwxLXRyYW5zaXRp
b25hbC5kdGQiPg0KDQo8aHRtbCB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94aHRtbCI+
DQo8aGVhZD4NCiAgICA8dGl0bGU+PC90aXRsZT4NCiAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3Mi
Pg0KICAgICAgICAucGFyZW50DQogICAgICAgIHsNCiAgICAgICAgICAgIGJvcmRlcjoxcHggc29s
aWQgcmVkOw0KICAgICAgICAgICAgaGVpZ2h0OjEwMHB4Ow0KICAgICAgICAgICAgaGVpZ2h0OjMw
MHB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