RESOLVED FIXED 191656
[css-grid] Consider scrollbars in populateGridPositionsForDirection()
https://bugs.webkit.org/show_bug.cgi?id=191656
Summary [css-grid] Consider scrollbars in populateGridPositionsForDirection()
Manuel Rego Casasnovas
Reported 2018-11-14 14:19:27 PST
We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(), that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction) but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
Attachments
Patch (19.85 KB, patch)
2018-11-15 02:45 PST, Manuel Rego Casasnovas
no flags
Patch (19.85 KB, patch)
2018-11-15 03:08 PST, Manuel Rego Casasnovas
no flags
=Patch for landing (20.03 KB, patch)
2018-11-15 03:39 PST, Manuel Rego Casasnovas
no flags
Patch for testing IOS EWS (20.03 KB, patch)
2018-11-15 12:52 PST, Manuel Rego Casasnovas
no flags
Archive of layout-test-results from ews123 for ios-simulator-wk2 (9.96 MB, application/zip)
2018-11-15 15:43 PST, EWS Watchlist
no flags
Checking ios-sim EWS (20.20 KB, patch)
2018-11-16 01:53 PST, Manuel Rego Casasnovas
no flags
Patch for landing (20.34 KB, patch)
2018-11-20 03:16 PST, Manuel Rego Casasnovas
no flags
Manuel Rego Casasnovas
Comment 1 2018-11-15 02:45:59 PST
Manuel Rego Casasnovas
Comment 2 2018-11-15 03:08:38 PST
Created attachment 354908 [details] Patch Fix build.
Javier Fernandez
Comment 3 2018-11-15 03:16:40 PST
Comment on attachment 354908 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354908&action=review > Source/WebCore/rendering/RenderGrid.cpp:1008 > + if (isRowAxis && style().isHorizontalWritingMode() && !style().isLeftToRightDirection()) Maybe a comment explaining why we only have to do it when computing the grid row axis would be useful here.
Manuel Rego Casasnovas
Comment 4 2018-11-15 03:39:20 PST
Created attachment 354909 [details] =Patch for landing
Manuel Rego Casasnovas
Comment 5 2018-11-15 03:40:12 PST
Comment on attachment 354908 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=354908&action=review Thanks for the review. >> Source/WebCore/rendering/RenderGrid.cpp:1008 >> + if (isRowAxis && style().isHorizontalWritingMode() && !style().isLeftToRightDirection()) > > Maybe a comment explaining why we only have to do it when computing the grid row axis would be useful here. Done.
WebKit Commit Bot
Comment 6 2018-11-15 04:19:31 PST
Comment on attachment 354909 [details] =Patch for landing Clearing flags on attachment: 354909 Committed r238220: <https://trac.webkit.org/changeset/238220>
WebKit Commit Bot
Comment 7 2018-11-15 04:19:33 PST
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8 2018-11-15 04:20:31 PST
Truitt Savell
Comment 9 2018-11-15 08:47:54 PST
Truitt Savell
Comment 10 2018-11-15 12:40:47 PST
Reverted r238220 for reason: Introduced failing tests to iOS and is slowing down EWS Committed r238242: <https://trac.webkit.org/changeset/238242>
Manuel Rego Casasnovas
Comment 11 2018-11-15 12:52:25 PST
Created attachment 354974 [details] Patch for testing IOS EWS
EWS Watchlist
Comment 12 2018-11-15 15:43:16 PST
Comment on attachment 354974 [details] Patch for testing IOS EWS Attachment 354974 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/10008731 New failing tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
EWS Watchlist
Comment 13 2018-11-15 15:43:19 PST
Created attachment 354993 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Frédéric Wang (:fredw)
Comment 14 2018-11-15 22:23:24 PST
Comment on attachment 354974 [details] Patch for testing IOS EWS View in context: https://bugs.webkit.org/attachment.cgi?id=354974&action=review > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001-expected.html:35 > +<p>The test passes if it has the same output than the reference.</p> "same output as" (ok it's an imported test) > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html:7 > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> verifies* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html:32 > +<p>The test passes if it has the same output than the reference.</p> as the reference > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001-expected.html:36 > +<p>The test passes if it has the same output than the reference.</p> as* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html:7 > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> verifies* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html:33 > +<p>The test passes if it has the same output than the reference.</p> as* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001-expected.html:36 > +<p>The test passes if it has the same output than the reference.</p> as* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html:7 > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> verifies* > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html:33 > +<p>The test passes if it has the same output than the reference.</p> as*
Frédéric Wang (:fredw)
Comment 15 2018-11-15 22:57:06 PST
(In reply to Build Bot from comment #12) > Comment on attachment 354974 [details] > Patch for testing IOS EWS > > Attachment 354974 [details] did not pass ios-sim-ews (ios-simulator-wk2): > Output: https://webkit-queues.webkit.org/results/10008731 > > New failing tests: > imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container- > scrollbar-vertical-rl-001.html > imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container- > scrollbar-vertical-lr-001.html > imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container- > scrollbar-001.html These tests render correctly for be with run-safari --ios-simulator but I get the extra gray space when doing run-webkit-tests --ios-simulator. I suspect this is a bug in iOS so I would suggest just marking them as failing and opening a separate bug.
Manuel Rego Casasnovas
Comment 16 2018-11-16 01:01:06 PST
(In reply to Frédéric Wang (:fredw) from comment #14) > Comment on attachment 354974 [details] > Patch for testing IOS EWS > > View in context: > https://bugs.webkit.org/attachment.cgi?id=354974&action=review > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001-expected.html:35 > > +<p>The test passes if it has the same output than the reference.</p> > > "same output as" (ok it's an imported test) > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html:7 > > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> > > verifies* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html:32 > > +<p>The test passes if it has the same output than the reference.</p> > > as the reference > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001-expected.html:36 > > +<p>The test passes if it has the same output than the reference.</p> > > as* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html:7 > > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> > > verifies* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html:33 > > +<p>The test passes if it has the same output than the reference.</p> > > as* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001-expected.html:36 > > +<p>The test passes if it has the same output than the reference.</p> > > as* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html:7 > > +<meta name="assert" content="This test verifes that scrollbars are properly painted on grid containers, and are shown in the expected position depending on the direction."> > > verifies* > > > LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html:33 > > +<p>The test passes if it has the same output than the reference.</p> > > as* Thanks for the review, I've fixed these at: https://github.com/web-platform-tests/wpt/pull/14092 I'm also using Ahem there as that fixes the small pixel differences on the vertical writing modes tests.
Manuel Rego Casasnovas
Comment 17 2018-11-16 01:53:50 PST
Created attachment 355035 [details] Checking ios-sim EWS
Manuel Rego Casasnovas
Comment 18 2018-11-16 03:51:57 PST
Comment on attachment 355035 [details] Checking ios-sim EWS View in context: https://bugs.webkit.org/attachment.cgi?id=355035&action=review > Source/WebCore/rendering/RenderGrid.cpp:1008 > +#if !PLATFORM(IOS_FAMILY) Fred what do you think about this? With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. The other tests were fixed by using Ahem font.
Frédéric Wang (:fredw)
Comment 19 2018-11-19 07:08:33 PST
Comment on attachment 355035 [details] Checking ios-sim EWS View in context: https://bugs.webkit.org/attachment.cgi?id=355035&action=review >> Source/WebCore/rendering/RenderGrid.cpp:1008 >> +#if !PLATFORM(IOS_FAMILY) > > Fred what do you think about this? > With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. > > The other tests were fixed by using Ahem font. I guess the proper fix would be that iOS returns 0 for scrollbarLogicalWidth(). Maybe smfr knows better what to do here.
Manuel Rego Casasnovas
Comment 20 2018-11-20 01:41:41 PST
Comment on attachment 355035 [details] Checking ios-sim EWS View in context: https://bugs.webkit.org/attachment.cgi?id=355035&action=review >>> Source/WebCore/rendering/RenderGrid.cpp:1008 >>> +#if !PLATFORM(IOS_FAMILY) >> >> Fred what do you think about this? >> With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. >> >> The other tests were fixed by using Ahem font. > > I guess the proper fix would be that iOS returns 0 for scrollbarLogicalWidth(). Maybe smfr knows better what to do here. IMHO, this seems somehow out of scope of this fix. I could add a FIXME about that and report a bug, but should we block this change?
Frédéric Wang (:fredw)
Comment 21 2018-11-20 01:46:03 PST
(In reply to Manuel Rego Casasnovas from comment #20) > Comment on attachment 355035 [details] > Checking ios-sim EWS > > View in context: > https://bugs.webkit.org/attachment.cgi?id=355035&action=review > > >>> Source/WebCore/rendering/RenderGrid.cpp:1008 > >>> +#if !PLATFORM(IOS_FAMILY) > >> > >> Fred what do you think about this? > >> With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. > >> > >> The other tests were fixed by using Ahem font. > > > > I guess the proper fix would be that iOS returns 0 for scrollbarLogicalWidth(). Maybe smfr knows better what to do here. > > IMHO, this seems somehow out of scope of this fix. I could add a FIXME about > that and report a bug, but should we block this change? Ah, no I did not mean to do this in this bug. As I said in comment 15, I would rather open a separate bug to handle the case of iOS. I guess a quick !PLATFORM hack is ok for now.
Manuel Rego Casasnovas
Comment 22 2018-11-20 03:16:17 PST
Created attachment 355330 [details] Patch for landing
Manuel Rego Casasnovas
Comment 23 2018-11-20 03:46:32 PST
Comment on attachment 355035 [details] Checking ios-sim EWS View in context: https://bugs.webkit.org/attachment.cgi?id=355035&action=review >>>>> Source/WebCore/rendering/RenderGrid.cpp:1008 >>>>> +#if !PLATFORM(IOS_FAMILY) >>>> >>>> Fred what do you think about this? >>>> With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. >>>> >>>> The other tests were fixed by using Ahem font. >>> >>> I guess the proper fix would be that iOS returns 0 for scrollbarLogicalWidth(). Maybe smfr knows better what to do here. >> >> IMHO, this seems somehow out of scope of this fix. I could add a FIXME about that and report a bug, but should we block this change? > > Ah, no I did not mean to do this in this bug. As I said in comment 15, I would rather open a separate bug to handle the case of iOS. I guess a quick !PLATFORM hack is ok for now. Ok, reported bug #191857 about that. Thanks.
Manuel Rego Casasnovas
Comment 24 2018-11-20 03:47:05 PST
Comment on attachment 355035 [details] Checking ios-sim EWS View in context: https://bugs.webkit.org/attachment.cgi?id=355035&action=review >>>>> Source/WebCore/rendering/RenderGrid.cpp:1008 >>>>> +#if !PLATFORM(IOS_FAMILY) >>>> >>>> Fred what do you think about this? >>>> With this change the test grid-container-scrollbar-001.html is passing in ios-sim EWS too. >>>> >>>> The other tests were fixed by using Ahem font. >>> >>> I guess the proper fix would be that iOS returns 0 for scrollbarLogicalWidth(). Maybe smfr knows better what to do here. >> >> IMHO, this seems somehow out of scope of this fix. I could add a FIXME about that and report a bug, but should we block this change? > > Ah, no I did not mean to do this in this bug. As I said in comment 15, I would rather open a separate bug to handle the case of iOS. I guess a quick !PLATFORM hack is ok for now. Ok, reported bug #191857 about that. Thanks.
WebKit Commit Bot
Comment 25 2018-11-20 03:58:38 PST
Comment on attachment 355330 [details] Patch for landing Clearing flags on attachment: 355330 Committed r238395: <https://trac.webkit.org/changeset/238395>
WebKit Commit Bot
Comment 26 2018-11-20 03:58:40 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.