| Index: Source/WebCore/testing/InternalSettings.cpp
|
| diff --git a/Source/WebCore/testing/InternalSettings.cpp b/Source/WebCore/testing/InternalSettings.cpp
|
| index a722b2646d8c41c01ce43bd5eeebfb7ae8ddf107..4a641b43c434689021f50f744ac6eb43647d722e 100644
|
| --- a/Source/WebCore/testing/InternalSettings.cpp
|
| +++ b/Source/WebCore/testing/InternalSettings.cpp
|
| @@ -462,4 +462,33 @@ void InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior(bool enabled,
|
| settings()->setUseLegacyBackgroundSizeShorthandBehavior(enabled);
|
| }
|
|
|
| +void InternalSettings::setPrimaryPointerDevices(const String& pointerDevice, ExceptionCode& ec)
|
| +{
|
| + InternalSettingsGuardForSettings();
|
| +
|
| + // Allow setting multiple devices by passing comma seperated list ("mouse,touch")
|
| + Vector<String> deviceTokens;
|
| + pointerDevice.split(",", false, deviceTokens);
|
| +
|
| + int pointerDevices = PointerDeviceUnknown;
|
| + for(size_t i = 0; i < deviceTokens.size(); ++i) {
|
| + String token = deviceTokens[i].stripWhiteSpace();
|
| +
|
| + if (token == "mouse")
|
| + pointerDevices |= PointerDeviceMouse;
|
| + else if (token == "touch")
|
| + pointerDevices |= PointerDeviceTouch;
|
| + else if (token == "none")
|
| + pointerDevices |= PointerDeviceNone;
|
| + else if (token == "unknown")
|
| + pointerDevices |= PointerDeviceUnknown;
|
| + else {
|
| + ec = SYNTAX_ERR;
|
| + return;
|
| + }
|
| + }
|
| +
|
| + settings()->setPrimaryPointerDevices(pointerDevices);
|
| +}
|
| +
|
| }
|
|
|