Changeset 49846 in webkit
- Timestamp:
- Oct 20, 2009 2:54:29 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r49782 r49846 243 243 // Re-implemented in order to allows fixing event-related bugs in patch releases. 244 244 return QGraphicsWidget::sceneEvent(event); 245 } 246 247 /*! \reimp 248 */ 249 QVariant QGraphicsWebView::itemChange(GraphicsItemChange change, const QVariant& value) 250 { 251 switch (change) { 252 // Differently from QWebView, it is interesting to QGraphicsWebView to handle 253 // post mouse cursor change notifications. Reason: 'ItemCursorChange' is sent 254 // as the first action in QGraphicsItem::setCursor implementation, and at that 255 // item widget's cursor has not been effectively changed yet. 256 // After cursor is properly set (at 'ItemCursorHasChanged' emission time), we 257 // fire 'CursorChange'. 258 case ItemCursorChange: 259 return value; 260 case ItemCursorHasChanged: 261 QEvent event(QEvent::CursorChange); 262 QApplication::sendEvent(this, &event); 263 return value; 264 } 265 266 return QGraphicsWidget::itemChange(change, value); 245 267 } 246 268 -
trunk/WebKit/qt/Api/qgraphicswebview.h
r49245 r49846 86 86 virtual void updateGeometry(); 87 87 virtual void paint(QPainter*, const QStyleOptionGraphicsItem* options, QWidget* widget = 0); 88 virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value); 88 89 virtual bool event(QEvent*); 89 90 -
trunk/WebKit/qt/ChangeLog
r49812 r49846 1 2009-10-19 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Ariya Hidayat. 4 5 [Qt] Infinite loop (leading to crash) when setting cursor in QGraphicsWebView 6 https://bugs.webkit.org/show_bug.cgi?id=30549 7 8 Patch reimplements QGraphicsItem's itemChange method, and make 9 CursorChange event to be emitted after cursor has already been 10 set. 11 12 QWidget::setCursor send the event just after it sets the cursor, 13 then patch makes both behaviors compatible. 14 15 * Api/qgraphicswebview.cpp: 16 (QGraphicsWebView::itemChange): 17 * Api/qgraphicswebview.h: 18 1 19 2009-10-19 Nate Chapin <japhet@chromium.org> 2 20
Note: See TracChangeset
for help on using the changeset viewer.