[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
andersca at apple.com
andersca at apple.com
Wed Dec 22 17:51:16 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 3dbb1ac3830f5489d22c93c1048de0c9049c7eac
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Dec 1 18:23:13 2010 +0000
Get rid of DrawingAreaBase
https://bugs.webkit.org/show_bug.cgi?id=50329
Reviewed by Andreas Kling.
* Scripts/webkit2/messages.py:
* Shared/DrawingAreaInfo.h:
(WebKit::DrawingAreaInfo::DrawingAreaInfo):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
(-[WKView _pageDidEnterAcceleratedCompositing]):
(-[WKView _pageDidLeaveAcceleratedCompositing]):
* UIProcess/API/qt/qgraphicswkview.cpp:
(QGraphicsWKView::takeSnapshot):
(QGraphicsWKViewPrivate::commitScale):
* UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
(WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
(WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
(WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
(WebKit::ChunkedUpdateDrawingAreaProxy::update):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::nextIdentifier):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::info):
* UIProcess/LayerBackedDrawingAreaProxy.cpp:
(WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
(WebKit::LayerBackedDrawingAreaProxy::setSize):
(WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
(WebKit::LayerBackedDrawingAreaProxy::update):
* UIProcess/TiledDrawingAreaProxy.cpp:
(WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeAcceleratedCompositing):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
(WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
(WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
* WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
(WebKit::DrawingArea::DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::info):
* WebProcess/WebPage/LayerBackedDrawingArea.cpp:
(WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
(WebKit::LayerBackedDrawingArea::didReceiveMessage):
* WebProcess/WebPage/LayerBackedDrawingArea.h:
* WebProcess/WebPage/TiledDrawingArea.cpp:
(WebKit::TiledDrawingArea::TiledDrawingArea):
* WebProcess/WebPage/TiledDrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::changeAcceleratedCompositingMode):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73036 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 1382c43..2f17d9a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,64 @@
+2010-12-01 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Andreas Kling.
+
+ Get rid of DrawingAreaBase
+ https://bugs.webkit.org/show_bug.cgi?id=50329
+
+ * Scripts/webkit2/messages.py:
+ * Shared/DrawingAreaInfo.h:
+ (WebKit::DrawingAreaInfo::DrawingAreaInfo):
+ * Shared/WebPageCreationParameters.h:
+ * UIProcess/API/mac/WKView.mm:
+ (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
+ (-[WKView _pageDidEnterAcceleratedCompositing]):
+ (-[WKView _pageDidLeaveAcceleratedCompositing]):
+ * UIProcess/API/qt/qgraphicswkview.cpp:
+ (QGraphicsWKView::takeSnapshot):
+ (QGraphicsWKViewPrivate::commitScale):
+ * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
+ (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
+ (WebKit::ChunkedUpdateDrawingAreaProxy::update):
+ * UIProcess/DrawingAreaProxy.cpp:
+ (WebKit::DrawingAreaProxy::DrawingAreaProxy):
+ (WebKit::DrawingAreaProxy::nextIdentifier):
+ * UIProcess/DrawingAreaProxy.h:
+ (WebKit::DrawingAreaProxy::info):
+ * UIProcess/LayerBackedDrawingAreaProxy.cpp:
+ (WebKit::LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy):
+ (WebKit::LayerBackedDrawingAreaProxy::setSize):
+ (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
+ (WebKit::LayerBackedDrawingAreaProxy::update):
+ * UIProcess/TiledDrawingAreaProxy.cpp:
+ (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::didChangeAcceleratedCompositing):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/win/WebView.cpp:
+ (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
+ * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
+ (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
+ (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
+ * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
+ * WebProcess/WebPage/DrawingArea.cpp:
+ (WebKit::DrawingArea::create):
+ (WebKit::DrawingArea::DrawingArea):
+ * WebProcess/WebPage/DrawingArea.h:
+ (WebKit::DrawingArea::info):
+ * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
+ (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
+ (WebKit::LayerBackedDrawingArea::didReceiveMessage):
+ * WebProcess/WebPage/LayerBackedDrawingArea.h:
+ * WebProcess/WebPage/TiledDrawingArea.cpp:
+ (WebKit::TiledDrawingArea::TiledDrawingArea):
+ * WebProcess/WebPage/TiledDrawingArea.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::WebPage):
+ (WebKit::WebPage::changeAcceleratedCompositingMode):
+
2010-11-30 Ryosuke Niwa <rniwa at webkit.org>
Unreviewed speculative build fix for Windows.
diff --git a/WebKit2/Scripts/webkit2/messages.py b/WebKit2/Scripts/webkit2/messages.py
index 7515ca1..1059d12 100644
--- a/WebKit2/Scripts/webkit2/messages.py
+++ b/WebKit2/Scripts/webkit2/messages.py
@@ -415,8 +415,6 @@ def headers_for_type(type):
'WebKit::WebMouseEvent': '"WebEvent.h"',
'WebKit::WebWheelEvent': '"WebEvent.h"',
'WebKit::WebTouchEvent': '"WebEvent.h"',
- 'WebKit::DrawingAreaBase::DrawingAreaInfo': '"DrawingAreaInfo.h"'
-
}
if type in special_cases:
return [special_cases[type]]
diff --git a/WebKit2/Shared/DrawingAreaInfo.h b/WebKit2/Shared/DrawingAreaInfo.h
index 7a0e394..25278b9 100644
--- a/WebKit2/Shared/DrawingAreaInfo.h
+++ b/WebKit2/Shared/DrawingAreaInfo.h
@@ -36,49 +36,40 @@ namespace WebCore {
namespace WebKit {
-class DrawingAreaBase {
-public:
+struct DrawingAreaInfo {
enum Type {
None,
- ChunkedUpdateDrawingAreaType,
+ ChunkedUpdate,
#if USE(ACCELERATED_COMPOSITING)
- LayerBackedDrawingAreaType,
+ LayerBacked,
#endif
#if ENABLE(TILED_BACKING_STORE)
- TiledDrawingAreaType,
+ Tiled,
#endif
};
- typedef uint64_t DrawingAreaID;
-
- struct DrawingAreaInfo {
- Type type;
- DrawingAreaID id;
+ typedef uint64_t Identifier;
- DrawingAreaInfo(Type type = None, DrawingAreaID identifier = 0)
- : type(type)
- , id(identifier)
- {
- }
- };
-
- virtual ~DrawingAreaBase() { }
-
- const DrawingAreaInfo& info() const { return m_info; }
-
-protected:
- DrawingAreaBase(Type type, DrawingAreaID identifier)
- : m_info(type, identifier)
+ DrawingAreaInfo()
+ : type(None)
+ , identifier(0)
{
}
- DrawingAreaInfo m_info;
+ DrawingAreaInfo(Type type, Identifier identifier)
+ : type(type)
+ , identifier(identifier)
+ {
+ }
+
+ Type type;
+ Identifier identifier;
};
} // namespace WebKit
namespace CoreIPC {
-template<> struct ArgumentCoder<WebKit::DrawingAreaBase::DrawingAreaInfo> : SimpleArgumentCoder<WebKit::DrawingAreaBase::DrawingAreaInfo> { };
+template<> struct ArgumentCoder<WebKit::DrawingAreaInfo> : SimpleArgumentCoder<WebKit::DrawingAreaInfo> { };
}
#endif // DrawingAreaInfo_h
diff --git a/WebKit2/Shared/WebPageCreationParameters.h b/WebKit2/Shared/WebPageCreationParameters.h
index 0e87bd7..b90eb3f 100644
--- a/WebKit2/Shared/WebPageCreationParameters.h
+++ b/WebKit2/Shared/WebPageCreationParameters.h
@@ -43,7 +43,7 @@ struct WebPageCreationParameters {
WebCore::IntSize viewSize;
WebPreferencesStore store;
- DrawingAreaBase::DrawingAreaInfo drawingAreaInfo;
+ DrawingAreaInfo drawingAreaInfo;
bool visibleToInjectedBundle;
#if PLATFORM(WIN)
HWND nativeWindow;
diff --git a/WebKit2/UIProcess/API/mac/WKView.mm b/WebKit2/UIProcess/API/mac/WKView.mm
index f08c865..fe0c260 100644
--- a/WebKit2/UIProcess/API/mac/WKView.mm
+++ b/WebKit2/UIProcess/API/mac/WKView.mm
@@ -966,21 +966,21 @@ static NSScreen *screenForWindow(NSWindow *window)
}
}
-- (void)_switchToDrawingAreaTypeIfNecessary:(DrawingAreaBase::Type)type
+- (void)_switchToDrawingAreaTypeIfNecessary:(DrawingAreaInfo::Type)type
{
- DrawingAreaBase::Type existingDrawingAreaType = _data->_page->drawingArea() ? _data->_page->drawingArea()->info().type : DrawingAreaBase::None;
+ DrawingAreaInfo::Type existingDrawingAreaType = _data->_page->drawingArea() ? _data->_page->drawingArea()->info().type : DrawingAreaInfo::None;
if (existingDrawingAreaType == type)
return;
OwnPtr<DrawingAreaProxy> newDrawingArea;
switch (type) {
- case DrawingAreaBase::None:
+ case DrawingAreaInfo::None:
break;
- case DrawingAreaBase::ChunkedUpdateDrawingAreaType: {
+ case DrawingAreaInfo::ChunkedUpdate: {
newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(self);
break;
}
- case DrawingAreaBase::LayerBackedDrawingAreaType: {
+ case DrawingAreaInfo::LayerBacked: {
newDrawingArea = LayerBackedDrawingAreaProxy::create(self);
break;
}
@@ -994,13 +994,13 @@ static NSScreen *screenForWindow(NSWindow *window)
- (void)_pageDidEnterAcceleratedCompositing
{
- [self _switchToDrawingAreaTypeIfNecessary:DrawingAreaBase::LayerBackedDrawingAreaType];
+ [self _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::LayerBacked];
}
- (void)_pageDidLeaveAcceleratedCompositing
{
// FIXME: we may want to avoid flipping back to the non-layer-backed drawing area until the next page load, to avoid thrashing.
- [self _switchToDrawingAreaTypeIfNecessary:DrawingAreaBase::ChunkedUpdateDrawingAreaType];
+ [self _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::ChunkedUpdate];
}
#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp b/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
index ddd2b27..d6efd93 100644
--- a/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
+++ b/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
@@ -326,7 +326,7 @@ void QGraphicsWKView::takeSnapshot(const QSize& size, const QRect& contentsRect)
{
#if ENABLE(TILED_BACKING_STORE)
DrawingAreaProxy* drawingArea = page()->d->page->drawingArea();
- if (drawingArea->info().type != DrawingAreaBase::TiledDrawingAreaType)
+ if (drawingArea->info().type != DrawingAreaInfo::Tiled)
return;
TiledDrawingAreaProxy* tiledDrawingArea = static_cast<TiledDrawingAreaProxy*>(drawingArea);
tiledDrawingArea->takeSnapshot(size, contentsRect);
@@ -386,7 +386,7 @@ void QGraphicsWKViewPrivate::commitScale()
#if ENABLE(TILED_BACKING_STORE)
DrawingAreaProxy* drawingArea = page->d->page->drawingArea();
float newScale = q->scale();
- if (drawingArea->info().type == DrawingAreaBase::TiledDrawingAreaType) {
+ if (drawingArea->info().type == DrawingAreaInfo::Tiled) {
TiledDrawingAreaProxy* tiledDrawingArea = static_cast<TiledDrawingAreaProxy*>(drawingArea);
if (tiledDrawingArea->contentsScale() == newScale)
return;
diff --git a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
index c952e6a..800ffef 100644
--- a/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
@@ -43,7 +43,7 @@ PassOwnPtr<ChunkedUpdateDrawingAreaProxy> ChunkedUpdateDrawingAreaProxy::create(
}
ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy(PlatformWebView* webView)
- : DrawingAreaProxy(DrawingAreaBase::ChunkedUpdateDrawingAreaType)
+ : DrawingAreaProxy(DrawingAreaInfo::ChunkedUpdate)
, m_isWaitingForDidSetFrameNotification(false)
, m_isVisible(true)
, m_forceRepaintWhenResumingPainting(false)
@@ -91,7 +91,7 @@ void ChunkedUpdateDrawingAreaProxy::setSize(const IntSize& viewSize)
m_isWaitingForDidSetFrameNotification = true;
page->process()->responsivenessTimer()->start();
- page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().id, viewSize));
+ page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().identifier, viewSize));
}
void ChunkedUpdateDrawingAreaProxy::setPageIsVisible(bool isVisible)
@@ -107,12 +107,12 @@ void ChunkedUpdateDrawingAreaProxy::setPageIsVisible(bool isVisible)
if (!m_isVisible) {
// Tell the web process that it doesn't need to paint anything for now.
- page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().id));
+ page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().identifier));
return;
}
// The page is now visible, resume painting.
- page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().id, m_forceRepaintWhenResumingPainting));
+ page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().identifier, m_forceRepaintWhenResumingPainting));
m_forceRepaintWhenResumingPainting = false;
}
@@ -147,7 +147,7 @@ void ChunkedUpdateDrawingAreaProxy::update(UpdateChunk* updateChunk)
}
WebPageProxy* page = this->page();
- page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().id));
+ page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().identifier));
}
void ChunkedUpdateDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.cpp b/WebKit2/UIProcess/DrawingAreaProxy.cpp
index ec4a4fb..0dd066c 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/DrawingAreaProxy.cpp
@@ -27,8 +27,8 @@
namespace WebKit {
-DrawingAreaProxy::DrawingAreaProxy(DrawingAreaBase::Type type)
- : m_info(type, nextDrawingAreaID())
+DrawingAreaProxy::DrawingAreaProxy(DrawingAreaInfo::Type type)
+ : m_info(type, nextIdentifier())
{
}
@@ -36,9 +36,9 @@ DrawingAreaProxy::~DrawingAreaProxy()
{
}
-DrawingAreaBase::DrawingAreaID DrawingAreaProxy::nextDrawingAreaID()
+DrawingAreaInfo::Identifier DrawingAreaProxy::nextIdentifier()
{
- static DrawingAreaBase::DrawingAreaID nextID = 1;
+ static DrawingAreaInfo::Identifier nextID = 1;
return ++nextID;
}
diff --git a/WebKit2/UIProcess/DrawingAreaProxy.h b/WebKit2/UIProcess/DrawingAreaProxy.h
index a7b569f..f38efc6 100644
--- a/WebKit2/UIProcess/DrawingAreaProxy.h
+++ b/WebKit2/UIProcess/DrawingAreaProxy.h
@@ -45,7 +45,7 @@ typedef QPainter* PlatformDrawingContext;
class DrawingAreaProxy {
public:
- static DrawingAreaBase::DrawingAreaID nextDrawingAreaID();
+ static DrawingAreaInfo::Identifier nextIdentifier();
virtual ~DrawingAreaProxy();
@@ -63,12 +63,12 @@ public:
virtual void detachCompositingContext() = 0;
#endif
- const DrawingAreaBase::DrawingAreaInfo info() const { return m_info; }
+ const DrawingAreaInfo& info() const { return m_info; }
protected:
- explicit DrawingAreaProxy(DrawingAreaBase::Type);
+ explicit DrawingAreaProxy(DrawingAreaInfo::Type);
- DrawingAreaBase::DrawingAreaInfo m_info;
+ DrawingAreaInfo m_info;
WebCore::IntSize m_size;
};
diff --git a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
index 109c5c3..9e709cf 100644
--- a/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
@@ -44,7 +44,7 @@ PassOwnPtr<LayerBackedDrawingAreaProxy> LayerBackedDrawingAreaProxy::create(Plat
}
LayerBackedDrawingAreaProxy::LayerBackedDrawingAreaProxy(PlatformWebView* webView)
- : DrawingAreaProxy(DrawingAreaBase::LayerBackedDrawingAreaType)
+ : DrawingAreaProxy(DrawingAreaInfo::LayerBacked)
, m_isWaitingForDidSetFrameNotification(false)
, m_isVisible(true)
, m_webView(webView)
@@ -81,7 +81,7 @@ void LayerBackedDrawingAreaProxy::setSize(const IntSize& viewSize)
m_isWaitingForDidSetFrameNotification = true;
page->process()->responsivenessTimer()->start();
- page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().id, viewSize));
+ page->process()->send(DrawingAreaMessage::SetSize, page->pageID(), CoreIPC::In(info().identifier, viewSize));
}
#if !PLATFORM(MAC) && !PLATFORM(WIN)
@@ -103,12 +103,12 @@ void LayerBackedDrawingAreaProxy::setPageIsVisible(bool isVisible)
if (!m_isVisible) {
// Tell the web process that it doesn't need to paint anything for now.
- page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().id));
+ page->process()->send(DrawingAreaMessage::SuspendPainting, page->pageID(), CoreIPC::In(info().identifier));
return;
}
// The page is now visible.
- page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().id));
+ page->process()->send(DrawingAreaMessage::ResumePainting, page->pageID(), CoreIPC::In(info().identifier));
// FIXME: We should request a full repaint here if needed.
}
@@ -124,7 +124,7 @@ void LayerBackedDrawingAreaProxy::didSetSize()
void LayerBackedDrawingAreaProxy::update()
{
WebPageProxy* page = this->page();
- page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().id));
+ page->process()->send(DrawingAreaMessage::DidUpdate, page->pageID(), CoreIPC::In(info().identifier));
}
void LayerBackedDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
diff --git a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
index 5dbf405..b79ec02 100644
--- a/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
+++ b/WebKit2/UIProcess/TiledDrawingAreaProxy.cpp
@@ -46,7 +46,7 @@ PassOwnPtr<TiledDrawingAreaProxy> TiledDrawingAreaProxy::create(PlatformWebView*
}
TiledDrawingAreaProxy::TiledDrawingAreaProxy(PlatformWebView* webView)
- : DrawingAreaProxy(DrawingAreaBase::TiledDrawingAreaType)
+ : DrawingAreaProxy(DrawingAreaInfo::Tiled)
, m_isWaitingForDidSetFrameNotification(false)
, m_isVisible(true)
, m_webView(webView)
diff --git a/WebKit2/UIProcess/WebPageProxy.cpp b/WebKit2/UIProcess/WebPageProxy.cpp
index d72b361..c4982bb 100644
--- a/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/WebKit2/UIProcess/WebPageProxy.cpp
@@ -1426,7 +1426,7 @@ void WebPageProxy::focusedFrameChanged(uint64_t frameID)
}
#if USE(ACCELERATED_COMPOSITING)
-void WebPageProxy::didChangeAcceleratedCompositing(bool compositing, DrawingAreaBase::DrawingAreaInfo& drawingAreaInfo)
+void WebPageProxy::didChangeAcceleratedCompositing(bool compositing, DrawingAreaInfo& drawingAreaInfo)
{
if (compositing)
didEnterAcceleratedCompositing();
diff --git a/WebKit2/UIProcess/WebPageProxy.h b/WebKit2/UIProcess/WebPageProxy.h
index ccc8588..4237ca3 100644
--- a/WebKit2/UIProcess/WebPageProxy.h
+++ b/WebKit2/UIProcess/WebPageProxy.h
@@ -375,7 +375,7 @@ private:
void focusedFrameChanged(uint64_t frameID);
#if USE(ACCELERATED_COMPOSITING)
- void didChangeAcceleratedCompositing(bool compositing, DrawingAreaBase::DrawingAreaInfo&);
+ void didChangeAcceleratedCompositing(bool compositing, DrawingAreaInfo&);
#endif
PageClient* m_pageClient;
diff --git a/WebKit2/UIProcess/WebPageProxy.messages.in b/WebKit2/UIProcess/WebPageProxy.messages.in
index 774371f..a585cce 100644
--- a/WebKit2/UIProcess/WebPageProxy.messages.in
+++ b/WebKit2/UIProcess/WebPageProxy.messages.in
@@ -133,6 +133,6 @@ messages -> WebPageProxy {
#if USE(ACCELERATED_COMPOSITING)
# Accelerated compsiting messages.
- DidChangeAcceleratedCompositing(bool compositing) -> (WebKit::DrawingAreaBase::DrawingAreaInfo newDrawingArea)
+ DidChangeAcceleratedCompositing(bool compositing) -> (WebKit::DrawingAreaInfo newDrawingArea)
#endif
}
diff --git a/WebKit2/UIProcess/win/WebView.cpp b/WebKit2/UIProcess/win/WebView.cpp
index 91d7433..f969294 100644
--- a/WebKit2/UIProcess/win/WebView.cpp
+++ b/WebKit2/UIProcess/win/WebView.cpp
@@ -662,22 +662,20 @@ void WebView::pageDidLeaveAcceleratedCompositing()
void WebView::switchToDrawingAreaTypeIfNecessary(DrawingAreaBase::Type type)
{
- DrawingAreaBase::Type existingDrawingAreaType = m_page->drawingArea() ? m_page->drawingArea()->info().type : DrawingAreaBase::None;
+ DrawingAreaInfo::Type existingDrawingAreaType = m_page->drawingArea() ? m_page->drawingArea()->info().type : DrawingAreaInfo::None;
if (existingDrawingAreaType == type)
return;
OwnPtr<DrawingAreaProxy> newDrawingArea;
switch (type) {
- case DrawingAreaBase::None:
+ case DrawingAreaInfo::None:
break;
- case DrawingAreaBase::ChunkedUpdateDrawingAreaType: {
+ case DrawingAreaInfo::Chunked:
newDrawingArea = ChunkedUpdateDrawingAreaProxy::create(this);
break;
- }
- case DrawingAreaBase::LayerBackedDrawingAreaType: {
+ case DrawingAreaInfo::LayerBacked:
newDrawingArea = LayerBackedDrawingAreaProxy::create(this);
break;
- }
}
if (m_page->drawingArea())
diff --git a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
index c11cb48..f46ef2e 100644
--- a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
@@ -37,8 +37,8 @@ using namespace WebCore;
namespace WebKit {
-ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage* webPage)
- : DrawingArea(DrawingAreaBase::ChunkedUpdateDrawingAreaType, identifier, webPage)
+ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea(DrawingAreaInfo::Identifier identifier, WebPage* webPage)
+ : DrawingArea(DrawingAreaInfo::ChunkedUpdate, identifier, webPage)
, m_isWaitingForUpdate(false)
, m_paintingIsSuspended(false)
, m_displayTimer(WebProcess::shared().runLoop(), this, &ChunkedUpdateDrawingArea::display)
@@ -188,12 +188,12 @@ void ChunkedUpdateDrawingArea::didUpdate()
void ChunkedUpdateDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
- DrawingAreaBase::DrawingAreaID targetDrawingAreaID;
- if (!arguments->decode(CoreIPC::Out(targetDrawingAreaID)))
+ DrawingAreaInfo::Identifier targetIdentifier;
+ if (!arguments->decode(CoreIPC::Out(targetIdentifier)))
return;
// We can switch drawing areas on the fly, so if this message was targetted at an obsolete drawing area, ignore it.
- if (targetDrawingAreaID != info().id)
+ if (targetIdentifier != info().identifier)
return;
switch (messageID.get<DrawingAreaMessage::Kind>()) {
diff --git a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
index ad39d28..5cc9271 100644
--- a/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
@@ -36,7 +36,7 @@ class UpdateChunk;
class ChunkedUpdateDrawingArea : public DrawingArea {
public:
- ChunkedUpdateDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage*);
+ ChunkedUpdateDrawingArea(DrawingAreaInfo::Identifier identifier, WebPage*);
virtual ~ChunkedUpdateDrawingArea();
virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate);
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.cpp b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
index a56cedf..9700884 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.cpp
@@ -37,22 +37,22 @@
namespace WebKit {
-PassRefPtr<DrawingArea> DrawingArea::create(DrawingAreaBase::Type type, DrawingAreaBase::DrawingAreaID identifier, WebPage* webPage)
+PassRefPtr<DrawingArea> DrawingArea::create(DrawingAreaInfo::Type type, DrawingAreaInfo::Identifier identifier, WebPage* webPage)
{
switch (type) {
- case DrawingAreaBase::None:
+ case DrawingAreaInfo::None:
ASSERT_NOT_REACHED();
break;
- case DrawingAreaBase::ChunkedUpdateDrawingAreaType:
+ case DrawingAreaInfo::ChunkedUpdate:
return adoptRef(new ChunkedUpdateDrawingArea(identifier, webPage));
#if USE(ACCELERATED_COMPOSITING) && PLATFORM(MAC)
- case DrawingAreaBase::LayerBackedDrawingAreaType:
+ case DrawingAreaInfo::LayerBacked:
return adoptRef(new LayerBackedDrawingArea(identifier, webPage));
#endif
#if ENABLE(TILED_BACKING_STORE)
- case DrawingAreaBase::TiledDrawingAreaType:
+ case DrawingAreaInfo::Tiled:
return adoptRef(new TiledDrawingArea(identifier, webPage));
#endif
}
@@ -60,7 +60,7 @@ PassRefPtr<DrawingArea> DrawingArea::create(DrawingAreaBase::Type type, DrawingA
return 0;
}
-DrawingArea::DrawingArea(DrawingAreaBase::Type type, DrawingAreaBase::DrawingAreaID identifier, WebPage* webPage)
+DrawingArea::DrawingArea(DrawingAreaInfo::Type type, DrawingAreaInfo::Identifier identifier, WebPage* webPage)
: m_info(type, identifier)
, m_webPage(webPage)
{
diff --git a/WebKit2/WebProcess/WebPage/DrawingArea.h b/WebKit2/WebProcess/WebPage/DrawingArea.h
index f989b8d..74e975f 100644
--- a/WebKit2/WebProcess/WebPage/DrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/DrawingArea.h
@@ -44,7 +44,7 @@ class WebPage;
class DrawingArea : public RefCounted<DrawingArea> {
public:
// FIXME: It might make sense to move this create function into a factory style class.
- static PassRefPtr<DrawingArea> create(DrawingAreaBase::Type, DrawingAreaBase::DrawingAreaID, WebPage*);
+ static PassRefPtr<DrawingArea> create(DrawingAreaInfo::Type, DrawingAreaInfo::Identifier, WebPage*);
virtual ~DrawingArea();
@@ -66,12 +66,12 @@ public:
virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0;
- const DrawingAreaBase::DrawingAreaInfo& info() const { return m_info; }
+ const DrawingAreaInfo& info() const { return m_info; }
protected:
- DrawingArea(DrawingAreaBase::Type, DrawingAreaBase::DrawingAreaID, WebPage*);
+ DrawingArea(DrawingAreaInfo::Type, DrawingAreaInfo::Identifier, WebPage*);
- DrawingAreaBase::DrawingAreaInfo m_info;
+ DrawingAreaInfo m_info;
WebPage* m_webPage;
};
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
index 7fb48a7..4895ce0 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
@@ -39,8 +39,8 @@ using namespace WebCore;
namespace WebKit {
-LayerBackedDrawingArea::LayerBackedDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage* webPage)
- : DrawingArea(DrawingAreaBase::LayerBackedDrawingAreaType, identifier, webPage)
+LayerBackedDrawingArea::LayerBackedDrawingArea(DrawingAreaInfo::Identifier identifier, WebPage* webPage)
+ : DrawingArea(DrawingAreaInfo::LayerBacked, identifier, webPage)
, m_syncTimer(WebProcess::shared().runLoop(), this, &LayerBackedDrawingArea::syncCompositingLayers)
, m_attached(false)
, m_shouldPaint(true)
@@ -143,12 +143,12 @@ void LayerBackedDrawingArea::didUpdate()
void LayerBackedDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
- DrawingAreaBase::DrawingAreaID targetDrawingAreaID;
- if (!arguments->decode(CoreIPC::Out(targetDrawingAreaID)))
+ DrawingAreaInfo::Identifier targetIdentifier;
+ if (!arguments->decode(CoreIPC::Out(targetIdentifier)))
return;
// We can switch drawing areas on the fly, so if this message was targetted at an obsolete drawing area, ignore it.
- if (targetDrawingAreaID != info().id)
+ if (targetIdentifier != info().identifier)
return;
switch (messageID.get<DrawingAreaMessage::Kind>()) {
diff --git a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
index 8a4ee02..b4dccf3 100644
--- a/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
@@ -52,7 +52,7 @@ namespace WebKit {
class LayerBackedDrawingArea : public DrawingArea, private WebCore::GraphicsLayerClient {
public:
- LayerBackedDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage*);
+ LayerBackedDrawingArea(DrawingAreaInfo::Identifier identifier, WebPage*);
virtual ~LayerBackedDrawingArea();
virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate);
diff --git a/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp b/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp
index 73f26be..8ecf396 100644
--- a/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp
+++ b/WebKit2/WebProcess/WebPage/TiledDrawingArea.cpp
@@ -42,8 +42,8 @@ using namespace WebCore;
namespace WebKit {
-TiledDrawingArea::TiledDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage* webPage)
- : DrawingArea(DrawingAreaBase::TiledDrawingAreaType, identifier, webPage)
+TiledDrawingArea::TiledDrawingArea(DrawingAreaInfo::Identifier identifier, WebPage* webPage)
+ : DrawingArea(DrawingAreaInfo::Tiled, identifier, webPage)
, m_isWaitingForUpdate(false)
, m_shouldPaint(true)
, m_displayTimer(WebProcess::shared().runLoop(), this, &TiledDrawingArea::display)
diff --git a/WebKit2/WebProcess/WebPage/TiledDrawingArea.h b/WebKit2/WebProcess/WebPage/TiledDrawingArea.h
index 58db843..a7e418c 100644
--- a/WebKit2/WebProcess/WebPage/TiledDrawingArea.h
+++ b/WebKit2/WebProcess/WebPage/TiledDrawingArea.h
@@ -40,7 +40,7 @@ class UpdateChunk;
class TiledDrawingArea : public DrawingArea {
public:
- TiledDrawingArea(DrawingAreaBase::DrawingAreaID identifier, WebPage*);
+ TiledDrawingArea(DrawingAreaInfo::Identifier, WebPage*);
virtual ~TiledDrawingArea();
virtual void invalidateWindow(const WebCore::IntRect& rect, bool immediate);
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 3d6a15b..cdeda79 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -148,7 +148,7 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
platformInitialize();
Settings::setMinDOMTimerInterval(0.004);
- m_drawingArea = DrawingArea::create(parameters.drawingAreaInfo.type, parameters.drawingAreaInfo.id, this);
+ m_drawingArea = DrawingArea::create(parameters.drawingAreaInfo.type, parameters.drawingAreaInfo.identifier, this);
m_mainFrame = WebFrame::createMainFrame(this);
@@ -272,15 +272,15 @@ void WebPage::changeAcceleratedCompositingMode(WebCore::GraphicsLayer* layer)
// Tell the UI process that accelerated compositing changed. It may respond by changing
// drawing area types.
- DrawingAreaBase::DrawingAreaInfo newDrawingAreaInfo;
+ DrawingAreaInfo newDrawingAreaInfo;
if (!WebProcess::shared().connection()->sendSync(Messages::WebPageProxy::DidChangeAcceleratedCompositing(compositing), Messages::WebPageProxy::DidChangeAcceleratedCompositing::Reply(newDrawingAreaInfo), m_pageID))
return;
if (newDrawingAreaInfo.type != drawingArea()->info().type) {
m_drawingArea = 0;
- if (newDrawingAreaInfo.type != DrawingAreaBase::None) {
- m_drawingArea = DrawingArea::create(newDrawingAreaInfo.type, newDrawingAreaInfo.id, this);
+ if (newDrawingAreaInfo.type != DrawingAreaInfo::None) {
+ m_drawingArea = DrawingArea::create(newDrawingAreaInfo.type, newDrawingAreaInfo.identifier, this);
m_drawingArea->setNeedsDisplay(IntRect(IntPoint(0, 0), m_viewSize));
}
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list