[iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 18:17:15 +0000 (18:17 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2019 18:17:15 +0000 (18:17 +0000)
commitf8c0770af360e5db3a655463106c383010d382e6
treee7a870b78070767ed51655f0f1e487897bada1d3
parent6975854c0babaf364024675ff31af1ba0764c5ee
[iOS] Add quirks to disable autocorrection and autocapitalization in hidden editable areas on some websites
https://bugs.webkit.org/show_bug.cgi?id=197102
<rdar://problem/49864669>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Add a quirk to disable autocorrection and autocapitalization in hidden editable areas.

* page/Quirks.cpp:
(WebCore::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreasForHost):
(WebCore::Quirks::shouldSuppressAutocorrectionAndAutocaptializationInHiddenEditableAreas const):
* page/Quirks.h:

Source/WebKit:

If the quirk for disabling autocorrection and autocapitalization in hidden editable areas is active, then check
whether the focused element is hidden, and turn off autocorrection and autocapitalization if needed.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getFocusedElementInformation):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244457 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/Quirks.cpp
Source/WebCore/page/Quirks.h
Source/WebKit/ChangeLog
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm