Changeset 68761 in webkit
- Timestamp:
- Sep 30, 2010 12:22:51 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r68653 r68761 81 81 if (!page || !page->d->client) 82 82 return 0; 83 return static_cast<PageClientQGraphicsWidget*>(page->d->client)->overlay .data();83 return static_cast<PageClientQGraphicsWidget*>(page->d->client)->overlay; 84 84 } 85 85 }; -
trunk/WebKit/qt/ChangeLog
r68760 r68761 1 2010-09-30 Benjamin Poulain <benjamin.poulain@nokia.com> 2 3 Reviewed by Andreas Kling. 4 5 [Qt] Crash if an scene with accelerated compositing layout during the paint event 6 https://bugs.webkit.org/show_bug.cgi?id=46812 7 8 Delay the deletion of the overlay after the current event is processed. 9 10 Removing the overlay can sometimes be done inside the rendering code of 11 the overlay itself. When the rendering code is using the reference after 12 the deletion of the overlay, WebKit crashes. 13 14 * Api/qgraphicswebview.cpp: 15 (QGraphicsWebViewPrivate::overlay): 16 * WebCoreSupport/PageClientQt.cpp: 17 (WebCore::PageClientQGraphicsWidget::~PageClientQGraphicsWidget): 18 (WebCore::PageClientQGraphicsWidget::createOrDeleteOverlay): 19 * WebCoreSupport/PageClientQt.h: 20 (WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget): 21 1 22 2010-09-30 Benjamin Poulain <benjamin.poulain@nokia.com> 2 23 -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r68517 r68761 106 106 PageClientQGraphicsWidget::~PageClientQGraphicsWidget() 107 107 { 108 delete overlay; 108 109 #if USE(ACCELERATED_COMPOSITING) 109 110 if (!rootGraphicsLayer) … … 151 152 if (useOverlay == !!overlay) 152 153 return; 154 153 155 if (useOverlay) { 154 overlay = QSharedPointer<QGraphicsItemOverlay>(new QGraphicsItemOverlay(view, page));156 overlay = new QGraphicsItemOverlay(view, page); 155 157 overlay->setZValue(OverlayZValue); 156 } else 157 overlay.clear(); 158 } else { 159 // Changing the overlay might be done inside paint events. 160 overlay->deleteLater(); 161 overlay = 0; 162 } 158 163 } 159 164 -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.h
r68517 r68761 33 33 #include "qwebpage_p.h" 34 34 #include <QtCore/qmetaobject.h> 35 #include <QtCore/qsharedpointer.h>36 35 #include <QtGui/qgraphicsscene.h> 37 36 #include <QtGui/qgraphicsview.h> … … 84 83 // the overlay is here for one reason only: to have the scroll-bars and other 85 84 // extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers 86 class QGraphicsItemOverlay : public QGraphics Item{85 class QGraphicsItemOverlay : public QGraphicsObject { 87 86 public: 88 87 QGraphicsItemOverlay(QGraphicsWidget* view, QWebPage* p) 89 :QGraphics Item(view)88 :QGraphicsObject(view) 90 89 , q(view) 91 90 , page(p) … … 125 124 , shouldSync(false) 126 125 #endif 126 , overlay(0) 127 127 { 128 128 Q_ASSERT(view); … … 195 195 #endif 196 196 // the overlay gets instantiated when the root layer is attached, and get deleted when it's detached 197 Q SharedPointer<QGraphicsItemOverlay>overlay;197 QGraphicsItemOverlay* overlay; 198 198 199 199 // we need to put the root graphics layer behind the overlay (which contains the scrollbar)
Note: See TracChangeset
for help on using the changeset viewer.