Summary: | [Qt] Add API to define device-width and height for use with the viewport meta tag | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kenneth Rohde Christiansen <kenneth> | ||||||||
Component: | WebKit Qt | Assignee: | Kenneth Rohde Christiansen <kenneth> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | commit-queue, hausmann, tonikitoo, webkit.review.bot | ||||||||
Priority: | P3 | Keywords: | Qt, QtTriaged | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | PC | ||||||||||
OS: | All | ||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 31552 | ||||||||||
Attachments: |
|
Description
Kenneth Rohde Christiansen
2010-07-19 15:02:40 PDT
Created attachment 61997 [details]
Patch
Attachment 61997 [details] did not pass style-queue:
Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1
WARNING: File exempt from style guide. Skipping: "WebKit/qt/Api/qgraphicswebview.cpp"
WARNING: File exempt from style guide. Skipping: "WebKit/qt/Api/qgraphicswebview.h"
WebKit/qt/WebCoreSupport/PageClientQt.h:33: Alphabetical sorting problem. [build/include_order] [4]
Total errors found: 1 in 5 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 62002 [details]
Patch 2
Comment on attachment 62002 [details] Patch 2 Looks good. You are missing the \since 4.x below. > /*! > + \property QGraphicsWebView::deviceSize > + \brief the size of the device using the web view > + > + The device size is used by the DOM window object methods > + otherHeight(), otherWidth() as well as a page for the viewport > + meta tag attributes device-width and device-height. > +*/ > +void QGraphicsWebView::setDeviceSize(QSize size) const QSize& > +QSize QGraphicsWebView::deviceSize() const it, please. > + QSize deviceSize(); const. > + void setDeviceSize(QSize); const QSize& blocking bug 31552 for further API discussion/review on qtwebkit2.1. Created attachment 62054 [details]
Patch for landing
Comment on attachment 62054 [details] Patch for landing Clearing flags on attachment: 62054 Committed r63740: <http://trac.webkit.org/changeset/63740> All reviewed patches have been landed. Closing bug. Why do application developers have to care about this? Can't we retrieve this information automatically from the system? (In reply to comment #9) > Why do application developers have to care about this? Can't we retrieve this information automatically from the system? There is no simple/consistent way to always get it from the system. You can try to get the screen resolution but that might interfer with things on mobiles such as always present status bar (phone signal etc) For use with the viewport meta tag is also HAS TO be given in portrait. Actually width == width of device when in portrait, height = width of device when in landscape. When testing your app on a desktop it would get the width/height of the desktop, making it hard to test the viewport meta stuff without using something like Xephyr. Another point is that if the app will do DPI adjustment like Firefox Mobile does, you need to set an adjusted device size. http://www.quirksmode.org/blog/archives/2010/04/a_pixel_is_not.html http://hacks.mozilla.org/2010/05/upcoming-changes-to-the-viewport-meta-tag-for-firefox-mobile/ |