summaryrefslogtreecommitdiffstats
path: root/examples/webkit
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@nokia.com>2009-11-06 14:17:05 (GMT)
committerJocelyn Turcotte <jocelyn.turcotte@nokia.com>2009-11-06 14:54:57 (GMT)
commitb87cc5edbf3100da062f20eefbc1fdb737b74118 (patch)
treeaea4178ba9e369e9b2ee94bc9d32d05407484c1b /examples/webkit
parentf1f3450e59d8d070e01c9bd852855daaeacd1390 (diff)
downloadQt-b87cc5edbf3100da062f20eefbc1fdb737b74118.zip
Qt-b87cc5edbf3100da062f20eefbc1fdb737b74118.tar.gz
Qt-b87cc5edbf3100da062f20eefbc1fdb737b74118.tar.bz2
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')
-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 a3293b8..11fac91 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]