|
| 1 | +2017-10-06 Wenson Hsieh < [email protected]> |
| 2 | + |
| 3 | + [iOS] Tweak support for classifying form controls (followup to r222487) |
| 4 | + https://bugs.webkit.org/show_bug.cgi?id=177917 |
| 5 | + <rdar://problem/34820122> |
| 6 | + |
| 7 | + Reviewed by Dean Jackson. |
| 8 | + |
| 9 | + This patch follows up with <http://trac.webkit.org/r222487>. It combines the functionality of two SPI hooks |
| 10 | + implemented on WKContentView into a single method that vends a context dictionary, and additionally addresses an |
| 11 | + issue with the original implementation, wherein some cached state on WebPageProxy is set upon starting node |
| 12 | + assistance, but is never unset when stopping node assistance, nor set anywhere else. See per-method comments for |
| 13 | + more detail. |
| 14 | + |
| 15 | + * UIProcess/WebPageProxy.h: |
| 16 | + |
| 17 | + Remove members m_acceptsAutofilledLoginCredentials and m_representingPageURL from WebPageProxy. This state is |
| 18 | + retrieved from the AssistedNodeInformation struct when starting node assistance, but is never reset anywhere |
| 19 | + else. Instead of introducing new members to remember this state, we can just use the WKContentView's current |
| 20 | + assisted node information. |
| 21 | + |
| 22 | + This also means that programmatically focusing forms (without user gesture) will no longer cause WKContentView |
| 23 | + to accept autofilled login credentials, since we bail out of node assistance and don't begin an input session. |
| 24 | + |
| 25 | + * UIProcess/ios/WKContentView.mm: |
| 26 | + (-[WKContentView acceptsAutofilledLoginCredentials]): Deleted. |
| 27 | + (-[WKContentView representingPageURL]): Deleted. |
| 28 | + * UIProcess/ios/WKContentViewInteraction.mm: |
| 29 | + (-[WKContentView _autofillContext]): |
| 30 | + |
| 31 | + Merge functionality of the previous two SPI hooks, such that -_autofillContext will return a non-null dictionary |
| 32 | + containing the URL of the focused element's document if and only if WKContentView accepts autofilled login |
| 33 | + credentials, and there exists a representing page URL. |
| 34 | + |
| 35 | + When the page stops assisting the focused node, we set the AssistedNodeInformation's element type to None, so we |
| 36 | + additionally bail and return nil if the element type is None. As an aside, it seems a more reasonable approach to |
| 37 | + resetting state upon stopping node assistance is to just completely reset _assistedNodeInformation to its initial |
| 38 | + value, i.e. via _assistedNodeInformation = { }. It's not clear whether there are behaviors relying on the fact |
| 39 | + that all members but the element type in the content view's assisted node information could be stale, so this |
| 40 | + seems worthy of some investigation. |
| 41 | + |
| 42 | + * UIProcess/ios/WebPageProxyIOS.mm: |
| 43 | + (WebKit::WebPageProxy::startAssistingNode): |
| 44 | + (WebKit::WebPageProxy::acceptsAutofilledLoginCredentials): Deleted. |
| 45 | + (WebKit::WebPageProxy::representingPageURL): Deleted. |
| 46 | + |
1 | 47 | 2017-10-06 Yousuke Kimoto < [email protected]>
|
2 | 48 |
|
3 | 49 | [WinCairo] Add shared curl files
|
|
0 commit comments