Changeset 199565 in webkit


Ignore:
Timestamp:
Apr 14, 2016 4:04:26 PM (8 years ago)
Author:
BJ Burg
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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r199559 r199565  
     12016-04-14  Brian Burg  <bburg@apple.com>
     2
     3        Web Automation: suppress automatic text correction in pages controlled by automation
     4        https://bugs.webkit.org/show_bug.cgi?id=156599
     5        <rdar://problem/25712646>
     6
     7        Reviewed by Timothy Hatcher.
     8
     9        If the page is controlled by automation, then automatic text corrections will
     10        cause unexpected behaviors by nondeterministically modifying text inserted by
     11        a test. Just pretend these behaviors are disabled if controlled by automation.
     12
     13        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
     14        (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
     15        (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
     16        (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
     17        (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
     18
    1192016-04-14  Anders Carlsson  <andersca@apple.com>
    220
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm

    r179409 r199565  
    186186bool WebEditorClient::isAutomaticQuoteSubstitutionEnabled()
    187187{
     188    if (m_page->isControlledByAutomation())
     189        return false;
     190
    188191    return WebProcess::singleton().textCheckerState().isAutomaticQuoteSubstitutionEnabled;
    189192}
     
    208211bool WebEditorClient::isAutomaticDashSubstitutionEnabled()
    209212{
     213    if (m_page->isControlledByAutomation())
     214        return false;
     215
    210216    return WebProcess::singleton().textCheckerState().isAutomaticDashSubstitutionEnabled;
    211217}
     
    219225bool WebEditorClient::isAutomaticTextReplacementEnabled()
    220226{
     227    if (m_page->isControlledByAutomation())
     228        return false;
     229
    221230    return WebProcess::singleton().textCheckerState().isAutomaticTextReplacementEnabled;
    222231}
     
    230239bool WebEditorClient::isAutomaticSpellingCorrectionEnabled()
    231240{
     241    if (m_page->isControlledByAutomation())
     242        return false;
     243
    232244    return WebProcess::singleton().textCheckerState().isAutomaticSpellingCorrectionEnabled;
    233245}
Note: See TracChangeset for help on using the changeset viewer.