diff options
| author | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@nokia.com> | 2012-09-10 19:10:20 +0200 |
| commit | 284837daa07b29d6a63a748544a90b1f5842ac5c (patch) | |
| tree | ecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit/qt/Api/qwebpage.cpp | |
| parent | 2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff) | |
| download | qtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz | |
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit/qt/Api/qwebpage.cpp')
| -rw-r--r-- | Source/WebKit/qt/Api/qwebpage.cpp | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/Source/WebKit/qt/Api/qwebpage.cpp b/Source/WebKit/qt/Api/qwebpage.cpp index 08e86183a..e1c06515b 100644 --- a/Source/WebKit/qt/Api/qwebpage.cpp +++ b/Source/WebKit/qt/Api/qwebpage.cpp @@ -757,21 +757,13 @@ void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button) { #ifndef QT_NO_CLIPBOARD if (QApplication::clipboard()->supportsSelection()) { - bool oldSelectionMode = Pasteboard::generalPasteboard()->isSelectionMode(); - Pasteboard::generalPasteboard()->setSelectionMode(true); WebCore::Frame* focusFrame = page->focusController()->focusedOrMainFrame(); - if (button == Qt::LeftButton) { - if (focusFrame && (focusFrame->editor()->canCopy() || focusFrame->editor()->canDHTMLCopy())) { - Pasteboard::generalPasteboard()->writeSelection(focusFrame->editor()->selectedRange().get(), focusFrame->editor()->canSmartCopyOrDelete(), focusFrame); - ev->setAccepted(true); - } - } else if (button == Qt::MidButton) { - if (focusFrame && (focusFrame->editor()->canPaste() || focusFrame->editor()->canDHTMLPaste())) { - focusFrame->editor()->paste(); + if (button == Qt::MidButton) { + if (focusFrame) { + focusFrame->editor()->command(AtomicString("PasteGlobalSelection")).execute(); ev->setAccepted(true); } } - Pasteboard::generalPasteboard()->setSelectionMode(oldSelectionMode); } #endif } @@ -808,7 +800,7 @@ void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button, const QPo QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( client->ownerWidget()->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { - HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos), false); + HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(pos)); if (result.isContentEditable()) { QEvent event(QEvent::RequestSoftwareInputPanel); QApplication::sendEvent(client->ownerWidget(), &event); @@ -1565,7 +1557,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi int x = touchPoint.x(); int y = touchPoint.y(); - RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding, false /*ignoreClipping*/, false /*allowShadowContent*/); + RefPtr<NodeList> intersectedNodes = document->nodesFromRect(x, y, m_topPadding, m_rightPadding, m_bottomPadding, m_leftPadding); if (!intersectedNodes) return IntPoint(); @@ -1585,7 +1577,7 @@ IntPoint QWebPagePrivate::TouchAdjuster::findCandidatePointForTouch(const IntPoi if (!currentElement || (!isClickableElement(currentElement, 0) && !isValidFrameOwner(currentElement))) continue; - IntRect currentElementBoundingRect = currentElement->getPixelSnappedRect(); + IntRect currentElementBoundingRect = currentElement->pixelSnappedBoundingBox(); currentElementBoundingRect.intersect(touchRect); if (currentElementBoundingRect.isEmpty()) @@ -3371,7 +3363,7 @@ void QWebPage::updatePositionDependentActions(const QPoint &pos) d->createMainFrame(); WebCore::Frame* focusedFrame = d->page->focusController()->focusedOrMainFrame(); - HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos), /*allowShadowContent*/ false); + HitTestResult result = focusedFrame->eventHandler()->hitTestResultAtPoint(focusedFrame->view()->windowToContents(pos)); if (result.scrollbar()) d->hitTestResult = QWebHitTestResult(); else |
