[Webkit-unassigned] [Bug 193656] New: [css-grid] abspos inside grid can have negative sizes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 21 11:51:28 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=193656

            Bug ID: 193656
           Summary: [css-grid] abspos inside grid can have negative sizes
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: obrufau at igalia.com

Created attachment 359700

  --> https://bugs.webkit.org/attachment.cgi?id=359700&action=review

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
<div id="log"></div>
<div id="grid">
  <div>
    <div id="abspos"></div>
  </div>
</div>
```
```js
let w = document.getElementById('abspos').offsetWidth;
document.getElementById("log").textContent = "offsetWidth = " + 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190121/0227d814/attachment.html>


More information about the webkit-unassigned mailing list