RESOLVED FIXED Bug 134419
[CSS Grid Layout] Implement justify-self css property
https://bugs.webkit.org/show_bug.cgi?id=134419
Summary [CSS Grid Layout] Implement justify-self css property
Javier Fernandez
Reported 2014-06-27 15:34:11 PDT
This is an intermediate step towards the full implementation of the CSS Box Alignment Module Level 3. The justify-self is the first property to be implemented, so after that we can adapt and share code between the other properties of the specs (align-self and align-items). After having a share source code for all of them, the justify-items property should be implemented to complete the specification.
Attachments
Patch (36.28 KB, patch)
2014-06-27 16:18 PDT, Javier Fernandez
no flags
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (505.73 KB, application/zip)
2014-06-27 18:20 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (504.19 KB, application/zip)
2014-06-27 19:12 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 (478.95 KB, application/zip)
2014-06-27 22:28 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (643.34 KB, application/zip)
2014-06-27 23:46 PDT, Build Bot
no flags
patch rebased (36.22 KB, patch)
2014-06-30 04:09 PDT, Javier Fernandez
no flags
Archive of layout-test-results from webkit-ews-06 for mac-mountainlion (505.83 KB, application/zip)
2014-06-30 05:56 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 (537.45 KB, application/zip)
2014-06-30 06:39 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion (503.18 KB, application/zip)
2014-06-30 07:00 PDT, Build Bot
no flags
Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 (481.97 KB, application/zip)
2014-06-30 07:28 PDT, Build Bot
no flags
Fixed root cause of the canvas-color test failure. (36.66 KB, patch)
2014-06-30 15:29 PDT, Javier Fernandez
no flags
Patch (36.30 KB, patch)
2014-07-09 15:57 PDT, Javier Fernandez
no flags
Patch (36.25 KB, patch)
2014-07-11 03:24 PDT, Javier Fernandez
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (537.67 KB, application/zip)
2014-07-11 04:53 PDT, Build Bot
no flags
Patch (36.25 KB, patch)
2014-07-11 12:34 PDT, Javier Fernandez
no flags
Javier Fernandez
Comment 1 2014-06-27 16:18:16 PDT
Build Bot
Comment 2 2014-06-27 18:20:13 PDT
Comment on attachment 234031 [details] Patch Attachment 234031 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6108163447193600 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 3 2014-06-27 18:20:19 PDT
Created attachment 234037 [details] Archive of layout-test-results from webkit-ews-02 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 4 2014-06-27 19:12:25 PDT
Comment on attachment 234031 [details] Patch Attachment 234031 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5934996246233088 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 5 2014-06-27 19:12:34 PDT
Created attachment 234039 [details] Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 6 2014-06-27 22:28:10 PDT
Comment on attachment 234031 [details] Patch Attachment 234031 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5167190873473024 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 7 2014-06-27 22:28:18 PDT
Created attachment 234043 [details] Archive of layout-test-results from webkit-ews-14 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-14 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 8 2014-06-27 23:46:52 PDT
Comment on attachment 234031 [details] Patch Attachment 234031 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4729116557312000 New failing tests: media/W3C/video/networkState/networkState_during_loadstart.html fast/canvas/canvas-color-serialization.html
Build Bot
Comment 9 2014-06-27 23:46:58 PDT
Created attachment 234047 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Javier Fernandez
Comment 10 2014-06-30 04:09:05 PDT
Created attachment 234070 [details] patch rebased
Build Bot
Comment 11 2014-06-30 05:56:43 PDT
Comment on attachment 234070 [details] patch rebased Attachment 234070 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5198563973791744 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 12 2014-06-30 05:56:48 PDT
Created attachment 234071 [details] Archive of layout-test-results from webkit-ews-06 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-06 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 13 2014-06-30 06:39:50 PDT
Comment on attachment 234070 [details] patch rebased Attachment 234070 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5093312872579072 New failing tests: fast/canvas/canvas-color-serialization.html media/W3C/audio/canPlayType/canPlayType_application_octet_stream_with_codecs_1.html
Build Bot
Comment 14 2014-06-30 06:39:55 PDT
Created attachment 234073 [details] Archive of layout-test-results from webkit-ews-10 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-10 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 15 2014-06-30 07:00:05 PDT
Comment on attachment 234070 [details] patch rebased Attachment 234070 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5849289636970496 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 16 2014-06-30 07:00:14 PDT
Created attachment 234075 [details] Archive of layout-test-results from webkit-ews-05 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-05 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 17 2014-06-30 07:28:50 PDT
Comment on attachment 234070 [details] patch rebased Attachment 234070 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/4784338025578496 New failing tests: fast/canvas/canvas-color-serialization.html
Build Bot
Comment 18 2014-06-30 07:28:58 PDT
Created attachment 234077 [details] Archive of layout-test-results from webkit-ews-12 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-12 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Javier Fernandez
Comment 19 2014-06-30 15:29:10 PDT
Created attachment 234103 [details] Fixed root cause of the canvas-color test failure.
Dean Jackson
Comment 20 2014-07-03 14:57:28 PDT
Comment on attachment 234103 [details] Fixed root cause of the canvas-color test failure. View in context: https://bugs.webkit.org/attachment.cgi?id=234103&action=review > Source/WebCore/css/CSSParser.cpp:1371 > - color = document->page()->theme().systemColor(id).rgb(); > - return true; > + Color parsedColor = document->page()->theme().systemColor(id); > + color = parsedColor.rgb(); > + return parsedColor.isValid(); This seems fine, but I'm quite concerned that there was a bug that only manifests with this patch applied and that we can't reproduce normally. > Source/WebCore/css/CSSParser.cpp:3123 > + if (value->id == CSSValueTrue || value->id == CSSValueSafe) > + overflowAlignmentKeyword = cssValuePool().createIdentifierValue(value->id); > + else > + return false; Please write this the other way around, as an early return. if (id != True && id != Safe) return false; overflowAlignmentKeyword = ... > Source/WebCore/css/CSSParser.cpp:3132 > + if (isItemPositionKeyword(value->id)) > + position = cssValuePool().createIdentifierValue(value->id); > + else > + return false; Same here. > Source/WebCore/css/CSSParser.cpp:3144 > + addProperty(propId, createPrimitiveValuePair(position, overflowAlignmentKeyword), important); > + else > + addProperty(propId, position.release(), important); I assume createPrimitiveValuePair releases position? Do you even need to do this? > Source/WebCore/css/CSSValueKeywords.in:563 > + > + Nit: double space
Javier Fernandez
Comment 21 2014-07-06 01:16:30 PDT
(In reply to comment #20) > (From update of attachment 234103 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=234103&action=review > > > Source/WebCore/css/CSSParser.cpp:1371 > > - color = document->page()->theme().systemColor(id).rgb(); > > - return true; > > + Color parsedColor = document->page()->theme().systemColor(id); > > + color = parsedColor.rgb(); > > + return parsedColor.isValid(); > > This seems fine, but I'm quite concerned that there was a bug that only manifests with this patch applied and that we can't reproduce normally. > I've been investigating and finally got the answer to this weird issue. First of all, I think the portion patch specific to the parseSystemColor is clearly necessary, since the function should return whether the color value, passed as string, is a valid parsed color or not. Current implementation returns false only if the string is not resolved to a valid CSSValueKeywordID. The canvas-color-serialization.html test fails when trying invalid color values, assuming they are not valid keywords, when passing "true" as color. The reason why this patch, apparently unrelated to the color parsing logic, makes the test to fail is that the CSSValueTrue keyword is defined for the overflow-alignment "true". Hence, "true" is now a valid CSSValueKeywordID and current implementation does not detect, because of insufficient/wrong checks, that is not a valid color. So, the parseSystemColor should return parsedColor.isValid(); instead. I filed a separated bug (#f134661) or this issue, so I could remove that portion of the reviewed patch and land a cleaner one, focusing only in the justify-self parsing logic.
Javier Fernandez
Comment 22 2014-07-09 15:57:39 PDT
Created attachment 234664 [details] Patch Parch rebased. Also, removed the canvas color fix because it was already fixed in r170933.
Javier Fernandez
Comment 23 2014-07-11 03:24:46 PDT
Created attachment 234754 [details] Patch Parch rebase and ready for landing.
Build Bot
Comment 24 2014-07-11 04:53:00 PDT
Comment on attachment 234754 [details] Patch Attachment 234754 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5090585635454976 New failing tests: media/media-fragments/TC0001.html
Build Bot
Comment 25 2014-07-11 04:53:08 PDT
Created attachment 234758 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Javier Fernandez
Comment 26 2014-07-11 12:34:43 PDT
Created attachment 234774 [details] Patch Retrying the same patch.
WebKit Commit Bot
Comment 27 2014-07-11 13:26:25 PDT
Comment on attachment 234774 [details] Patch Clearing flags on attachment: 234774 Committed r171010: <http://trac.webkit.org/changeset/171010>
WebKit Commit Bot
Comment 28 2014-07-11 13:26:33 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.