Bug 158537

Summary: [css-grid] CRASH when getting the computed style of a grid with only absolutely positioned children
Product: WebKit Reporter: Sergio Villar Senin <svillar>
Component: New BugsAssignee: Sergio Villar Senin <svillar>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, buildbot, cdumez, darin, dino, rniwa, svillar
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews100 for mac-yosemite
none
Archive of layout-test-results from ews106 for mac-yosemite-wk2
none
Archive of layout-test-results from ews126 for ios-simulator-wk2
none
Archive of layout-test-results from ews117 for mac-yosemite
none
Patch darin: review+

Description Sergio Villar Senin 2016-06-08 12:20:52 PDT
[css-grid] CRASH when getting the computed style of a grid with only absolutely positioned children
Comment 1 Sergio Villar Senin 2016-06-08 12:28:55 PDT
Created attachment 280823 [details]
Patch
Comment 2 Build Bot 2016-06-08 13:16:47 PDT
Comment on attachment 280823 [details]
Patch

Attachment 280823 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/1468378

New failing tests:
fast/css-grid-layout/grid-template-shorthand-get-set.html
Comment 3 Build Bot 2016-06-08 13:16:52 PDT
Created attachment 280827 [details]
Archive of layout-test-results from ews100 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 4 Build Bot 2016-06-08 13:20:14 PDT
Comment on attachment 280823 [details]
Patch

Attachment 280823 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/1468383

New failing tests:
fast/css-grid-layout/grid-template-shorthand-get-set.html
Comment 5 Build Bot 2016-06-08 13:20:18 PDT
Created attachment 280830 [details]
Archive of layout-test-results from ews106 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews106  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 6 Build Bot 2016-06-08 13:24:59 PDT
Comment on attachment 280823 [details]
Patch

Attachment 280823 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/1468381

New failing tests:
fast/css-grid-layout/grid-template-shorthand-get-set.html
Comment 7 Build Bot 2016-06-08 13:25:02 PDT
Created attachment 280831 [details]
Archive of layout-test-results from ews126 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews126  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.4
Comment 8 Build Bot 2016-06-08 13:37:22 PDT
Comment on attachment 280823 [details]
Patch

Attachment 280823 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/1468396

New failing tests:
editing/selection/selection-in-iframe-removed-crash.html
fast/css-grid-layout/grid-template-shorthand-get-set.html
Comment 9 Build Bot 2016-06-08 13:37:25 PDT
Created attachment 280833 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 10 Sergio Villar Senin 2016-06-09 04:03:36 PDT
Created attachment 280911 [details]
Patch

adjusted test results
Comment 11 Darin Adler 2016-06-09 09:38:15 PDT
Comment on attachment 280911 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=280911&action=review

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:1129
> +        auto& positions = isRowAxis ? downcast<RenderGrid>(renderer)->columnPositions() : downcast<RenderGrid>(renderer)->rowPositions();

Even though it’s only used in one line of code, the local variable is a big help here, so I’d do it:

    auto& grid = downcast<RenderGrid>(*renderer);
    auto& positions = isRowAxis ? grid.columnPositions() : grid.rowPositions();
Comment 12 Sergio Villar Senin 2016-06-10 00:40:01 PDT
Committed r201919: <http://trac.webkit.org/changeset/201919>