Changeset 47963 in webkit
- Timestamp:
- Sep 2, 2009 5:40:18 AM (15 years ago)
- Location:
- trunk/WebKit/qt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/qt/Api/qwebframe.cpp
r47746 r47963 1247 1247 QVariant rc; 1248 1248 if (proxy) { 1249 JSC::JSValue v = proxy->evaluate(ScriptSourceCode(scriptSource)).jsValue();1249 JSC::JSValue v = d->frame->loader()->executeScript(ScriptSourceCode(scriptSource)).jsValue(); 1250 1250 int distance = 0; 1251 1251 rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance); -
trunk/WebKit/qt/ChangeLog
r47866 r47963 1 2009-09-02 Richard Moore <rich@kde.org> 2 3 Reviewed by Tor Arne Vestbø. 4 5 [Qt] Make sure we relayout the page after evaluating JS 6 7 https://bugs.webkit.org/show_bug.cgi?id=28235 8 9 QtWebKit does not always seem to reflow the page when evaluating 10 javascript. This patch changes the way evaluateJavaScript works to 11 use the frameloader which ensures that this is done properly. 12 13 * Api/qwebframe.cpp: 14 (QWebFrame::evaluateJavaScript): 15 * tests/qwebframe/tst_qwebframe.cpp: 16 1 17 2009-08-28 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk> 2 18 -
trunk/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
r46767 r47963 593 593 void render(); 594 594 void scrollPosition(); 595 void evaluateWillCauseRepaint(); 595 596 596 597 private: … … 2670 2671 } 2671 2672 2673 void tst_QWebFrame::evaluateWillCauseRepaint() 2674 { 2675 QWebView view; 2676 QString html("<html><body>top<div id=\"junk\" style=\"display: block;\">" 2677 "junk</div>bottom</body></html>"); 2678 view.setHtml(html); 2679 view.show(); 2680 2681 QTest::qWait(200); 2682 2683 view.page()->mainFrame()->evaluateJavaScript( 2684 "document.getElementById('junk').style.display = 'none';"); 2685 2686 ::waitForSignal(view.page(), SIGNAL(repaintRequested( const QRect &))); 2687 2688 QTest::qWait(2000); 2689 } 2690 2691 2672 2692 QTEST_MAIN(tst_QWebFrame) 2673 2693 #include "tst_qwebframe.moc"
Note: See TracChangeset
for help on using the changeset viewer.