<?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>75277</bug_id>
          
          <creation_ts>2011-12-27 16:01:43 -0800</creation_ts>
          <short_desc>Images positioned incorrectly with CSS position:absolute inside position:relative with text-align:center</short_desc>
          <delta_ts>2022-07-12 16:23:48 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>https://www.google.com/m/places?source=mog&amp;gl=us&amp;sa=N#ipd:gl=us&amp;mode=search&amp;q=ritual%20roasters&amp;source=ipd</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Eric Penner">epenner</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>dtrebbien</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>527494</commentid>
    <comment_count>0</comment_count>
    <who name="Eric Penner">epenner</who>
    <bug_when>2011-12-27 16:01:43 -0800</bug_when>
    <thetext>The image below should be centered. It is centered on Safari but not on the webkit nightly. 

&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
.Outer { text-align: center; }
.Inner { position:relative; height:178px; width:318px; display:inline-block; border:1px solid #aaa;  }
.Image { position:absolute; top: 0; background:blue;}
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;div class=&quot;Outer&quot;&gt;
&lt;div class=&quot;Inner&quot;&gt;
&lt;img class=&quot;Image&quot; src=&apos;&apos; width=&quot;318&quot; height=&quot;178&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;

&lt;/body&gt;
&lt;/html&gt;

Or go here with a mobile user-agent:
https://www.google.com/m/places?source=mog&amp;gl=us&amp;sa=N#ipd:gl=us&amp;mode=search&amp;q=ritual%20roasters&amp;source=ipd</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>734787</commentid>
    <comment_count>1</comment_count>
      <attachid>167119</attachid>
    <who name="Daniel Trebbien">dtrebbien</who>
    <bug_when>2012-10-04 10:14:53 -0700</bug_when>
    <thetext>Created attachment 167119
Test case

This is a test case which demonstrates the problem.

It seems that with text-align:center, WebKit is centering the H1 text *as if* the H1&apos;s width were offsetWidth + paddingLeft + paddingRight.

This test case renders correctly in Safari 6.0.1 and Firefox 15.0.1, but not in Chrome 22.0.1229.79, Chrome 24.0.1286.0 canary, or WebKit r130371 built on 04 October 2012.  This problem also affects iOS 6 Mobile Safari, but not iOS 5.1 Mobile Safari.

Getting rid of text-align:center fixes the problem in this case because the text width is larger than its container anyway.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1000304</commentid>
    <comment_count>2</comment_count>
    <who name="Daniel Trebbien">dtrebbien</who>
    <bug_when>2014-04-13 10:53:59 -0700</bug_when>
    <thetext>See also:  Bug 131592</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1882721</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2022-07-12 16:23:48 -0700</bug_when>
    <thetext>Safari, Chrome, and Firefox all agree on rendering for this test case. I don&apos;t believe there is any remaining compatibility issue.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>167119</attachid>
            <date>2012-10-04 10:14:53 -0700</date>
            <delta_ts>2012-10-04 10:14:53 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>Test case.html</filename>
            <type>text/html</type>
            <size>680</size>
            <attacher name="Daniel Trebbien">dtrebbien</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KPHN0eWxlPgpoMSB7IG1hcmdpbjogMDsgfQoK
I2JhciB7CiAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICBib3JkZXI6IDFweCBzb2xpZCBibGFj
azsKICAgIHdpZHRoOiAyNTBweDsKICAgIGhlaWdodDogNTBweDsKfQoKI2JhciA+IC5sZWZ0U3Bh
Y2UgewogICAgcG9zaXRpb246IGFic29sdXRlOwogICAgbGVmdDogMDsKICAgIHdpZHRoOiA3MHB4
OwogICAgaGVpZ2h0OiAxMDAlOwogICAgYmFja2dyb3VuZC1jb2xvcjogcmdiYSgyNTUsIDAsIDAs
IDAuMjUpOwp9CgojYmFyID4gaDEgewogICAgcG9zaXRpb246IGFic29sdXRlOwogICAgbGVmdDog
MDsKICAgIHJpZ2h0OiAwOwogICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgIHBhZGRpbmct
bGVmdDogNzBweDsKICAgIGZvbnQ6IGJvbGQgMjBweCAvIDUwcHggc2Fucy1zZXJpZjsKICAgIHRl
eHQtYWxpZ246IGNlbnRlcjsKICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICB0ZXh0LW92ZXJmbG93
OiBlbGxpcHNpczsKICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7Cn0KPC9zdHlsZT4KPC9oZWFkPgo8
Ym9keT4KCjxkaXYgaWQ9ImJhciI+CjxkaXYgY2xhc3M9ImxlZnRTcGFjZSI+PC9kaXY+CjxoMT5U
aGlzIGlzIGEgVGVzdCBCbGFoIEJsYWg8L2gxPgo8L2Rpdj4KCjwvYm9keT4KPC9odG1sPgo=
</data>

          </attachment>
      

    </bug>

</bugzilla>