| |   |
| 540 | 540 | */ |
| 541 | 541 | QUrl QWebFrame::requestedUrl() const |
| 542 | 542 | { |
| // In the following edge cases (where the failing document |
| // loader does not get commited by the frame loader) it is |
| // safer to rely on outgoingReferrer than originalRequest. |
| 543 | 546 | if (!d->frame->loader()->activeDocumentLoader() |
| || !d->frameLoaderClient->m_loadSucceeded) |
| || (!d->frameLoaderClient->m_loadError.isNull() |
| && !d->frame->loader()->outgoingReferrer().isEmpty())) |
| 545 | 549 | return QUrl(d->frame->loader()->outgoingReferrer()); |
| 546 | 550 | |
| 547 | 551 | return d->frame->loader()->originalRequest().url(); |
| … | … | |
| 803 | 803 | d->horizontalScrollBarPolicy = policy; |
| 804 | 804 | if (d->frame->view()) { |
| 805 | 805 | d->frame->view()->setHorizontalScrollbarMode((ScrollbarMode)policy); |
| d->frame->view()->updateDefaultScrollbarState(); |
| 807 | 806 | } |
| 808 | 807 | } else { |
| 809 | 808 | d->verticalScrollBarPolicy = policy; |
| 810 | 809 | if (d->frame->view()) { |
| 811 | 810 | d->frame->view()->setVerticalScrollbarMode((ScrollbarMode)policy); |
| d->frame->view()->updateDefaultScrollbarState(); |
| 813 | 811 | } |
| 814 | 812 | } |
| 815 | 813 | } |
| … | … | |
| 1025 | 1025 | bool QWebFrame::hasFocus() const |
| 1026 | 1026 | { |
| 1027 | 1027 | WebCore::Frame* ff = d->frame->page()->focusController()->focusedFrame(); |
| return QWebFramePrivate::kit(ff) == this; |
| return ff && QWebFramePrivate::kit(ff) == this; |
| 1029 | 1029 | } |
| 1030 | 1030 | |
| 1031 | 1031 | /*! |
| … | … | |
| 1247 | 1247 | ScriptController *proxy = d->frame->script(); |
| 1248 | 1248 | QVariant rc; |
| 1249 | 1249 | if (proxy) { |
| JSC::JSValue v = proxy->evaluate(ScriptSourceCode(scriptSource)).jsValue(); |
| JSC::JSValue v = d->frame->loader()->executeScript(ScriptSourceCode(scriptSource)).jsValue(); |
| 1251 | 1251 | int distance = 0; |
| 1252 | 1252 | rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance); |
| 1253 | 1253 | } |