Changeset 63740 in webkit
- Timestamp:
- Jul 20, 2010 5:11:56 AM (14 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qgraphicswebview.cpp
r61984 r63740 74 74 QWebPage* page; 75 75 bool resizesToContents; 76 QSize deviceSize; 76 77 77 78 // Just a convenience to avoid using page->client->overlay always … … 550 551 551 552 /*! 553 \property QGraphicsWebView::deviceSize 554 \brief the size of the device using the web view 555 556 The device size is used by the DOM window object methods 557 otherHeight(), otherWidth() as well as a page for the viewport 558 meta tag attributes device-width and device-height. 559 */ 560 void QGraphicsWebView::setDeviceSize(const QSize& size) 561 { 562 d->deviceSize = size; 563 } 564 565 QSize QGraphicsWebView::deviceSize() const 566 { 567 return d->deviceSize; 568 } 569 570 /*! 552 571 \property QGraphicsWebView::zoomFactor 553 572 \brief the zoom factor for the view -
trunk/WebKit/qt/Api/qgraphicswebview.h
r56581 r63740 42 42 Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged) 43 43 Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) 44 Q_PROPERTY(QSize deviceSize READ deviceSize WRITE setDeviceSize) 44 45 45 46 Q_PROPERTY(QUrl url READ url WRITE setUrl NOTIFY urlChanged) … … 65 66 void setZoomFactor(qreal); 66 67 68 QSize deviceSize() const; 69 void setDeviceSize(const QSize&); 70 67 71 bool isModified() const; 68 72 69 void load(const QUrl &url);73 void load(const QUrl& url); 70 74 void load(const QNetworkRequest& request, QNetworkAccessManager::Operation operation = QNetworkAccessManager::GetOperation, const QByteArray& body = QByteArray()); 71 75 -
trunk/WebKit/qt/ChangeLog
r63738 r63740 1 2010-07-20 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org> 2 3 [Qt] Add API to define device-width and height for use with the viewport meta tag 4 https://bugs.webkit.org/show_bug.cgi?id=42597 5 6 Reviewed by Antonio Gomes. 7 8 Add a new API for setting the deviceSize for use in conjunction with 9 out viewport meta tag API. 10 11 * Api/qgraphicswebview.cpp: 12 (QGraphicsWebView::setDeviceSize): 13 (QGraphicsWebView::deviceSize): 14 * Api/qgraphicswebview.h: 15 * WebCoreSupport/PageClientQt.cpp: 16 (WebCore::PageClientQGraphicsWidget::windowRect): 17 * WebCoreSupport/PageClientQt.h: 18 (WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget): 19 1 20 2010-07-20 Andreas Kling <andreas.kling@nokia.com> 2 21 -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.cpp
r61342 r63740 325 325 QRectF PageClientQGraphicsWidget::windowRect() const 326 326 { 327 if (!view->deviceSize().isEmpty()) 328 return QRectF(QRect(QPoint(0, 0), view->deviceSize())); 329 327 330 if (!view->scene()) 328 331 return QRectF(); -
trunk/WebKit/qt/WebCoreSupport/PageClientQt.h
r61342 r63740 27 27 #include "QWebPageClient.h" 28 28 #include "TiledBackingStore.h" 29 #include "qgraphicswebview.h" 29 30 #include "qwebframe.h" 30 31 #include "qwebframe_p.h" 31 32 #include "qwebpage.h" 32 33 #include "qwebpage_p.h" 33 34 34 #include <QtCore/qmetaobject.h> 35 35 #include <QtCore/qsharedpointer.h> … … 43 43 #include <Settings.h> 44 44 45 46 45 namespace WebCore { 47 46 … … 123 122 class PageClientQGraphicsWidget : public QWebPageClient { 124 123 public: 125 PageClientQGraphicsWidget(QGraphicsW idget* v, QWebPage* p)124 PageClientQGraphicsWidget(QGraphicsWebView* v, QWebPage* p) 126 125 : view(v) 127 126 , page(p) … … 187 186 virtual QRectF windowRect() const; 188 187 189 QGraphicsW idget* view;188 QGraphicsWebView* view; 190 189 QWebPage* page; 191 190 bool viewResizesToContents;
Note: See TracChangeset
for help on using the changeset viewer.