<?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>51148</bug_id>
          
          <creation_ts>2010-12-15 15:56:31 -0800</creation_ts>
          <short_desc>Overflow: auto failing to account for scrollbars after an element&apos;s size is increased</short_desc>
          <delta_ts>2012-03-30 12:12:34 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>71541</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Mark Kristensson">mkbitbucket</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>mitz</cc>
    
    <cc>mkbitbucket</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>ssandela</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>322900</commentid>
    <comment_count>0</comment_count>
    <who name="Mark Kristensson">mkbitbucket</who>
    <bug_when>2010-12-15 15:56:31 -0800</bug_when>
    <thetext>This is relatively new bug that has cropped up in our application on Safari and Chrome in the last month. I&apos;ve taken the very complex JS and HTML from our app and reproduced the bug in the attached html page (with some embedded JS). The basic scenario is this:

We render a DIV (absolutely positioned, if that makes any difference) and give it a default size. The contents of that DIV (in this case an image) are loaded dynamically and can vary in size. When we get back the URL of the image, we put that into the DIV in an IMG tag, get its rendered height and width and then reset the size of the DIV to match. There is a lot math involved here because we want to make sure that if the image is too large to fit into the DIVs (which make up a form in our web application) we size the DIV so that it is completely visible on the screen, but the DIV should scroll so that the user can see their entire image. 

In most cases, the image will fit on the screen and there should be no scrollbars because the DIVs size exactly matches the image inside of it.

This works perfectly in FF, IE and was working in the WebKit browsers until recently.

The attached example reproduces the problem and the button implements our current, ugly workaround where we set the overflow: hidden, trigger a reflow and then set overflow: auto again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>322903</commentid>
    <comment_count>1</comment_count>
      <attachid>76703</attachid>
    <who name="Mark Kristensson">mkbitbucket</who>
    <bug_when>2010-12-15 15:57:41 -0800</bug_when>
    <thetext>Created attachment 76703
Example of a resized element failing to remove unnecessary scrollbars when set to overflow: auto</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>590286</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2012-03-28 12:35:24 -0700</bug_when>
    <thetext>Would be good to know when this regressed. What&apos;s the first nightly build that shows the issue?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>592378</commentid>
    <comment_count>3</comment_count>
    <who name="SravanKumar S(:sravan)">ssandela</who>
    <bug_when>2012-03-30 12:12:34 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 71541 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>76703</attachid>
            <date>2010-12-15 15:57:41 -0800</date>
            <delta_ts>2010-12-15 15:57:41 -0800</delta_ts>
            <desc>Example of a resized element failing to remove unnecessary scrollbars when set to overflow: auto</desc>
            <filename>WebKit Scroll Bug.html</filename>
            <type>text/html</type>
            <size>1002</size>
            <attacher name="Mark Kristensson">mkbitbucket</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgoJPHNjcmlwdCBsYW5ndWFnZT0iamF2YXNjcmlwdCI+CglmdW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