diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/chromium')
37 files changed, 265 insertions, 162 deletions
diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp index 2487e1a..5601d9d 100644 --- a/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp +++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityController.cpp @@ -32,11 +32,11 @@ #include "AccessibilityController.h" #include "TestShell.h" -#include "public/WebAccessibilityCache.h" -#include "public/WebAccessibilityObject.h" -#include "public/WebFrame.h" -#include "public/WebString.h" -#include "public/WebView.h" +#include "WebAccessibilityCache.h" +#include "WebAccessibilityObject.h" +#include "WebFrame.h" +#include "WebString.h" +#include "WebView.h" using namespace WebKit; diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp index 8698e25..dbd025a 100644 --- a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp +++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.cpp @@ -31,9 +31,9 @@ #include "config.h" #include "AccessibilityUIElement.h" -#include "public/WebAccessibilityObject.h" -#include "public/WebCString.h" -#include "public/WebString.h" +#include "WebAccessibilityObject.h" +#include "WebCString.h" +#include "WebString.h" #include <wtf/Assertions.h> using namespace WebKit; diff --git a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h index df3f5b9..366ed42 100644 --- a/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h +++ b/WebKitTools/DumpRenderTree/chromium/AccessibilityUIElement.h @@ -32,7 +32,7 @@ #define AccessibilityUIElement_h #include "CppBoundClass.h" -#include "public/WebAccessibilityObject.h" +#include "WebAccessibilityObject.h" #include <wtf/Vector.h> class AccessibilityUIElement : public CppBoundClass { diff --git a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp index 839787a..1348bbf 100644 --- a/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp +++ b/WebKitTools/DumpRenderTree/chromium/CppBoundClass.cpp @@ -42,9 +42,9 @@ #include "config.h" #include "CppBoundClass.h" -#include "public/WebBindings.h" -#include "public/WebFrame.h" -#include "public/WebString.h" +#include "WebBindings.h" +#include "WebFrame.h" +#include "WebString.h" #include <wtf/Assertions.h> #include <wtf/OwnPtr.h> diff --git a/WebKitTools/DumpRenderTree/chromium/CppVariant.cpp b/WebKitTools/DumpRenderTree/chromium/CppVariant.cpp index 9539907..22e0013 100644 --- a/WebKitTools/DumpRenderTree/chromium/CppVariant.cpp +++ b/WebKitTools/DumpRenderTree/chromium/CppVariant.cpp @@ -31,7 +31,7 @@ #include "config.h" #include "CppVariant.h" -#include "public/WebBindings.h" +#include "WebBindings.h" #include <limits> #include <wtf/Assertions.h> #include <wtf/StringExtras.h> diff --git a/WebKitTools/DumpRenderTree/chromium/CppVariant.h b/WebKitTools/DumpRenderTree/chromium/CppVariant.h index 3aa5abb..3032310 100644 --- a/WebKitTools/DumpRenderTree/chromium/CppVariant.h +++ b/WebKitTools/DumpRenderTree/chromium/CppVariant.h @@ -42,7 +42,7 @@ #ifndef CppVariant_h #define CppVariant_h -#include "public/WebBindings.h" +#include "WebBindings.h" #include "webkit/support/webkit_support.h" #include <string> #include <wtf/Vector.h> diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp index a9a891b..78c86e7 100644 --- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp +++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.cpp @@ -34,10 +34,10 @@ #include "DRTDevToolsCallArgs.h" #include "DRTDevToolsClient.h" -#include "public/WebCString.h" -#include "public/WebDevToolsAgent.h" -#include "public/WebString.h" -#include "public/WebView.h" +#include "WebCString.h" +#include "WebDevToolsAgent.h" +#include "WebString.h" +#include "WebView.h" #include "webkit/support/webkit_support.h" using namespace WebKit; diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h index c988fa1..e1478d0 100644 --- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h +++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsAgent.h @@ -33,7 +33,7 @@ #include "DRTDevToolsCallArgs.h" #include "Task.h" -#include "public/WebDevToolsAgentClient.h" +#include "WebDevToolsAgentClient.h" #include <wtf/HashMap.h> #include <wtf/Noncopyable.h> diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsCallArgs.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsCallArgs.h index b1ac2ec..a548159 100644 --- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsCallArgs.h +++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsCallArgs.h @@ -31,7 +31,7 @@ #ifndef DRTDevToolsCallArgs_h #define DRTDevToolsCallArgs_h -#include "public/WebString.h" +#include "WebString.h" #include <wtf/Assertions.h> class DRTDevToolsCallArgs { diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.cpp b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.cpp index a53f0db..acccf18 100644 --- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.cpp +++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.cpp @@ -34,19 +34,19 @@ #include "DRTDevToolsAgent.h" #include "DRTDevToolsCallArgs.h" -#include "public/WebDevToolsAgent.h" -#include "public/WebDevToolsFrontend.h" -#include "public/WebFrame.h" -#include "public/WebScriptSource.h" -#include "public/WebString.h" -#include "public/WebView.h" +#include "WebDevToolsAgent.h" +#include "WebDevToolsFrontend.h" +#include "WebFrame.h" +#include "WebScriptSource.h" +#include "WebString.h" +#include "WebView.h" #include "webkit/support/webkit_support.h" using namespace WebKit; DRTDevToolsClient::DRTDevToolsClient(DRTDevToolsAgent* agent, WebView* webView) - : m_drtDevToolsAgent(agent) - , m_webView(webView) + : m_webView(webView) + , m_drtDevToolsAgent(agent) { m_webDevToolsFrontend.set(WebDevToolsFrontend::create(m_webView, this, diff --git a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.h b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.h index f7c8fbf..9ca1402 100644 --- a/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.h +++ b/WebKitTools/DumpRenderTree/chromium/DRTDevToolsClient.h @@ -33,7 +33,7 @@ #include "DRTDevToolsCallArgs.h" #include "Task.h" -#include "public/WebDevToolsFrontendClient.h" +#include "WebDevToolsFrontendClient.h" #include <wtf/Noncopyable.h> #include <wtf/OwnPtr.h> diff --git a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp index b2e50f7..72c0c3c 100644 --- a/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp +++ b/WebKitTools/DumpRenderTree/chromium/DumpRenderTree.cpp @@ -48,6 +48,7 @@ static const char optionTestShell[] = "--test-shell"; static const char optionAllowExternalPages[] = "--allow-external-pages"; static const char optionStartupDialog[] = "--testshell-startup-dialog"; static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-deps"; +static const char optionEnableAcceleratedCompositing[] = "--enable-accelerated-compositing"; static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas"; static void runTest(TestShell& shell, TestParams& params, const string& testName, bool testShellMode) @@ -93,6 +94,7 @@ int main(int argc, char* argv[]) bool testShellMode = false; bool allowExternalPages = false; bool startupDialog = false; + bool acceleratedCompositingEnabled = false; bool accelerated2DCanvasEnabled = false; for (int i = 1; i < argc; ++i) { string argument(argv[i]); @@ -114,6 +116,8 @@ int main(int argc, char* argv[]) startupDialog = true; else if (argument == optionCheckLayoutTestSystemDeps) exit(checkLayoutTestSystemDependencies() ? EXIT_SUCCESS : EXIT_FAILURE); + else if (argument == optionEnableAcceleratedCompositing) + acceleratedCompositingEnabled = true; else if (argument == optionEnableAccelerated2DCanvas) accelerated2DCanvasEnabled = true; else if (argument.size() && argument[0] == '-') @@ -132,6 +136,7 @@ int main(int argc, char* argv[]) { // Explicit scope for the TestShell instance. TestShell shell(testShellMode); shell.setAllowExternalPages(allowExternalPages); + shell.setAcceleratedCompositingEnabled(acceleratedCompositingEnabled); shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled); if (serverMode && !tests.size()) { params.printSeparators = true; diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp index 5f51553..e250dfc 100644 --- a/WebKitTools/DumpRenderTree/chromium/EventSender.cpp +++ b/WebKitTools/DumpRenderTree/chromium/EventSender.cpp @@ -44,18 +44,18 @@ #include "EventSender.h" #include "TestShell.h" -#include "public/WebDragData.h" -#include "public/WebDragOperation.h" -#include "public/WebPoint.h" -#include "public/WebString.h" -#include "public/WebTouchPoint.h" -#include "public/WebView.h" +#include "WebDragData.h" +#include "WebDragOperation.h" +#include "WebPoint.h" +#include "WebString.h" +#include "WebTouchPoint.h" +#include "WebView.h" #include "webkit/support/webkit_support.h" #include <wtf/Deque.h> #include <wtf/StringExtras.h> #if OS(WINDOWS) -#include "public/win/WebInputEventFactory.h" +#include "win/WebInputEventFactory.h" #endif // FIXME: layout before each event? @@ -779,7 +779,7 @@ void EventSender::beginDragWithFiles(const CppArgumentList& arguments, CppVarian currentDragData.initialize(); Vector<string> files = arguments[0].toStringVector(); for (size_t i = 0; i < files.size(); ++i) - currentDragData.appendToFileNames(webkit_support::GetAbsoluteWebStringFromUTF8Path(files[i])); + currentDragData.appendToFilenames(webkit_support::GetAbsoluteWebStringFromUTF8Path(files[i])); currentDragEffectsAllowed = WebKit::WebDragOperationCopy; // Provide a drag source. diff --git a/WebKitTools/DumpRenderTree/chromium/EventSender.h b/WebKitTools/DumpRenderTree/chromium/EventSender.h index 399a132..118509b 100644 --- a/WebKitTools/DumpRenderTree/chromium/EventSender.h +++ b/WebKitTools/DumpRenderTree/chromium/EventSender.h @@ -39,9 +39,9 @@ #include "CppBoundClass.h" #include "Task.h" -#include "public/WebDragOperation.h" -#include "public/WebInputEvent.h" -#include "public/WebPoint.h" +#include "WebDragOperation.h" +#include "WebInputEvent.h" +#include "WebPoint.h" class TestShell; diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp index 3d3c204..82fd085 100644 --- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp +++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp @@ -34,27 +34,27 @@ #include "DRTDevToolsAgent.h" #include "TestShell.h" +#include "WebAnimationController.h" +#include "WebBindings.h" +#include "WebConsoleMessage.h" +#include "WebData.h" +#include "WebDeviceOrientation.h" +#include "WebDeviceOrientationClientMock.h" +#include "WebDocument.h" +#include "WebElement.h" +#include "WebFrame.h" +#include "WebGeolocationServiceMock.h" +#include "WebInputElement.h" +#include "WebKit.h" +#include "WebNotificationPresenter.h" +#include "WebScriptSource.h" +#include "WebSecurityPolicy.h" +#include "WebSettings.h" +#include "WebSize.h" +#include "WebSpeechInputControllerMock.h" +#include "WebURL.h" +#include "WebView.h" #include "WebViewHost.h" -#include "public/WebAnimationController.h" -#include "public/WebBindings.h" -#include "public/WebConsoleMessage.h" -#include "public/WebData.h" -#include "public/WebDeviceOrientation.h" -#include "public/WebDeviceOrientationClientMock.h" -#include "public/WebDocument.h" -#include "public/WebElement.h" -#include "public/WebFrame.h" -#include "public/WebGeolocationServiceMock.h" -#include "public/WebInputElement.h" -#include "public/WebKit.h" -#include "public/WebNotificationPresenter.h" -#include "public/WebScriptSource.h" -#include "public/WebSecurityPolicy.h" -#include "public/WebSettings.h" -#include "public/WebSize.h" -#include "public/WebSpeechInputControllerMock.h" -#include "public/WebURL.h" -#include "public/WebView.h" #include "webkit/support/webkit_support.h" #include <algorithm> #include <cstdlib> @@ -106,7 +106,9 @@ LayoutTestController::LayoutTestController(TestShell* shell) bindMethod("forceRedSelectionColors", &LayoutTestController::forceRedSelectionColors); bindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission); bindMethod("isCommandEnabled", &LayoutTestController::isCommandEnabled); + bindMethod("layerTreeAsText", &LayoutTestController::layerTreeAsText); bindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem); + bindMethod("hasSpellingMarker", &LayoutTestController::hasSpellingMarker); bindMethod("notifyDone", &LayoutTestController::notifyDone); bindMethod("numberOfActiveAnimations", &LayoutTestController::numberOfActiveAnimations); bindMethod("numberOfPages", &LayoutTestController::numberOfPages); @@ -1537,6 +1539,11 @@ WebKit::WebSpeechInputController* LayoutTestController::speechInputController(We return m_speechInputControllerMock.get(); } +void LayoutTestController::layerTreeAsText(const CppArgumentList& args, CppVariant* result) +{ + result->set(m_shell->webView()->mainFrame()->layerTreeAsText().utf8()); +} + void LayoutTestController::markerTextForListItem(const CppArgumentList& args, CppVariant* result) { WebElement element; @@ -1552,3 +1559,10 @@ WebDeviceOrientationClient* LayoutTestController::deviceOrientationClient() m_deviceOrientationClientMock.set(WebDeviceOrientationClientMock::create()); return m_deviceOrientationClientMock.get(); } + +void LayoutTestController::hasSpellingMarker(const CppArgumentList& arguments, CppVariant* result) +{ + if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber()) + return; + result->set(m_shell->webView()->mainFrame()->selectionStartHasSpellingMarkerFor(arguments[0].toInt32(), arguments[1].toInt32())); +} diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h index 8467097..ae1a7a2 100644 --- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h +++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h @@ -43,8 +43,8 @@ #include "CppBoundClass.h" #include "Task.h" -#include "public/WebString.h" -#include "public/WebURL.h" +#include "WebString.h" +#include "WebURL.h" #include <wtf/Deque.h> #include <wtf/OwnPtr.h> @@ -325,7 +325,10 @@ public: // Speech input related functions. void setMockSpeechInputResult(const CppArgumentList&, CppVariant*); + void layerTreeAsText(const CppArgumentList& args, CppVariant* result); + void markerTextForListItem(const CppArgumentList&, CppVariant*); + void hasSpellingMarker(const CppArgumentList&, CppVariant*); public: // The following methods are not exposed to JavaScript. diff --git a/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp b/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp index 0bf3802..bf39f60 100644 --- a/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp +++ b/WebKitTools/DumpRenderTree/chromium/MockSpellCheck.cpp @@ -31,12 +31,11 @@ #include "config.h" #include "MockSpellCheck.h" +#include "WebString.h" #include <wtf/ASCIICType.h> #include <wtf/Assertions.h> #include <wtf/text/WTFString.h> -#include "public/WebString.h" - using namespace WebKit; MockSpellCheck::MockSpellCheck() diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp index 7d4cbe3..7e7053b 100644 --- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp +++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.cpp @@ -31,14 +31,14 @@ #include "config.h" #include "NotificationPresenter.h" +#include "WebKit.h" +#include "WebKitClient.h" +#include "WebNotification.h" +#include "WebNotificationPermissionCallback.h" +#include "WebSecurityOrigin.h" +#include "WebString.h" +#include "WebURL.h" #include "googleurl/src/gurl.h" -#include "public/WebKit.h" -#include "public/WebKitClient.h" -#include "public/WebNotification.h" -#include "public/WebNotificationPermissionCallback.h" -#include "public/WebSecurityOrigin.h" -#include "public/WebString.h" -#include "public/WebURL.h" #include <wtf/text/CString.h> #include <wtf/text/WTFString.h> diff --git a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h index 896f345..689a908 100644 --- a/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h +++ b/WebKitTools/DumpRenderTree/chromium/NotificationPresenter.h @@ -31,8 +31,8 @@ #ifndef NotificationPresenter_h #define NotificationPresenter_h -#include "public/WebNotification.h" -#include "public/WebNotificationPresenter.h" +#include "WebNotification.h" +#include "WebNotificationPresenter.h" #include <wtf/HashMap.h> #include <wtf/HashSet.h> #include <wtf/text/StringHash.h> diff --git a/WebKitTools/DumpRenderTree/chromium/PlainTextController.cpp b/WebKitTools/DumpRenderTree/chromium/PlainTextController.cpp index 6e6cf11..c8bdabd 100644 --- a/WebKitTools/DumpRenderTree/chromium/PlainTextController.cpp +++ b/WebKitTools/DumpRenderTree/chromium/PlainTextController.cpp @@ -33,9 +33,9 @@ #include "PlainTextController.h" #include "TestShell.h" -#include "public/WebBindings.h" -#include "public/WebRange.h" -#include "public/WebString.h" +#include "WebBindings.h" +#include "WebRange.h" +#include "WebString.h" using namespace WebKit; diff --git a/WebKitTools/DumpRenderTree/chromium/Task.cpp b/WebKitTools/DumpRenderTree/chromium/Task.cpp index 3f90d8c..5719bac 100644 --- a/WebKitTools/DumpRenderTree/chromium/Task.cpp +++ b/WebKitTools/DumpRenderTree/chromium/Task.cpp @@ -31,8 +31,8 @@ #include "config.h" #include "Task.h" -#include "public/WebKit.h" -#include "public/WebKitClient.h" +#include "WebKit.h" +#include "WebKitClient.h" #include "webkit/support/webkit_support.h" WebTask::WebTask(TaskList* list): m_taskList(list) { m_taskList->registerTask(this); } diff --git a/WebKitTools/DumpRenderTree/chromium/TestNavigationController.h b/WebKitTools/DumpRenderTree/chromium/TestNavigationController.h index d75c3bf..b671489 100644 --- a/WebKitTools/DumpRenderTree/chromium/TestNavigationController.h +++ b/WebKitTools/DumpRenderTree/chromium/TestNavigationController.h @@ -31,10 +31,10 @@ #ifndef TestNavigationController_h #define TestNavigationController_h -#include "public/WebDataSource.h" -#include "public/WebHistoryItem.h" -#include "public/WebString.h" -#include "public/WebURL.h" +#include "WebDataSource.h" +#include "WebHistoryItem.h" +#include "WebString.h" +#include "WebURL.h" #include "webkit/support/webkit_support.h" #include <string> #include <wtf/RefCounted.h> diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h new file mode 100644 index 0000000..49f72a6 --- /dev/null +++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h @@ -0,0 +1 @@ +#include "bindings/npapi.h" diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h new file mode 100644 index 0000000..61588ca --- /dev/null +++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h @@ -0,0 +1,7 @@ +#include "bindings/npfunctions.h" + +// Non-standard event types can be passed to HandleEvent. +// npapi.h that comes with WebKit.framework adds these events. +#define getFocusEvent (osEvt + 16) +#define loseFocusEvent (osEvt + 17) +#define adjustCursorEvent (osEvt + 18) diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h new file mode 100644 index 0000000..597d4ad --- /dev/null +++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h @@ -0,0 +1 @@ +#include "bindings/npruntime.h" diff --git a/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist new file mode 100644 index 0000000..663f058 --- /dev/null +++ b/WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDevelopmentRegion</key> + <string>English</string> + <key>CFBundleExecutable</key> + <string>WebKitTestNetscapePlugIn</string> + <key>CFBundleGetInfoString</key> + <string>420+, Copyright 2006-2009 Apple Inc.</string> + <key>CFBundleIconFile</key> + <string></string> + <key>CFBundleIdentifier</key> + <string>com.apple.testnetscapeplugin</string> + <key>CFBundleInfoDictionaryVersion</key> + <string>6.0</string> + <key>CFBundlePackageType</key> + <string>BRPL</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>CFPlugInDynamicRegisterFunction</key> + <string></string> + <key>CFPlugInDynamicRegistration</key> + <string>NO</string> + <key>CFPlugInFactories</key> + <dict> + <key>00000000-0000-0000-0000-000000000000</key> + <string>MyFactoryFunction</string> + </dict> + <key>CFPlugInTypes</key> + <dict> + <key>00000000-0000-0000-0000-000000000000</key> + <array> + <string>00000000-0000-0000-0000-000000000000</string> + </array> + </dict> + <key>CFPlugInUnloadFunction</key> + <string></string> + <key>WebPluginDescription</key> + <string>Simple Netscape plug-in that handles test content for WebKit</string> + <key>WebPluginMIMETypes</key> + <dict> + <key>application/x-webkit-test-netscape</key> + <dict> + <key>WebPluginExtensions</key> + <array> + <string>testnetscape</string> + </array> + <key>WebPluginTypeDescription</key> + <string>test netscape content</string> + </dict> + </dict> + <key>WebPluginName</key> + <string>WebKit Test PlugIn</string> +</dict> +</plist> diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp index 1a99b7d..0b27c78 100644 --- a/WebKitTools/DumpRenderTree/chromium/TestShell.cpp +++ b/WebKitTools/DumpRenderTree/chromium/TestShell.cpp @@ -34,22 +34,22 @@ #include "DRTDevToolsAgent.h" #include "DRTDevToolsClient.h" #include "LayoutTestController.h" +#include "WebDataSource.h" +#include "WebDocument.h" +#include "WebElement.h" +#include "WebFrame.h" +#include "WebHistoryItem.h" +#include "WebKit.h" +#include "WebRuntimeFeatures.h" +#include "WebScriptController.h" +#include "WebSettings.h" +#include "WebSize.h" +#include "WebSpeechInputControllerMock.h" +#include "WebString.h" +#include "WebURLRequest.h" +#include "WebURLResponse.h" +#include "WebView.h" #include "WebViewHost.h" -#include "public/WebDataSource.h" -#include "public/WebDocument.h" -#include "public/WebElement.h" -#include "public/WebFrame.h" -#include "public/WebHistoryItem.h" -#include "public/WebKit.h" -#include "public/WebRuntimeFeatures.h" -#include "public/WebScriptController.h" -#include "public/WebSettings.h" -#include "public/WebSize.h" -#include "public/WebSpeechInputControllerMock.h" -#include "public/WebString.h" -#include "public/WebURLRequest.h" -#include "public/WebURLResponse.h" -#include "public/WebView.h" #include "skia/ext/bitmap_platform_device.h" #include "skia/ext/platform_canvas.h" #include "webkit/support/webkit_support.h" @@ -82,9 +82,10 @@ TestShell::TestShell(bool testShellMode) , m_testIsPreparing(false) , m_focusedWidget(0) , m_testShellMode(testShellMode) + , m_devTools(0) , m_allowExternalPages(false) + , m_acceleratedCompositingEnabled(false) , m_accelerated2dCanvasEnabled(false) - , m_devTools(0) { WebRuntimeFeatures::enableGeolocation(true); WebRuntimeFeatures::enableIndexedDatabase(true); @@ -156,6 +157,7 @@ void TestShell::closeDevTools() void TestShell::resetWebSettings(WebView& webView) { m_prefs.reset(); + m_prefs.acceleratedCompositingEnabled = m_acceleratedCompositingEnabled; m_prefs.accelerated2dCanvasEnabled = m_accelerated2dCanvasEnabled; m_prefs.applyTo(&webView); } diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.h b/WebKitTools/DumpRenderTree/chromium/TestShell.h index 4d022dc..a15d9ec 100644 --- a/WebKitTools/DumpRenderTree/chromium/TestShell.h +++ b/WebKitTools/DumpRenderTree/chromium/TestShell.h @@ -123,6 +123,7 @@ public: bool allowExternalPages() const { return m_allowExternalPages; } void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; } + void setAcceleratedCompositingEnabled(bool enabled) { m_acceleratedCompositingEnabled = enabled; } void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; } #if defined(OS_WIN) @@ -178,6 +179,7 @@ private: TestParams m_params; int m_timeout; // timeout value in millisecond bool m_allowExternalPages; + bool m_acceleratedCompositingEnabled; bool m_accelerated2dCanvasEnabled; WebPreferences m_prefs; diff --git a/WebKitTools/DumpRenderTree/chromium/TestWebWorker.h b/WebKitTools/DumpRenderTree/chromium/TestWebWorker.h index 9470804..a29e45f 100644 --- a/WebKitTools/DumpRenderTree/chromium/TestWebWorker.h +++ b/WebKitTools/DumpRenderTree/chromium/TestWebWorker.h @@ -31,9 +31,9 @@ #ifndef TestWebWorker_h #define TestWebWorker_h -#include "public/WebMessagePortChannel.h" -#include "public/WebWorker.h" -#include "public/WebWorkerClient.h" +#include "WebMessagePortChannel.h" +#include "WebWorker.h" +#include "WebWorkerClient.h" #include <wtf/RefCounted.h> namespace WebKit { diff --git a/WebKitTools/DumpRenderTree/chromium/TextInputController.cpp b/WebKitTools/DumpRenderTree/chromium/TextInputController.cpp index 4f06874..7af4e9f 100644 --- a/WebKitTools/DumpRenderTree/chromium/TextInputController.cpp +++ b/WebKitTools/DumpRenderTree/chromium/TextInputController.cpp @@ -32,11 +32,11 @@ #include "TextInputController.h" #include "TestShell.h" -#include "public/WebBindings.h" -#include "public/WebFrame.h" -#include "public/WebRange.h" -#include "public/WebString.h" -#include "public/WebView.h" +#include "WebBindings.h" +#include "WebFrame.h" +#include "WebRange.h" +#include "WebString.h" +#include "WebView.h" #include <wtf/StringExtras.h> #include <string> @@ -58,7 +58,6 @@ TextInputController::TextInputController(TestShell* shell) bindMethod("doCommand", &TextInputController::doCommand); bindMethod("firstRectForCharacterRange", &TextInputController::firstRectForCharacterRange); bindMethod("hasMarkedText", &TextInputController::hasMarkedText); - bindMethod("hasSpellingMarker", &TextInputController::hasSpellingMarker); bindMethod("insertText", &TextInputController::insertText); bindMethod("makeAttributedString", &TextInputController::makeAttributedString); bindMethod("markedRange", &TextInputController::markedRange); @@ -233,14 +232,3 @@ void TextInputController::makeAttributedString(const CppArgumentList&, CppVarian // FIXME: Implement this. result->setNull(); } - -void TextInputController::hasSpellingMarker(const CppArgumentList& arguments, CppVariant* result) -{ - if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber()) - return; - WebFrame* mainFrame = getMainFrame(); - if (!mainFrame) - return; - // Returns as a number for a compatibility reason. - result->set(mainFrame->selectionStartHasSpellingMarkerFor(arguments[0].toInt32(), arguments[1].toInt32()) ? 1 : 0); -} diff --git a/WebKitTools/DumpRenderTree/chromium/TextInputController.h b/WebKitTools/DumpRenderTree/chromium/TextInputController.h index ddacefe..9896be5 100644 --- a/WebKitTools/DumpRenderTree/chromium/TextInputController.h +++ b/WebKitTools/DumpRenderTree/chromium/TextInputController.h @@ -61,7 +61,6 @@ public: void characterIndexForPoint(const CppArgumentList&, CppVariant*); void validAttributesForMarkedText(const CppArgumentList&, CppVariant*); void makeAttributedString(const CppArgumentList&, CppVariant*); - void hasSpellingMarker(const CppArgumentList&, CppVariant*); private: // Returns the test shell's main WebFrame. diff --git a/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp b/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp index 35247ef..948b448 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp +++ b/WebKitTools/DumpRenderTree/chromium/WebPreferences.cpp @@ -31,7 +31,7 @@ #include "config.h" #include "WebPreferences.h" -#include "public/WebView.h" +#include "WebView.h" using namespace WebKit; @@ -102,6 +102,7 @@ void WebPreferences::reset() tabsToLinks = false; hyperlinkAuditingEnabled = false; + acceleratedCompositingEnabled = false; accelerated2dCanvasEnabled = false; } @@ -159,10 +160,7 @@ void WebPreferences::applyTo(WebView* webView) settings->setTextDirectionSubmenuInclusionBehaviorNeverIncluded(); settings->setUsesEncodingDetector(false); settings->setImagesEnabled(true); - - // FIXME: crbug.com/51879 - settings->setAcceleratedCompositingEnabled(false); - + settings->setAcceleratedCompositingEnabled(acceleratedCompositingEnabled); settings->setAccelerated2dCanvasEnabled(accelerated2dCanvasEnabled); } diff --git a/WebKitTools/DumpRenderTree/chromium/WebPreferences.h b/WebKitTools/DumpRenderTree/chromium/WebPreferences.h index c0ea70f..46877c0 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebPreferences.h +++ b/WebKitTools/DumpRenderTree/chromium/WebPreferences.h @@ -31,9 +31,9 @@ #ifndef WebPreferences_h #define WebPerferences_h -#include "public/WebSettings.h" -#include "public/WebString.h" -#include "public/WebURL.h" +#include "WebSettings.h" +#include "WebString.h" +#include "WebURL.h" namespace WebKit { class WebView; @@ -77,6 +77,7 @@ struct WebPreferences { bool tabsToLinks; bool hyperlinkAuditingEnabled; bool caretBrowsingEnabled; + bool acceleratedCompositingEnabled; bool accelerated2dCanvasEnabled; WebPreferences() { reset(); } diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp index ef6c26a..6a8af81 100755 --- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp +++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.cpp @@ -31,8 +31,8 @@ #include "config.h" #include "WebThemeEngineDRT.h" +#include "WebRect.h" #include "WebThemeControlDRT.h" -#include "public/WebRect.h" #include "third_party/skia/include/core/SkRect.h" // Although all this code is generic, we include these headers diff --git a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h index c731540..e50886b 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h +++ b/WebKitTools/DumpRenderTree/chromium/WebThemeEngineDRT.h @@ -47,7 +47,7 @@ #ifndef WebThemeEngineDRT_h #define WebThemeEngineDRT_h -#include "public/WebThemeEngine.h" +#include "win/WebThemeEngine.h" #include <wtf/Noncopyable.h> class WebThemeEngineDRT : public WebKit::WebThemeEngine, public Noncopyable { diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp index 9a086e4..ab8dbf0 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp @@ -35,25 +35,25 @@ #include "TestNavigationController.h" #include "TestShell.h" #include "TestWebWorker.h" -#include "public/WebCString.h" -#include "public/WebConsoleMessage.h" -#include "public/WebContextMenuData.h" -#include "public/WebDataSource.h" -#include "public/WebDragData.h" -#include "public/WebElement.h" -#include "public/WebFrame.h" -#include "public/WebGeolocationServiceMock.h" -#include "public/WebHistoryItem.h" -#include "public/WebNode.h" -#include "public/WebRange.h" -#include "public/WebRect.h" -#include "public/WebScreenInfo.h" -#include "public/WebSize.h" -#include "public/WebStorageNamespace.h" -#include "public/WebURLRequest.h" -#include "public/WebURLResponse.h" -#include "public/WebView.h" -#include "public/WebWindowFeatures.h" +#include "WebCString.h" +#include "WebConsoleMessage.h" +#include "WebContextMenuData.h" +#include "WebDataSource.h" +#include "WebDragData.h" +#include "WebElement.h" +#include "WebFrame.h" +#include "WebGeolocationServiceMock.h" +#include "WebHistoryItem.h" +#include "WebNode.h" +#include "WebRange.h" +#include "WebRect.h" +#include "WebScreenInfo.h" +#include "WebSize.h" +#include "WebStorageNamespace.h" +#include "WebURLRequest.h" +#include "WebURLResponse.h" +#include "WebView.h" +#include "WebWindowFeatures.h" #include "skia/ext/platform_canvas.h" #include "webkit/support/webkit_support.h" #include <wtf/Assertions.h> @@ -124,7 +124,7 @@ static string descriptionSuitableForTestResult(const string& url) // dragging a file. static void addDRTFakeFileToDataObject(WebDragData* dragData) { - dragData->appendToFileNames(WebString::fromUTF8("DRTFakeFile")); + dragData->appendToFilenames(WebString::fromUTF8("DRTFakeFile")); } // Get a debugging string from a WebNavigationType. @@ -485,13 +485,11 @@ int WebViewHost::historyForwardListCount() return navigationController()->entryCount() - currentIndex - 1; } -void WebViewHost::focusAccessibilityObject(const WebAccessibilityObject& object) -{ - m_shell->accessibilityController()->setFocusedElement(object); -} - void WebViewHost::postAccessibilityNotification(const WebAccessibilityObject& obj, WebAccessibilityNotification notification) { + if (notification == WebAccessibilityNotificationFocusedUIElementChanged) + m_shell->accessibilityController()->setFocusedElement(obj); + if (m_shell->accessibilityController()->shouldDumpAccessibilityNotifications()) { printf("AccessibilityNotification - "); @@ -541,6 +539,8 @@ void WebViewHost::postAccessibilityNotification(const WebAccessibilityObject& ob case WebAccessibilityNotificationRowExpanded: printf("RowExpanded"); break; + default: + break; } WebKit::WebNode node = obj.node(); @@ -559,12 +559,14 @@ WebNotificationPresenter* WebViewHost::notificationPresenter() return m_shell->notificationPresenter(); } +#if !ENABLE(CLIENT_BASED_GEOLOCATION) WebKit::WebGeolocationService* WebViewHost::geolocationService() { if (!m_geolocationServiceMock.get()) m_geolocationServiceMock.set(WebGeolocationServiceMock::createWebGeolocationServiceMock()); return m_geolocationServiceMock.get(); } +#endif WebSpeechInputController* WebViewHost::speechInputController(WebKit::WebSpeechInputListener* listener) { @@ -592,6 +594,13 @@ void WebViewHost::didScrollRect(int, int, const WebRect& clipRect) didInvalidateRect(clipRect); } +void WebViewHost::scheduleComposite() +{ + WebSize widgetSize = webWidget()->size(); + WebRect clientRect(0, 0, widgetSize.width, widgetSize.height); + didInvalidateRect(clientRect); +} + void WebViewHost::didFocus() { m_shell->setFocus(webWidget(), true); @@ -628,6 +637,10 @@ void WebViewHost::closeWidgetSoon() { m_hasWindow = false; m_shell->closeWindow(this); + if (m_inModalLoop) { + m_inModalLoop = false; + webkit_support::QuitMessageLoop(); + } } void WebViewHost::didChangeCursor(const WebCursorInfo& cursorInfo) @@ -670,7 +683,11 @@ WebRect WebViewHost::windowResizerRect() void WebViewHost::runModal() { - // FIXME: Should we implement this in DRT? + bool oldState = webkit_support::MessageLoopNestableTasksAllowed(); + webkit_support::MessageLoopSetNestableTasksAllowed(true); + m_inModalLoop = true; + webkit_support::RunMessageLoop(); + webkit_support::MessageLoopSetNestableTasksAllowed(oldState); } // WebFrameClient ------------------------------------------------------------ @@ -1041,10 +1058,12 @@ WebViewHost::WebViewHost(TestShell* shell) , m_policyDelegateIsPermissive(false) , m_policyDelegateShouldNotifyDone(false) , m_shell(shell) + , m_webWidget(0) , m_topLoadingFrame(0) - , m_hasWindow(false) , m_pageId(-1) , m_lastPageIdUpdated(-1) + , m_hasWindow(false) + , m_inModalLoop(false) , m_smartInsertDeleteEnabled(true) #if OS(WINDOWS) , m_selectTrailingWhitespaceEnabled(true) @@ -1054,7 +1073,6 @@ WebViewHost::WebViewHost(TestShell* shell) , m_blocksRedirects(false) , m_requestReturnNull(false) , m_isPainting(false) - , m_webWidget(0) { m_navigationController.set(new TestNavigationController(this)); } diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h index bbb132d..429d3ab 100644 --- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h +++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h @@ -33,10 +33,10 @@ #include "MockSpellCheck.h" #include "TestNavigationController.h" -#include "public/WebAccessibilityNotification.h" -#include "public/WebCursorInfo.h" -#include "public/WebFrameClient.h" -#include "public/WebViewClient.h" +#include "WebAccessibilityNotification.h" +#include "WebCursorInfo.h" +#include "WebFrameClient.h" +#include "WebViewClient.h" #include <wtf/HashMap.h> #include <wtf/HashSet.h> #include <wtf/Vector.h> @@ -127,16 +127,18 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient, virtual void navigateBackForwardSoon(int offset); virtual int historyBackListCount(); virtual int historyForwardListCount(); - virtual void focusAccessibilityObject(const WebKit::WebAccessibilityObject&); virtual void postAccessibilityNotification(const WebKit::WebAccessibilityObject&, WebKit::WebAccessibilityNotification); virtual WebKit::WebNotificationPresenter* notificationPresenter(); +#if !ENABLE(CLIENT_BASED_GEOLOCATION) virtual WebKit::WebGeolocationService* geolocationService(); +#endif virtual WebKit::WebSpeechInputController* speechInputController(WebKit::WebSpeechInputListener*); virtual WebKit::WebDeviceOrientationClient* deviceOrientationClient(); // WebKit::WebWidgetClient virtual void didInvalidateRect(const WebKit::WebRect&); virtual void didScrollRect(int dx, int dy, const WebKit::WebRect&); + virtual void scheduleComposite(); virtual void didFocus(); virtual void didBlur(); virtual void didChangeCursor(const WebKit::WebCursorInfo&); @@ -257,6 +259,7 @@ private: WebKit::WebCursorInfo m_currentCursor; bool m_hasWindow; + bool m_inModalLoop; WebKit::WebRect m_windowRect; // true if we want to enable smart insert/delete. @@ -286,8 +289,10 @@ private: WebKit::WebRect m_paintRect; bool m_isPainting; +#if !ENABLE(CLIENT_BASED_GEOLOCATION) // Geolocation OwnPtr<WebKit::WebGeolocationServiceMock> m_geolocationServiceMock; +#endif OwnPtr<TestNavigationController*> m_navigationController; }; |