iOS build fix after r176299. This method is not defined in WKViewIOS.mm.

* UIProcess/API/Cocoa/WKViewPrivate.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176304 268f45cc-cd09-0410-ab3c-d52691b4dbfc
iOS8 new "slow tap" heuristic fires mouse compat events despite preventDefault on touchend
https://bugs.webkit.org/show_bug.cgi?id=137069
rdar://problem/18481464

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-18
Reviewed by Simon Fraser.

On WebKit2, we let UIWebTouchEventsGestureRecognizer and _UIWebHighlightLongPressGestureRecognizer
run concurrently. This causes a race with an incorrect behavior:
1) If UIWebTouchEventsGestureRecognizer does not cancel the native gestures on start.
2) _UIWebHighlightLongPressGestureRecognizer starts after highlightDelay.
3) When the finger leaves the screen, both gestures end.
-> If the touch end sent to JavaScript in [3] ask the priority over native events, that no longer stops
   the _UIWebHighlightLongPressGestureRecognizer.

The two gesture recognizers can run in any order, there is no guarantee on which one runs first.
To solve the bug, I must make sure the _UIWebHighlightLongPressGestureRecognizer never trigger a click
if the page wants the event.

To solve the order problem, I use the fact that event recognition goes in two phases for
non cancelled events:
1) Update the gesture recognizers.
2) Trigger the actions.

I do not know the order of recognizers in [1], but I know both have run before [2] is executed.
I use that to stop _UIWebHighlightLongPressGestureRecognizer from ending with a click in the case of the bug:
1) When _UIWebHighlightLongPressGestureRecognizer starts, I set _highlightLongPressCanClick signaling
   the gesture can end normally. This is done on a timer and not direct input so I don't really have to worry
   about a race here.
2) When processing the touch event for UIWebTouchEventsGestureRecognizer, I reset the flag _highlightLongPressCanClick
   if the page wants the event.
3) When the actions of _UIWebHighlightLongPressGestureRecognizer are processed, the touch event
   has already been processed by the page and the flag has been cleared if needed.

* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEvent:preventsNativeGestures:]):
(-[WKContentView _highlightLongPressRecognized:]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176305 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed. Revision to the build fix in r176304.

The guarded method should simply be in the !TARGET_OS_IPHONE block.

* UIProcess/API/Cocoa/WKViewPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176306 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add the initial implementation of dynamic specificity for :matches()
https://bugs.webkit.org/show_bug.cgi?id=138822

Reviewed by Andreas Kling.

Source/WebCore:

Previously we completely ignored the selector list of :matches() when computing
the specificity of the selector.

The spec (http://dev.w3.org/csswg/selectors4/#specificity) says:
"The specificity of a :matches() pseudo-class, however, is the specificity
 of the most specific complex selector that matched the given element."

This patch does just that.

In the CSS JIT, we only consider specificities that can be computed statically
for now, this should be extended later.
When the specificity is dynamic, we fall back to SelectorChecker. In that case,
we execute every selector of the selector list and we keep the maximum value
as the specificity for the whole :matches().

Tests: fast/css/matches-specificity-1.html
       fast/css/matches-specificity-2.html
       fast/css/matches-specificity-3.html
       fast/css/matches-specificity-4.html
       fast/css/matches-specificity-5.html
       fast/css/matches-specificity-6.html
       fast/css/matches-specificity-7.html
       fast/css/matches-specificity-8.html
       fast/css/matches-specificity-9.html
       fast/css/matches-specificity-10.html

* css/CSSSelector.cpp:
(WebCore::selectorSpecificity):
(WebCore::maxSpecificity):
(WebCore::CSSSelector::specificity):
(WebCore::simpleSelectorSpecificityInternal):
(WebCore::CSSSelector::simpleSelectorSpecificity):
:matches() itself should not have any specificity. The specificity of its components
is computed in SelectorChecker.

Since :matches() is no longer accounted as a class B specificity, I had to finish
the specificity of :not() or some test breaks.

* css/CSSSelector.h:
* css/PageRuleCollector.cpp:
(WebCore::comparePageRules):
* css/SelectorChecker.cpp:
(WebCore::SelectorChecker::checkOne):
We can no longer shortcut the execution when context.pseudoElementEffective is false.
There is no guarantee that a following selector wouldn't match with a higher specificity.

* cssjit/SelectorCompiler.cpp:
(WebCore::SelectorCompiler::addPseudoClassType):
(WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
(WebCore::SelectorCompiler::constructFragments):
(WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):

LayoutTests:

* fast/css/matches-specificity-1-expected.html: Added.
* fast/css/matches-specificity-1.html: Added.
* fast/css/matches-specificity-2-expected.html: Added.
* fast/css/matches-specificity-2.html: Added.
* fast/css/matches-specificity-3-expected.html: Added.
* fast/css/matches-specificity-3.html: Added.
* fast/css/matches-specificity-4-expected.html: Added.
* fast/css/matches-specificity-4.html: Added.
* fast/css/matches-specificity-5-expected.html: Added.
* fast/css/matches-specificity-5.html: Added.
* fast/css/matches-specificity-6-expected.html: Added.
* fast/css/matches-specificity-6.html: Added.
* fast/css/matches-specificity-7-expected.html: Added.
* fast/css/matches-specificity-7.html: Added.
* fast/css/matches-specificity-8-expected.html: Added.
* fast/css/matches-specificity-8.html: Added.
* fast/css/matches-specificity-9-expected.html: Added.
* fast/css/matches-specificity-9.html: Added.
* fast/css/matches-specificity-10-expected.html: Added.
* fast/css/matches-specificity-10.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176307 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2] Remove the minimalUI code from the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=138819

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-11-18
Reviewed by Sam Weinig.

It looks like the only interface we have to keep alive is
[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:].

Clean up everything else, it is a pile of useless code.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:minimumLayoutSizeForMinimalUI:maximumUnobscuredSizeOverride:]):
(-[WKWebView _overrideLayoutParametersWithMinimumLayoutSize:maximumUnobscuredSizeOverride:]):
(-[WKWebView _setUsesMinimalUI:]): Deleted.
(-[WKWebView _usesMinimalUI]): Deleted.
(activeMinimumLayoutSizeForMinimalUI): Deleted.
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setUsesMinimalUI): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.
(WebKit::WebPageProxy::setUsesMinimalUI): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI): Deleted.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@176308 268f45cc-cd09-0410-ab3c-d52691b4dbfc