2 * Copyright (C) 2006 Dirk Mueller <mueller@kde.org>
3 * Copyright (C) 2006 Zack Rusin <zack@kde.org>
4 * Copyright (C) 2006 George Staikos <staikos@kde.org>
5 * Copyright (C) 2006 Simon Hausmann <hausmann@kde.org>
6 * Copyright (C) 2006 Rob Buis <buis@kde.org>
7 * Copyright (C) 2006 Nikolas Zimmermann <zimmermann@kde.org>
8 * Copyright (C) 2007 Trolltech ASA
10 * All rights reserved.
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions and the following disclaimer.
17 * 2. Redistributions in binary form must reproduce the above copyright
18 * notice, this list of conditions and the following disclaimer in the
19 * documentation and/or other materials provided with the distribution.
21 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
22 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
25 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
26 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
27 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
28 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
29 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 #include "RenderObject.h"
39 #include "RenderWidget.h"
40 #include "RenderLayer.h"
43 #include "HTMLElement.h"
44 #include "DOMWindow.h"
45 #include "FrameLoadRequest.h"
46 #include "FrameLoaderClientQt.h"
47 #include "DOMImplementation.h"
48 #include "ResourceHandleInternal.h"
52 #include "FrameView.h"
53 #include "FramePrivate.h"
54 #include "GraphicsContext.h"
55 #include "HTMLDocument.h"
56 #include "ResourceHandle.h"
57 #include "FrameLoader.h"
58 #include "PlatformMouseEvent.h"
59 #include "PlatformKeyboardEvent.h"
60 #include "PlatformWheelEvent.h"
61 #include "MouseEventWithHitTestResults.h"
62 #include "SelectionController.h"
63 #include "kjs_proxy.h"
64 #include "TypingCommand.h"
66 #include "kjs_window.h"
67 #include "runtime_root.h"
69 #include <QScrollArea>
70 #include "NotImplemented.h"
74 // FIXME: Turned this off to fix buildbot. This function be either deleted or used.
76 static void doScroll(const RenderObject* r, bool isHorizontal, int multiplier)
78 // FIXME: The scrolling done here should be done in the default handlers
79 // of the elements rather than here in the part.
83 //broken since it calls scroll on scrollbars
84 //and we have none now
85 //r->scroll(direction, KWQScrollWheel, multiplier);
89 int x = r->layer()->scrollXOffset();
90 int y = r->layer()->scrollYOffset();
96 r->layer()->scrollToOffset(x, y, true, true);
100 KJS::Bindings::Instance* Frame::createScriptInstanceForWidget(WebCore::Widget* widget)
102 QWidget* nativeWidget = widget->nativeWidget();
105 return KJS::Bindings::Instance::createBindingForLanguageInstance(KJS::Bindings::Instance::QtLanguage,
107 bindingRootObject());
110 void Frame::clearPlatformScriptObjects()
114 DragImageRef Frame::dragImageForSelection()