Bug 104821 - [CSS Grid Layout] element.style.webkitGridRows / webkitGridColumns doesn't return the right value
Summary: [CSS Grid Layout] element.style.webkitGridRows / webkitGridColumns doesn't re...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 60731
  Show dependency treegraph
 
Reported: 2012-12-12 09:21 PST by Julien Chaffraix
Modified: 2013-11-21 10:41 PST (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 2012-12-12 09:21:36 PST
If you try to get back the grid-rows / grid-columns from JS using Element.style, the values are not right. For example, with minmax:

element = document.createElement("div");
document.body.appendChild(element);
element.style.font = "10px Ahem";
element.style.webkitGridColumns = "minmax(22em, 8vh)";
element.style.webkitGridRows = "minmax(10vw, 5em)";
alert(element.style.webkitGridColumns); // "22em 8vh"
alert(element.style.webkitGridRows); // "10vw 5em"

It's unclear to me what we _should_ return though but those are definitely wrong. Also we have no coverage for getting back using Element.style which explains why we missed it. Whoever takes this bug should ensure a good coverage for most scenarios.
Comment 1 Sergio Villar Senin 2013-11-21 10:41:58 PST
This was already fixed and properly covered by multiple tests. Just to mention some

fast/css-grid-layout/grid-columns-rows-get-set.html
fast/css-grid-layout/grid-columns-rows-get-set-multiple.html
fast/css-grid-layout/named-grid-line-get-set.html
fast/css-grid-layout/grid-auto-columns-rows-get-set.html