WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 50685
36829
[Qt] Send rotation directions when orientation change in Maemo5
https://bugs.webkit.org/show_bug.cgi?id=36829
Summary
[Qt] Send rotation directions when orientation change in Maemo5
Diego Gonzalez
Reported
2010-03-30 08:49:53 PDT
Expose API for WebCore::Frame::sendOrientationChangeEvent) and (WebCore::Frame::orientation). It is useful for mobile devices when the application wants to inform Qt WebKit that the device orientation have been changed and it will also invoke the onorientation event it can be captured via JavaScript.
Attachments
Proposed patch
(5.49 KB, text/plain)
2010-03-30 13:48 PDT
,
Diego Gonzalez
no flags
Details
html test case using onorientationchange event to show the device rotation directions (0, 90, -90 and 180 degrees)
(3.79 KB, text/html)
2010-04-11 20:19 PDT
,
Diego Gonzalez
no flags
Details
Send rotation events
(6.05 KB, patch)
2010-04-11 20:23 PDT
,
Diego Gonzalez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Diego Gonzalez
Comment 1
2010-03-30 09:00:04 PDT
(In reply to
comment #0
)
> Expose API for WebCore::Frame::sendOrientationChangeEvent) > and (WebCore::Frame::orientation).
> These methods have been implemented in
bug #29508
Diego Gonzalez
Comment 2
2010-03-30 13:48:02 PDT
Created
attachment 52077
[details]
Proposed patch
Simon Hausmann
Comment 3
2010-04-09 14:24:32 PDT
It doesn't feel right to me to add an API to QWebPage and bother third-party developers with it. Any change we can make this simply work out of the box? If necessary using some platform specific code, unless there's already a signal somewhere in Qt (QApplication? QDesktopWidget?)
Kenneth Rohde Christiansen
Comment 4
2010-04-09 15:00:03 PDT
(In reply to
comment #3
)
> It doesn't feel right to me to add an API to QWebPage and bother third-party > developers with it. Any change we can make this simply work out of the box? > > If necessary using some platform specific code, unless there's already a signal > somewhere in Qt (QApplication? QDesktopWidget?)
I gave the same comments on irc. Jesus tells me that there are Maemo specific events but they will only work in PR1.2
Diego Gonzalez
Comment 5
2010-04-11 20:13:48 PDT
(In reply to
comment #4
)
> (In reply to
comment #3
) > > It doesn't feel right to me to add an API to QWebPage and bother third-party > > developers with it. Any change we can make this simply work out of the box? > > > > If necessary using some platform specific code, unless there's already a signal > > somewhere in Qt (QApplication? QDesktopWidget?) > > I gave the same comments on irc. Jesus tells me that there are Maemo specific > events but they will only work in PR1.2
Actually the maemo5 support for orientation will only work in PR1.2 is using setAttribute(Qt::WA_Maemo5AutoOrientation, true); it will provide a maemo application change the device orientation when the it is rotated from portrait to landscape and vice e versa. Unfortunately, AFAIK the application does not send any event calling the orientation have been changed, of course it could be checked at resize but it could not be the best way. A possible way to get the directions when the device is rotated in maemo5 is getting this information from the accelerometer (Ariya gave me some examples). The other possible way could be using the lib qt mobility which seems has a API for it.
Diego Gonzalez
Comment 6
2010-04-11 20:19:45 PDT
Created
attachment 53140
[details]
html test case using onorientationchange event to show the device rotation directions (0, 90, -90 and 180 degrees)
Diego Gonzalez
Comment 7
2010-04-11 20:23:47 PDT
Created
attachment 53141
[details]
Send rotation events An example how the rotation direction could be gotten using the orientation information from accelerometer
Kenneth Rohde Christiansen
Comment 8
2010-04-14 14:00:58 PDT
You want comments on this patch?
Diego Gonzalez
Comment 9
2010-04-14 14:51:27 PDT
(In reply to
comment #8
)
> You want comments on this patch?
Actually it is just an example how could we get orientation info from the accelerometer and send the rotation direction to webkit. The intention is show some possible ways to do this feature, so we can manage the best way to send these events.
Diego Gonzalez
Comment 10
2011-02-23 10:45:17 PST
*** This bug has been marked as a duplicate of
bug 50685
***
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