Changeset 68653 in webkit
- Timestamp:
- Sep 29, 2010 9:46:27 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r68517 r68653 77 77 bool resizesToContents; 78 78 79 // Just a convenience to avoid using page->client->overlay always 80 QSharedPointer<QGraphicsItemOverlay> overlay; 79 QGraphicsItemOverlay* overlay() const 80 { 81 if (!page || !page->d->client) 82 return 0; 83 return static_cast<PageClientQGraphicsWidget*>(page->d->client)->overlay.data(); 84 } 81 85 }; 82 86 … … 295 299 #endif 296 300 #if USE(ACCELERATED_COMPOSITING) 297 page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());301 page()->mainFrame()->render(painter, d->overlay() ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect()); 298 302 #else 299 303 page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect()); … … 446 450 447 451 d->page->d->client = new PageClientQGraphicsWidget(this, page); // set the page client 448 d->overlay = static_cast<PageClientQGraphicsWidget*>(d->page->d->client)->overlay; 449 450 if (d->overlay) 451 d->overlay->prepareGraphicsItemGeometryChange(); 452 453 if (d->overlay()) 454 d->overlay()->prepareGraphicsItemGeometryChange(); 452 455 453 456 QSize size = geometry().size().toSize(); … … 561 564 void QGraphicsWebView::updateGeometry() 562 565 { 563 if (d->overlay )564 d->overlay ->prepareGraphicsItemGeometryChange();566 if (d->overlay()) 567 d->overlay()->prepareGraphicsItemGeometryChange(); 565 568 566 569 QGraphicsWidget::updateGeometry(); … … 579 582 QGraphicsWidget::setGeometry(rect); 580 583 581 if (d->overlay )582 d->overlay ->prepareGraphicsItemGeometryChange();584 if (d->overlay()) 585 d->overlay()->prepareGraphicsItemGeometryChange(); 583 586 584 587 if (!d->page) -
trunk/WebKit/qt/ChangeLog
r68576 r68653 1 2010-09-29 Andreas Kling <andreas.kling@nokia.com> 2 3 Reviewed by Ariya Hidayat. 4 5 [Qt] Don't keep local reference to QGraphicsItemOverlay in QGWVPrivate 6 https://bugs.webkit.org/show_bug.cgi?id=46812 7 8 Get the QGraphicsItemOverlay* via the QWebPageClient (d->page->d->client) 9 instead of keeping a local pointer to it. 10 11 This is cleanup for a follow-up patch. 12 13 * Api/qgraphicswebview.cpp: 14 (QGraphicsWebViewPrivate::overlay): 15 (QGraphicsWebView::paint): 16 (QGraphicsWebView::setPage): 17 (QGraphicsWebView::updateGeometry): 18 (QGraphicsWebView::setGeometry): 19 1 20 2010-09-28 Jenn Braithwaite <jennb@chromium.org> 2 21
Note: See TracChangeset
for help on using the changeset viewer.