summaryrefslogtreecommitdiff
path: root/Tools/DumpRenderTree/chromium
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-16 14:56:46 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-16 14:57:30 +0200
commitb297e0fa5c217c9467033b7c8b46891a52870120 (patch)
tree43fc14689295e9e64f2719d05aad94e3049f6cd7 /Tools/DumpRenderTree/chromium
parent69d517dbfa69903d8593cc1737f0474b21e3251e (diff)
downloadqtwebkit-b297e0fa5c217c9467033b7c8b46891a52870120.tar.gz
Revert "Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)"
This reverts commit 5466563f4b5b6b86523e3f89bb7f77e5b5270c78. Caused OOM issues on some CI machines :(
Diffstat (limited to 'Tools/DumpRenderTree/chromium')
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.cpp6
-rw-r--r--Tools/DumpRenderTree/chromium/DRTTestRunner.h2
-rw-r--r--Tools/DumpRenderTree/chromium/DumpRenderTree.cpp5
-rw-r--r--Tools/DumpRenderTree/chromium/MockConstraints.cpp79
-rw-r--r--Tools/DumpRenderTree/chromium/MockConstraints.h49
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp93
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h3
-rw-r--r--Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp2
-rw-r--r--Tools/DumpRenderTree/chromium/NotificationPresenter.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp42
-rw-r--r--Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp14
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.cpp7
-rw-r--r--Tools/DumpRenderTree/chromium/TestShell.h3
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.cpp82
-rw-r--r--Tools/DumpRenderTree/chromium/TestWebPlugin.h8
-rw-r--r--Tools/DumpRenderTree/chromium/WebPreferences.cpp4
-rw-r--r--Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp57
-rw-r--r--Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h22
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.cpp16
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHost.h10
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp24
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h9
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp58
-rw-r--r--Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h54
-rw-r--r--Tools/DumpRenderTree/chromium/android_fallback_fonts.xml29
25 files changed, 102 insertions, 580 deletions
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
index 8aee7c5b2..f4f3aed22 100644
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
+++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
@@ -166,6 +166,7 @@ DRTTestRunner::DRTTestRunner(TestShell* shell)
bindMethod("findString", &DRTTestRunner::findString);
bindMethod("isCommandEnabled", &DRTTestRunner::isCommandEnabled);
bindMethod("hasCustomPageSizeStyle", &DRTTestRunner::hasCustomPageSizeStyle);
+ bindMethod("layerTreeAsText", &DRTTestRunner::layerTreeAsText);
bindMethod("loseCompositorContext", &DRTTestRunner::loseCompositorContext);
bindMethod("markerTextForListItem", &DRTTestRunner::markerTextForListItem);
bindMethod("notifyDone", &DRTTestRunner::notifyDone);
@@ -1903,6 +1904,11 @@ void DRTTestRunner::startSpeechInput(const CppArgumentList& arguments, CppVarian
input->startSpeechInput();
}
+void DRTTestRunner::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
+{
+ result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
+}
+
void DRTTestRunner::loseCompositorContext(const CppArgumentList& args, CppVariant*)
{
int numTimes;
diff --git a/Tools/DumpRenderTree/chromium/DRTTestRunner.h b/Tools/DumpRenderTree/chromium/DRTTestRunner.h
index 3041b86a7..55940acd1 100644
--- a/Tools/DumpRenderTree/chromium/DRTTestRunner.h
+++ b/Tools/DumpRenderTree/chromium/DRTTestRunner.h
@@ -355,6 +355,8 @@ public:
#endif
void startSpeechInput(const CppArgumentList&, CppVariant*);
+ void layerTreeAsText(const CppArgumentList& args, CppVariant* result);
+
void loseCompositorContext(const CppArgumentList& args, CppVariant* result);
void markerTextForListItem(const CppArgumentList&, CppVariant*);
diff --git a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
index 30ce28851..0949aa7a6 100644
--- a/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
+++ b/Tools/DumpRenderTree/chromium/DumpRenderTree.cpp
@@ -55,7 +55,6 @@ static const char optionStartupDialog[] = "--testshell-startup-dialog";
static const char optionCheckLayoutTestSystemDeps[] = "--check-layout-test-sys-deps";
static const char optionHardwareAcceleratedGL[] = "--enable-hardware-gpu";
-static const char optionEnableSoftwareCompositing[] = "--enable-software-compositing";
static const char optionEnableThreadedCompositing[] = "--enable-threaded-compositing";
static const char optionForceCompositingMode[] = "--force-compositing-mode";
static const char optionEnableAccelerated2DCanvas[] = "--enable-accelerated-2d-canvas";
@@ -126,7 +125,6 @@ int main(int argc, char* argv[])
bool allowExternalPages = false;
bool startupDialog = false;
bool acceleratedCompositingForVideoEnabled = false;
- bool softwareCompositingEnabled = false;
bool threadedCompositingEnabled = false;
bool forceCompositingMode = false;
bool accelerated2DCanvasEnabled = false;
@@ -161,8 +159,6 @@ int main(int argc, char* argv[])
hardwareAcceleratedGL = true;
else if (argument == optionEnableAcceleratedCompositingForVideo)
acceleratedCompositingForVideoEnabled = true;
- else if (argument == optionEnableSoftwareCompositing)
- softwareCompositingEnabled = true;
else if (argument == optionEnableThreadedCompositing)
threadedCompositingEnabled = true;
else if (argument == optionForceCompositingMode)
@@ -215,7 +211,6 @@ int main(int argc, char* argv[])
TestShell shell;
shell.setAllowExternalPages(allowExternalPages);
shell.setAcceleratedCompositingForVideoEnabled(acceleratedCompositingForVideoEnabled);
- shell.setSoftwareCompositingEnabled(softwareCompositingEnabled);
shell.setThreadedCompositingEnabled(threadedCompositingEnabled);
shell.setForceCompositingMode(forceCompositingMode);
shell.setAccelerated2dCanvasEnabled(accelerated2DCanvasEnabled);
diff --git a/Tools/DumpRenderTree/chromium/MockConstraints.cpp b/Tools/DumpRenderTree/chromium/MockConstraints.cpp
deleted file mode 100644
index a4f15842e..000000000
--- a/Tools/DumpRenderTree/chromium/MockConstraints.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#if ENABLE(MEDIA_STREAM)
-
-#include "MockConstraints.h"
-
-#include <public/WebMediaConstraints.h>
-
-using namespace WebKit;
-
-namespace MockConstraints {
-
-static bool isSupported(const WebString& constraint)
-{
- return constraint == "valid_and_supported_1" || constraint == "valid_and_supported_2";
-}
-
-static bool isValid(const WebString& constraint)
-{
- return isSupported(constraint) || constraint == "valid_but_unsupported_1" || constraint == "valid_but_unsupported_2";
-}
-
-bool verifyConstraints(const WebMediaConstraints& constraints)
-{
- WebVector<WebMediaConstraint> mandatoryConstraints;
- constraints.getMandatoryConstraints(mandatoryConstraints);
- if (mandatoryConstraints.size()) {
- for (size_t i = 0; i < mandatoryConstraints.size(); ++i) {
- const WebMediaConstraint& curr = mandatoryConstraints[i];
- if (!isSupported(curr.m_name) || curr.m_value != "1")
- return false;
- }
- }
-
- WebVector<WebMediaConstraint> optionalConstraints;
- constraints.getOptionalConstraints(optionalConstraints);
- if (optionalConstraints.size()) {
- for (size_t i = 0; i < optionalConstraints.size(); ++i) {
- const WebMediaConstraint& curr = optionalConstraints[i];
- if (!isValid(curr.m_name) || curr.m_value != "0")
- return false;
- }
- }
-
- return true;
-}
-
-} // namespace MockConstraints
-
-#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockConstraints.h b/Tools/DumpRenderTree/chromium/MockConstraints.h
deleted file mode 100644
index 6bf0da9b1..000000000
--- a/Tools/DumpRenderTree/chromium/MockConstraints.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef MockConstraints_h
-#define MockConstraints_h
-
-#if ENABLE(MEDIA_STREAM)
-
-namespace WebKit {
-class WebMediaConstraints;
-}
-
-namespace MockConstraints {
-
-bool verifyConstraints(const WebKit::WebMediaConstraints&);
-
-} // namespace MockConstraints
-
-#endif // ENABLE(MEDIA_STREAM)
-
-#endif // MockConstraints_h
-
diff --git a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
index 09f5c5d5e..b2d50feb3 100644
--- a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
+++ b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.cpp
@@ -33,23 +33,19 @@
#include "MockWebRTCPeerConnectionHandler.h"
-#include "MockConstraints.h"
#include <public/WebMediaConstraints.h>
#include <public/WebRTCPeerConnectionHandlerClient.h>
#include <public/WebRTCSessionDescription.h>
#include <public/WebRTCSessionDescriptionRequest.h>
-#include <public/WebRTCStatsRequest.h>
-#include <public/WebRTCStatsResponse.h>
#include <public/WebRTCVoidRequest.h>
#include <public/WebString.h>
#include <public/WebVector.h>
-#include <wtf/DateMath.h>
using namespace WebKit;
class RTCSessionDescriptionRequestSuccededTask : public MethodTask<MockWebRTCPeerConnectionHandler> {
public:
- RTCSessionDescriptionRequestSuccededTask(MockWebRTCPeerConnectionHandler* object, const WebRTCSessionDescriptionRequest& request, const WebRTCSessionDescription& result)
+ RTCSessionDescriptionRequestSuccededTask(MockWebRTCPeerConnectionHandler* object, const WebKit::WebRTCSessionDescriptionRequest& request, const WebKit::WebRTCSessionDescription& result)
: MethodTask<MockWebRTCPeerConnectionHandler>(object)
, m_request(request)
, m_result(result)
@@ -62,13 +58,13 @@ public:
}
private:
- WebRTCSessionDescriptionRequest m_request;
- WebRTCSessionDescription m_result;
+ WebKit::WebRTCSessionDescriptionRequest m_request;
+ WebKit::WebRTCSessionDescription m_result;
};
class RTCSessionDescriptionRequestFailedTask : public MethodTask<MockWebRTCPeerConnectionHandler> {
public:
- RTCSessionDescriptionRequestFailedTask(MockWebRTCPeerConnectionHandler* object, const WebRTCSessionDescriptionRequest& request)
+ RTCSessionDescriptionRequestFailedTask(MockWebRTCPeerConnectionHandler* object, const WebKit::WebRTCSessionDescriptionRequest& request)
: MethodTask<MockWebRTCPeerConnectionHandler>(object)
, m_request(request)
{
@@ -80,31 +76,12 @@ public:
}
private:
- WebRTCSessionDescriptionRequest m_request;
-};
-
-class RTCStatsRequestSucceededTask : public MethodTask<MockWebRTCPeerConnectionHandler> {
-public:
- RTCStatsRequestSucceededTask(MockWebRTCPeerConnectionHandler* object, const WebKit::WebRTCStatsRequest& request, const WebKit::WebRTCStatsResponse& response)
- : MethodTask<MockWebRTCPeerConnectionHandler>(object)
- , m_request(request)
- , m_response(response)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- m_request.requestSucceeded(m_response);
- }
-
-private:
- WebKit::WebRTCStatsRequest m_request;
- WebKit::WebRTCStatsResponse m_response;
+ WebKit::WebRTCSessionDescriptionRequest m_request;
};
class RTCVoidRequestTask : public MethodTask<MockWebRTCPeerConnectionHandler> {
public:
- RTCVoidRequestTask(MockWebRTCPeerConnectionHandler* object, const WebRTCVoidRequest& request, bool succeeded)
+ RTCVoidRequestTask(MockWebRTCPeerConnectionHandler* object, const WebKit::WebRTCVoidRequest& request, bool succeeded)
: MethodTask<MockWebRTCPeerConnectionHandler>(object)
, m_request(request)
, m_succeeded(succeeded)
@@ -120,7 +97,7 @@ public:
}
private:
- WebRTCVoidRequest m_request;
+ WebKit::WebRTCVoidRequest m_request;
bool m_succeeded;
};
@@ -128,13 +105,48 @@ private:
MockWebRTCPeerConnectionHandler::MockWebRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
: m_client(client)
- , m_streamCount(0)
{
}
+static bool isSupportedConstraint(const WebString& constraint)
+{
+ return constraint == "valid_and_supported_1" || constraint == "valid_and_supported_2";
+}
+
+static bool isValidConstraint(const WebString& constraint)
+{
+ return isSupportedConstraint(constraint) || constraint == "valid_but_unsupported_1" || constraint == "valid_but_unsupported_2";
+}
+
bool MockWebRTCPeerConnectionHandler::initialize(const WebRTCConfiguration&, const WebMediaConstraints& constraints)
{
- return MockConstraints::verifyConstraints(constraints);
+ WebVector<WebString> mandatoryConstraintNames;
+ constraints.getMandatoryConstraintNames(mandatoryConstraintNames);
+ if (mandatoryConstraintNames.size()) {
+ for (size_t i = 0; i < mandatoryConstraintNames.size(); ++i) {
+ if (!isSupportedConstraint(mandatoryConstraintNames[i]))
+ return false;
+ WebString value;
+ constraints.getMandatoryConstraintValue(mandatoryConstraintNames[i], value);
+ if (value != "1")
+ return false;
+ }
+ }
+
+ WebVector<WebString> optionalConstraintNames;
+ constraints.getOptionalConstraintNames(optionalConstraintNames);
+ if (optionalConstraintNames.size()) {
+ for (size_t i = 0; i < optionalConstraintNames.size(); ++i) {
+ if (!isValidConstraint(optionalConstraintNames[i]))
+ return false;
+ WebString value;
+ constraints.getOptionalConstraintValue(optionalConstraintNames[i], value);
+ if (value != "0")
+ return false;
+ }
+ }
+
+ return true;
}
void MockWebRTCPeerConnectionHandler::createOffer(const WebRTCSessionDescriptionRequest& request, const WebMediaConstraints& constraints)
@@ -200,7 +212,6 @@ bool MockWebRTCPeerConnectionHandler::addICECandidate(const WebRTCICECandidate&
bool MockWebRTCPeerConnectionHandler::addStream(const WebMediaStreamDescriptor& stream, const WebMediaConstraints&)
{
- m_streamCount += 1;
m_client->didAddRemoteStream(stream);
m_client->negotiationNeeded();
return true;
@@ -208,26 +219,10 @@ bool MockWebRTCPeerConnectionHandler::addStream(const WebMediaStreamDescriptor&
void MockWebRTCPeerConnectionHandler::removeStream(const WebMediaStreamDescriptor& stream)
{
- m_streamCount -= 1;
m_client->didRemoveRemoteStream(stream);
m_client->negotiationNeeded();
}
-void MockWebRTCPeerConnectionHandler::getStats(const WebRTCStatsRequest& request)
-{
- WebRTCStatsResponse response = request.createResponse();
- double currentDate = WTF::jsCurrentTime();
- for (int i = 0; i < m_streamCount; ++i) {
- size_t reportIndex = response.addReport();
- response.addElement(reportIndex, true, currentDate);
- response.addStatistic(reportIndex, true, "type", "audio");
- reportIndex = response.addReport();
- response.addElement(reportIndex, true, currentDate);
- response.addStatistic(reportIndex, true, "type", "video");
- }
- postTask(new RTCStatsRequestSucceededTask(this, request, response));
-}
-
void MockWebRTCPeerConnectionHandler::stop()
{
}
diff --git a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h
index 43d087e35..2bf139afa 100644
--- a/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h
+++ b/Tools/DumpRenderTree/chromium/MockWebRTCPeerConnectionHandler.h
@@ -37,7 +37,6 @@
#include <public/WebRTCPeerConnectionHandler.h>
#include <public/WebRTCSessionDescription.h>
#include <public/WebRTCSessionDescriptionRequest.h>
-#include <public/WebRTCStatsRequest.h>
namespace WebKit {
class WebRTCPeerConnectionHandlerClient;
@@ -59,7 +58,6 @@ public:
virtual bool addICECandidate(const WebKit::WebRTCICECandidate&) OVERRIDE;
virtual bool addStream(const WebKit::WebMediaStreamDescriptor&, const WebKit::WebMediaConstraints&) OVERRIDE;
virtual void removeStream(const WebKit::WebMediaStreamDescriptor&) OVERRIDE;
- virtual void getStats(const WebKit::WebRTCStatsRequest&) OVERRIDE;
virtual void stop() OVERRIDE;
// Task related methods
@@ -72,7 +70,6 @@ private:
TaskList m_taskList;
WebKit::WebRTCSessionDescription m_localDescription;
WebKit::WebRTCSessionDescription m_remoteDescription;
- int m_streamCount;
};
#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
index 13c8ff1ec..716222f9a 100644
--- a/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
+++ b/Tools/DumpRenderTree/chromium/MockWebSpeechInputController.cpp
@@ -52,7 +52,7 @@ void MockWebSpeechInputController::addMockRecognitionResult(const WebString& res
String langString = String::fromUTF8(language.utf8().data());
if (!m_recognitionResults.contains(langString))
m_recognitionResults.set(langString, Vector<WebSpeechInputResult>());
- m_recognitionResults.find(langString)->value.append(res);
+ m_recognitionResults.find(langString)->second.append(res);
}
}
diff --git a/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp b/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp
index a21588f74..0c5400f5e 100644
--- a/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp
+++ b/Tools/DumpRenderTree/chromium/NotificationPresenter.cpp
@@ -75,7 +75,7 @@ bool NotificationPresenter::simulateClick(const WebString& title)
if (m_activeNotifications.find(id) == m_activeNotifications.end())
return false;
- const WebNotification& notification = m_activeNotifications.find(id)->value;
+ const WebNotification& notification = m_activeNotifications.find(id)->second;
WebNotification eventTarget(notification);
eventTarget.dispatchClickEvent();
return true;
@@ -89,7 +89,7 @@ bool NotificationPresenter::show(const WebNotification& notification)
WTF::String replaceId(notification.replaceId().data(), notification.replaceId().length());
if (m_replacements.find(replaceId) != m_replacements.end())
printf("REPLACING NOTIFICATION %s\n",
- m_replacements.find(replaceId)->value.utf8().data());
+ m_replacements.find(replaceId)->second.utf8().data());
m_replacements.set(replaceId, WTF::String(identifier.data(), identifier.length()));
}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp b/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
index d60822be8..b795aeb83 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/AccessibilityUIElementChromium.cpp
@@ -221,48 +221,8 @@ static string roleToString(WebAccessibilityRole role)
return result.append("HorizontalRule");
case WebAccessibilityRoleLegend:
return result.append("Legend");
- case WebAccessibilityRoleApplicationAlert:
- return result.append("Alert");
- case WebAccessibilityRoleApplicationAlertDialog:
- return result.append("AlertDialog");
- case WebAccessibilityRoleApplicationDialog:
- return result.append("ApplicationDialog");
- case WebAccessibilityRoleDirectory:
- return result.append("Directory");
- case WebAccessibilityRoleDocumentMath:
- return result.append("Math");
- case WebAccessibilityRoleEditableText:
- return result.append("EditableText");
- case WebAccessibilityRoleFooter:
- return result.append("Footer");
- case WebAccessibilityRoleIgnored:
- return result.append("Ignored");
- case WebAccessibilityRoleListItem:
- return result.append("ListItem");
- case WebAccessibilityRoleMenuListPopup:
- return result.append("MenuListPopup");
- case WebAccessibilityRoleMenuListOption:
- return result.append("MenuListOption");
- case WebAccessibilityRolePresentational:
- return result.append("Presentational");
- case WebAccessibilityRoleSpinButton:
- return result.append("SpinButton");
- case WebAccessibilityRoleSpinButtonPart:
- return result.append("SpinButtonPart");
- case WebAccessibilityRoleTabList:
- return result.append("TabList");
- case WebAccessibilityRoleTabPanel:
- return result.append("TabPanel");
- case WebAccessibilityRoleTab:
- return result.append("Tab");
- case WebAccessibilityRoleTreeRole:
- return result.append("Tree");
- case WebAccessibilityRoleTreeGrid:
- return result.append("TreeGrid");
- case WebAccessibilityRoleTreeItemRole:
- return result.append("TreeItem");
- case WebAccessibilityRoleUnknown:
default:
+ // Also matches WebAccessibilityRoleUnknown.
return result.append("Unknown");
}
}
diff --git a/Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp b/Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp
index 1b29d2b0f..9b4a3b646 100644
--- a/Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp
+++ b/Tools/DumpRenderTree/chromium/TestRunner/CppBoundClass.cpp
@@ -203,10 +203,10 @@ bool CppNPObject::setProperty(NPObject* npObj, NPIdentifier ident, const NPVaria
CppBoundClass::~CppBoundClass()
{
for (MethodList::iterator i = m_methods.begin(); i != m_methods.end(); ++i)
- delete i->value;
+ delete i->second;
for (PropertyList::iterator i = m_properties.begin(); i != m_properties.end(); ++i)
- delete i->value;
+ delete i->second;
// Unregister ourselves if we were bound to a frame.
if (m_boundToFrame)
@@ -237,7 +237,7 @@ bool CppBoundClass::invoke(NPIdentifier ident,
}
callback = m_fallbackCallback.get();
} else
- callback = (*method).value;
+ callback = (*method).second;
// Build a CppArgumentList argument vector from the NPVariants coming in.
CppArgumentList cppArguments(argumentCount);
@@ -260,7 +260,7 @@ bool CppBoundClass::getProperty(NPIdentifier ident, NPVariant* result) const
}
CppVariant cppValue;
- if (!callback->value->getValue(&cppValue))
+ if (!callback->second->getValue(&cppValue))
return false;
cppValue.copyToNPVariant(result);
return true;
@@ -274,7 +274,7 @@ bool CppBoundClass::setProperty(NPIdentifier ident, const NPVariant* value)
CppVariant cppValue;
cppValue.set(*value);
- return (*callback).value->setValue(cppValue);
+ return (*callback).second->setValue(cppValue);
}
void CppBoundClass::bindCallback(const string& name, Callback* callback)
@@ -282,7 +282,7 @@ void CppBoundClass::bindCallback(const string& name, Callback* callback)
NPIdentifier ident = WebBindings::getStringIdentifier(name.c_str());
MethodList::iterator oldCallback = m_methods.find(ident);
if (oldCallback != m_methods.end()) {
- delete oldCallback->value;
+ delete oldCallback->second;
if (!callback) {
m_methods.remove(oldCallback);
return;
@@ -309,7 +309,7 @@ void CppBoundClass::bindProperty(const string& name, PropertyCallback* callback)
NPIdentifier ident = WebBindings::getStringIdentifier(name.c_str());
PropertyList::iterator oldCallback = m_properties.find(ident);
if (oldCallback != m_properties.end()) {
- delete oldCallback->value;
+ delete oldCallback->second;
if (!callback) {
m_properties.remove(oldCallback);
return;
diff --git a/Tools/DumpRenderTree/chromium/TestShell.cpp b/Tools/DumpRenderTree/chromium/TestShell.cpp
index 32585faa1..e5e9ded6a 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.cpp
+++ b/Tools/DumpRenderTree/chromium/TestShell.cpp
@@ -108,7 +108,6 @@ TestShell::TestShell()
, m_dumpPixelsForCurrentTest(false)
, m_allowExternalPages(false)
, m_acceleratedCompositingForVideoEnabled(false)
- , m_softwareCompositingEnabled(false)
, m_threadedCompositingEnabled(false)
, m_forceCompositingMode(false)
, m_accelerated2dCanvasEnabled(false)
@@ -400,7 +399,7 @@ static string dumpFramesAsText(WebFrame* frame, bool recursive)
// Add header for all but the main frame. Skip empty frames.
if (frame->parent() && !frame->document().documentElement().isNull()) {
result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8().data());
+ result.append(frame->name().utf8().data());
result.append("'\n--------\n");
}
@@ -426,7 +425,7 @@ static string dumpFramesAsPrintedText(WebFrame* frame, bool recursive)
// Add header for all but the main frame. Skip empty frames.
if (frame->parent() && !frame->document().documentElement().isNull()) {
result.append("\n--------\nFrame: '");
- result.append(frame->uniqueName().utf8().data());
+ result.append(frame->name().utf8().data());
result.append("'\n--------\n");
}
@@ -446,7 +445,7 @@ static void dumpFrameScrollPosition(WebFrame* frame, bool recursive)
WebSize offset = frame->scrollOffset();
if (offset.width > 0 || offset.height > 0) {
if (frame->parent())
- printf("frame '%s' ", frame->uniqueName().utf8().data());
+ printf("frame '%s' ", frame->name().utf8().data());
printf("scrolled to %d,%d\n", offset.width, offset.height);
}
diff --git a/Tools/DumpRenderTree/chromium/TestShell.h b/Tools/DumpRenderTree/chromium/TestShell.h
index 44b5ae388..405034a4e 100644
--- a/Tools/DumpRenderTree/chromium/TestShell.h
+++ b/Tools/DumpRenderTree/chromium/TestShell.h
@@ -130,8 +130,6 @@ public:
void setAllowExternalPages(bool allowExternalPages) { m_allowExternalPages = allowExternalPages; }
void setAcceleratedCompositingForVideoEnabled(bool enabled) { m_acceleratedCompositingForVideoEnabled = enabled; }
- bool softwareCompositingEnabled() { return m_softwareCompositingEnabled; }
- void setSoftwareCompositingEnabled(bool enabled) { m_softwareCompositingEnabled = enabled; }
void setThreadedCompositingEnabled(bool enabled) { m_threadedCompositingEnabled = enabled; }
void setForceCompositingMode(bool enabled) { m_forceCompositingMode = enabled; }
void setAccelerated2dCanvasEnabled(bool enabled) { m_accelerated2dCanvasEnabled = enabled; }
@@ -228,7 +226,6 @@ private:
int m_timeout; // timeout value in millisecond
bool m_allowExternalPages;
bool m_acceleratedCompositingForVideoEnabled;
- bool m_softwareCompositingEnabled;
bool m_threadedCompositingEnabled;
bool m_forceCompositingMode;
bool m_accelerated2dCanvasEnabled;
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
index c54ebedea..c78c9ed12 100644
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
+++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.cpp
@@ -33,7 +33,6 @@
#include "platform/WebKitPlatformSupport.h"
#include "WebPluginContainer.h"
#include "WebPluginParams.h"
-#include "WebTouchPoint.h"
#include <wtf/Assertions.h>
#include <wtf/text/CString.h>
@@ -77,61 +76,16 @@ static void premultiplyAlpha(const unsigned colorIn[3], float alpha, float color
colorOut[3] = alpha;
}
-static const char* pointState(WebKit::WebTouchPoint::State state)
-{
- switch (state) {
- case WebKit::WebTouchPoint::StateReleased:
- return "Released";
- case WebKit::WebTouchPoint::StatePressed:
- return "Pressed";
- case WebKit::WebTouchPoint::StateMoved:
- return "Moved";
- case WebKit::WebTouchPoint::StateCancelled:
- return "Cancelled";
- default:
- return "Unknown";
- }
-
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-static void printTouchList(const WebKit::WebTouchPoint* points, int length)
-{
- for (int i = 0; i < length; ++i)
- printf("* %d, %d: %s\n", points[i].position.x, points[i].position.y, pointState(points[i].state));
-}
-
-static void printEventDetails(const WebKit::WebInputEvent& event)
-{
- if (WebKit::WebInputEvent::isTouchEventType(event.type)) {
- const WebKit::WebTouchEvent& touch = static_cast<const WebKit::WebTouchEvent&>(event);
- printTouchList(touch.touches, touch.touchesLength);
- printTouchList(touch.changedTouches, touch.changedTouchesLength);
- printTouchList(touch.targetTouches, touch.targetTouchesLength);
- } else if (WebKit::WebInputEvent::isMouseEventType(event.type) || event.type == WebKit::WebInputEvent::MouseWheel) {
- const WebKit::WebMouseEvent& mouse = static_cast<const WebKit::WebMouseEvent&>(event);
- printf("* %d, %d\n", mouse.x, mouse.y);
- } else if (WebKit::WebInputEvent::isGestureEventType(event.type)) {
- const WebKit::WebGestureEvent& gesture = static_cast<const WebKit::WebGestureEvent&>(event);
- printf("* %d, %d\n", gesture.x, gesture.y);
- }
-}
-
TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
const WebKit::WebPluginParams& params)
: m_frame(frame)
, m_container(0)
, m_context(0)
- , m_acceptsTouchEvent(false)
- , m_printEventDetails(false)
{
static const WebString kAttributePrimitive = WebString::fromUTF8("primitive");
static const WebString kAttributeBackgroundColor = WebString::fromUTF8("background-color");
static const WebString kAttributePrimitiveColor = WebString::fromUTF8("primitive-color");
static const WebString kAttributeOpacity = WebString::fromUTF8("opacity");
- static const WebString kAttributeAcceptsTouch = WebString::fromUTF8("accepts-touch");
- static const WebString kAttributePrintEventDetails = WebString::fromUTF8("print-event-details");
ASSERT(params.attributeNames.size() == params.attributeValues.size());
size_t size = params.attributeNames.size();
@@ -147,10 +101,6 @@ TestWebPlugin::TestWebPlugin(WebKit::WebFrame* frame,
parseColor(attributeValue, m_scene.primitiveColor);
else if (attributeName == kAttributeOpacity)
m_scene.opacity = parseOpacity(attributeValue);
- else if (attributeName == kAttributeAcceptsTouch)
- m_acceptsTouchEvent = parseBoolean(attributeValue);
- else if (attributeName == kAttributePrintEventDetails)
- m_printEventDetails = parseBoolean(attributeValue);
}
}
@@ -179,7 +129,6 @@ bool TestWebPlugin::initialize(WebPluginContainer* container)
m_container = container;
m_container->setBackingTextureId(m_colorTexture);
- m_container->setIsAcceptingTouchEvents(m_acceptsTouchEvent);
return true;
}
@@ -259,12 +208,6 @@ float TestWebPlugin::parseOpacity(const WebString& string)
return static_cast<float>(atof(string.utf8().data()));
}
-bool TestWebPlugin::parseBoolean(const WebString& string)
-{
- static const WebString kPrimitiveTrue = WebString::fromUTF8("true");
- return string == kPrimitiveTrue;
-}
-
bool TestWebPlugin::initScene()
{
float color[4];
@@ -464,31 +407,6 @@ bool TestWebPlugin::handleInputEvent(const WebKit::WebInputEvent& event, WebKit:
}
printf("Plugin received event: %s\n", eventName ? eventName : "unknown");
- if (m_printEventDetails)
- printEventDetails(event);
- return false;
-}
-
-bool TestWebPlugin::handleDragStatusUpdate(WebKit::WebDragStatus dragStatus, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebPoint& position, const WebKit::WebPoint& screenPosition)
-{
- const char* dragStatusName = 0;
- switch (dragStatus) {
- case WebKit::WebDragStatusEnter:
- dragStatusName = "DragEnter";
- break;
- case WebKit::WebDragStatusOver:
- dragStatusName = "DragOver";
- break;
- case WebKit::WebDragStatusLeave:
- dragStatusName = "DragLeave";
- break;
- case WebKit::WebDragStatusDrop:
- dragStatusName = "DragDrop";
- break;
- case WebKit::WebDragStatusUnknown:
- ASSERT_NOT_REACHED();
- }
- printf("Plugin received event: %s\n", dragStatusName);
return false;
}
diff --git a/Tools/DumpRenderTree/chromium/TestWebPlugin.h b/Tools/DumpRenderTree/chromium/TestWebPlugin.h
index aa6533e32..025b11095 100644
--- a/Tools/DumpRenderTree/chromium/TestWebPlugin.h
+++ b/Tools/DumpRenderTree/chromium/TestWebPlugin.h
@@ -42,9 +42,6 @@ class WebGraphicsContext3D;
// background-color: black (default), red, green, blue.
// primitive-color: black (default), red, green, blue.
// opacity: [0.0 - 1.0]. Default is 1.0.
-//
-// Whether the plugin accepts touch events or not can be customized using the
-// 'accepts-touch' plugin parameter (defaults to false).
class TestWebPlugin : public WebKit::WebPlugin {
public:
TestWebPlugin(WebKit::WebFrame*, const WebKit::WebPluginParams&);
@@ -65,7 +62,6 @@ public:
virtual void updateVisibility(bool) { }
virtual bool acceptsInputEvents() { return true; }
virtual bool handleInputEvent(const WebKit::WebInputEvent&, WebKit::WebCursorInfo&);
- virtual bool handleDragStatusUpdate(WebKit::WebDragStatus, const WebKit::WebDragData&, WebKit::WebDragOperationsMask, const WebKit::WebPoint& position, const WebKit::WebPoint& screenPosition);
virtual void didReceiveResponse(const WebKit::WebURLResponse&) { }
virtual void didReceiveData(const char* data, int dataLength) { }
virtual void didFinishLoading() { }
@@ -108,7 +104,6 @@ private:
Primitive parsePrimitive(const WebKit::WebString&);
void parseColor(const WebKit::WebString&, unsigned color[3]);
float parseOpacity(const WebKit::WebString&);
- bool parseBoolean(const WebKit::WebString&);
// Functions for loading and drawing scene.
bool initScene();
@@ -129,9 +124,6 @@ private:
unsigned m_colorTexture;
unsigned m_framebuffer;
Scene m_scene;
-
- bool m_acceptsTouchEvent;
- bool m_printEventDetails;
};
#endif // TestPepperPlugin_h
diff --git a/Tools/DumpRenderTree/chromium/WebPreferences.cpp b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
index 3bc2cdd9f..5eebf596d 100644
--- a/Tools/DumpRenderTree/chromium/WebPreferences.cpp
+++ b/Tools/DumpRenderTree/chromium/WebPreferences.cpp
@@ -156,9 +156,9 @@ typedef void (*SetFontFamilyWrapper)(WebSettings*, const WebString&, UScriptCode
static void applyFontMap(WebSettings* settings, const WebPreferences::ScriptFontFamilyMap& map, SetFontFamilyWrapper setter)
{
for (WebPreferences::ScriptFontFamilyMap::const_iterator iter = map.begin(); iter != map.end(); ++iter) {
- const WebString& font = iter->value;
+ const WebString& font = iter->second;
if (!font.isNull() && !font.isEmpty())
- (*setter)(settings, font, static_cast<UScriptCode>(iter->key));
+ (*setter)(settings, font, static_cast<UScriptCode>(iter->first));
}
}
diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp
index ed13ffa58..a373c3b30 100644
--- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp
+++ b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.cpp
@@ -33,41 +33,15 @@
#include "WebUserMediaClientMock.h"
-#include "MockConstraints.h"
#include "WebDocument.h"
#include "WebMediaStreamRegistry.h"
#include "WebUserMediaRequest.h"
-#include <public/WebMediaConstraints.h>
-#include <public/WebMediaStreamDescriptor.h>
-#include <public/WebMediaStreamSource.h>
-#include <public/WebVector.h>
+#include "platform/WebMediaStreamDescriptor.h"
+#include "platform/WebMediaStreamSource.h"
+#include "platform/WebVector.h"
#include <wtf/Assertions.h>
-using namespace WebKit;
-
-class UserMediaRequestTask : public MethodTask<WebUserMediaClientMock> {
-public:
- UserMediaRequestTask(WebUserMediaClientMock* object, const WebUserMediaRequest& request, const WebMediaStreamDescriptor result)
- : MethodTask<WebUserMediaClientMock>(object)
- , m_request(request)
- , m_result(result)
- {
- }
-
- virtual void runIfValid() OVERRIDE
- {
- if (m_result.isNull())
- m_request.requestFailed();
- else
- m_request.requestSucceeded(m_result);
- }
-
-private:
- WebUserMediaRequest m_request;
- WebMediaStreamDescriptor m_result;
-};
-
-////////////////////////////////
+namespace WebKit {
class MockExtraData : public WebMediaStreamDescriptor::ExtraData {
public:
@@ -85,18 +59,7 @@ void WebUserMediaClientMock::requestUserMedia(const WebUserMediaRequest& streamR
WebUserMediaRequest request = streamRequest;
if (request.ownerDocument().isNull() || !request.ownerDocument().frame()) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
- return;
- }
-
- WebMediaConstraints constraints = request.audioConstraints();
- if (!constraints.isNull() && !MockConstraints::verifyConstraints(constraints)) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
- return;
- }
- constraints = request.videoConstraints();
- if (!constraints.isNull() && !MockConstraints::verifyConstraints(constraints)) {
- postTask(new UserMediaRequestTask(this, request, WebMediaStreamDescriptor()));
+ request.requestFailed();
return;
}
@@ -111,16 +74,18 @@ void WebUserMediaClientMock::requestUserMedia(const WebUserMediaRequest& streamR
if (request.video())
videoSources[0].initialize("MockVideoDevice#1", WebMediaStreamSource::TypeVideo, "Mock video device");
- WebMediaStreamDescriptor stream;
- stream.initialize("foobar", audioSources, videoSources);
+ WebKit::WebMediaStreamDescriptor descriptor;
+ descriptor.initialize("foobar", audioSources, videoSources);
- stream.setExtraData(new MockExtraData());
+ descriptor.setExtraData(new MockExtraData());
- postTask(new UserMediaRequestTask(this, request, stream));
+ request.requestSucceeded(descriptor);
}
void WebUserMediaClientMock::cancelUserMediaRequest(const WebUserMediaRequest&)
{
}
+} // namespace WebKit
+
#endif // ENABLE(MEDIA_STREAM)
diff --git a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h
index 9e1beba4a..e2415985c 100644
--- a/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h
+++ b/Tools/DumpRenderTree/chromium/WebUserMediaClientMock.h
@@ -33,31 +33,29 @@
#if ENABLE(MEDIA_STREAM)
-#include "Task.h"
#include "WebUserMediaClient.h"
+#include "platform/WebCommon.h"
+#include "platform/WebString.h"
+#include "platform/WebURL.h"
#include "webkit/support/test_media_stream_client.h"
-#include <public/WebCommon.h>
-#include <public/WebString.h>
-#include <public/WebURL.h>
#include <wtf/PassOwnPtr.h>
-class WebUserMediaClientMock : public WebKit::WebUserMediaClient {
+namespace WebKit {
+
+class WebUserMediaClientMock : public WebUserMediaClient {
public:
static PassOwnPtr<WebUserMediaClientMock> create();
~WebUserMediaClientMock() { }
- virtual void requestUserMedia(const WebKit::WebUserMediaRequest&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&, const WebKit::WebVector<WebKit::WebMediaStreamSource>&) OVERRIDE;
- virtual void cancelUserMediaRequest(const WebKit::WebUserMediaRequest&);
-
- // Task related methods
- TaskList* taskList() { return &m_taskList; }
+ virtual void requestUserMedia(const WebUserMediaRequest&, const WebVector<WebMediaStreamSource>&, const WebVector<WebMediaStreamSource>&) OVERRIDE;
+ virtual void cancelUserMediaRequest(const WebUserMediaRequest&);
private:
WebUserMediaClientMock() { }
-
- TaskList m_taskList;
};
+} // namespace WebKit
+
#endif // ENABLE(MEDIA_STREAM)
#endif // WebUserMediaClientMock_h
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
index c7ab475e7..f8d804e96 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -65,7 +65,6 @@
#include "WebUserMediaClientMock.h"
#include "WebView.h"
#include "WebViewHostOutputSurface.h"
-#include "WebViewHostSoftwareOutputDevice.h"
#include "WebWindowFeatures.h"
#include "platform/WebSerializedScriptValue.h"
#include "skia/ext/platform_canvas.h"
@@ -289,14 +288,11 @@ WebStorageNamespace* WebViewHost::createSessionStorageNamespace(unsigned quota)
return webkit_support::CreateSessionStorageNamespace(quota);
}
-WebCompositorOutputSurface* WebViewHost::createOutputSurface()
+WebKit::WebCompositorOutputSurface* WebViewHost::createOutputSurface()
{
if (!webView())
return 0;
-
- if (m_shell->softwareCompositingEnabled())
- return WebViewHostOutputSurface::createSoftware(adoptPtr(new WebViewHostSoftwareOutputDevice)).leakPtr();
- return WebViewHostOutputSurface::create3d(adoptPtr(webkit_support::CreateGraphicsContext3D(WebGraphicsContext3D::Attributes(), webView()))).leakPtr();
+ return new WebKit::WebViewHostOutputSurface(adoptPtr(webkit_support::CreateGraphicsContext3D(WebKit::WebGraphicsContext3D::Attributes(), webView())));
}
void WebViewHost::didAddMessageToConsole(const WebConsoleMessage& message, const WebString& sourceName, unsigned sourceLine)
@@ -1100,7 +1096,7 @@ void WebViewHost::unableToImplementPolicyWithError(WebFrame* frame, const WebURL
{
printf("Policy delegate: unable to implement policy with error domain '%s', "
"error code %d, in frame '%s'\n",
- error.domain.utf8().data(), error.reason, frame->uniqueName().utf8().data());
+ error.domain.utf8().data(), error.reason, frame->name().utf8().data());
}
void WebViewHost::willPerformClientRedirect(WebFrame* frame, const WebURL& from, const WebURL& to,
@@ -1403,7 +1399,7 @@ void WebViewHost::deleteFileSystem(WebKit::WebFrame* frame, WebKit::WebFileSyste
webkit_support::DeleteFileSystem(frame, type, callbacks);
}
-bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* sourceFrame, WebFrame* targetFrame, WebSecurityOrigin target, WebDOMMessageEvent event)
+bool WebViewHost::willCheckAndDispatchMessageEvent(WebFrame* source, WebSecurityOrigin target, WebDOMMessageEvent event)
{
if (m_shell->testRunner()->shouldInterceptPostMessage()) {
fputs("intercepted postMessage\n", stdout);
@@ -1749,7 +1745,7 @@ void WebViewHost::updateSessionHistory(WebFrame* frame)
void WebViewHost::printFrameDescription(WebFrame* webframe)
{
- string name8 = webframe->uniqueName().utf8();
+ string name8 = webframe->name().utf8();
if (webframe == webView()->mainFrame()) {
if (!name8.length()) {
fputs("main frame", stdout);
@@ -1774,7 +1770,7 @@ void WebViewHost::printFrameUserGestureStatus(WebFrame* webframe, const char* ms
void WebViewHost::printResourceDescription(unsigned identifier)
{
ResourceMap::iterator it = m_resourceIdentifierMap.find(identifier);
- printf("%s", it != m_resourceIdentifierMap.end() ? it->value.c_str() : "<unknown>");
+ printf("%s", it != m_resourceIdentifierMap.end() ? it->second.c_str() : "<unknown>");
}
void WebViewHost::setPendingExtraData(PassOwnPtr<TestShellExtraData> extraData)
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.h b/Tools/DumpRenderTree/chromium/WebViewHost.h
index c9e17b07f..4a3627f90 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHost.h
+++ b/Tools/DumpRenderTree/chromium/WebViewHost.h
@@ -52,7 +52,6 @@ class MockWebSpeechInputController;
class MockWebSpeechRecognizer;
class SkCanvas;
class TestShell;
-class WebUserMediaClientMock;
namespace WebKit {
class WebFrame;
@@ -67,6 +66,7 @@ class WebSharedWorkerClient;
class WebSpeechInputController;
class WebSpeechInputListener;
class WebURL;
+class WebUserMediaClientMock;
struct WebRect;
struct WebURLError;
struct WebWindowFeatures;
@@ -268,9 +268,7 @@ class WebViewHost : public WebKit::WebViewClient, public WebKit::WebFrameClient,
virtual void didDetectXSS(WebKit::WebFrame*, const WebKit::WebURL&, bool didBlockEntirePage);
virtual void openFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, long long size, bool create, WebKit::WebFileSystemCallbacks*);
virtual void deleteFileSystem(WebKit::WebFrame*, WebKit::WebFileSystem::Type, WebKit::WebFileSystemCallbacks*);
- virtual bool willCheckAndDispatchMessageEvent(
- WebKit::WebFrame* sourceFrame, WebKit::WebFrame* targetFrame,
- WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent);
+ virtual bool willCheckAndDispatchMessageEvent(WebKit::WebFrame* source, WebKit::WebSecurityOrigin target, WebKit::WebDOMMessageEvent);
virtual void registerIntentService(WebKit::WebFrame*, const WebKit::WebIntentServiceInfo&);
virtual void dispatchIntent(WebKit::WebFrame*, const WebKit::WebIntentRequest&);
virtual void deliveredIntentResult(WebKit::WebFrame*, int, const WebKit::WebSerializedScriptValue&);
@@ -345,7 +343,7 @@ private:
void discardBackingStore();
#if ENABLE(MEDIA_STREAM)
- WebUserMediaClientMock* userMediaClientMock();
+ WebKit::WebUserMediaClientMock* userMediaClientMock();
webkit_support::TestMediaStreamClient* testMediaStreamClient();
#endif
@@ -432,7 +430,7 @@ private:
#endif
#if ENABLE(MEDIA_STREAM)
- OwnPtr<WebUserMediaClientMock> m_userMediaClientMock;
+ OwnPtr<WebKit::WebUserMediaClientMock> m_userMediaClientMock;
OwnPtr<webkit_support::TestMediaStreamClient> m_testMediaStreamClient;
#endif
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp
index 09a0af501..1d1b5840e 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp
+++ b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.cpp
@@ -27,41 +27,22 @@
#include "WebViewHostOutputSurface.h"
-#include <public/WebCompositorSoftwareOutputDevice.h>
#include <public/WebGraphicsContext3D.h>
#include <wtf/Assertions.h>
namespace WebKit {
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::create3d(PassOwnPtr<WebKit::WebGraphicsContext3D> context3d)
-{
- return adoptPtr(new WebViewHostOutputSurface(context3d));
-}
-
-PassOwnPtr<WebViewHostOutputSurface> WebViewHostOutputSurface::createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
-{
- return adoptPtr(new WebViewHostOutputSurface(softwareDevice));
-}
-
WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D> context)
: m_context(context)
{
}
-WebViewHostOutputSurface::WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice> softwareDevice)
- : m_softwareDevice(softwareDevice)
-{
-}
-
WebViewHostOutputSurface::~WebViewHostOutputSurface()
{
}
bool WebViewHostOutputSurface::bindToClient(WebCompositorOutputSurfaceClient*)
{
- if (!m_context)
- return true;
-
return m_context->makeContextCurrent();
}
@@ -75,11 +56,6 @@ WebGraphicsContext3D* WebViewHostOutputSurface::context3D() const
return m_context.get();
}
-WebCompositorSoftwareOutputDevice* WebViewHostOutputSurface::softwareDevice() const
-{
- return m_softwareDevice.get();
-}
-
void WebViewHostOutputSurface::sendFrameToParentCompositor(const WebCompositorFrame&)
{
ASSERT_NOT_REACHED();
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h
index bbd61a21a..412bc539d 100644
--- a/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h
+++ b/Tools/DumpRenderTree/chromium/WebViewHostOutputSurface.h
@@ -33,29 +33,22 @@
namespace WebKit {
class WebCompositorOutputSurfaceClient;
-class WebCompositorSoftwareOutputDevice;
class WebGraphicsContext3D;
class WebViewHostOutputSurface : public WebKit::WebCompositorOutputSurface {
public:
- static PassOwnPtr<WebViewHostOutputSurface> create3d(PassOwnPtr<WebKit::WebGraphicsContext3D>);
- static PassOwnPtr<WebViewHostOutputSurface> createSoftware(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
+ explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D>);
virtual ~WebViewHostOutputSurface();
virtual bool bindToClient(WebCompositorOutputSurfaceClient*) OVERRIDE;
virtual const WebKit::WebCompositorOutputSurface::Capabilities& capabilities() const OVERRIDE;
virtual WebGraphicsContext3D* context3D() const OVERRIDE;
- virtual WebCompositorSoftwareOutputDevice* softwareDevice() const OVERRIDE;
virtual void sendFrameToParentCompositor(const WebCompositorFrame&) OVERRIDE;
private:
- explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebGraphicsContext3D>);
- explicit WebViewHostOutputSurface(PassOwnPtr<WebKit::WebCompositorSoftwareOutputDevice>);
-
WebKit::WebCompositorOutputSurface::Capabilities m_capabilities;
OwnPtr<WebKit::WebGraphicsContext3D> m_context;
- OwnPtr<WebKit::WebCompositorSoftwareOutputDevice> m_softwareDevice;
};
}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp b/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp
deleted file mode 100644
index ecee9940d..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "WebViewHostSoftwareOutputDevice.h"
-
-#include "SkBitmap.h"
-#include "SkDevice.h"
-#include <public/WebSize.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-WebImage* WebViewHostSoftwareOutputDevice::lock(bool forWrite)
-{
- ASSERT(m_device);
- m_image = m_device->accessBitmap(forWrite);
- return &m_image;
-}
-
-void WebViewHostSoftwareOutputDevice::unlock()
-{
- m_image.reset();
-}
-
-void WebViewHostSoftwareOutputDevice::didChangeViewportSize(WebSize size)
-{
- if (m_device && size.width == m_device->width() && size.height == m_device->height())
- return;
-
- m_device = adoptPtr(new SkDevice(SkBitmap::kARGB_8888_Config, size.width, size.height, true));
-}
-
-
-}
diff --git a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h b/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h
deleted file mode 100644
index 5bd551ff9..000000000
--- a/Tools/DumpRenderTree/chromium/WebViewHostSoftwareOutputDevice.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2012 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebViewHostSoftwareOutputDevice_h
-#define WebViewHostSoftwareOutputDevice_h
-
-#include <public/WebCompositorSoftwareOutputDevice.h>
-#include <public/WebImage.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-
-class SkDevice;
-
-namespace WebKit {
-
-struct WebSize;
-
-class WebViewHostSoftwareOutputDevice : public WebKit::WebCompositorSoftwareOutputDevice {
-public:
- virtual WebImage* lock(bool forWrite) OVERRIDE;
- virtual void unlock() OVERRIDE;
-
- virtual void didChangeViewportSize(WebSize) OVERRIDE;
-
-private:
- OwnPtr<SkDevice> m_device;
- WebImage m_image;
-};
-
-}
-
-#endif // WebViewHostSoftwareOutputDevice_h
diff --git a/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml b/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml
index 79193b7c4..5ab6c2d59 100644
--- a/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml
+++ b/Tools/DumpRenderTree/chromium/android_fallback_fonts.xml
@@ -7,32 +7,7 @@
</family>
<family>
<fileset>
- <file>kochi-mincho.ttf</file>
+ <file>DroidSansFallback.ttf</file>
</fileset>
</family>
- <family>
- <fileset>
- <file>lohit_hi.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>lohit_ta.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>MuktiNarrow.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>Garuda.ttf</file>
- </fileset>
- </family>
- <family>
- <fileset>
- <file>lohit_pa.ttf</file>
- </fileset>
- </family>
-</familyset>
+</familyset> \ No newline at end of file