<!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>[162135] 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/162135">162135</a></dd>
<dt>Author</dt> <dd>mmaxfield@apple.com</dd>
<dt>Date</dt> <dd>2014-01-16 10:47:04 -0800 (Thu, 16 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>text-emphasis-position CSS property doesn't recognize 'left' and 'right'
https://bugs.webkit.org/show_bug.cgi?id=126611

Reviewed by Simon Fraser.

Source/WebCore:

This patch allows the text-emphasis-position to accept the &quot;left&quot; and
&quot;right&quot; CSS values. In horizontal writing modes, these values no not
change behavior. In vertical writing modes, however, these values specify
which side to place the emphasis mark. Similarly, in vertical writing
modes, the &quot;above&quot; and &quot;below&quot; values should not change behavior.

However, in order to keep existing behavior, if neither &quot;left&quot; nor &quot;right&quot;
is specified, we should draw as if the appropriate value were
specified (&quot;over&quot; -&gt; &quot;right&quot; and &quot;under&quot; -&gt; &quot;left&quot;). Note that this
will have to be updated when we implement the
&quot;text-orientation: sideways-left&quot; CSS property.

Tests: fast/text/emphasis-horizontal-left-right.html
       fast/text/emphasis-vertical-over-right.html
       fast/text/emphasis-vertical-over-under.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::renderEmphasisPositionFlagsToCSSValue):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue):
