summaryrefslogtreecommitdiff
path: root/examples/webkit/fancybrowser
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2009-11-06 15:17:05 +0100
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2009-11-06 15:54:57 +0100
commitb87cc5edbf3100da062f20eefbc1fdb737b74118 (patch)
treeaea4178ba9e369e9b2ee94bc9d32d05407484c1b /examples/webkit/fancybrowser
parentf1f3450e59d8d070e01c9bd852855daaeacd1390 (diff)
downloadqt4-tools-b87cc5edbf3100da062f20eefbc1fdb737b74118.tar.gz
Corrects bug in fancybrowser example where image rotation did not work.
This is actually only a workaround of what seems to be a QtWebKit bug. See QTBUG-4649. Reviewed-by: Jedrzej Nowacki
Diffstat (limited to 'examples/webkit/fancybrowser')
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index a3293b8c28..11fac91937 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -150,12 +150,11 @@ void MainWindow::highlightAllLinks()
//! [8]
void MainWindow::rotateImages(bool toggle)
{
- QString code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s') } )";
- view->page()->mainFrame()->evaluateJavaScript(code);
+ QString code;
if (toggle)
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(180deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(180deg)') } )";
else
- code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(0deg)') } )";
+ code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s'); $(this).css('-webkit-transform', 'rotate(0deg)') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}
//! [8]