1/* 2 * Copyright 2009, The Android Open Source Project 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 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. 12 * 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. 24 */ 25#define LOG_TAG "WebCore" 26 27#include "config.h" 28 29#define ANDROID_COMPILE_HACK 30 31#include "AXObjectCache.h" 32#include "CachedPage.h" 33#include "CachedResource.h" 34#include "Clipboard.h" 35#include "Console.h" 36#include "ContextMenu.h" 37#include "ContextMenuItem.h" 38#include "CookieJar.h" 39#include "CookieStorage.h" 40#include "Cursor.h" 41#include "Database.h" 42#include "DocumentFragment.h" 43#include "DocumentLoader.h" 44#include "EditCommand.h" 45#include "Editor.h" 46#include "File.h" 47#include "Font.h" 48#include "Frame.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" 55#include "History.h" 56#include "Icon.h" 57#include "IconDatabase.h" 58#include "IconLoader.h" 59#include "IntPoint.h" 60#include "KURL.h" 61#include "Language.h" 62#include "LocalizedStrings.h" 63#include "MainResourceLoader.h" 64#include "Node.h" 65#include "NotImplemented.h" 66#include "PageCache.h" 67#include "Pasteboard.h" 68#include "Path.h" 69#include "ResourceError.h" 70#include "ResourceHandle.h" 71#include "ResourceLoader.h" 72#include "Screen.h" 73#include "Scrollbar.h" 74#include "ScrollbarTheme.h" 75#include "SmartReplace.h" 76#include "Widget.h" 77#include <stdio.h> 78#include <stdlib.h> 79#include <wtf/Assertions.h> 80#include <wtf/MainThread.h> 81#include <wtf/text/CString.h> 82 83using namespace WebCore; 84 85/********************************************************/ 86/* Completely empty stubs (mostly to allow DRT to run): */ 87/********************************************************/ 88 89namespace WebCore { 90 91// This function tells the bridge that a resource was loaded from the cache and thus 92// the app may update progress with the amount of data loaded. 93void CheckCacheObjectStatus(CachedResourceLoader*, CachedResource*) 94{ 95 ASSERT_NOT_REACHED(); 96 notImplemented(); 97} 98 99// This class is used in conjunction with the File Upload form element, and 100// therefore relates to the above. When a file has been selected, an icon 101// representing the file type can be rendered next to the filename on the 102// web page. The icon for the file is encapsulated within this class. 103Icon::~Icon() { } 104void Icon::paint(GraphicsContext*, const IntRect&) { } 105 106} // namespace WebCore 107 108// FIXME, no support for spelling yet. 109Pasteboard* Pasteboard::generalPasteboard() 110{ 111 return new Pasteboard(); 112} 113 114void Pasteboard::writeSelection(Range*, bool, Frame*) 115{ 116 notImplemented(); 117} 118 119void Pasteboard::writePlainText(const String&) 120{ 121 notImplemented(); 122} 123 124void Pasteboard::writeURL(const KURL&, const String&, Frame*) 125{ 126 notImplemented(); 127} 128 129void Pasteboard::clear() 130{ 131 notImplemented(); 132} 133 134bool Pasteboard::canSmartReplace() 135{ 136 notImplemented(); 137 return false; 138} 139 140PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame*, PassRefPtr<Range>, bool, bool&) 141{ 142 notImplemented(); 143 return 0; 144} 145 146String Pasteboard::plainText(Frame*) 147{ 148 notImplemented(); 149 return String(); 150} 151 152Pasteboard::Pasteboard() 153{ 154 notImplemented(); 155} 156 157ContextMenu::ContextMenu() 158{ 159 ASSERT_NOT_REACHED(); 160 notImplemented(); 161} 162 163ContextMenu::~ContextMenu() 164{ 165 ASSERT_NOT_REACHED(); 166 notImplemented(); 167} 168 169void ContextMenu::appendItem(ContextMenuItem&) 170{ 171 ASSERT_NOT_REACHED(); 172 notImplemented(); 173} 174 175void ContextMenu::setPlatformDescription(PlatformMenuDescription menu) 176{ 177 ASSERT_NOT_REACHED(); 178 m_platformDescription = menu; 179} 180 181PlatformMenuDescription ContextMenu::platformDescription() const 182{ 183 ASSERT_NOT_REACHED(); 184 return m_platformDescription; 185} 186 187ContextMenuItem::ContextMenuItem(PlatformMenuItemDescription) 188{ 189 ASSERT_NOT_REACHED(); 190 notImplemented(); 191} 192 193ContextMenuItem::ContextMenuItem(ContextMenu*) 194{ 195 ASSERT_NOT_REACHED(); 196 notImplemented(); 197} 198 199ContextMenuItem::ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String&, ContextMenu*) 200{ 201 ASSERT_NOT_REACHED(); 202 notImplemented(); 203} 204 205ContextMenuItem::~ContextMenuItem() 206{ 207 ASSERT_NOT_REACHED(); 208 notImplemented(); 209} 210 211PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription() 212{ 213 ASSERT_NOT_REACHED(); 214 notImplemented(); 215 return m_platformDescription; 216} 217 218ContextMenuItemType ContextMenuItem::type() const 219{ 220 ASSERT_NOT_REACHED(); 221 notImplemented(); 222 return ActionType; 223} 224 225void ContextMenuItem::setType(ContextMenuItemType) 226{ 227 ASSERT_NOT_REACHED(); 228 notImplemented(); 229} 230 231ContextMenuAction ContextMenuItem::action() const 232{ 233 ASSERT_NOT_REACHED(); 234 notImplemented(); 235 return ContextMenuItemTagNoAction; 236} 237 238void ContextMenuItem::setAction(ContextMenuAction) 239{ 240 ASSERT_NOT_REACHED(); 241 notImplemented(); 242} 243 244String ContextMenuItem::title() const 245{ 246 ASSERT_NOT_REACHED(); 247 notImplemented(); 248 return String(); 249} 250 251void ContextMenuItem::setTitle(const String&) 252{ 253 ASSERT_NOT_REACHED(); 254 notImplemented(); 255} 256 257PlatformMenuDescription ContextMenuItem::platformSubMenu() const 258{ 259 ASSERT_NOT_REACHED(); 260 notImplemented(); 261 return 0; 262} 263 264void ContextMenuItem::setSubMenu(ContextMenu*) 265{ 266 ASSERT_NOT_REACHED(); 267 notImplemented(); 268} 269 270void ContextMenuItem::setChecked(bool) 271{ 272 ASSERT_NOT_REACHED(); 273 notImplemented(); 274} 275 276void ContextMenuItem::setEnabled(bool) 277{ 278 ASSERT_NOT_REACHED(); 279 notImplemented(); 280} 281 282// systemBeep() is called by the Editor to indicate that there was nothing to copy, and may be called from 283// other places too. 284void systemBeep() 285{ 286 notImplemented(); 287} 288 289void* WebCore::Frame::dragImageForSelection() 290{ 291 return 0; 292} 293 294void WebCore::Pasteboard::writeImage(WebCore::Node*, WebCore::KURL const&, WTF::String const&) {} 295 296namespace WebCore { 297 298IntSize dragImageSize(void*) 299{ 300 return IntSize(0, 0); 301} 302 303void deleteDragImage(void*) {} 304void* createDragImageFromImage(Image*) 305{ 306 return 0; 307} 308 309void* dissolveDragImageToFraction(void*, float) 310{ 311 return 0; 312} 313 314void* createDragImageIconForCachedImage(CachedImage*) 315{ 316 return 0; 317} 318 319Cursor dummyCursor; 320const Cursor& zoomInCursor() 321{ 322 return dummyCursor; 323} 324 325const Cursor& zoomOutCursor() 326{ 327 return dummyCursor; 328} 329 330const Cursor& notAllowedCursor() 331{ 332 return dummyCursor; 333} 334 335void* scaleDragImage(void*, FloatSize) 336{ 337 return 0; 338} 339 340String searchMenuRecentSearchesText() 341{ 342 return String(); 343} 344 345String searchMenuNoRecentSearchesText() 346{ 347 return String(); 348} 349 350String searchMenuClearRecentSearchesText() 351{ 352 return String(); 353} 354 355Vector<String> supportedKeySizes() 356{ 357 notImplemented(); 358 return Vector<String>(); 359} 360 361} // namespace WebCore 362 363namespace WebCore { 364// isCharacterSmartReplaceExempt is defined in SmartReplaceICU.cpp; in theory, we could use that one 365// but we don't support all of the required icu functions 366bool isCharacterSmartReplaceExempt(UChar32, bool) 367{ 368 notImplemented(); 369 return false; 370} 371 372} // WebCore 373 374int MakeDataExecutable; 375 376String KURL::fileSystemPath() const 377{ 378 notImplemented(); 379 return String(); 380} 381 382 383PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&) 384{ 385 notImplemented(); 386 return 0; 387} 388 389 390char* dirname(const char*) 391{ 392 notImplemented(); 393 return 0; 394} 395 396 // new as of SVN change 38068, Nov 5, 2008 397namespace WebCore { 398void prefetchDNS(const String&) 399{ 400 notImplemented(); 401} 402 403PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&) 404{ 405 notImplemented(); 406 return 0; 407} 408 409// ScrollbarTheme::nativeTheme() is called by RenderTextControl::calcPrefWidths() 410// like this: scrollbarSize = ScrollbarTheme::nativeTheme()->scrollbarThickness(); 411// with this comment: 412// // FIXME: We should get the size of the scrollbar from the RenderTheme instead. 413// since our text control doesn't have scrollbars, the default size of 0 width should be 414// ok. notImplemented() is commented out below so that we can find other unresolved 415// unimplemented functions. 416ScrollbarTheme* ScrollbarTheme::nativeTheme() 417{ 418 /* notImplemented(); */ 419 static ScrollbarTheme theme; 420 return &theme; 421} 422 423} // namespace WebCore 424 425AXObjectCache::~AXObjectCache() 426{ 427 notImplemented(); 428} 429 430// This value turns on or off the Mac specific Accessibility support. 431bool AXObjectCache::gAccessibilityEnabled = false; 432bool AXObjectCache::gAccessibilityEnhancedUserInterfaceEnabled = false; 433 434void AXObjectCache::childrenChanged(RenderObject*) 435{ 436 notImplemented(); 437} 438 439void AXObjectCache::remove(RenderObject*) 440{ 441 notImplemented(); 442} 443 444void AXObjectCache::remove(Widget*) 445{ 446 notImplemented(); 447} 448 449namespace WebCore { 450 451void setCookieStoragePrivateBrowsingEnabled(bool) 452{ 453 notImplemented(); 454} 455 456void startObservingCookieChanges() 457{ 458 notImplemented(); 459} 460 461void stopObservingCookieChanges() 462{ 463 notImplemented(); 464} 465 466} // namespace WebCore 467