(WebCore::isKeywordPropertyID):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::parseTextEmphasisPosition):
* css/CSSParser.h:
* css/CSSPrimitiveValueMappings.h:
* css/DeprecatedStyleBuilder.cpp:
(WebCore::valueToEmphasisPosition):
(WebCore::ApplyPropertyTextEmphasisPosition::applyValue):
(WebCore::ApplyPropertyTextEmphasisPosition::createHandler):
(WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
* rendering/InlineFlowBox.cpp:
(WebCore::InlineFlowBox::placeBoxesInBlockDirection):
(WebCore::InlineFlowBox::addTextBoxVisualOverflow):
(WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
(WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
(WebCore::InlineTextBox::paint):
* rendering/InlineTextBox.h:
* rendering/style/RenderStyle.h:
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
* rendering/style/StyleRareInheritedData.h:

LayoutTests:

With regards to text-emphasis-position, &quot;left&quot; and &quot;right&quot; are only valid in
vertical writing modes, and &quot;over&quot; and &quot;under&quot; are only valid in horizontal
writing modes.

In order to keep in line with existing pages, specifying &quot;under&quot; without
&quot;left&quot; or &quot;right&quot; should draw text as if &quot;under left&quot; was specified (and
vice-versa).

The default value for text-emphasis-position should be &quot;over right&quot;.

* fast/css/getComputedStyle/computed-style-expected.txt:
* fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
* fast/css/parsing-text-emphasis-expected.txt:
* fast/css/parsing-text-emphasis.html:
* fast/text/emphasis-horizontal-left-right-expected.html: Added.
* fast/text/emphasis-horizontal-left-right.html: Added.
* fast/text/emphasis-vertical-over-right-expected.html: Added.
* fast/text/emphasis-vertical-over-right.html: Added.
* fast/text/emphasis-vertical-over-under-expected.html: Added.
* fast/text/emphasis-vertical-over-under.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt">trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsingtextemphasisexpectedtxt">trunk/LayoutTests/fast/css/parsing-text-emphasis-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssparsingtextemphasishtml">trunk/LayoutTests/fast/css/parsing-text-emphasis.html</a></li>
<li><a href="#trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt">trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt</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="#trunkSourceWebCorecssDeprecatedStyleBuildercpp">trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineFlowBoxcpp">trunk/Source/WebCore/rendering/InlineFlowBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxcpp">trunk/Source/WebCore/rendering/InlineTextBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingInlineTextBoxh">trunk/Source/WebCore/rendering/InlineTextBox.h</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="#trunkLayoutTestsfasttextemphasishorizontalleftrightexpectedhtml">trunk/LayoutTests/fast/text/emphasis-horizontal-left-right-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextemphasishorizontalleftrighthtml">trunk/LayoutTests/fast/text/emphasis-horizontal-left-right.html</a></li>
<li><a href="#trunkLayoutTestsfasttextemphasisverticaloverrightexpectedhtml">trunk/LayoutTests/fast/text/emphasis-vertical-over-right-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextemphasisverticaloverrighthtml">trunk/LayoutTests/fast/text/emphasis-vertical-over-right.html</a></li>
<li><a href="#trunkLayoutTestsfasttextemphasisverticaloverunderexpectedhtml">trunk/LayoutTests/fast/text/emphasis-vertical-over-under-expected.html</a></li>
<li><a href="#trunkLayoutTestsfasttextemphasisverticaloverunderhtml">trunk/LayoutTests/fast/text/emphasis-vertical-over-under.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/ChangeLog        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2014-01-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        text-emphasis-position CSS property doesn't recognize 'left' and 'right'
+        https://bugs.webkit.org/show_bug.cgi?id=126611
+
+        Reviewed by Simon Fraser.
+
+        With regards to text-emphasis-position, &quot;left&quot; and &quot;right&quot; are only valid in
+        vertical writing modes, and &quot;over&quot; and &quot;under&quot; are only valid in horizontal
+        writing modes.
+
+        In order to keep in line with existing pages, specifying &quot;under&quot; without
+        &quot;left&quot; or &quot;right&quot; should draw text as if &quot;under left&quot; was specified (and
+        vice-versa).
+
+        The default value for text-emphasis-position should be &quot;over right&quot;.
+
+        * fast/css/getComputedStyle/computed-style-expected.txt:
+        * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt:
+        * fast/css/parsing-text-emphasis-expected.txt:
+        * fast/css/parsing-text-emphasis.html:
+        * fast/text/emphasis-horizontal-left-right-expected.html: Added.
+        * fast/text/emphasis-horizontal-left-right.html: Added.
+        * fast/text/emphasis-vertical-over-right-expected.html: Added.
+        * fast/text/emphasis-vertical-over-right.html: Added.
+        * fast/text/emphasis-vertical-over-under-expected.html: Added.
+        * fast/text/emphasis-vertical-over-under.html: Added.
+
</ins><span class="cx"> 2014-01-16  Michał Pakuła vel Rutka  &lt;m.pakula@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed EFL gardening
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstyleexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -193,7 +193,7 @@
</span><span class="cx"> -webkit-text-combine: none;
</span><span class="cx"> -webkit-text-decorations-in-effect: none;
</span><span class="cx"> -webkit-text-emphasis-color: rgb(0, 0, 0);
</span><del>--webkit-text-emphasis-position: over;
</del><ins>+-webkit-text-emphasis-position: over right;
</ins><span class="cx"> -webkit-text-emphasis-style: none;
</span><span class="cx"> -webkit-text-fill-color: rgb(0, 0, 0);
</span><span class="cx"> -webkit-text-orientation: vertical-right;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgetComputedStylecomputedstylewithoutrendererexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -192,7 +192,7 @@
</span><span class="cx"> -webkit-text-combine: none
</span><span class="cx"> -webkit-text-decorations-in-effect: none
</span><span class="cx"> -webkit-text-emphasis-color: rgb(0, 0, 0)
</span><del>--webkit-text-emphasis-position: over
</del><ins>+-webkit-text-emphasis-position: over right
</ins><span class="cx"> -webkit-text-emphasis-style: none
</span><span class="cx"> -webkit-text-fill-color: rgb(0, 0, 0)
</span><span class="cx"> -webkit-text-orientation: vertical-right
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingtextemphasisexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parsing-text-emphasis-expected.txt (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-text-emphasis-expected.txt        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/fast/css/parsing-text-emphasis-expected.txt        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -10,6 +10,16 @@
</span><span class="cx"> PASS: '-webkit-text-emphasis-position: inherit;' parsed as ['', 'inherit', '', '']
</span><span class="cx"> PASS: '-webkit-text-emphasis-position: over;' parsed as ['', 'over', '', '']
</span><span class="cx"> PASS: '-webkit-text-emphasis-position: under;' parsed as ['', 'under', '', '']
</span><ins>+PASS: '-webkit-text-emphasis-position: right;' parsed as ['', '', '', '']
+PASS: '-webkit-text-emphasis-position: left;' parsed as ['', '', '', '']
+PASS: '-webkit-text-emphasis-position: right over;' parsed as ['', 'over right', '', '']
+PASS: '-webkit-text-emphasis-position: right under;' parsed as ['', 'under right', '', '']
+PASS: '-webkit-text-emphasis-position: left over;' parsed as ['', 'over left', '', '']
+PASS: '-webkit-text-emphasis-position: left under;' parsed as ['', 'under left', '', '']
+PASS: '-webkit-text-emphasis-position: left right under;' parsed as ['', '', '', '']
+PASS: '-webkit-text-emphasis-position: left right left;' parsed as ['', '', '', '']
+PASS: '-webkit-text-emphasis-position: left under left;' parsed as ['', '', '', '']
+PASS: '-webkit-text-emphasis-position: over inherit;' parsed as ['', '', '', '']
</ins><span class="cx"> PASS: '-webkit-text-emphasis-position: bold;' parsed as ['', '', '', '']
</span><span class="cx"> PASS: '-webkit-text-emphasis-position: 1px;' parsed as ['', '', '', '']
</span><span class="cx"> PASS: '-webkit-text-emphasis-position: &quot;over&quot;;' parsed as ['', '', '', '']
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssparsingtextemphasishtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/parsing-text-emphasis.html (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/parsing-text-emphasis.html        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/fast/css/parsing-text-emphasis.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -38,6 +38,16 @@
</span><span class="cx">     test('-webkit-text-emphasis-position: inherit;', '', 'inherit', '');
</span><span class="cx">     test('-webkit-text-emphasis-position: over;', '', 'over', '');
</span><span class="cx">     test('-webkit-text-emphasis-position: under;', '', 'under', '');
</span><ins>+    test('-webkit-text-emphasis-position: right;', '', '', '');
+    test('-webkit-text-emphasis-position: left;', '', '', '');
+    test('-webkit-text-emphasis-position: right over;', '', 'over right', '');
+    test('-webkit-text-emphasis-position: right under;', '', 'under right', '');
+    test('-webkit-text-emphasis-position: left over;', '', 'over left', '');
+    test('-webkit-text-emphasis-position: left under;', '', 'under left', '');
+    test('-webkit-text-emphasis-position: left right under;', '', '', '');
+    test('-webkit-text-emphasis-position: left right left;', '', '', '');
+    test('-webkit-text-emphasis-position: left under left;', '', '', '');
+    test('-webkit-text-emphasis-position: over inherit;', '', '', '');
</ins><span class="cx">     test('-webkit-text-emphasis-position: bold;', '', '', '');
</span><span class="cx">     test('-webkit-text-emphasis-position: 1px;', '', '', '');
</span><span class="cx">     test('-webkit-text-emphasis-position: &quot;over&quot;;', '', '', '');
</span></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasishorizontalleftrightexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-horizontal-left-right-expected.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-horizontal-left-right-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-horizontal-left-right-expected.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a horizontal writing mode, the &quot;left&quot; and &quot;right&quot; values of the
+CSS text-emphasis-position property have no effect
+&lt;div style=&quot;-webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: right under;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasishorizontalleftrighthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-horizontal-left-right.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-horizontal-left-right.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-horizontal-left-right.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a horizontal writing mode, the &quot;left&quot; and &quot;right&quot; values of the
+CSS text-emphasis-position property have no effect
+&lt;div style=&quot;-webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: left under;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasisverticaloverrightexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-vertical-over-right-expected.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-vertical-over-right-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-vertical-over-right-expected.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a vertical writing mode, the &quot;under&quot; and &quot;left over&quot; values of the
+CSS text-emphasis-position property act the same
+&lt;div style=&quot;-webkit-writing-mode: vertical-lr; -webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: under;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasisverticaloverrighthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-vertical-over-right.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-vertical-over-right.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-vertical-over-right.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a vertical writing mode, the &quot;under&quot; and &quot;left over&quot; values of the
+CSS text-emphasis-position property act the same
+&lt;div style=&quot;-webkit-writing-mode: vertical-lr; -webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: left over;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasisverticaloverunderexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-vertical-over-under-expected.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-vertical-over-under-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-vertical-over-under-expected.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a vertical writing mode, the &quot;over&quot; and &quot;under&quot; values of the
+CSS text-emphasis-position property have no effect
+&lt;div style=&quot;-webkit-writing-mode: vertical-lr; -webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: left over;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasttextemphasisverticaloverunderhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/text/emphasis-vertical-over-under.html (0 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/text/emphasis-vertical-over-under.html                                (rev 0)
+++ trunk/LayoutTests/fast/text/emphasis-vertical-over-under.html        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;/head&gt;
+&lt;body&gt;
+This test is testing that when text is in a vertical writing mode, the &quot;over&quot; and &quot;under&quot; values of the
+CSS text-emphasis-position property have no effect
+&lt;div style=&quot;-webkit-writing-mode: vertical-lr; -webkit-text-emphasis-style: filled dot; -webkit-text-emphasis-position: left under;&quot;&gt;Demo String&lt;/div&gt;
+&lt;/body&gt;
+&lt;/html&gt;
+
</ins></span></pre></div>
<a id="trunkLayoutTestssvgcssgetComputedStylebasicexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -384,8 +384,8 @@
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(-webkit-text-emphasis-color) : rgb(0, 0, 0)
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-text-emphasis-color) : [object CSSPrimitiveValue]
</span><del>-rect: style.getPropertyValue(-webkit-text-emphasis-position) : over
-rect: style.getPropertyCSSValue(-webkit-text-emphasis-position) : [object CSSPrimitiveValue]
</del><ins>+rect: style.getPropertyValue(-webkit-text-emphasis-position) : over right
+rect: style.getPropertyCSSValue(-webkit-text-emphasis-position) : [object CSSValueList]
</ins><span class="cx"> rect: style.getPropertyValue(-webkit-text-emphasis-style) : none
</span><span class="cx"> rect: style.getPropertyCSSValue(-webkit-text-emphasis-style) : [object CSSPrimitiveValue]
</span><span class="cx"> rect: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
</span><span class="lines">@@ -880,8 +880,8 @@
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-text-decorations-in-effect) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(-webkit-text-emphasis-color) : rgb(0, 0, 0)
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-text-emphasis-color) : [object CSSPrimitiveValue]
</span><del>-g: style.getPropertyValue(-webkit-text-emphasis-position) : over
-g: style.getPropertyCSSValue(-webkit-text-emphasis-position) : [object CSSPrimitiveValue]
</del><ins>+g: style.getPropertyValue(-webkit-text-emphasis-position) : over right
+g: style.getPropertyCSSValue(-webkit-text-emphasis-position) : [object CSSValueList]
</ins><span class="cx"> g: style.getPropertyValue(-webkit-text-emphasis-style) : none
</span><span class="cx"> g: style.getPropertyCSSValue(-webkit-text-emphasis-style) : [object CSSPrimitiveValue]
</span><span class="cx"> g: style.getPropertyValue(-webkit-text-fill-color) : rgb(0, 0, 0)
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/ChangeLog        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -1,3 +1,56 @@
</span><ins>+2014-01-07  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
+
+        text-emphasis-position CSS property doesn't recognize 'left' and 'right'
+        https://bugs.webkit.org/show_bug.cgi?id=126611
+
+        Reviewed by Simon Fraser.
+
+        This patch allows the text-emphasis-position to accept the &quot;left&quot; and
+        &quot;right&quot; CSS values. In horizontal writing modes, these values no not
+        change behavior. In vertical writing modes, however, these values specify
+        which side to place the emphasis mark. Similarly, in vertical writing
+        modes, the &quot;above&quot; and &quot;below&quot; values should not change behavior.
+
+        However, in order to keep existing behavior, if neither &quot;left&quot; nor &quot;right&quot;
+        is specified, we should draw as if the appropriate value were
+        specified (&quot;over&quot; -&gt; &quot;right&quot; and &quot;under&quot; -&gt; &quot;left&quot;). Note that this
+        will have to be updated when we implement the
+        &quot;text-orientation: sideways-left&quot; CSS property.
+
+        Tests: fast/text/emphasis-horizontal-left-right.html
+               fast/text/emphasis-vertical-over-right.html
+               fast/text/emphasis-vertical-over-under.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::renderEmphasisPositionFlagsToCSSValue):
+        (WebCore::ComputedStyleExtractor::propertyValue):
+        * css/CSSParser.cpp:
+        (WebCore::isValidKeywordPropertyAndValue):
+        (WebCore::isKeywordPropertyID):
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::parseTextEmphasisPosition):
+        * css/CSSParser.h:
+        * css/CSSPrimitiveValueMappings.h:
+        * css/DeprecatedStyleBuilder.cpp:
+        (WebCore::valueToEmphasisPosition):
+        (WebCore::ApplyPropertyTextEmphasisPosition::applyValue):
+        (WebCore::ApplyPropertyTextEmphasisPosition::createHandler):
+        (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
+        * rendering/InlineFlowBox.cpp:
+        (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
+        (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
+        (WebCore::InlineFlowBox::computeOverAnnotationAdjustment):
+        (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment):
+        * rendering/InlineTextBox.cpp:
+        (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove):
+        (WebCore::InlineTextBox::paint):
+        * rendering/InlineTextBox.h:
+        * rendering/style/RenderStyle.h:
+        * rendering/style/RenderStyleConstants.h:
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData):
+        * rendering/style/StyleRareInheritedData.h:
+
</ins><span class="cx"> 2014-01-16  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: WebKit is not firing AXMenuOpenedNotification
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -1463,6 +1463,25 @@
</span><span class="cx"> }
</span><span class="cx"> #endif // CSS3_TEXT_DECORATION
</span><span class="cx"> 
</span><ins>+static PassRef&lt;CSSValue&gt; renderEmphasisPositionFlagsToCSSValue(TextEmphasisPosition textEmphasisPosition)
+{
+    ASSERT(!((textEmphasisPosition &amp; TextEmphasisPositionOver) &amp;&amp; (textEmphasisPosition &amp; TextEmphasisPositionUnder)));
+    ASSERT(!((textEmphasisPosition &amp; TextEmphasisPositionLeft) &amp;&amp; (textEmphasisPosition &amp; TextEmphasisPositionRight)));
+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    if (textEmphasisPosition &amp; TextEmphasisPositionOver)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueOver));
+    if (textEmphasisPosition &amp; TextEmphasisPositionUnder)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueUnder));
+    if (textEmphasisPosition &amp; TextEmphasisPositionLeft)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueLeft));
+    if (textEmphasisPosition &amp; TextEmphasisPositionRight)
+        list-&gt;append(cssValuePool().createIdentifierValue(CSSValueRight));
+
+    if (!list-&gt;length())
+        return cssValuePool().createIdentifierValue(CSSValueNone);
+    return list.releaseNonNull();
+}
+
</ins><span class="cx"> static PassRef&lt;CSSValue&gt; 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">@@ -2399,7 +2418,7 @@
</span><span class="cx">         case CSSPropertyWebkitTextEmphasisColor:
</span><span class="cx">             return currentColorOrValidColor(style.get(), style-&gt;textEmphasisColor());
</span><span class="cx">         case CSSPropertyWebkitTextEmphasisPosition:
</span><del>-            return cssValuePool().createValue(style-&gt;textEmphasisPosition());
</del><ins>+            return renderEmphasisPositionFlagsToCSSValue(style-&gt;textEmphasisPosition());
</ins><span class="cx">         case CSSPropertyWebkitTextEmphasisStyle:
</span><span class="cx">             switch (style-&gt;textEmphasisMark()) {
</span><span class="cx">             case TextEmphasisMarkNone:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -983,10 +983,6 @@
</span><span class="cx">         if (valueID == CSSValueNone || valueID == CSSValueHorizontal)
</span><span class="cx">             return true;
</span><span class="cx">         break;
</span><del>-    case CSSPropertyWebkitTextEmphasisPosition:
-        if (valueID == CSSValueOver || valueID == CSSValueUnder)
-            return true;
-        break;
</del><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     case CSSPropertyWebkitTextJustify:
</span><span class="cx">         // auto | none | inter-word | inter-ideograph | inter-cluster | distribute | kashida
</span><span class="lines">@@ -1156,7 +1152,6 @@
</span><span class="cx">     case CSSPropertyWebkitTextAlignLast:
</span><span class="cx"> #endif // CSS3_TEXT
</span><span class="cx">     case CSSPropertyWebkitTextCombine:
</span><del>-    case CSSPropertyWebkitTextEmphasisPosition:
</del><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     case CSSPropertyWebkitTextJustify:
</span><span class="cx"> #endif // CSS3_TEXT
</span><span class="lines">@@ -2921,6 +2916,9 @@
</span><span class="cx">     case CSSPropertyWebkitTextEmphasisStyle:
</span><span class="cx">         return parseTextEmphasisStyle(important);
</span><span class="cx"> 
</span><ins>+    case CSSPropertyWebkitTextEmphasisPosition:
+        return parseTextEmphasisPosition(important);
+
</ins><span class="cx">     case CSSPropertyWebkitTextOrientation:
</span><span class="cx">         // FIXME: For now just support sideways, sideways-right, upright and vertical-right.
</span><span class="cx">         if (id == CSSValueSideways || id == CSSValueSidewaysRight || id == CSSValueVerticalRight || id == CSSValueUpright)
</span><span class="lines">@@ -3068,7 +3066,6 @@
</span><span class="cx">     case CSSPropertyWebkitTextAlignLast:
</span><span class="cx"> #endif // CSS3_TEXT
</span><span class="cx">     case CSSPropertyWebkitTextCombine:
</span><del>-    case CSSPropertyWebkitTextEmphasisPosition:
</del><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     case CSSPropertyWebkitTextJustify:
</span><span class="cx"> #endif // CSS3_TEXT
</span><span class="lines">@@ -10188,6 +10185,52 @@
</span><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool CSSParser::parseTextEmphasisPosition(bool important)
+{
+    bool foundOverOrUnder = false;
+    CSSValueID overUnderValueID = CSSValueOver;
+    bool foundLeftOrRight = false;
+    CSSValueID leftRightValueID = CSSValueRight;
+    for (CSSParserValue* value = m_valueList-&gt;current(); value; value = m_valueList-&gt;next()) {
+        switch (value-&gt;id) {
+        case CSSValueOver:
+            if (foundOverOrUnder)
+                return false;
+            foundOverOrUnder = true;
+            overUnderValueID = CSSValueOver;
+            break;
+        case CSSValueUnder:
+            if (foundOverOrUnder)
+                return false;
+            foundOverOrUnder = true;
+            overUnderValueID = CSSValueUnder;
+            break;
+        case CSSValueLeft:
+            if (foundLeftOrRight)
+                return false;
+            foundLeftOrRight = true;
+            leftRightValueID = CSSValueLeft;
+            break;
+        case CSSValueRight:
+            if (foundLeftOrRight)
+                return false;
+            foundLeftOrRight = true;
+            leftRightValueID = CSSValueRight;
+            break;
+        default:
+            return false;
+        }
+    }
+    if (!foundOverOrUnder)
+        return false;
+    RefPtr&lt;CSSValueList&gt; list = CSSValueList::createSpaceSeparated();
+    list-&gt;append(cssValuePool().createIdentifierValue(overUnderValueID));
+    if (foundLeftOrRight)
+        list-&gt;append(cssValuePool().createIdentifierValue(leftRightValueID));
+    addProperty(CSSPropertyWebkitTextEmphasisPosition, list, important);
+    return true;
+}
+
</ins><span class="cx"> PassRefPtr&lt;CSSValue&gt; CSSParser::parseTextIndent()
</span><span class="cx"> {
</span><span class="cx">     // &lt;length&gt; | &lt;percentage&gt; | inherit  when CSS3_TEXT is disabled.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/css/CSSParser.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -288,6 +288,7 @@
</span><span class="cx">     bool parsePerspectiveOrigin(CSSPropertyID propId, CSSPropertyID&amp; propId1, CSSPropertyID&amp; propId2,  RefPtr&lt;CSSValue&gt;&amp;, RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx"> 
</span><span class="cx">     bool parseTextEmphasisStyle(bool important);
</span><ins>+    bool parseTextEmphasisPosition(bool important);
</ins><span class="cx"> 
</span><span class="cx">     void addTextDecorationProperty(CSSPropertyID, PassRefPtr&lt;CSSValue&gt;, bool important);
</span><span class="cx">     bool parseTextDecoration(CSSPropertyID propId, bool important);
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSPrimitiveValueMappingsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/css/CSSPrimitiveValueMappings.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -3301,37 +3301,6 @@
</span><span class="cx">     return RubyPositionBefore;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(TextEmphasisPosition position)
-    : CSSValue(PrimitiveClass)
-{
-    m_primitiveUnitType = CSS_VALUE_ID;
-    switch (position) {
-    case TextEmphasisPositionOver:
-        m_value.valueID = CSSValueOver;
-        break;
-    case TextEmphasisPositionUnder:
-        m_value.valueID = CSSValueUnder;
-        break;
-    }
-}
-
-template&lt;&gt; inline CSSPrimitiveValue::operator TextEmphasisPosition() const
-{
-    ASSERT(isValueID());
-
-    switch (m_value.valueID) {
-    case CSSValueOver:
-        return TextEmphasisPositionOver;
-    case CSSValueUnder:
-        return TextEmphasisPositionUnder;
-    default:
-        break;
-    }
-
-    ASSERT_NOT_REACHED();
-    return TextEmphasisPositionOver;
-}
-
</del><span class="cx"> template&lt;&gt; inline CSSPrimitiveValue::CSSPrimitiveValue(TextOverflow overflow)
</span><span class="cx">     : CSSValue(PrimitiveClass)
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorecssDeprecatedStyleBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/css/DeprecatedStyleBuilder.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -1789,6 +1789,48 @@
</span><span class="cx">     static PropertyHandler createHandler() { return PropertyHandler(&amp;applyInheritValue, &amp;applyInitialValue, &amp;applyValue); }
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+static TextEmphasisPosition valueToEmphasisPosition(CSSPrimitiveValue&amp; primitiveValue)
+{
+    ASSERT(primitiveValue.isValueID());
+
+    switch (primitiveValue.getValueID()) {
+    case CSSValueOver:
+        return TextEmphasisPositionOver;
+    case CSSValueUnder:
+        return TextEmphasisPositionUnder;
+    case CSSValueLeft:
+        return TextEmphasisPositionLeft;
+    case CSSValueRight:
+        return TextEmphasisPositionRight;
+    default:
+        break;
+    }
+
+    ASSERT_NOT_REACHED();
+    return RenderStyle::initialTextEmphasisPosition();
+}
+
+class ApplyPropertyTextEmphasisPosition {
+public:
+    static void applyValue(CSSPropertyID, StyleResolver* styleResolver, CSSValue* value)
+    {
+        if (value-&gt;isPrimitiveValue()) {
+            styleResolver-&gt;style()-&gt;setTextEmphasisPosition(valueToEmphasisPosition(*toCSSPrimitiveValue(value)));
+            return;
+        }
+
+        TextEmphasisPosition position = 0;
+        for (CSSValueListIterator i(value); i.hasMore(); i.advance())
+            position |= valueToEmphasisPosition(*toCSSPrimitiveValue(i.value()));
+        styleResolver-&gt;style()-&gt;setTextEmphasisPosition(position);
+    }
+    static PropertyHandler createHandler()
+    {
+        PropertyHandler handler = ApplyPropertyDefaultBase&lt;TextEmphasisPosition, &amp;RenderStyle::textEmphasisPosition, TextEmphasisPosition, &amp;RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &amp;RenderStyle::initialTextEmphasisPosition&gt;::createHandler();
+        return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &amp;applyValue);
+    }
+};
+
</ins><span class="cx"> template &lt;typename T,
</span><span class="cx">           T (Animation::*getterFunction)() const,
</span><span class="cx">           void (Animation::*setterFunction)(T),
</span><span class="lines">@@ -2530,7 +2572,7 @@
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitRubyPosition, ApplyPropertyDefault&lt;RubyPosition, &amp;RenderStyle::rubyPosition, RubyPosition, &amp;RenderStyle::setRubyPosition, RubyPosition, &amp;RenderStyle::initialRubyPosition&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextCombine, ApplyPropertyDefault&lt;TextCombine, &amp;RenderStyle::textCombine, TextCombine, &amp;RenderStyle::setTextCombine, TextCombine, &amp;RenderStyle::initialTextCombine&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextEmphasisColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textEmphasisColor, &amp;RenderStyle::setTextEmphasisColor, &amp;RenderStyle::setVisitedLinkTextEmphasisColor, &amp;RenderStyle::color&gt;::createHandler());
</span><del>-    setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyDefault&lt;TextEmphasisPosition, &amp;RenderStyle::textEmphasisPosition, TextEmphasisPosition, &amp;RenderStyle::setTextEmphasisPosition, TextEmphasisPosition, &amp;RenderStyle::initialTextEmphasisPosition&gt;::createHandler());
</del><ins>+    setPropertyHandler(CSSPropertyWebkitTextEmphasisPosition, ApplyPropertyTextEmphasisPosition::createHandler());
</ins><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextEmphasisStyle, ApplyPropertyTextEmphasisStyle::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextFillColor, ApplyPropertyColor&lt;NoInheritFromParent, &amp;RenderStyle::textFillColor, &amp;RenderStyle::setTextFillColor, &amp;RenderStyle::setVisitedLinkTextFillColor, &amp;RenderStyle::color&gt;::createHandler());
</span><span class="cx">     setPropertyHandler(CSSPropertyWebkitTextSecurity, ApplyPropertyDefault&lt;ETextSecurity, &amp;RenderStyle::textSecurity, ETextSecurity, &amp;RenderStyle::setTextSecurity, ETextSecurity, &amp;RenderStyle::initialTextSecurity&gt;::createHandler());
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineFlowBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineFlowBox.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/InlineFlowBox.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -694,9 +694,8 @@
</span><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             if (curr-&gt;isInlineTextBox()) {
</span><del>-                TextEmphasisPosition emphasisMarkPosition;
-                if (toInlineTextBox(curr)-&gt;getEmphasisMarkPosition(childLineStyle, emphasisMarkPosition)) {
-                    bool emphasisMarkIsOver = emphasisMarkPosition == TextEmphasisPositionOver;
</del><ins>+                bool emphasisMarkIsOver;
+                if (toInlineTextBox(curr)-&gt;emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsOver)) {
</ins><span class="cx">                     if (emphasisMarkIsOver != childLineStyle.isFlippedLinesWritingMode())
</span><span class="cx">                         hasAnnotationsBefore = true;
</span><span class="cx">                     else
</span><span class="lines">@@ -867,10 +866,10 @@
</span><span class="cx">     int leftGlyphOverflow = -strokeOverflow - leftGlyphEdge;
</span><span class="cx">     int rightGlyphOverflow = strokeOverflow + rightGlyphEdge;
</span><span class="cx"> 
</span><del>-    TextEmphasisPosition emphasisMarkPosition;
-    if (lineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; textBox-&gt;getEmphasisMarkPosition(lineStyle, emphasisMarkPosition)) {
</del><ins>+    bool emphasisMarkIsAbove;
+    if (lineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; textBox-&gt;emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkIsAbove)) {
</ins><span class="cx">         int emphasisMarkHeight = lineStyle.font().emphasisMarkHeight(lineStyle.textEmphasisMarkString());
</span><del>-        if ((emphasisMarkPosition == TextEmphasisPositionOver) == (!lineStyle.isFlippedLinesWritingMode()))
</del><ins>+        if (emphasisMarkIsAbove == !lineStyle.isFlippedLinesWritingMode())
</ins><span class="cx">             topGlyphOverflow = std::min(topGlyphOverflow, -emphasisMarkHeight);
</span><span class="cx">         else
</span><span class="cx">             bottomGlyphOverflow = std::max(bottomGlyphOverflow, emphasisMarkHeight);
</span><span class="lines">@@ -1534,8 +1533,8 @@
</span><span class="cx"> 
</span><span class="cx">         if (curr-&gt;isInlineTextBox()) {
</span><span class="cx">             const RenderStyle&amp; childLineStyle = curr-&gt;lineStyle();
</span><del>-            TextEmphasisPosition emphasisMarkPosition;
-            if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; toInlineTextBox(curr)-&gt;getEmphasisMarkPosition(childLineStyle, emphasisMarkPosition) &amp;&amp; emphasisMarkPosition == TextEmphasisPositionOver) {
</del><ins>+            bool emphasisMarkIsAbove;
+            if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; toInlineTextBox(curr)-&gt;emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove) &amp;&amp; emphasisMarkIsAbove) {
</ins><span class="cx">                 if (!childLineStyle.isFlippedLinesWritingMode()) {
</span><span class="cx">                     int topOfEmphasisMark = curr-&gt;logicalTop() - childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</span><span class="cx">                     result = std::max(result, allowedPosition - topOfEmphasisMark);
</span><span class="lines">@@ -1582,7 +1581,9 @@
</span><span class="cx"> 
</span><span class="cx">         if (curr-&gt;isInlineTextBox()) {
</span><span class="cx">             const RenderStyle&amp; childLineStyle = curr-&gt;lineStyle();
</span><del>-            if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; childLineStyle.textEmphasisPosition() == TextEmphasisPositionUnder) {
</del><ins>+            bool emphasisMarkIsAbove;
+            toInlineTextBox(curr)-&gt;emphasisMarkExistsAndIsAbove(childLineStyle, emphasisMarkIsAbove);
+            if (childLineStyle.textEmphasisMark() != TextEmphasisMarkNone &amp;&amp; !emphasisMarkIsAbove) {
</ins><span class="cx">                 if (!childLineStyle.isFlippedLinesWritingMode()) {
</span><span class="cx">                     LayoutUnit bottomOfEmphasisMark = curr-&gt;logicalBottom() + childLineStyle.font().emphasisMarkHeight(childLineStyle.textEmphasisMarkString());
</span><span class="cx">                     result = std::max(result, bottomOfEmphasisMark - allowedPosition);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/InlineTextBox.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -462,14 +462,30 @@
</span><span class="cx">     return extraOffset;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool InlineTextBox::getEmphasisMarkPosition(const RenderStyle&amp; style, TextEmphasisPosition&amp; emphasisPosition) const
</del><ins>+static inline bool emphasisPositionHasNeitherLeftNorRight(TextEmphasisPosition emphasisPosition)
</ins><span class="cx"> {
</span><ins>+    return !(emphasisPosition &amp; TextEmphasisPositionLeft) &amp;&amp; !(emphasisPosition &amp; TextEmphasisPositionRight);
+}
+
+bool InlineTextBox::emphasisMarkExistsAndIsAbove(const RenderStyle&amp; style, bool&amp; above) const
+{
</ins><span class="cx">     // This function returns true if there are text emphasis marks and they are suppressed by ruby text.
</span><span class="cx">     if (style.textEmphasisMark() == TextEmphasisMarkNone)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    emphasisPosition = style.textEmphasisPosition();
-    if (emphasisPosition == TextEmphasisPositionUnder)
</del><ins>+    TextEmphasisPosition emphasisPosition = style.textEmphasisPosition();
+    ASSERT(!((emphasisPosition &amp; TextEmphasisPositionOver) &amp;&amp; (emphasisPosition &amp; TextEmphasisPositionUnder)));
+    ASSERT(!((emphasisPosition &amp; TextEmphasisPositionLeft) &amp;&amp; (emphasisPosition &amp; TextEmphasisPositionRight)));
+    
+    if (emphasisPositionHasNeitherLeftNorRight(emphasisPosition))
+        above = emphasisPosition &amp; TextEmphasisPositionOver;
+    else if (style.isHorizontalWritingMode())
+        above = emphasisPosition &amp; TextEmphasisPositionOver;
+    else
+        above = emphasisPosition &amp; TextEmphasisPositionRight;
+    
+    if ((style.isHorizontalWritingMode() &amp;&amp; (emphasisPosition &amp; TextEmphasisPositionUnder))
+        || (!style.isHorizontalWritingMode() &amp;&amp; (emphasisPosition &amp; TextEmphasisPositionLeft)))
</ins><span class="cx">         return true; // Ruby text is always over, so it cannot suppress emphasis marks under.
</span><span class="cx"> 
</span><span class="cx">     RenderBlock* containingBlock = renderer().containingBlock();
</span><span class="lines">@@ -629,11 +645,11 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     int emphasisMarkOffset = 0;
</span><del>-    TextEmphasisPosition emphasisMarkPosition;
-    bool hasTextEmphasis = getEmphasisMarkPosition(lineStyle, emphasisMarkPosition);
</del><ins>+    bool emphasisMarkAbove;
+    bool hasTextEmphasis = emphasisMarkExistsAndIsAbove(lineStyle, emphasisMarkAbove);
</ins><span class="cx">     const AtomicString&amp; emphasisMark = hasTextEmphasis ? lineStyle.textEmphasisMarkString() : nullAtom;
</span><span class="cx">     if (!emphasisMark.isEmpty())
</span><del>-        emphasisMarkOffset = emphasisMarkPosition == TextEmphasisPositionOver ? -font.fontMetrics().ascent() - font.emphasisMarkDescent(emphasisMark) : font.fontMetrics().descent() + font.emphasisMarkAscent(emphasisMark);
</del><ins>+        emphasisMarkOffset = emphasisMarkAbove ? -font.fontMetrics().ascent() - font.emphasisMarkDescent(emphasisMark) : font.fontMetrics().descent() + font.emphasisMarkAscent(emphasisMark);
</ins><span class="cx"> 
</span><span class="cx">     const ShadowData* textShadow = paintInfo.forceBlackText() ? 0 : lineStyle.textShadow();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingInlineTextBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/InlineTextBox.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/InlineTextBox.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/InlineTextBox.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     virtual int baselinePosition(FontBaseline) const OVERRIDE FINAL;
</span><span class="cx">     virtual LayoutUnit lineHeight() const OVERRIDE FINAL;
</span><span class="cx"> 
</span><del>-    bool getEmphasisMarkPosition(const RenderStyle&amp;, TextEmphasisPosition&amp;) const;
</del><ins>+    bool emphasisMarkExistsAndIsAbove(const RenderStyle&amp;, bool&amp; isAbove) const;
</ins><span class="cx"> 
</span><span class="cx">     LayoutRect logicalOverflowRect() const;
</span><span class="cx">     void setLogicalOverflowRect(const LayoutRect&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -1769,7 +1769,7 @@
</span><span class="cx">     static TextEmphasisFill initialTextEmphasisFill() { return TextEmphasisFillFilled; }
</span><span class="cx">     static TextEmphasisMark initialTextEmphasisMark() { return TextEmphasisMarkNone; }
</span><span class="cx">     static const AtomicString&amp; initialTextEmphasisCustomMark() { return nullAtom; }
</span><del>-    static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver; }
</del><ins>+    static TextEmphasisPosition initialTextEmphasisPosition() { return TextEmphasisPositionOver | TextEmphasisPositionRight; }
</ins><span class="cx">     static RubyPosition initialRubyPosition() { return RubyPositionBefore; }
</span><span class="cx">     static LineBoxContain initialLineBoxContain() { return LineBoxContainBlock | LineBoxContainInline | LineBoxContainReplaced; }
</span><span class="cx">     static ImageOrientationEnum initialImageOrientation() { return OriginTopLeft; }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleRenderStyleConstantsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/RenderStyleConstants.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/style/RenderStyleConstants.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -505,7 +505,13 @@
</span><span class="cx"> 
</span><span class="cx"> enum TextEmphasisMark { TextEmphasisMarkNone, TextEmphasisMarkAuto, TextEmphasisMarkDot, TextEmphasisMarkCircle, TextEmphasisMarkDoubleCircle, TextEmphasisMarkTriangle, TextEmphasisMarkSesame, TextEmphasisMarkCustom };
</span><span class="cx"> 
</span><del>-enum TextEmphasisPosition { TextEmphasisPositionOver, TextEmphasisPositionUnder };
</del><ins>+enum TextEmphasisPositions {
+    TextEmphasisPositionOver = 1 &lt;&lt; 0,
+    TextEmphasisPositionUnder = 1 &lt;&lt; 1,
+    TextEmphasisPositionLeft = 1 &lt;&lt; 2,
+    TextEmphasisPositionRight = 1 &lt;&lt; 3
+};
+typedef unsigned TextEmphasisPosition;
</ins><span class="cx"> 
</span><span class="cx"> enum TextOrientation { TextOrientationVerticalRight, TextOrientationUpright, TextOrientationSideways, TextOrientationSidewaysRight };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.cpp        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -89,7 +89,7 @@
</span><span class="cx">     , hyphens(HyphensManual)
</span><span class="cx">     , textEmphasisFill(TextEmphasisFillFilled)
</span><span class="cx">     , textEmphasisMark(TextEmphasisMarkNone)
</span><del>-    , textEmphasisPosition(TextEmphasisPositionOver)
</del><ins>+    , textEmphasisPosition(TextEmphasisPositionOver | TextEmphasisPositionRight)
</ins><span class="cx">     , m_textOrientation(TextOrientationVerticalRight)
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     , m_textIndentLine(RenderStyle::initialTextIndentLine())
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleStyleRareInheritedDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h (162134 => 162135)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2014-01-16 18:21:57 UTC (rev 162134)
+++ trunk/Source/WebCore/rendering/style/StyleRareInheritedData.h        2014-01-16 18:47:04 UTC (rev 162135)
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx">     unsigned hyphens : 2; // Hyphens
</span><span class="cx">     unsigned textEmphasisFill : 1; // TextEmphasisFill
</span><span class="cx">     unsigned textEmphasisMark : 3; // TextEmphasisMark
</span><del>-    unsigned textEmphasisPosition : 1; // TextEmphasisPosition
</del><ins>+    unsigned textEmphasisPosition : 4; // TextEmphasisPosition
</ins><span class="cx">     unsigned m_textOrientation : 2; // TextOrientation
</span><span class="cx"> #if ENABLE(CSS3_TEXT)
</span><span class="cx">     unsigned m_textIndentLine : 1; // TextIndentLine
</span></span></pre>
</div>
</div>

</body>
</html>