diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-18 10:55:06 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-18 10:55:06 +0200 |
commit | ee4c86d1990a9e26277a6948e7027ad8d525ebfa (patch) | |
tree | 1e2d3408cd097606571f40ab63353c27bcb7dd5c /Tools/DumpRenderTree/chromium | |
parent | d882bec96d0d30aeeda2141bfadfca7f038ee862 (diff) | |
download | qtwebkit-ee4c86d1990a9e26277a6948e7027ad8d525ebfa.tar.gz |
Imported WebKit commit 795dcd25a9649fccaf1c9b685f6e2ffedaf7e620 (http://svn.webkit.org/repository/webkit/trunk@131718)
New snapshot that includes the return of -fkeep-memory at link time
to reduce memory pressure as well as modularized documentation
Diffstat (limited to 'Tools/DumpRenderTree/chromium')
4 files changed, 19 insertions, 4 deletions
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp index 8aee7c5b2..082597a11 100644 --- a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp +++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp @@ -1392,12 +1392,13 @@ void DRTTestRunner::setIsolatedWorldSecurityOrigin(const CppArgumentList& argume { result->setNull(); - if (arguments.size() != 2 || !arguments[0].isNumber() || !arguments[1].isString()) + if (arguments.size() != 2 || !arguments[0].isNumber() || !(arguments[1].isString() || arguments[1].isNull())) return; - m_shell->webView()->focusedFrame()->setIsolatedWorldSecurityOrigin( - arguments[0].toInt32(), - WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1]))); + WebSecurityOrigin origin; + if (arguments[1].isString()) + origin = WebSecurityOrigin::createFromString(cppVariantToWebString(arguments[1])); + m_shell->webView()->focusedFrame()->setIsolatedWorldSecurityOrigin(arguments[0].toInt32(), origin); } void DRTTestRunner::setAllowUniversalAccessFromFileURLs(const CppArgumentList& arguments, CppVariant* result) diff --git a/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp b/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp index 35b7dfa38..cb36bfdfb 100644 --- a/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp +++ b/Tools/DumpRenderTree/chromium/TestRunner/GamepadController.cpp @@ -128,6 +128,8 @@ void GamepadController::setButtonCount(const CppArgumentList& args, CppVariant* if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap)) return; int buttons = args[1].toInt32(); + if (buttons < 0 || buttons >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap)) + return; m_gamepads.items[index].buttonsLength = buttons; m_delegate->setGamepadData(m_gamepads); result->setNull(); @@ -143,6 +145,8 @@ void GamepadController::setButtonData(const CppArgumentList& args, CppVariant* r if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap)) return; int button = args[1].toInt32(); + if (button < 0 || button >= static_cast<int>(WebKit::WebGamepad::buttonsLengthCap)) + return; double data = args[2].toDouble(); m_gamepads.items[index].buttons[button] = data; m_delegate->setGamepadData(m_gamepads); @@ -159,6 +163,8 @@ void GamepadController::setAxisCount(const CppArgumentList& args, CppVariant* re if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap)) return; int axes = args[1].toInt32(); + if (axes < 0 || axes >= static_cast<int>(WebKit::WebGamepad::axesLengthCap)) + return; m_gamepads.items[index].axesLength = axes; m_delegate->setGamepadData(m_gamepads); result->setNull(); @@ -174,6 +180,8 @@ void GamepadController::setAxisData(const CppArgumentList& args, CppVariant* res if (index < 0 || index >= static_cast<int>(WebKit::WebGamepads::itemsLengthCap)) return; int axis = args[1].toInt32(); + if (axis < 0 || axis >= static_cast<int>(WebKit::WebGamepad::axesLengthCap)) + return; double data = args[2].toDouble(); m_gamepads.items[index].axes[axis] = data; m_delegate->setGamepadData(m_gamepads); diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp index c54ebedea..7080bef18 100644 --- a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp +++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp @@ -125,6 +125,7 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame, , m_context(0) , m_acceptsTouchEvent(false) , m_printEventDetails(false) + , m_canProcessDrag(false) { static const WebString kAttributePrimitive = WebString::fromUTF8("primitive"); static const WebString kAttributeBackgroundColor = WebString::fromUTF8("background-color"); @@ -132,6 +133,7 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame, static const WebString kAttributeOpacity = WebString::fromUTF8("opacity"); static const WebString kAttributeAcceptsTouch = WebString::fromUTF8("accepts-touch"); static const WebString kAttributePrintEventDetails = WebString::fromUTF8("print-event-details"); + static const WebString kAttributeCanProcessDrag = WebString::fromUTF8("can-process-drag"); ASSERT(params.attributeNames.size() == params.attributeValues.size()); size_t size = params.attributeNames.size(); @@ -151,6 +153,8 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame, m_acceptsTouchEvent = parseBoolean(attributeValue); else if (attributeName == kAttributePrintEventDetails) m_printEventDetails = parseBoolean(attributeValue); + else if (attributeName == kAttributeCanProcessDrag) + m_canProcessDrag = parseBoolean(attributeValue); } } diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.h b/Tools/DumpRenderTree/chromium/TestWebPlugin.h index aa6533e32..49fde85aa 100644 --- a/Tools/DumpRenderTree/chromium/TestWebPlugin.h +++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.h @@ -56,6 +56,7 @@ public: virtual bool initialize(WebKit::WebPluginContainer*); virtual void destroy(); virtual NPObject* scriptableObject() { return 0; } + virtual bool canProcessDrag() const { return m_canProcessDrag; } virtual void paint(WebKit::WebCanvas*, const WebKit::WebRect&) { } virtual void updateGeometry(const WebKit::WebRect& frameRect, const WebKit::WebRect& clipRect, @@ -132,6 +133,7 @@ private: bool m_acceptsTouchEvent; bool m_printEventDetails; + bool m_canProcessDrag; }; #endif // TestPepperPlugin_h |