Title: [199565] trunk/Source/WebKit2
Revision
199565
Author
[email protected]
Date
2016-04-14 16:04:26 -0700 (Thu, 14 Apr 2016)

Log Message

Web Automation: suppress automatic text correction in pages controlled by automation
https://bugs.webkit.org/show_bug.cgi?id=156599
<rdar://problem/25712646>

Reviewed by Timothy Hatcher.

If the page is controlled by automation, then automatic text corrections will
cause unexpected behaviors by nondeterministically modifying text inserted by
a test. Just pretend these behaviors are disabled if controlled by automation.

* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
(WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
(WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
(WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (199564 => 199565)


--- trunk/Source/WebKit2/ChangeLog	2016-04-14 22:59:42 UTC (rev 199564)
+++ trunk/Source/WebKit2/ChangeLog	2016-04-14 23:04:26 UTC (rev 199565)
@@ -1,3 +1,21 @@
+2016-04-14  Brian Burg  <[email protected]>
+
+        Web Automation: suppress automatic text correction in pages controlled by automation
+        https://bugs.webkit.org/show_bug.cgi?id=156599
+        <rdar://problem/25712646>
+
+        Reviewed by Timothy Hatcher.
+
+        If the page is controlled by automation, then automatic text corrections will
+        cause unexpected behaviors by nondeterministically modifying text inserted by
+        a test. Just pretend these behaviors are disabled if controlled by automation.
+
+        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
+        (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
+        (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
+        (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
+        (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
+
 2016-04-14  Anders Carlsson  <[email protected]>
 
         Try to fix the Yosemite build.

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm (199564 => 199565)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm	2016-04-14 22:59:42 UTC (rev 199564)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm	2016-04-14 23:04:26 UTC (rev 199565)
@@ -185,6 +185,9 @@
 
 bool WebEditorClient::isAutomaticQuoteSubstitutionEnabled()
 {
+    if (m_page->isControlledByAutomation())
+        return false;
+
     return WebProcess::singleton().textCheckerState().isAutomaticQuoteSubstitutionEnabled;
 }
 
@@ -207,6 +210,9 @@
 
 bool WebEditorClient::isAutomaticDashSubstitutionEnabled()
 {
+    if (m_page->isControlledByAutomation())
+        return false;
+
     return WebProcess::singleton().textCheckerState().isAutomaticDashSubstitutionEnabled;
 }
 
@@ -218,6 +224,9 @@
 
 bool WebEditorClient::isAutomaticTextReplacementEnabled()
 {
+    if (m_page->isControlledByAutomation())
+        return false;
+
     return WebProcess::singleton().textCheckerState().isAutomaticTextReplacementEnabled;
 }
 
@@ -229,6 +238,9 @@
 
 bool WebEditorClient::isAutomaticSpellingCorrectionEnabled()
 {
+    if (m_page->isControlledByAutomation())
+        return false;
+
     return WebProcess::singleton().textCheckerState().isAutomaticSpellingCorrectionEnabled;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to