WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
42597
[Qt] Add API to define device-width and height for use with the viewport meta tag
https://bugs.webkit.org/show_bug.cgi?id=42597
Summary
[Qt] Add API to define device-width and height for use with the viewport meta...
Kenneth Rohde Christiansen
Reported
2010-07-19 15:02:40 PDT
This is needed by applications making use of our viewport metatag API, to change the size to fit best with the app and to update it on rotation.
Attachments
Patch
(5.34 KB, patch)
2010-07-19 15:10 PDT
,
Kenneth Rohde Christiansen
no flags
Details
Formatted Diff
Diff
Patch 2
(5.60 KB, patch)
2010-07-19 15:26 PDT
,
Kenneth Rohde Christiansen
tonikitoo
: review+
tonikitoo
: commit-queue-
Details
Formatted Diff
Diff
Patch for landing
(5.90 KB, patch)
2010-07-20 04:43 PDT
,
Kenneth Rohde Christiansen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Kenneth Rohde Christiansen
Comment 1
2010-07-19 15:10:35 PDT
Created
attachment 61997
[details]
Patch
WebKit Review Bot
Comment 2
2010-07-19 15:12:46 PDT
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.
Kenneth Rohde Christiansen
Comment 3
2010-07-19 15:26:12 PDT
Created
attachment 62002
[details]
Patch 2
Antonio Gomes
Comment 4
2010-07-19 18:03:20 PDT
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&
Antonio Gomes
Comment 5
2010-07-19 18:05:03 PDT
blocking
bug 31552
for further API discussion/review on qtwebkit2.1.
Kenneth Rohde Christiansen
Comment 6
2010-07-20 04:43:47 PDT
Created
attachment 62054
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2010-07-20 05:12:09 PDT
Comment on
attachment 62054
[details]
Patch for landing Clearing flags on attachment: 62054 Committed
r63740
: <
http://trac.webkit.org/changeset/63740
>
WebKit Commit Bot
Comment 8
2010-07-20 05:12:14 PDT
All reviewed patches have been landed. Closing bug.
Simon Hausmann
Comment 9
2010-08-04 03:39:22 PDT
Why do application developers have to care about this? Can't we retrieve this information automatically from the system?
Kenneth Rohde Christiansen
Comment 10
2010-08-04 05:44:03 PDT
(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/
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug