<?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>193656</bug_id>
          
          <creation_ts>2019-01-21 11:51:28 -0800</creation_ts>
          <short_desc>[css-grid] abspos inside grid can have negative sizes</short_desc>
          <delta_ts>2022-08-07 05:05:03 -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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <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>1</everconfirmed>
          <reporter name="Oriol Brufau">obrufau</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1496623</commentid>
    <comment_count>0</comment_count>
      <attachid>359700</attachid>
    <who name="Oriol Brufau">obrufau</who>
    <bug_when>2019-01-21 11:51:28 -0800</bug_when>
    <thetext>Created attachment 359700
testcase

Run this code: https://jsfiddle.net/9mjg2fxt/

```css
#grid {
  display: grid;
  grid: 100px / 100px;
  border: solid;
  width: 100px;
  height: 100px;
  position: relative;
}
#abspos {
  position: absolute;
  left: 30px;
  right: 40px;
  grid-column-end: 1;
  color: cyan;
  border: 10px solid blue;
}
```
```html
&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
&lt;div id=&quot;grid&quot;&gt;
  &lt;div&gt;
    &lt;div id=&quot;abspos&quot;&gt;&lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;
```
```js
let w = document.getElementById(&apos;abspos&apos;).offsetWidth;
document.getElementById(&quot;log&quot;).textContent = &quot;offsetWidth = &quot; + w;
```

Result: the offsetWidth is -70, and no blue border is shown
Expected: It should be 20 instead. And the blue border should be visible.

Chromium and Firefox do it correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1889504</commentid>
    <comment_count>1</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-07 05:04:54 -0700</bug_when>
    <thetext>I am unable to reproduce the bug using attached test case in attachment field using Safari 15.6 on macOS 12.5 and it shows &quot;offset of 20 px&quot; similar to other browsers (Chrome Canary 106 and Firefox Nightly 105). I am marking this as &quot;RESOLVED CONFIGURATION CHANGED&quot;. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>359700</attachid>
            <date>2019-01-21 11:51:28 -0800</date>
            <delta_ts>2019-01-21 11:51:28 -0800</delta_ts>
            <desc>testcase</desc>
            <filename>testcase.htm</filename>
            <type>text/html</type>
            <size>552</size>
            <attacher name="Oriol Brufau">obrufau</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8bWV0YSBjaGFyc2V0PSJ1dGYtOCIgLz4KPHN0eWxlPgoj
Z3JpZCB7CiAgZGlzcGxheTogZ3JpZDsKICBncmlkOiAxMDBweCAvIDEwMHB4OwogIGJvcmRlcjog
c29saWQ7CiAgd2lkdGg6IDEwMHB4OwogIGhlaWdodDogMTAwcHg7CiAgcG9zaXRpb246IHJlbGF0
aXZlOwp9CiNhYnNwb3MgewogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBsZWZ0OiAzMHB4OwogIHJp
Z2h0OiA0MHB4OwogIGdyaWQtY29sdW1uLWVuZDogMTsKICBjb2xvcjogY3lhbjsKICBib3JkZXI6
IDEwcHggc29saWQgYmx1ZTsKfQo8L3N0eWxlPgo8ZGl2IGlkPSJsb2ciPjwvZGl2Pgo8ZGl2IGlk
PSJncmlkIj4KICA8ZGl2PgogICAgPGRpdiBpZD0iYWJzcG9zIj48L2Rpdj4KICA8L2Rpdj4KPC9k
aXY+CjxzY3JpcHQ+CmxldCB3ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2Fic3BvcycpLm9m
ZnNldFdpZHRoOwpkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgibG9nIikudGV4dENvbnRlbnQgPSAi
b2Zmc2V0V2lkdGggPSAiICsgdzsKPC9zY3JpcHQ+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>