<?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>56153</bug_id>
          
          <creation_ts>2011-03-10 17:07:15 -0800</creation_ts>
          <short_desc>RenderBlocks with negative width</short_desc>
          <delta_ts>2023-05-20 09:56:29 -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>Layout and Rendering</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://nytimes.com/chrome</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="James Robinson">jamesr</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>aestes</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>hyatt</cc>
    
    <cc>mihaip</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>365682</commentid>
    <comment_count>0</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-10 17:07:15 -0800</bug_when>
    <thetext>When loading the given URL a set of RenderBlocks have negative widths, which causes a number of problems.

I&apos;m currently bisecting to figure out when this started happening as it seems to be a fairly recent regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>366483</commentid>
    <comment_count>1</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-11 19:23:33 -0800</bug_when>
    <thetext>Repro:

&lt;!DOCTYPE html&gt;
&lt;div id=&quot;d&quot; style=&quot;margin-left: 100%; position: absolute; left: 20px; right: 160px;&quot;&gt;&lt;/div&gt;


d.clientWidth is -180 in WebKit and 0 in Firefox 3.6, Firefox 4 beta, Opera 10.62, and IE8.  The -180 value seems to come from here: http://trac.webkit.org/browser/trunk/Source/WebCore/rendering/RenderBox.cpp#L2422

This doesn&apos;t appear to be a recent regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>367162</commentid>
    <comment_count>2</comment_count>
    <who name="James Robinson">jamesr</who>
    <bug_when>2011-03-14 13:14:31 -0700</bug_when>
    <thetext>After chatting with Tab it seems the issue is that when calculating the logical width we need to handle the case where the width goes negative by dropping a constraint and re-solving (dropping into the !logicalLeftIsAuto &amp;&amp; !logicalWidthIsAuto &amp;&amp; !logicalRightIsAuto case would seem to do the trick here).  It looks like what Gecko 2.0 does is ignore the specified value for &apos;right&apos; and re-solving - the computed values for left/right/width are 20px/-20px/0px, respectively in this test case.

The same issue exists for padding/borders.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1956737</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-20 09:56:29 -0700</bug_when>
    <thetext>Test Case (based on Comment 01):

https://jsfiddle.net/w17kymqg/2/

^ Though tweaked to output clientWidth.

*** Safari 16.5 ***

clientHeight: 0px
clientWidth: 0px

*** Chrome Canary 115 &amp; Firefox Nightly 115 ***

clientHeight: 0px
clientWidth: 0px

________

We don&apos;t get -180, which this bug was about. So I am marking this as &quot;RESOLVED CONFIGURATION CHANGED&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>