[iOS] Remove User Default for iOS TextField Debugging
https://bugs.webkit.org/show_bug.cgi?id=134356

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-26
Reviewed by Timothy Hatcher.

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170496 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: Command-/ (slash) now auto-comments code via CodeMirror 4. Should remove as command to pause
https://bugs.webkit.org/show_bug.cgi?id=134313

Reviewed by Timothy Hatcher.

Changed alternate command to pause/resume from command-slash to command-backslash.
Command-slash sets/unsets comments in all code editors.

* UserInterface/Models/KeyboardShortcut.js: Added Backslash.
* UserInterface/Views/DebuggerSidebarPanel.js: Changed pauseOrResumeAlternateKeyboardShortcut to use Backslash instead of Slash.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170497 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Define TARGET_OS_IPHONE to 0 for non-darwin ports
https://bugs.webkit.org/show_bug.cgi?id=134347

Reviewed by Darin Adler.

A follow-up to r169880 to make it easier to reason about
the code. The purpose of this change to allow
"#if TARGET_OS_IPHONE" in public header files.

* wtf/Platform.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170498 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Skip memcmp()ing fully downloaded resources after they become mmap()able.
<https://webkit.org/b/134362>

When we receive word that a downloaded resource is now available for mmap()ing
from the file system, we don't need to compare against the buffered data,
since even if there were a mismatch, the cached version should be the canonical one.

This was added as belt-and-suspenders while the supporting mechanism was being
developed in CFNetwork, and there's no evidence of a race today. This change
turns the runtime checks into debug-only assertions.

Saves ~300ms of main thread time on PLT.

Reviewed by Geoff Garen.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::tryReplaceEncodedData):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170499 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove use of PlatformStrategies for Gamepad API.
https://bugs.webkit.org/show_bug.cgi?id=134348

Source/WebCore:

Reviewed by Dean Jackson.

No new tests (Not yet a tested config)

Introduce a virtual GamepadProvider with a process-global shared provider.
The base implementation of the GamepadProvider does nothing.
* platform/GamepadProvider.cpp: Renamed from Source/WebKit/mac/WebCoreSupport/WebHIDGamepadController.h.
(WebCore::GamepadProvider::shared):
(WebCore::GamepadProvider::setSharedProvider):
(WebCore::GamepadProvider::startMonitoringGamepads):
(WebCore::GamepadProvider::stopMonitoringGamepads):
(WebCore::GamepadProvider::platformGamepads):
* platform/GamepadProvider.h: Renamed from Source/WebCore/platform/GamepadStrategy.h.
(WebCore::GamepadProvider::~GamepadProvider):

* platform/GamepadProviderClient.h: Renamed from Source/WebCore/platform/GamepadStrategyClient.h.
(WebCore::GamepadProviderClient::~GamepadProviderClient):

GamepadManager is now a GamepadProviderClient:
* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::GamepadManager):
(WebCore::GamepadManager::registerNavigator):
(WebCore::GamepadManager::unregisterNavigator):
* Modules/gamepad/GamepadManager.h:

Remove the GamepadStrategy altogether:
* platform/PlatformStrategies.h:
(WebCore::PlatformStrategies::PlatformStrategies):
(WebCore::PlatformStrategies::gamepadStrategy): Deleted.

Call to the shared GamepadProvider instead of the strategy:
* Modules/gamepad/NavigatorGamepad.cpp:
(WebCore::NavigatorGamepad::gamepads):
(WebCore::NavigatorGamepad::gamepadsBecameVisible):
(WebCore::NavigatorGamepad::gamepadConnected):

HIDGamepadListener is now a subclass of GamepadProvider that implements the HID based management.
LegacyWebKit on Mac will install the shared HIDGamepadProvider instead of the default GamepadProvider:
* platform/mac/HIDGamepadProvider.cpp: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.cpp.
(WebCore::deviceMatchingDictionary):
(WebCore::deviceAddedCallback):
(WebCore::deviceRemovedCallback):
(WebCore::deviceValuesChangedCallback):
(WebCore::HIDGamepadProvider::shared):
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::indexForNewlyConnectedDevice):
(WebCore::HIDGamepadProvider::startMonitoringGamepads):
(WebCore::HIDGamepadProvider::stopMonitoringGamepads):
(WebCore::HIDGamepadProvider::deviceAdded):
(WebCore::HIDGamepadProvider::deviceRemoved):
(WebCore::HIDGamepadProvider::valuesChanged):
(WebCore::HIDGamepadProvider::removeGamepadForDevice):
* platform/mac/HIDGamepadProvider.h: Renamed from Source/WebCore/platform/mac/HIDGamepadListener.h.
(WebCore::HIDGamepadProvider::platformGamepads):
(WebCore::HIDGamepadProvider::setShouldDispatchCallbacks):

