Use the parent box style to adjust RenderStyle for alignment.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 May 2017 14:09:37 +0000 (14:09 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 May 2017 14:09:37 +0000 (14:09 +0000)
commit085d3b70af5bdaaeeafdcd283c305957171bad38
tree41bdbe2adf5aca281f3a3239423e2b6ab2f26544
parent7352f61396d68c6d76630207aa6abb28960a3098
Use the parent box style to adjust RenderStyle for alignment.
https://bugs.webkit.org/show_bug.cgi?id=172215

Patch by Emilio Cobos Álvarez <ecobos@igalia.com> on 2017-05-29
Reviewed by Antti Koivisto.

Source/WebCore:

The css-flexbox spec defined align-self in terms of the parent
element, which is what this code did.

The css-align spec defines these properties in terms of the style of
the containing box instead, which means display: contents styles
should not be used for this adjustment, but the parent box style
instead.

For example, align-items is defined as:

> This property specifies the default align-self for all of the boxes
> (including anonymous boxes) participating in this box’s formatting
> context.

Note that the css-align spec was recently updated to align (no pun
intended) with Gecko, and make the |auto| value compute to itself.
This patch puts us in a more recent spec than before, but not totally
up-to-date.

Tests: imported/w3c/web-platform-tests/css/css-display-3/display-contents-alignment-001.html
       imported/w3c/web-platform-tests/css/css-display-3/display-contents-alignment-002.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::adjustStyleForAlignment):

LayoutTests:

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp