<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[176218] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/176218">176218</a></dd>
<dt>Author</dt> <dd>jfernandez@igalia.com</dd>
<dt>Date</dt> <dd>2014-11-17 11:52:42 -0800 (Mon, 17 Nov 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
https://bugs.webkit.org/show_bug.cgi?id=133359

Reviewed by David Hyatt.

Source/WebCore:

Broaden justify-self's parsing name as a preparation of migrating
align-self, align-items and justify-items to the CSS 3 Alignment syntax.

The current naming was too tied to justify-self and needs to
be broadened. This will reduce the follow-up implementations'
patches.

Upgrade align-self and align-items parsing to CSS 3

This change migrates the 2 properties to the CSS 3 Alignment
parsing. The new parsing is identical to how we parse
'justify-self'. The 2 properties need to be migrated together
as they are used in tandem in CSSComputedStyleDeclaration.

This change also removes EAlignItems as it is now unused.

Tests: css3/parse-align-items.html
       css3/parse-align-self.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isKeywordPropertyID): Removed align-items and align-self from the list.
(WebCore::isValidKeywordPropertyAndValue): Removed align-items and align-self from the list.
(WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
(WebCore::isBaselinePositionKeyword): Utility function added to identify Baseline keyword values.
(WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
(WebCore::CSSParser::parseJustifySelf): Deleted.
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Refactoring some mapping functions.
       (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
(WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
(WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
(WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustRenderStyle): Added a new adjustment to resolve the &quot;auto&quot; vale on the alignment properties.
(WebCore::StyleResolver::adjustStyleForAlignment): Added. Function to resolve the &quot;auto&quot; vale on the alignment properties.
(WebCore::StyleResolver::applyProperty):
(WebCore::isDisplayFlexibleBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayGridBox): Deleted. Moved to the RenderStyle.
(WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to the RenderStyle.
* css/StyleResolver.h:
* rendering/RenderBox.cpp:
(WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPosition enum.
(WebCore::resolveAlignment): Consider also that align-items could be &quot;auto&quot;, since it's the default now.
(WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPosition enum.
(WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPosition enum.
* rendering/RenderFlexibleBox.h:
* rendering/RenderFullScreen.cpp:
(WebCore::createFullScreenStyle): Adapted to the new ItemPosition enum.
* rendering/RenderMenuList.cpp:
(WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLRoot.cpp:
(WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPosition enum.
* rendering/mathml/RenderMathMLScripts.cpp:
(WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPosition enum.
(WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPosition enum.
* rendering/style/RenderStyle.h: Adapted to the new ItemPosition enum.
* rendering/style/RenderStyleConstants.h: Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPosition enum.
(WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPosition enum.
* rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPosition enum.
* style/StyleResolveTree.cpp:
(WebCore::Style::determineChange): Changes in the alignItems property will cause a Detach.

LayoutTests: