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