2 * Copyright 2009, The Android Open Source Project
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
13 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 #define LOG_TAG "WebCore"
29 #define ANDROID_COMPILE_HACK
31 #include "AXObjectCache.h"
32 #include "CachedPage.h"
33 #include "CachedResource.h"
34 #include "Clipboard.h"
36 #include "ContextMenu.h"
37 #include "ContextMenuItem.h"
38 #include "CookieJar.h"
39 #include "CookieStorage.h"
42 #include "DocumentFragment.h"
43 #include "DocumentLoader.h"
44 #include "EditCommand.h"
49 #include "FrameLoadRequest.h"
50 #include "FrameLoader.h"
51 #include "FrameView.h"
52 #include "GraphicsContext.h"
53 #include "HTMLFrameOwnerElement.h"
54 #include "HTMLKeygenElement.h"
57 #include "IconDatabase.h"
58 #include "IconLoader.h"
62 #include "LocalizedStrings.h"
63 #include "MainResourceLoader.h"
65 #include "NotImplemented.h"
66 #include "PageCache.h"
67 #include "Pasteboard.h"
69 #include "ResourceError.h"
70 #include "ResourceHandle.h"
71 #include "ResourceLoader.h"
73 #include "Scrollbar.h"
74 #include "ScrollbarTheme.h"
75 #include "SmartReplace.h"
79 #include <wtf/Assertions.h>
80 #include <wtf/MainThread.h>
81 #include <wtf/text/CString.h>
84 #include "API/JSClassRef.h"
85 #include "JNIUtilityPrivate.h"
86 #include "JavaScriptCallFrame.h"
87 #include "ScriptDebugServer.h"
90 using namespace WebCore;
92 /********************************************************/
93 /* Completely empty stubs (mostly to allow DRT to run): */
94 /********************************************************/
98 // This function tells the bridge that a resource was loaded from the cache and thus
99 // the app may update progress with the amount of data loaded.
100 void CheckCacheObjectStatus(CachedResourceLoader*, CachedResource*)
102 ASSERT_NOT_REACHED();
106 // This class is used in conjunction with the File Upload form element, and
107 // therefore relates to the above. When a file has been selected, an icon
108 // representing the file type can be rendered next to the filename on the
109 // web page. The icon for the file is encapsulated within this class.
111 void Icon::paint(GraphicsContext*, const IntRect&) { }
113 } // namespace WebCore
115 // FIXME, no support for spelling yet.
116 Pasteboard* Pasteboard::generalPasteboard()
118 return new Pasteboard();
121 void Pasteboard::writeSelection(Range*, bool, Frame*)
126 void Pasteboard::writePlainText(const String&)
131 void Pasteboard::writeURL(const KURL&, const String&, Frame*)
136 void Pasteboard::clear()
141 bool Pasteboard::canSmartReplace()
147 PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame*, PassRefPtr<Range>, bool, bool&)
153 String Pasteboard::plainText(Frame*)
159 Pasteboard::Pasteboard()
164 ContextMenu::ContextMenu()
166 ASSERT_NOT_REACHED();
170 ContextMenu::~ContextMenu()
172 ASSERT_NOT_REACHED();
176 void ContextMenu::appendItem(ContextMenuItem&)
178 ASSERT_NOT_REACHED();
182 void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
184 ASSERT_NOT_REACHED();
185 m_platformDescription = menu;
188 PlatformMenuDescription ContextMenu::platformDescription() const
190 ASSERT_NOT_REACHED();
191 return m_platformDescription;
194 ContextMenuItem::ContextMenuItem(PlatformMenuItemDescription)
196 ASSERT_NOT_REACHED();
200 ContextMenuItem::ContextMenuItem(ContextMenu*)
202 ASSERT_NOT_REACHED();
206 ContextMenuItem::ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String&, ContextMenu*)
208 ASSERT_NOT_REACHED();
212 ContextMenuItem::~ContextMenuItem()
214 ASSERT_NOT_REACHED();
218 PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription()
220 ASSERT_NOT_REACHED();
222 return m_platformDescription;
225 ContextMenuItemType ContextMenuItem::type() const
227 ASSERT_NOT_REACHED();
232 void ContextMenuItem::setType(ContextMenuItemType)
234 ASSERT_NOT_REACHED();
238 ContextMenuAction ContextMenuItem::action() const
240 ASSERT_NOT_REACHED();
242 return ContextMenuItemTagNoAction;
245 void ContextMenuItem::setAction(ContextMenuAction)
247 ASSERT_NOT_REACHED();
251 String ContextMenuItem::title() const
253 ASSERT_NOT_REACHED();
258 void ContextMenuItem::setTitle(const String&)
260 ASSERT_NOT_REACHED();
264 PlatformMenuDescription ContextMenuItem::platformSubMenu() const
266 ASSERT_NOT_REACHED();
271 void ContextMenuItem::setSubMenu(ContextMenu*)
273 ASSERT_NOT_REACHED();
277 void ContextMenuItem::setChecked(bool)
279 ASSERT_NOT_REACHED();
283 void ContextMenuItem::setEnabled(bool)
285 ASSERT_NOT_REACHED();
289 // systemBeep() is called by the Editor to indicate that there was nothing to copy, and may be called from
296 void* WebCore::Frame::dragImageForSelection()
301 void WebCore::Pasteboard::writeImage(WebCore::Node*, WebCore::KURL const&, WTF::String const&) {}
305 IntSize dragImageSize(void*)
307 return IntSize(0, 0);
310 void deleteDragImage(void*) {}
311 void* createDragImageFromImage(Image*)
316 void* dissolveDragImageToFraction(void*, float)
321 void* createDragImageIconForCachedImage(CachedImage*)
327 const Cursor& zoomInCursor()
332 const Cursor& zoomOutCursor()
337 const Cursor& notAllowedCursor()
342 void* scaleDragImage(void*, FloatSize)
347 String searchMenuRecentSearchesText()
352 String searchMenuNoRecentSearchesText()
357 String searchMenuClearRecentSearchesText()
362 Vector<String> supportedKeySizes()
365 return Vector<String>();
368 } // namespace WebCore
371 // isCharacterSmartReplaceExempt is defined in SmartReplaceICU.cpp; in theory, we could use that one
372 // but we don't support all of the required icu functions
373 bool isCharacterSmartReplaceExempt(UChar32, bool)
381 int MakeDataExecutable;
383 String KURL::fileSystemPath() const
390 PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&)
398 namespace JSC { namespace Bindings {
399 bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool isStatic, JNIType returnType,
400 jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValue& exceptionDescription)
406 } } // namespace Bindings
409 char* dirname(const char*)
415 // new as of SVN change 38068, Nov 5, 2008
417 void prefetchDNS(const String&)
422 PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
428 // ScrollbarTheme::nativeTheme() is called by RenderTextControl::calcPrefWidths()
429 // like this: scrollbarSize = ScrollbarTheme::nativeTheme()->scrollbarThickness();
430 // with this comment:
431 // // FIXME: We should get the size of the scrollbar from the RenderTheme instead.
432 // since our text control doesn't have scrollbars, the default size of 0 width should be
433 // ok. notImplemented() is commented out below so that we can find other unresolved
434 // unimplemented functions.
435 ScrollbarTheme* ScrollbarTheme::nativeTheme()
437 /* notImplemented(); */
438 static ScrollbarTheme theme;
442 } // namespace WebCore
444 AXObjectCache::~AXObjectCache()
449 // This value turns on or off the Mac specific Accessibility support.
450 bool AXObjectCache::gAccessibilityEnabled = false;
451 bool AXObjectCache::gAccessibilityEnhancedUserInterfaceEnabled = false;
453 void AXObjectCache::childrenChanged(RenderObject*)
458 void AXObjectCache::remove(RenderObject*)
463 void AXObjectCache::remove(Widget*)
472 OpaqueJSClass::~OpaqueJSClass()
477 OpaqueJSClassContextData::~OpaqueJSClassContextData()
486 void setCookieStoragePrivateBrowsingEnabled(bool)
491 void startObservingCookieChanges()
496 void stopObservingCookieChanges()
501 } // namespace WebCore