summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/android/TemporaryLinkStubs.cpp
blob: d3c81831ca6154d3684aa4e73c8ce19120e7545b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
/*
 * Copyright 2009, The Android Open Source Project
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * 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 THE COPYRIGHT HOLDERS ``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.
 */
#define LOG_TAG "WebCore"

#include "config.h"

#define ANDROID_COMPILE_HACK

#include "AXObjectCache.h"
#include "CachedPage.h"
#include "CachedResource.h"
#include "Clipboard.h"
#include "Console.h"
#include "ContextMenu.h"
#include "ContextMenuItem.h"
#include "CookieJar.h"
#include "CookieStorage.h"
#include "Cursor.h"
#include "Database.h"
#include "DocumentFragment.h"
#include "DocumentLoader.h"
#include "EditCommand.h"
#include "Editor.h"
#include "File.h"
#include "Font.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameLoader.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "HTMLFrameOwnerElement.h"
#include "HTMLKeygenElement.h"
#include "History.h"
#include "Icon.h"
#include "IconDatabase.h"
#include "IconLoader.h"
#include "IntPoint.h"
#include "KURL.h"
#include "Language.h"
#include "LocalizedStrings.h"
#include "MainResourceLoader.h"
#include "Node.h"
#include "NotImplemented.h"
#include "PageCache.h"
#include "Pasteboard.h"
#include "Path.h"
#include "ResourceError.h"
#include "ResourceHandle.h"
#include "ResourceLoader.h"
#include "Screen.h"
#include "Scrollbar.h"
#include "ScrollbarTheme.h"
#include "SmartReplace.h"
#include "Widget.h"
#include <stdio.h>
#include <stdlib.h>
#include <wtf/text/CString.h>

#if USE(JSC)
#include "API/JSClassRef.h"
#include "JNIUtilityPrivate.h"
#include "JavaScriptCallFrame.h"
#include "ScriptDebugServer.h"
#endif

using namespace WebCore;

/********************************************************/
/* Completely empty stubs (mostly to allow DRT to run): */
/********************************************************/

namespace WebCore {

// This function tells the bridge that a resource was loaded from the cache and thus
// the app may update progress with the amount of data loaded.
void CheckCacheObjectStatus(CachedResourceLoader*, CachedResource*)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

// This class is used in conjunction with the File Upload form element, and
// therefore relates to the above. When a file has been selected, an icon
// representing the file type can be rendered next to the filename on the
// web page. The icon for the file is encapsulated within this class.
Icon::~Icon() { }
void Icon::paint(GraphicsContext*, const IntRect&) { }

}  // namespace WebCore

// FIXME, no support for spelling yet.
Pasteboard* Pasteboard::generalPasteboard()
{
    return new Pasteboard();
}

void Pasteboard::writeSelection(Range*, bool, Frame*)
{
    notImplemented();
}

void Pasteboard::writePlainText(const String&)
{
    notImplemented();
}

void Pasteboard::writeURL(const KURL&, const String&, Frame*)
{
    notImplemented();
}

void Pasteboard::clear()
{
    notImplemented();
}

bool Pasteboard::canSmartReplace()
{
    notImplemented();
    return false;
}

PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame*, PassRefPtr<Range>, bool, bool&)
{
    notImplemented();
    return 0;
}

String Pasteboard::plainText(Frame*)
{
    notImplemented();
    return String();
}

Pasteboard::Pasteboard()
{
    notImplemented();
}

ContextMenu::ContextMenu()
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

ContextMenu::~ContextMenu()
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

void ContextMenu::appendItem(ContextMenuItem&)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

void ContextMenu::setPlatformDescription(PlatformMenuDescription menu)
{
    ASSERT_NOT_REACHED();
    m_platformDescription = menu;
}

PlatformMenuDescription ContextMenu::platformDescription() const
{
    ASSERT_NOT_REACHED();
    return m_platformDescription;
}

ContextMenuItem::ContextMenuItem(PlatformMenuItemDescription)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

ContextMenuItem::ContextMenuItem(ContextMenu*)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

ContextMenuItem::ContextMenuItem(ContextMenuItemType, ContextMenuAction, const String&, ContextMenu*)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

ContextMenuItem::~ContextMenuItem()
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

PlatformMenuItemDescription ContextMenuItem::releasePlatformDescription()
{
    ASSERT_NOT_REACHED();
    notImplemented();
    return m_platformDescription;
}

ContextMenuItemType ContextMenuItem::type() const
{
    ASSERT_NOT_REACHED();
    notImplemented();
    return ActionType;
}

void ContextMenuItem::setType(ContextMenuItemType)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

