summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp51
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog26
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp6
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h8
-rw-r--r--src/gui/kernel/qt_cocoa_helpers_mac.mm11
-rw-r--r--src/gui/painting/qprintengine_win.cpp7
-rw-r--r--src/gui/widgets/qmenu.cpp4
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp3
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp3
10 files changed, 82 insertions, 39 deletions
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 8c93308..6c55e51 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- be2489a618c909c4a82d927f9fff9d12feafeb30
+ 6ed0b6197addffc7dacbdb3e49db711420a2c47a
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index 710e11b..0fa31d5 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -326,10 +326,11 @@ void QWebFramePrivate::renderPrivate(QPainter *painter, QWebFrame::RenderLayer l
static bool webframe_scrollOverflow(WebCore::Frame* frame, int dx, int dy, const QPoint& pos)
{
- if (!frame || !frame->document() || !frame->eventHandler())
+ if (!frame || !frame->document() || !frame->view() || !frame->eventHandler())
return false;
- Node* node = frame->document()->elementFromPoint(pos.x(), pos.y());
+ QPoint contentsPos = frame->view()->windowToContents(pos);
+ Node* node = frame->document()->elementFromPoint(contentsPos.x(), contentsPos.y());
if (!node)
return false;
@@ -1056,37 +1057,33 @@ void QWebFrame::scroll(int dx, int dy)
*/
void QWEBKIT_EXPORT qtwebkit_webframe_scrollRecursively(QWebFrame* qFrame, int dx, int dy, const QPoint& pos)
{
- Frame* frame = QWebFramePrivate::core(qFrame);
+ if (!qFrame)
+ return;
- if (!frame || !frame->view())
+ if (webframe_scrollOverflow(QWebFramePrivate::core(qFrame), dx, dy, pos))
return;
-
- if (!webframe_scrollOverflow(frame, dx, dy, pos)) {
- do {
- bool scrolledHorizontal = false;
- bool scrolledVertical = false;
-
- IntSize scrollOffset = frame->view()->scrollOffset();
- IntPoint maxScrollOffset = frame->view()->maximumScrollPosition();
- if (dx > 0) // scroll right
- scrolledHorizontal = scrollOffset.width() < maxScrollOffset.x();
- else if (dx < 0) // scroll left
- scrolledHorizontal = scrollOffset.width() > 0;
+ bool scrollHorizontal = false;
+ bool scrollVertical = false;
- if (dy > 0) // scroll down
- scrolledVertical = scrollOffset.height() < maxScrollOffset.y();
+ do {
+ if (dx > 0) // scroll right
+ scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) < qFrame->scrollBarMaximum(Qt::Horizontal);
+ else if (dx < 0) // scroll left
+ scrollHorizontal = qFrame->scrollBarValue(Qt::Horizontal) > qFrame->scrollBarMinimum(Qt::Horizontal);
+
+ if (dy > 0) // scroll down
+ scrollVertical = qFrame->scrollBarValue(Qt::Vertical) < qFrame->scrollBarMaximum(Qt::Vertical);
else if (dy < 0) //scroll up
- scrolledVertical = scrollOffset.height() > 0;
+ scrollVertical = qFrame->scrollBarValue(Qt::Vertical) > qFrame->scrollBarMinimum(Qt::Vertical);
- if (scrolledHorizontal || scrolledVertical) {
- frame->view()->scrollBy(IntSize(dx, dy));
- return;
- }
-
- frame = frame->tree()->parent();
- } while (frame && frame->view());
- }
+ if (scrollHorizontal || scrollVertical) {
+ qFrame->scroll(dx, dy);
+ return;
+ }
+
+ qFrame = qFrame->parentFrame();
+ } while (qFrame);
}
/*!
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 64726c2..6250cf5 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,29 @@
+2010-04-08 Joe Ligman <joseph.ligman@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] qtwebkit_webframe_scrollRecursively scrolls when body.style.overflow="hidden"
+ https://bugs.webkit.org/show_bug.cgi?id=36674
+
+ The scrolling check was based on the frameview's scrolloffset, and
+ maximumScrollPosition, which does not acknowledge the overflow properties.
+
+ I am now basing the scrolling off the scrollbar position. The scrollbars are
+ affected by the overflow properties indicating when not to scroll. The scrollbar
+ positions also continue to work for CSS ::-webkit-scrollbar styles.
+
+ * Api/qwebframe.cpp:
+ (qtwebkit_webframe_scrollRecursively):
+
+2010-03-24 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ Auto-uppercase and predictive text need to be disabled for S60 (as for maemo)
+ https://bugs.webkit.org/show_bug.cgi?id=33176
+
+ * WebCoreSupport/EditorClientQt.cpp:
+
2010-03-22 Jakub Wieczorek <jwieczorek@webkit.org>
Reviewed by Simon Hausmann.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 2d1a1eb..27cc2f5 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -615,11 +615,11 @@ void EditorClientQt::setInputMethodState(bool active)
}
}
webPageClient->setInputMethodHint(Qt::ImhHiddenText, isPasswordField);
-#ifdef Q_WS_MAEMO_5
- // Maemo 5 MicroB Browser disables auto-uppercase and predictive text, thus, so do we.
+#if defined(Q_WS_MAEMO_5) || defined(Q_OS_SYMBIAN)
+ // disables auto-uppercase and predictive text for mobile devices
webPageClient->setInputMethodHint(Qt::ImhNoAutoUppercase, true);
webPageClient->setInputMethodHint(Qt::ImhNoPredictiveText, true);
-#endif // Q_WS_MAEMO_5
+#endif // Q_WS_MAEMO_5 || Q_OS_SYMBIAN
#endif // QT_VERSION check
webPageClient->setInputMethodEnabled(active);
}
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index 9d3edcb..1c66d07 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -183,8 +183,12 @@ public:
else
QCoreApplication::sendPostedEvents(viewport->window(), QEvent::UpdateRequest);
#else
- QCoreApplication::processEvents(QEventLoop::AllEvents | QEventLoop::ExcludeSocketNotifiers
- | QEventLoop::ExcludeUserInputEvents);
+ // At this point either HIViewSetNeedsDisplay (Carbon) or setNeedsDisplay: YES (Cocoa)
+ // is called, which means there's a pending update request. We want to dispatch it
+ // now because otherwise graphics view updates would require two
+ // round-trips in the event loop before the item is painted.
+ extern void qt_mac_dispatchPendingUpdateRequests(QWidget *);
+ qt_mac_dispatchPendingUpdateRequests(viewport->window());
#endif
}
diff --git a/src/gui/kernel/qt_cocoa_helpers_mac.mm b/src/gui/kernel/qt_cocoa_helpers_mac.mm
index 65c04e5..ce1e3c5 100644
--- a/src/gui/kernel/qt_cocoa_helpers_mac.mm
+++ b/src/gui/kernel/qt_cocoa_helpers_mac.mm
@@ -1167,6 +1167,17 @@ CGContextRef qt_mac_graphicsContextFor(QWidget *widget)
return context;
}
+void qt_mac_dispatchPendingUpdateRequests(QWidget *widget)
+{
+ if (!widget)
+ return;
+#ifndef QT_MAC_USE_COCOA
+ HIViewRender(qt_mac_nativeview_for(widget));
+#else
+ [qt_mac_nativeview_for(widget) displayIfNeeded];
+#endif
+}
+
CGFloat qt_mac_get_scalefactor()
{
#ifndef QT_MAC_USE_COCOA
diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp
index 374bfa0..76dad72 100644
--- a/src/gui/painting/qprintengine_win.cpp
+++ b/src/gui/painting/qprintengine_win.cpp
@@ -964,12 +964,13 @@ void QWin32PrintEnginePrivate::queryDefault()
return;
QStringList info = output.split(QLatin1Char(','));
- if (info.size() > 0) {
+ int infoSize = info.size();
+ if (infoSize > 0) {
if (name.isEmpty())
name = info.at(0);
- if (program.isEmpty())
+ if (program.isEmpty() && infoSize > 1)
program = info.at(1);
- if (port.isEmpty())
+ if (port.isEmpty() && infoSize > 2)
port = info.at(2);
}
}
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index c7573bf..d0ae90c 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -2813,7 +2813,9 @@ void QMenu::mouseMoveEvent(QMouseEvent *e)
QAction *action = d->actionAt(e->pos());
if (!action) {
- if (d->hasHadMouse)
+ if (d->hasHadMouse
+ && (!d->currentAction
+ || !(d->currentAction->menu() && d->currentAction->menu()->isVisible())))
d->setCurrentAction(0);
return;
} else if(e->buttons()) {
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index df469d7..5152d9a 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -156,7 +156,8 @@ void QAudioInputPrivate::freeBlocks(WAVEHDR* blockArray)
int count = buffer_size/period_size;
for(int i = 0; i < count; i++) {
- waveInUnprepareHeader(hWaveIn,&blocks[i], sizeof(WAVEHDR));
+ if (blocks->dwFlags & WHDR_PREPARED)
+ waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR));
blocks+=sizeof(WAVEHDR);
}
HeapFree(GetProcessHeap(), 0, blockArray);
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index e818723..b92565d 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -150,7 +150,8 @@ void QAudioOutputPrivate::freeBlocks(WAVEHDR* blockArray)
int count = buffer_size/period_size;
for(int i = 0; i < count; i++) {
- waveOutUnprepareHeader(hWaveOut,&blocks[i], sizeof(WAVEHDR));
+ if (blocks->dwFlags & WHDR_PREPARED)
+ waveOutUnprepareHeader(hWaveOut,blocks, sizeof(WAVEHDR));
blocks+=sizeof(WAVEHDR);
}
HeapFree(GetProcessHeap(), 0, blockArray);