|
1 /* |
|
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 |
|
9 * Copyright (C) 2007 Nokia |
|
10 * |
|
11 * All rights reserved. |
|
12 * |
|
13 * Redistribution and use in source and binary forms, with or without |
|
14 * modification, are permitted provided that the following conditions |
|
15 * are met: |
|
16 * 1. Redistributions of source code must retain the above copyright |
|
17 * notice, this list of conditions and the following disclaimer. |
|
18 * 2. Redistributions in binary form must reproduce the above copyright |
|
19 * notice, this list of conditions and the following disclaimer in the |
|
20 * documentation and/or other materials provided with the distribution. |
|
21 * |
|
22 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
|
23 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
|
26 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|
27 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
28 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|
29 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|
30 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
33 */ |
|
34 |
|
35 #include "config.h" |
|
36 #include "Frame.h" |
|
37 |
|
38 #include "Element.h" |
|
39 #include "RenderObject.h" |
|
40 #include "RenderWidget.h" |
|
41 #include "RenderLayer.h" |
|
42 #include "Page.h" |
|
43 #include "Document.h" |
|
44 #include "HTMLElement.h" |
|
45 #include "DOMWindow.h" |
|
46 #include "FrameLoadRequest.h" |
|
47 #include "WebFrameLoaderClient.h" |
|
48 #include "DOMImplementation.h" |
|
49 #include "ResourceHandleInternal.h" |
|
50 #include "Document.h" |
|
51 #include "Settings.h" |
|
52 #include "Plugin.h" |
|
53 #include "FrameView.h" |
|
54 #include "FramePrivate.h" |
|
55 #include "GraphicsContext.h" |
|
56 #include "HTMLDocument.h" |
|
57 #include "ResourceHandle.h" |
|
58 #include "FrameLoader.h" |
|
59 #include "PlatformMouseEvent.h" |
|
60 #include "PlatformKeyboardEvent.h" |
|
61 #include "PlatformWheelEvent.h" |
|
62 #include "MouseEventWithHitTestResults.h" |
|
63 #include "SelectionController.h" |
|
64 #include "kjs_proxy.h" |
|
65 #include "TypingCommand.h" |
|
66 #include "JSLock.h" |
|
67 #include "kjs_window.h" |
|
68 #include "runtime_root.h" |
|
69 #include "runtime.h" |
|
70 #include "WebCoreFrameBridge.h" |
|
71 #include "WebCoreWidget.h" |
|
72 |
|
73 namespace WebCore { |
|
74 |
|
75 void Frame::setBridge(WebCoreFrameBridge* bridge) |
|
76 { |
|
77 if (d->m_bridge == bridge) |
|
78 return; |
|
79 |
|
80 if (d->m_bridge) { |
|
81 d->m_bridge->clearFrame(); |
|
82 d->m_bridge->deref(); |
|
83 d->m_bridge = 0; |
|
84 } |
|
85 |
|
86 d->m_bridge = bridge; |
|
87 if (d->m_bridge) |
|
88 d->m_bridge->ref(); |
|
89 |
|
90 } |
|
91 |
|
92 WebCoreFrameBridge* Frame::bridge() const |
|
93 { |
|
94 return d->m_bridge; |
|
95 } |
|
96 |
|
97 |
|
98 void Frame::issueTransposeCommand() |
|
99 { |
|
100 } |
|
101 |
|
102 KJS::Bindings::Instance* Frame::createScriptInstanceForWidget(WebCore::Widget* widget) |
|
103 { |
|
104 MWebCoreWidget* aView = widget->getView(); |
|
105 if (!aView) |
|
106 return 0; |
|
107 void* nativeHandle = aView; |
|
108 RefPtr<KJS::Bindings::RootObject> rootObject = createRootObject(widget->getView(), scriptProxy()->interpreter()); |
|
109 void* npObject = widget->getView()->pluginScriptableObject(); |
|
110 if (npObject) { |
|
111 KJS::Bindings::Instance* instance = KJS::Bindings::Instance::createBindingForLanguageInstance(KJS::Bindings::Instance::CLanguage, npObject, rootObject); |
|
112 return instance; |
|
113 } |
|
114 return NULL; |
|
115 } |
|
116 |
|
117 void Frame::clearPlatformScriptObjects() |
|
118 { |
|
119 } |
|
120 |
|
121 DragImageRef Frame::dragImageForSelection() |
|
122 { |
|
123 return 0; |
|
124 } |
|
125 |
|
126 void Frame::dashboardRegionsChanged() |
|
127 { |
|
128 } |
|
129 |
|
130 } |