<!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>[209976] 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/209976">209976</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2016-12-18 17:14:10 -0800 (Sun, 18 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Changing text direction fires input events with null inputTypes and no data
https://bugs.webkit.org/show_bug.cgi?id=166007
&lt;rdar://problem/29557205&gt;

Reviewed by Sam Weinig.

Source/WebCore:

Adds support for the &quot;formatSetInlineTextDirection&quot; input type, triggered when using the context menu on Mac in
an editable area (for both plain and rich text cases) to change paragraph direction. To do this, we add cases
for EditActionSetWritingDirection in inputTypeNameForEditingAction and inputEventDataForEditingStyleAndAction.

When changing text direction for a plaintext editable element, we have logic in Editor::setBaseWritingDirection
that sets the focused element's dir attribute to the requested value (ltr or rtl). We add similar hooks here to
dispatch input events and handle preventing default.

Test: fast/events/before-input-events-prevent-text-direction.html

* editing/EditCommand.cpp:
(WebCore::inputTypeNameForEditingAction):

Handle the EditActionSetWritingDirection case.

* editing/Editor.cpp:
(WebCore::inputEventDataForEditingStyleAndAction):
(WebCore::Editor::applyParagraphStyle):

Include input event data when dispatching an input event here.

(WebCore::Editor::setBaseWritingDirection):
* testing/Internals.cpp:
(WebCore::Internals::setBaseWritingDirection):
* testing/Internals.h:
* testing/Internals.idl:

Introduce an internal testing support hook for setting base writing direction (the same codepath taken when
using the context menu to change paragraph direction). Currently, using testRunner.execCommand creates and
applies style with an additional `unicode-bidi` attribute, and appears to also be intentionally disabled for
plaintext editable elements.

LayoutTests:

Verifies that changing text direction causes beforeinput and input events with appropriate inputType and data to
be dispatched, and that preventing this beforeinput event causes no change in text direction.

* fast/events/before-input-events-prevent-text-direction-expected.txt: Added.
* fast/events/before-input-events-prevent-text-direction.html: Added.</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="#trunkSourceWebCoreeditingEditCommandcpp">trunk/Source/WebCore/editing/EditCommand.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingEditorcpp">trunk/Source/WebCore/editing/Editor.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasteventsbeforeinputeventspreventtextdirectionexpectedtxt">trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasteventsbeforeinputeventspreventtextdirectionhtml">trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/LayoutTests/ChangeLog        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-12-18  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Changing text direction fires input events with null inputTypes and no data
+        https://bugs.webkit.org/show_bug.cgi?id=166007
+        &lt;rdar://problem/29557205&gt;
+
+        Reviewed by Sam Weinig.
+
+        Verifies that changing text direction causes beforeinput and input events with appropriate inputType and data to
+        be dispatched, and that preventing this beforeinput event causes no change in text direction.
+
+        * fast/events/before-input-events-prevent-text-direction-expected.txt: Added.
+        * fast/events/before-input-events-prevent-text-direction.html: Added.
+
</ins><span class="cx"> 2016-12-18  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rebaseline these tests after r209967, since they are now affected by status bar height.
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeinputeventspreventtextdirectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction-expected.txt (0 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction-expected.txt        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Hello world
+
+*** TESTING RICH TEXT ***
+Initial text direction: &quot;rtl&quot;
+Fired onbeforeinput event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Text direction after setting to LTR while preventing default: &quot;rtl&quot;
+Fired onbeforeinput event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Fired input event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Text direction after setting to LTR without preventing default: &quot;ltr&quot;
+*** TESTING PLAIN TEXT ***
+Initial text direction: &quot;rtl&quot;
+Fired onbeforeinput event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Text direction after setting to LTR while preventing default: &quot;rtl&quot;
+Fired onbeforeinput event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Fired input event of inputType 'formatSetInlineTextDirection' with data: 'ltr'
+Text direction after setting to LTR without preventing default: &quot;ltr&quot;
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfasteventsbeforeinputeventspreventtextdirectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction.html (0 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction.html                                (rev 0)
+++ trunk/LayoutTests/fast/events/before-input-events-prevent-text-direction.html        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -0,0 +1,69 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        #editor {
+            direction: rtl;
+            border: 1px blue dashed;
+        }
+    &lt;/style&gt;
+&lt;/head&gt;
+
+&lt;body&gt;
+    &lt;div id=&quot;editor&quot; contenteditable oninput=handleInputEvent(event) onbeforeinput=handleBeforeInputEvent(event)&gt;
+        &lt;div id=&quot;content&quot;&gt;Hello world&lt;/div&gt;
+    &lt;/div&gt;
+    &lt;input type=&quot;text&quot; id=&quot;textfield&quot; value=&quot;hi&quot; dir=&quot;rtl&quot; oninput=handleInputEvent(event) onbeforeinput=handleBeforeInputEvent(event)&gt;&lt;/input&gt;
+    &lt;div id=&quot;output&quot;&gt;&lt;/div&gt;
+    &lt;script&gt;
+        let write = s =&gt; output.innerHTML += `${s}&lt;br&gt;`;
+        (function()
+        {
+            window.shouldPreventDefault = true;
+            if (!window.eventSender || !window.internals || !window.testRunner) {
+                write(&quot;To test manually, try to change the text direction to ltr. This should be prevented.&quot;);
+                return;
+            }
+
+            internals.settings.setInputEventsEnabled(true);
+            testRunner.dumpAsText();
+            editor.focus();
+            write(&quot;*** TESTING RICH TEXT ***&quot;);
+            write(`Initial text direction: &quot;${getComputedStyle(content).direction}&quot;`);
+
+            internals.setBaseWritingDirection(&quot;Ltr&quot;);
+            write(`Text direction after setting to LTR while preventing default: &quot;${getComputedStyle(content).direction}&quot;`);
+
+            window.shouldPreventDefault = false;
+
+            internals.setBaseWritingDirection(&quot;Ltr&quot;);
+            write(`Text direction after setting to LTR without preventing default: &quot;${getComputedStyle(content).direction}&quot;`);
+
+            window.shouldPreventDefault = true;
+            textfield.focus();
+            write(&quot;*** TESTING PLAIN TEXT ***&quot;);
+            write(`Initial text direction: &quot;${textfield.getAttribute(&quot;dir&quot;)}&quot;`);
+
+            internals.setBaseWritingDirection(&quot;Ltr&quot;);
+            write(`Text direction after setting to LTR while preventing default: &quot;${textfield.getAttribute(&quot;dir&quot;)}&quot;`);
+
+            window.shouldPreventDefault = false;
+
+            internals.setBaseWritingDirection(&quot;Ltr&quot;);
+            write(`Text direction after setting to LTR without preventing default: &quot;${textfield.getAttribute(&quot;dir&quot;)}&quot;`);
+        })();
+
+        function handleInputEvent(event)
+        {
+            write(`Fired input event of inputType '${event.inputType}' with data: '${event.data}'`);
+        }
+
+        function handleBeforeInputEvent(event)
+        {
+            write(`Fired onbeforeinput event of inputType '${event.inputType}' with data: '${event.data}'`);
+            if (window.shouldPreventDefault)
+                event.preventDefault();
+        }
+    &lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/ChangeLog        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-12-18  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        Changing text direction fires input events with null inputTypes and no data
+        https://bugs.webkit.org/show_bug.cgi?id=166007
+        &lt;rdar://problem/29557205&gt;
+
+        Reviewed by Sam Weinig.
+
+        Adds support for the &quot;formatSetInlineTextDirection&quot; input type, triggered when using the context menu on Mac in
+        an editable area (for both plain and rich text cases) to change paragraph direction. To do this, we add cases
+        for EditActionSetWritingDirection in inputTypeNameForEditingAction and inputEventDataForEditingStyleAndAction.
+
+        When changing text direction for a plaintext editable element, we have logic in Editor::setBaseWritingDirection
+        that sets the focused element's dir attribute to the requested value (ltr or rtl). We add similar hooks here to
+        dispatch input events and handle preventing default.
+
+        Test: fast/events/before-input-events-prevent-text-direction.html
+
+        * editing/EditCommand.cpp:
+        (WebCore::inputTypeNameForEditingAction):
+
+        Handle the EditActionSetWritingDirection case.
+
+        * editing/Editor.cpp:
+        (WebCore::inputEventDataForEditingStyleAndAction):
+        (WebCore::Editor::applyParagraphStyle):
+
+        Include input event data when dispatching an input event here.
+
+        (WebCore::Editor::setBaseWritingDirection):
+        * testing/Internals.cpp:
+        (WebCore::Internals::setBaseWritingDirection):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
+        Introduce an internal testing support hook for setting base writing direction (the same codepath taken when
+        using the context menu to change paragraph direction). Currently, using testRunner.execCommand creates and
+        applies style with an additional `unicode-bidi` attribute, and appears to also be intentionally disabled for
+        plaintext editable elements.
+
</ins><span class="cx"> 2016-12-17  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Build fix: linking WebCore was failing: you can't export inline functions.
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditCommandcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/EditCommand.cpp (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/EditCommand.cpp        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/editing/EditCommand.cpp        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -110,6 +110,8 @@
</span><span class="cx">         return ASCIILiteral(&quot;formatIndent&quot;);
</span><span class="cx">     case EditActionOutdent:
</span><span class="cx">         return ASCIILiteral(&quot;formatOutdent&quot;);
</span><ins>+    case EditActionSetWritingDirection:
+        return ASCIILiteral(&quot;formatSetInlineTextDirection&quot;);
</ins><span class="cx">     default:
</span><span class="cx">         return emptyString();
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingEditorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/Editor.cpp (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/Editor.cpp        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/editing/Editor.cpp        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -130,6 +130,8 @@
</span><span class="cx">     switch (action) {
</span><span class="cx">     case EditActionSetColor:
</span><span class="cx">         return style-&gt;getPropertyValue(CSSPropertyColor);
</span><ins>+    case EditActionSetWritingDirection:
+        return style-&gt;getPropertyValue(CSSPropertyDirection);
</ins><span class="cx">     default:
</span><span class="cx">         return { };
</span><span class="cx">     }
</span><span class="lines">@@ -829,14 +831,15 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     String inputTypeName = inputTypeNameForEditingAction(editingAction);
</span><ins>+    String inputEventData = inputEventDataForEditingStyleAndAction(style, editingAction);
</ins><span class="cx">     RefPtr&lt;Element&gt; element = m_frame.selection().selection().rootEditableElement();
</span><del>-    if (element &amp;&amp; !dispatchBeforeInputEvent(*element, inputTypeName))
</del><ins>+    if (element &amp;&amp; !dispatchBeforeInputEvent(*element, inputTypeName, inputEventData))
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     applyCommand(ApplyStyleCommand::create(document(), EditingStyle::create(style).ptr(), editingAction, ApplyStyleCommand::ForceBlockProperties));
</span><span class="cx">     client()-&gt;didApplyStyle();
</span><span class="cx">     if (element)
</span><del>-        dispatchInputEvent(*element, inputTypeName);
</del><ins>+        dispatchInputEvent(*element, inputTypeName, inputEventData);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Editor::applyStyleToSelection(StyleProperties* style, EditAction editingAction)
</span><span class="lines">@@ -1586,8 +1589,15 @@
</span><span class="cx">     if (is&lt;HTMLTextFormControlElement&gt;(focusedElement)) {
</span><span class="cx">         if (direction == NaturalWritingDirection)
</span><span class="cx">             return;
</span><del>-        downcast&lt;HTMLTextFormControlElement&gt;(*focusedElement).setAttributeWithoutSynchronization(dirAttr, direction == LeftToRightWritingDirection ? &quot;ltr&quot; : &quot;rtl&quot;);
-        focusedElement-&gt;dispatchInputEvent();
</del><ins>+
+        auto&amp; focusedFormElement = downcast&lt;HTMLTextFormControlElement&gt;(*focusedElement);
+        auto directionValue = direction == LeftToRightWritingDirection ? &quot;ltr&quot; : &quot;rtl&quot;;
+        auto writingDirectionInputTypeName = inputTypeNameForEditingAction(EditActionSetWritingDirection);
+        if (!dispatchBeforeInputEvent(focusedFormElement, writingDirectionInputTypeName, directionValue))
+            return;
+
+        focusedFormElement.setAttributeWithoutSynchronization(dirAttr, directionValue);
+        dispatchInputEvent(focusedFormElement, writingDirectionInputTypeName, directionValue);
</ins><span class="cx">         document().updateStyleIfNeeded();
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -134,6 +134,7 @@
</span><span class="cx"> #include &quot;ViewportArguments.h&quot;
</span><span class="cx"> #include &quot;WebCoreJSClientData.h&quot;
</span><span class="cx"> #include &quot;WorkerThread.h&quot;
</span><ins>+#include &quot;WritingDirection.h&quot;
</ins><span class="cx"> #include &quot;XMLHttpRequest.h&quot;
</span><span class="cx"> #include &lt;bytecode/CodeBlock.h&gt;
</span><span class="cx"> #include &lt;inspector/InspectorAgentBase.h&gt;
</span><span class="lines">@@ -3517,6 +3518,25 @@
</span><span class="cx">     WTFReportBacktrace();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void Internals::setBaseWritingDirection(BaseWritingDirection direction)
+{
+    if (auto* document = contextDocument()) {
+        if (auto* frame = document-&gt;frame()) {
+            switch (direction) {
+            case BaseWritingDirection::Ltr:
+                frame-&gt;editor().setBaseWritingDirection(LeftToRightWritingDirection);
+                break;
+            case BaseWritingDirection::Rtl:
+                frame-&gt;editor().setBaseWritingDirection(RightToLeftWritingDirection);
+                break;
+            case BaseWritingDirection::Natural:
+                frame-&gt;editor().setBaseWritingDirection(NaturalWritingDirection);
+                break;
+            }
+        }
+    }
+}
+
</ins><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx"> bool Internals::pageHasPendingPointerLock() const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/testing/Internals.h        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -519,6 +519,9 @@
</span><span class="cx">     
</span><span class="cx">     void reportBacktrace();
</span><span class="cx"> 
</span><ins>+    enum class BaseWritingDirection { Natural, Ltr, Rtl };
+    void setBaseWritingDirection(BaseWritingDirection);
+
</ins><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">     bool pageHasPendingPointerLock() const;
</span><span class="cx">     bool pageHasPointerLock() const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (209975 => 209976)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-12-18 21:09:34 UTC (rev 209975)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-12-19 01:14:10 UTC (rev 209976)
</span><span class="lines">@@ -70,6 +70,12 @@
</span><span class="cx">     &quot;RTL&quot;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+enum BaseWritingDirection {
+    &quot;Natural&quot;,
+    &quot;Ltr&quot;,
+    &quot;Rtl&quot;
+};
+
</ins><span class="cx"> enum EventThrottlingBehavior {
</span><span class="cx">     &quot;responsive&quot;,
</span><span class="cx">     &quot;unresponsive&quot;
</span><span class="lines">@@ -485,6 +491,7 @@
</span><span class="cx">     GCObservation observeGC(any observed);
</span><span class="cx"> 
</span><span class="cx">     void setUserInterfaceLayoutDirection(UserInterfaceLayoutDirection userInterfaceLayoutDirection);
</span><ins>+    void setBaseWritingDirection(BaseWritingDirection direction);
</ins><span class="cx"> 
</span><span class="cx">     boolean userPrefersReducedMotion();
</span><span class="cx">     
</span></span></pre>
</div>
</div>

</body>
</html>