xml/XPathEvaluator.idl \
xml/XSLTProcessor.idl
+WEBCORE_HEADERS_FOR_WEBKIT2 += \
+ bindings/js/DOMWrapperWorld.h \
+ platform/FileChooser.h \
+ platform/network/qt/ResourceError.h \
+ platform/network/qt/ResourceRequest.h \
+ platform/network/qt/ResourceResponse.h \
+ dom/KeyboardEvent.h \
+ editing/EditCommand.h \
+ history/BackForwardList.h \
+ html/HTMLFormElement.h \
+ html/HTMLFrameOwnerElement.h \
+ inspector/InspectorClient.h \
+ loader/DocumentLoader.h \
+ loader/FormState.h \
+ loader/FrameLoader.h \
+ loader/FrameLoaderClient.h \
+ loader/FrameLoaderTypes.h \
+ loader/PolicyChecker.h \
+ loader/ProgressTracker.h \
+ page/Chrome.h \
+ page/ChromeClient.h \
+ page/ContextMenuClient.h \
+ page/DragClient.h \
+ page/EditorClient.h \
+ page/EventHandler.h \
+ page/FocusController.h \
+ page/Frame.h \
+ page/FrameLoadRequest.h \
+ page/FrameView.h \
+ page/Page.h \
+ page/Settings.h \
+ page/WindowFeatures.h \
+ platform/PlatformKeyboardEvent.h \
+ platform/PlatformMouseEvent.h \
+ platform/PlatformWheelEvent.h \
+ platform/Widget.h \
+ platform/graphics/FloatRect.h \
+ platform/graphics/GraphicsContext.h \
+ platform/graphics/IntPoint.h \
+ platform/graphics/IntRect.h \
+ platform/graphics/IntSize.h \
+ platform/graphics/Tile.h \
+ platform/graphics/TiledBackingStore.h \
+ platform/graphics/TiledBackingStoreClient.h \
+ platform/text/PlatformString.h \
+ platform/text/StringImpl.h \
+ platform/MIMETypeRegistry.h \
+ plugins/PluginData.h \
+ rendering/RenderTreeAsText.h \
+ plugins/PluginData.h \
+
+JSC_HEADERS_FOR_WEBKIT2 += \
+ ../JavaScriptCore/runtime/JSObject.h \
+
+WEBKIT2_API_HEADERS += \
+ ../WebKit2/UIProcess/API/C/WKAPICast.h \
+ ../WebKit2/UIProcess/API/C/WKBase.h \
+ ../WebKit2/UIProcess/API/C/WKContext.h \
+ ../WebKit2/UIProcess/API/C/WKContextPrivate.h \
+ ../WebKit2/UIProcess/API/C/WKFrame.h \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.h \
+ ../WebKit2/UIProcess/API/C/WKPage.h \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.h \
+ ../WebKit2/UIProcess/API/C/WKPagePrivate.h \
+ ../WebKit2/UIProcess/API/C/WKPreferences.h \
+ ../WebKit2/UIProcess/API/C/WKString.h \
+ ../WebKit2/UIProcess/API/C/WKURL.h \
+ ../WebKit2/UIProcess/API/C/WebKit2.h \
+ ../WebKit2/UIProcess/API/cpp/WKRetainPtr.h \
+ ../WebKit2/UIProcess/API/qt/qwkgraphicswidget.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h \
+
contains(DEFINES, ENABLE_MATHML=1) {
mathmlnames.output = $${WC_GENERATED_SOURCES_DIR}/MathMLNames.cpp
mathmlnames.input = MATHML_NAMES
webkitversion.wkAddOutputToSources = false
addExtraCompiler(webkitversion)
+# GENERATOR 12: Copy WebCore headers for WebKit2
+webcoreheaders.output = ../include/WebCore/${QMAKE_FILE_BASE}.h
+webcoreheaders.input = WEBCORE_HEADERS_FOR_WEBKIT2
+webcoreheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+webcoreheaders.clean = ${QMAKE_FILE_OUT}
+webcoreheaders.wkAddOutputToSources = false
+addExtraCompiler(webcoreheaders)
+
+# GENERATOR 12-B: Copy JavaScriptCore headers for WebKit2
+jscheaders.output = ../include/JavaScriptCore/${QMAKE_FILE_BASE}.h
+jscheaders.input = JSC_HEADERS_FOR_WEBKIT2
+jscheaders.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+jscheaders.clean = ${QMAKE_FILE_OUT}
+jscheaders.wkAddOutputToSources = false
+addExtraCompiler(jscheaders)
+
+# GENERATOR 13: Copy WebKit2 headers
+webkit2headers.output = ../include/WebKit2/${QMAKE_FILE_BASE}.h
+webkit2headers.input = WEBKIT2_API_HEADERS
+webkit2headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT}
+webkit2headers.clean = ${QMAKE_FILE_OUT}
+webkit2headers.wkAddOutputToSources = false
+addExtraCompiler(webkit2headers)
CONFIG += building-libs
CONFIG += depend_includepath
+meegotouch {
+ DEFINES += WTF_USE_MEEGOTOUCH=1
+}
+
symbian: {
TARGET.EPOCALLOWDLLDATA=1
TARGET.CAPABILITY = All -Tcb
}
include($$PWD/../WebKit/qt/Api/headers.pri)
+
HEADERS += $$WEBKIT_API_HEADERS
!CONFIG(QTDIR_build) {
rendering/RenderLayerCompositor.cpp
}
+CONFIG += precompile_header
+PRECOMPILED_HEADER = $$PWD/../WebKit2/WebKit2Prefix.h
+
+INCLUDEPATH = \
+ $$PWD/../WebKit2/Platform \
+ $$PWD/../WebKit2/Platform/CoreIPC \
+ $$PWD/../WebKit2/Shared \
+ $$PWD/../WebKit2/Shared/CoreIPCSupport \
+ $$PWD/../WebKit2/Shared/qt \
+ $$PWD/../WebKit2/UIProcess \
+ $$PWD/../WebKit2/UIProcess/API/C \
+ $$PWD/../WebKit2/UIProcess/API/cpp \
+ $$PWD/../WebKit2/UIProcess/API/cpp/qt \
+ $$PWD/../WebKit2/UIProcess/API/qt \
+ $$PWD/../WebKit2/UIProcess/Launcher \
+ $$PWD/../WebKit2/UIProcess/Plugins \
+ $$PWD/../WebKit2/UIProcess/qt \
+ $$PWD/../WebKit2/WebProcess \
+ $$PWD/../WebKit2/WebProcess/InjectedBundle \
+ $$PWD/../WebKit2/WebProcess/InjectedBundle/API/c \
+ $$PWD/../WebKit2/WebProcess/WebCoreSupport \
+ $$PWD/../WebKit2/WebProcess/WebPage \
+ $$INCLUDEPATH \
+ $$OUTPUT_DIR/include \
+
+HEADERS += \
+ ../WebKit2/Platform/CoreIPC/ArgumentDecoder.h \
+ ../WebKit2/Platform/CoreIPC/ArgumentEncoder.h \
+ ../WebKit2/Platform/CoreIPC/Arguments.h \
+ ../WebKit2/Platform/CoreIPC/Attachment.h \
+ ../WebKit2/Platform/CoreIPC/Connection.h \
+ ../WebKit2/Platform/CoreIPC/CoreIPCMessageKinds.h \
+ ../WebKit2/Platform/CoreIPC/MessageID.h \
+ ../WebKit2/Platform/PlatformProcessIdentifier.h \
+ ../WebKit2/Platform/RunLoop.h \
+ ../WebKit2/Platform/WorkItem.h \
+ ../WebKit2/Platform/WorkQueue.h \
+ ../WebKit2/Shared/CoreIPCSupport/DrawingAreaMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/MessageDebug.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebPageMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebPageProxyMessageKinds.h \
+ ../WebKit2/Shared/CoreIPCSupport/WebProcessMessageKinds.h \
+ ../WebKit2/Shared/NotImplemented.h \
+ ../WebKit2/Shared/qt/WebEventFactory.h \
+ ../WebKit2/Shared/WebEventConversion.h \
+ ../WebKit2/Shared/WebEvent.h \
+ ../WebKit2/Shared/WebNavigationDataStore.h \
+ ../WebKit2/Shared/WebPreferencesStore.h \
+ ../WebKit2/UIProcess/API/cpp/WKRetainPtr.h \
+ ../WebKit2/UIProcess/API/cpp/qt/WKStringQt.h \
+ ../WebKit2/UIProcess/API/cpp/qt/WKURLQt.h \
+ ../WebKit2/UIProcess/API/C/WebKit2.h \
+ ../WebKit2/UIProcess/API/C/WKAPICast.h \
+ ../WebKit2/UIProcess/API/C/WKBase.h \
+ ../WebKit2/UIProcess/API/C/WKContext.h \
+ ../WebKit2/UIProcess/API/C/WKContextPrivate.h \
+ ../WebKit2/UIProcess/API/C/WKFrame.h \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.h \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.h \
+ ../WebKit2/UIProcess/API/C/WKPage.h \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.h \
+ ../WebKit2/UIProcess/API/C/WKPagePrivate.h \
+ ../WebKit2/UIProcess/API/C/WKPreferences.h \
+ ../WebKit2/UIProcess/API/C/WKString.h \
+ ../WebKit2/UIProcess/API/C/WKURL.h \
+ ../WebKit2/UIProcess/API/qt/qgraphicswkview.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage.h \
+ ../WebKit2/UIProcess/API/qt/qwkpage_p.h \
+ ../WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h \
+ ../WebKit2/UIProcess/DrawingAreaProxy.h \
+ ../WebKit2/UIProcess/GenericCallback.h \
+ ../WebKit2/UIProcess/Launcher/WebProcessLauncher.h \
+ ../WebKit2/UIProcess/Plugins/PluginInfoStore.h \
+ ../WebKit2/UIProcess/PageClient.h \
+ ../WebKit2/UIProcess/ProcessModel.h \
+ ../WebKit2/UIProcess/qt/DefaultPageLoaderClientCallbacksQt.h \
+ ../WebKit2/UIProcess/ResponsivenessTimer.h \
+ ../WebKit2/UIProcess/WebContext.h \
+ ../WebKit2/UIProcess/WebContextInjectedBundleClient.h \
+ ../WebKit2/UIProcess/WebFramePolicyListenerProxy.h \
+ ../WebKit2/UIProcess/WebFrameProxy.h \
+ ../WebKit2/UIProcess/WebHistoryClient.h \
+ ../WebKit2/UIProcess/WebLoaderClient.h \
+ ../WebKit2/UIProcess/WebNavigationData.h \
+ ../WebKit2/UIProcess/WebPageNamespace.h \
+ ../WebKit2/UIProcess/WebPageProxy.h \
+ ../WebKit2/UIProcess/WebPolicyClient.h \
+ ../WebKit2/UIProcess/WebPreferences.h \
+ ../WebKit2/UIProcess/WebProcessManager.h \
+ ../WebKit2/UIProcess/WebProcessProxy.h \
+ ../WebKit2/UIProcess/WebUIClient.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundleBase.h \
+ ../WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundle.h \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundlePageClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebDragClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebEditorClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebErrors.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.h \
+ ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.h \
+ ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h \
+ ../WebKit2/WebProcess/WebPage/DrawingArea.h \
+ ../WebKit2/WebProcess/WebPage/WebFrame.h \
+ ../WebKit2/WebProcess/WebPage/WebPage.h \
+ ../WebKit2/WebProcess/WebProcess.h \
+
+SOURCES += \
+ ../WebKit2/Platform/CoreIPC/ArgumentDecoder.cpp \
+ ../WebKit2/Platform/CoreIPC/ArgumentEncoder.cpp \
+ ../WebKit2/Platform/CoreIPC/Attachment.cpp \
+ ../WebKit2/Platform/CoreIPC/Connection.cpp \
+ ../WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp \
+ ../WebKit2/Platform/RunLoop.cpp \
+ ../WebKit2/Platform/WorkQueue.cpp \
+ ../WebKit2/Platform/qt/RunLoopQt.cpp \
+ ../WebKit2/Platform/qt/WorkQueueQt.cpp \
+ ../WebKit2/Shared/CoreIPCSupport/MessageDebug.cpp \
+ ../WebKit2/Shared/WebEventConversion.cpp \
+ ../WebKit2/Shared/WebPreferencesStore.cpp \
+ ../WebKit2/Shared/qt/UpdateChunk.cpp \
+ ../WebKit2/Shared/qt/WebEventFactory.cpp \
+ ../WebKit2/UIProcess/API/C/WKContext.cpp \
+ ../WebKit2/UIProcess/API/C/WKFrame.cpp \
+ ../WebKit2/UIProcess/API/C/WKFramePolicyListener.cpp \
+ ../WebKit2/UIProcess/API/C/WKNavigationData.cpp \
+ ../WebKit2/UIProcess/API/C/WKPage.cpp \
+ ../WebKit2/UIProcess/API/C/WKPageNamespace.cpp \
+ ../WebKit2/UIProcess/API/C/WKPreferences.cpp \
+ ../WebKit2/UIProcess/API/C/WKString.cpp \
+ ../WebKit2/UIProcess/API/C/WKURL.cpp \
+ ../WebKit2/UIProcess/API/qt/qgraphicswkview.cpp \
+ ../WebKit2/UIProcess/API/qt/qwkpage.cpp \
+ ../WebKit2/UIProcess/API/cpp/qt/WKStringQt.cpp \
+ ../WebKit2/UIProcess/API/cpp/qt/WKURLQt.cpp \
+ ../WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp \
+ ../WebKit2/UIProcess/DrawingAreaProxy.cpp \
+ ../WebKit2/UIProcess/DrawingAreaProxyTiled.cpp \
+ ../WebKit2/UIProcess/Plugins/PluginInfoStore.cpp \
+ ../WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp \
+ ../WebKit2/UIProcess/Launcher/qt/WebProcessLauncherQt.cpp \
+ ../WebKit2/UIProcess/ResponsivenessTimer.cpp \
+ ../WebKit2/UIProcess/WebContext.cpp \
+ ../WebKit2/UIProcess/WebContextInjectedBundleClient.cpp \
+ ../WebKit2/UIProcess/WebFramePolicyListenerProxy.cpp \
+ ../WebKit2/UIProcess/WebFrameProxy.cpp \
+ ../WebKit2/UIProcess/WebHistoryClient.cpp \
+ ../WebKit2/UIProcess/WebLoaderClient.cpp \
+ ../WebKit2/UIProcess/WebNavigationData.cpp \
+ ../WebKit2/UIProcess/WebPageNamespace.cpp \
+ ../WebKit2/UIProcess/WebPageProxy.cpp \
+ ../WebKit2/UIProcess/WebPolicyClient.cpp \
+ ../WebKit2/UIProcess/WebPreferences.cpp \
+ ../WebKit2/UIProcess/WebProcessManager.cpp \
+ ../WebKit2/UIProcess/WebProcessProxy.cpp \
+ ../WebKit2/UIProcess/WebUIClient.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/InjectedBundlePageClient.cpp \
+ ../WebKit2/WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp \
+ ../WebKit2/UIProcess/qt/DefaultPageLoaderClientCallbacksQt.cpp \
+ ../WebKit2/UIProcess/qt/DrawingAreaProxyTiledQt.cpp \
+ ../WebKit2/UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/WebInspectorClient.cpp \
+ ../WebKit2/WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp \
+ ../WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp \
+ ../WebKit2/WebProcess/WebPage/DrawingArea.cpp \
+ ../WebKit2/WebProcess/WebPage/DrawingAreaTiled.cpp \
+ ../WebKit2/WebProcess/WebPage/WebFrame.cpp \
+ ../WebKit2/WebProcess/WebPage/WebPage.cpp \
+ ../WebKit2/WebProcess/WebPage/qt/DrawingAreaTiledQt.cpp \
+ ../WebKit2/WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp \
+ ../WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp \
+ ../WebKit2/WebProcess/WebProcess.cpp \
+
+
symbian {
shared {
contains(CONFIG, def_files) {
contains(QT_CONFIG, declarative) {
exists($$PWD/WebKit/qt/declarative): SUBDIRS += WebKit/qt/declarative
}
+exists($$PWD/WebKitTools/MiniBrowser/qt/MiniBrowser.pro): SUBDIRS += WebKitTools/MiniBrowser/qt/MiniBrowser.pro
+exists($$PWD/WebKit2/WebKit2.pro): SUBDIRS += WebKit2/WebKit2.pro
exists($$PWD/JavaScriptCore/jsc.pro): SUBDIRS += JavaScriptCore/jsc.pro
exists($$PWD/WebKit/qt/tests): SUBDIRS += WebKit/qt/tests
exists($$PWD/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro): SUBDIRS += WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+2010-07-05 Antti Koivisto <koivisto@iki.fi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Initial WebKit2 implementation
+ https://bugs.webkit.org/show_bug.cgi?id=40233
+
+ Implement ChunkedUpdateDrawingArea + Proxy for Qt. Not built yet.
+
+ * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
+ * UIProcess/qt: Added.
+ * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Added.
+ (WebKit::ChunkedUpdateDrawingAreaProxy::page):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::invalidateBackingStore):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
+ * WebProcess/WebPage/qt: Added.
+ * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Added.
+ (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
+
2010-07-04 Anders Carlsson <andersca@apple.com>
Reviewed by Dan Bernstein.
#else
class WKView;
#endif
+#elif PLATFORM(QT)
+#include <QImage>
+class QGraphicsWKView;
#endif
namespace WebKit {
#elif PLATFORM(WIN)
class WebView;
typedef WebView PlatformWebView;
+#elif PLATFORM(QT)
+typedef QGraphicsWKView PlatformWebView;
#endif
class ChunkedUpdateDrawingAreaProxy : public DrawingAreaProxy {
// BackingStore
OwnPtr<HDC> m_backingStoreDC;
OwnPtr<HBITMAP> m_backingStoreBitmap;
+#elif PLATFORM(QT)
+ QImage m_backingStoreImage;
#endif
PlatformWebView* m_webView;
--- /dev/null
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 INC. 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 INC. 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 "ChunkedUpdateDrawingAreaProxy.h"
+
+#include "DrawingAreaMessageKinds.h"
+#include "DrawingAreaProxyMessageKinds.h"
+#include "UpdateChunk.h"
+#include "WKAPICast.h"
+#include "WebPageProxy.h"
+#include "qwkgraphicswidget.h"
+#include <QPainter>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebPageProxy* ChunkedUpdateDrawingAreaProxy::page()
+{
+ return toWK(m_webView->page()->pageRef());
+}
+
+void ChunkedUpdateDrawingAreaProxy::ensureBackingStore()
+{
+ if (!m_backingStoreImage.isNull())
+ return;
+
+ m_backingStoreImage = QImage(m_viewSize.width(), m_viewSize.height(), QImage::Format_RGB32);
+}
+
+void ChunkedUpdateDrawingAreaProxy::invalidateBackingStore()
+{
+ m_backingStoreImage = QImage();
+}
+
+void ChunkedUpdateDrawingAreaProxy::platformPaint(const IntRect& rect, QPainter* painter)
+{
+ if (m_backingStoreImage.isNull())
+ return;
+
+ painter->drawImage(QPoint(0, 0), m_backingStoreImage);
+}
+
+void ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore(UpdateChunk* updateChunk)
+{
+ ensureBackingStore();
+
+ QImage image(updateChunk->createImage());
+ const IntRect& updateChunkRect = updateChunk->rect();
+
+ QPainter painter(&m_backingStoreImage);
+ painter.drawImage(updateChunkRect.topLeft(), image);
+
+ m_webView->update(QRect(updateChunkRect));
+}
+
+} // namespace WebKit
--- /dev/null
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * 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 INC. 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 INC. 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 "ChunkedUpdateDrawingArea.h"
+
+#include "UpdateChunk.h"
+#include "WebPage.h"
+#include <QImage>
+#include <QPainter>
+#include <WebCore/GraphicsContext.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void ChunkedUpdateDrawingArea::paintIntoUpdateChunk(UpdateChunk* updateChunk)
+{
+ QImage image(updateChunk->createImage());
+ QPainter painter(&image);
+ // Now paint into the backing store.
+ GraphicsContext graphicsContext(&painter);
+ graphicsContext.translate(-updateChunk->rect().x(), -updateChunk->rect().y());
+
+ m_webPage->drawRect(graphicsContext, updateChunk->rect());
+}
+
+} // namespace WebKit