Commit 7f1b30b9 authored by akling@apple.com's avatar akling@apple.com

Remove Qt-specific code in WebCore/{page,accessibility}.

<https://webkit.org/b/122222>

Reviewed by Anders Carlsson.

Purge PLATFORM(QT) blocks and FooBarQt.* files.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4f9334bb
2013-10-02 Andreas Kling <akling@apple.com>
Remove Qt-specific code in WebCore/{page,accessibility}.
<https://webkit.org/b/122222>
Reviewed by Anders Carlsson.
Purge PLATFORM(QT) blocks and FooBarQt.* files.
2013-10-02 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Move ShapeInsideInfo::updateSegmentsForLine implementations into the cpp
/*
* Copyright (C) 2008 Apple Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "config.h"
#include "AccessibilityObject.h"
#if HAVE(ACCESSIBILITY)
namespace WebCore {
bool AccessibilityObject::accessibilityIgnoreAttachment() const
{
return false;
}
AccessibilityObjectInclusion AccessibilityObject::accessibilityPlatformIncludesObject() const
{
if (isMenuListPopup() || isMenuListOption())
return IgnoreObject;
return DefaultBehavior;
}
} // namespace WebCore
#endif // HAVE(ACCESSIBILITY)
......@@ -238,7 +238,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
// For now, call into the client. This is temporary!
frame->editor().copyImage(m_hitTestResult);
break;
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
case ContextMenuItemTagCopyImageUrlToClipboard:
frame->editor().copyURL(m_hitTestResult.absoluteImageURL(), m_hitTestResult.textContent());
break;
......@@ -337,7 +337,7 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
insertUnicodeCharacter(zeroWidthNonJoiner, frame);
break;
#endif
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
case ContextMenuItemTagSelectAll:
frame->editor().command("SelectAll").execute();
break;
......@@ -751,7 +751,7 @@ void ContextMenuController::populate()
contextMenuItemTagDownloadImageToDisk());
ContextMenuItem CopyImageItem(ActionType, ContextMenuItemTagCopyImageToClipboard,
contextMenuItemTagCopyImageToClipboard());
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
ContextMenuItem CopyImageUrlItem(ActionType, ContextMenuItemTagCopyImageUrlToClipboard,
contextMenuItemTagCopyImageUrlToClipboard());
#endif
......@@ -802,7 +802,7 @@ void ContextMenuController::populate()
#if PLATFORM(GTK)
ContextMenuItem DeleteItem(ActionType, ContextMenuItemTagDelete, contextMenuItemTagDelete());
#endif
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
ContextMenuItem SelectAllItem(ActionType, ContextMenuItemTagSelectAll, contextMenuItemTagSelectAll());
#endif
......@@ -826,10 +826,6 @@ void ContextMenuController::populate()
appendItem(OpenLinkInNewWindowItem, m_contextMenu.get());
appendItem(DownloadFileItem, m_contextMenu.get());
}
#if PLATFORM(QT)
if (m_hitTestResult.isSelected())
appendItem(CopyItem, m_contextMenu.get());
#endif
appendItem(CopyLinkItem, m_contextMenu.get());
}
......@@ -842,7 +838,7 @@ void ContextMenuController::populate()
appendItem(DownloadImageItem, m_contextMenu.get());
if (imageURL.isLocalFile() || m_hitTestResult.image())
appendItem(CopyImageItem, m_contextMenu.get());
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
appendItem(CopyImageUrlItem, m_contextMenu.get());
#endif
}
......@@ -1022,7 +1018,7 @@ void ContextMenuController::populate()
appendItem(DeleteItem, m_contextMenu.get());
appendItem(*separatorItem(), m_contextMenu.get());
#endif
#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
appendItem(SelectAllItem, m_contextMenu.get());
#endif
......@@ -1314,7 +1310,7 @@ void ContextMenuController::checkOrEnableIfNeeded(ContextMenuItem& item) const
case ContextMenuItemTagOpenImageInNewWindow:
case ContextMenuItemTagDownloadImageToDisk:
case ContextMenuItemTagCopyImageToClipboard:
#if PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
#if PLATFORM(GTK) || PLATFORM(EFL)
case ContextMenuItemTagCopyImageUrlToClipboard:
#endif
break;
......
......@@ -3725,7 +3725,7 @@ bool EventHandler::isKeyboardOptionTab(KeyboardEvent* event)
bool EventHandler::eventInvertsTabsToLinksClientCallResult(KeyboardEvent* event)
{
#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(EFL)
#if PLATFORM(MAC) || PLATFORM(EFL)
return EventHandler::isKeyboardOptionTab(event);
#else
return false;
......
/*
* Copyright (C) 2007 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "DragController.h"
#include "Clipboard.h"
#include "DragData.h"
#include "Element.h"
#include "Frame.h"
#include "FrameView.h"
#include "Page.h"
#include "Pasteboard.h"
namespace WebCore {
// FIXME: These values are straight out of DragControllerMac, so probably have
// little correlation with Qt standards...
const int DragController::LinkDragBorderInset = 2;
const int DragController::MaxOriginalImageArea = 1500 * 1500;
const int DragController::DragIconRightInset = 7;
const int DragController::DragIconBottomInset = 3;
const float DragController::DragImageAlpha = 0.75f;
bool DragController::isCopyKeyDown(DragData*)
{
return false;
}
DragOperation DragController::dragOperation(DragData* dragData)
{
// FIXME: This logic is incomplete.
if (dragData->containsURL(0))
return DragOperationCopy;
return DragOperationNone;
}
const IntSize& DragController::maxDragImageSize()
{
static const IntSize maxDragImageSize(400, 400);
return maxDragImageSize;
}
void DragController::cleanupAfterSystemDrag()
{
}
void DragController::declareAndWriteDragImage(Clipboard* clipboard, Element* element, const URL& url, const String& label)
{
clipboard->pasteboard().writeImage(element, url, label);
}
}
/*
* Copyright (C) 2006 Zack Rusin <zack@kde.org>
* Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "config.h"
#include "EventHandler.h"
#include "Clipboard.h"
#include "Cursor.h"
#include "Document.h"
#include "EventNames.h"
#include "FloatPoint.h"
#include "FocusController.h"
#include "Frame.h"
#include "FrameLoader.h"
#include "FrameTree.h"
#include "FrameView.h"
#include "HTMLFrameSetElement.h"
#include "HitTestRequest.h"
#include "HitTestResult.h"
#include "KeyboardEvent.h"
#include "MouseEventWithHitTestResults.h"
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformWheelEvent.h"
#include "RenderWidget.h"
#include "Scrollbar.h"
namespace WebCore {
#if defined(Q_WS_MAC)
const double EventHandler::TextDragDelay = 0.15;
#else
const double EventHandler::TextDragDelay = 0.0;
#endif
bool EventHandler::tabsToAllFormControls(KeyboardEvent* event) const
{
return !isKeyboardOptionTab(event);
}
void EventHandler::focusDocumentView()
{
Page* page = m_frame.page();
if (!page)
return;
page->focusController().setFocusedFrame(&m_frame);
}
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults&)
{
notImplemented();
return false;
}
bool EventHandler::eventActivatedView(const PlatformMouseEvent&) const
{
// Qt has an activation event which is sent independently
// of mouse event so this thing will be a snafu to implement
// correctly
return false;
}
bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widget* widget)
{
Q_ASSERT(widget);
if (!widget->isFrameView())
return false;
return toFrameView(widget)->frame().eventHandler().handleWheelEvent(event);
}
PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
{
return Clipboard::createForDragAndDrop();
}
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler().handleMousePressEvent(mev.event());
return true;
}
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
subframe->eventHandler().handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler().handleMouseReleaseEvent(mev.event());
return true;
}
unsigned EventHandler::accessKeyModifiers()
{
#if OS(DARWIN)
return PlatformEvent::CtrlKey | PlatformEvent::AltKey;
#else
return PlatformEvent::AltKey;
#endif
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment