<!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>[247936] 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/247936">247936</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2019-07-29 18:50:58 -0700 (Mon, 29 Jul 2019)</dd>
</dl>

<h3>Log Message</h3>
<pre>YouTube search field shows RTL text outside its border on iPadOS
https://bugs.webkit.org/show_bug.cgi?id=200253
<rdar://problem/53680603>

Reviewed by Beth Dakin.

Source/WebKit:

Limits code added in <a href="http://trac.webkit.org/projects/webkit/changeset/238939">r238939</a> to respect the current keyboard's writing mode to only editable web views. This
behavior was only intended for Mail, and isn't generally compatible with web content.

While the call to -setInitialDirection is correctly gated on an web view editability check, it appears that
other changes in iOS 13 now cause -setBaseWritingDirection:forRange: to be invoked directly from keyboards code.
This means that -setBaseWritingDirection:forRange: should additionally be guarded with the same check.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setBaseWritingDirection:forRange:]):

LayoutTests:

* editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt.
* editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html.

Rename an existing test, rtl-keyboard-input-on-focus.html, to rtl-keyboard-input-on-focus-in-editable-page.html
to emphasize the fact that it requires an editable web view.

* editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt: Added.
* editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html: Added.

Add a new layout test to ensure that we don't automatically apply an RTL attribute when focusing fields in a
non-editable web view.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitUIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusineditablepageexpectedtxt">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusineditablepagehtml">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html</a></li>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusinnoneditablepageexpectedtxt">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusinnoneditablepagehtml">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusexpectedtxt">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditinginputiosrtlkeyboardinputonfocushtml">trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (247935 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog      2019-07-30 01:46:19 UTC (rev 247935)
+++ trunk/LayoutTests/ChangeLog 2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2019-07-29  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        YouTube search field shows RTL text outside its border on iPadOS
+        https://bugs.webkit.org/show_bug.cgi?id=200253
+        <rdar://problem/53680603>
+
+        Reviewed by Beth Dakin.
+
+        * editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt.
+        * editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html: Renamed from LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html.
+
+        Rename an existing test, rtl-keyboard-input-on-focus.html, to rtl-keyboard-input-on-focus-in-editable-page.html
+        to emphasize the fact that it requires an editable web view.
+
+        * editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt: Added.
+        * editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html: Added.
+
+        Add a new layout test to ensure that we don't automatically apply an RTL attribute when focusing fields in a
+        non-editable web view.
+
</ins><span class="cx"> 2019-07-29  Sergei Glazunov  <glazunov@google.com>
</span><span class="cx"> 
</span><span class="cx">         The maximum subframe count check should not be skipped for empty URLs.
</span></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt (247935 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt     2019-07-30 01:46:19 UTC (rev 247935)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt        2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -1,38 +0,0 @@
</span><del>-
-
-Using Hebrew keyboard: 
-    <div><br></div>
-    <div style="direction: rtl;"><br></div>
-
-
-
-Using English keyboard: 
-    <div><br></div>
-    <div style="direction: ltr;"><br></div>
-
-
-
-Observed 'beforeinput' events: [
-    {
-        "inputType": "formatSetBlockTextDirection",
-        "data": "rtl",
-        "order": 1
-    },
-    {
-        "inputType": "formatSetBlockTextDirection",
-        "data": "ltr",
-        "order": 3
-    }
-]
-Observed 'input' events: [
-    {
-        "inputType": "formatSetBlockTextDirection",
-        "data": "rtl",
-        "order": 2
-    },
-    {
-        "inputType": "formatSetBlockTextDirection",
-        "data": "ltr",
-        "order": 4
-    }
-]
</del></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusineditablepageexpectedtxtfromrev247935trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt (from rev 247935, trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-expected.txt) (0 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt                            (rev 0)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page-expected.txt       2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -0,0 +1,38 @@
</span><ins>+
+
+Using Hebrew keyboard: 
+    <div><br></div>
+    <div style="direction: rtl;"><br></div>
+
+
+
+Using English keyboard: 
+    <div><br></div>
+    <div style="direction: ltr;"><br></div>
+
+
+
+Observed 'beforeinput' events: [
+    {
+        "inputType": "formatSetBlockTextDirection",
+        "data": "rtl",
+        "order": 1
+    },
+    {
+        "inputType": "formatSetBlockTextDirection",
+        "data": "ltr",
+        "order": 3
+    }
+]
+Observed 'input' events: [
+    {
+        "inputType": "formatSetBlockTextDirection",
+        "data": "rtl",
+        "order": 2
+    },
+    {
+        "inputType": "formatSetBlockTextDirection",
+        "data": "ltr",
+        "order": 4
+    }
+]
</ins></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusineditablepagehtmlfromrev247935trunkLayoutTestseditinginputiosrtlkeyboardinputonfocushtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html (from rev 247935, trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html) (0 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html                            (rev 0)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-editable-page.html       2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -0,0 +1,79 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true editable=true ] -->
+<html>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<head>
+    <script src="../../../resources/basic-gestures.js"></script>
+    <script src="../../../resources/ui-helper.js"></script>
+    <style>
+        body {
+            margin: 0;
+        }
+    </style>
+    <script>
+    function appendOutput(string) {
+        let pre = document.createElement("pre");
+        pre.textContent = string;
+        document.body.appendChild(pre);
+    }
+
+    beforeInputEvents = [];
+    inputEvents = [];
+    eventNumber = 0;
+
+    async function run()
+    {
+        script.remove();
+
+        document.body.addEventListener("beforeinput", event => {
+            beforeInputEvents.push({
+                "inputType": event.inputType,
+                "data": event.data,
+                "order": ++eventNumber
+            });
+        });
+
+        document.body.addEventListener("input", event => {
+            inputEvents.push({
+                "inputType": event.inputType,
+                "data": event.data,
+                "order": ++eventNumber
+            });
+        });
+
+        await UIHelper.setKeyboardInputModeIdentifier("he_IL");
+        await UIHelper.activateAndWaitForInputSessionAt(100, 250);
+        await UIHelper.ensurePresentationUpdate();
+        const markupUsingHebrewKeyboard = document.body.innerHTML;
+
+        document.body.blur();
+        await UIHelper.waitForKeyboardToHide();
+        await UIHelper.setKeyboardInputModeIdentifier("en_US");
+        await UIHelper.activateAndWaitForInputSessionAt(100, 250);
+        await UIHelper.ensurePresentationUpdate();
+        const markupUsingEnglishKeyboard = document.body.innerHTML;
+
+        appendOutput(`Using Hebrew keyboard: ${markupUsingHebrewKeyboard}`);
+        appendOutput(`Using English keyboard: ${markupUsingEnglishKeyboard}`);
+        appendOutput(`Observed 'beforeinput' events: ${JSON.stringify(beforeInputEvents, null, 4)}`);
+        appendOutput(`Observed 'input' events: ${JSON.stringify(inputEvents, null, 4)}`);
+        testRunner.notifyDone();
+    }
+    </script>
+</head>
+<body onload="run()">
+    <div><br></div>
+    <div><br></div>
+</body>
+<script id="script">
+if (window.testRunner) {
+    testRunner.waitUntilDone();
+    testRunner.dumpAsText();
+} else {
+    const description = document.createElement("p");
+    description.textContent = "Verifies that focusing an editable area with an RTL keyboard switches text direction to RTL. "
+        + "To test manually, switch to a Hebrew keyboard and focus the editable area. "
+        + "The editable area should be made RTL.";
+    document.body.prepend(description);
+}
+</script>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusinnoneditablepageexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt (0 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt                                (rev 0)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page-expected.txt   2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+The text field direction is: ''
</ins></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocusinnoneditablepagehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html (0 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html                                (rev 0)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus-in-non-editable-page.html   2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -0,0 +1,41 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+<html>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<head>
+    <script src="../../../resources/ui-helper.js"></script>
+    <style>
+    body, html {
+        margin: 0;
+        width: 100%;
+        height: 100%;
+    }
+
+    input {
+        font-size: 16px;
+    }
+    </style>
+    <script>
+    if (window.testRunner) {
+        testRunner.waitUntilDone();
+        testRunner.dumpAsText();
+    }
+
+    addEventListener("load", async () => {
+        const field = document.getElementById("field");
+
+        await UIHelper.setKeyboardInputModeIdentifier("he_IL");
+        await UIHelper.activateElementAndWaitForInputSession(field);
+        document.write(`The text field direction is: '${field.dir}'`);
+        field.blur();
+        await UIHelper.waitForKeyboardToHide();
+        testRunner.notifyDone();
+    });
+    </script>
+</head>
+<body>
+    <p>Verifies that focusing an editable area with an RTL keyboard does not switch text direction to RTL in a non-editable web view.
+    To test manually, switch to a Hebrew keyboard and focus the editable area in Safari.
+    The editable area should not be made RTL.</p>
+    <input type="text" id="field"></input>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestseditinginputiosrtlkeyboardinputonfocushtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html (247935 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html     2019-07-30 01:46:19 UTC (rev 247935)
+++ trunk/LayoutTests/editing/input/ios/rtl-keyboard-input-on-focus.html        2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -1,79 +0,0 @@
</span><del>-<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true, editable=true ] -->
-<html>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<head>
-    <script src="../../../resources/basic-gestures.js"></script>
-    <script src="../../../resources/ui-helper.js"></script>
-    <style>
-        body {
-            margin: 0;
-        }
-    </style>
-    <script>
-    function appendOutput(string) {
-        let pre = document.createElement("pre");
-        pre.textContent = string;
-        document.body.appendChild(pre);
-    }
-
-    beforeInputEvents = [];
-    inputEvents = [];
-    eventNumber = 0;
-
-    async function run()
-    {
-        script.remove();
-
-        document.body.addEventListener("beforeinput", event => {
-            beforeInputEvents.push({
-                "inputType": event.inputType,
-                "data": event.data,
-                "order": ++eventNumber
-            });
-        });
-
-        document.body.addEventListener("input", event => {
-            inputEvents.push({
-                "inputType": event.inputType,
-                "data": event.data,
-                "order": ++eventNumber
-            });
-        });
-
-        await UIHelper.setKeyboardInputModeIdentifier("he_IL");
-        await UIHelper.activateAndWaitForInputSessionAt(100, 250);
-        await UIHelper.ensurePresentationUpdate();
-        const markupUsingHebrewKeyboard = document.body.innerHTML;
-
-        document.body.blur();
-        await UIHelper.waitForKeyboardToHide();
-        await UIHelper.setKeyboardInputModeIdentifier("en_US");
-        await UIHelper.activateAndWaitForInputSessionAt(100, 250);
-        await UIHelper.ensurePresentationUpdate();
-        const markupUsingEnglishKeyboard = document.body.innerHTML;
-
-        appendOutput(`Using Hebrew keyboard: ${markupUsingHebrewKeyboard}`);
-        appendOutput(`Using English keyboard: ${markupUsingEnglishKeyboard}`);
-        appendOutput(`Observed 'beforeinput' events: ${JSON.stringify(beforeInputEvents, null, 4)}`);
-        appendOutput(`Observed 'input' events: ${JSON.stringify(inputEvents, null, 4)}`);
-        testRunner.notifyDone();
-    }
-    </script>
-</head>
-<body onload="run()">
-    <div><br></div>
-    <div><br></div>
-</body>
-<script id="script">
-if (window.testRunner) {
-    testRunner.waitUntilDone();
-    testRunner.dumpAsText();
-} else {
-    const description = document.createElement("p");
-    description.textContent = "Verifies that focusing an editable area with an RTL keyboard switches text direction to RTL. "
-        + "To test manually, switch to a Hebrew keyboard and focus the editable area. "
-        + "The editable area should be made RTL.";
-    document.body.prepend(description);
-}
-</script>
-</html>
</del></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (247935 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2019-07-30 01:46:19 UTC (rev 247935)
+++ trunk/Source/WebKit/ChangeLog       2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2019-07-29  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        YouTube search field shows RTL text outside its border on iPadOS
+        https://bugs.webkit.org/show_bug.cgi?id=200253
+        <rdar://problem/53680603>
+
+        Reviewed by Beth Dakin.
+
+        Limits code added in r238939 to respect the current keyboard's writing mode to only editable web views. This
+        behavior was only intended for Mail, and isn't generally compatible with web content.
+
+        While the call to -setInitialDirection is correctly gated on an web view editability check, it appears that
+        other changes in iOS 13 now cause -setBaseWritingDirection:forRange: to be invoked directly from keyboards code.
+        This means that -setBaseWritingDirection:forRange: should additionally be guarded with the same check.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setBaseWritingDirection:forRange:]):
+
</ins><span class="cx"> 2019-07-29  Sihui Liu  <sihui_liu@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Try fixing crash at com.apple.WebKit.Networking: NetworkProcess::setSharedHTTPCookieStorage
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (247935 => 247936)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm    2019-07-30 01:46:19 UTC (rev 247935)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm       2019-07-30 01:50:58 UTC (rev 247936)
</span><span class="lines">@@ -4309,6 +4309,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)setBaseWritingDirection:(NSWritingDirection)direction forRange:(UITextRange *)range
</span><span class="cx"> {
</span><ins>+    if (!_page->isEditable())
+        return;
+
</ins><span class="cx">     if (range && ![range isEqual:self.selectedTextRange]) {
</span><span class="cx">         // We currently only support changing the base writing direction at the selection.
</span><span class="cx">         return;
</span></span></pre>
</div>
</div>

</body>
</html>