<!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>[196075] 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/196075">196075</a></dd>
<dt>Author</dt> <dd>hyatt@apple.com</dd>
<dt>Date</dt> <dd>2016-02-03 12:54:30 -0800 (Wed, 03 Feb 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Implement hanging-punctuation property parsing.
https://bugs.webkit.org/show_bug.cgi?id=18109.
Reviewed by Zalan Bujtas.
Source/WebCore:
Added parsing test in fast/css.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderEmphasisPositionFlagsToCSSValue):
(WebCore::hangingPunctuationToCSSValue):
(WebCore::fillRepeatToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextIndent):
(WebCore::CSSParser::parseHangingPunctuation):
(WebCore::CSSParser::parseLineBoxContain):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator HangingPunctuation):
(WebCore::CSSPrimitiveValue::operator LineBreak):
* css/CSSPropertyNames.in:
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertRegionBreakInside):
(WebCore::StyleBuilderConverter::convertHangingPunctuation):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
(WebCore::operator| ):
(WebCore::operator|= ):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
LayoutTests:
* fast/css/parsing-hanging-punctuation-expected.txt: Added.
* fast/css/parsing-hanging-punctuation.html: Added.
* fast/css/resources/parsing-hanging-punctuation.js: Added.
(test):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPrimitiveValueMappingsh">trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSPropertyNamesin">trunk/Source/WebCore/css/CSSPropertyNames.in</a></li>
<li><a href="#trunkSourceWebCorecssCSSValueKeywordsin">trunk/Source/WebCore/css/CSSValueKeywords.in</a></li>
<li><a href="#trunkSourceWebCorecssStyleBuilderConverterh">trunk/Source/WebCore/css/StyleBuilderConverter.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStylecpp">trunk/Source/WebCore/rendering/style/RenderStyle.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleh">trunk/Source/WebCore/rendering/style/RenderStyle.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleRenderStyleConstantsh">trunk/Source/WebCore/rendering/style/RenderStyleConstants.h</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatacpp">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleStyleRareInheritedDatah">trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssparsinghangingpunctuationexpectedtxt">trunk/LayoutTests/fast/css/parsing-hanging-punctuation-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsinghangingpunctuationhtml">trunk/LayoutTests/fast/css/parsing-hanging-punctuation.html</a></li>
<li><a href="#trunkLayoutTestsfastcssresourcesparsinghangingpunctuationjs">trunk/LayoutTests/fast/css/resources/parsing-hanging-punctuation.js</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/LayoutTests/ChangeLog        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-02-03 Dave Hyatt <hyatt@apple.com>
+
+ Implement hanging-punctuation property parsing.
+ https://bugs.webkit.org/show_bug.cgi?id=18109.
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/css/parsing-hanging-punctuation-expected.txt: Added.
+ * fast/css/parsing-hanging-punctuation.html: Added.
+ * fast/css/resources/parsing-hanging-punctuation.js: Added.
+ (test):
+
</ins><span class="cx"> 2016-02-03 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Skip fast/forms/input-user-input-sanitization.html on ios-simulator
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsinghangingpunctuationexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-hanging-punctuation-expected.txt (0 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-hanging-punctuation-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-hanging-punctuation-expected.txt        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+This tests checks that all of the input values for hanging-punctuation parse correctly.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS test("hanging-punctuation: none;") is "none"
+PASS test("hanging-punctuation: first;") is "first"
+PASS test("hanging-punctuation: last;") is "last"
+PASS test("hanging-punctuation: allow-end;") is "allow-end"
+PASS test("hanging-punctuation: force-end;") is "force-end"
+PASS test("hanging-punctuation: first last;") is "first last"
+PASS test("hanging-punctuation: last first;") is "last first"
+PASS test("hanging-punctuation: first allow-end;") is "first allow-end"
+PASS test("hanging-punctuation: first force-end;") is "first force-end"
+PASS test("hanging-punctuation: first allow-end last;") is "first allow-end last"
+PASS test("hanging-punctuation: last allow-end;") is "last allow-end"
+PASS test("hanging-punctuation: first first;") is ""
+PASS test("hanging-punctuation: nonsense;") is ""
+PASS test("hanging-punctuation: allow-end force-end;") is ""
+PASS test("hanging-punctuation: force-end allow-end;") is ""
+PASS test("hanging-punctuation: last last;") is ""
+PASS test("hanging-punctuation: 20px;") is ""
+PASS test("hanging-punctuation: first allow-end force-end last;") is ""
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssparsinghangingpunctuationhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/parsing-hanging-punctuation.html (0 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-hanging-punctuation.html         (rev 0)
+++ trunk/LayoutTests/fast/css/parsing-hanging-punctuation.html        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="resources/parsing-hanging-punctuation.js"></script>
+<script src="../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssresourcesparsinghangingpunctuationjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css/resources/parsing-hanging-punctuation.js (0 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/resources/parsing-hanging-punctuation.js         (rev 0)
+++ trunk/LayoutTests/fast/css/resources/parsing-hanging-punctuation.js        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+description("This tests checks that all of the input values for hanging-punctuation parse correctly.");
+
+function test(value)
+{
+ var div = document.createElement("div");
+ div.setAttribute("style", value);
+ document.body.appendChild(div);
+
+ var result = div.style.getPropertyValue("hanging-punctuation");
+ document.body.removeChild(div);
+ return result;
+}
+
+shouldBe('test("hanging-punctuation: none;")', '"none"');
+shouldBe('test("hanging-punctuation: first;")', '"first"');
+shouldBe('test("hanging-punctuation: last;")', '"last"');
+shouldBe('test("hanging-punctuation: allow-end;")', '"allow-end"');
+shouldBe('test("hanging-punctuation: force-end;")', '"force-end"');
+shouldBe('test("hanging-punctuation: first last;")', '"first last"');
+shouldBe('test("hanging-punctuation: last first;")', '"last first"');
+shouldBe('test("hanging-punctuation: first allow-end;")', '"first allow-end"');
+shouldBe('test("hanging-punctuation: first force-end;")', '"first force-end"');
+shouldBe('test("hanging-punctuation: first allow-end last;")', '"first allow-end last"');
+shouldBe('test("hanging-punctuation: last allow-end;")', '"last allow-end"');
+
+shouldBeEqualToString('test("hanging-punctuation: first first;")', '');
+shouldBeEqualToString('test("hanging-punctuation: nonsense;")', '');
+shouldBeEqualToString('test("hanging-punctuation: allow-end force-end;")', '');
+shouldBeEqualToString('test("hanging-punctuation: force-end allow-end;")', '');
+shouldBeEqualToString('test("hanging-punctuation: last last;")', '');
+shouldBeEqualToString('test("hanging-punctuation: 20px;")', '');
+shouldBeEqualToString('test("hanging-punctuation: first allow-end force-end last;")', '');
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/ChangeLog        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-02-03 Dave Hyatt <hyatt@apple.com>
+
+ Implement hanging-punctuation property parsing.
+ https://bugs.webkit.org/show_bug.cgi?id=18109.
+
+ Reviewed by Zalan Bujtas.
+
+ Added parsing test in fast/css.
+
+ * css/CSSComputedStyleDeclaration.cpp:
+ (WebCore::renderEmphasisPositionFlagsToCSSValue):
+ (WebCore::hangingPunctuationToCSSValue):
+ (WebCore::fillRepeatToCSSValue):
+ (WebCore::ComputedStyleExtractor::propertyValue):
+ * css/CSSParser.cpp:
+ (WebCore::CSSParser::parseValue):
+ (WebCore::CSSParser::parseTextIndent):
+ (WebCore::CSSParser::parseHangingPunctuation):
+ (WebCore::CSSParser::parseLineBoxContain):
+ * css/CSSParser.h:
+ * css/CSSPrimitiveValueMappings.h:
+ (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
+ (WebCore::CSSPrimitiveValue::operator HangingPunctuation):
+ (WebCore::CSSPrimitiveValue::operator LineBreak):
+ * css/CSSPropertyNames.in:
+ * css/CSSValueKeywords.in:
+ * css/StyleBuilderConverter.h:
+ (WebCore::StyleBuilderConverter::convertRegionBreakInside):
+ (WebCore::StyleBuilderConverter::convertHangingPunctuation):
+ * rendering/style/RenderStyle.cpp:
+ (WebCore::RenderStyle::changeRequiresLayout):
+ * rendering/style/RenderStyle.h:
+ * rendering/style/RenderStyleConstants.h:
+ (WebCore::operator| ):
+ (WebCore::operator|= ):
+ * rendering/style/StyleRareInheritedData.cpp:
+ (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+ (WebCore::StyleRareInheritedData::operator==):
+ * rendering/style/StyleRareInheritedData.h:
+
</ins><span class="cx"> 2016-02-03 Jessie Berlin <jberlin@webkit.org>
</span><span class="cx">
</span><span class="cx"> Build fix.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -1695,6 +1695,23 @@
</span><span class="cx"> return list.releaseNonNull();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+static Ref<CSSValue> hangingPunctuationToCSSValue(HangingPunctuation hangingPunctuation)
+{
+ auto& cssValuePool = CSSValuePool::singleton();
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ if (hangingPunctuation & FirstHangingPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueFirst));
+ if (hangingPunctuation & AllowEndHangingPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueAllowEnd));
+ if (hangingPunctuation & ForceEndHangingPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueForceEnd));
+ if (hangingPunctuation & LastHangingPunctuation)
+ list->append(cssValuePool.createIdentifierValue(CSSValueLast));
+ if (!list->length())
+ return cssValuePool.createIdentifierValue(CSSValueNone);
+ return list.releaseNonNull();
+}
+
</ins><span class="cx"> static Ref<CSSValue> fillRepeatToCSSValue(EFillRepeat xRepeat, EFillRepeat yRepeat)
</span><span class="cx"> {
</span><span class="cx"> // For backwards compatibility, if both values are equal, just return one of them. And
</span><span class="lines">@@ -3018,6 +3035,8 @@
</span><span class="cx"> return cssValuePool.createValue(style->breakBefore());
</span><span class="cx"> case CSSPropertyBreakInside:
</span><span class="cx"> return cssValuePool.createValue(style->breakInside());
</span><ins>+ case CSSPropertyHangingPunctuation:
+ return hangingPunctuationToCSSValue(style->hangingPunctuation());
</ins><span class="cx"> case CSSPropertyPosition:
</span><span class="cx"> return cssValuePool.createValue(style->position());
</span><span class="cx"> case CSSPropertyRight:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -3087,6 +3087,8 @@
</span><span class="cx"> validPrimitive = true;
</span><span class="cx"> break;
</span><span class="cx">
</span><ins>+ case CSSPropertyHangingPunctuation:
+ return parseHangingPunctuation(important);
</ins><span class="cx"> case CSSPropertyWebkitLineBoxContain:
</span><span class="cx"> if (id == CSSValueNone)
</span><span class="cx"> validPrimitive = true;
</span><span class="lines">@@ -10511,6 +10513,50 @@
</span><span class="cx"> return list.release();
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+bool CSSParser::parseHangingPunctuation(bool important)
+{
+ CSSParserValue* value = m_valueList->current();
+ if (value && value->id == CSSValueNone) {
+ addProperty(CSSPropertyHangingPunctuation, CSSValuePool::singleton().createIdentifierValue(CSSValueNone), important);
+ m_valueList->next();
+ return true;
+ }
+
+ RefPtr<CSSValueList> list = CSSValueList::createSpaceSeparated();
+ bool isValid = true;
+ std::bitset<numCSSValueKeywords> seenValues;
+ while (isValid && value) {
+ if (seenValues[value->id]
+ || (value->id == CSSValueAllowEnd && seenValues[CSSValueForceEnd])
+ || (value->id == CSSValueForceEnd && seenValues[CSSValueAllowEnd])) {
+ isValid = false;
+ break;
+ }
+ switch (value->id) {
+ case CSSValueAllowEnd:
+ case CSSValueFirst:
+ case CSSValueForceEnd:
+ case CSSValueLast:
+ list->append(CSSValuePool::singleton().createIdentifierValue(value->id));
+ seenValues.set(value->id);
+ break;
+ default:
+ isValid = false;
+ break;
+ }
+ if (isValid)
+ value = m_valueList->next();
+ }
+
+ // Values are either valid or in shorthand scope.
+ if (list->length() && isValid) {
+ addProperty(CSSPropertyHangingPunctuation, list.release(), important);
+ return true;
+ }
+
+ return false;
+}
+
</ins><span class="cx"> bool CSSParser::parseLineBoxContain(bool important)
</span><span class="cx"> {
</span><span class="cx"> LineBoxContain lineBoxContain = LineBoxContainNone;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSParser.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -337,6 +337,8 @@
</span><span class="cx">
</span><span class="cx"> RefPtr<CSSValue> parseTextIndent();
</span><span class="cx">
</span><ins>+ bool parseHangingPunctuation(bool important);
+
</ins><span class="cx"> bool parseLineBoxContain(bool important);
</span><span class="cx"> RefPtr<CSSCalcValue> parseCalculation(CSSParserValue&, CalculationPermittedValueRange);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -1626,6 +1626,29 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+template<> inline CSSPrimitiveValue::operator HangingPunctuation() const
+{
+ ASSERT(isValueID());
+
+ switch (m_value.valueID) {
+ case CSSValueNone:
+ return NoHangingPunctuation;
+ case CSSValueFirst:
+ return FirstHangingPunctuation;
+ case CSSValueLast:
+ return LastHangingPunctuation;
+ case CSSValueAllowEnd:
+ return AllowEndHangingPunctuation;
+ case CSSValueForceEnd:
+ return ForceEndHangingPunctuation;
+ default:
+ break;
+ }
+
+ ASSERT_NOT_REACHED();
+ return NoHangingPunctuation;
+}
+
</ins><span class="cx"> template<> inline CSSPrimitiveValue::operator LineBreak() const
</span><span class="cx"> {
</span><span class="cx"> ASSERT(isValueID());
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPropertyNamesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPropertyNames.in (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPropertyNames.in        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSPropertyNames.in        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -236,6 +236,7 @@
</span><span class="cx"> font-stretch [SkipBuilder]
</span><span class="cx"> glyph-orientation-horizontal [Inherited, SVG, Converter=GlyphOrientation]
</span><span class="cx"> glyph-orientation-vertical [Inherited, SVG, Converter=GlyphOrientationOrAuto]
</span><ins>+hanging-punctuation [Inherited, Converter=HangingPunctuation]
</ins><span class="cx"> height [Initial=initialSize, Converter=LengthSizing]
</span><span class="cx"> #if defined(ENABLE_CSS_IMAGE_ORIENTATION) && ENABLE_CSS_IMAGE_ORIENTATION
</span><span class="cx"> image-orientation [Inherited]
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSValueKeywordsin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSValueKeywords.in (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSValueKeywords.in        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/CSSValueKeywords.in        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -1191,3 +1191,9 @@
</span><span class="cx"> // touch-action
</span><span class="cx"> manipulation
</span><span class="cx"> #endif
</span><ins>+
+// hanging-punctuation
+allow-end
+first
+force-end
+last
</ins></span></pre></div>
<a id="trunkSourceWebCorecssStyleBuilderConverterh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/StyleBuilderConverter.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/css/StyleBuilderConverter.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -135,6 +135,8 @@
</span><span class="cx"> static BreakBetween convertRegionBreakBetween(StyleResolver&, CSSValue&);
</span><span class="cx"> static BreakInside convertRegionBreakInside(StyleResolver&, CSSValue&);
</span><span class="cx"> #endif
</span><ins>+
+ static HangingPunctuation convertHangingPunctuation(StyleResolver&, CSSValue&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class StyleBuilderCustom;
</span><span class="lines">@@ -1279,6 +1281,16 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+inline HangingPunctuation StyleBuilderConverter::convertHangingPunctuation(StyleResolver&, CSSValue& value)
+{
+ HangingPunctuation result = RenderStyle::initialHangingPunctuation();
+ if (is<CSSValueList>(value)) {
+ for (auto& currentValue : downcast<CSSValueList>(value))
+ result |= downcast<CSSPrimitiveValue>(currentValue.get());
+ }
+ return result;
+}
+
</ins><span class="cx"> } // namespace WebCore
</span><span class="cx">
</span><span class="cx"> #endif // StyleBuilderConverter_h
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStylecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -613,6 +613,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> || rareInheritedData->m_lineSnap != other.rareInheritedData->m_lineSnap
</span><span class="cx"> || rareInheritedData->m_lineAlign != other.rareInheritedData->m_lineAlign
</span><ins>+ || rareInheritedData->m_hangingPunctuation != other.rareInheritedData->m_hangingPunctuation
</ins><span class="cx"> #if ENABLE(ACCELERATED_OVERFLOW_SCROLLING)
</span><span class="cx"> || rareInheritedData->useTouchOverflowScrolling != other.rareInheritedData->useTouchOverflowScrolling
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -879,6 +879,8 @@
</span><span class="cx"> BreakInside breakInside() const { return static_cast<BreakInside>(rareNonInheritedData->m_breakInside); }
</span><span class="cx"> BreakBetween breakBefore() const { return static_cast<BreakBetween>(rareNonInheritedData->m_breakBefore); }
</span><span class="cx"> BreakBetween breakAfter() const { return static_cast<BreakBetween>(rareNonInheritedData->m_breakAfter); }
</span><ins>+
+ HangingPunctuation hangingPunctuation() const { return static_cast<HangingPunctuation>(rareInheritedData->m_hangingPunctuation); }
</ins><span class="cx">
</span><span class="cx"> float outlineOffset() const
</span><span class="cx"> {
</span><span class="lines">@@ -1622,6 +1624,8 @@
</span><span class="cx"> void setBreakBefore(BreakBetween breakBehavior) { SET_VAR(rareNonInheritedData, m_breakBefore, breakBehavior); }
</span><span class="cx"> void setBreakAfter(BreakBetween breakBehavior) { SET_VAR(rareNonInheritedData, m_breakAfter, breakBehavior); }
</span><span class="cx"> void setBreakInside(BreakInside breakBehavior) { SET_VAR(rareNonInheritedData, m_breakInside, breakBehavior); }
</span><ins>+
+ void setHangingPunctuation(HangingPunctuation punctuation) { SET_VAR(rareInheritedData, m_hangingPunctuation, punctuation); }
</ins><span class="cx">
</span><span class="cx"> // End CSS3 Setters
</span><span class="cx">
</span><span class="lines">@@ -1881,6 +1885,7 @@
</span><span class="cx"> static EFloat initialFloating() { return NoFloat; }
</span><span class="cx"> static BreakBetween initialBreakBetween() { return AutoBreakBetween; }
</span><span class="cx"> static BreakInside initialBreakInside() { return AutoBreakInside; }
</span><ins>+ static HangingPunctuation initialHangingPunctuation() { return NoHangingPunctuation; }
</ins><span class="cx"> static ETableLayout initialTableLayout() { return TAUTO; }
</span><span class="cx"> static EBorderCollapse initialBorderCollapse() { return BSEPARATE; }
</span><span class="cx"> static EBorderStyle initialBorderStyle() { return BNONE; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -483,7 +483,17 @@
</span><span class="cx"> enum BreakInside {
</span><span class="cx"> AutoBreakInside, AvoidBreakInside, AvoidColumnBreakInside, AvoidPageBreakInside, AvoidRegionBreakInside
</span><span class="cx"> };
</span><del>-
</del><ins>+
+enum HangingPunctuation {
+ NoHangingPunctuation = 0,
+ FirstHangingPunctuation = 1 << 0,
+ LastHangingPunctuation = 1 << 1,
+ AllowEndHangingPunctuation = 1 << 2,
+ ForceEndHangingPunctuation = 1 << 3
+};
+inline HangingPunctuation operator| (HangingPunctuation a, HangingPunctuation b) { return HangingPunctuation(int(a) | int(b)); }
+inline HangingPunctuation& operator|= (HangingPunctuation& a, HangingPunctuation b) { return a = a | b; }
+
</ins><span class="cx"> enum EEmptyCell {
</span><span class="cx"> SHOW, HIDE
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -125,6 +125,7 @@
</span><span class="cx"> #if ENABLE(CSS_TRAILING_WORD)
</span><span class="cx"> , trailingWord(static_cast<unsigned>(RenderStyle::initialTrailingWord()))
</span><span class="cx"> #endif
</span><ins>+ , m_hangingPunctuation(RenderStyle::initialHangingPunctuation())
</ins><span class="cx"> , hyphenationLimitBefore(-1)
</span><span class="cx"> , hyphenationLimitAfter(-1)
</span><span class="cx"> , hyphenationLimitLines(-1)
</span><span class="lines">@@ -207,6 +208,7 @@
</span><span class="cx"> #if ENABLE(CSS_TRAILING_WORD)
</span><span class="cx"> , trailingWord(o.trailingWord)
</span><span class="cx"> #endif
</span><ins>+ , m_hangingPunctuation(o.m_hangingPunctuation)
</ins><span class="cx"> , hyphenationString(o.hyphenationString)
</span><span class="cx"> , hyphenationLimitBefore(o.hyphenationLimitBefore)
</span><span class="cx"> , hyphenationLimitAfter(o.hyphenationLimitAfter)
</span><span class="lines">@@ -313,6 +315,7 @@
</span><span class="cx"> #if ENABLE(CSS_TRAILING_WORD)
</span><span class="cx"> && trailingWord == o.trailingWord
</span><span class="cx"> #endif
</span><ins>+ && m_hangingPunctuation == o.m_hangingPunctuation
</ins><span class="cx"> && m_customProperties == o.m_customProperties
</span><span class="cx"> && arePointingToEqualData(listStyleImage, o.listStyleImage);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (196074 => 196075)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2016-02-03 20:15:05 UTC (rev 196074)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2016-02-03 20:54:30 UTC (rev 196075)
</span><span class="lines">@@ -137,6 +137,8 @@
</span><span class="cx"> unsigned trailingWord : 1;
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+ unsigned m_hangingPunctuation : 4;
+
</ins><span class="cx"> AtomicString hyphenationString;
</span><span class="cx"> short hyphenationLimitBefore;
</span><span class="cx"> short hyphenationLimitAfter;
</span></span></pre>
</div>
</div>
</body>
</html>