Prevent unnecessary register saving in css jit.
https://bugs.webkit.org/show_bug.cgi?id=133955

Reviewed by Geoff Garen.

* cssjit/FunctionCall.h:
(WebCore::FunctionCall::prepareAndCall):
(WebCore::FunctionCall::cleanupPostCall):
(WebCore::FunctionCall::saveAllocatedCallerSavedRegisters):
(WebCore::FunctionCall::restoreAllocatedCallerSavedRegisters):
(WebCore::FunctionCall::saveAllocatedRegisters): Renamed to saveAllocatedCallerSavedRegisters.
(WebCore::FunctionCall::restoreAllocatedRegisters): Renamed to restoreAllocatedCallerSavedRegisters.
Only push caller saved registers before function calls.
* cssjit/RegisterAllocator.h:
(WebCore::RegisterAllocator::isValidRegister):
Corrected register ranges.
(WebCore::RegisterAllocator::isCallerSavedRegister): Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170548 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HIDGamepadProvider should only be active when someone is interested in Gamepads.
https://bugs.webkit.org/show_bug.cgi?id=134374

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::registerNavigator): Add some logging.
(WebCore::GamepadManager::unregisterNavigator): Ditto.

* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::connectionDelayTimerFired): Stop suppressing connection callbacks
(WebCore::HIDGamepadProvider::openAndScheduleManager):
(WebCore::HIDGamepadProvider::closeAndUnscheduleManager): Stop listening for gamepad events, and clear
  all current gamepads.
(WebCore::HIDGamepadProvider::startMonitoringGamepads): If the first client, call openAndScheduleManager
(WebCore::HIDGamepadProvider::stopMonitoringGamepads): If the last client, call closeAndUnscheduleManager
(WebCore::HIDGamepadProvider::deviceAdded): If this callback came while we were suppressing connection
  callbacks, it is a startup event for already-connected gamepads. Stop suppressing callbacks in a later
  spin of the runloop.
(WebCore::HIDGamepadProvider::deviceRemoved):
* platform/mac/HIDGamepadProvider.h:
(WebCore::HIDGamepadProvider::setShouldDispatchCallbacks): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore:  Add feature flag for link long-press gesture.
 https://bugs.webkit.org/show_bug.cgi?id=134262

 Reviewed by Enrica Casucci.

 * Configurations/FeatureDefines.xcconfig:
 Add ENABLE_LINK_LONG_PRESS.

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27

Source/WebCore: Add feature flag for link long-press gesture.
https://bugs.webkit.org/show_bug.cgi?id=134262

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_LINK_LONG_PRESS.

Source/WebKit/mac: Add feature flag for link long-press gesture.
https://bugs.webkit.org/show_bug.cgi?id=134262

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* Configurations/FeatureDefines.xcconfig:
Add ENABLE_LINK_LONG_PRESS.

Source/WebKit2:  Add feature flag for link long-press gesture.
 https://bugs.webkit.org/show_bug.cgi?id=134262

 Reviewed by Enrica Casucci.

 * Configurations/FeatureDefines.xcconfig:
 Add ENABLE_LINK_LONG_PRESS.

Patch by Peyton Randolph <prandolph@apple.com> on 2014-06-27

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170550 268f45cc-cd09-0410-ab3c-d52691b4dbfc
HIDGamepads should populate themselves with initial input values
https://bugs.webkit.org/show_bug.cgi?id=134381

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* platform/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::getCurrentValueForElement):
(WebCore::HIDGamepad::initElements):  Loop through all the saved elements to get current values.
(WebCore::HIDGamepad::maybeAddButton):
(WebCore::HIDGamepad::maybeAddAxis):
* platform/mac/HIDGamepad.h:
(WebCore::HIDGamepadElement::HIDGamepadElement):
(WebCore::HIDGamepadButton::HIDGamepadButton):
(WebCore::HIDGamepadAxis::HIDGamepadAxis):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170551 268f45cc-cd09-0410-ab3c-d52691b4dbfc
InfoClick (from Nisus Software) dies on viewing found items
<rdar://problem/17395601>
https://bugs.webkit.org/show_bug.cgi?id=134410

Reviewed by Andy Estes.

InfoClick was calling -[WebPreferences setPrivateBrowsingEnabled:] before
setting up a WebView (or anything else that would have set up WebKitSystemInterface),
which now requires a set up WebKitSystemInterface. We can fix this by initializing
it from +[WebPreferences initialize].

* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
Add call to InitWebCoreSystemInterface().

(+[WebPreferences _switchNetworkLoaderToNewTestingSession]):
Remove now unnecessary call to InitWebCoreSystemInterface().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170552 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The user pressing a button on a gamepad should cause gamepads to become visible to all NavigatorGamepads.
https://bugs.webkit.org/show_bug.cgi?id=134375

Reviewed by Darin Adler.

No new tests (Not yet a tested config)

* Modules/gamepad/GamepadManager.cpp:
(WebCore::GamepadManager::platformGamepadConnected): Also call to makeGamepadsVisibileToBlindNavigators.
(WebCore::GamepadManager::platformGamepadDisconnected):
(WebCore::GamepadManager::platformGamepadInputActivity): Call makeGamepadsVisibileToBlindNavigators.
(WebCore::GamepadManager::makeGamepadsVisibileToBlindNavigators): Walk through each blind navigator
  notifying it of each connected Gamepad.
(WebCore::GamepadManager::registerNavigator): Also add to the blind navigator set.
(WebCore::GamepadManager::unregisterNavigator): Also remove from the blind navigator set.
* Modules/gamepad/GamepadManager.h:

* platform/GamepadProviderClient.h: Added platformGamepadInputActivity.

* platform/mac/HIDGamepadProvider.cpp:
(WebCore::HIDGamepadProvider::HIDGamepadProvider):
(WebCore::HIDGamepadProvider::valuesChanged): Set the input notification timer which will notify the clients
  that a button was pressed.
(WebCore::HIDGamepadProvider::inputNotificationTimerFired): Perform that notification.
* platform/mac/HIDGamepadProvider.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS][WK2] <select> tapping "next" does not save new picker value
https://bugs.webkit.org/show_bug.cgi?id=134409

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-06-27
Reviewed by Enrica Casucci.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryTab:]):
We know the assisted node will change, so call endEditing
before the assisted node changes in the WebProcess.

(-[WKContentView _stopAssistingNode]):
Ensure we call endEditing to trigger controlEndEditing.

* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker dealloc]):
Style fixes.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@170554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Don't fold a UInt32ToNumber with DoOverflow to Identity since that would result in an Identity that takes an Int32 and returns a DoubleRep
https://bugs.webkit.org/show_bug.cgi?id=134412

Reviewed by Mark Hahnenberg.

* dfg/DFGCSEPhase.cpp:
(JSC::DFG::CSEPhase::setReplacement):
* dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):
* dfg/DFGValidate.cpp:
(JSC::DFG::Validate::validate):
* tests/stress/uint32-to-number-fold-constant-with-do-overflow.js: Added.
(foo):
(bar):
(baz):



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