text-align start / end failure in table cells
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Apr 2017 20:59:36 +0000 (20:59 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 14 Apr 2017 20:59:36 +0000 (20:59 +0000)
commit8e5cae22a5dc8d022871472efbd2a28eb9c65757
tree532dd5e3f67fca36aa58aea6f71aedddcad61807
parent68f0e73832735bc6cf019f26776e769ecb472c99
text-align start / end failure in table cells
https://bugs.webkit.org/show_bug.cgi?id=141417
<rdar://problem/31051672>

Reviewed by Antti Koivisto.

Source/WebCore:

Apply "text-align: center" on th elements when parent's computed value for the 'text-align' property
is its initial value, unless it is explicitly set.

Test: fast/table/center-th-when-parent-has-initial-text-align.html

* css/CSSProperties.json:
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyInitialTextAlign):
(WebCore::StyleBuilderCustom::applyValueTextAlign):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle):
(WebCore::StyleResolver::applyProperty):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::hasExplicitlySetTextAlign):
(WebCore::RenderStyle::setHasExplicitlySetTextAlign):
(WebCore::RenderStyle::NonInheritedFlags::hasExplicitlySetTextAlign):
(WebCore::RenderStyle::NonInheritedFlags::setHasExplicitlySetTextAlign):

LayoutTests:

* fast/table/center-th-when-parent-has-initial-text-align-expected.html: Added.
* fast/table/center-th-when-parent-has-initial-text-align.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215375 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/table/center-th-when-parent-has-initial-text-align-expected.html [new file with mode: 0644]
LayoutTests/fast/table/center-th-when-parent-has-initial-text-align.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSProperties.json
Source/WebCore/css/StyleBuilderCustom.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/rendering/style/RenderStyle.h