* WebCore.exp.in:
* WebCore.xcodeproj/project.pbxproj:

* platform/mac/HIDGamepad.h: Fix incorrect comment

Source/WebKit:

Reviewed by Dean Jackson.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Reviewed by Dean Jackson.

Remove all the GamepadStrategy gunk:
* WebCoreSupport/WebHIDGamepadController.mm: Removed.
* WebCoreSupport/WebPlatformStrategies.h:
* WebCoreSupport/WebPlatformStrategies.mm:
(WebPlatformStrategies::createGamepadStrategy): Deleted.
(WebPlatformStrategies::startMonitoringGamepads): Deleted.
(WebPlatformStrategies::stopMonitoringGamepads): Deleted.
(WebPlatformStrategies::platformGamepads): Deleted.

Instead, install the HIDGamepadProvider as the shared GamepadProvider:
* WebView/WebView.mm:
(WebKitInitializeGamepadProviderIfNecessary):
(-[WebView _commonInitializationWithFrameName:groupName:]):

Source/WebKit/win:

Reviewed by Dean Jackson.

* WebCoreSupport/WebPlatformStrategies.cpp:
(WebPlatformStrategies::createGamepadStrategy): Deleted.
* WebCoreSupport/WebPlatformStrategies.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170500 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bump FastMalloc thread cache max size to 1MB on iOS.
<https://webkit.org/b/134365>

The previous limit (512kB) comes from the old days of very-low-memory
devices, and we can now afford to spend another 512kB here.
Note that we already have a mechanism to purge FastMalloc caches on
system memory pressure.

Looks like a ~400ms progression on PLT.

Reviewed by Geoff Garen.

* wtf/FastMalloc.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[EFL] Missing dependency between freetype6 and fontconfig libs.
https://bugs.webkit.org/show_bug.cgi?id=134190

Reviewed by Gyuyoung Kim.

The external dependencies contain the freetype6 and the fontconfig libs.
The fontconfig lib requires freetype, but the dependency is not set in
the efl/jhbuild.modules file. So, during building the external libs,
fontconfig uses the freetype package of the system, while WebKit
binaries will use freetype from the WebKitBuild/Dependency directory.
There are more similar dependencies that were not indicated in the
jhbuild.modules file.

* efl/jhbuild.modules:
  Added dependencies between libs.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170502 268f45cc-cd09-0410-ab3c-d52691b4dbfc
REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
https://bugs.webkit.org/show_bug.cgi?id=133882
<rdar://problem/17271965>

Reviewed by Brady Eidson.

Source/WebCore:
This goes to pre-r161796 behavior on 10.8 and 10.9. We schedule the requests internally,
and only give 6 of them to CFNetwork at a time. Except for synchronous requests,
which still use the improved approach, and don't count against 6 connections.

* loader/ResourceLoadScheduler.cpp:
(WebCore::ResourceLoadScheduler::scheduleLoad):
* platform/network/cf/ResourceRequest.h:
(WebCore::ResourceRequest::resourcePrioritiesEnabled):
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::ResourceRequest::doUpdatePlatformRequest):
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::initializeMaximumHTTPConnectionCountPerHost): Deleted.
* platform/network/mac/ResourceRequestMac.mm:
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::ResourceRequest::doUpdatePlatformRequest):

Source/WebKit2:
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
Same fix as in WebCore.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170503 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Memcache migth not be pruned when it should for https pages
https://bugs.webkit.org/show_bug.cgi?id=134361

Reviewed by Geoffrey Garen.

There is no reason we should not try to prune in case of a https resource.

No observable change in behavior, no tests.

* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::removeClient):
Call prune unconditionally and remove an unnecessary branch.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK1] Use native touch event's timestamp for DOM touch event
https://bugs.webkit.org/show_bug.cgi?id=134326

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-06-26
Reviewed by Enrica Casucci.

* platform/ios/PlatformEventFactoryIOS.mm:
(WebCore::PlatformTouchEventBuilder::PlatformTouchEventBuilder):
Use device event timestamp to get more accurate timing information. This also removes
the variance introduced by WebKit when computing velocity/acceleration/etc.


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