WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
172707
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved
https://bugs.webkit.org/show_bug.cgi?id=172707
Summary
[css-align][css-flex][css-grid] 'auto' values of align-self and justify-self ...
Javier Fernandez
Reported
2017-05-30 05:00:19 PDT
The 'auto' values on align-self and justify-self must not be resolved using the parent's align-items and justify-items computed value.
https://lists.w3.org/Archives/Public/www-style/2015Dec/0061.html
Attachments
Patch
(97.14 KB, patch)
2017-05-30 16:22 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews113 for mac-elcapitan
(1.38 MB, application/zip)
2017-05-30 16:58 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews101 for mac-elcapitan
(529.65 KB, application/zip)
2017-05-30 17:08 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews107 for mac-elcapitan-wk2
(545.15 KB, application/zip)
2017-05-30 17:12 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews122 for ios-simulator-wk2
(10.23 MB, application/zip)
2017-05-30 17:16 PDT
,
Build Bot
no flags
Details
Patch
(104.02 KB, patch)
2017-05-31 14:44 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
(1.15 MB, application/zip)
2017-05-31 15:51 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews101 for mac-elcapitan
(1.05 MB, application/zip)
2017-05-31 15:54 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews112 for mac-elcapitan
(1.81 MB, application/zip)
2017-05-31 16:05 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews121 for ios-simulator-wk2
(12.94 MB, application/zip)
2017-05-31 16:10 PDT
,
Build Bot
no flags
Details
Patch
(108.38 KB, patch)
2017-05-31 16:59 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews116 for mac-elcapitan
(1.78 MB, application/zip)
2017-05-31 17:57 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews101 for mac-elcapitan
(1.07 MB, application/zip)
2017-05-31 17:59 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
(1.14 MB, application/zip)
2017-05-31 18:07 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews125 for ios-simulator-wk2
(902.79 KB, application/zip)
2017-05-31 18:37 PDT
,
Build Bot
no flags
Details
Patch
(109.77 KB, patch)
2017-06-01 06:47 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews101 for mac-elcapitan
(1.09 MB, application/zip)
2017-06-01 07:27 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews117 for mac-elcapitan
(1.93 MB, application/zip)
2017-06-01 07:47 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews105 for mac-elcapitan-wk2
(1.38 MB, application/zip)
2017-06-01 11:14 PDT
,
Build Bot
no flags
Details
Patch
(110.98 KB, patch)
2017-06-01 15:42 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-elcapitan
(1.24 MB, application/zip)
2017-06-01 16:18 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews104 for mac-elcapitan-wk2
(1.30 MB, application/zip)
2017-06-01 16:23 PDT
,
Build Bot
no flags
Details
Archive of layout-test-results from ews115 for mac-elcapitan
(1.79 MB, application/zip)
2017-06-01 17:10 PDT
,
Build Bot
no flags
Details
Patch
(117.90 KB, patch)
2017-06-02 00:29 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Patch
(111.32 KB, patch)
2017-07-10 15:28 PDT
,
Javier Fernandez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(24)
View All
Add attachment
proposed patch, testcase, etc.
Javier Fernandez
Comment 1
2017-05-30 16:22:58 PDT
Created
attachment 311550
[details]
Patch
Build Bot
Comment 2
2017-05-30 16:58:12 PDT
Comment on
attachment 311550
[details]
Patch
Attachment 311550
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3844993
Number of test failures exceeded the failure limit.
Build Bot
Comment 3
2017-05-30 16:58:13 PDT
Created
attachment 311554
[details]
Archive of layout-test-results from ews113 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews113 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 4
2017-05-30 17:08:13 PDT
Comment on
attachment 311550
[details]
Patch
Attachment 311550
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3845064
Number of test failures exceeded the failure limit.
Build Bot
Comment 5
2017-05-30 17:08:15 PDT
Created
attachment 311557
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 6
2017-05-30 17:12:40 PDT
Comment on
attachment 311550
[details]
Patch
Attachment 311550
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3845069
Number of test failures exceeded the failure limit.
Build Bot
Comment 7
2017-05-30 17:12:42 PDT
Created
attachment 311558
[details]
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 8
2017-05-30 17:16:10 PDT
Comment on
attachment 311550
[details]
Patch
Attachment 311550
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3845019
Number of test failures exceeded the failure limit.
Build Bot
Comment 9
2017-05-30 17:16:12 PDT
Created
attachment 311559
[details]
Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Javier Fernandez
Comment 10
2017-05-31 14:44:06 PDT
Created
attachment 311637
[details]
Patch
Build Bot
Comment 11
2017-05-31 15:50:59 PDT
Comment on
attachment 311637
[details]
Patch
Attachment 311637
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3850504
New failing tests: fast/repaint/align-items-overflow-change.html svg/css/getComputedStyle-basic.xhtml css3/parse-alignment-of-root-elements.html fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html fast/repaint/align-items-change.html fast/repaint/justify-items-overflow-change.html
Build Bot
Comment 12
2017-05-31 15:51:01 PDT
Created
attachment 311645
[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 13
2017-05-31 15:54:12 PDT
Comment on
attachment 311637
[details]
Patch
Attachment 311637
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3850538
New failing tests: fast/repaint/align-items-overflow-change.html svg/css/getComputedStyle-basic.xhtml css3/parse-alignment-of-root-elements.html fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html fast/repaint/align-items-change.html fast/repaint/justify-items-overflow-change.html
Build Bot
Comment 14
2017-05-31 15:54:14 PDT
Created
attachment 311646
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 15
2017-05-31 16:05:10 PDT
Comment on
attachment 311637
[details]
Patch
Attachment 311637
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3850509
New failing tests: fast/css/getComputedStyle/computed-style-without-renderer.html svg/css/getComputedStyle-basic.xhtml css3/parse-alignment-of-root-elements.html fast/css/getComputedStyle/computed-style.html fast/repaint/align-items-overflow-change.html fast/repaint/align-items-change.html fast/repaint/justify-items-overflow-change.html
Build Bot
Comment 16
2017-05-31 16:05:11 PDT
Created
attachment 311647
[details]
Archive of layout-test-results from ews112 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 17
2017-05-31 16:10:32 PDT
Comment on
attachment 311637
[details]
Patch
Attachment 311637
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3850513
New failing tests: css3/parse-alignment-of-root-elements.html
Build Bot
Comment 18
2017-05-31 16:10:34 PDT
Created
attachment 311649
[details]
Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Javier Fernandez
Comment 19
2017-05-31 16:59:49 PDT
Created
attachment 311658
[details]
Patch
Build Bot
Comment 20
2017-05-31 17:57:04 PDT
Comment on
attachment 311658
[details]
Patch
Attachment 311658
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3851105
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 21
2017-05-31 17:57:06 PDT
Created
attachment 311667
[details]
Archive of layout-test-results from ews116 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 22
2017-05-31 17:59:10 PDT
Comment on
attachment 311658
[details]
Patch
Attachment 311658
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3851196
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 23
2017-05-31 17:59:11 PDT
Created
attachment 311668
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 24
2017-05-31 18:07:53 PDT
Comment on
attachment 311658
[details]
Patch
Attachment 311658
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3851241
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 25
2017-05-31 18:07:54 PDT
Created
attachment 311669
[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 26
2017-05-31 18:37:06 PDT
Comment on
attachment 311658
[details]
Patch
Attachment 311658
[details]
did not pass ios-sim-ews (ios-simulator-wk2): Output:
http://webkit-queues.webkit.org/results/3851304
New failing tests: compositing/masks/compositing-clip-path-change-no-repaint.html
Build Bot
Comment 27
2017-05-31 18:37:07 PDT
Created
attachment 311670
[details]
Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Javier Fernandez
Comment 28
2017-06-01 06:47:58 PDT
Created
attachment 311696
[details]
Patch
Build Bot
Comment 29
2017-06-01 07:27:15 PDT
Comment on
attachment 311696
[details]
Patch
Attachment 311696
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3853731
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 30
2017-06-01 07:27:16 PDT
Created
attachment 311698
[details]
Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 31
2017-06-01 07:47:06 PDT
Comment on
attachment 311696
[details]
Patch
Attachment 311696
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3853745
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 32
2017-06-01 07:47:07 PDT
Created
attachment 311699
[details]
Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 33
2017-06-01 11:14:24 PDT
Comment on
attachment 311696
[details]
Patch
Attachment 311696
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3854614
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 34
2017-06-01 11:14:25 PDT
Created
attachment 311731
[details]
Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Javier Fernandez
Comment 35
2017-06-01 15:42:36 PDT
Created
attachment 311768
[details]
Patch
Build Bot
Comment 36
2017-06-01 16:18:21 PDT
Comment on
attachment 311768
[details]
Patch
Attachment 311768
[details]
did not pass mac-ews (mac): Output:
http://webkit-queues.webkit.org/results/3856178
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 37
2017-06-01 16:18:22 PDT
Created
attachment 311773
[details]
Archive of layout-test-results from ews102 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Build Bot
Comment 38
2017-06-01 16:23:58 PDT
Comment on
attachment 311768
[details]
Patch
Attachment 311768
[details]
did not pass mac-wk2-ews (mac-wk2): Output:
http://webkit-queues.webkit.org/results/3856180
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 39
2017-06-01 16:23:59 PDT
Created
attachment 311775
[details]
Archive of layout-test-results from ews104 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Build Bot
Comment 40
2017-06-01 17:10:34 PDT
Comment on
attachment 311768
[details]
Patch
Attachment 311768
[details]
did not pass mac-debug-ews (mac): Output:
http://webkit-queues.webkit.org/results/3856340
New failing tests: svg/css/getComputedStyle-basic.xhtml fast/css/getComputedStyle/computed-style.html fast/css/getComputedStyle/computed-style-without-renderer.html
Build Bot
Comment 41
2017-06-01 17:10:35 PDT
Created
attachment 311785
[details]
Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Javier Fernandez
Comment 42
2017-06-02 00:29:43 PDT
Created
attachment 311807
[details]
Patch
Antti Koivisto
Comment 43
2017-07-10 07:31:02 PDT
Comment on
attachment 311807
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=311807&action=review
This cleans up things nicely, r=me
> Source/WebCore/rendering/RenderFlexibleBox.cpp:249 > + for (auto* child = firstChildBox(); child; child = child->nextSiblingBox()) {
You should be able to use for (auto& child : childrenOfType<RenderBox>(*this)) {
> Source/WebCore/rendering/RenderFlexibleBox.cpp:250 > + ItemPosition previousAlignment =child->style().resolvedAlignSelf(oldStyle, selfAlignmentNormalBehavior()).position();
missing space after =
> Source/WebCore/rendering/RenderGrid.cpp:96 > +StyleSelfAlignmentData RenderGrid::selfAlignmentForChild(GridAxis axis, const RenderBox& child, const RenderStyle* style) const
Why is the style a pointer? I don't see this being called with null style.
> Source/WebCore/rendering/RenderGrid.cpp:128 > + for (RenderBox* child = firstChildBox(); child; child = child->nextSiblingBox()) {
Here too
> Source/WebCore/rendering/RenderGrid.cpp:1205 > +StyleSelfAlignmentData RenderGrid::alignSelfForChild(const RenderBox& child, const RenderStyle* style) const
It is bit unclear whose style the 'style' is and when it is ok to call this will null style.
> Source/WebCore/rendering/RenderGrid.cpp:1212 > +StyleSelfAlignmentData RenderGrid::justifySelfForChild(const RenderBox& child, const RenderStyle* style) const
Same here.
Javier Fernandez
Comment 44
2017-07-10 07:40:53 PDT
Comment on
attachment 311807
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=311807&action=review
>> Source/WebCore/rendering/RenderGrid.cpp:96 >> +StyleSelfAlignmentData RenderGrid::selfAlignmentForChild(GridAxis axis, const RenderBox& child, const RenderStyle* style) const > > Why is the style a pointer? I don't see this being called with null style.
Actually it's default to nullptr in the function declaration, since the regular use of this function doesn't require an explicit style to resolve the 'auto' values. We should just uses the grid's style for resolving grid item's 'auto' values.
>> Source/WebCore/rendering/RenderGrid.cpp:1205 >> +StyleSelfAlignmentData RenderGrid::alignSelfForChild(const RenderBox& child, const RenderStyle* style) const > > It is bit unclear whose style the 'style' is and when it is ok to call this will null style.
This follows the same patten that the selfAlignmentForChild function, so we allow passing nullptr so it uses the caller's style for resolving any 'auto' values.
Antti Koivisto
Comment 45
2017-07-10 09:00:00 PDT
> Actually it's default to nullptr in the function declaration, since the > regular use of this function doesn't require an explicit style to resolve > the 'auto' values. We should just uses the grid's style for resolving grid > item's 'auto' values.
You just added the function and as far as I see all call sites call it with non-null style. Are you planning to add more call sites?
> This follows the same patten that the selfAlignmentForChild function, so we > allow passing nullptr so it uses the caller's style for resolving any 'auto' > values.
Maybe there is a more descriptive name for it than just 'style'? There are two styles involved in return child.style().resolvedJustifySelf(style, selfAlignmentNormalBehavior(&child)); Would the latter be for example 'gridStyle' or 'parentStyle'?
Javier Fernandez
Comment 46
2017-07-10 09:26:22 PDT
(In reply to Antti Koivisto from
comment #45
)
> > Actually it's default to nullptr in the function declaration, since the > > regular use of this function doesn't require an explicit style to resolve > > the 'auto' values. We should just uses the grid's style for resolving grid > > item's 'auto' values. > > You just added the function and as far as I see all call sites call it with > non-null style. Are you planning to add more call sites?
Yes, I've got another patch that will call that function several times with the nullptr style. I'm still working on it, so I'd be ok with simplifying this function now if you think it's clearer.
> > > This follows the same patten that the selfAlignmentForChild function, so we > > allow passing nullptr so it uses the caller's style for resolving any 'auto' > > values. > > Maybe there is a more descriptive name for it than just 'style'? There are > two styles involved in > > return child.style().resolvedJustifySelf(style, > selfAlignmentNormalBehavior(&child)); > > Would the latter be for example 'gridStyle' or 'parentStyle'?
Yes, those would be definitively better names.
Javier Fernandez
Comment 47
2017-07-10 15:28:16 PDT
Created
attachment 315036
[details]
Patch
WebKit Commit Bot
Comment 48
2017-07-10 16:56:25 PDT
Comment on
attachment 315036
[details]
Patch Clearing flags on attachment: 315036 Committed
r219315
: <
http://trac.webkit.org/changeset/219315
>
WebKit Commit Bot
Comment 49
2017-07-10 16:56:27 PDT
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.
Top of Page
Format For Printing
XML
Clone This Bug