ContextMenuAction ContextMenuItem::action() const
{
    ASSERT_NOT_REACHED();
    notImplemented();
    return ContextMenuItemTagNoAction;
}

void ContextMenuItem::setAction(ContextMenuAction)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

String ContextMenuItem::title() const
{
    ASSERT_NOT_REACHED();
    notImplemented();
    return String();
}

void ContextMenuItem::setTitle(const String&)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

PlatformMenuDescription ContextMenuItem::platformSubMenu() const
{
    ASSERT_NOT_REACHED();
    notImplemented();
    return 0;
}

void ContextMenuItem::setSubMenu(ContextMenu*)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

void ContextMenuItem::setChecked(bool)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

void ContextMenuItem::setEnabled(bool)
{
    ASSERT_NOT_REACHED();
    notImplemented();
}

// systemBeep() is called by the Editor to indicate that there was nothing to copy, and may be called from
// other places too.
void systemBeep()
{
    notImplemented();
}

void* WebCore::Frame::dragImageForSelection()
{
    return 0;
}

void WebCore::Pasteboard::writeImage(WebCore::Node*, WebCore::KURL const&, WTF::String const&) {}

namespace WebCore {

IntSize dragImageSize(void*)
{
    return IntSize(0, 0);
}

void deleteDragImage(void*) {}
void* createDragImageFromImage(Image*)
{
    return 0;
}

void* dissolveDragImageToFraction(void*, float)
{
    return 0;
}

void* createDragImageIconForCachedImage(CachedImage*)
{
    return 0;
}

Cursor dummyCursor;
const Cursor& zoomInCursor()
{
    return dummyCursor;
}

const Cursor& zoomOutCursor()
{
    return dummyCursor;
}

const Cursor& notAllowedCursor()
{
    return dummyCursor;
}

void* scaleDragImage(void*, FloatSize)
{
    return 0;
}

String searchMenuRecentSearchesText()
{
    return String();
}

String searchMenuNoRecentSearchesText()
{
    return String();
}

String searchMenuClearRecentSearchesText()
{
    return String();
}

Vector<String> supportedKeySizes()
{
    notImplemented();
    return Vector<String>();
}

} // namespace WebCore

namespace WebCore {
// isCharacterSmartReplaceExempt is defined in SmartReplaceICU.cpp; in theory, we could use that one
//      but we don't support all of the required icu functions
bool isCharacterSmartReplaceExempt(UChar32, bool)
{
    notImplemented();
    return false;
}

}  // WebCore

int MakeDataExecutable;

String KURL::fileSystemPath() const
{
    notImplemented();
    return String();
}


PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&)
{
    notImplemented();
    return 0;
}


#if USE(JSC)
namespace JSC { namespace Bindings {
bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool isStatic, JNIType returnType, 
        jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValue& exceptionDescription)
{
    notImplemented();
    return false;
}

} }  // namespace Bindings
#endif

char* dirname(const char*)
{
    notImplemented();
    return 0;
}

    // new as of SVN change 38068, Nov 5, 2008
namespace WebCore {
void prefetchDNS(const String&)
{
    notImplemented();
}

PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
{
    notImplemented();
    return 0;
}

// ScrollbarTheme::nativeTheme() is called by RenderTextControl::calcPrefWidths()
// like this: scrollbarSize = ScrollbarTheme::nativeTheme()->scrollbarThickness();
// with this comment:
// // FIXME: We should get the size of the scrollbar from the RenderTheme instead.
// since our text control doesn't have scrollbars, the default size of 0 width should be
// ok. notImplemented() is commented out below so that we can find other unresolved
// unimplemented functions.
ScrollbarTheme* ScrollbarTheme::nativeTheme()
{
    /* notImplemented(); */
    static ScrollbarTheme theme;
    return &theme;
}

}  // namespace WebCore

AXObjectCache::~AXObjectCache()
{
    notImplemented();
}

// This value turns on or off the Mac specific Accessibility support.
bool AXObjectCache::gAccessibilityEnabled = false;
bool AXObjectCache::gAccessibilityEnhancedUserInterfaceEnabled = false;

void AXObjectCache::childrenChanged(RenderObject*)
{
    notImplemented();
}

void AXObjectCache::remove(RenderObject*)
{
    notImplemented();
}

void AXObjectCache::remove(Widget*)
{
    notImplemented();
}

#if USE(JSC)
using namespace JSC;


OpaqueJSClass::~OpaqueJSClass()
{
    notImplemented();
}

OpaqueJSClassContextData::~OpaqueJSClassContextData()
{
    notImplemented();
}

#endif

namespace WebCore {

void setCookieStoragePrivateBrowsingEnabled(bool)
{
    notImplemented();
}

} // namespace WebCore