Implement PluginInfoStore::shouldUsePlugin on Windows
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-11-05  Adam Roben  <aroben@apple.com>
2
3         Implement PluginInfoStore::shouldUsePlugin on Windows
4
5         Fixes <http://webkit.org/b/43509> <rdar://problem/8273822> WebKit2
6         should refuse to load the same plugins that old-WebKit refuses to load
7
8         Reviewed by Anders Carlsson.
9
10         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
11         (WebKit::fileVersion): Helper function to construct a 64-bit file
12         version from two 32-bit numbers.
13         (WebKit::PluginInfoStore::getPluginInfo): Ported code from
14         WebCore::PluginPackage::fetchInfo to get the plugin's version. We now
15         store it in Plugin::fileVersion.
16
17         (WebKit::isOldWindowsMediaPlayerPlugin):
18         (WebKit::isNewWindowsMediaPlayerPlugin):
19         Added these helpers. The code came from
20         WebCore::PluginDatabase::getPluginPathsInDirectories.
21
22         (WebKit::PluginInfoStore::shouldUsePlugin): Implemented. The code was
23         ported from WebCore::PluginDatabase::getPluginPathsInDirectories and
24         WebCore::PluginPackage::isPluginBlacklisted.
25
26 2010-11-05  Adam Roben  <aroben@apple.com>
27
28         Operate on m_plugins directly in PluginInfoStore::shouldUsePlugin
29
30         We'll need to operate on m_plugins if we ever want to unload an
31         already-loaded plugin before loading the new one.
32
33         Fixes <http://webkit.org/b/49076> loadedPlugins parameter to
34         PluginInfoStore::shouldUsePlugin is redundant
35
36         Reviewed by Anders Carlsson.
37
38         * UIProcess/Plugins/PluginInfoStore.cpp:
39         (WebKit::PluginInfoStore::loadPlugin):
40         * UIProcess/Plugins/PluginInfoStore.h:
41         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
42         (WebKit::PluginInfoStore::shouldUsePlugin):
43         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
44         (WebKit::PluginInfoStore::shouldUsePlugin):
45         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
46         (WebKit::PluginInfoStore::shouldUsePlugin):
47         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
48         (WebKit::PluginInfoStore::shouldUsePlugin):
49         Removed the loadedPlugins parameter from shouldUsePlugin. The single
50         implementation (Mac) now uses m_plugins directly.
51
52 2010-11-05  Anders Carlsson  <andersca@apple.com>
53
54         Reviewed by Adam Roben.
55
56         Implement pluginElementNPObject
57         https://bugs.webkit.org/show_bug.cgi?id=49077
58
59         * PluginProcess/PluginControllerProxy.cpp:
60         (WebKit::PluginControllerProxy::pluginElementNPObject):
61         Send the GetPluginElementNPObject message.
62
63         * WebProcess/Plugins/PluginProxy.cpp:
64         (WebKit::PluginProxy::getPluginElementNPObject):
65         Get the plug-in element NPObject and expose it to the other side of the connection.
66
67         * WebProcess/Plugins/PluginProxy.messages.in:
68         Add GetPluginElementNPObject.
69
70 2010-11-04  Anders Carlsson  <andersca@apple.com>
71
72         Reviewed by Oliver Hunt.
73
74         Implement NP_RemoveProperty and NP_Enumerate
75         https://bugs.webkit.org/show_bug.cgi?id=49046
76
77         * Shared/Plugins/NPObjectMessageReceiver.cpp:
78         (WebKit::NPObjectMessageReceiver::removeProperty):
79         Call the removeProperty NPClass function.
80
81         (WebKit::NPObjectMessageReceiver::enumerate):
82         Call the enumerate NPClass function.
83
84         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
85         Add RemoveProperty and Enumerate messages.
86
87         * Shared/Plugins/NPObjectProxy.cpp:
88         (WebKit::NPObjectProxy::removeProperty):
89         Send the RemoveProperty message.
90
91         (WebKit::NPObjectProxy::enumerate):
92         Send the Enumerate message.
93
94         (WebKit::NPObjectProxy::NP_RemoveProperty):
95         Call removeProperty.
96
97         (WebKit::NPObjectProxy::NP_Enumerate):
98         Call enumerate.
99
100 2010-11-05  Sam Weinig  <sam@webkit.org>
101
102         Fix failing python tests.
103
104         * Scripts/webkit2/messages.py:
105         * Scripts/webkit2/messages_unittest.py:
106
107 2010-11-05  Sam Weinig  <sam@webkit.org>
108
109         Reviewed by Adam Roben..
110
111         Generate the messages sent to the WebProcessProxy
112         https://bugs.webkit.org/show_bug.cgi?id=49062
113
114         * Platform/CoreIPC/MessageID.h:
115         Temporarily add MessageClassWebProcessProxyLegacy while we still can't
116         support GetPluginProcessConnection (and deferred sync replies) in the
117         general mechanism.
118
119         * Scripts/webkit2/messages.py:
120         Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
121
122         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
123         Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
124
125         * UIProcess/WebProcessProxy.cpp:
126         (WebKit::WebProcessProxy::getPluginPath):
127         (WebKit::WebProcessProxy::addBackForwardItem):
128         (WebKit::WebProcessProxy::didNavigateWithNavigationData):
129         (WebKit::WebProcessProxy::didPerformClientRedirect):
130         (WebKit::WebProcessProxy::didPerformServerRedirect):
131         (WebKit::WebProcessProxy::didUpdateHistoryTitle):
132         (WebKit::WebProcessProxy::didReceiveMessage):
133         (WebKit::WebProcessProxy::didReceiveSyncMessage):
134         (WebKit::WebProcessProxy::didDestroyFrame):
135         * UIProcess/WebProcessProxy.h:
136         * UIProcess/WebProcessProxy.messages.in: Added.
137         Move implementations to their own functions.
138
139         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
140         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
141         Change to use WebProcessProxyLegacyMessage.
142
143         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
144         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
145         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
146         (WebKit::WebFrameLoaderClient::setTitle):
147         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
148         (WebKit::WebPlatformStrategies::populatePluginCache):
149         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
150         (WebKit::updateBackForwardItem):
151         * WebProcess/WebPage/WebPage.cpp:
152         (WebKit::WebPage::createPlugin):
153         * WebProcess/WebProcess.cpp:
154         (WebKit::WebProcess::addVisitedLink):
155         (WebKit::WebProcess::removeWebFrame):
156         Use generated messages.
157
158         * DerivedSources.make:
159         * DerivedSources.pro:
160         * WebKit2.pro:
161         * WebKit2.xcodeproj/project.pbxproj:
162         * win/WebKit2.vcproj:
163         Add new files.
164
165 2010-11-04  Adam Roben  <aroben@apple.com>
166
167         Use a window region to clip windowed plugins
168
169         Fixes <http://webkit.org/b/49024> <rdar://problem/8487847> Windowed
170         plugins aren't clipped in WebKit2 on Windows
171
172         Reviewed by Jon Honeycutt.
173
174         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
175         (WebKit::registerPluginView): Removed the CS_PARENTDC style. This style
176         makes Windows ignore the window region and always clip to the parent
177         window. Also pass WebKit.dll's HINSTANCE as part of the WNDCLASSW
178         struct so that the window class will be specific to WebKit.dll rather
179         than to WebKit2WebProcess.exe. This is useful for testing, but also
180         more pedantically correct.
181         (WebKit::setWindowRegion): Helper function to set a window region and
182         deal with ownership of the HRGN correctly.
183         (WebKit::NetscapePlugin::platformGeometryDidChange): Make an HRGN that
184         corresponds to m_clipRect and set it on the plugin's window.
185
186 2010-11-05  Balazs Kelemen  <kbalazs@webkit.org>
187
188         Reviewed by Andreas Kling.
189
190         [Qt][WK2] Left over files and shared memory segments
191         https://bugs.webkit.org/show_bug.cgi?id=48985
192
193         * Platform/qt/SharedMemoryQt.cpp:
194         (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
195         object on terminate by connecting QCoreApplication::aboutToQuit with
196         deleteLater. Add the object to the CrashHandler as well to release the
197         shared memory segment even on crash.
198         (WebKit::SharedMemory::~SharedMemory):
199         * Shared/qt/CrashHandler.cpp: Added.
200         CrashHandler has a container for QObjects that we want to
201         destroy on crash. When we got a signal that we interpret as
202         a crash then it destroys those objects.
203         (WebKit::CrashHandler::CrashHandler):
204         (WebKit::CrashHandler::signalHandler):
205         (WebKit::CrashHandler::deleteObjects):
206         * Shared/qt/CrashHandler.h: Added.
207         (WebKit::CrashHandler::instance):
208         (WebKit::CrashHandler::didDelete):
209         (WebKit::CrashHandler::markForDeletionOnCrash):
210         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
211         (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
212         Add the object itself to the CrashHandler to close the QLocalServer
213         even on crash. Without that the QLocalServer leaves over socket files on the disk.
214         (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
215         * WebKit2.pro:
216
217 2010-11-04  Jia Pu  <jpu@apple.com>
218
219         Reviewed by Dan Bernstein.
220
221         reversion bubble in WebViews
222         https://bugs.webkit.org/show_bug.cgi?id=47630
223         <rdar://problem/8530960>
224
225         This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
226
227         * WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
228         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
229         (WebKit::WebEditorClient::showCorrectionPanel):
230         (WebKit::WebEditorClient::dismissCorrectionPanel):
231
232 2010-11-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
233
234         Reviewed by David Hyatt.
235
236         Delegate scrolling via a separate method
237         https://bugs.webkit.org/show_bug.cgi?id=48988
238
239         Add delegatedScrollRequested method to WebChromeClient,
240         which is only used in conjunging with tiling, and thus ifdef'ed.
241
242         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
243         (WebKit::WebChromeClient::delegatedScrollRequested):
244         * WebProcess/WebCoreSupport/WebChromeClient.h:
245
246 2010-11-03  Enrica Casucci  <enrica@apple.com>
247
248         Reviewed by Alexey Proskuryakov.
249
250         Need a way to test in WebKit2 whether a form field contains marked text
251         <rdar://problem/8555293>
252         https://bugs.webkit.org/show_bug.cgi?id=48969
253         
254         Added a selection changed notification from the Web process to the UI process.
255         The message being sent contains information about the current selection.
256         Event though for this specific bug the only information required is the marked text,
257         I've added other selection information that will be needed to support IME.
258         All the stubbed methods are required methods by the NSTextInput protocol.
259         
260         * UIProcess/API/mac/PageClientImpl.h:
261         * UIProcess/API/mac/PageClientImpl.mm:
262         (WebKit::PageClientImpl::selectionChanged): Added.
263         * UIProcess/API/mac/WKView.h:
264         * UIProcess/API/mac/WKView.mm:
265         (-[WKView initWithFrame:pageNamespaceRef:]): Added initialization of new members.
266         (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:]): Stores the values from
267         the selection changed message.
268         (-[WKView selectedRange]): Added stub.
269         (-[WKView hasMarkedText]): Implemented.
270         (-[WKView unmarkText]): Added stub.
271         (-[WKView validAttributesForMarkedText]): Added stub.
272         (-[WKView setMarkedText:selectedRange:]): Added stub.
273         (-[WKView markedRange]): Added stub.
274         (-[WKView attributedSubstringFromRange:]): Added stub.
275         (-[WKView conversationIdentifier]): Added stub.
276         (-[WKView characterIndexForPoint:]): Added stub.
277         (-[WKView firstRectForCharacterRange:]): Added stub.
278         * UIProcess/API/mac/WKViewInternal.h:
279         * UIProcess/API/qt/qwkpage.cpp:
280         (QWKPagePrivate::selectionChanged): Added.
281         * UIProcess/API/qt/qwkpage_p.h:
282         * UIProcess/PageClient.h:
283         * UIProcess/WebPageProxy.cpp:
284         (WebKit::WebPageProxy::didSelectionChange): New message handler.
285         * UIProcess/WebPageProxy.h:
286         * UIProcess/WebPageProxy.messages.in:
287         * UIProcess/win/WebView.cpp:
288         (WebKit::WebView::selectionChanged): Added.
289         * UIProcess/win/WebView.h:
290         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
291         (WebKit::WebEditorClient::respondToChangedSelection): Added implementation.
292
293 2010-11-04  Balazs Kelemen  <kbalazs@webkit.org>
294
295         Reviewed by Andreas Kling.
296
297         [Qt][WK2] Cleanup UpdateChunk and MappedMemoryPool
298         https://bugs.webkit.org/show_bug.cgi?id=48994
299
300         * Platform/qt/MappedMemoryPool.cpp:
301         (WebKit::MappedMemoryPool::mapMemory):
302         Removed argument with default value that was always
303         used with the default value.
304         (WebKit::MappedMemoryPool::mapFile): Ditto and
305         add some asserts.
306         * Platform/qt/MappedMemoryPool.h:
307         Encapsulating MappedMemory and remove the unused
308         MappedMemoryPool::searchForMappedMemory method.
309         (WebKit::MappedMemory::mappedFile):
310         (WebKit::MappedMemory::markFree):
311         (WebKit::MappedMemory::data):
312         (WebKit::MappedMemory::MappedMemory):
313         (WebKit::MappedMemory::markUsed):
314         (WebKit::MappedMemory::mapSize):
315         (WebKit::MappedMemory::isFree):
316         (WebKit::MappedMemoryPool::instance):
317         * Shared/qt/UpdateChunk.cpp:
318         Removed the unused data method besides other cleanups.
319         (WebKit::UpdateChunk::UpdateChunk):
320         (WebKit::UpdateChunk::encode):
321         (WebKit::UpdateChunk::decode):
322         (WebKit::UpdateChunk::createImage):
323         * Shared/qt/UpdateChunk.h:
324
325 2010-11-04  Andreas Kling  <kling@webkit.org>
326
327         Reviewed by Tor Arne Vestbø.
328
329         [Qt] Add a stub WebContextMenuProxy
330
331         This is the Qt equivalent of r71333.
332
333         * UIProcess/API/qt/qwkpage.cpp:
334         (QWKPagePrivate::createContextMenuProxy):
335         * UIProcess/qt/WebContextMenuProxyQt.cpp: Added.
336         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
337         (WebKit::WebContextMenuProxyQt::create):
338         (WebKit::WebContextMenuProxyQt::showContextMenu):
339         (WebKit::WebContextMenuProxyQt::hideContextMenu):
340         * UIProcess/qt/WebContextMenuProxyQt.h: Added.
341         * WebKit2.pro:
342
343 2010-11-04  Adam Roben  <aroben@apple.com>
344
345         Add a do-nothing WebContextMenuProxy implementation on Windows
346
347         Fixes <http://webkit.org/b/48992> REGRESSION (r71041): Crash in
348         WebPageProxy::showContextMenu when right-clicking in WebKit2 on
349         Windows
350
351         Reviewed by Dan Bernstein.
352
353         * UIProcess/win/WebContextMenuProxyWin.cpp: Added.
354         (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
355         (WebKit::WebContextMenuProxyWin::create):
356         (WebKit::WebContextMenuProxyWin::showContextMenu):
357         (WebKit::WebContextMenuProxyWin::hideContextMenu):
358         * UIProcess/win/WebContextMenuProxyWin.h: Added.
359         Just stubbed-out this class.
360
361         * UIProcess/win/WebView.cpp:
362         (WebKit::WebView::createContextMenuProxy): Create a new
363         WebContextMenuProxyWin and return it. Returning 0 results in a crash.
364
365         * win/WebKit2.vcproj: Added WebContextMenuProxyWin.
366
367 2010-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
368
369         Reviewed by Andreas Kling..
370
371         [Qt] Build Webkit2 both in debug and release on Mac
372
373         On Mac OS X we build QtWebKit in both debug and release, so
374         we need to also build the webkit2 library in both configs.
375
376         * WebKit2.pro:
377
378 2010-11-04  Adam Roben  <aroben@apple.com>
379
380         Remove lame puts()s from WebPageProxy
381
382         Rubber-stamped by Anders Carlsson.
383
384         * UIProcess/WebPageProxy.cpp:
385         (WebKit::WebPageProxy::loadURL):
386         (WebKit::WebPageProxy::loadURLRequest):
387
388 2010-11-03  Alice Liu  <alice.liu@apple.com>
389
390         Fix clang++ build 
391
392         * PluginProcess/PluginProcess.h:
393         * UIProcess/Plugins/PluginProcessProxy.h:
394         * UIProcess/WebContextMenuProxy.h:
395         Change class to struct and vise versa where needed.
396
397 2010-11-03  Anders Carlsson  <andersca@apple.com>
398
399         Reviewed by Adam Roben.
400
401         Implement NP_SetProperty
402         https://bugs.webkit.org/show_bug.cgi?id=48956
403
404         * Shared/Plugins/NPObjectMessageReceiver.cpp:
405         (WebKit::NPObjectMessageReceiver::setProperty):
406         Call the NPClass setProperty function.
407
408         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
409         Add SetProperty message.
410
411         * Shared/Plugins/NPObjectProxy.cpp:
412         (WebKit::NPObjectProxy::setProperty):
413         Send a SetProperty message.
414
415         (WebKit::NPObjectProxy::NP_SetProperty):
416         Call NPObjectProxy::setProperty.
417
418 2010-11-03  Anders Carlsson  <andersca@apple.com>
419
420         Reviewed by Simon Fraser.
421
422         Out of process plug-ins don't support the CA drawing model
423         https://bugs.webkit.org/show_bug.cgi?id=48950
424         <rdar://problem/8626019>
425
426         * Platform/CoreIPC/HandleMessage.h:
427         (CoreIPC::callMemberFunction):
428         Add new overload.
429
430         * PluginProcess/PluginControllerProxy.cpp:
431         (WebKit::PluginControllerProxy::initialize):
432         Call platformInitialize().
433
434         (WebKit::PluginControllerProxy::destroy):
435         Call platformDestroy().
436
437         (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
438         Assume that accelerated compositing is available if we have a render server port.
439
440         (WebKit::PluginControllerProxy::geometryDidChange):
441         Call platformGeometryDidChange().
442
443         * PluginProcess/PluginProcess.h:
444         * PluginProcess/WebProcessConnection.cpp:
445         (WebKit::WebProcessConnection::createPlugin):
446         Pass back the remote layer client ID.
447
448         * PluginProcess/WebProcessConnection.messages.in:
449         Add a remoteLayerClientID out parameter to CreatePlugin.
450
451         * PluginProcess/mac/PluginControllerProxyMac.mm: Added.
452         (WebKit::PluginControllerProxy::platformInitialize):
453         If the plug-in has a layer, create a remote layer client and associate it with the layer.
454
455         (WebKit::PluginControllerProxy::platformDestroy):
456         Invalidate the remote layer client.
457
458         (WebKit::PluginControllerProxy::remoteLayerClientID):
459         Return the remote layer client ID if one exists.
460
461         (WebKit::PluginControllerProxy::platformGeometryDidChange):
462         Update the layer bounds.
463
464         * WebKit2.xcodeproj/project.pbxproj:
465         Add new files.
466
467         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: Added.
468         (WebKit::PluginProxy::pluginLayer):
469         Create a render layer if needed.
470
471         (WebKit::PluginProxy::needsBackingStore):
472         Return whether the plug-in needs a backing store. (It doesn't need a backing store if it's a CA plug-in).
473
474         * WebProcess/Plugins/PluginProxy.cpp:
475         (WebKit::PluginProxy::PluginProxy):
476         Initialize m_remoteLayerClientID.
477
478         (WebKit::PluginProxy::initialize):
479         Set m_remoteLayerClientID.
480
481         (WebKit::PluginProxy::paint):
482         Bail if the plug-in doesn't need a backing store.
483
484         (WebKit::PluginProxy::geometryDidChange):
485         Don't create a backing store if the plug-in doesn't need one.
486
487         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
488         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
489         Remove RetainPtr initialization.
490
491         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
492         (WebKit::LayerBackedDrawingArea::platformClear):
493         Use nullptr instead of 0.
494
495 2010-11-03  Anders Carlsson  <andersca@apple.com>
496
497         Reviewed by Simon Fraser.
498
499         Crash when layout in response to setSize changes the drawing area
500         https://bugs.webkit.org/show_bug.cgi?id=48947
501
502         This is tested by compositing/plugins/small-to-large-composited-plugin.html.
503
504         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
505         (WebKit::ChunkedUpdateDrawingArea::setSize):
506         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
507         (WebKit::LayerBackedDrawingArea::setSize):
508
509 2010-11-03  Anders Carlsson  <andersca@apple.com>
510
511         Reviewed by Adam Roben.
512
513         Pass the accelerated compositing render server port to the plug-in process at startup
514         https://bugs.webkit.org/show_bug.cgi?id=48925
515
516         * PluginProcess/PluginProcess.cpp:
517         (WebKit::PluginProcess::PluginProcess):
518         Initialize m_compositingRenderServerPort to MACH_PORT_NULL.
519
520         (WebKit::PluginProcess::initialize):
521         Get the plug-in path and render server port from the creation parameters.
522         
523         * PluginProcess/PluginProcess.messages.in:
524         Change the Initialize message to take a PluginProcessCreationParameters struct.
525
526         * Shared/Plugins/PluginProcessCreationParameters.cpp: Added.
527         * Shared/Plugins/PluginProcessCreationParameters.h: Added.
528         Add new PluginProcessCreationParameters struct.
529
530         * UIProcess/Plugins/PluginProcessProxy.cpp:
531         (WebKit::PluginProcessProxy::didFinishLaunching):
532         Initialize now takes a PluginProcessCreationParameters struct.
533
534         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: Added.
535         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
536         Initialize the render server port.
537
538         * WebKit2.xcodeproj/project.pbxproj:
539         Add new files.
540
541 2010-11-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
542
543         Reviewed by Kenneth Rohde Christiansen.
544
545         [Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
546
547         Otherwise the library order will get messed up and cause
548         missing symbols on Mac OS X.
549
550         * WebKit2.pri:
551         * WebKit2.pro:
552
553 2010-11-02  Daniel Bates  <dbates@rim.com>
554
555         Reviewed by Adam Barth.
556
557         For unnamed frames, window.name returns a generated name
558         https://bugs.webkit.org/show_bug.cgi?id=6751
559
560         Part 1 of 2.
561
562         Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
563
564         * WebProcess/WebPage/WebFrame.cpp:
565         (WebKit::WebFrame::name):
566
567 2010-11-02  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
568
569         Reviewed by Martin Robinson.
570
571         Changes to enable building WebKit2 for Gtk port.
572         (https://bugs.webkit.org/show_bug.cgi?id=37369)
573
574         * Platform/gtk: Added.
575         * Platform/gtk/SharedMemoryGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
576         (WebKit::SharedMemory::Handle::Handle):
577         (WebKit::SharedMemory::Handle::~Handle):
578         (WebKit::SharedMemory::Handle::encode):
579         (WebKit::SharedMemory::Handle::decode):
580         (WebKit::SharedMemory::create):
581         (WebKit::SharedMemory::~SharedMemory):
582         (WebKit::SharedMemory::createHandle):
583         (WebKit::SharedMemory::systemPageSize):
584         * Shared/gtk: Added.
585         * Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
586         (WebKit::BackingStore::createGraphicsContext):
587         (WebKit::BackingStore::paint):
588         * Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
589         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
590         (WebKit::PlatformCertificateInfo::encode):
591         (WebKit::PlatformCertificateInfo::decode):
592         * Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
593         (CoreIPC::encodeResourceRequest):
594         (CoreIPC::decodeResourceRequest):
595         * UIProcess/Plugins/gtk: Added.
596         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
597         (WebKit::PluginInfoStore::pluginsDirectories):
598         (WebKit::PluginInfoStore::pluginPathsInDirectory):
599         (WebKit::PluginInfoStore::individualPluginPaths):
600         (WebKit::PluginInfoStore::getPluginInfo):
601         (WebKit::PluginInfoStore::shouldUsePlugin):
602         * WebProcess/InjectedBundle/InjectedBundle.h:
603         * WebProcess/InjectedBundle/gtk: Added.
604         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
605         (WebKit::InjectedBundle::load):
606         (WebKit::InjectedBundle::activateMacFontAscentHack):
607         * WebProcess/Plugins/Netscape/gtk: Added.
608         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
609         (WebKit::NetscapePlugin::platformPostInitialize):
610         (WebKit::NetscapePlugin::platformDestroy):
611         (WebKit::NetscapePlugin::platformGeometryDidChange):
612         (WebKit::NetscapePlugin::platformPaint):
613         (WebKit::toNP):
614         (WebKit::NetscapePlugin::platformHandleMouseEvent):
615         (WebKit::NetscapePlugin::platformHandleWheelEvent):
616         (WebKit::NetscapePlugin::platformSetFocus):
617         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
618         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
619         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
620         * WebProcess/WebCoreSupport/gtk: Added.
621         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
622         (WebFrameNetworkingContext::create):
623         (WebFrameNetworkingContext::WebFrameNetworkingContext):
624
625 2010-11-02  Jing Jin  <jjin@apple.com>
626
627         Reviewed by Alexey Proskuryakov.
628
629         Key down calls are not being sent to the application.
630         https://bugs.webkit.org/show_bug.cgi?id=48867
631
632         * UIProcess/API/mac/WKView.mm:
633         (-[WKView keyDown:]): Call super when ignoring a key down.
634
635 2010-11-02  Anders Carlsson  <andersca@apple.com>
636
637         Reviewed by John Sullivan.
638
639         Add Null and Int32 to NPVariantData
640         https://bugs.webkit.org/show_bug.cgi?id=48887
641
642         * Shared/Plugins/NPRemoteObjectMap.cpp:
643         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
644         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
645         * Shared/Plugins/NPVariantData.cpp:
646         (WebKit::NPVariantData::NPVariantData):
647         (WebKit::NPVariantData::makeNull):
648         (WebKit::NPVariantData::makeInt32):
649         (WebKit::NPVariantData::encode):
650         (WebKit::NPVariantData::decode):
651         * Shared/Plugins/NPVariantData.h:
652         (WebKit::NPVariantData::int32Value):
653
654 2010-11-02  Anders Carlsson  <andersca@apple.com>
655
656         Reviewed by Adam Roben.
657
658         Add support for NP_HasMethod and NP_Invoke
659         https://bugs.webkit.org/show_bug.cgi?id=48882
660
661         * Platform/CoreIPC/HandleMessage.h:
662         (CoreIPC::callMemberFunction):
663         Add new overload.
664
665         * Shared/Plugins/NPObjectMessageReceiver.cpp:
666         (WebKit::NPObjectMessageReceiver::hasMethod):
667         Call hasMethod and return the result.
668
669         (WebKit::NPObjectMessageReceiver::invoke):
670         Convert the arguments, call invoke and return the result.
671
672         (WebKit::NPObjectMessageReceiver::getProperty):
673         Release the converted variant.
674
675         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
676         Add HasMethod and Invoke messages.
677         
678         * Shared/Plugins/NPObjectProxy.cpp:
679         (WebKit::NPObjectProxy::hasMethod):
680         Send the HasMethod message.
681
682         (WebKit::NPObjectProxy::invoke):
683         Send the Invoke message.
684
685         (WebKit::NPObjectProxy::NP_HasMethod):
686         Call hasMethod.
687
688         (WebKit::NPObjectProxy::NP_Invoke):
689         Call invoke.
690
691 2010-11-02  Anders Carlsson  <andersca@apple.com>
692
693         Reviewed by Sam Weinig.
694
695         Implement NP_HasProperty for NPObjectProxy
696         https://bugs.webkit.org/show_bug.cgi?id=48876
697
698         * Shared/Plugins/NPObjectMessageReceiver.cpp:
699         (WebKit::NPObjectMessageReceiver::hasProperty):
700         Call The hasProperty callback function.
701
702         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
703         Add HasProperty message.
704
705         * Shared/Plugins/NPObjectProxy.cpp:
706         (WebKit::NPObjectProxy::hasProperty):
707         Send the HasProperty message.
708
709         (WebKit::NPObjectProxy::NP_HasProperty):
710         Call hasProperty.
711
712
713 2010-11-02  Sam Weinig  <sam@webkit.org>
714
715         Reviewed by Anders Carlsson.
716
717         Add a way to send startup messages on the context which can be posted when a process launches
718         <rdar://problem/8617928>
719         https://bugs.webkit.org/show_bug.cgi?id=48838
720
721         Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
722         APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
723         function each time a process starts up. This can help in cases where
724         the WebProcess dies, and will be helpful in the world where there are
725         multiple WebProcess's per context.
726
727         * Scripts/webkit2/messages.py:
728         * UIProcess/API/C/WKContext.cpp:
729         (WKContextSetInitializationUserDataForInjectedBundle):
730         * UIProcess/API/C/WKContext.h:
731         * UIProcess/WebContext.cpp:
732         (WebKit::WebContext::ensureWebProcess):
733         * UIProcess/WebContext.h:
734         (WebKit::WebContext::setInjectedBundleInitializationUserData):
735         (WebKit::WebContext::injectedBundleInitializationUserData):
736         * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
737         * WebProcess/InjectedBundle/InjectedBundle.h:
738         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
739         (WebKit::InjectedBundle::load):
740         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
741         (WebKit::InjectedBundle::load):
742         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
743         (WebKit::InjectedBundle::load):
744         * WebProcess/WebProcess.cpp:
745         (WebKit::WebProcess::initializeWebProcess):
746         * WebProcess/WebProcess.h:
747         * WebProcess/WebProcess.messages.in:
748
749 2010-11-02  Anders Carlsson  <andersca@apple.com>
750
751         Reviewed by Sam Weinig.
752
753         Implement PluginProxy::pluginScriptableNPObject
754         https://bugs.webkit.org/show_bug.cgi?id=48874
755
756         * PluginProcess/PluginControllerProxy.cpp:
757         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
758         Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
759
760         * PluginProcess/PluginControllerProxy.messages.in:
761         Add GetPluginScriptableNPObject message.
762
763         * WebProcess/Plugins/PluginProxy.cpp:
764         (WebKit::PluginProxy::pluginScriptableNPObject):
765         Send the GetPluginScriptableNPObject message.
766
767 2010-11-02  Anders Carlsson  <andersca@apple.com>
768
769         Reviewed by Dan Bernstein.
770
771         Add strings to NPVariantData
772         https://bugs.webkit.org/show_bug.cgi?id=48871
773
774         * Shared/Plugins/NPRemoteObjectMap.cpp:
775         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
776         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
777         * Shared/Plugins/NPVariantData.cpp:
778         (WebKit::NPVariantData::makeString):
779         (WebKit::NPVariantData::encode):
780         (WebKit::NPVariantData::decode):
781         * Shared/Plugins/NPVariantData.h:
782         (WebKit::NPVariantData::stringValue):
783
784 2010-11-02  Anders Carlsson  <andersca@apple.com>
785
786         Reviewed by Dan Bernstein.
787
788         Add convenience functions for allocating NPAPI memory
789         https://bugs.webkit.org/show_bug.cgi?id=48870
790
791         Add npnMemAlloc, npnMemFree and createNPString functions and 
792         npnMemNew, npnMemNewArray function templates.
793
794         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
795         (WebKit::JSNPObject::getOwnPropertyNames):
796         Use npnMemFree.
797
798         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
799         (WebKit::NPJSObject::enumerate):
800         Use npnMemNewArray.
801
802         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
803         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
804         Use createNPString.
805
806         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
807         (WebKit::npnMemAlloc):
808         Call malloc.
809
810         (WebKit::npnMemFree):
811         Call free.
812
813         (WebKit::createNPString):
814         Allocate the characters for a new NPString.
815
816         (WebKit::createNPObject):
817         Call npnMemNew.
818
819         (WebKit::deallocateNPObject):
820         Call npnMemFree.
821
822         (WebKit::releaseNPVariantValue):
823         Call npnMemFree.
824
825         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
826         (WebKit::npnMemNew):
827         (WebKit::npnMemNewArray):
828         Add new functions.
829
830         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
831         (WebKit::NPN_MemAlloc):
832         Call npnMemAlloc.
833
834         (WebKit::NPN_MemFree):
835         Call npnMemFree.
836
837         (WebKit::NPN_UTF8FromIdentifier):
838         Call npnMemNewArray.
839
840         (WebKit::copyCString):
841         Call npnMemNewArray. Correctly initialize the "len" out parameter.
842
843 2010-11-02  Jessie Berlin  <jberlin@apple.com>
844
845         Windows build fix. Unreviewed.
846
847         * win/WebKit2Generated.make:
848         Add WKInspector.h so that it is copied over to the WebKitBuild directory.
849
850 2010-11-02  Anders Carlsson  <andersca@apple.com>
851
852         Reviewed by Adam Roben.
853
854         Add some support for remote and local NPObjects to NPRemoteObjectMap
855         https://bugs.webkit.org/show_bug.cgi?id=48864
856
857         * Shared/Plugins/NPRemoteObjectMap.cpp:
858         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
859         If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
860         and return its ID.
861
862         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
863         If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
864
865         * Shared/Plugins/NPVariantData.cpp:
866         (WebKit::NPVariantData::NPVariantData):
867         Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
868
869         (WebKit::NPVariantData::makeLocalNPObjectID):
870         Create an NPVariantData that contains a local NPObject ID.
871
872         (WebKit::NPVariantData::encode):
873         Handle local and remote NPObject IDs.
874
875         (WebKit::NPVariantData::decode):
876         Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
877         decoded as a local NPObjectID (and vice versa).
878
879         * Shared/Plugins/NPVariantData.h:
880         (WebKit::NPVariantData::localNPObjectIDValue):
881         (WebKit::NPVariantData::remoteNPObjectIDValue):
882
883 2010-11-02  Anders Carlsson  <andersca@apple.com>
884
885         Attempt to fix a GCC release only warning.
886
887         * Shared/Plugins/NPVariantData.cpp:
888         (WebKit::NPVariantData::NPVariantData):
889
890 2010-11-02  Anders Carlsson  <andersca@apple.com>
891
892         Reviewed by John Sullivan.
893
894         Invalidate the NPRemoteObjectMap
895         https://bugs.webkit.org/show_bug.cgi?id=48856
896
897         * Shared/Plugins/NPObjectMessageReceiver.cpp:
898         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
899         Remove FIXME. The NPRemoteObjectMap always outlives the NPObjectMessageReceiver.
900
901         * Shared/Plugins/NPObjectProxy.cpp:
902         (WebKit::NPObjectProxy::~NPObjectProxy):
903         Call npObjectProxyDestroyed here.
904
905         (WebKit::NPObjectProxy::invalidate):
906         Null out m_npRemoteObjectMap.
907
908         * Shared/Plugins/NPRemoteObjectMap.cpp:
909         (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
910         Add assertions.
911
912         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
913         Keep track of the NPObjectProxy by adding it to the m_npObjectProxies set.
914
915         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
916         Remove the NPObjectProxy from the m_npObjectProxies set.
917
918         (WebKit::NPRemoteObjectMap::invalidate):
919         Delete all NPObjectMessageReceivers. Iterate over all NPObjectProxy objects and invalidate them.
920
921 2010-11-02  Mike Thole  <mthole@apple.com>
922
923         Reviewed by Anders Carlsson.
924
925         WebProcessManager informed about crashes too late (pages may have already tried to load a new URL)
926         https://bugs.webkit.org/show_bug.cgi?id=48853
927
928         This also fixes: <rdar://problem/8610451> Webkit2: Crash in WebKit!WebKit::WebProcessProxy::sendMessage opening google.com page
929
930         * UIProcess/WebProcessProxy.cpp:
931         (WebKit::WebProcessProxy::~WebProcessProxy):
932         Removed invalid assertion that is hit when the WebProcess dies unexpectedly.
933         (WebKit::WebProcessProxy::didClose):
934         Reordered so that the individual pages are informed that the processDidCrash() after the shared
935         WebProcessManager has been. This allows the pages to properly trigger a new process to be launched.
936
937 2010-11-02  Enrica Casucci  <enrica@apple.com>
938
939         Reviewed by Alexey Proskuryakov.
940
941         WebKit2: Repeated cmd-key presses lead to unusable UI state
942         https://bugs.webkit.org/show_bug.cgi?id=48811
943         <rdar://problem/8611924>
944
945         Given the asynchronous nature of every interaction with the WebProcess,
946         we could re-send a keyDown event to AppKit that maps to an
947         action that is currently disabled and therefore will not trigger an action
948         but a call to the keyDown method of the NSView. We need to detect this
949         situation to avoid an infinite loop.
950
951         * UIProcess/API/mac/WKView.mm:
952         (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
953         to the moment we receive another event.
954         (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
955
956 2010-11-02  Anders Carlsson  <andersca@apple.com>
957
958         Reviewed by John Sullivan.
959
960         Handle boolean values in NPVariant and NPVariantData
961         https://bugs.webkit.org/show_bug.cgi?id=48852
962
963         * Shared/Plugins/NPRemoteObjectMap.cpp:
964         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
965         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
966         * Shared/Plugins/NPVariantData.cpp:
967         (WebKit::NPVariantData::makeBool):
968         (WebKit::NPVariantData::encode):
969         (WebKit::NPVariantData::decode):
970         * Shared/Plugins/NPVariantData.h:
971         (WebKit::NPVariantData::boolValue):
972
973 2010-11-02  Anders Carlsson  <andersca@apple.com>
974
975         Reviewed by John Sullivan.
976
977         Assertion hit in WebProcessProxy::~WebProcessProxy()
978         https://bugs.webkit.org/show_bug.cgi?id=48849
979         <rdar://problem/8617676>
980
981         It is perfectly valid for the page map to contain pages if the web process proxy
982         goes away, this can happen if the process crashes for example.
983
984         * UIProcess/WebProcessProxy.cpp:
985         (WebKit::WebProcessProxy::~WebProcessProxy):
986         Remove the assertion.
987
988 2010-11-02  Christian Sejersen  <christian.webkit@gmail.com>
989
990         Reviewed by Andreas Kling.
991
992         The previous patch only took into account arm targets. This one
993         now checks whether the build is done inside Scratchbox.
994         https://bugs.webkit.org/show_bug.cgi?id=47895
995
996         * DerivedSources.pro:
997
998 2010-11-02  Anders Carlsson  <andersca@apple.com>
999
1000         Reviewed by Adam Roben.
1001
1002         More NPRuntime work
1003         https://bugs.webkit.org/show_bug.cgi?id=48847
1004
1005         * PluginProcess/WebProcessConnection.cpp:
1006         (WebKit::WebProcessConnection::~WebProcessConnection):
1007         Add assertions.
1008
1009         (WebKit::WebProcessConnection::removePluginControllerProxy):
1010         If we have no more plug-in controller proxies, invalidate the remote object map.
1011
1012         * Shared/Plugins/NPIdentifierData.cpp:
1013         (WebKit::NPIdentifierData::createNPIdentifier):
1014         Create an NPIdentifier from the given NPIdentifierData.
1015
1016         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1017         (WebKit::NPObjectMessageReceiver::create):
1018         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1019         This now takes the NPRemoteObjectMap as well as the npObjectID of the object.
1020
1021         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1022         Unregister the object.
1023
1024         (WebKit::NPObjectMessageReceiver::deallocate):
1025         Delete the object.
1026
1027         (WebKit::NPObjectMessageReceiver::getProperty):
1028         Ask the NPObject for the property and convert it back to an NPVariantData.
1029
1030         * Shared/Plugins/NPObjectProxy.cpp:
1031         (WebKit::NPObjectProxy::~NPObjectProxy):
1032         Send a Deallocate message to the corresponding message receiver on the other side.
1033
1034         (WebKit::NPObjectProxy::getProperty):
1035         Convert the NPVariantData back to an NPVariant and return it.
1036
1037         * Shared/Plugins/NPRemoteObjectMap.cpp:
1038         (WebKit::NPRemoteObjectMap::registerNPObject):
1039         Pass the NPRemoteObjectMap and the npObjectID to NPObjectMessageReceiver::create.
1040
1041         (WebKit::NPRemoteObjectMap::unregisterNPObject):
1042         Remove the given object from the map of registered objects.
1043
1044         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
1045         Given an NPVariant, create an NPVariantData. Only supports void and double types right now.
1046
1047         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
1048         Given an NPVariantData, create an NPVariant. Only supports void and double types right now.
1049
1050         (WebKit::NPRemoteObjectMap::invalidate):
1051         Add stub.
1052
1053         * Shared/Plugins/NPVariantData.cpp:
1054         (WebKit::NPVariantData::NPVariantData):
1055         Set the type to void by default.
1056
1057         (WebKit::NPVariantData::makeVoid):
1058         Return a void NPVariantData.
1059
1060         (WebKit::NPVariantData::makeDouble):
1061         Return an NPVariantData that contains a double value.
1062
1063         (WebKit::NPVariantData::encode):
1064         Encode the NPVariantData.
1065
1066         (WebKit::NPVariantData::decode):
1067         Decode the NPVariantData.
1068
1069         * Shared/Plugins/NPVariantData.h:
1070         (WebKit::NPVariantData::type):
1071         Return the type of the NPVariantData.
1072
1073         (WebKit::NPVariantData::doubleValue):
1074         Return the double value of the NPVariantData.
1075         
1076         * UIProcess/WebProcessProxy.cpp:
1077         (WebKit::WebProcessProxy::didClose):
1078         Use nullptr instead of 0.
1079
1080         * WebProcess/Plugins/PluginProcessConnection.cpp:
1081         (WebKit::PluginProcessConnection::~PluginProcessConnection):
1082         Assert that the connection and the remote object map are both null.
1083
1084         (WebKit::PluginProcessConnection::removePluginProxy):
1085         If this was the last plug-in proxy, invalidate the remote object map.
1086
1087         * WebProcess/WebProcess.cpp:
1088         (WebKit::WebProcess::shutdown):
1089         Use nullptr instead of 0.
1090
1091 2010-11-02  Balazs Kelemen  <kbalazs@webkit.org>
1092
1093         Unreviewed Qt buildfix.
1094
1095         * DerivedSources.pro: Add WebInspector to the list of
1096         message recievers.
1097
1098 2010-11-02  Balazs Kelemen  <kbalazs@webkit.org>
1099
1100         Reviewed by Andreas Kling.
1101
1102         [Qt][WK2] SharedMemory is broken
1103         https://bugs.webkit.org/show_bug.cgi?id=48520
1104
1105         Implement SharedMemory with QSharedMemory to correctly handle
1106         ownership and to avoid extra allocation for page size requests.
1107         * Platform/SharedMemory.h:
1108         * Platform/qt/SharedMemoryQt.cpp:
1109         (WebKit::SharedMemory::Handle::Handle):
1110         (WebKit::SharedMemory::Handle::isNull):
1111         (WebKit::SharedMemory::Handle::encode):
1112         (WebKit::SharedMemory::Handle::decode):
1113         (WebKit::createUniqueKey):
1114         (WebKit::SharedMemory::create):
1115         (WebKit::accessMode):
1116         (WebKit::SharedMemory::~SharedMemory):
1117         (WebKit::SharedMemory::createHandle):
1118
1119 2010-11-02  Timothy Hatcher  <timothy@apple.com>
1120
1121         Add WKInspector public APIs.
1122
1123         https://webkit.org/b/48718
1124
1125         Reviewed by Pavel Feldman.
1126
1127         * DerivedSources.make: Added WebInspector to MESSAGE_RECEIVERS section.
1128         * UIProcess/API/C/WKInspector.cpp:
1129         (WKInspectorIsVisible): Added.
1130         (WKInspectorShow): Added.
1131         (WKInspectorClose): Added.
1132         (WKInspectorShowConsole): Added.
1133         (WKInspectorIsAttached): Added.
1134         (WKInspectorAttach): Added.
1135         (WKInspectorDetach): Added.
1136         (WKInspectorIsDebuggingJavaScript): Added.
1137         (WKInspectorToggleJavaScriptDebugging): Added.
1138         (WKInspectorIsProfilingJavaScript): Added.
1139         (WKInspectorToggleJavaScriptProfiling): Added.
1140         (WKInspectorIsProfilingPage): Added.
1141         (WKInspectorTogglePageProfiling): Added.
1142         * UIProcess/API/C/WKInspector.h: Added new functions.
1143         * UIProcess/WebInspectorProxy.cpp:
1144         (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize new booleans.
1145         (WebKit::WebInspectorProxy::invalidate): Reset new booleans.
1146         (WebKit::WebInspectorProxy::show): Added.
1147         (WebKit::WebInspectorProxy::close): Added.
1148         (WebKit::WebInspectorProxy::showConsole): Added.
1149         (WebKit::WebInspectorProxy::attach): Added.
1150         (WebKit::WebInspectorProxy::detach): Added.
1151         (WebKit::WebInspectorProxy::toggleJavaScriptDebugging): Added.
1152         (WebKit::WebInspectorProxy::toggleJavaScriptProfiling): Added.
1153         (WebKit::WebInspectorProxy::togglePageProfiling): Added.
1154         * UIProcess/WebInspectorProxy.h:
1155         (WebKit::WebInspectorProxy::isVisible): Added.
1156         (WebKit::WebInspectorProxy::isAttached): Added.
1157         (WebKit::WebInspectorProxy::isDebuggingJavaScript): Added.
1158         (WebKit::WebInspectorProxy::isProfilingJavaScript): Added.
1159         (WebKit::WebInspectorProxy::isProfilingPage): Added.
1160         * UIProcess/WebPageProxy.cpp:
1161         (WebKit::WebPageProxy::close): Invalidate the WebInspectorProxy.
1162         (WebKit::WebPageProxy::inspector): Return 0 if closed or invalid.
1163         * WebKit2.pro: Added new files.
1164         * WebKit2.xcodeproj/project.pbxproj: Added new Files.
1165         * WebProcess/WebPage/WebInspector.cpp:
1166         (WebKit::WebInspector::show): Added.
1167         (WebKit::WebInspector::close): Added.
1168         (WebKit::WebInspector::showConsole): Added.
1169         (WebKit::WebInspector::startJavaScriptDebugging): Added.
1170         (WebKit::WebInspector::stopJavaScriptDebugging): Added.
1171         (WebKit::WebInspector::startJavaScriptProfiling): Added.
1172         (WebKit::WebInspector::stopJavaScriptProfiling): Added.
1173         (WebKit::WebInspector::startPageProfiling): Added.
1174         (WebKit::WebInspector::stopPageProfiling): Added.
1175         * WebProcess/WebPage/WebInspector.h:
1176         (WebKit::WebInspector::page): Added.
1177         * WebProcess/WebPage/WebInspector.messages.in: Added.
1178         * WebProcess/WebPage/WebPage.cpp:
1179         (WebKit::WebPage::close): Destroy the WebInspector.
1180         (WebKit::WebPage::inspector): Return 0 if closed.
1181         (WebKit::WebPage::didReceiveMessage): Send the message to the WebInspector
1182         if the message class is MessageClassWebInspector.
1183         * win/WebKit2.vcproj: Added new files.
1184
1185 2010-11-02  Timothy Hatcher  <timothy@apple.com>
1186
1187         Make WebInspectorFrontendClient inherit from InspectorFrontendClientLocal.
1188
1189         We can do this since the Web Inspector WebPage will share the same process
1190         with the inspected WebPage.
1191
1192         https://webkit.org/b/48652
1193
1194         Reviewed by Pavel Feldman.
1195
1196         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1197         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
1198         Call the InspectorFrontendClientLocal constructor.
1199         (WebKit::WebInspectorFrontendClient::attachWindow): Added.
1200         (WebKit::WebInspectorFrontendClient::detachWindow): Added.
1201         (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Added.
1202         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1203
1204 2010-11-01  Juha Savolainen  <juha.savolainen@weego.fi>
1205
1206         Reviewed by Kenneth Rohde Christiansen.
1207
1208         Initial implementation of QWKHistoryItem.
1209         https://bugs.webkit.org/show_bug.cgi?id=48620
1210
1211         The QWkHistoryItem represents one item in the history of QWKPage.
1212
1213         * UIProcess/API/qt/qwkhistory.cpp:
1214         (QWKHistoryItemPrivate::QWKHistoryItemPrivate):
1215         (QWKHistoryItem::QWKHistoryItem):
1216         (QWKHistoryItem::~QWKHistoryItem):
1217         (QWKHistoryItem::title): The page title
1218         (QWKHistoryItem::url): The URL of the page.
1219         (QWKHistoryItem::originalUrl): The URL used to access the page.
1220         * UIProcess/API/qt/qwkhistory.h:
1221         * UIProcess/API/qt/qwkhistory_p.h:
1222         * WebKit2.pro: Added WKBackForwardListItem.h and WKBackForwardListItem.cpp
1223
1224 2010-11-01  Anders Carlsson  <andersca@apple.com>
1225
1226         Reviewed by Oliver Hunt.
1227
1228         Make NPRemoteObjectMap a ref counted object
1229         https://bugs.webkit.org/show_bug.cgi?id=48808
1230
1231         * PluginProcess/PluginControllerProxy.cpp:
1232         (WebKit::PluginControllerProxy::windowScriptNPObject):
1233         * PluginProcess/WebProcessConnection.cpp:
1234         (WebKit::WebProcessConnection::WebProcessConnection):
1235         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1236         * PluginProcess/WebProcessConnection.h:
1237         (WebKit::WebProcessConnection::npRemoteObjectMap):
1238         * Shared/Plugins/NPRemoteObjectMap.cpp:
1239         (WebKit::NPRemoteObjectMap::create):
1240         (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
1241         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1242         * Shared/Plugins/NPRemoteObjectMap.h:
1243         * WebProcess/Plugins/PluginProcessConnection.cpp:
1244         (WebKit::PluginProcessConnection::PluginProcessConnection):
1245         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1246         * WebProcess/Plugins/PluginProcessConnection.h:
1247         (WebKit::PluginProcessConnection::npRemoteObjectMap):
1248         * WebProcess/Plugins/PluginProxy.cpp:
1249         (WebKit::PluginProxy::getWindowScriptNPObject):
1250
1251 2010-11-01  Anders Carlsson  <andersca@apple.com>
1252
1253         Reviewed by John Sullivan.
1254
1255         Respond to NP_GetProperty by sending a GetProperty message
1256         https://bugs.webkit.org/show_bug.cgi?id=48797
1257
1258         * Platform/CoreIPC/HandleMessage.h:
1259         (CoreIPC::callMemberFunction):
1260         Add new sync message overload.
1261
1262         * PluginProcess/WebProcessConnection.cpp:
1263         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1264         If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
1265
1266         * Shared/Plugins/NPIdentifierData.cpp:
1267         * Shared/Plugins/NPIdentifierData.h:
1268         Add NPIdentifierData, a CoreIPC representation of an NPIdentifier.
1269
1270         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1271         (WebKit::NPObjectMessageReceiver::getProperty):
1272         Add stub.
1273
1274         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
1275         Add GetProperty.
1276
1277         * Shared/Plugins/NPObjectProxy.cpp:
1278         (WebKit::NPObjectProxy::create):
1279         (WebKit::NPObjectProxy::NPObjectProxy):
1280         (WebKit::NPObjectProxy::initialize):
1281         NPObjectProxy now takes an NPRemoteObjectMap in its create function.
1282
1283         (WebKit::NPObjectProxy::getProperty):
1284         Send a GetProperty message.
1285
1286         (WebKit::NPObjectProxy::NP_GetProperty):
1287         Call getProperty.
1288
1289         * Shared/Plugins/NPRemoteObjectMap.cpp:
1290         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1291         Pass the NPRemoteObjectMap.
1292
1293         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage):
1294         Find the right message receiver and dispatch the message to it.
1295
1296         * Shared/Plugins/NPVariantData.cpp:
1297         * Shared/Plugins/NPVariantData.h:
1298         Add NPVariantData, which will be a CoreIPC representation of an NPVariant.
1299         
1300         * WebKit2.xcodeproj/project.pbxproj:
1301         Add new files.
1302
1303         * WebProcess/Plugins/PluginProcessConnection.cpp:
1304         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
1305         If the message class is MessageClassNPObjectMessageReceiver, pass it to the NPRemoteObjectMap.
1306
1307 2010-11-01  Anders Carlsson  <andersca@apple.com>
1308
1309         Reviewed by Sam Weinig.
1310
1311         Add ArgumentCoder specialization for WTF::CString
1312         https://bugs.webkit.org/show_bug.cgi?id=48796
1313
1314         * Platform/CoreIPC/ArgumentCoders.h:
1315
1316 2010-11-01  Anders Carlsson  <andersca@apple.com>
1317
1318         Fix build.
1319
1320         * WebKit2.xcodeproj/project.pbxproj:
1321
1322 2010-11-01  Anders Carlsson  <andersca@apple.com>
1323
1324         Reviewed by Adam Roben.
1325
1326         Add NPObjectMessageReceiver.messages.in
1327         https://bugs.webkit.org/show_bug.cgi?id=48782
1328
1329         * DerivedSources.make:
1330         Add NPObjectMessageReceiver.
1331
1332         * Platform/CoreIPC/MessageID.h:
1333         Add MessageClassNPObjectMessageReceiver message class.
1334
1335         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1336         (WebKit::NPObjectMessageReceiver::deallocate):
1337         Add stubbed out deallocate member function.
1338
1339         * Shared/Plugins/NPObjectMessageReceiver.messages.in: Added.
1340
1341         * WebKit2.xcodeproj/project.pbxproj:
1342         Add NPObjectMessageReceiver.messages.in.
1343
1344 2010-11-01  Anders Carlsson  <andersca@apple.com>
1345
1346         Reviewed by Adam Roben.
1347
1348         Start stubbing out NPClass functions in NPObjectProxy
1349         https://bugs.webkit.org/show_bug.cgi?id=48778
1350
1351         * PluginProcess/PluginControllerProxy.cpp:
1352         (WebKit::PluginControllerProxy::windowScriptNPObject):
1353         getOrCreateNPObjectProxy is now createNPObjectProxy.
1354
1355         * Shared/Plugins/NPObjectProxy.cpp:
1356         (WebKit::NPObjectProxy::create):
1357         Allocate and initialize an NPObjectProxy object.
1358
1359         (WebKit::NPObjectProxy::NPObjectProxy):
1360         Initialize m_npObjectID to 0.
1361
1362         (WebKit::NPObjectProxy::isNPObjectProxy):
1363         Check the class.
1364
1365         (WebKit::NPObjectProxy::initialize):
1366         Set m_npObjectID.
1367
1368         (WebKit::NPObjectProxy::npClass):
1369         Return the NPClass with all functions filled in.
1370
1371         (WebKit::NPObjectProxy::NP_Allocate):
1372         Create a new NPObjectProxy object.
1373
1374         (WebKit::NPObjectProxy::NP_Deallocate):
1375         Deallocate the NPObjectProxy object.
1376
1377         (WebKit::NPObjectProxy::NP_HasMethod):
1378         (WebKit::NPObjectProxy::NP_Invoke):
1379         (WebKit::NPObjectProxy::NP_InvokeDefault):
1380         (WebKit::NPObjectProxy::NP_HasProperty):
1381         (WebKit::NPObjectProxy::NP_GetProperty):
1382         (WebKit::NPObjectProxy::NP_SetProperty):
1383         (WebKit::NPObjectProxy::NP_RemoveProperty):
1384         (WebKit::NPObjectProxy::NP_Enumerate):
1385         (WebKit::NPObjectProxy::NP_Construct):
1386         Add stubs.
1387
1388         * Shared/Plugins/NPRemoteObjectMap.cpp:
1389         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1390         * Shared/Plugins/NPRemoteObjectMap.h:
1391         Rename getOrCreateNPObjectProxy to createNPObjectProxy.
1392
1393         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
1394         (WebKit::NPJSObject::NP_Allocate):
1395         Remove unused parameter.
1396
1397 2010-11-01  Anders Carlsson  <andersca@apple.com>
1398
1399         Reviewed by Adam Roben.
1400
1401         Both the WebProcessConnection and PluginProcessConnection should have NPRemoteObjectMaps
1402         https://bugs.webkit.org/show_bug.cgi?id=48775
1403
1404         * PluginProcess/PluginControllerProxy.cpp:
1405         (WebKit::PluginControllerProxy::windowScriptNPObject):
1406         Ask for an NPObjectProxy for the window script NPObject.
1407
1408         * PluginProcess/WebProcessConnection.cpp:
1409         (WebKit::WebProcessConnection::WebProcessConnection):
1410         Initialize m_npRemoteObjectMap.
1411
1412         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1413         (WebKit::NPObjectMessageReceiver::create):
1414         Add a create member function that takes an NPObject.
1415
1416         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1417         Retain the NPObject.
1418
1419         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
1420         Release the NPObject.
1421
1422         * Shared/Plugins/NPRemoteObjectMap.cpp:
1423         (WebKit::generateNPObjectID):
1424         Generate a unique 64-bit NPObject ID.
1425
1426         (WebKit::NPRemoteObjectMap::getOrCreateNPObjectProxy):
1427         Add stub.
1428
1429         (WebKit::NPRemoteObjectMap::registerNPObject):
1430         Create a NPObjectMessageReceiver and add it to the map.
1431
1432         * WebKit2.xcodeproj/project.pbxproj:
1433         Set the correct target for NPRuntime related files.
1434
1435         * WebProcess/Plugins/PluginProcessConnection.cpp:
1436         (WebKit::PluginProcessConnection::PluginProcessConnection):
1437         Initialize m_npRemoteObjectMap
1438
1439         * WebProcess/Plugins/PluginProxy.cpp:
1440         (WebKit::PluginProxy::getWindowScriptNPObject):
1441         Ask the real plug-in controller for the window script NPObject and register it.
1442
1443 2010-11-01  John Sullivan  <sullivan@apple.com>
1444
1445         Reviewed by Anders Carlsson.
1446
1447         https://bugs.webkit.org/show_bug.cgi?id=48774
1448         minimFontSize preference needs to be exposed in WebKit2
1449
1450         * UIProcess/WebPreferences.cpp:
1451         (WebKit::WebPreferences::setMinimumFontSize):
1452         New function, parallel to existing functions for other preferences.
1453         (WebKit::WebPreferences::minimumFontSize):
1454         Ditto.
1455
1456         * UIProcess/WebPreferences.h:
1457         Declared new function.
1458
1459         * UIProcess/API/C/WKPreferences.cpp:
1460         (WKPreferencesSetMinimumFontSize):
1461         New UI process wrapper for new function.
1462         (WKPreferencesGetMinimumFontSize):
1463         Ditto.
1464
1465         * UIProcess/API/C/WKPreferences.h:
1466         Declared new functions.
1467
1468 2010-11-01  Anders Carlsson  <andersca@apple.com>
1469
1470         Reviewed by John Sullivan.
1471
1472         Tear down the related WebProcessProxy when a WebContext is deallocated
1473         https://bugs.webkit.org/show_bug.cgi?id=48769
1474
1475         * UIProcess/WebContext.cpp:
1476         (WebKit::WebContext::~WebContext):
1477         Call WebProcessManager::contextWasDestroyed.
1478
1479         (WebKit::WebContext::didNavigateWithNavigationData):
1480         (WebKit::WebContext::didPerformClientRedirect):
1481         (WebKit::WebContext::didPerformServerRedirect):
1482         (WebKit::WebContext::didUpdateHistoryTitle):
1483         It is valid for a frame to have a null page here, if the frame has outlived
1484         its page.
1485
1486         * UIProcess/WebProcessManager.cpp:
1487         (WebKit::WebProcessManager::contextWasDestroyed):
1488         Remove the context from the map.
1489
1490         * UIProcess/WebProcessProxy.cpp:
1491         (WebKit::WebProcessProxy::~WebProcessProxy):
1492         It's OK for the connection to be non-null here if the process goes away because
1493         the context has been deallocated.
1494
1495 2010-11-01  Brady Eidson  <beidson@apple.com>
1496
1497         Windows build fix.
1498
1499         * UIProcess/win/WebView.cpp:
1500
1501 2010-11-01  Brady Eidson  <beidson@apple.com>
1502
1503         Reviewed by Anders Carlsson.
1504
1505         <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
1506         Context menu support for WebKit 2.
1507
1508         * WebKit2.pro:
1509         * WebKit2.xcodeproj/project.pbxproj:
1510         * win/WebKit2.vcproj:
1511
1512         * Shared/WebContextMenuItem.cpp: Added.
1513         (WebKit::WebContextMenuItem::WebContextMenuItem):
1514         (WebKit::WebContextMenuItem::encode):
1515         (WebKit::WebContextMenuItem::decode):
1516         (WebKit::kitItems):
1517         * Shared/WebContextMenuItem.h: Added.
1518
1519         * UIProcess/API/mac/PageClientImpl.h:
1520         * UIProcess/API/mac/PageClientImpl.mm:
1521         (WebKit::PageClientImpl::createContextMenuProxy):
1522         * UIProcess/API/qt/qwkpage.cpp:
1523         (QWKPagePrivate::createContextMenuProxy): Stub to keep the build working.
1524         * UIProcess/API/qt/qwkpage_p.h:
1525         * UIProcess/PageClient.h:
1526
1527         * UIProcess/WebContextMenuProxy.cpp: Added.
1528         (WebKit::WebContextMenuProxy::~WebContextMenuProxy):
1529         (WebKit::WebContextMenuProxy::WebContextMenuProxy):
1530         * UIProcess/WebContextMenuProxy.h: Added.
1531
1532         * UIProcess/WebPageProxy.cpp:
1533         (WebKit::WebPageProxy::showContextMenu): Shows the menu after receiving the message from the WebProcess.
1534         (WebKit::WebPageProxy::contextMenuItemSelected): Sends info about the selected menu item to the WebProcess
1535         * UIProcess/WebPageProxy.h:
1536         * UIProcess/WebPageProxy.messages.in:
1537
1538         * UIProcess/mac/WebContextMenuProxyMac.h: Added.
1539         (WebKit::WebContextMenuProxyMac::create):
1540         * UIProcess/mac/WebContextMenuProxyMac.mm: Added.
1541         (+[WebMenuTarget sharedMenuTarget]):
1542         (-[WebMenuTarget WebKit::]):
1543         (-[WebMenuTarget setMenuProxy:WebKit::]):
1544         (-[WebMenuTarget forwardContextMenuAction:]):
1545         (WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
1546         (WebKit::WebContextMenuProxyMac::~WebContextMenuProxyMac):
1547         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
1548         (WebKit::populateNSMenu):
1549         (WebKit::nsMenuItemVector):
1550         (WebKit::WebContextMenuProxyMac::populate):
1551         (WebKit::WebContextMenuProxyMac::showContextMenu):
1552         (WebKit::WebContextMenuProxyMac::hideContextMenu):
1553
1554         * UIProcess/win/WebView.cpp:
1555         (WebKit::WebView::createContextMenuProxy): Stub for now.
1556         * UIProcess/win/WebView.h:
1557
1558         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1559         (WebKit::WebChromeClient::showContextMenu):
1560         * WebProcess/WebCoreSupport/WebChromeClient.h:
1561
1562         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1563         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Return the WebCore-provided default
1564           menu for now. Embedding app customization will come later (see bug 48720)
1565
1566         * WebProcess/WebPage/WebContextMenu.cpp: Added.
1567         (WebKit::WebContextMenu::WebContextMenu):
1568         (WebKit::WebContextMenu::~WebContextMenu):
1569         (WebKit::WebContextMenu::show):
1570         (WebKit::WebContextMenu::itemSelected):
1571         * WebProcess/WebPage/WebContextMenu.h: Added.
1572         (WebKit::WebContextMenu::create):
1573
1574         * WebProcess/WebPage/WebPage.cpp:
1575         (WebKit::WebPage::contextMenu):
1576         (WebKit::handleMouseEvent): Pass right mouse presses along to WebCore as both a mouse event and context menu event, 
1577           the same way WebKit1 does.
1578         (WebKit::WebPage::didSelectItemFromActiveContextMenu):
1579         * WebProcess/WebPage/WebPage.h:
1580         * WebProcess/WebPage/WebPage.messages.in:
1581
1582 2010-11-01  Adam Roben  <aroben@apple.com>
1583
1584         Cancel main resource loads after we hand them off to the media engine
1585
1586         This is the WebKit2 equivalent of r51104. Clearly this code should be
1587         moved to a cross-platform location someday.
1588
1589         Fixes <http://webkit.org/b/48561> <rdar://problem/8606679> Assertion
1590         failure in DocumentLoader::commitData when loading a media document in
1591         WebKit2
1592
1593         Reviewed by Eric Carlson.
1594
1595         * WebProcess/WebCoreSupport/WebErrors.h: Added pluginWillHandleLoadError.
1596
1597         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1598         (WebFrameLoaderClient::committedLoad): Cancel the main resource load
1599         after handing off the load to the media engine. This code originally
1600         came from -[WebHTMLRepresentation receivedData:withDataSource:].
1601         (WebKit::WebFrameLoaderClient::pluginWillHandleLoadError): Call through to WebErrors.
1602         (WebKit::WebFrameLoaderClient::shouldFallBack): Implemented. We fall
1603         back for all errors except when the load was cancelled or we handed it
1604         off to the media engine or a plugin.
1605
1606         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1607         (WebKit::pluginWillHandleLoadError): Implemented.
1608
1609         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1610         (WebKit::pluginWillHandleLoadError): Stubbed out.
1611
1612         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
1613         (WebKit::pluginWillHandleLoadError): Implemented.
1614
1615 2010-11-01  Andreas Kling  <kling@webkit.org>
1616
1617         Reviewed by Kenneth Rohde Christiansen.
1618
1619         [Qt][WK2] Cleanup viewportAttributesForSize API
1620
1621         Change QSize argument to a const QSize&.
1622
1623         * UIProcess/API/qt/qwkpage.cpp:
1624         (QWKPage::viewportAttributesForSize):
1625         * UIProcess/API/qt/qwkpage.h:
1626
1627 2010-10-31  Darin Adler  <darin@apple.com>
1628
1629         Reviewed by Dan Bernstein.
1630
1631         Visited links not populated correctly in new web processes after the first
1632         https://bugs.webkit.org/show_bug.cgi?id=48735
1633         rdar://problem/8442177
1634
1635         * UIProcess/VisitedLinkProvider.cpp:
1636         (WebKit::VisitedLinkProvider::VisitedLinkProvider): Initialize
1637         m_webProcessHasVisitedLinkState.
1638         (WebKit::VisitedLinkProvider::processDidFinishLaunching): Renamed
1639         from populateVisitedLinksIfNeeded. Set m_webProcessHasVisitedLinkState
1640         to false, since this is a new process, and also start the timer
1641         so the visited links messages will be sent.
1642         (WebKit::VisitedLinkProvider::processDidClose): Renamed from
1643         stopVisitedLinksTimer.
1644         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
1645         Added logic so we send SetVisitedLinkTable and
1646         AllVisitedLinkStateChanged once to each new process and to set
1647         m_webProcessHasVisitedLinkState to true once that is done.
1648
1649         * UIProcess/VisitedLinkProvider.h: Updated for above changes.
1650
1651         * UIProcess/WebContext.cpp:
1652         (WebKit::WebContext::processDidFinishLaunching): Called
1653         VisitedLinkProvider function under its new name. Also used
1654         ASSERT_UNUSED rather than ASSERT since the argument is used
1655         only for the assertion.
1656         (WebKit::WebContext::processDidClose): Ditto.
1657
1658 2010-10-30  Andreas Kling  <kling@webkit.org>
1659
1660         Reviewed by Kenneth Rohde Christiansen.
1661
1662         [Qt][WK2] Crash in drawUpdateChunkIntoBackingStore
1663         https://bugs.webkit.org/show_bug.cgi?id=48707
1664
1665         UpdateChunk images have to be created using the QImage constructor
1666         that takes a bytesPerLine (stride) value, or the data length won't
1667         match UpdateChunk::size().
1668
1669         * Shared/qt/UpdateChunk.cpp:
1670         (WebKit::UpdateChunk::createImage):
1671
1672 2010-10-29  Daniel Bates  <dbates@rim.com>
1673
1674         No review, rolling out 70971.
1675         http://trac.webkit.org/changeset/70971
1676         https://bugs.webkit.org/show_bug.cgi?id=6751
1677
1678         Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
1679         it caused layout test failures on all bots. In particular, the
1680         child count in a generated frame name differs after this patch. We need
1681         to look into this further.
1682
1683         * WebProcess/WebPage/WebFrame.cpp:
1684         (WebKit::WebFrame::name):
1685
1686 2010-10-29  Daniel Bates  <dbates@rim.com>
1687
1688         Reviewed by Adam Barth.
1689
1690         For unnamed frames, window.name returns a generated name
1691         https://bugs.webkit.org/show_bug.cgi?id=6751
1692
1693         Modified WebKit2 to use FrameTree::uniqueName().
1694
1695         * WebProcess/WebPage/WebFrame.cpp:
1696         (WebKit::WebFrame::name):
1697
1698 2010-10-29  Sam Weinig  <weinig@apple.com>
1699
1700         Reviewed by Simon Fraser.
1701
1702         Implement WebProcess::platformSetCacheModel for windows
1703         <rdar://problem/8605796>
1704         https://bugs.webkit.org/show_bug.cgi?id=48703
1705
1706         * WebProcess/win/WebProcessWin.cpp:
1707         (WebKit::memorySize):
1708         (WebKit::volumeFreeSize):
1709         (WebKit::WebProcess::platformSetCacheModel):
1710         Add implemenation based on the version in WebKit/win/WebView.cpp.
1711
1712 2010-10-29  Andreas Kling  <kling@webkit.org>
1713
1714         Reviewed by Anders Carlsson.
1715
1716         WK2: Unbreak compilation of WebPlatformTouchPoint::decode()
1717
1718         * Shared/WebPlatformTouchPoint.cpp:
1719         (WebKit::WebPlatformTouchPoint::decode):
1720
1721 2010-10-29  Darin Adler  <darin@apple.com>
1722
1723         Reviewed by Sam Weinig.
1724
1725         More back/forward refactoring
1726
1727         * WebKit2.pro: Removed WebBackForwardControllerClient.cpp and .h.
1728         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1729
1730         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.cpp: Removed.
1731         * WebProcess/WebCoreSupport/WebBackForwardControllerClient.h: Removed.
1732
1733         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
1734         (WebKit::InjectedBundleBackForwardList::itemAtIndex): Use backForward.
1735         (WebKit::InjectedBundleBackForwardList::backListCount): Ditto.
1736         (WebKit::InjectedBundleBackForwardList::forwardListCount): Ditto.
1737         (WebKit::InjectedBundleBackForwardList::clear): Ditto.
1738
1739         * WebProcess/WebPage/WebBackForwardListProxy.h: Added newly-needed include.
1740
1741         * WebProcess/WebPage/WebPage.cpp:
1742         (WebKit::WebPage::WebPage): Set up backForwardClient.
1743
1744 2010-10-29  Adam Roben  <aroben@apple.com>
1745
1746         Stop using encode/decodeBytes for WebEvent subclasses
1747
1748         The use of encode/decodeBytes was making these classes sensitive to
1749         differences in padding on different architectures (e.g., 32-bit vs.
1750         64-bit). By encoding each data member explicitly we remove this
1751         sensitivity, allowing these classes to be passed between processes
1752         with different padding.
1753
1754         Fixes <http://webkit.org/b/48552> <rdar://problem/8606571> Mouse
1755         events never reach Flash in WebKit2 on Mac (asserts in Debug builds)
1756
1757         Reviewed by Anders Carlsson.
1758
1759         * Platform/CoreIPC/Arguments.h:
1760         (CoreIPC::Arguments8::Arguments8):
1761         (CoreIPC::Arguments8::encode):
1762         (CoreIPC::Arguments8::decode):
1763         (CoreIPC::In):
1764         (CoreIPC::Out):
1765         Added Arguments8, the biggest Arguments yet.
1766
1767         * Shared/WebEvent.cpp:
1768         (WebKit::WebEvent::encode):
1769         (WebKit::WebEvent::decode):
1770         * Shared/WebKeyboardEvent.cpp:
1771         (WebKit::WebKeyboardEvent::encode):
1772         (WebKit::WebKeyboardEvent::decode):
1773         * Shared/WebMouseEvent.cpp:
1774         (WebKit::WebMouseEvent::encode):
1775         (WebKit::WebMouseEvent::decode):
1776         * Shared/WebPlatformTouchPoint.cpp:
1777         (WebKit::WebPlatformTouchPoint::encode):
1778         (WebKit::WebPlatformTouchPoint::decode):
1779         * Shared/WebTouchEvent.cpp:
1780         (WebKit::WebTouchEvent::encode):
1781         (WebKit::WebTouchEvent::decode):
1782         * Shared/WebWheelEvent.cpp:
1783         (WebKit::WebWheelEvent::encode):
1784         (WebKit::WebWheelEvent::decode):
1785         Changed all encode/decode function to use CoreIPC::In/Out to
1786         encode/decode data members individually.
1787
1788 2010-10-29  Adam Roben  <aroben@apple.com>
1789
1790         Use only CoreIPC-sanctioned types in WebEvent subclasses
1791
1792         Fixes <http://webkit.org//48694> WebEvent subclasses should not use
1793         architecture-dependent types
1794
1795         Reviewed by Anders Carlsson.
1796
1797         * Shared/WebEvent.h:
1798         (WebKit::WebEvent::type):
1799         (WebKit::WebMouseEvent::button):
1800         (WebKit::WebMouseEvent::clickCount):
1801         (WebKit::WebWheelEvent::granularity):
1802         (WebKit::WebPlatformTouchPoint::id):
1803         (WebKit::WebPlatformTouchPoint::state):
1804         Replaced enums, ints, and unsigneds with uint32_ts, int32_ts, and
1805         uint32_ts, respectively.
1806
1807 2010-10-29  Anders Carlsson  <andersca@apple.com>
1808
1809         Reviewed by Adam Roben.
1810
1811         Generate a DelayedReply struct for sync messages marked delayed
1812         https://bugs.webkit.org/show_bug.cgi?id=48696
1813
1814         * Scripts/webkit2/messages.py:
1815         If we encounter a sync message marked delayed, generate a DelayedReply struct with a send member funciton
1816         that can be used for sending the reply.
1817
1818         * Scripts/webkit2/messages_unittest.py:
1819         Update expected results.
1820
1821 2010-10-29  Anders Carlsson  <andersca@apple.com>
1822
1823         Reviewed by Adam Roben.
1824
1825         Use WebPage::send in a couple of more places.
1826
1827         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1828         (WebKit::WebChromeClient::setWindowRect):
1829         (WebKit::WebChromeClient::takeFocus):
1830         (WebKit::WebChromeClient::setToolbarsVisible):
1831         (WebKit::WebChromeClient::setStatusbarVisible):
1832         (WebKit::WebChromeClient::setMenubarVisible):
1833         (WebKit::WebChromeClient::setResizable):
1834         (WebKit::WebChromeClient::setStatusbarText):
1835         (WebKit::WebChromeClient::contentsSizeChanged):
1836         (WebKit::WebChromeClient::mouseDidMoveOverElement):
1837         (WebKit::WebChromeClient::setToolTip):
1838         (WebKit::WebChromeClient::setCursor):
1839         (WebKit::WebChromeClient::dispatchViewportDataDidChange):
1840         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1841         (WebKit::WebEditorClient::registerCommandForUndo):
1842         (WebKit::WebEditorClient::clearUndoRedoOperations):
1843         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1844         (WebKit::WebFrameLoaderClient::detachedFromParent2):
1845         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1846         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1847         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
1848         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1849         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
1850         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
1851         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
1852         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
1853         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
1854         (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
1855         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1856         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1857         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1858         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
1859         (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
1860         (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
1861         (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
1862         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
1863         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
1864         (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
1865         * WebProcess/WebPage/FindController.cpp:
1866         (WebKit::FindController::findString):
1867         (WebKit::FindController::hideFindIndicator):
1868         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1869         (WebKit::WebBackForwardListProxy::addItem):
1870         (WebKit::WebBackForwardListProxy::goToItem):
1871         (WebKit::WebBackForwardListProxy::clear):
1872         * WebProcess/WebPage/WebFrame.cpp:
1873         (WebKit::WebFrame::createMainFrame):
1874         (WebKit::WebFrame::createSubframe):
1875         * WebProcess/WebPage/WebPage.cpp:
1876         (WebKit::WebPage::sendClose):
1877         (WebKit::WebPage::pageDidScroll):
1878         (WebKit::WebPage::mouseEvent):
1879         (WebKit::WebPage::wheelEvent):
1880         (WebKit::WebPage::keyEvent):
1881         (WebKit::WebPage::validateMenuItem):
1882         (WebKit::WebPage::touchEvent):
1883         (WebKit::WebPage::show):
1884         (WebKit::WebPage::runJavaScriptInMainFrame):
1885         (WebKit::WebPage::getRenderTreeExternalRepresentation):
1886         (WebKit::WebPage::getSourceForFrame):
1887
1888 2010-10-29  Anders Carlsson  <andersca@apple.com>
1889
1890         Reviewed by Adam Roben.
1891
1892         Add a MessageSender class template
1893         https://bugs.webkit.org/show_bug.cgi?id=48683
1894
1895         * Platform/CoreIPC/MessageSender.h: Added.
1896         (CoreIPC::MessageSender::send):
1897         Add send overloads for simple message sending.
1898
1899         * WebKit2.pro:
1900         * WebKit2.xcodeproj/project.pbxproj:
1901         Add MessageSender.h
1902
1903         * WebProcess/WebPage/FindController.cpp:
1904         (WebKit::FindController::countStringMatches):
1905         (WebKit::FindController::findString):
1906         (WebKit::FindController::updateFindIndicator):
1907         Call send on the web page.
1908
1909         * WebProcess/WebPage/WebPage.cpp:
1910         (WebKit::WebPage::connection):
1911         Add connection(), used by the MessageSender.
1912         
1913         * WebProcess/WebPage/WebPage.h:
1914         (WebKit::WebPage::destinationID):
1915         Add destinationID(), used by the MessageSender.
1916
1917         * win/WebKit2.vcproj:
1918         Add MessageSender.h
1919
1920 2010-10-29  Adam Roben  <aroben@apple.com>
1921
1922         Remove redundant data members from WebTouchEvent
1923
1924         WebEvent already stores the Type and timestamp.
1925
1926         Fixes <http://webkit.org/b/48671> WebTouchEvent duplicates data from
1927         WebEvent
1928
1929         Reviewed by Anders Carlsson.
1930
1931         * Shared/WebEvent.h:
1932         * Shared/WebTouchEvent.cpp:
1933         (WebKit::WebTouchEvent::WebTouchEvent):
1934         Removed m_type and m_timestamp (which was never even getting
1935         initialized!).
1936
1937 2010-10-29  Anders Carlsson  <andersca@apple.com>
1938
1939         Reviewed by Adam Roben.
1940
1941         Add the plug-in proxy to the map before sending the CreatePlugin message
1942         https://bugs.webkit.org/show_bug.cgi?id=48678
1943
1944         * WebProcess/Plugins/PluginProxy.cpp:
1945         (WebKit::PluginProxy::initialize):
1946
1947 2010-10-29  Anders Carlsson  <andersca@apple.com>
1948
1949         Reviewed by Adam Roben.
1950
1951         Add GetWindowScriptNPObject message
1952         https://bugs.webkit.org/show_bug.cgi?id=48670
1953
1954         * PluginProcess/PluginControllerProxy.cpp:
1955         (WebKit::PluginControllerProxy::windowScriptNPObject):
1956         Send the GetWindowScriptNPObject message.
1957
1958         * WebProcess/Plugins/PluginProxy.cpp:
1959         (WebKit::PluginProxy::getWindowScriptNPObject):
1960         Add stub.
1961
1962         * WebProcess/Plugins/PluginProxy.messages.in:
1963         Add GetWindowScriptNPObject message.
1964
1965 2010-10-29  Anders Carlsson  <andersca@apple.com>
1966
1967         Reviewed by Dan Bernstein.
1968
1969         Change the Connection::sendSync timeout parameter to have the NoTimeout argument as a default
1970         argument and update all the call sites.
1971
1972         * Platform/CoreIPC/Connection.h:
1973         * PluginProcess/PluginControllerProxy.cpp:
1974         (WebKit::PluginControllerProxy::proxiesForURL):
1975         (WebKit::PluginControllerProxy::cookiesForURL):
1976         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1977         (WebKit::InjectedBundle::postSynchronousMessage):
1978         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1979         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1980         * WebProcess/Plugins/PluginProxy.cpp:
1981         (WebKit::PluginProxy::initialize):
1982         (WebKit::PluginProxy::destroy):
1983         (WebKit::PluginProxy::paint):
1984         (WebKit::PluginProxy::handleMouseEvent):
1985         (WebKit::PluginProxy::handleWheelEvent):
1986         (WebKit::PluginProxy::handleMouseEnterEvent):
1987         (WebKit::PluginProxy::handleMouseLeaveEvent):
1988         (WebKit::PluginProxy::handleKeyboardEvent):
1989         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1990         (WebKit::WebChromeClient::windowRect):
1991         (WebKit::WebChromeClient::createWindow):
1992         (WebKit::WebChromeClient::toolbarsVisible):
1993         (WebKit::WebChromeClient::statusbarVisible):
1994         (WebKit::WebChromeClient::menubarVisible):
1995         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
1996         (WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
1997         (WebKit::WebChromeClient::runJavaScriptAlert):
1998         (WebKit::WebChromeClient::runJavaScriptConfirm):
1999         (WebKit::WebChromeClient::runJavaScriptPrompt):
2000         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2001         (WebKit::WebPlatformStrategies::populatePluginCache):
2002         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2003         (WebKit::WebBackForwardListProxy::itemAtIndex):
2004         (WebKit::WebBackForwardListProxy::backListCount):
2005         (WebKit::WebBackForwardListProxy::forwardListCount):
2006         * WebProcess/WebPage/WebPage.cpp:
2007         (WebKit::WebPage::createPlugin):
2008         (WebKit::WebPage::changeAcceleratedCompositingMode):
2009         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2010         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
2011         * WebProcess/WebPage/mac/WebPageMac.mm:
2012         (WebKit::WebPage::interceptEditingKeyboardEvent):
2013
2014 2010-10-29  John Sullivan  <sullivan@apple.com>
2015
2016         Reviewed by Anders Carlsson.
2017
2018         https://bugs.webkit.org/show_bug.cgi?id=48666
2019         WebKit2 should provide counterpart getter to WKBundleNodeHandleSetHTMLInputElementAutofilled
2020
2021         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2022         (WKBundleNodeHandleGetHTMLInputElementAutofilled):
2023         New function, calls through to InjectedBundleNodeHandle.
2024
2025         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2026         Declared new function.
2027
2028         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2029         (WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
2030         New function, calls through to HTMLInputElement.
2031
2032         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2033         Declared new function.
2034
2035 2010-10-29  Jessie Berlin  <jberlin@apple.com>
2036
2037         Reviewed by Anders Carlsson.
2038
2039         ASSERTION FAILURE in WebProcessProxy::frameDestroyed when a Page is closed before it can send
2040         the DidCreateMainFrame messsage to the UIProcess.
2041         https://bugs.webkit.org/show_bug.cgi?id=48654
2042
2043         WebProcessProxy::frameDestroyed was asserting that the frameID it was called with was
2044         registered in WebProcessProxy::frameCreated (which is called when the WebPageProxy is
2045         created). However, in the case where we close the page before it's had the chance to send
2046         the DidCreateMainFrame message back to the UI process, the UI Process will get the
2047         DidDestroyFrame message because it's sent directly to the WebProcessProxy and doesn't go
2048         through WebPageProxy.
2049
2050         Remove the assert because it is invalid in this case.
2051
2052         * UIProcess/WebProcessProxy.cpp:
2053         (WebKit::WebProcessProxy::frameDestroyed):
2054
2055 2010-10-29  Adam Roben  <aroben@apple.com>
2056
2057         Build fix when Carbon plugins are disabled
2058
2059         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2060         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2061
2062 2010-10-29  Adam Roben  <aroben@apple.com>
2063
2064         Move NPRuntime-related files into WebProcess/Plugins/Netscape
2065
2066         Fixes <http://webkit.org/b/48645>.
2067
2068         Reviewed by Anders Carlsson.
2069
2070         * WebKit2.pro:
2071         * WebKit2.xcodeproj/project.pbxproj:
2072         * win/WebKit2.vcproj:
2073         Updated the files' paths.
2074
2075         * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.cpp.
2076         * WebProcess/Plugins/Netscape/JSNPMethod.h: Renamed from WebKit2/WebProcess/Plugins/JSNPMethod.h.
2077         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.cpp.
2078         * WebProcess/Plugins/Netscape/JSNPObject.h: Renamed from WebKit2/WebProcess/Plugins/JSNPObject.h.
2079         * WebProcess/Plugins/Netscape/NPJSObject.cpp: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.cpp.
2080         * WebProcess/Plugins/Netscape/NPJSObject.h: Renamed from WebKit2/WebProcess/Plugins/NPJSObject.h.
2081         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.cpp.
2082         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeObjectMap.h.
2083         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.cpp.
2084         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: Renamed from WebKit2/WebProcess/Plugins/NPRuntimeUtilities.h.
2085
2086 2010-10-29  Alexey Proskuryakov  <ap@apple.com>
2087
2088         Reviewed by Darin Adler.
2089
2090         https://bugs.webkit.org/show_bug.cgi?id=48576
2091         Let WebKit2 client know when a frame is a frameset
2092
2093         * UIProcess/WebFrameProxy.cpp:
2094         (WebKit::WebFrameProxy::WebFrameProxy):
2095         * UIProcess/WebFrameProxy.h:
2096         (WebKit::WebFrameProxy::setIsFrameSet):
2097         (WebKit::WebFrameProxy::isFrameSet):
2098         Remember whether the frame is currently a frameset.
2099
2100         * UIProcess/API/C/WKFrame.cpp: (WKFrameIsFrameSet):
2101         * UIProcess/API/C/WKFrame.h:
2102         Added client API.
2103
2104         * UIProcess/WebPageProxy.cpp:
2105         (WebKit::WebPageProxy::didCommitLoadForFrame):
2106         (WebKit::WebPageProxy::frameDidBecomeFrameSet):
2107         * UIProcess/WebPageProxy.h:
2108         * UIProcess/WebPageProxy.messages.in:
2109         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2110         (WebKit::WebFrameLoaderClient::dispatchDidBecomeFrameset):
2111         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2112         Pass notification from web process to UI process.
2113
2114 2010-10-28  Adam Roben  <aroben@apple.com>
2115
2116         Use IntPoint/FloatSize in WebEvent subclasses
2117
2118         This is nicer than passing around pairs of ints/floats.
2119
2120         Fixes <http://webkit.org/b/48611>.
2121
2122         Reviewed by Anders Carlsson.
2123
2124         * Shared/WebEvent.h:
2125         * Shared/WebMouseEvent.cpp:
2126         * Shared/WebPlatformTouchPoint.cpp:
2127         * Shared/WebWheelEvent.cpp:
2128         Changed all x/y pairs to either use IntPoint or FloatSize, as
2129         appropriate.
2130
2131         * Shared/WebEventConversion.cpp:
2132         * Shared/mac/WebEventFactory.mm:
2133         * Shared/qt/WebEventFactoryQt.cpp:
2134         * Shared/win/WebEventFactory.cpp:
2135         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2136         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2137         Updated for WebEvent changes.
2138
2139 2010-10-29  Adam Roben  <aroben@apple.com>
2140
2141         Touch WebKit2Prefix.h to fix incremental builds on Windows
2142
2143         * WebKit2Prefix.h:
2144
2145 2010-10-28  Adam Roben  <aroben@apple.com>
2146
2147         Remove unnecessary #includes from WebEvent.h
2148
2149         Fixes <http://webkit.org/b/48609> WebEvent.h #includes things it
2150         doesn't need
2151
2152         Reviewed by Sam Weinig.
2153
2154         * Scripts/webkit2/messages.py:
2155         (MessageReceiver.iterparameters): Merged iterreplyparameters into this
2156         function. All callers to iterparameters are really interested in the
2157         reply parameters, too. This will cause us to, e.g., add
2158         forward-declarations for types used in sync replies.
2159         (headers_for_type): Added a special case for WebCore::KeypressCommand.
2160
2161         * Scripts/webkit2/messages_unittest.py: Added a test to cover the
2162         failing case that inspired the above changes.
2163
2164         * Shared/WebEvent.h: Replaced #includes with forward-declarations.
2165
2166         * Shared/API/c/WKSharedAPICast.h:
2167         * Shared/NativeWebKeyboardEvent.h:
2168         * Shared/WebEvent.cpp:
2169         * Shared/WebKeyboardEvent.cpp:
2170         * Shared/WebMouseEvent.cpp:
2171         * Shared/WebPlatformTouchPoint.cpp:
2172         * Shared/WebTouchEvent.cpp:
2173         * Shared/WebWheelEvent.cpp:
2174         * Shared/qt/WebEventFactoryQt.cpp:
2175         * Shared/win/WebEventFactory.cpp:
2176         * UIProcess/API/qt/qwkpage.cpp:
2177         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2178         * UIProcess/WebUIClient.cpp:
2179         * UIProcess/WebUIClient.h:
2180         * UIProcess/win/WebView.cpp:
2181         * WebProcess/WebPage/FindController.cpp:
2182         * WebProcess/WebPage/mac/WebPageMac.mm:
2183         Added now-needed #includes and declarations.
2184
2185 2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
2186
2187         Reviewed by Adam Roben and David Kilzer.
2188
2189         Fix and cleanup of build systems
2190         https://bugs.webkit.org/show_bug.cgi?id=48342
2191
2192         * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX and add missing features.
2193
2194 2010-10-28  Dan Bernstein  <mitz@apple.com>
2195
2196         LLVM compiler build fix
2197
2198         * WebProcess/Downloads/mac/DownloadMac.mm:
2199         (-[WKDownloadAsDelegate download:didReceiveResponse:]): Removed a stray semicolon.
2200
2201 2010-10-28  Adam Roben  <aroben@apple.com>
2202
2203         Move some function definitions from WebEvent.h into new .cpp files
2204
2205         Someday maybe we'll split the classes into their own header files,
2206         too.
2207
2208         Fixes <http://webkit.org/b/48604>.
2209
2210         Reviewed by Anders Carlsson.
2211
2212         * Shared/WebEvent.h: Moved code from here...
2213
2214         * Shared/WebEvent.cpp: Added.
2215         * Shared/WebKeyboardEvent.cpp: Added.
2216         * Shared/WebMouseEvent.cpp: Added.
2217         * Shared/WebPlatformTouchPoint.cpp: Added.
2218         * Shared/WebTouchEvent.cpp: Added.
2219         * Shared/WebWheelEvent.cpp: Added.
2220         ...to here. Also changed WebTouchEvent::touchPoints not to copy the
2221         Vector.
2222
2223         * WebKit2.pro:
2224         * WebKit2.xcodeproj/project.pbxproj:
2225         * win/WebKit2.vcproj:
2226         Added the new files.
2227
2228 2010-10-28  Anders Carlsson  <andersca@apple.com>
2229
2230         Reviewed by Adam Roben.
2231
2232         Connection::sendSyncMessage needs to dispatch incoming sync messages
2233         https://bugs.webkit.org/show_bug.cgi?id=48606
2234
2235         * Platform/CoreIPC/Connection.cpp:
2236         (CoreIPC::Connection::sendSyncMessage):
2237         Protect the connection when waiting for a reply. Schedule for any remaining incoming sync messages
2238         to be sent once the bottom-most waitForSyncReply calls returns.
2239
2240         (CoreIPC::Connection::waitForSyncReply):
2241         Make sure to dispatch any incoming sync messages.
2242
2243         (CoreIPC::Connection::processIncomingMessage):
2244         If the incoming message is a sync message and we're waiting for a sync reply, add the message to the
2245         queue of "sync messages received while waiting for sync reply" and wake up the client thread.
2246
2247         * Platform/CoreIPC/Connection.h:
2248
2249 2010-10-28  Anders Carlsson  <andersca@apple.com>
2250
2251         Reviewed by Adam Roben.
2252
2253         Move code to dispatch a sync message out into a separate function
2254         https://bugs.webkit.org/show_bug.cgi?id=48605
2255
2256         * Platform/CoreIPC/Connection.cpp:
2257         (CoreIPC::Connection::dispatchSyncMessage):
2258         Factor code out from dispatchMessage. Handle receiving a message with an invalid reply ID.
2259
2260         (CoreIPC::Connection::dispatchMessages):
2261         Call dispatchSyncMessage.
2262
2263         * Platform/CoreIPC/Connection.h:
2264
2265 2010-10-28  Anders Carlsson  <andersca@apple.com>
2266
2267         Reviewed by Darin Adler.
2268
2269         Add NPObjectMessageReceiver class.
2270         https://bugs.webkit.org/show_bug.cgi?id=48599
2271
2272         * Shared/Plugins/NPObjectMessageReceiver.cpp: Added.
2273         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
2274         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
2275         * Shared/Plugins/NPObjectMessageReceiver.h: Added.
2276         * WebKit2.xcodeproj/project.pbxproj:
2277
2278 2010-10-28  Anders Carlsson  <andersca@apple.com>
2279
2280         Reviewed by Sam Weinig.
2281
2282         Add NPObjectProxy class
2283         https://bugs.webkit.org/show_bug.cgi?id=48558
2284
2285         * Shared/Plugins/NPObjectProxy.cpp: Added.
2286         (WebKit::NPObjectProxy::NPObjectProxy):
2287         (WebKit::NPObjectProxy::~NPObjectProxy):
2288         * Shared/Plugins/NPObjectProxy.h: Added.
2289         * WebKit2.xcodeproj/project.pbxproj:
2290
2291 2010-10-28  Anders Carlsson  <andersca@apple.com>
2292
2293         Reviewed by Sam Weinig.
2294
2295         Add NPRemoteObjectMap class
2296         https://bugs.webkit.org/show_bug.cgi?id=48553
2297
2298         * Shared/Plugins/NPRemoteObjectMap.cpp: Added.
2299         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
2300         * Shared/Plugins/NPRemoteObjectMap.h: Added.
2301         * WebKit2.xcodeproj/project.pbxproj:
2302
2303 2010-10-28  Sam Weinig  <sam@webkit.org>
2304
2305         Reviewed by Anders Carlsson.
2306
2307         WKURLRefs should be allowed to be null
2308         <rdar://problem/8575621>
2309         https://bugs.webkit.org/show_bug.cgi?id=48535
2310
2311         * Shared/API/c/WKSharedAPICast.h:
2312         (WebKit::toURLRef):
2313         (WebKit::toCopiedURLAPI):
2314         Turn a null WTF::String into a null WKURLRef.
2315
2316 2010-10-28  Sam Weinig  <sam@webkit.org>
2317
2318         Reviewed by Anders Carlsson.
2319
2320         Add WebKit2 API for window feature getter/setters
2321         <rdar://problem/8590373>
2322         https://bugs.webkit.org/show_bug.cgi?id=48496
2323
2324         * UIProcess/API/C/WKPage.h:
2325         * UIProcess/WebPageProxy.cpp:
2326         (WebKit::WebPageProxy::setToolbarsAreVisible):
2327         (WebKit::WebPageProxy::getToolbarsAreVisible):
2328         (WebKit::WebPageProxy::setMenuBarIsVisible):
2329         (WebKit::WebPageProxy::getMenuBarIsVisible):
2330         (WebKit::WebPageProxy::setStatusBarIsVisible):
2331         (WebKit::WebPageProxy::getStatusBarIsVisible):
2332         (WebKit::WebPageProxy::setIsResizable):
2333         (WebKit::WebPageProxy::getIsResizable):
2334         * UIProcess/WebPageProxy.h:
2335         * UIProcess/WebPageProxy.messages.in:
2336         * UIProcess/WebUIClient.cpp:
2337         (WebKit::WebUIClient::toolbarsAreVisible):
2338         (WebKit::WebUIClient::setToolbarsAreVisible):
2339         (WebKit::WebUIClient::menuBarIsVisible):
2340         (WebKit::WebUIClient::setMenuBarIsVisible):
2341         (WebKit::WebUIClient::statusBarIsVisible):
2342         (WebKit::WebUIClient::setStatusBarIsVisible):
2343         (WebKit::WebUIClient::isResizable):
2344         (WebKit::WebUIClient::setIsResizable):
2345         * UIProcess/WebUIClient.h:
2346         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2347         (WebKit::WebChromeClient::setToolbarsVisible):
2348         (WebKit::WebChromeClient::toolbarsVisible):
2349         (WebKit::WebChromeClient::setStatusbarVisible):
2350         (WebKit::WebChromeClient::statusbarVisible):
2351         (WebKit::WebChromeClient::setMenubarVisible):
2352         (WebKit::WebChromeClient::menubarVisible):
2353         (WebKit::WebChromeClient::setResizable):
2354         Plumb through the calls.
2355
2356 2010-10-28  Dan Bernstein  <mitz@apple.com>
2357
2358         Build fix.
2359
2360         * win/WebKit2Common.vsprops:
2361
2362 2010-10-28  Dan Bernstein  <mitz@apple.com>
2363
2364         Reviewed by Adam Roben.
2365
2366         No longer soft-link zlib
2367         https://bugs.webkit.org/show_bug.cgi?id=48004
2368
2369         * win/WebKit2Common.vsprops: Added zlib.lib to AdditionalDependencies.
2370
2371 2010-10-28  Adam Roben  <aroben@apple.com>
2372
2373         Make PluginView retain its HTMLPlugInElement
2374
2375         This matches WebKit/mac's WebBaseNetscapePluginView. WebCore didn't do
2376         this, but had a very different mechanism for implementing NPRuntime
2377         that didn't require it.
2378
2379         Fixes <http://webkit.org/b/46672> <rdar://problem/8484208> Crash
2380         (preceded by assertion) in Node::document when running
2381         plugins/document-open.html in WebKit2 on Windows
2382
2383         Reviewed by Anders Carlsson.
2384
2385         * WebProcess/Plugins/PluginView.cpp:
2386         (WebKit::PluginView::create): Moved here from the header file so that
2387         clients of the header file won't have to pull in HTMLPlugInElement.h.
2388         Changed to take a PassRefPtr<HTMLPlugInElement>.
2389         (WebKit::PluginView::PluginView): Changed to take a
2390         PassRefPtr<HTMLPlugInElement> and to use m_pluginElement later (because
2391         the parameter to the function will be nulled-out after assigning into
2392         m_pluginElement).
2393         (WebKit::PluginView::pluginElementNPObject): Updated for change to m_pluginElement.
2394
2395         * WebProcess/Plugins/PluginView.h: Made m_pluginElement a RefPtr.
2396
2397 2010-10-28  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2398
2399         Reviewed by Andreas Kling.
2400
2401         Make Qt viewportAttributesForSize not assert on (0, 0) size
2402         https://bugs.webkit.org/show_bug.cgi?id=48524
2403
2404         We now return an invalid (isValid() == false) ViewportAttributes
2405         instance when the supplied size is (0, 0).
2406
2407         * UIProcess/API/qt/qwkpage.cpp:
2408         (QWKPage::viewportAttributesForSize):
2409
2410 2010-10-28  Balazs Kelemen  <kbalazs@webkit.org>
2411
2412         Reviewed by Andreas Kling.
2413
2414         [Qt][WK2] SharedMemory should be released by the receiving process
2415         https://bugs.webkit.org/show_bug.cgi?id=48520
2416
2417         * Platform/qt/SharedMemoryQt.cpp:
2418         (WebKit::SharedMemory::~SharedMemory):
2419         (WebKit::SharedMemory::createHandle):
2420
2421 2010-10-28  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2422
2423          Reviewed by Kenneth Rohde Christiansen.
2424
2425          [Qt] Web process cannot be debugged if it crashes in initialization
2426          https://bugs.webkit.org/show_bug.cgi?id=47399
2427
2428          Wait 3 seconds for the debugger on debug mode if
2429          WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable is set.
2430
2431          The debugging can be initiated for example in following way:
2432           export WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH=1
2433           ./MiniBrowser & while [ -z `pidof QtWebProcess` ]; do sleep 1; done; \
2434            gdb --pid=`pidof QtWebProcess`
2435
2436          * WebProcess/qt/WebProcessMainQt.cpp:
2437          (WebKit::WebProcessMainQt):
2438
2439 2010-10-28  Mark Rowe  <mrowe@apple.com>
2440
2441         32-bit build fix.
2442
2443         Qualify references to Rect to avoid ambiguity between WebCore::Rect and Carbon's Rect.
2444
2445         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2446         (WebKit::NetscapePlugin::platformPostInitialize):
2447         (WebKit::NetscapePlugin::windowFrameChanged):
2448
2449 2010-10-28  Ivan Krstić  <ike@apple.com>
2450
2451         Reviewed by Mark Rowe.
2452
2453         Remove unused experimental proxied panel interface.
2454         <rdar://problem/7237059>
2455
2456         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2457         (InitWebCoreSystemInterface):
2458
2459 2010-10-27  Mark Rowe  <mrowe@apple.com>
2460
2461         Build fix.
2462
2463         * UIProcess/API/mac/PageClientImpl.mm: Reference the file using the correct case.
2464
2465 2010-10-27  Anders Carlsson  <andersca@apple.com>
2466
2467         Reviewed by Sam Weinig.
2468
2469         Find indicators do not bounce
2470         https://bugs.webkit.org/show_bug.cgi?id=48490
2471         <rdar://problem/8564276>
2472
2473         * UIProcess/API/mac/FindIndicatorWindow.h:
2474         * UIProcess/API/mac/FindIndicatorWindow.mm:
2475         (-[WebFindIndicatorWindowAnimation _initWithFindIndicatorWindow:WebKit::animationDuration:animationProgressCallback:WebKit::FindIndicatorWindow::animationDidEndCallback:WebKit::FindIndicatorWindow::]):
2476         Add an animationDuration parameter.
2477         
2478         (WebKit::FindIndicatorWindow::FindIndicatorWindow):
2479         Initialize m_bounceAnimationContext.
2480
2481         (WebKit::FindIndicatorWindow::setFindIndicator):
2482         Create a bounce animation and start it.
2483
2484         (WebKit::FindIndicatorWindow::closeWindow):
2485         Stop the bounce animation and destroy the bounce animation context.
2486
2487         (WebKit::FindIndicatorWindow::startFadeOutTimerFired):
2488         pass the fade out duration.
2489
2490         (WebKit::FindIndicatorWindow::bounceAnimationCallback):
2491         Set the bounce animation progress.
2492
2493         (WebKit::FindIndicatorWindow::bounceAnimationDidEnd):
2494         Destroy the bounce animation context.
2495
2496 2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2497
2498         Reviewed by Andreas Kling.
2499
2500         Remove the reference to the pageNamespace in the QWKPagePrivate.
2501         Access it through the WebPageProxy instead which holds a strong
2502         ref to it.
2503
2504         * UIProcess/API/qt/qwkpage.cpp:
2505         (QWKPagePrivate::QWKPagePrivate):
2506         (QWKPage::preferences):
2507         * UIProcess/API/qt/qwkpage_p.h:
2508
2509 2010-10-27  Enrica Casucci  <enrica@apple.com>
2510
2511         Reviewed by Alexey Proskuryakov.
2512
2513         Support Appkit key bindings and custom key bindings in WebKit2
2514         https://bugs.webkit.org/show_bug.cgi?id=48271
2515         <rdar://problem/7660723>
2516         
2517         We need to support AppKit key bindings and custom key bindings in WebKit2.
2518         Every keyboard event is first sent to the WebProcess and we inform AppKit that
2519         we don't need further processing. When the event is processed by the WebProcess and no handler consumes it,
2520         we send a synchronous message back to the UI process to let AppKit perform the key bindings.
2521         This operation can result in one or more editing commands to execute or a noop.
2522         The WebProcess then replies back to the UI process to inform whether further processing is required, in
2523         which case the event is sent back to the application to be mapped.
2524         There is a potential for a race condition: in case the WebProcess is very slow to process the key events, the UI
2525         process could be in a completely different state when the event is being resent (for example it might not have the
2526         keyboard focus anymore) and the command could be lost. We should look out for user experience impact.
2527
2528         * Scripts/webkit2/messages.py: Added header file in the generated file.
2529         * Shared/WebCoreArgumentCoders.h: Added encoder/decoder for KeypressCommand.
2530         * UIProcess/API/mac/PageClientImpl.h:
2531         * UIProcess/API/mac/PageClientImpl.mm:
2532         (WebKit::PageClientImpl::interceptKeyEvent): Pass-through call to WKView.
2533         (WebKit::PageClientImpl::didNotHandleKeyEvent): Added logic to resend the event to the application.
2534         * UIProcess/API/mac/WKView.mm:
2535         (-[WKView validateUserInterfaceItem:]): Changed the default return value to YES, otherwise no menu shortcut is performed.
2536         (-[WKView doCommandBySelector:]): Added.
2537         (-[WKView insertText:]): Added.
2538         (-[WKView _handleStyleKeyEquivalent:]): Added to handle command-B and command-I.
2539         (-[WKView performKeyEquivalent:]): Added to intercept key binding sequences.
2540         (-[WKView _setEventBeingResent:]):
2541         (-[WKView _interceptKeyEvent:]):
2542         * UIProcess/API/mac/WKViewInternal.h:
2543         * UIProcess/PageClient.h:
2544         * UIProcess/WebPageProxy.cpp:
2545         (WebKit::WebPageProxy::interpretKeyEvent):
2546         * UIProcess/WebPageProxy.h:
2547         * UIProcess/WebPageProxy.messages.in:
2548         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2549         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2550         (WebKit::WebEditorClient::handleKeyboardEvent):
2551         (WebKit::WebEditorClient::handleInputMethodKeydown):
2552         * WebProcess/WebPage/WebPage.cpp:
2553         * WebProcess/WebPage/WebPage.h:
2554         * WebProcess/WebPage/mac/WebPageMac.mm: Moved handleKeyboardEvent and handleInputMethodKeydown
2555         to the Mac specific implementation.
2556         (WebKit::WebPage::interceptEditingKeyboardEvent): Added.
2557
2558 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
2559
2560         More Windows build fixage. Copy another new header into WebKitOutputDir.
2561
2562         * win/WebKit2Generated.make:
2563
2564 2010-10-27  Brian Weinstein  <bweinstein@apple.com>
2565
2566         Windows build fix. Copy a new header into WebKitOutputDir.
2567
2568         * win/WebKit2Generated.make:
2569
2570 2010-10-26  Darin Adler  <darin@apple.com>
2571
2572         Reviewed by Sam Weinig.
2573
2574         WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
2575         https://bugs.webkit.org/show_bug.cgi?id=42322
2576         rdar://problem/8193631
2577
2578         WebKitTestRunner needs to support layoutTestController.clearBackForwardList
2579         https://bugs.webkit.org/show_bug.cgi?id=42333
2580         rdar://problem/8193643
2581
2582         * Shared/API/c/WKBase.h: Added WKBundleBackForwardListRef and
2583         WKBundleBackForwardListItemRef.
2584
2585         * Shared/API/c/WKURL.cpp:
2586         (WKURLCopyString): Added.
2587         * Shared/API/c/WKURL.h: Added WKURLCopyString.
2588
2589         * Shared/API/c/cf/WKURLCF.h: Fixed incorrect argument name.
2590
2591         * Shared/APIObject.h: Added TypeBundleBackForwardList and
2592         TypeBundleBackForwardListItem.
2593
2594         * Shared/ImmutableArray.h: Marked destructor virtual explicitly.
2595         * Shared/ImmutableDictionary.h: Ditto.
2596         * UIProcess/WebBackForwardListItem.h: Ditto.
2597         * UIProcess/WebContext.h: Ditto.
2598         * UIProcess/WebFrameProxy.h: Ditto.
2599         * UIProcess/WebNavigationData.h: Ditto.
2600         * UIProcess/WebPageNamespace.h: Ditto.
2601         * UIProcess/WebPreferences.h: Ditto.
2602         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: Ditto.
2603         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2604         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: Ditto.
2605
2606         * UIProcess/WebBackForwardList.cpp: Removed unneeded backListWithLimit
2607         and forwardListWithLimit functions.
2608         (WebKit::WebBackForwardList::clear): Added.
2609         * UIProcess/WebBackForwardList.h: Marked destructor virtual explicitly.
2610         Added clear, removed backListWithLimit and forwardListWithLimit functions.
2611
2612         * UIProcess/WebPageProxy.cpp: Removed unneeded backForwardBackItem,
2613         backForwardCurrentItem, and backForwardForwardItem functions.
2614         (WebKit::WebPageProxy::backForwardClear): Added.
2615         * UIProcess/WebPageProxy.h: Ditto.
2616         * UIProcess/WebPageProxy.messages.in: Ditto.
2617
2618         * WebKit2.pro: Added new files.
2619         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2620         * win/WebKit2.vcproj: Ditto.
2621
2622         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Added
2623         WKBundleBackForwardListRef and WKBundleBackForwardListItemRef.
2624
2625         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
2626         Started with a copy of from WebKit2/UIProcess/API/C/WKBackForwardList.cpp.
2627         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.h:
2628         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardList.h.
2629
2630         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2631         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.cpp.
2632         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h:
2633         Started with a copy of WebKit2/UIProcess/API/C/WKBackForwardListItem.h.
2634
2635         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2636         (WKBundlePageGetBackForwardList): Added.
2637         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Ditto.
2638
2639
2640         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
2641         Started with a copy of WebKit2/UIProcess/WebBackForwardList.cpp.
2642         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h:
2643         Started with a copy of WebKit2/UIProcess/WebBackForwardList.h.
2644
2645         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2646         Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.cpp.
2647         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h:
2648         Started with a copy of WebKit2/UIProcess/WebBackForwardListItem.h.
2649
2650         * WebProcess/WebPage/WebBackForwardListProxy.cpp: Removed
2651         many unneeded functions.
2652         (WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
2653         Removed unneeded initialization of m_closed.
2654         (WebKit::WebBackForwardListProxy::addItem): Added a check for
2655         the case of a capacity of 0.
2656         (WebKit::WebBackForwardListProxy::goToItem): Added a check for
2657         when the proxy outlives its page.
2658         (WebKit::WebBackForwardListProxy::itemAtIndex): Ditto.
2659         (WebKit::WebBackForwardListProxy::backListCount): Ditto.
2660         (WebKit::WebBackForwardListProxy::forwardListCount): Ditto.
2661         (WebKit::WebBackForwardListProxy::close): Removed unneeded code
2662         setting m_closed.
2663         (WebKit::WebBackForwardListProxy::isActive): Added.
2664         (WebKit::WebBackForwardListProxy::clear): Added.
2665
2666         * WebProcess/WebPage/WebBackForwardListProxy.h: Added clear,
2667         isActive, and detach functions. Removed many other unneeded
2668         function and data members.
2669
2670         * WebProcess/WebPage/WebPage.cpp:
2671         (WebKit::WebPage::~WebPage): Added call to detach on the
2672         back/forward list.
2673         (WebKit::WebPage::backForwardList): Added.
2674         * WebProcess/WebPage/WebPage.h: Added backForwardList function
2675         and m_backForwardList data member.
2676
2677 2010-10-27  Beth Dakin  <bdakin@apple.com>
2678
2679         Reviewed by Darin Adler.
2680
2681         Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit 
2682         SPI to scale a WebView
2683         -and corresponding-
2684         <rdar://problem/8107667>
2685
2686         This patch adds SPI to Mac WebKit that scales the page by the given 
2687         scale factor.
2688
2689         Implement scaleWebView(), which tells WebCore::Frame to scale, and 
2690         viewScaleFactor() which returns the current scale factor.
2691         * Shared/API/c/WKSharedAPICast.h:
2692         * UIProcess/API/C/WKPage.cpp:
2693         (WKPageScaleWebView):
2694         (WKPageGetViewScaleFactor):
2695         * UIProcess/API/C/WKPage.h:
2696         * UIProcess/WebPageProxy.cpp:
2697         (WebKit::WebPageProxy::WebPageProxy):
2698         (WebKit::WebPageProxy::scaleWebView):
2699         * UIProcess/WebPageProxy.h:
2700         (WebKit::WebPageProxy::viewScaleFactor):
2701         * WebProcess/WebPage/WebPage.cpp:
2702         (WebKit::WebPage::scaleWebView):
2703         (WebKit::WebPage::viewScaleFactor):
2704         * WebProcess/WebPage/WebPage.h:
2705         * WebProcess/WebPage/WebPage.messages.in:
2706
2707 2010-10-27  Jessie Berlin  <jberlin@apple.com>
2708
2709         Reviewed by Sam Weinig.
2710
2711         Fix the WebKit2 API tests.
2712         https://bugs.webkit.org/show_bug.cgi?id=48461
2713
2714         The API tests were failing because the tests expect to be able to send messages before the
2715         WebProcess finishes launching.
2716
2717         Instead of dispatching the pending messages in processDidFinishLaunching, dispatch them in
2718         ensureWebProcess but do not make messages pending if the process is launching.
2719
2720         * UIProcess/WebContext.cpp:
2721         (WebKit::WebContext::processDidFinishLaunching):
2722         Move dispatching the pending messages back from here ...
2723         (WebKit::WebContext::ensureWebProcess):
2724         ... to here.
2725         (WebKit::WebContext::postMessageToInjectedBundle):
2726         Check whether the process can send messages in order to determine if a message needs to be
2727         sent later.
2728
2729         * UIProcess/WebProcessProxy.h:
2730         (WebKit::WebProcessProxy::canSendMessage):
2731         The WebProcessProxy can send a message if it is valid or if it is launching.
2732
2733 2010-10-27  Anders Carlsson  <andersca@apple.com>
2734
2735         Reviewed by Sam Weinig.
2736
2737         More work on downloads
2738         https://bugs.webkit.org/show_bug.cgi?id=48480
2739
2740         * WebProcess/Downloads/Download.cpp:
2741         (WebKit::Download::~Download):
2742         Call platformInvalidate().
2743
2744         (WebKit::Download::didBegin):
2745         (WebKit::Download::didReceiveData):
2746         (WebKit::Download::didFinish):
2747         Add empty stubs.
2748
2749         * WebProcess/Downloads/DownloadManager.cpp:
2750         (WebKit::DownloadManager::startDownload):
2751         Create a Download object and insert it into the m_downloads map.
2752
2753         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2754         (WebKit::Download::platformInvalidate):
2755         Add empty stub.
2756         
2757         * WebProcess/Downloads/mac/DownloadMac.mm:
2758         (WebKit::Download::platformInvalidate):
2759         Tell the WKDownloadAsDelegate object that we're being invalidated.
2760
2761         (-[WKDownloadAsDelegate downloadDidBegin:]):
2762         Call Download::didBegin.
2763
2764         (-[WKDownloadAsDelegate download:didReceiveDataOfLength:]):
2765         Call Download::didReceiveData.
2766
2767         (-[WKDownloadAsDelegate downloadDidFinish:]):
2768         Call Download::didFinish.
2769
2770         * WebProcess/Downloads/qt/DownloadQt.cpp:
2771         (WebKit::Download::platformInvalidate):
2772         Add empty stub.
2773
2774 2010-10-27  Anders Carlsson  <andersca@apple.com>
2775
2776         Reviewed by Sam Weinig.
2777
2778         WebPageProxy::isValid should return false if the page has been explicitly closed
2779         https://bugs.webkit.org/show_bug.cgi?id=48458
2780
2781         * UIProcess/WebPageProxy.cpp:
2782         (WebKit::WebPageProxy::WebPageProxy):
2783         (WebKit::WebPageProxy::isValid):
2784         (WebKit::WebPageProxy::relaunch):
2785         (WebKit::WebPageProxy::close):
2786         (WebKit::WebPageProxy::processDidCrash):
2787         * UIProcess/WebPageProxy.h:
2788         (WebKit::WebPageProxy::isClosed):
2789
2790 2010-10-27  Anders Carlsson  <andersca@apple.com>
2791
2792         Reviewed by Adam Roben.
2793
2794         Begin stubbing out the Download class
2795         https://bugs.webkit.org/show_bug.cgi?id=48447
2796
2797         * WebKit2.pro:
2798         * WebKit2.xcodeproj/project.pbxproj:
2799         Add new files.
2800         
2801         * WebKit2Prefix.h:
2802         Include WebCore/EmptyProtocolDefinitions.h
2803         
2804         * WebProcess/Downloads/Download.cpp: Added.
2805         * WebProcess/Downloads/Download.h: Added.
2806
2807         * WebProcess/Downloads/DownloadManager.cpp:
2808         (WebKit::DownloadManager::startDownload):
2809         Create a Download object and start it.
2810
2811         * WebProcess/Downloads/mac/DownloadMac.mm: Added.
2812         (WebKit::Download::start):
2813         Create an NSURLDownload.
2814     
2815         * WebProcess/WebPage/WebFrame.cpp:
2816         (WebKit::WebFrame::startDownload):
2817         Ask the download manager to start downloading.
2818
2819         * win/WebKit2.vcproj:
2820         * win/WebKit2Common.vsprops:
2821         Add new files.
2822
2823 2010-10-27  Adam Roben  <aroben@apple.com>
2824
2825         Don't allow setting NetscapePlugin::m_isWindowed after NPP_New has
2826         completed
2827
2828         In Firefox, Chrome, and WebKit1 trying to set this value after NPP_New
2829         does not actually affect whether the plugin is windowed.
2830
2831         Fixes <http://webkit.org/b/46673> <rdar://problem/8484211> Assertion
2832         failure in NetscapePlugin::platformDestroy when running
2833         plugins/mouse-events.html in WebKit2 on Windows
2834
2835         Reviewed by Anders Carlsson.
2836
2837         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2838         (WebKit::NetscapePlugin::setIsWindowed): Moved here from the header.
2839         Bail out if m_isStarted is true, indicating that NPP_New has already
2840         finished.
2841
2842         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Removed the
2843         implementation of setIsWindowed.
2844
2845 2010-10-27  Timothy Hatcher  <timothy@apple.com>
2846
2847         Add API for enabling the developer extras (Web Inspector).
2848
2849         http://webkit.org/b/48439
2850
2851         Reviewed by John Sullivan.
2852
2853         * Shared/WebPreferencesStore.cpp:
2854         (WebKit::WebPreferencesStore::WebPreferencesStore):
2855         (WebKit::WebPreferencesStore::encode):
2856         (WebKit::WebPreferencesStore::decode):
2857         * Shared/WebPreferencesStore.h:
2858         * UIProcess/API/C/WKPreferences.cpp:
2859         (WKPreferencesSetDeveloperExtrasEnabled):
2860         (WKPreferencesGetDeveloperExtrasEnabled):
2861         * UIProcess/API/C/WKPreferences.h:
2862         * UIProcess/WebPreferences.cpp:
2863         (WebKit::WebPreferences::setDeveloperExtrasEnabled):
2864         (WebKit::WebPreferences::developerExtrasEnabled):
2865         * UIProcess/WebPreferences.h:
2866         * WebProcess/WebPage/WebPage.cpp:
2867         (WebKit::WebPage::updatePreferences):
2868
2869 2010-10-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2870
2871         Reviewed by Anders Carlsson.
2872
2873         Move contentsSizeChange from the UIClient into the PageClient and
2874         and make it a private Qt-only API in the process.
2875
2876         Make WKPageContentsSizeChangedCallback be a private API
2877         https://bugs.webkit.org/show_bug.cgi?id=48409
2878
2879         * UIProcess/API/C/WKPage.h:
2880         * UIProcess/API/qt/qwkpage.cpp:
2881         (QWKPagePrivate::didChangeContentsSize):
2882         (QWKPage::QWKPage):
2883         * UIProcess/API/qt/qwkpage_p.h:
2884         * UIProcess/PageClient.h:
2885         * UIProcess/WebPageProxy.cpp:
2886         (WebKit::WebPageProxy::didChangeContentsSize):
2887         * UIProcess/WebPageProxy.h:
2888         * UIProcess/WebPageProxy.messages.in:
2889         * UIProcess/WebUIClient.cpp:
2890         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2891         (WebKit::WebChromeClient::contentsSizeChanged):
2892
2893 2010-10-26  Brian Weinstein  <bweinstein@apple.com>
2894
2895         Reviewed by Adam Roben.
2896
2897         WebKit2 shouldn't try to send an empty user agent
2898         https://bugs.webkit.org/show_bug.cgi?id=48397
2899         
2900         Change the check of the custom user agent to an empty check instead of a null check. When the client application
2901         sets a custom user agent and then resets it, the custom user agent is set to an empty string. If all we do
2902         is check for a null string, then we will think we have a custom user agent (which is empty) and send an empty
2903         user agent.
2904
2905         * WebProcess/WebPage/WebPage.cpp:
2906         (WebKit::WebPage::userAgent):
2907
2908 2010-10-27  Adam Roben  <aroben@apple.com>
2909
2910         Don't call NPP_GetValue if the plugin didn't provide an implementation
2911
2912         Fixes <http://webkit.org/b/48433> Crash in
2913         NetscapePlugin::shouldLoadSrcURL when using Shockwave Director 10.3 in
2914         WebKit2 on Windows
2915
2916         Reviewed by Eric Carlson.
2917
2918         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2919         (WebKit::NetscapePlugin::NPP_GetValue): Null-check the getvalue pointer
2920         before using it to call NPP_GetValue.
2921
2922 2010-10-27  Balazs Kelemen  <kbalazs@webkit.org>
2923
2924         Reviewed by Andreas Kling.
2925
2926         [Qt] Assert due to multiple initialization of WebPlatformStrategies
2927         https://bugs.webkit.org/show_bug.cgi?id=48327
2928
2929         We are using the LocalizationStrategy in the UI process
2930         so the previous attempt to fix this (http://trac.webkit.org/changeset/70620)
2931         was wrong.
2932         * UIProcess/API/qt/qwkpage.cpp:
2933         (initializePlatformStrategiesIfNeeded):
2934         Call WebPlatformStrategies::initialize exactly once.
2935         (QWKPagePrivate::QWKPagePrivate):
2936
2937 2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2938
2939         Reviewed by Andreas Kling.
2940
2941         [Qt] WebKit2 UI process crashes if web process crashes
2942         https://bugs.webkit.org/show_bug.cgi?id=48400
2943
2944         Check the success of socket write operations.
2945         Avoids crashing the UI process if web process has crashed.
2946         Qt socket code segfaults when write is called for a socket
2947         that has had an error.
2948
2949         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2950         (CoreIPC::Connection::platformInvalidate):
2951         Reset m_socket after deletion.
2952
2953         (CoreIPC::Connection::sendOutgoingMessage):
2954         Check error status of write operations and
2955         invalidate socket if writes fail.
2956
2957 2010-10-27  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2958
2959         Reviewed by Andreas Kling.
2960
2961         [Qt] Type mismatch while serializing/deserializing message id size
2962         https://bugs.webkit.org/show_bug.cgi?id=48401
2963
2964         Use correct types when reading data from connection buffer.
2965
2966         The message id is written as uint32_t, thus the buffer size should be
2967         calculated based on sizeof(uint32_t) and not sizeof(MessageID).
2968
2969         * Platform/CoreIPC/qt/ConnectionQt.cpp:
2970         (CoreIPC::Connection::readyReadHandler):
2971
2972 2010-10-27  Zalan Bujtas  <zbujtas@gmail.com>
2973
2974         Reviewed by Kenneth Rohde Christiansen.
2975
2976         Multiple WebPlatformStrategy initialization triggers assert in WebCore/PlatformStrategies. 
2977         Remove the code for now, as it is not used at all.
2978         https://bugs.webkit.org/show_bug.cgi?id=48327
2979
2980         * UIProcess/API/qt/qwkpage.cpp:
2981         (QWKPagePrivate::QWKPagePrivate):
2982
2983 2010-10-26  Brent Fulgham  <bfulgham@webkit.org>
2984
2985         Unreviewed build fix.
2986
2987         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
2988         (WebKit::cancelledError): Conditionalize use of CFNetwork calls
2989         and includes.
2990
2991 2010-10-26  Alexey Proskuryakov  <ap@apple.com>
2992
2993         Build fix.
2994
2995         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Modified original file, not its framework
2996         copy this time.
2997
2998 2010-10-26  Anders Carlsson  <andersca@apple.com>
2999
3000         Reviewed by Sam Weinig.
3001
3002         Add DownloadManager class
3003         https://bugs.webkit.org/show_bug.cgi?id=48388
3004
3005         * WebKit2.pro:
3006         * WebKit2.xcodeproj/project.pbxproj:
3007         Add new files.
3008
3009         * WebProcess/Downloads/DownloadManager.cpp: Added.
3010         (WebKit::DownloadManager::shared):
3011         (WebKit::DownloadManager::DownloadManager):
3012         * WebProcess/Downloads/DownloadManager.h: Added.
3013
3014         * win/WebKit2.vcproj:
3015         * win/WebKit2Common.vsprops:
3016         Add new files.
3017
3018 2010-10-26  Anders Carlsson  <andersca@apple.com>
3019
3020         Reviewed by Sam Weinig.
3021
3022         Pass a downloadID to the web process whenever a download is requested
3023         https://bugs.webkit.org/show_bug.cgi?id=48380
3024
3025         * UIProcess/WebContext.cpp:
3026         (WebKit::WebContext::generateDownloadID):
3027         Generate a unique download ID.
3028
3029         * UIProcess/WebPageProxy.cpp:
3030         (WebKit::WebPageProxy::receivedPolicyDecision):
3031         Pass along a download ID if needed.
3032
3033         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3034         (WebKit::WebFrameLoaderClient::startDownload):
3035         Call the web frame member function.
3036
3037         * WebProcess/WebPage/WebFrame.cpp:
3038         (WebKit::WebFrame::WebFrame):
3039         Initialize m_policyDownloadID.
3040
3041         (WebKit::WebFrame::invalidatePolicyListener):
3042         Reset m_policyDownloadID.
3043
3044         (WebKit::WebFrame::didReceivePolicyDecision):
3045         Set m_policyDownloadID.
3046
3047         (WebKit::WebFrame::startDownload):
3048         Assert that m_policyDownloadID is not zero.
3049
3050         * WebProcess/WebPage/WebPage.cpp:
3051         (WebKit::WebPage::didReceivePolicyDecision):
3052         Pass along the download ID.
3053
3054         * WebProcess/WebPage/WebPage.messages.in:
3055         Add the download ID.
3056
3057 2010-10-26  Alexey Proskuryakov  <ap@apple.com>
3058
3059         Reviewed by Sam Weinig.
3060
3061         https://bugs.webkit.org/show_bug.cgi?id=48375
3062         <rdar://problem/8392724> Need delegate calls in PageLoaderClient to indicate if we have
3063         loaded insecure content
3064
3065         Added the delegate. Just like the bundle version, it misses WebOrigin parameter that Mac
3066         delegate call used to have. It doesn't seem necessary for clients.
3067
3068         * UIProcess/API/C/WKPage.h:
3069         * UIProcess/API/qt/qwkpage.cpp:
3070         (QWKPage::QWKPage):
3071         * UIProcess/WebLoaderClient.cpp:
3072         (WebKit::WebLoaderClient::didDisplayInsecureContentForFrame):
3073         (WebKit::WebLoaderClient::didRunInsecureContentForFrame):
3074         * UIProcess/WebLoaderClient.h:
3075         * UIProcess/WebPageProxy.cpp:
3076         (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
3077         (WebKit::WebPageProxy::didRunInsecureContentForFrame):
3078         * UIProcess/WebPageProxy.h:
3079         * UIProcess/WebPageProxy.messages.in:
3080         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3081         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3082         (WebKit::InjectedBundlePageLoaderClient::didDisplayInsecureContentForFrame):
3083         (WebKit::InjectedBundlePageLoaderClient::didRunInsecureContentForFrame):
3084         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
3085         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3086         (WebKit::WebFrameLoaderClient::didDisplayInsecureContent):
3087         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
3088
3089 2010-10-26  Jenn Braithwaite  <jennb@chromium.org>
3090
3091         Reviewed by Dmitry Titov.
3092
3093         Resource tracking failure when trying to move a frame between documents
3094         https://bugs.webkit.org/show_bug.cgi?id=44713
3095
3096         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3097         (WebKit::WebFrameLoaderClient::transferLoadingResourceFromPage):
3098         Empty method.
3099         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3100
3101 2010-10-26  Jessie Berlin  <jberlin@apple.com>
3102
3103         Reviewed by Darin Adler.
3104
3105         Post any pending messages to the Injected Bundle in WebContext::processDidFinishLaunching
3106         instead of in WebContext::ensureWebProcess.
3107         https://bugs.webkit.org/show_bug.cgi?id=48367
3108
3109         Send pending injected bundle messages after the process finished launching instead of of
3110         directly after creating it.
3111
3112         * UIProcess/WebContext.cpp:
3113         (WebKit::WebContext::ensureWebProcess):
3114         Move the logic to dispatch pending injected bundle messages from here ...
3115         (WebKit::WebContext::processDidFinishLaunching):
3116         ... to here.
3117         Also use a reference instead of a pointer when sending the pending messages.
3118
3119 2010-10-26  Anders Carlsson  <andersca@apple.com>
3120
3121         Reviewed by Sam Weinig.
3122
3123         pageDidScroll callback should be on the UI process client rather than (or in addition to) the web process client
3124         https://bugs.webkit.org/show_bug.cgi?id=48366
3125
3126         * UIProcess/API/qt/qwkpage.cpp:
3127         (QWKPage::QWKPage):
3128         Add zero initializer.
3129
3130         * UIProcess/WebPageProxy.cpp:
3131         (WebKit::WebPageProxy::pageDidScroll):
3132         Call the pageDidScroll client function.
3133
3134         * UIProcess/WebPageProxy.messages.in:
3135         Add PageDidScroll message.
3136
3137         * WebProcess/WebPage/WebPage.cpp:
3138         (WebKit::WebPage::pageDidScroll):
3139         Send the PageDidScroll message.
3140
3141 2010-10-26  Brian Weinstein  <bweinstein@apple.com>
3142
3143         Reviewed by Darin Adler.
3144
3145         Need a way to retrieve custom user agent from a WKPage
3146         https://bugs.webkit.org/show_bug.cgi?id=48360
3147         <rdar://problem/8466537>
3148         
3149         Add an exported function on WKPage to get the page's custom user agent.
3150
3151         * UIProcess/API/C/WKPage.cpp:
3152         (WKPageCopyCustomUserAgent): Exported function that returns the custom user
3153             agent.
3154         * UIProcess/API/C/WKPage.h:
3155         * UIProcess/WebPageProxy.cpp:
3156         (WebKit::WebPageProxy::close): Clear the custom user agent string.
3157         (WebKit::WebPageProxy::processDidCrash): Ditto.
3158         (WebKit::WebPageProxy::setCustomUserAgent): Add a new early return if we're setting
3159             the custom user agent to what it was before, and set the custom user agent member
3160             variable.
3161         * UIProcess/WebPageProxy.h:
3162         (WebKit::WebPageProxy::customUserAgent): Returns the custom user agent.
3163
3164 2010-10-26  Simon Fraser  <simon.fraser@apple.com>
3165
3166         Reviewed by Sam Weinig.
3167
3168         Support layoutTestController.layerTreeAsText in WebKitTestRunner
3169         https://bugs.webkit.org/show_bug.cgi?id=42145
3170         
3171         Expose layerTreeAsText() as private API so that 
3172         WebKitTestRunner can use it.
3173
3174         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3175         (WKBundleFrameCopyLayerTreeAsText):
3176         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3177         * WebProcess/WebPage/WebFrame.cpp:
3178         (WebKit::WebFrame::numberOfActiveAnimations):
3179         (WebKit::WebFrame::layerTreeAsText):
3180         (WebKit::WebFrame::pendingUnloadCount):
3181         * WebProcess/WebPage/WebFrame.h:
3182
3183 2010-10-26  Anders Carlsson  <andersca@apple.com>
3184
3185         Reviewed by Sam Weinig.
3186
3187         Enable the plug-in process on Mac
3188         https://bugs.webkit.org/show_bug.cgi?id=48350
3189
3190         * WebKit2Prefix.h:
3191         Flip the switch and enable the plug-in process on Mac.
3192
3193         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3194         (WebKit::NetscapePlugin::platformDestroy):
3195         Fix a bogus assert.
3196
3197 2010-10-26  Zoltan Horvath  <zoltan@webkit.org>
3198
3199         Reviewed by Kenneth Rohde Christiansen.
3200
3201         [Qt] Implement SharedMemory for WebKit2
3202         https://bugs.webkit.org/show_bug.cgi?id=47345
3203
3204         Implement unimplemented functions in SharedMemoryQt.cpp.
3205         Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
3206         Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
3207         Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
3208         methods of MappedMemoryPool.
3209
3210         * Platform/SharedMemory.h: Add a handle member for Qt.
3211         * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
3212         (WebKit::MappedMemoryPool::searchForMappedMemory):
3213         (WebKit::MappedMemoryPool::mapMemory):
3214         (WebKit::MappedMemoryPool::mapFile):
3215         * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
3216         (WebKit::MappedMemoryPool::MappedMemory::mapSize):
3217         (WebKit::MappedMemoryPool::MappedMemory::markUsed):
3218         (WebKit::MappedMemoryPool::MappedMemory::markFree):
3219         (WebKit::MappedMemoryPool::MappedMemory::isFree):
3220         (WebKit::MappedMemoryPool::MappedMemory::data):
3221         (WebKit::MappedMemoryPool::MappedMemoryPool):
3222         Move MappedMemory implementation into MappedMemoryPool.
3223         * Platform/qt/SharedMemoryQt.cpp:
3224         (WebKit::SharedMemory::Handle::Handle): Implement.
3225         (WebKit::SharedMemory::Handle::~Handle):
3226         (WebKit::SharedMemory::Handle::isNull): Implement.
3227         (WebKit::SharedMemory::Handle::encode): Implement.
3228         (WebKit::SharedMemory::Handle::decode): Implement.
3229         (WebKit::SharedMemory::create): Implement.
3230         (WebKit::mapProtection): Added.
3231         (WebKit::SharedMemory::~SharedMemory): Implement.
3232         (WebKit::SharedMemory::createHandle): Implement.
3233         (WebKit::SharedMemory::systemPageSize): Implement.
3234         * Shared/qt/MappedMemory.h: Removed.
3235         * Shared/qt/MappedMemoryPool.cpp: Removed.
3236         * Shared/qt/UpdateChunk.cpp:
3237         (WebKit::UpdateChunk::UpdateChunk):
3238         (WebKit::UpdateChunk::decode):
3239         Modify to use MappedMemoryPool.
3240         * Shared/qt/UpdateChunk.h:
3241         * WebKit2.pro:
3242         Modify affected lines.
3243
3244 2010-10-25  Anders Carlsson  <andersca@apple.com>
3245
3246         Reviewed by Sam Weinig.
3247
3248         WebKit2 callbacks for findString() and countMatchesForString() should report whether the match count was exceeded
3249         https://bugs.webkit.org/show_bug.cgi?id=48285
3250         <rdar://problem/8576318>
3251
3252         * UIProcess/API/C/WKPage.h:
3253         Add a kWKMoreThanMaximumMatchCount constant.
3254
3255         * WebProcess/WebPage/FindController.cpp:
3256         (WebKit::FindController::findString):
3257         If we get back more matches than allowed, send kWKMoreThanMaximumMatchCount as the match constant.
3258
3259 2010-10-25  Dan Bernstein  <mitz@apple.com>
3260
3261         Non-Carbon build fix.
3262
3263         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3264         (WebKit::NetscapePlugin::windowFrameChanged):
3265
3266 2010-10-25  Timothy Hatcher  <timothy@apple.com>
3267
3268         Stub out WebInspector objects and WKInspectorRef API.
3269
3270         https://webkit.org/b/48265
3271
3272         Reviewed by Anders Carlsson.
3273
3274         * Platform/CoreIPC/MessageID.h: Added MessageClassWebInspector and MessageClassWebInspectorProxy.
3275         * Shared/API/c/WKBase.h: Added WKInspectorRef.
3276         * Shared/APIObject.h: Added TypeInspector.
3277         * UIProcess/API/C/WKAPICast.h: Added WKInspectorRef to WebInspectorProxy mapping.
3278         * UIProcess/API/C/WKInspector.cpp: Added.
3279         (WKInspectorGetTypeID):
3280         (WKInspectorGetPage):
3281         * UIProcess/API/C/WKInspector.h: Added.
3282         * UIProcess/API/C/WKPage.cpp:
3283         (WKPageGetInspector): Added.
3284         * UIProcess/API/C/WKPage.h:
3285         * UIProcess/WebInspectorProxy.cpp: Added.
3286         (WebKit::WebInspectorProxy::WebInspectorProxy):
3287         (WebKit::WebInspectorProxy::~WebInspectorProxy):
3288         (WebKit::WebInspectorProxy::invalidate):
3289         * UIProcess/WebInspectorProxy.h:
3290         (WebKit::WebInspectorProxy::create):
3291         (WebKit::WebInspectorProxy::page):
3292         (WebKit::WebInspectorProxy::type):
3293         * UIProcess/WebPageProxy.cpp:
3294         (WebKit::WebPageProxy::inspector): Lazily create the WebInspectorProxy.
3295         * UIProcess/WebPageProxy.h:
3296         * WebKit2.pro: Added new files.
3297         * WebKit2.xcodeproj/project.pbxproj: Added new files.
3298         * WebProcess/WebPage/WebInspector.cpp: Added.
3299         (WebKit::WebInspector::WebInspector):
3300         * WebProcess/WebPage/WebInspector.h: Added.
3301         * WebProcess/WebPage/WebPage.cpp:
3302         (WebKit::WebPage::inspector): Lazily create the WebInspector.
3303         * WebProcess/WebPage/WebPage.h:
3304         * win/WebKit2.vcproj: Added new files.
3305
3306 2010-10-25  Anders Carlsson  <andersca@apple.com>
3307
3308         Reviewed by Dan Bernstein.
3309
3310         Update the fake Carbon window when the window frame changes
3311         https://bugs.webkit.org/show_bug.cgi?id=48273
3312
3313         * UIProcess/API/mac/WKView.mm:
3314         (screenForWindow):
3315         (-[WKView _updateWindowFrame]):
3316         Pass the window frame in Carbon coordinates.
3317
3318         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3319         (WebKit::NetscapePlugin::windowFrameChanged):
3320         Update the window bounds.
3321
3322         * WebProcess/Plugins/PluginView.cpp:
3323         (WebKit::PluginView::setWindowFrame):
3324         Call the plug-in.
3325
3326         (WebKit::PluginView::platformLayer):
3327         Fix a crash when WebCore asked for the layer before it was initialized.
3328
3329 2010-10-25  Oliver Hunt  <oliver@apple.com>
3330
3331         Reviewed by Gavin Barraclough.
3332
3333         Remove exec and globalData arguments from jsNumber
3334         https://bugs.webkit.org/show_bug.cgi?id=48270
3335
3336         Mechanical removal of exec parameter to jsNumber
3337
3338         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3339         (WebKit::NPRuntimeObjectMap::convertNPVariantToJSValue):
3340
3341 2010-10-25  Anders Carlsson  <andersca@apple.com>
3342
3343         Reviewed by Darin Adler.
3344
3345         Replace matchCountDidChange with didFindString/didFailToFindString
3346         https://bugs.webkit.org/show_bug.cgi?id=48262
3347         <rdar://problem/8568928>
3348
3349         * UIProcess/API/C/WKPage.h:
3350         * UIProcess/WebFindClient.cpp:
3351         (WebKit::WebFindClient::didFindString):
3352         (WebKit::WebFindClient::didFailToFindString):
3353         * UIProcess/WebFindClient.h:
3354         * UIProcess/WebPageProxy.cpp:
3355         (WebKit::WebPageProxy::didFindString):
3356         (WebKit::WebPageProxy::didFailToFindString):
3357         * UIProcess/WebPageProxy.h:
3358         * UIProcess/WebPageProxy.messages.in:
3359         * WebProcess/WebPage/FindController.cpp:
3360         (WebKit::FindController::findString):
3361
3362 2010-10-25  Anders Carlsson  <andersca@apple.com>
3363
3364         Reviewed by Adam Roben.
3365
3366         Add a pageDidScroll BundleUIClient callback
3367         https://bugs.webkit.org/show_bug.cgi?id=48260
3368         <rdar://problem/8531159>
3369
3370         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3371         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
3372         (WebKit::InjectedBundlePageUIClient::pageDidScroll):
3373         Call the pageDidScroll callback.
3374
3375         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
3376         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3377         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
3378         (WebKit::WebChromeClient::scroll):
3379         Call pageDidScroll.
3380
3381         * WebProcess/WebPage/WebPage.cpp:
3382         (WebKit::WebPage::pageDidScroll):
3383         Hide the find banner UI and call the BundleUIClient pageDidScroll callback.
3384
3385 2010-10-25  Brian Weinstein  <bweinstein@apple.com>
3386
3387         Reviewed by Adam Roben.
3388
3389         Control + Mousewheel shouldn't be handled in WebKit2
3390         https://bugs.webkit.org/show_bug.cgi?id=48253
3391         
3392         Don't handle a wheel event if Control is pressed, pass the message back to DefWindowProc.
3393
3394         * UIProcess/win/WebView.cpp:
3395         (WebKit::WebView::onWheelEvent):
3396
3397 2010-10-25  Sam Weinig  <sam@webkit.org>
3398
3399         Reviewed by Dan Bernstein.
3400
3401         cancelledError for WebKit2 on windows should use kCFErrorDomainCFNetwork instead of webKitErrorDomain
3402         https://bugs.webkit.org/show_bug.cgi?id=48254
3403
3404         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
3405         (WebKit::cancelledError): Use kCFErrorDomainCFNetwork instead of webKitErrorDomain and switch over
3406         to using kCFURLErrorCancelled instead of a hard coded constant.
3407
3408 2010-10-25  Sam Weinig  <sam@webkit.org>
3409
3410         Reviewed by Anders Carlsson.
3411
3412         Need WebKit2 API to figure out if a frame can provide source
3413         <rdar://problem/8424632>
3414         https://bugs.webkit.org/show_bug.cgi?id=48252
3415
3416         * UIProcess/API/C/WKFrame.cpp:
3417         (WKFrameCanProvideSource):
3418         * UIProcess/API/C/WKFrame.h:
3419         * UIProcess/WebFrameProxy.cpp:
3420         (WebKit::WebFrameProxy::canProvideSource):
3421         * UIProcess/WebFrameProxy.h:
3422         Add API to figure out if a frame can provide source based on its
3423         MIME type.
3424
3425 2010-10-25  Anders Carlsson  <andersca@apple.com>
3426
3427         Reviewed by Dan Bernstein.
3428
3429         Java applets don't display on the page
3430         https://bugs.webkit.org/show_bug.cgi?id=48251
3431         <rdar://problem/8483759>
3432
3433         Add WKPreferencesSetJavaEnabled and initialize it to true by default, matching old WebKit.
3434
3435         * Shared/WebPreferencesStore.cpp:
3436         (WebKit::WebPreferencesStore::WebPreferencesStore):
3437         Initialize javaEnabled.
3438
3439         (WebKit::WebPreferencesStore::encode):
3440         Encode javaEnabled.
3441
3442         (WebKit::WebPreferencesStore::decode):
3443         Decode javaEnabled.
3444
3445         * Shared/WebPreferencesStore.h:
3446         Add javaEnabled.
3447
3448         * UIProcess/API/C/WKPreferences.cpp:
3449         (WKPReferencesSetJavaEnabled):
3450         (WKPReferencesGetJavaEnabled):
3451         Call the WebPreferences functions.
3452
3453         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3454         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
3455         Just call createPlugin.
3456
3457         * WebProcess/WebPage/WebPage.cpp:
3458         (WebKit::WebPage::updatePreferences):
3459         Call Settings::setJavaEnabled.
3460
3461 2010-10-25  Patrick Gansterer  <paroga@webkit.org>
3462
3463         Reviewed by David Kilzer.
3464
3465         Replace _countof with WTF_ARRAY_LENGTH
3466         https://bugs.webkit.org/show_bug.cgi?id=48229
3467
3468         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3469         (WebKit::ProcessLauncher::launchProcess):
3470         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3471         (WebKit::safariPluginsDirectory):
3472         (WebKit::addMozillaPluginDirectories):
3473         (WebKit::addWindowsMediaPlayerPluginDirectory):
3474         (WebKit::addAdobeAcrobatPluginDirectory):
3475         (WebKit::addMacromediaPluginDirectories):
3476         (WebKit::addPluginPathsFromRegistry):
3477         * WebProcess/WebPage/win/WebPageWin.cpp:
3478         (WebKit::WebPage::interpretKeyEvent):
3479
3480 2010-10-25  Adam Roben  <aroben@apple.com>
3481
3482         Stop copying .messages.in files into WebKit2's framework bundle
3483
3484         Fixes <http://webkit.org/b/48232> Several .messages.in files end up in
3485         WebKit2's framework bundle
3486
3487         Reviewed by Dan Bernstein.
3488
3489         * WebKit2.xcodeproj/project.pbxproj:
3490
3491 2010-10-25  Andras Becsi  <abecsi@webkit.org>
3492
3493         Reviewed by Csaba Osztrogonác.
3494
3495         [Qt] Fix the WebKit2 build after sheriffbot messed up the rollout patch.
3496         https://bugs.webkit.org/show_bug.cgi?id=48238
3497
3498         * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
3499         (WebKit::MappedMemory::mapSize):
3500         (WebKit::MappedMemory::markUsed):
3501         (WebKit::MappedMemory::markFree):
3502         (WebKit::MappedMemory::isFree):
3503         (WebKit::MappedMemory::data):
3504
3505 2010-10-25  Sheriff Bot  <webkit.review.bot@gmail.com>
3506
3507         Unreviewed, rolling out r70450.
3508         http://trac.webkit.org/changeset/70450
3509         https://bugs.webkit.org/show_bug.cgi?id=48238
3510
3511         Causes WTR to crash on tests which use SharedMemory.
3512         (Requested by bbandix on #webkit).
3513
3514         * Platform/SharedMemory.h:
3515         * Platform/qt/MappedMemoryPool.cpp: Removed.
3516         * Platform/qt/SharedMemoryQt.cpp:
3517         (WebKit::SharedMemory::Handle::Handle):
3518         (WebKit::SharedMemory::Handle::~Handle):
3519         (WebKit::SharedMemory::Handle::encode):
3520         (WebKit::SharedMemory::Handle::decode):
3521         (WebKit::SharedMemory::create):
3522         (WebKit::SharedMemory::~SharedMemory):
3523         (WebKit::SharedMemory::createHandle):
3524         (WebKit::SharedMemory::systemPageSize):
3525         * Shared/qt/MappedMemory.h: Renamed from WebKit2/Platform/qt/MappedMemoryPool.h.
3526         (WebKit::MappedMemory::mapSize):
3527         (WebKit::MappedMemory::markUsed):
3528         (WebKit::MappedMemory::markFree):
3529         (WebKit::MappedMemory::isFree):
3530         (WebKit::MappedMemory::data):
3531         * Shared/qt/MappedMemoryPool.cpp: Added.
3532         (WebKit::MappedMemoryPool::MappedMemoryPool):
3533         (WebKit::MappedMemoryPool::instance):
3534         (WebKit::MappedMemoryPool::size):
3535         (WebKit::MappedMemoryPool::at):
3536         (WebKit::MappedMemoryPool::append):
3537         (WebKit::MappedMemoryPool::cleanUp):
3538         * Shared/qt/UpdateChunk.cpp:
3539         (WebKit::mapMemory):
3540         (WebKit::mapFile):
3541         (WebKit::UpdateChunk::UpdateChunk):
3542         (WebKit::UpdateChunk::decode):
3543         * Shared/qt/UpdateChunk.h:
3544         * WebKit2.pro:
3545
3546 2010-10-25  Zoltan Horvath  <zoltan@webkit.org>
3547
3548         Reviewed by Kenneth Rohde Christiansen.
3549
3550         [Qt] Implement SharedMemory for WebKit2
3551         https://bugs.webkit.org/show_bug.cgi?id=47345
3552
3553         Implement unimplemented functions in SharedMemoryQt.cpp.
3554         Rename MappedMemory.h to MappedMemoryPool.h, move MappedMemoryPool.{h|cpp} from
3555         Shared/qt to Platform/qt. Modify affected lines of WebKit2.pro.
3556         Move MappedMemory implementation into MappedMemoryPool. Remove unnecessary 
3557         methods of MappedMemoryPool.
3558
3559         * Platform/SharedMemory.h: Add a handle member for Qt.
3560         * Platform/qt/MappedMemoryPool.cpp: Copied from WebKit2/Shared/qt/MappedMemoryPool.cpp.
3561         (WebKit::MappedMemoryPool::searchForMappedMemory):
3562         (WebKit::MappedMemoryPool::mapMemory):
3563         (WebKit::MappedMemoryPool::mapFile):
3564         * Platform/qt/MappedMemoryPool.h: Copied from WebKit2/Shared/qt/MappedMemory.h.
3565         (WebKit::MappedMemoryPool::MappedMemory::mapSize):
3566         (WebKit::MappedMemoryPool::MappedMemory::markUsed):
3567         (WebKit::MappedMemoryPool::MappedMemory::markFree):
3568         (WebKit::MappedMemoryPool::MappedMemory::isFree):
3569         (WebKit::MappedMemoryPool::MappedMemory::data):
3570         (WebKit::MappedMemoryPool::MappedMemoryPool):
3571         Move MappedMemory implementation into MappedMemoryPool.
3572         * Platform/qt/SharedMemoryQt.cpp:
3573         (WebKit::SharedMemory::Handle::Handle): Implement.
3574         (WebKit::SharedMemory::Handle::~Handle):
3575         (WebKit::SharedMemory::Handle::isNull): Implement.
3576         (WebKit::SharedMemory::Handle::encode): Implement.
3577         (WebKit::SharedMemory::Handle::decode): Implement.
3578         (WebKit::SharedMemory::create): Implement.
3579         (WebKit::mapProtection): Added.
3580         (WebKit::SharedMemory::~SharedMemory): Implement.
3581         (WebKit::SharedMemory::createHandle): Implement.
3582         (WebKit::SharedMemory::systemPageSize): Implement.
3583         * Shared/qt/MappedMemory.h: Removed.
3584         * Shared/qt/MappedMemoryPool.cpp: Removed.
3585         * Shared/qt/UpdateChunk.cpp:
3586         (WebKit::UpdateChunk::UpdateChunk):
3587         (WebKit::UpdateChunk::decode):
3588         Modify to use MappedMemoryPool.
3589         * Shared/qt/UpdateChunk.h:
3590         * WebKit2.pro:
3591         Modify affected lines.
3592
3593 2010-10-24  Sam Weinig  <sam@webkit.org>
3594
3595         Reviewed by Dan Bernstein.
3596
3597         Need a way to determine the screen rect for a form control in WebKit2
3598         <rdar://problem/8530670>
3599         https://bugs.webkit.org/show_bug.cgi?id=48216
3600
3601         * Shared/API/c/WKSharedAPICast.h:
3602         (WebKit::toAPI):
3603         Add conversion from IntRect to WKRect.
3604
3605         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3606         (WKBundleNodeHandleGetElementBounds):
3607         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3608         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3609         (WebKit::InjectedBundleNodeHandle::elementBounds):
3610         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3611         Add SPI to get the rect in window space. The client can then convert this to screen
3612         space if they wish to.
3613
3614 2010-10-23  Xan Lopez  <xlopez@igalia.com>
3615
3616         Reviewed by Sam Weinig.
3617
3618         Unify globalData APIs
3619         https://bugs.webkit.org/show_bug.cgi?id=47969
3620
3621         Adapt code to JSGlobalObject::globalData returning a reference
3622         instead of a pointer.
3623
3624         * WebProcess/Plugins/NPRuntimeObjectMap.cpp:
3625         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3626         (WebKit::NPRuntimeObjectMap::evaluate):
3627
3628 2010-10-23  Alexey Proskuryakov  <ap@apple.com>
3629
3630         Reviewed by Anders Carlsson.
3631
3632         https://bugs.webkit.org/show_bug.cgi?id=48083
3633         <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
3634
3635         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
3636         Initialize the new method.
3637
3638 2010-10-21  Timothy Hatcher  <timothy@apple.com>
3639
3640         Stub out WebInspectorFrontendClient.
3641
3642         https://bugs.webkit.org/show_bug.cgi?id=48091
3643
3644         Reviewed by Adam Roben.
3645
3646         * WebKit2.pro: Added WebInspectorFrontendClient.{cpp,h}.
3647         * WebKit2.xcodeproj/project.pbxproj: Added WebInspectorFrontendClient.{cpp,h}.
3648         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Added.
3649         (WebKit::WebInspectorFrontendClient::windowObjectCleared): Added.
3650         (WebKit::WebInspectorFrontendClient::frontendLoaded): Added.
3651         (WebKit::WebInspectorFrontendClient::moveWindowBy): Added.
3652         (WebKit::WebInspectorFrontendClient::localizedStringsURL): Added.
3653         (WebKit::WebInspectorFrontendClient::hiddenPanels): Added.