<?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>17488</bug_id>
          
          <creation_ts>2008-02-22 06:41:23 -0800</creation_ts>
          <short_desc>If either overflow-x or overflow-y value is not visible, Webkit will change it to auto</short_desc>
          <delta_ts>2011-05-19 17:21:50 -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>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="johnnyding">johnnyding.webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bdakin</cc>
    
    <cc>farukates</cc>
    
    <cc>hyatt</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>vituko</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>71497</commentid>
    <comment_count>0</comment_count>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2008-02-22 06:41:23 -0800</bug_when>
    <thetext>See attached test cause,   The first div has style: &quot;&quot;height:100px; overflow-y:hidden; overflow-x:visable; width:1px&quot;, which means the page author wants to make sure that the div box have hidden clipped content in y direction, but doesn&apos;t clip the content in x direction.  
In IE 6/7, Opera 9, I think they have correct behavior.
But in FireFox 2/3, Safari,  the overflow-y:hidden will cause the actual used value of overflow-x is auto, since the div&apos;s width is not long enough for creating horizontal bar, the content in x direction has been clipped.

The reason of this problem is if either overflow-x or overflow-y value is not visible, Webkit will change it to auto. then the element will be treated as having overflow clip property. See function CSSStyleSelector::adjustRenderStyle (file: CSSStyleSelector.cpp, line:1201) and function RenderBox::setStyle (file: RenderBox.cpp, line:110).

I did not see that The CSS 2(http://www.w3.org/TR/CSS21/visufx.html#propdef-overflow) and CSS3(http://www.w3.org/TR/2002/WD-css3-box-20021024/#the-overflow-x) specification have define the behavior just like webkit did. 

Is that a bug? Anyone can point me for this problem. The problem caused some contentz can&apos;t be displayed in webpages for some high traffic Chinese websites.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71498</commentid>
    <comment_count>1</comment_count>
      <attachid>19278</attachid>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2008-02-22 06:42:23 -0800</bug_when>
    <thetext>Created attachment 19278
test case for this problem</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>71982</commentid>
    <comment_count>2</comment_count>
    <who name="johnnyding">johnnyding.webkit</who>
    <bug_when>2008-02-26 01:19:51 -0800</bug_when>
    <thetext>How about using 2 flags: m_hasOverflowXClip, m_hasOverflowYClip instead of using m_hasOverflowClip, then we can discriminationally deal with clipped content in either x or y direction.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76045</commentid>
    <comment_count>3</comment_count>
    <who name="Faruk Ates">farukates</who>
    <bug_when>2008-04-01 00:29:50 -0700</bug_when>
    <thetext>The reason why your test case breaks is because it&apos;s spelled &quot;visible&quot; (not visable) — changing it to visible makes the JavaScript detect the property correctly.

Nonetheless, the behavior is still incorrect: adding a test case that shows this in a different way.

The combination of overflow-x: visible; overflow-y: hidden;  (or vice-versa) is a desirable combination and should behave exactly as it reads: elements expanding outside the containing &quot;viewport&quot; should only be rendered along the x-axis but not along the y-axis.

What doesn&apos;t get defined by the spec, however, is what happens to content that is outside _both_ x and y axes. Should elements always get clipped to exact rectangles? (by far easiest to implement) Which axis/setting gets precedence? Letting it be dependent on CSS property order AND allowing for non-rect rendering would be very tricky to implement I&apos;m sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76047</commentid>
    <comment_count>4</comment_count>
      <attachid>20270</attachid>
    <who name="Faruk Ates">farukates</who>
    <bug_when>2008-04-01 00:31:12 -0700</bug_when>
    <thetext>Created attachment 20270
Overflow-x/y visible/hidden testcase

The overflow-x: visible;  should mean that on the x-axis, the element should still be rendered. Instead, it is being treated as overflow-x: scroll.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>181119</commentid>
    <comment_count>5</comment_count>
    <who name="vituko">vituko</who>
    <bug_when>2010-01-15 00:07:34 -0800</bug_when>
    <thetext>Sorry

Until the patch comes, possible workaround : overflow-x:hidden + padding-right (scroll width) ...

... but the padding is seen in IE and Firefox, both work as expected. The behavior in Opera and Khtml is similar to Webkit.

overflow-x:visible also becomes auto in Firefox, but the vertical scroll width is computed and the box pushes its container without showing the horizontal scroll nor hiding some content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>356680</commentid>
    <comment_count>6</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-02-23 22:25:49 -0800</bug_when>
    <thetext>Firefox does the same thing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>406768</commentid>
    <comment_count>7</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-05-19 17:21:50 -0700</bug_when>
    <thetext>&lt;rdar://problem/9473424&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>19278</attachid>
            <date>2008-02-22 06:42:23 -0800</date>
            <delta_ts>2008-02-22 06:42:23 -0800</delta_ts>
            <desc>test case for this problem</desc>
            <filename>overflowxy_test.htm</filename>
            <type>text/html</type>
            <size>581</size>
            <attacher name="johnnyding">johnnyding.webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv
L0VOIj4NCjxodG1sPjxoZWFkPg0KPC9oZWFkPg0KPGJvZHkgbGVmdG1hcmdpbj0wIHRvcG1hcmdp
bj0wPg0KDQo8ZGl2IHN0eWxlPSJoZWlnaHQ6MTAwcHg7IG92ZXJmbG93LXk6aGlkZGVuOyBvdmVy
Zmxvdy14OnZpc2FibGU7IHdpZHRoOjFweCIgaWQ9ImZhY2UxIj4NCmNvbnRlbnQgaXMgYmxvY2sg
ZWxlbWVudA0KPC9kaXY+DQoNCjxocj4NCjxzY3JpcHQ+DQp2YXIgZGl2T2JqID0gZG9jdW1lbnQu
Z2V0RWxlbWVudEJ5SWQoImZhY2UxIik7DQpkb2N1bWVudC53cml0ZSgiRmlyc3QgZGl2J3Mgb3Zl
cmZsb3cgcHJvcGVydHkgaXMgXCIiICsgZGl2T2JqLnN0eWxlLm92ZXJmbG93WCArICIgOiAiICsg
ZGl2T2JqLnN0eWxlLm92ZXJmbG93WSArICJcIiIpOw0KPC9zY3JpcHQ+DQoNCjxocj4NCjxkaXYg
c3R5bGU9IndpZHRoOjIwMHB4OyBvdmVyZmxvdy14OmhpZGRlbjsgb3ZlcmZsb3cteTp2aXNhYmxl
OyBoZWlnaHQ6MXB4Ij4NCmNvbnRlbnQgaXMgYmxvY2sgZWxlbWVudA0KPC9kaXY+DQoNCjwvYm9k
eT48L2h0bWw+DQo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20270</attachid>
            <date>2008-04-01 00:31:12 -0700</date>
            <delta_ts>2008-04-01 00:31:12 -0700</delta_ts>
            <desc>Overflow-x/y visible/hidden testcase</desc>
            <filename>bug2b-overflowxy.html</filename>
            <type>text/html</type>
            <size>840</size>
            <attacher name="Faruk Ates">farukates</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWwgUFVCTElDICItLy9XM0MvL0RURCBYSFR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