[SCM] WebKit Debian packaging branch, webkit-1.3, updated. upstream/1.3.7-4207-g178b198

commit-queue at webkit.org commit-queue at webkit.org
Sun Feb 20 23:27:45 UTC 2011


The following commit has been merged in the webkit-1.3 branch:
commit ab8d0167a5ad13f77ff3add0a9a630836965efb3
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 20 18:08:49 2011 +0000

    2011-01-20  Kimmo Kinnunen  <kimmo.t.kinnunen at nokia.com>
    
            Reviewed by Andreas Kling.
    
            Remove null ptr deref that happens when reattaching to
            a new web process.
    
            Implement didRelaunchProcess that sets the drawing area size
            after the drawing area is re-instantiated.
    
            [Qt][WK2] Null ptr deref in UI process after web process has crashed
            https://bugs.webkit.org/show_bug.cgi?id=52796
    
            * UIProcess/API/qt/qgraphicswkview.cpp:
            (QGraphicsWKView::QGraphicsWKView):
            * UIProcess/API/qt/qwkpage.cpp:
            (QWKPagePrivate::QWKPagePrivate):
            (QWKPagePrivate::init):
            (QWKPagePrivate::createDrawingAreaProxy):
            (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
            * UIProcess/API/qt/qwkpage_p.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76262 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index 1e6c768..ffa8401 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,25 @@
+2011-01-20  Kimmo Kinnunen  <kimmo.t.kinnunen at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        Remove null ptr deref that happens when reattaching to
+        a new web process.
+
+        Implement didRelaunchProcess that sets the drawing area size
+        after the drawing area is re-instantiated.
+
+        [Qt][WK2] Null ptr deref in UI process after web process has crashed
+        https://bugs.webkit.org/show_bug.cgi?id=52796
+
+        * UIProcess/API/qt/qgraphicswkview.cpp:
+        (QGraphicsWKView::QGraphicsWKView):
+        * UIProcess/API/qt/qwkpage.cpp:
+        (QWKPagePrivate::QWKPagePrivate):
+        (QWKPagePrivate::init):
+        (QWKPagePrivate::createDrawingAreaProxy):
+        (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
+        * UIProcess/API/qt/qwkpage_p.h:
+
 2011-01-20  Maciej Stachowiak  <mjs at apple.com>
 
         Reviewed by Adam Roben.
diff --git a/Source/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp b/Source/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
index f01c5b2..ec23760 100644
--- a/Source/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qgraphicswkview.cpp
@@ -66,24 +66,14 @@ QGraphicsWKView::QGraphicsWKView(QWKContext* context, BackingStoreType backingSt
     setFocusPolicy(Qt::StrongFocus);
     setAcceptHoverEvents(true);
 
-    PassOwnPtr<DrawingAreaProxy> drawingAreaProxy;
 
-    d->page = new QWKPage(context);
-
-    switch (backingStoreType) {
 #if ENABLE(TILED_BACKING_STORE)
-    case Tiled:
-        drawingAreaProxy = TiledDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
+    if (backingStoreType == Tiled)
         connect(this, SIGNAL(scaleChanged()), this, SLOT(onScaleChanged()));
-        break;
 #endif
-    case Simple:
-    default:
-        drawingAreaProxy = ChunkedUpdateDrawingAreaProxy::create(this, toImpl(page()->pageRef()));
-        break;
-    }
 
-    d->page->d->init(this, drawingAreaProxy);
+    d->page = new QWKPage(context);
+    d->page->d->init(this, backingStoreType);
     connect(d->page, SIGNAL(titleChanged(QString)), this, SIGNAL(titleChanged(QString)));
     connect(d->page, SIGNAL(loadStarted()), this, SIGNAL(loadStarted()));
     connect(d->page, SIGNAL(loadFinished(bool)), this, SIGNAL(loadFinished(bool)));
diff --git a/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp b/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
index f645db8..807044b 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
+++ b/Source/WebKit2/UIProcess/API/qt/qwkpage.cpp
@@ -88,6 +88,7 @@ QWKPagePrivate::QWKPagePrivate(QWKPage* qq, QWKContext* c)
     , context(c)
     , preferences(0)
     , createNewPageFn(0)
+    , backingStoreType(QGraphicsWKView::Simple)
 {
     memset(actions, 0, sizeof(actions));
     page = context->d->context->createWebPage(this, 0);
@@ -100,10 +101,10 @@ QWKPagePrivate::~QWKPagePrivate()
     delete history;
 }
 
-void QWKPagePrivate::init(QGraphicsItem* view, PassOwnPtr<DrawingAreaProxy> proxy)
+void QWKPagePrivate::init(QGraphicsItem* view, QGraphicsWKView::BackingStoreType backingStoreType)
 {
     this->view = view;
-    page->setDrawingArea(proxy);
+    this->backingStoreType = backingStoreType;
     page->initializeWebPage();
 }
 
@@ -131,7 +132,7 @@ PassOwnPtr<DrawingAreaProxy> QWKPagePrivate::createDrawingAreaProxy()
     QGraphicsWKView* wkView = static_cast<QGraphicsWKView*>(view);
 
 #if ENABLE(TILED_BACKING_STORE)
-    if (page->drawingArea()->info().type == DrawingAreaInfo::Tiled)
+    if (backingStoreType == QGraphicsWKView::Tiled)
         return TiledDrawingAreaProxy::create(wkView, page.get());
 #endif
     return ChunkedUpdateDrawingAreaProxy::create(wkView, page.get());
@@ -385,6 +386,13 @@ void QWKPagePrivate::touchEvent(QTouchEvent* event)
 #endif
 }
 
+void QWKPagePrivate::didRelaunchProcess()
+{
+    QGraphicsWKView* wkView = static_cast<QGraphicsWKView*>(view);
+    if (wkView)
+        q->setViewportSize(wkView->size().toSize());
+}
+
 QWKPage::QWKPage(QWKContext* context)
     : d(new QWKPagePrivate(this, context))
 {
diff --git a/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h b/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
index a15b851..420ff62 100644
--- a/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qwkpage_p.h
@@ -24,6 +24,7 @@
 #include "DrawingAreaProxy.h"
 #include "PageClient.h"
 #include "qwkpage.h"
+#include "qgraphicswkview.h"
 #include "WebPageProxy.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/RefPtr.h>
@@ -41,7 +42,7 @@ public:
 
     static QWKPagePrivate* get(QWKPage* page) { return page->d; }
 
-    void init(QGraphicsItem*, WTF::PassOwnPtr<WebKit::DrawingAreaProxy>);
+    void init(QGraphicsItem*, QGraphicsWKView::BackingStoreType);
 
     // PageClient
     virtual PassOwnPtr<WebKit::DrawingAreaProxy> createDrawingAreaProxy();
@@ -61,7 +62,7 @@ public:
 #endif // USE(ACCELERATED_COMPOSITING)
     virtual void pageDidRequestScroll(const WebCore::IntSize&);
     virtual void processDidCrash() { }
-    virtual void didRelaunchProcess() { }
+    virtual void didRelaunchProcess();
     virtual void didChangeContentsSize(const WebCore::IntSize&);
     virtual void didFindZoomableArea(const WebCore::IntRect&);
     virtual void setCursor(const WebCore::Cursor&);
@@ -120,6 +121,7 @@ public:
 
     QPoint tripleClick;
     QBasicTimer tripleClickTimer;
+    QGraphicsWKView::BackingStoreType backingStoreType;
 };
 
 class QtViewportAttributesPrivate : public QSharedData {

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list