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