Changeset 90844 in webkit
- Timestamp:
- Jul 12, 2011 1:25:22 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r90838 r90844 1 2011-07-12 Andreas Kling <kling@webkit.org> 2 3 [Qt][WK2] Navigation actions in incorrect state when loadStarted() is emitted. 4 https://bugs.webkit.org/show_bug.cgi?id=64383 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Update the navigation actions before emitting loadStarted(). 9 10 * UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp: 11 (LoadStartedCatcher::LoadStartedCatcher): 12 (LoadStartedCatcher::onLoadStarted): 13 (tst_QDesktopWebView::stopActionEnabledAfterLoadStarted): 14 * UIProcess/qt/ClientImpl.cpp: 15 (qt_wk_didStartProvisionalLoadForFrame): 16 1 17 2011-07-12 Benjamin Poulain <benjamin@webkit.org> 2 18 -
trunk/Source/WebKit2/UIProcess/API/qt/tests/qdesktopwebview/tst_qdesktopwebview.cpp
r90837 r90844 23 23 #include <qdesktopwebview.h> 24 24 #include "../testwindow.h" 25 #include "../util.h" 25 26 26 27 class tst_QDesktopWebView : public QObject { … … 32 33 33 34 void navigationActionsStatusAtStartup(); 35 void stopActionEnabledAfterLoadStarted(); 34 36 35 37 private: … … 72 74 } 73 75 76 class LoadStartedCatcher : public QObject { 77 Q_OBJECT 78 public: 79 LoadStartedCatcher(QDesktopWebView* webView) 80 : m_webView(webView) 81 { 82 connect(m_webView, SIGNAL(loadStarted()), this, SLOT(onLoadStarted())); 83 } 84 85 public slots: 86 void onLoadStarted() 87 { 88 QMetaObject::invokeMethod(this, "finished", Qt::QueuedConnection); 89 90 QAction* stopAction = m_webView->navigationAction(QtWebKit::Stop); 91 QVERIFY(stopAction); 92 QCOMPARE(stopAction->isEnabled(), true); 93 } 94 95 signals: 96 void finished(); 97 98 private: 99 QDesktopWebView* m_webView; 100 }; 101 102 void tst_QDesktopWebView::stopActionEnabledAfterLoadStarted() 103 { 104 QAction* stopAction = webView()->navigationAction(QtWebKit::Stop); 105 QVERIFY(stopAction); 106 QCOMPARE(stopAction->isEnabled(), false); 107 108 LoadStartedCatcher catcher(webView()); 109 webView()->load(QUrl::fromLocalFile(QLatin1String(TESTS_SOURCE_DIR "/html/basic_page.html"))); 110 waitForSignal(&catcher, SIGNAL(finished())); 111 112 QCOMPARE(stopAction->isEnabled(), true); 113 114 waitForSignal(webView(), SIGNAL(loadSucceeded())); 115 } 116 74 117 QTEST_MAIN(tst_QDesktopWebView) 75 118 -
trunk/Source/WebKit2/UIProcess/qt/ClientImpl.cpp
r90820 r90844 70 70 if (!WKFrameIsMainFrame(frame)) 71 71 return; 72 73 toQtWebPageProxy(clientInfo)->updateNavigationActions(); 72 74 toQtWebPageProxy(clientInfo)->loadDidBegin(); 73 toQtWebPageProxy(clientInfo)->updateNavigationActions();74 75 } 75 76
Note: See TracChangeset
for help on using the changeset viewer.