<?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>29781</bug_id>
          
          <creation_ts>2009-09-27 04:42:25 -0700</creation_ts>
          <short_desc>Absolutely positioned element is not complied with W3C standard.</short_desc>
          <delta_ts>2009-09-27 17:11:37 -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>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>19124</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Hanrui">hanrui.gao</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>johnnyding.webkit</cc>
    
    <cc>mitz</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>150376</commentid>
    <comment_count>0</comment_count>
      <attachid>40190</attachid>
    <who name="Hanrui">hanrui.gao</who>
    <bug_when>2009-09-27 04:42:25 -0700</bug_when>
    <thetext>Created attachment 40190
Testcase shows the behaviour of absolutely positioned element is not complied with W3C standard.

Safari Version       : 4.0.3 (531.9.1)
Other browsers tested:
Chrome 4.0.213.1: Same as Safari
     Firefox 3.x: Same as Safari
          IE 6/7: Different to Safari
            IE 6: Different to Safari

What steps will reproduce the problem?
1. Launch the testcase file attached

What is the expected result?
The inner div is absolutely positioned div without left/top specified. So according to W3C standard, its left side should be at the place as same as static positioned div.

W3C standard: 
http://www.w3.org/TR/CSS2/visudet.html#abs-non-replaced-width
  &quot;2. &apos;left&apos; and &apos;right&apos; are &apos;auto&apos; and &apos;width&apos; is not &apos;auto&apos;, then if the &apos;direction&apos; property of the element establishing the static-position containing block is &apos;ltr&apos; set &apos;left&apos; to the static position, otherwise set &apos;right&apos; to the static position. Then solve for &apos;left&apos; (if &apos;direction is &apos;rtl&apos;) or &apos;right&apos; (if &apos;direction&apos; is &apos;ltr&apos;).&quot;

What happens instead?
The inner div always align to left of the outer div, which is different from the static flow. ( The first and third groups in testcase are absolutely positioned while the second and fourth groups are static positioned for comparing. )</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>150377</commentid>
    <comment_count>1</comment_count>
    <who name="Hanrui">hanrui.gao</who>
    <bug_when>2009-09-27 04:47:29 -0700</bug_when>
    <thetext>Also reported to Chromium bug system: http://code.google.com/p/chromium/issues/detail?id=23202</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>150437</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2009-09-27 17:11:37 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 19124 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>40190</attachid>
            <date>2009-09-27 04:42:25 -0700</date>
            <delta_ts>2009-09-27 04:42:25 -0700</delta_ts>
            <desc>Testcase shows the behaviour of absolutely positioned element is not complied with W3C standard.</desc>
            <filename>testcase_of_text_align_center_position_absolute_standard.html</filename>
            <type>text/html</type>
            <size>689</size>
            <attacher name="Hanrui">hanrui.gao</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+DQo8c3R5bGU+DQogICAgLm91dGVyIHsNCiAgICAgICAgd2lkdGg6IDUw
MHB4Ow0KICAgICAgICBoZWlnaHQ6IDIwMHB4Ow0KICAgICAgICBib3JkZXI6IDFweCBzb2xpZCBy
ZWQ7DQogICAgfQ0KICAgIA0KICAgIC5pbm5lciB7DQogICAgCWJhY2tncm91bmQtY29sb3I6IGdy
YXk7DQogICAgICAgIHdpZHRoOiAyMDBweDsNCiAgICAgICAgaGVpZ2h0OiAxMDBweDsNCiAgICB9
DQoJDQo8L3N0eWxlPg0KDQo8ZGl2IGNsYXNzPSJvdXRlciIgYWxpZ249InJpZ2h0Ij4NCiAgICA8
ZGl2IGNsYXNzPSJpbm5lciIgc3R5bGU9InBvc2l0aW9uOiBhYnNvbHV0ZTsiPmFsaWduPXJpZ2h0
OyBwb3NpdGlvbj1hYnNvbHV0ZTwvZGl2Pg0KPC9kaXY+DQoNCjxkaXYgY2xhc3M9Im91dGVyIiBh
bGlnbj0icmlnaHQiPg0KICAgIDxkaXYgY2xhc3M9ImlubmVyIj5hbGlnbj1yaWdodDwvZGl2Pg0K
PC9kaXY+DQoNCjxkaXYgY2xhc3M9Im91dGVyIiBhbGlnbj0iY2VudGVyIj4NCiAgICA8ZGl2IGNs
YXNzPSJpbm5lciIgc3R5bGU9InBvc2l0aW9uOiBhYnNvbHV0ZTsiPmFsaWduPWNlbnRlcjsgcG9z
aXRpb249YWJzb2x1dGU8L2Rpdj4NCjwvZGl2Pg0KDQo8ZGl2IGNsYXNzPSJvdXRlciIgYWxpZ249
ImNlbnRlciI+DQogICAgPGRpdiBjbGFzcz0iaW5uZXIiPmFsaWduPWNlbnRlcjwvZGl2Pg0KPC9k
aXY+DQo=
</data>

          </attachment>
      

    </bug>

</bugzilla>