summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2009-06-24 11:42:15 (GMT)
committerSimon Hausmann <simon.hausmann@nokia.com>2009-06-24 11:42:15 (GMT)
commit259c32cd921fcbb85f79f21923d0efa0d6743d8a (patch)
treef9629c9be4b8488eb3221b48c0629a42a6ffce4c /src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
parentff2b98cf81daf585bb657bee7f5f131769b38eca (diff)
downloadQt-259c32cd921fcbb85f79f21923d0efa0d6743d8a.zip
Qt-259c32cd921fcbb85f79f21923d0efa0d6743d8a.tar.gz
Qt-259c32cd921fcbb85f79f21923d0efa0d6743d8a.tar.bz2
Updated WebKit from /home/shausman/src/webkit/trunk to qtwebkit-4.6-snapshot-24062009 ( 6d5a2a0472a6af0b7f781da018e76bb8522d57a5 )
++ b/WebKit/qt/ChangeLog 2009-06-19 Daniel <qt-info@nokia.com> Reviewed by Simon Hausmann. Remove warnings for QString() constructions from const char * By explicitly wrapping it with QLatin1String() / QLatin1Char() * Api/qwebelement.cpp: (QWebElement::classes): Use QLatin1String. (QWebElement::addClass): Ditto. (QWebElement::removeClass): Ditto. (QWebElement::toggleClass): Ditto. 2009-06-18 Friedemann Kleint <Friedemann.Kleint@nokia.com> Reviewed by Simon Hausmann. Fixed MinGW compilation. * Api/qwebelement.cpp: (QWebElement::evaluateScript): 2009-06-18 Markus Goetz <Markus.Goetz@nokia.com> Reviewed by Simon Hausman. Clarify in docs how to compile with debug information. * docs/qtwebkit.qdoc: 2009-06-17 Markus Goetz <Markus.Goetz@nokia.com> Reviewed by Simon Hausmann. QWebPage: Don't call supportsSsl() This stops QWebPage from loading the OpenSSL libs, certificates etc. when they are not needed for the non-HTTPS case. Loading the SSL libraries can be a very slow operation. * Api/qwebpage.cpp: (QWebPage::userAgentForUrl): 2009-06-15 Benjamin C Meyer <benjamin.meyer@torchmobile.com> Reviewed by Adam Treat. Support the back/forward/stop/refresh multimedia keys and accept the event when handling backspace and shift backspace as we should. * Api/qwebpage.cpp: (QWebPagePrivate::keyPressEvent): 2009-06-15 Andre Pedralho <andre.pedralho@openbossa.org> Reviewed by Adam Treat. https://bugs.webkit.org/show_bug.cgi?id=26351 Remove bool QWebHitTestResult::isScrollBar() const and make sure a null QWebHitTestResult is returned instead. * Api/qwebframe.cpp: (QWebFrame::hitTestContent): * Api/qwebframe.h: * Api/qwebpage.cpp: (QWebPage::updatePositionDependentActions): 2009-06-15 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Adam Treat. Fix the logic for disabling the fixed layout feature, when an invalid QSize is set. * Api/qwebpage.cpp: (QWebPage::setFixedContentsSize): 2009-06-13 Adam Barth <abarth@webkit.org> Reviewed by Darin Fisher. https://bugs.webkit.org/show_bug.cgi?id=24492 Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin. * Api/qwebpage.cpp: (QWebPage::acceptNavigationRequest): Rubber-stamped by Simon Hausmann. 2009-06-09 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Renamed QWebSettings::AllowUniversalAccessFromFileUrls to LocalContentCanAccessRemoteUrls, as discussed in the API review. * Api/qwebsettings.cpp: (QWebSettingsPrivate::apply): (QWebSettings::QWebSettings): * Api/qwebsettings.h: 2009-06-09 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Merged useFixedLayout property with fixedLayoutSize and renamed the latter to fixedContentsSize. * Api/qwebpage.cpp: (QWebPage::fixedContentsSize): (QWebPage::setFixedContentsSize): * Api/qwebpage.h: * WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::transitionToCommittedForNewPage): 2009-06-09 Simon Hausmann <simon.hausmann@nokia.com> Reviewed by Ariya Hidayat. Renamed QWebHitTestResult::linkTarget to linkElement() and made it return a QWebElement. The link target itself is always the target DOM attribute. * Api/qwebframe.cpp: (QWebHitTestResultPrivate::QWebHitTestResultPrivate): (QWebHitTestResult::linkElement): * Api/qwebframe.h: * Api/qwebframe_p.h: * tests/qwebframe/tst_qwebframe.cpp:
Diffstat (limited to 'src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp')
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp67
1 files changed, 37 insertions, 30 deletions
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
index 2decbca..3370f15 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp
@@ -43,6 +43,7 @@
#include "DragController.h"
#include "DragData.h"
#include "EditorClientQt.h"
+#include "SecurityOrigin.h"
#include "Settings.h"
#include "Page.h"
#include "Pasteboard.h"
@@ -797,11 +798,24 @@ void QWebPagePrivate::keyPressEvent(QKeyEvent *ev)
int fontHeight = fm.height();
if (!handleScrolling(ev)) {
switch (ev->key()) {
+ case Qt::Key_Back:
+ q->triggerAction(QWebPage::Back);
+ break;
+ case Qt::Key_Forward:
+ q->triggerAction(QWebPage::Forward);
+ break;
+ case Qt::Key_Stop:
+ q->triggerAction(QWebPage::Stop);
+ break;
+ case Qt::Key_Refresh:
+ q->triggerAction(QWebPage::Reload);
+ break;
case Qt::Key_Backspace:
if (ev->modifiers() == Qt::ShiftModifier)
q->triggerAction(QWebPage::Forward);
else
q->triggerAction(QWebPage::Back);
+ break;
default:
handled = false;
break;
@@ -1598,16 +1612,21 @@ void QWebPage::setViewportSize(const QSize &size) const
}
}
-QSize QWebPage::fixedLayoutSize() const
+QSize QWebPage::fixedContentsSize() const
{
- if (d->mainFrame && d->mainFrame->d->frame->view())
- return d->mainFrame->d->frame->view()->fixedLayoutSize();
+ QWebFrame* frame = d->mainFrame;
+ if (frame) {
+ WebCore::FrameView* view = frame->d->frame->view();
+ if (view && view->useFixedLayout()) {
+ return d->mainFrame->d->frame->view()->fixedLayoutSize();
+ }
+ }
return d->fixedLayoutSize;
}
/*!
- \property QWebPage::fixedLayoutSize
+ \property QWebPage::fixedContentsSize
\since 4.6
\brief the size of the fixed layout
@@ -1615,37 +1634,22 @@ QSize QWebPage::fixedLayoutSize() const
1024x768 for example then webkit will layout the page as if the viewport were that size
rather than something different.
*/
-void QWebPage::setFixedLayoutSize(const QSize &size) const
+void QWebPage::setFixedContentsSize(const QSize &size) const
{
d->fixedLayoutSize = size;
QWebFrame *frame = mainFrame();
if (frame->d->frame && frame->d->frame->view()) {
WebCore::FrameView* view = frame->d->frame->view();
- view->setFixedLayoutSize(size);
- view->forceLayout();
- }
-}
-bool QWebPage::useFixedLayout() const
-{
- return d->useFixedLayout;
-}
-
-/*!
- \property QWebPage::useFixedLayout
- \since 4.6
- \brief whether to use a fixed layout size
-*/
-void QWebPage::setUseFixedLayout(bool useFixedLayout)
-{
- d->useFixedLayout = useFixedLayout;
-
- QWebFrame *frame = mainFrame();
- if (frame->d->frame && frame->d->frame->view()) {
- WebCore::FrameView* view = frame->d->frame->view();
- view->setUseFixedLayout(useFixedLayout);
- view->forceLayout();
+ if (size.isValid()) {
+ view->setUseFixedLayout(true);
+ view->setFixedLayoutSize(size);
+ view->forceLayout();
+ } else if (view->useFixedLayout()) {
+ view->setUseFixedLayout(false);
+ view->forceLayout();
+ }
}
}
@@ -1675,7 +1679,7 @@ bool QWebPage::acceptNavigationRequest(QWebFrame *frame, const QWebNetworkReques
return true;
case DelegateExternalLinks:
- if (WebCore::FrameLoader::shouldTreatURLSchemeAsLocal(request.url().scheme()))
+ if (WebCore::SecurityOrigin::shouldTreatURLSchemeAsLocal(request.url().scheme()))
return true;
emit linkClicked(request.url());
return false;
@@ -2228,7 +2232,10 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos)
WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame();
HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false);
- d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
+ if (result.scrollbar())
+ d->hitTestResult = QWebHitTestResult();
+ else
+ d->hitTestResult = QWebHitTestResult(new QWebHitTestResultPrivate(result));
WebCore::ContextMenu menu(result);
menu.populate();
if (d->page->inspectorController()->enabled())