[iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jul 2015 23:02:43 +0000 (23:02 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 8 Jul 2015 23:02:43 +0000 (23:02 +0000)
commit3075909216cff823ced28a83273e71c172d422e6
tree44636b0158894839cd96bea058aa9df2fc620cf1
parentc5d08e61b3757655e82af4ed94d3f8df0aab4fa9
[iOS][WK2] Ignore synthetic clicks in subframes initiated on a previous page
https://bugs.webkit.org/show_bug.cgi?id=146712

Reviewed by Benjamin Poulain.

r178980 fixed an issue where, if a main frame navigation occurs in response to a touch event, a synthetic click
event could fire on the navigated-to page. This change extends this fix to apply to subframes.

* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::WebFrame):
* WebProcess/WebPage/WebFrame.h:
(WebKit::WebFrame::firstLayerTreeTransactionIDAfterDidCommitLoad):
(WebKit::WebFrame::setFirstLayerTreeTransactionIDAfterDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad): Stored the next layer tree transaction ID, and called cancelPotentialTapInFrame(), for the committed frame.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap): Determined the first post-commit layer tree transaction ID from the tap target node's frame.
(WebKit::WebPage::commitPotentialTap): Ditto.
(WebKit::WebPage::cancelPotentialTap): Called cancelPotentialTapInFrame(), passing m_mainFrame.
(WebKit::WebPage::cancelPotentialTapInFrame): Taught to only cancel a potential tap whose target node is a descendant of the given frame.
(WebKit::WebPage::updateVisibleContentRects): Updated to use the main frame's first post-commit layer tree transaction ID.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186531 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/WebFrame.cpp
Source/WebKit2/WebProcess/WebPage/WebFrame.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h
Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm