[Qt] Build files for the WTR's InjectedBundle
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-10-07  Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>, Andras Becsi  <abecsi@webkit.org>, Balazs Kelemen  <kbalazs@webkit.org>
2
3         Reviewed by Kenneth Rohde Christiansen.
4
5         [Qt] Add WTR's InjectedBundle build files.
6         https://bugs.webkit.org/show_bug.cgi?id=47333
7
8         * WebKit2.pro:
9
10 2010-10-07  Luiz Agostini  <luiz.agostini@openbossa.org>
11
12         Reviewed by Kenneth Rohde Christiansen.
13
14         Some viewport meta tag api refactoring
15         https://bugs.webkit.org/show_bug.cgi?id=47334
16
17         WebCore::findConfigurationForViewportData renamed to computeViewportAttributes.
18         WebCore::ViewportAttributes::layoutViewport renamed to layoutSize.
19
20         * UIProcess/API/qt/qwkpage.cpp:
21         (QWKPage::viewportConfigurationForSize):
22
23 2010-10-06  Jessie Berlin  <jberlin@apple.com>
24
25         Reviewed by John Sullivan.
26
27         Bundle should expose a reportException method.
28         https://bugs.webkit.org/show_bug.cgi?id=46769
29
30         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
31         (WKBundleReportException):
32         * WebProcess/InjectedBundle/API/c/WKBundle.h:
33
34         * WebProcess/InjectedBundle/InjectedBundle.cpp:
35         (WebKit::InjectedBundle::reportException):
36         Mimic the behavior of WebView::reportException.
37         * WebProcess/InjectedBundle/InjectedBundle.h:
38
39 2010-10-07  Luiz Agostini  <luiz.agostini@openbossa.org>
40
41         Reviewed by Adam Roben.
42
43         [Qt] Webkit2 MacOS build fix
44         https://bugs.webkit.org/show_bug.cgi?id=47167
45
46         There were two problems when building Qt WebKit2 in Mac. The first was that
47         ld does not support flag -whole-archive and it needed to be replaced by flag -all_load.
48         The second problem was that __APPLE__ is been used to identify safari builds and, when
49         building Qt in MacOS, Qt was ending up using the wrong typedef. The solution was to use
50         a Qt specific WKNativeEvent.h that only has the proper Qt typedef instead of the original one.
51
52         * UIProcess/API/C/qt/WKNativeEvent.h: Added.
53         * WebKit2.pri:
54         * WebKit2.pro:
55
56 2010-10-07  Balazs Kelemen  <kbalazs@webkit.org>
57
58         Reviewed by Kenneth Rohde Christiansen.
59
60         WebKitTestRunner should be portable
61         https://bugs.webkit.org/show_bug.cgi?id=45393
62
63         Introducing additional URL API.
64         * Shared/API/c/WKURL.cpp:
65         (WKURLCreateWithUTF8CString):
66         (WKURLIsEqual):
67         * Shared/API/c/WKURL.h:
68
69 2010-10-06  Balazs Kelemen  <kbalazs@webkit.org>
70
71         Reviewed by Kenneth Rohde Christiansen.
72
73         [Qt] Add WebKitTestRunner's build files
74         https://bugs.webkit.org/show_bug.cgi?id=44155
75
76         * DerivedSources.pro: Changes according the new location
77         of generate-forwarding-headers.pl.
78         * UIProcess/API/C/WebKit2.h: Do not check the value of the
79         __APPLE__ define if it is not defined.
80         * WebKit2.pro: Changes according the new location
81         of generate-forwarding-headers.pl. Added missing files
82         to the build that provides API that is used by WTR.
83         * generate-forwarding-headers.pl: Moved to WebKitTools/Scripts
84         since from now this is not only used by WebKit2.
85
86 2010-10-06  Anders Carlsson  <andersca@apple.com>
87
88         Reviewed by Sam Weinig.
89
90         Separate actually calling the member function from decoding/encoding arguments
91         and remove any ambiguities when calling the function.
92
93         * Platform/CoreIPC/Arguments.h:
94         * Platform/CoreIPC/HandleMessage.h:
95         (CoreIPC::callMemberFunction):
96         (CoreIPC::handleMessage):
97
98 2010-10-06  Anders Carlsson  <andersca@apple.com>
99
100         Reviewed by Sam Weinig.
101
102         More Arguments.h cleanup.
103
104         * Platform/CoreIPC/Arguments.h:
105         * Platform/CoreIPC/HandleMessage.h:
106         Remove unnecessary typedefs, simplify.
107
108         * Scripts/webkit2/messages.py:
109         * UIProcess/WebContext.h:
110         Fix clang++ build.
111
112 2010-10-06  Anders Carlsson  <andersca@apple.com>
113
114         Reviewed by Sam Weinig.
115
116         Start cleaning up Arguments.h
117         https://bugs.webkit.org/show_bug.cgi?id=47304
118
119         This is a first step towards simplifying all the handleMessage overloads we have.
120
121         * Platform/CoreIPC/Arguments.h:
122         (CoreIPC::Arguments1):
123         Make Arguments1 a struct and get rid of the FirstArgumentType typedef. Instead, add a
124         ValueType typedef which is defined to an Arguments1 type whose type parameter is not
125         a reference type.
126
127         * Platform/CoreIPC/HandleMessage.h:
128         (CoreIPC::handleMessage):
129         Update for the Arguments1 change. Rename "arguments" to "argumentDecoder" and "reply" to
130         "replyEncoder".
131
132 2010-10-06  Andras Becsi  <abecsi@webkit.org>
133
134         Reviewed by Kenneth Rohde Christiansen.
135
136         [Qt] Fix the build after API changes introduced in r69214.
137
138         * UIProcess/API/cpp/qt/WKStringQt.cpp:
139         (WKStringCreateWithQString):
140         * UIProcess/API/cpp/qt/WKURLQt.cpp:
141         (WKURLCreateWithQUrl):
142
143 2010-10-06  Sheriff Bot  <webkit.review.bot@gmail.com>
144
145         Unreviewed, rolling out r69210.
146         http://trac.webkit.org/changeset/69210
147         https://bugs.webkit.org/show_bug.cgi?id=47297
148
149         This patch broke Windows (Requested by andersca on #webkit).
150
151         * DerivedSources.make:
152         * DerivedSources.pro:
153         * Platform/CoreIPC/Arguments.h:
154         * Platform/CoreIPC/HandleMessage.h:
155         (CoreIPC::handleMessage):
156         * Scripts/webkit2/messages.py:
157         * Scripts/webkit2/messages_unittest.py:
158         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added.
159         * Shared/StringPairVector.h: Removed.
160         * UIProcess/API/mac/PageClientImpl.h:
161         * UIProcess/API/mac/PageClientImpl.mm:
162         (WebKit::PageClientImpl::registerEditCommand):
163         * UIProcess/API/qt/qwkpage.cpp:
164         (QWKPagePrivate::registerEditCommand):
165         * UIProcess/API/qt/qwkpage_p.h:
166         * UIProcess/PageClient.h:
167         * UIProcess/WebEditCommandProxy.cpp:
168         (WebKit::WebEditCommandProxy::unapply):
169         (WebKit::WebEditCommandProxy::reapply):
170         * UIProcess/WebFormClient.cpp:
171         (WebKit::WebFormClient::willSubmitForm):
172         * UIProcess/WebFormClient.h:
173         * UIProcess/WebPageProxy.cpp:
174         (WebKit::WebPageProxy::didReceiveMessage):
175         (WebKit::WebPageProxy::didReceiveSyncMessage):
176         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
177         (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
178         (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
179         (WebKit::WebPageProxy::didCommitLoadForFrame):
180         (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
181         (WebKit::WebPageProxy::didFinishLoadForFrame):
182         (WebKit::WebPageProxy::didFailLoadForFrame):
183         (WebKit::WebPageProxy::didReceiveTitleForFrame):
184         (WebKit::WebPageProxy::didFirstLayoutForFrame):
185         (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
186         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
187         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
188         (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
189         (WebKit::WebPageProxy::decidePolicyForMIMEType):
190         (WebKit::WebPageProxy::willSubmitForm):
191         (WebKit::WebPageProxy::createNewPage):
192         (WebKit::WebPageProxy::runJavaScriptAlert):
193         (WebKit::WebPageProxy::runJavaScriptConfirm):
194         (WebKit::WebPageProxy::runJavaScriptPrompt):
195         (WebKit::WebPageProxy::mouseDidMoveOverElement):
196         (WebKit::WebPageProxy::contentsSizeChanged):
197         (WebKit::WebPageProxy::addItemToBackForwardList):
198         (WebKit::WebPageProxy::goToItemInBackForwardList):
199         (WebKit::WebPageProxy::registerEditCommandForUndo):
200         (WebKit::WebPageProxy::registerEditCommandForRedo):
201         (WebKit::WebPageProxy::didReceiveEvent):
202         (WebKit::WebPageProxy::didChangeAcceleratedCompositing):
203         * UIProcess/WebPageProxy.h:
204         * UIProcess/WebPageProxy.messages.in: Removed.
205         * UIProcess/win/WebView.cpp:
206         (WebKit::WebView::registerEditCommand):
207         * UIProcess/win/WebView.h:
208         * WebKit2.pro:
209         * WebKit2.xcodeproj/project.pbxproj:
210         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
211         (WebKit::WebChromeClient::setWindowRect):
212         (WebKit::WebChromeClient::takeFocus):
213         (WebKit::WebChromeClient::createWindow):
214         (WebKit::WebChromeClient::runJavaScriptAlert):
215         (WebKit::WebChromeClient::runJavaScriptConfirm):
216         (WebKit::WebChromeClient::runJavaScriptPrompt):
217         (WebKit::WebChromeClient::setStatusbarText):
218         (WebKit::WebChromeClient::contentsSizeChanged):
219         (WebKit::WebChromeClient::mouseDidMoveOverElement):
220         (WebKit::WebChromeClient::setToolTip):
221         (WebKit::WebChromeClient::setCursor):
222         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
223         (WebKit::WebEditorClient::registerCommandForUndo):
224         (WebKit::WebEditorClient::clearUndoRedoOperations):
225         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
226         (WebKit::WebFrameLoaderClient::detachedFromParent2):
227         (WebKit::WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
228         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
229         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
230         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
231         (WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
232         (WebKit::WebFrameLoaderClient::dispatchDidFailLoad):
233         (WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
234         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad):
235         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout):
236         (WebKit::WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
237         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
238         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
239         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
240         (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
241         (WebKit::WebFrameLoaderClient::postProgressStartedNotification):
242         (WebKit::WebFrameLoaderClient::postProgressEstimateChangedNotification):
243         (WebKit::WebFrameLoaderClient::postProgressFinishedNotification):
244         (WebKit::WebFrameLoaderClient::createFrame):
245         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
246         (WebKit::WebBackForwardListProxy::addItem):
247         (WebKit::WebBackForwardListProxy::goToItem):
248         (WebKit::WebBackForwardListProxy::backItem):
249         (WebKit::WebBackForwardListProxy::currentItem):
250         (WebKit::WebBackForwardListProxy::forwardItem):
251         (WebKit::WebBackForwardListProxy::itemAtIndex):
252         (WebKit::WebBackForwardListProxy::backListCount):
253         (WebKit::WebBackForwardListProxy::forwardListCount):
254         * WebProcess/WebPage/WebPage.cpp:
255         (WebKit::WebPage::WebPage):
256         (WebKit::WebPage::changeAcceleratedCompositingMode):
257         (WebKit::WebPage::enterAcceleratedCompositingMode):
258         (WebKit::WebPage::sendClose):
259         (WebKit::WebPage::mouseEvent):
260         (WebKit::WebPage::wheelEvent):
261         (WebKit::WebPage::keyEvent):
262         (WebKit::WebPage::validateMenuItem):
263         (WebKit::WebPage::touchEvent):
264         (WebKit::WebPage::show):
265         (WebKit::WebPage::runJavaScriptInMainFrame):
266         (WebKit::WebPage::getRenderTreeExternalRepresentation):
267         (WebKit::WebPage::getSourceForFrame):
268         * win/WebKit2.vcproj:
269
270 2010-10-06  Jessie Berlin  <jberlin@apple.com>
271
272         Rubber-stamped by Dan Bernstein.
273
274         WKSerializedScriptValue.h needs to be copied over into the WEBKITOUTPUTDIR on Windows.
275         https://bugs.webkit.org/show_bug.cgi?id=47287
276
277         * win/WebKit2Generated.make:
278         Copy WKSerializedScriptValue.h into $(WEBKITOUTPUTDIR)\include\WebKit2.
279
280 2010-10-06  Anders Carlsson  <andersca@apple.com>
281
282         Reviewed by Sam Weinig.
283
284         Rename toRef/toWK to toAPI/toImpl
285         https://bugs.webkit.org/show_bug.cgi?id=47281
286
287         * Shared/API/c/WKArray.cpp:
288         * Shared/API/c/WKCertificateInfo.cpp:
289         * Shared/API/c/WKData.cpp:
290         * Shared/API/c/WKDictionary.cpp:
291         * Shared/API/c/WKError.cpp:
292         * Shared/API/c/WKMutableArray.cpp:
293         * Shared/API/c/WKMutableDictionary.cpp:
294         * Shared/API/c/WKNumber.cpp:
295         * Shared/API/c/WKSerializedScriptValue.cpp:
296         * Shared/API/c/WKSharedAPICast.h:
297         * Shared/API/c/WKString.cpp:
298         * Shared/API/c/WKType.cpp:
299         * Shared/API/c/WKURL.cpp:
300         * Shared/API/c/WKURLRequest.cpp:
301         * Shared/API/c/WKURLResponse.cpp:
302         * Shared/API/c/cf/WKStringCF.cpp:
303         * Shared/API/c/cf/WKURLCF.cpp:
304         * Shared/API/c/cf/WKURLRequestCF.cpp:
305         * Shared/API/c/cf/WKURLResponseCF.cpp:
306         * Shared/API/c/mac/WKCertificateInfoMac.mm:
307         * Shared/API/c/mac/WKURLRequestNS.mm:
308         * Shared/API/c/mac/WKURLResponseNS.mm:
309         * Shared/API/c/win/WKCertificateInfoWin.cpp:
310         * UIProcess/API/C/WKAPICast.h:
311         * UIProcess/API/C/WKBackForwardList.cpp:
312         * UIProcess/API/C/WKBackForwardListItem.cpp:
313         * UIProcess/API/C/WKContext.cpp:
314         * UIProcess/API/C/WKFormSubmissionListener.cpp:
315         * UIProcess/API/C/WKFrame.cpp:
316         * UIProcess/API/C/WKFramePolicyListener.cpp:
317         * UIProcess/API/C/WKNavigationData.cpp:
318         * UIProcess/API/C/WKPage.cpp:
319         * UIProcess/API/C/WKPageNamespace.cpp:
320         * UIProcess/API/C/WKPreferences.cpp:
321         * UIProcess/API/C/WKPreferencesPrivate.cpp:
322         * UIProcess/API/C/win/WKContextWin.cpp:
323         * UIProcess/API/C/win/WKView.cpp:
324         * UIProcess/API/cpp/qt/WKStringQt.cpp:
325         * UIProcess/API/cpp/qt/WKURLQt.cpp:
326         * UIProcess/API/mac/PageClientImpl.mm:
327         * UIProcess/API/mac/WKView.mm:
328         * UIProcess/API/qt/ClientImpl.cpp:
329         * UIProcess/API/qt/qwkpage.cpp:
330         * UIProcess/GenericCallback.h:
331         * UIProcess/WebContextInjectedBundleClient.cpp:
332         * UIProcess/WebFormClient.cpp:
333         * UIProcess/WebHistoryClient.cpp:
334         * UIProcess/WebLoaderClient.cpp:
335         * UIProcess/WebPolicyClient.cpp:
336         * UIProcess/WebUIClient.cpp:
337         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
338         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
339         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
340         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
341         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
342         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
343         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
344         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
345         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
346         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
347         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
348         * WebProcess/InjectedBundle/InjectedBundle.cpp:
349         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
350         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
351         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
352         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
353         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
354         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
355         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
356
357 2010-10-06  Luiz Agostini  <luiz.agostini@openbossa.org>
358
359         Reviewed by Kenneth Rohde Christiansen.
360
361         Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
362         https://bugs.webkit.org/show_bug.cgi?id=47268
363
364         Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
365
366         * UIProcess/API/qt/qwkpage.cpp:
367         (QWKPage::viewportConfigurationForSize):
368
369 2010-10-06  Sam Weinig  <sam@webkit.org>
370
371         Reviewed by Adam Roben.
372
373         Generate the messages sent to the WebPageProxy
374         https://bugs.webkit.org/show_bug.cgi?id=47239
375
376         * Platform/CoreIPC/Arguments.h:
377         Add additional typedefs.
378
379         * Platform/CoreIPC/HandleMessage.h:
380         (CoreIPC::handleMessage):
381         Add more handleMessage implementations.
382
383         * Scripts/webkit2/messages.py:
384         * Scripts/webkit2/messages_unittest.py:
385         Add headers for reply argument types.
386
387         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Removed.
388
389         * Shared/StringPairVector.h: Added.
390         This file is a hack to work around a deficiency in the generator
391         which can't deal with class templates with more than one argument.
392
393         * UIProcess/API/mac/PageClientImpl.h:
394         * UIProcess/API/mac/PageClientImpl.mm:
395         * UIProcess/API/qt/qwkpage.cpp:
396         * UIProcess/API/qt/qwkpage_p.h:
397         * UIProcess/PageClient.h:
398         * UIProcess/WebEditCommandProxy.cpp:
399         * UIProcess/WebFormClient.cpp:
400         * UIProcess/WebFormClient.h:
401         * UIProcess/WebPageProxy.cpp:
402         * UIProcess/WebPageProxy.h:
403         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
404         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
405         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
406         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
407         * WebProcess/WebPage/WebPage.cpp:
408         Migrate to generated calls.
409
410         * UIProcess/WebPageProxy.messages.in: Added.
411         New messages definitions file.
412
413         * DerivedSources.make:
414         * DerivedSources.pro:
415         * win/WebKit2.vcproj:
416         * WebKit2.pro:
417         * WebKit2.xcodeproj/project.pbxproj:
418         Add new files.
419
420 2010-10-05  Anders Carlsson  <andersca@apple.com>
421
422         Reviewed by Sam Weinig.
423
424         Send null events and mouse events
425         https://bugs.webkit.org/show_bug.cgi?id=47223
426
427         * WebKit2.xcodeproj/project.pbxproj:
428         Add "-Wno-deprecated-declarations" to the COMPILER_FLAGS for NetscapePluginMac.mm since
429         we call Button() which is deprecated.
430
431         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
432         (WebKit::NetscapePlugin::NetscapePlugin):
433         Initialize the null event timer.
434
435         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
436         (WebKit::NetscapePlugin::platformPostInitialize):
437         Start the null event timer.
438
439         (WebKit::NetscapePlugin::platformDestroy):
440         Stop the null event timer.
441
442         (WebKit::NetscapePlugin::platformHandleMouseEvent):
443         Initialize the event record and call NPP_HandleEvent.
444
445         (WebKit::NetscapePlugin::nullEventTimerFired):
446         Send a null event with the current mouse position.
447
448 2010-10-05  Anders Carlsson  <andersca@apple.com>
449
450         Reviewed by Sam Weinig.
451
452         Start sending Carbon plug-in events in th Carbon event model
453         https://bugs.webkit.org/show_bug.cgi?id=47209
454         <rdar://problem/8515677>
455
456         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
457         (WebKit::NetscapePlugin::NetscapePlugin):
458         Initialize the NP_CGContext struct.
459
460         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
461         (WebKit::NetscapePlugin::platformPostInitialize):
462         Create a fake Carbon window.
463
464         (WebKit::NetscapePlugin::platformDestroy):
465         Destroy the Carbon window.
466
467         (WebKit::modifiersForEvent):
468         Given a WebEvent, return the EventRecord modifiers.
469
470         (WebKit::NetscapePlugin::platformPaint):
471         (WebKit::NetscapePlugin::platformHandleMouseEvent):
472         (WebKit::NetscapePlugin::platformHandleWheelEvent):
473         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
474         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
475         (WebKit::NetscapePlugin::platformSetFocus):
476         (WebKit::NetscapePlugin::windowFocusChanged):
477         Create Carbon EventRecords and call NPP_HandleEvent.
478
479 2010-10-05  Sam Weinig  <sam@webkit.org>
480
481         Reviewed by Mark Rowe.
482
483         Add MIMEType accessor to WKFrame
484         <rdar://problem/8347683>
485         https://bugs.webkit.org/show_bug.cgi?id=47138
486
487         Tests: WebKit2/FrameMIMETypePNG
488                WebKit2/FrameMIMETypeHTML
489
490         * UIProcess/API/C/WKFrame.cpp:
491         (WKFrameCopyMIMEType):
492         * UIProcess/API/C/WKFrame.h:
493         * UIProcess/WebFrameProxy.h:
494         (WebKit::WebFrameProxy::setMIMEType):
495         (WebKit::WebFrameProxy::mimeType):
496         * UIProcess/WebPageProxy.cpp:
497         (WebKit::WebPageProxy::didReceiveMessage):
498         (WebKit::WebPageProxy::didCommitLoadForFrame):
499         * UIProcess/WebPageProxy.h:
500         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
501         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
502
503 2010-10-05  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
504
505         Reviewed by Kenneth Rohde Christiansen.
506
507         Implement API call for setting custom user agent
508         (QWKPage::setCustomUserAgent)
509
510         [Qt] Ability to set custom userAgent for WebKit2/WebKit
511         https://bugs.webkit.org/show_bug.cgi?id=44265
512
513         * UIProcess/API/qt/qwkpage.cpp:
514         (QWKPage::setCustomUserAgent): Added.
515         * UIProcess/API/qt/qwkpage.h: Add setCustomUserAgent.
516
517 2010-10-05  Sheriff Bot  <webkit.review.bot@gmail.com>
518
519         Unreviewed, rolling out r69103.
520         http://trac.webkit.org/changeset/69103
521         https://bugs.webkit.org/show_bug.cgi?id=47177
522
523         Breaking Windows and Mac build. (Requested by lca on #webkit).
524
525         * UIProcess/API/C/WKNativeEvent.h:
526         * UIProcess/API/qt/qwkpage.cpp:
527         * UIProcess/API/qt/qwkpage.h:
528         * WebKit2.pri:
529
530 2010-10-05  Luiz Agostini  <luiz.agostini@openbossa.org>
531
532         Reviewed by Antti Koivisto.
533
534         [Qt] Webkit2 MacOS build fix
535         https://bugs.webkit.org/show_bug.cgi?id=47167
536
537         Qt WebKit2 MacOS build fix.
538
539         * UIProcess/API/C/WKNativeEvent.h:
540         * UIProcess/API/qt/qwkpage.cpp:
541         * UIProcess/API/qt/qwkpage.h:
542         * WebKit2.pri:
543
544 2010-10-04  Mark Rowe  <mrowe@apple.com>
545
546         Reviewed by Sam Weinig.
547
548         Fix the build when sandboxing is enabled.
549
550         * UIProcess/WebContext.cpp:
551         (WebKit::WebContext::ensureWebProcess):
552         * UIProcess/WebProcessProxy.cpp:
553
554 2010-10-04  Andras Becsi  <abecsi@webkit.org>
555
556         Reviewed Csaba Osztrogonác.
557
558         [Qt] Build fix after r69037.
559         Also remove dummy setUpAcceleratedCompositing() from the source file,
560         since it has been removed from the header.
561
562         * UIProcess/WebProcessProxy.cpp:
563
564 2010-10-04  Andras Becsi  <abecsi@webkit.org>
565
566         Rubber-stamped by Csaba Osztrogonác.
567
568         [Qt] Fix the WebKit2 build after r69029.
569
570         * DerivedSources.pro:
571
572 2010-10-04  Sam Weinig  <sam@webkit.org>
573
574         Reviewed by Anders Carlsson.
575
576         Change WebProcess initialization to be done with an
577         auxiliary struct.
578
579         * Platform/CoreIPC/mac/MachPort.h:
580         * Shared/WebProcessCreationParameters.cpp: Added.
581         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
582         (WebKit::WebProcessCreationParameters::encode):
583         (WebKit::WebProcessCreationParameters::decode):
584         * Shared/WebProcessCreationParameters.h: Added.
585         * UIProcess/WebContext.cpp:
586         (WebKit::WebContext::ensureWebProcess):
587         * UIProcess/WebContext.h:
588         * UIProcess/WebProcessProxy.cpp:
589         (WebKit::WebProcessProxy::WebProcessProxy):
590         * UIProcess/WebProcessProxy.h:
591         * UIProcess/mac/WebContextMac.mm:
592         (WebKit::WebContext::platformInitializeWebProcess):
593         * UIProcess/mac/WebProcessProxyMac.mm: Removed.
594         * UIProcess/qt/WebContextQt.cpp:
595         (WebKit::WebContext::applicationCacheDirectory):
596         (WebKit::WebContext::platformInitializeWebProcess):
597         * UIProcess/win/WebContextWin.cpp:
598         (WebKit::WebContext::platformInitializeWebProcess):
599         * WebKit2.pro:
600         * WebKit2.xcodeproj/project.pbxproj:
601         * WebProcess/WebProcess.cpp:
602         (WebKit::WebProcess::initializeWebProcess):
603         * WebProcess/WebProcess.h:
604         * WebProcess/WebProcess.messages.in:
605         * win/WebKit2.vcproj:
606
607 2010-10-04  Brent Fulgham  <bfulgham@webkit.org>
608
609         Unreviewed build fixes after r68260 and r68686.
610
611         * Platform/CoreIPC/DataReference.h: Add include directive for
612         <inttypes.h>, needed for WinCairo build.
613         * Shared/win/PlatformCertificateInfo.cpp:
614         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
615         Conditionalize logic specific to WebKitSystemInterface and
616         add a stub implementation for WinCairo.
617
618 2010-10-04  Sam Weinig  <sam@webkit.org>
619
620         Reviewed by Adam Roben.
621
622         Generate messages sent to the WebProcess class.
623         https://bugs.webkit.org/show_bug.cgi?id=47097
624
625         * DerivedSources.make:
626         Add new file to generate and new directory to search.
627
628         * Scripts/webkit2/messages.py:
629         (forward_declarations_and_headers): Special case class templates.
630         (headers_for_type): Special case Vector.
631         * Scripts/webkit2/messages_unittest.py:
632         Make this script work for passing a templated type.
633
634         * Shared/CoreIPCSupport/WebProcessMessageKinds.h: Removed.
635
636         * UIProcess/VisitedLinkProvider.cpp:
637         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
638         * UIProcess/WebContext.cpp:
639         (WebKit::WebContext::initializeHistoryClient):
640         (WebKit::WebContext::ensureWebProcess):
641         (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
642         (WebKit::WebContext::setCacheModel):
643         * UIProcess/WebPageProxy.cpp:
644         (WebKit::WebPageProxy::initializeWebPage):
645         (WebKit::WebPageProxy::reinitializeWebPage):
646         * UIProcess/WebProcessProxy.cpp:
647         (WebKit::WebProcessProxy::WebProcessProxy): Always pass both
648         the bundle path and a key, even if the key is null, which it will be for
649         all non-mac builds for now.
650         * UIProcess/mac/WebProcessProxyMac.mm:
651         (WebKit::WebProcessProxy::setUpAcceleratedCompositing):
652         * UIProcess/win/WebContextWin.cpp:
653         (WebKit::WebContext::setShouldPaintNativeControls):
654         (WebKit::WebContext::platformSetUpWebProcess):
655         Use the new syntax for sending the messages.
656
657         * WebProcess/WebProcess.cpp:
658         (WebKit::WebProcess::setShouldTrackVisitedLinks):
659         (WebKit::WebProcess::setCacheModel):
660         (WebKit::WebProcess::setupAcceleratedCompositingPort):
661         (WebKit::WebProcess::setShouldPaintNativeControls):
662         (WebKit::WebProcess::didReceiveMessage):
663         * WebProcess/WebProcess.h:
664         Convert to using generated didReceiveWebProcessMessage.
665
666         * WebProcess/WebProcess.messages.in: Added.
667
668         * WebKit2.pro:
669         * WebKit2.xcodeproj/project.pbxproj:
670         * win/WebKit2.vcproj:
671         Update projects.
672
673 2010-10-04  Sam Weinig  <sam@webkit.org>
674
675         Fix the Mac build.
676
677         * WebProcess/mac/WebProcessMac.mm:
678
679 2010-10-04  Sam Weinig  <sam@webkit.org>
680
681         Reviewed by Anders Carlsson.
682
683         Add ability to set the CacheModel in Webkit2
684         https://bugs.webkit.org/show_bug.cgi?id=47066
685
686         Add WKContext function to set the cache model for the context.
687
688         * Shared/CacheModel.h: Added.
689         * Shared/CoreIPCSupport/WebProcessMessageKinds.h:
690         * UIProcess/API/C/WKAPICast.h:
691         (WebKit::toCacheModel):
692         (WebKit::toRef):
693         * UIProcess/API/C/WKContext.cpp:
694         (WKContextSetCacheModel):
695         (WKContextGetCacheModel):
696         * UIProcess/API/C/WKContext.h:
697         * UIProcess/WebContext.cpp:
698         (WebKit::WebContext::WebContext):
699         (WebKit::WebContext::ensureWebProcess):
700         (WebKit::WebContext::setCacheModel):
701         * UIProcess/WebContext.h:
702         (WebKit::WebContext::cacheModel):
703         * WebKit2.pro:
704         * WebKit2.xcodeproj/project.pbxproj:
705         * WebProcess/WebProcess.cpp:
706         (WebKit::WebProcess::WebProcess):
707         (WebKit::WebProcess::setCacheModel):
708         (WebKit::WebProcess::didReceiveMessage):
709         * WebProcess/WebProcess.h:
710         * WebProcess/mac/WebProcessMac.mm: Added.
711         (WebKit::memorySize):
712         (WebKit::volumeFreeSize):
713         (WebKit::WebProcess::platformSetCacheModel):
714         * WebProcess/qt/WebProcessQt.cpp: Added.
715         (WebKit::WebProcess::platformSetCacheModel):
716         * WebProcess/win/WebProcessWin.cpp: Added.
717         (WebKit::WebProcess::platformSetCacheModel):
718         * win/WebKit2.vcproj:
719
720 2010-10-03  Anders Carlsson  <andersca@apple.com>
721
722         Reviewed by Sam Weinig.
723
724         Implement newly added Plugin/PluginController member functions for out of process plug-ins
725         https://bugs.webkit.org/show_bug.cgi?id=47065
726         <rdar://problem/8507194>
727
728         * Platform/CoreIPC/Arguments.h:
729         Add typedefs.
730
731         * Platform/CoreIPC/HandleMessage.h:
732         (CoreIPC::handleMessage):
733         Add new handleMessage overload.
734
735         * PluginProcess/PluginControllerProxy.cpp:
736         (WebKit::PluginControllerProxy::create):
737         Add an isPrivateBrowsingEnabled boolean.
738         
739         (WebKit::PluginControllerProxy::PluginControllerProxy):
740         Add an isPrivateBrowsingEnabled boolean.
741
742         (WebKit::PluginControllerProxy::proxiesForURL):
743         (WebKit::PluginControllerProxy::cookiesForURL):
744         (WebKit::PluginControllerProxy::setCookiesForURL):
745         Send messages to the web process.
746
747         (WebKit::PluginControllerProxy::isPrivateBrowsingEnabled):
748         Return whether private browsing is enabled or not.
749
750         (WebKit::PluginControllerProxy::handleKeyboardEvent):
751         Call Plugin::handleKeyboardEvent.
752
753         (WebKit::PluginControllerProxy::privateBrowsingStateChanged):
754         Call Plugin::privateBrowsingStateChanged.
755
756         * PluginProcess/PluginControllerProxy.messages.in:
757         Add new messages.
758
759         * PluginProcess/WebProcessConnection.cpp:
760         (WebKit::WebProcessConnection::createPlugin):
761         Pass the isPrivateBrowsingEnabled flag.
762
763         * PluginProcess/WebProcessConnection.h:
764         * PluginProcess/WebProcessConnection.messages.in:
765         Update CreatePlugin message parameters.
766
767         * WebProcess/Plugins/PluginProcessConnection.cpp:
768         (WebKit::PluginProcessConnection::didReceiveMessage):
769         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
770         It's OK for a plug-in to not get a sync message.
771
772         * WebProcess/Plugins/PluginProcessConnection.h:
773         * WebProcess/Plugins/PluginProxy.cpp:
774         (WebKit::PluginProxy::handleKeyboardEvent):
775         (WebKit::PluginProxy::privateBrowsingStateChanged):
776         Send messages.
777
778         (WebKit::PluginProxy::proxiesForURL):
779         (WebKit::PluginProxy::cookiesForURL):
780         (WebKit::PluginProxy::setCookiesForURL):
781         Call the plug-in controller.
782
783         * WebProcess/Plugins/PluginProxy.messages.in:
784         Add new messages.
785
786 2010-10-03  Anders Carlsson  <andersca@apple.com>
787
788         Reviewed by Sam Weinig.
789
790         Send keyboard events to plug-ins
791         https://bugs.webkit.org/show_bug.cgi?id=47064
792         <rdar://problem/8507148>
793
794         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
795         (WebKit::NetscapePlugin::handleKeyboardEvent):
796         Call platformHandleKeyboardEvent.
797
798         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
799         (WebKit::modifierFlags):
800         Return the modifier flags given a WebKeyboardEvent.
801
802         (WebKit::initializeKeyboardEvent):
803         Initialize an NPCocoaEvent from a WebKeyboardEvent.
804
805         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
806         Initialize the event and dispatch it using NPP_HandleEvent.
807
808         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
809         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
810         Add stub.
811
812         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
813         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
814         Add stub.
815         
816         * WebProcess/Plugins/Plugin.h:
817         Add handleKeyboardEvent.
818
819         * WebProcess/Plugins/PluginView.cpp:
820         (WebKit::PluginView::handleEvent):
821         Call Plugin::handleKeyboardEvent if we see a keydown or keyup event.
822
823 2010-10-01  Mark Rowe  <mrowe@apple.com>
824
825         Build fix.
826
827         Clear the executable bit from a number of source files.
828
829         * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h:
830
831 2010-10-01  Anders Carlsson  <andersca@apple.com>
832
833         Reviewed by Sam Weinig.
834
835         Plug-ins should have access to the private browsing state.
836         https://bugs.webkit.org/show_bug.cgi?id=47031
837         <rdar://problem/8505405>
838     
839         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
840         (WebKit::NPN_GetValue):
841         Handle NPNVprivateModeBool.
842
843         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
844         (WebKit::NetscapePlugin::isPrivateBrowsingEnabled):
845         Call PluginController::isPrivateBrowsingEnabled.
846
847         (WebKit::NetscapePlugin::NPP_SetValue):
848         Add NPP_SetValue wrapper.
849
850         (WebKit::NetscapePlugin::privateBrowsingStateChanged):
851         Call NPP_SetValue with the updated state.
852
853         * WebProcess/Plugins/Plugin.h:
854         Add privateBrowsingStateChanged pure virtual member function.
855
856         * WebProcess/Plugins/PluginController.h:
857         Add isPrivateBrowsingEnabled pure virtual member function.
858
859         * WebProcess/Plugins/PluginView.cpp:
860         (WebKit::PluginView::privateBrowsingStateChanged):
861         Call Plugin::privateBrowsingStateChanged.
862
863 2010-10-01  Sam Weinig  <sam@webkit.org>
864
865         Reviewed by Anders Carlsson.
866
867         Add SPI to convert a WKStringRef to a JSStringRef and vice-versa.
868
869         API Test: WebKit2/WKStringJSString
870
871         * Shared/API/c/WKString.cpp:
872         (WKStringCreateWithJSString):
873         (WKStringCopyJSString):
874         * Shared/API/c/WKStringPrivate.h: Added.
875         * Shared/WebString.h:
876         (WebKit::WebString::create):
877         (WebKit::WebString::createJSString):
878         * WebKit2.pro:
879         * WebKit2.xcodeproj/project.pbxproj:
880         * win/WebKit2.vcproj:
881         * win/WebKit2Generated.make:
882
883 2010-10-01  Anders Carlsson  <andersca@apple.com>
884
885         Reviewed by Sam Weinig.
886
887         Implement proxiesForURL, cookiesForURL and setCookiesForURL
888         https://bugs.webkit.org/show_bug.cgi?id=47029
889
890         * WebProcess/Plugins/PluginView.cpp:
891         (WebKit::PluginView::proxiesForURL):
892         (WebKit::PluginView::cookiesForURL):
893         (WebKit::PluginView::setCookiesForURL):
894
895 2010-10-01  Sam Weinig  <sam@webkit.org>
896
897         Reviewed by Kenneth Rohde Christiansen.
898
899         Add additional WKString API
900         https://bugs.webkit.org/show_bug.cgi?id=46958
901
902         API Test: WebKit2/WKString
903
904         * Shared/API/c/WKString.cpp:
905         (WKStringCreateWithUTF8CString):
906         (WKStringGetMaximumUTF8CStringSize):
907         (WKStringGetUTF8CString):
908         (WKStringIsEqual):
909         (WKStringIsEqualToUTF8CString):
910         * Shared/API/c/WKString.h:
911         * Shared/WebString.h:
912         (WebKit::WebString::createFromUTF8String):
913         (WebKit::WebString::maximumUTF8CStringSize):
914         (WebKit::WebString::getUTF8CString):
915         (WebKit::WebString::equal):
916         (WebKit::WebString::equalToUTF8String):
917
918 2010-10-01  Anders Carlsson  <andersca@apple.com>
919
920         Reviewed by Dan Bernstein.
921
922         Implement NPN_GetValueForURL/NPN_SetValueForURL and stub out PluginController functions
923         https://bugs.webkit.org/show_bug.cgi?id=46992
924
925         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
926         (WebKit::copyCString):
927         Helper function for allocating a string using NPN_MemAlloc.
928
929         (WebKit::NPN_GetValueForURL):
930         Ask the plug-in for either the proxy or the cookies given an URL.
931
932         (WebKit::NPN_SetValueForURL):
933         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
934         Tell the plug-in to set the cookies for the given URL.
935
936         (WebKit::NetscapePlugin::proxiesForURL):
937         (WebKit::NetscapePlugin::cookiesForURL):
938         (WebKit::NetscapePlugin::setCookiesForURL):
939         Call the corresponding PluginController functions.
940
941         * WebProcess/Plugins/PluginController.h:
942         Add new pure virtual member functions.
943
944         * WebProcess/Plugins/PluginView.cpp:
945         (WebKit::PluginView::proxiesForURL):
946         (WebKit::PluginView::cookiesForURL):
947         (WebKit::PluginView::setCookiesForURL):
948         Add stubbed out implementations of the new PluginController functions.
949
950         * WebProcess/Plugins/PluginView.h:
951
952 2010-10-01  Adam Roben  <aroben@apple.com>
953
954         Implement NPN_GetValue(NPNVnetscapeWindow)
955
956         Fixes <http://webkit.org/b/46726> <rdar://problem/8486319>
957         Right-clicking on windowless Flash plugin in WebKit2 makes a context
958         menu appear in the bottom-right corner of the screen
959
960         Test: platform/win/plugins/get-value-netscape-window.html
961
962         Reviewed by Anders Carlsson.
963
964         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
965         (WebKit::NPN_GetValue): Added case for NPNVnetscapeWindow that calls
966         through to NetscapePlugin::containingWindow.
967
968         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added containingWindow
969         on Windows.
970
971         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
972         (WebKit::NetscapePlugin::containingWindow): Added. Calls through to
973         the PluginController.
974         (WebKit::NetscapePlugin::platformPostInitialize): Changed to use
975         containingWindow.
976
977 2010-09-30  Simon Fraser  <simon.fraser@apple.com>
978
979         Reviewed by Darin Adler.
980
981         Background doesn't draw when entering accelerated compositing
982         https://bugs.webkit.org/show_bug.cgi?id=45848
983         
984         LayerBackedDrawingArea::setSize() is normally called in response
985         to a message from the UI process, so this can come some time after
986         LayerBackedDrawingArea creation. Depending on the timing, we could
987         end up being at size 0x0 for the first invalidate and paint, resulting
988         in missing content.
989         
990         The fix is to size the backing layer on creation, using the WebView's size.
991         
992         Also changed various calls to syncCompositingStateForThisLayerOnly()
993         to do lazy updates via scheduleCompositingLayerSync().
994         
995         Also add the fix for https://bugs.webkit.org/show_bug.cgi?id=46226 (r68028)
996         to the WebKit2 code, in scheduleUpdateLayoutRunLoopObserver().
997
998         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
999         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
1000         (WebKit::LayerBackedDrawingArea::setNeedsDisplay):
1001         (WebKit::LayerBackedDrawingArea::setSize):
1002         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1003         (WebKit::LayerBackedDrawingArea::platformInit):
1004         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
1005         (WebKit::LayerBackedDrawingArea::detachCompositingContext):
1006         (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
1007         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1008         (WebKit::LayerBackedDrawingArea::scheduleUpdateLayoutRunLoopObserver):
1009
1010 2010-09-29  Jon Honeycutt  <jhoneycutt@apple.com>
1011
1012         WebKit2 on Windows should use Windows fonts for the various standard
1013         font families
1014         https://bugs.webkit.org/show_bug.cgi?id=43499
1015         <rdar://problem/8272758>
1016
1017         Reviewed by Adam Roben.
1018
1019         * Shared/WebPreferencesStore.cpp:
1020         (WebKit::WebPreferencesStore::WebPreferencesStore):
1021         Use Windows fonts on Windows.
1022
1023 2010-09-30  Brady Eidson  <beidson@apple.com>
1024
1025         Reviewed by Sam Weinig.
1026
1027         https://bugs.webkit.org/show_bug.cgi?id=46774 - Add WKStringIsEqual API
1028
1029         * Shared/API/c/WKString.cpp:
1030         (WKStringIsEqual):
1031         * Shared/API/c/WKString.h:
1032
1033 2010-09-30  Anders Carlsson  <andersca@apple.com>
1034
1035         Reviewed by Adam Roben.
1036
1037         Forward declare structs with 'struct' in the message headers
1038         https://bugs.webkit.org/show_bug.cgi?id=46925
1039         <rdar://problem/8497940>
1040
1041         * Scripts/webkit2/messages.py:
1042         (struct_or_class): New function which given a type and a namespace returns the correct
1043         forward declaration syntax (struct or class).
1044
1045         * Scripts/webkit2/messages_unittest.py:
1046         Update expected results.
1047
1048 2010-09-30  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1049
1050         Reviewed by Antti Koivisto.
1051
1052         Original patch by Zalan Bujtas.
1053
1054         The m_readBuffer might be smaller than the incoming message size and
1055         thus result in memory corruption. Do a similar fix as the win port,
1056         resizing the m_readBuffer to have room for the message.
1057
1058         * Platform/CoreIPC/qt/ConnectionQt.cpp:
1059         (CoreIPC::Connection::readyReadHandler):
1060
1061 2010-09-29  Anders Carlsson  <andersca@apple.com>
1062
1063         Reviewed by Simon Fraser.
1064
1065         Calling Connection::send/sendSync from Connection::Client::didClose should always fail
1066         https://bugs.webkit.org/show_bug.cgi?id=46859
1067         <rdar://problem/8212583>
1068
1069         * Platform/CoreIPC/Connection.cpp:
1070         (CoreIPC::Connection::dispatchConnectionDidClose):
1071
1072 2010-09-29  Simon Fraser  <simon.fraser@apple.com>
1073
1074         Reviewed by Anders Carlsson.
1075
1076         Assertion then crash closing WebKit2 window with accelerated compositing in
1077         https://bugs.webkit.org/show_bug.cgi?id=46857
1078         
1079         Fix two issues when closing a WebKit2 window using accelerated
1080         compositing.
1081         
1082         The first is that the response to the sync DidChangeAcceleratedCompositing message
1083         sent by changeAcceleratedCompositingMode() may be empty, because the corresponding
1084         page may have been destroyed already in the UI process. In that case newDrawingAreaInfo
1085         is not filled in, so we get a DrawingArea::Type of None. Don't attempt to make a new
1086         drawing area in that case.
1087         
1088         We then have to null-check the drawing area in WebPage::didReceiveMessage(),
1089         in the case where the UI process is calling back with a SuspendPainting message,
1090         before our page has gone away.
1091         
1092         * WebProcess/WebPage/WebPage.cpp:
1093         (WebKit::WebPage::changeAcceleratedCompositingMode):
1094         (WebKit::WebPage::didReceiveMessage):
1095
1096 2010-09-29  Anders Carlsson  <andersca@apple.com>
1097
1098         Reviewed by Sam Weinig.
1099
1100         Implement more of PluginProxy and PLuginControllerProxy.
1101
1102         * Platform/CoreIPC/ArgumentDecoder.cpp:
1103         (CoreIPC::ArgumentDecoder::decodeBytes):
1104         * Platform/CoreIPC/ArgumentDecoder.h:
1105         Add new overload that takes a DataReference. Wrap the debug function in #ifndef NDEBUG.
1106
1107         * Platform/CoreIPC/ArgumentEncoder.cpp:
1108         * Platform/CoreIPC/ArgumentEncoder.h:
1109         Wrap the debug function in #ifndef NDEBUG.
1110
1111         * Platform/CoreIPC/Arguments.h:
1112         Add new typedefs.
1113         
1114         * Platform/CoreIPC/DataReference.cpp:
1115         * Platform/CoreIPC/DataReference.h:
1116         Add a DataReference class.
1117     
1118         * Platform/CoreIPC/HandleMessage.h:
1119         (CoreIPC::handleMessage):
1120         Add new overload.
1121
1122         * PluginProcess/PluginControllerProxy.cpp:
1123         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
1124         (WebKit::PluginControllerProxy::streamDidReceiveResponse):
1125         (WebKit::PluginControllerProxy::streamDidReceiveData):
1126         (WebKit::PluginControllerProxy::streamDidFinishLoading):
1127         (WebKit::PluginControllerProxy::streamDidFail):
1128         call Plugin member functions.
1129
1130         * PluginProcess/PluginControllerProxy.messages.in:
1131         Add new messages.
1132         
1133         * WebKit2.pro:
1134         * WebKit2.xcodeproj/project.pbxproj:
1135         * win/WebKit2.vcproj:
1136         Add DataReference.cpp and DataReference.h
1137
1138         * WebProcess/Plugins/PluginProxy.cpp:
1139         (WebKit::PluginProxy::didEvaluateJavaScript):
1140         (WebKit::PluginProxy::streamDidReceiveResponse):
1141         (WebKit::PluginProxy::streamDidReceiveData):
1142         (WebKit::PluginProxy::streamDidFinishLoading):
1143         (WebKit::PluginProxy::streamDidFail):
1144         Send messages.
1145
1146 2010-09-29  Anders Carlsson  <andersca@apple.com>
1147
1148         Update expected results.
1149
1150         * Scripts/webkit2/messages_unittest.py:
1151
1152 2010-09-29  Anders Carlsson  <andersca@apple.com>
1153
1154         Reviewed by Sam Weinig.
1155
1156         Implement LoadURL
1157         https://bugs.webkit.org/show_bug.cgi?id=46826
1158
1159         * Platform/CoreIPC/ArgumentCoders.h:
1160         Move String argument coder here from WebCoreArgumentCoders.h. Add
1161         argument coder for AtomicString.
1162
1163         * Platform/CoreIPC/Arguments.h:
1164         Add typedefs for Arguments7.
1165
1166         * Platform/CoreIPC/HandleMessage.h:
1167         (CoreIPC::handleMessage):
1168         Add handleMessage overload that takes 7 parameters.
1169
1170         * PluginProcess/PluginControllerProxy.cpp:
1171         (WebKit::PluginControllerProxy::loadURL):
1172         Send the LoadURL message.
1173
1174         * Scripts/webkit2/messages.py:
1175         (parse_parameter_string): Use rsplit in case the type name contains spaces.
1176         (argument_coder_headers_for_type): Special case Vector.
1177         
1178         * Scripts/webkit2/messages_unittest.py:
1179         Update results.
1180
1181         * Shared/WebCoreArgumentCoders.h:
1182         Add argument coder for HTTPHeaderMap.
1183
1184         * WebProcess/Plugins/PluginProxy.cpp:
1185         (WebKit::PluginProxy::loadURL):
1186         Ask the plug-in controller to load the URL.
1187
1188         * WebProcess/Plugins/PluginProxy.messages.in:
1189         Add LoadURL message.
1190
1191 2010-09-29  Anders Carlsson  <andersca@apple.com>
1192
1193         Reviewed by Sam Weinig.
1194
1195         Handle getting the user agent in the plug-in process
1196         https://bugs.webkit.org/show_bug.cgi?id=46819
1197
1198         * Platform/CoreIPC/HandleMessage.h:
1199         (CoreIPC::handleMessage):
1200         Add new handleMessage overload.
1201
1202         * PluginProcess/PluginControllerProxy.cpp:
1203         (WebKit::PluginControllerProxy::create):
1204         (WebKit::PluginControllerProxy::PluginControllerProxy):
1205         Pass the user agent to the plug-in controller proxy.
1206
1207         (WebKit::PluginControllerProxy::userAgent):
1208         Return the user agent.
1209
1210         * PluginProcess/WebProcessConnection.cpp:
1211         (WebKit::WebProcessConnection::createPlugin):
1212         Pass the user agent when creating the plug-in controller proxy.
1213
1214         * PluginProcess/WebProcessConnection.messages.in:
1215         Add userAgent.
1216
1217         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1218         (WebKit::NetscapePlugin::userAgent):
1219         * WebProcess/Plugins/PluginController.h:
1220         Remove the URL parameter to userAgent.
1221
1222         * WebProcess/Plugins/PluginProxy.cpp:
1223         (WebKit::PluginProxy::initialize):
1224         Pass the user agent to WebProcessConnection::CreatePlugin.
1225
1226         * WebProcess/Plugins/PluginView.cpp:
1227         (WebKit::PluginView::userAgent):
1228         Remove url parameter.
1229
1230 2010-09-29  Anders Carlsson  <andersca@apple.com>
1231
1232         Reviewed by Sam Weinig.
1233
1234         Implement more PluginProxy member functions
1235         https://bugs.webkit.org/show_bug.cgi?id=46815
1236
1237         * Platform/CoreIPC/HandleMessage.h:
1238         (CoreIPC::handleMessage):
1239         * PluginProcess/PluginControllerProxy.cpp:
1240         (WebKit::PluginControllerProxy::handleMouseEvent):
1241         (WebKit::PluginControllerProxy::handleWheelEvent):
1242         (WebKit::PluginControllerProxy::handleMouseEnterEvent):
1243         (WebKit::PluginControllerProxy::handleMouseLeaveEvent):
1244         (WebKit::PluginControllerProxy::setFocus):
1245         (WebKit::PluginControllerProxy::windowFocusChanged):
1246         (WebKit::PluginControllerProxy::windowFrameChanged):
1247         (WebKit::PluginControllerProxy::windowVisibilityChanged):
1248         Call the appropriate Plugin member functions.
1249
1250         * PluginProcess/PluginControllerProxy.messages.in:
1251         Add new messages.
1252
1253         * PluginProcess/WebProcessConnection.cpp:
1254         (WebKit::WebProcessConnection::didReceiveMessage):
1255         It's OK to get a message for a plug-in controller proxy that has gone away.
1256
1257         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1258         Forward the message to the PluginControllerProxy handler.
1259
1260         * WebProcess/Plugins/PluginProxy.cpp:
1261         (WebKit::PluginProxy::handleMouseEvent):
1262         (WebKit::PluginProxy::handleWheelEvent):
1263         (WebKit::PluginProxy::handleMouseEnterEvent):
1264         (WebKit::PluginProxy::handleMouseLeaveEvent):
1265         (WebKit::PluginProxy::setFocus):
1266         (WebKit::PluginProxy::windowFocusChanged):
1267         (WebKit::PluginProxy::windowFrameChanged):
1268         (WebKit::PluginProxy::windowVisibilityChanged):
1269         Send messages to the plug-in process.
1270         
1271         (WebKit::PluginProxy::controller):
1272         Return the plug-in controller.
1273
1274 2010-09-29  Adam Roben  <aroben@apple.com>
1275
1276         Look for WebKit.dll (not WebKit_debug.dll) when launching the web
1277         process in Debug builds
1278
1279         Fixes <http://webkit.org/b/46809> <rdar://problem/8491809> REGRESSION
1280         (r67979): All tests crashing on Windows WebKit2 test bot
1281
1282         Reviewed by Sam Weinig.
1283
1284         * UIProcess/Launcher/win/ProcessLauncherWin.cpp: WebKit_debug.dll is
1285         only used in Debug_All builds (but WebKit2WebProcess_debug.exe is used
1286         in all non-Debug_Internal debug-style builds).
1287
1288 2010-09-28  Anders Carlsson  <andersca@apple.com>
1289
1290         Reviewed by Sam Weinig.
1291
1292         Paint the plug-in backing store into the WebProcess backing store
1293         https://bugs.webkit.org/show_bug.cgi?id=46768
1294
1295         * DerivedSources.make:
1296         Add PluginProxy.
1297         
1298         * Platform/CoreIPC/MessageID.h:
1299         Add PluginProxy message class.
1300
1301         * PluginProcess/PluginControllerProxy.cpp:
1302         (WebKit::PluginControllerProxy::paint):
1303         Let the web process know that we've painted.
1304
1305         * WebKit2.xcodeproj/project.pbxproj:
1306         Add new files.
1307
1308         * WebProcess/Plugins/PluginProcessConnection.cpp:
1309         (WebKit::PluginProcessConnection::didReceiveMessage):
1310         Pass the message on to a plug-in proxy.
1311
1312         * WebProcess/Plugins/PluginProxy.cpp:
1313         (WebKit::PluginProxy::paint):
1314         Paint our backing store into the graphics context.
1315
1316         (WebKit::PluginProxy::controller):
1317         Add notImplemented().
1318
1319         (WebKit::PluginProxy::update):
1320         Blit the plug-in backing store into the local backing store and tell the plug-in
1321         controller that we want to repaint.
1322
1323         * WebProcess/Plugins/PluginProxy.messages.in: Added.
1324
1325 2010-09-28  Jenn Braithwaite  <jennb@chromium.org>
1326
1327         Reviewed by Dmitry Titov.
1328
1329         Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument.
1330         https://bugs.webkit.org/show_bug.cgi?id=46663
1331
1332         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1333         (WebKit::WebFrameLoaderClient::didTransferChildFrameToNewDocument):
1334         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1335
1336 2010-09-28  Anders Carlsson  <andersca@apple.com>
1337
1338         Reviewed by Sam Weinig.
1339
1340         Begin hooking up painting in the plug-in process
1341         https://bugs.webkit.org/show_bug.cgi?id=46766
1342
1343         * DerivedSources.make:
1344         Add PluginControllerProxy.
1345     
1346         * Platform/CoreIPC/MessageID.h:
1347         Add a MessageClassPluginControllerProxy message class.
1348
1349         * PluginProcess/PluginControllerProxy.cpp:
1350         (WebKit::PluginControllerProxy::PluginControllerProxy):
1351         Initialize the paint timer.
1352
1353         (WebKit::PluginControllerProxy::paint):
1354         Create a graphics context referencing our backing store and paint into it.
1355
1356         (WebKit::PluginControllerProxy::invalidate):
1357         Update the dirty rect and start the paint timer if necessary.
1358
1359         (WebKit::PluginControllerProxy::geometryDidChange):
1360         If we're passed a new backing store handle, reinitialize the backing store.
1361
1362         * PluginProcess/PluginControllerProxy.messages.in: Added.
1363         * PluginProcess/WebProcessConnection.cpp:
1364         (WebKit::WebProcessConnection::didReceiveMessage):
1365         If the message has a destination ID, forward it to the plug-in controller proxy.
1366
1367         * Scripts/webkit2/messages.py:
1368         Always include WebCoreArgumentCoders.h if the type is in the WebCore namespace.
1369
1370         * WebKit2.xcodeproj/project.pbxproj:
1371         Add new files.
1372
1373         * WebProcess/Plugins/PluginProxy.cpp:
1374         (WebKit::PluginProxy::geometryDidChange):
1375         Update the size of the backing store. Create a new plug-in backing store if needed and send
1376         it over to the plug-in process.
1377         
1378 2010-09-28  Anders Carlsson  <andersca@apple.com>
1379
1380         Reviewed by Sam Weinig.
1381
1382         ASSERT when launching the plugin process
1383         https://bugs.webkit.org/show_bug.cgi?id=46754
1384         <rdar://problem/8484570>
1385
1386         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1387         (WebKit::ProcessLauncher::launchProcess):
1388         Don't assert if we fail to launch the process. Instead, set the connection identifier
1389         and process ID to null and deallocate the port we created.
1390
1391         * UIProcess/Plugins/PluginProcessProxy.cpp:
1392         (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
1393         Move all code from didClose here.
1394
1395         (WebKit::PluginProcessProxy::didClose):
1396         Call pluginProcessCrashedOrFailedToLaunch.
1397
1398         (WebKit::PluginProcessProxy::didFinishLaunching):
1399         If we failed to launch, call pluginProcessCrashedOrFailedToLaunch.
1400
1401 2010-09-28  Anders Carlsson  <andersca@apple.com>
1402
1403         Reviewed by Sam Weinig.
1404
1405         Differentiate waitForSyncReply from waitForReply
1406         https://bugs.webkit.org/show_bug.cgi?id=46752
1407
1408         Since waitForSyncReply is going to need to dispatch incoming sync messages while
1409         waiting for the correct reply, we need to add a new waitForSyncReply function that
1410         can do this.
1411
1412         * Platform/CoreIPC/Connection.cpp:
1413         (CoreIPC::Connection::sendSyncMessage):
1414         Push the pending sync reply information on the m_pendingSyncReplies stack,
1415         send the message, wait for a reply and pop the information off the stack.
1416
1417         (CoreIPC::Connection::waitForSyncReply):
1418         Block while waiting for a reply to the sync message with the given ID.
1419         
1420         (CoreIPC::Connection::processIncomingMessage):
1421         If the incoming message is a sync reply, set the didReceiveReply flag and the replyDecoder
1422         members in the pending sync reply and signal the client thread to wakeup.
1423
1424         * Platform/CoreIPC/Connection.h:
1425         Add a stack of PendingSyncReply structs.
1426
1427 2010-09-28  Sam Weinig  <sam@webkit.org>
1428
1429         Reviewed by Darin Adler and Dave Hyatt.
1430
1431         Vertical scroll bar on apple.com is too short with WebKit2
1432         <rdar://problem/8379230>
1433         https://bugs.webkit.org/show_bug.cgi?id=46739
1434
1435         This gets us most of the way to having correct scroll corner behavior. We should
1436         follow this up by moving to painting the window re-sizer in WebCore.
1437
1438         * UIProcess/API/mac/WKView.mm:
1439         (-[WKView _ownsWindowGrowBox]):
1440         (-[WKView _updateGrowBoxForWindowFrameChange]): Calculate whether we should
1441         be taking the scroll corner into account when laying out scrollbars.
1442         * UIProcess/WebPageProxy.cpp:
1443         (WebKit::WebPageProxy::setWindowResizerSize):
1444         * UIProcess/WebPageProxy.h:
1445         * WebProcess/WebPage/WebPage.cpp:
1446         (WebKit::WebPage::setWindowResizerSize):
1447         (WebKit::WebPage::windowResizerRect): This now returns IntRect() for
1448         non-mac platforms (or any platform that never sends a setWindowResizerSize
1449         message).
1450         * WebProcess/WebPage/WebPage.h:
1451         * WebProcess/WebPage/WebPage.messages.in:
1452
1453 2010-09-28  Adam Roben  <aroben@apple.com>
1454
1455         Tell the UI client when a key event is not handled
1456
1457         When the web process receives an event, it sends a
1458         WebPageProxyMessage::DidReceiveEvent message back to the UI process.
1459         That message is now sent after handling the event, and includes a
1460         boolean signifying whether or not the event was actually handled.
1461
1462         Every time WebPageProxy receives a key event, it adds it to a queue.
1463         When it receives a WebPageProxyMessage::DidReceiveEvent for a key
1464         event, the event is removed from the queue. If the event was not
1465         handled, we tell the UI client.
1466
1467         Fixes <http://webkit.org/b/46660> <rdar://problem/8483465> Need API to
1468         tell a WebKit2 client application that a key event was not handled
1469
1470         Reviewed by Kenneth Rohde Christiansen and Sam Weinig.
1471
1472         * Shared/NativeWebKeyboardEvent.h: Added. This class wraps a
1473         WebKeyboardEvent and the native event that was used to construct it.
1474         (WebKit::NativeWebKeyboardEvent::nativeEvent): Simple getter.
1475
1476         * Shared/WebEvent.h: Made isKeyboardEventType public for
1477         WebPageProxy's benefit.
1478
1479         * Shared/mac/NativeWebKeyboardEventMac.mm: Added.
1480         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1481         * Shared/qt/NativeWebKeyboardEventQt.cpp: Added.
1482         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1483         * Shared/win/NativeWebKeyboardEventWin.cpp: Added.
1484         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1485         The constructor creates a WebKeyboardEvent and stores the native
1486         event.
1487
1488         * UIProcess/API/C/WKNativeEvent.h: Added.
1489
1490         * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleKeyEventCallback
1491         and WKPageUIClient::didNotHandleKeyEvent.
1492
1493         * UIProcess/API/mac/WKView.mm:
1494         (-[WKView keyUp:]):
1495         (-[WKView keyDown:]):
1496         * UIProcess/win/WebView.cpp:
1497         (WebKit::WebView::onKeyEvent):
1498         * UIProcess/API/qt/qwkpage.cpp:
1499         (QWKPagePrivate::keyPressEvent):
1500         (QWKPagePrivate::keyReleaseEvent):
1501         Changed to use NativeWebKeyboardEvent.
1502
1503         (QWKPage::QWKPage): Updated for addition of didNotHandleKeyEvent.
1504
1505         * UIProcess/WebPageProxy.cpp:
1506         (WebKit::WebPageProxy::handleKeyboardEvent): Changed to take a
1507         NativeWebKeyboardEvent and to add it to m_keyEventQueue.
1508         (WebKit::WebPageProxy::didReceiveMessage): Changed to expect a boolean
1509         parameter in WebPageProxyMessage::DidReceiveEvent.
1510         (WebKit::WebPageProxy::didReceiveEvent): Added a boolean "handled"
1511         parameter. If the event was a keyboard event, we remove it from
1512         m_keyEventQueue, and if it wasn't handled by WebCore, we tell the UI
1513         client.
1514
1515         * UIProcess/WebPageProxy.h: Added m_keyEventQueue.
1516
1517         * UIProcess/WebUIClient.cpp:
1518         (WebKit::WebUIClient::didNotHandleKeyEvent):
1519         * UIProcess/WebUIClient.h:
1520         Added. Just calls through to the WKPageUIClient.
1521
1522         * WebProcess/WebPage/WebPage.cpp:
1523         (WebKit::handleMouseEvent):
1524         (WebKit::WebPage::mouseEvent):
1525         (WebKit::handleWheelEvent):
1526         (WebKit::WebPage::wheelEvent):
1527         (WebKit::handleKeyEvent):
1528         (WebKit::WebPage::keyEvent):
1529         (WebKit::handleTouchEvent):
1530         (WebKit::WebPage::touchEvent):
1531         Moved code from the *Event functions into new helper handle*Event
1532         functions, and changed to pass a boolean to
1533         WebPageProxyMessage::DidReceiveEvent signaling whether the event was
1534         handled or not.
1535
1536         * WebKit2.pro:
1537         * WebKit2.xcodeproj/project.pbxproj:
1538         * win/WebKit2.vcproj:
1539         * win/WebKit2Generated.make:
1540         Added WKNativeEvent.h and NativeWebKeyboardEvent.
1541
1542 2010-09-28  Anders Carlsson  <andersca@apple.com>
1543
1544         Reviewed by Adam Roben.
1545
1546         Implement PluginProxy::destroy
1547         https://bugs.webkit.org/show_bug.cgi?id=46737
1548
1549         * Platform/CoreIPC/HandleMessage.h:
1550         (CoreIPC::handleMessage):
1551         Add overload for a sync message with one in parameter and no out parameters.
1552
1553         * PluginProcess/WebProcessConnection.cpp:
1554         (WebKit::WebProcessConnection::destroyPluginControllerProxy):
1555         Rename this to avoid conflicts with the destroyPlugin message handler.
1556
1557         (WebKit::WebProcessConnection::destroyPlugin):
1558         Call destroyPluginControllerProxy.
1559
1560         * PluginProcess/WebProcessConnection.messages.in:
1561         Add DestroyPlugin message.
1562
1563         * WebProcess/Plugins/PluginProcessConnection.cpp:
1564         (WebKit::PluginProcessConnection::didClose):
1565         
1566         * WebProcess/Plugins/PluginProxy.cpp:
1567         (WebKit::PluginProxy::PluginProxy):
1568         (WebKit::PluginProxy::~PluginProxy):
1569         Don't add and/the plug-in proxy from the map in the constructor/destructor. Instead,
1570         do it in initialize/destroy, since otherwise we could be calling pluginProcessCrashed on a
1571         PluginController that had already been freed.
1572
1573         (WebKit::PluginProxy::initialize):
1574         (WebKit::PluginProxy::destroy):
1575         send the DestroyPlugin message.
1576
1577 2010-09-28  Anders Carlsson  <andersca@apple.com>
1578
1579         Reviewed by Adam Roben.
1580
1581         Improve plug-in process lifecycle handling
1582         https://bugs.webkit.org/show_bug.cgi?id=46734
1583
1584         * PluginProcess/WebProcessConnection.cpp:
1585         (WebKit::WebProcessConnection::destroyPlugin):
1586         Destroy and delete the plug-in.
1587
1588         (WebKit::WebProcessConnection::didClose):
1589         Our web process crashed, go through and delete all plug-in instances.
1590
1591         * UIProcess/Plugins/PluginProcessProxy.cpp:
1592         (WebKit::PluginProcessProxy::didClose):
1593         The plug-in process crashed. Go through all pending replies and send them so the
1594         web processes won't be blocked waiting for a reply.
1595
1596         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
1597         We need to remove the pending reply connection once we've sent the reply.
1598
1599         * WebProcess/Plugins/PluginProcessConnection.cpp:
1600         (WebKit::PluginProcessConnection::didClose):
1601         The plug-in process crashed. Iterate over all proxies and let them know that the plug-in
1602         process has crashed.
1603
1604         * WebProcess/Plugins/PluginProxy.cpp:
1605         (WebKit::PluginProxy::pluginProcessCrashed):
1606         Tell our controller that the plug-in process crashed.
1607
1608         (WebKit::PluginProxy::destroy):
1609         Null out the controller.
1610
1611 2010-09-28  Anders Carlsson  <andersca@apple.com>
1612
1613         Reviewed by Adam Roben.
1614
1615         Implement PluginControllerProxy::initialize and have it create a plug-in
1616         https://bugs.webkit.org/show_bug.cgi?id=46731
1617
1618         * PluginProcess/PluginControllerProxy.cpp:
1619         (WebKit::PluginControllerProxy::initialize):
1620         Create the plug-in and try to initialize it.
1621
1622         (WebKit::PluginControllerProxy::destroy):
1623         Destroy the plug-in.
1624
1625         * PluginProcess/WebProcessConnection.cpp:
1626         (WebKit::WebProcessConnection::addPluginControllerProxy):
1627         Add the given plug-in controller proxy to the map and assume ownership of it.
1628
1629         (WebKit::WebProcessConnection::removePluginControllerProxy):
1630         Remove the given plug-in controller proxy from the map and delete it.
1631
1632         (WebKit::WebProcessConnection::createPlugin):
1633         Create a plug-in controller proxy and try to initialize it.
1634
1635 2010-09-28  Anders Carlsson  <andersca@apple.com>
1636
1637         Reviewed by Adam Roben.
1638
1639         Add PluginControllerProxy class
1640         https://bugs.webkit.org/show_bug.cgi?id=46728
1641
1642         * PluginProcess/PluginControllerProxy.cpp: Added.
1643         * PluginProcess/PluginControllerProxy.h: Added.
1644         Add stubbed out PluginControllerProxy class.
1645         
1646         * PluginProcess/WebProcessConnection.cpp:
1647         (WebKit::WebProcessConnection::~WebProcessConnection):
1648         Assert that we don't have any live plug-in controller proxies.
1649
1650         (WebKit::WebProcessConnection::addPluginControllerProxy):
1651         Add the plug-in controller proxy to the map.
1652                 
1653         (WebKit::WebProcessConnection::removePluginControllerProxy):
1654         Remove the plug-in controller proxy from the map. If the last plug-in controller
1655         proxy went away, invalidate the connection.
1656         
1657         * WebKit2.xcodeproj/project.pbxproj:
1658         Add files.
1659
1660 2010-09-28  Adam Roben  <aroben@apple.com>
1661
1662         Don't call NPP_SetWindow until the plugin's HWND has been
1663         sized/positioned
1664
1665         Test: platform/win/plugins/window-geometry-initialized-before-set-window.html
1666
1667         Reviewed by Anders Carlsson.
1668
1669         Fixes <http://webkit.org/b/46716> <rdar://problem/8482014> Full-page
1670         Adobe Reader does not paint until window is resized
1671
1672         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1673         (WebKit::NetscapePlugin::geometryDidChange): Call NPP_SetWindow after
1674         updating the platform (HWND) geometry.
1675
1676 2010-09-28  Anders Carlsson  <andersca@apple.com>
1677
1678         Out of process plug-ins shouldn't be turned on just yet...
1679
1680         * WebKit2Prefix.h:
1681
1682 2010-09-28  Andras Becsi  <abecsi@webkit.org>
1683
1684         Reviewed by Kenneth Rohde Christiansen.
1685
1686         [Qt] ProcessLauncherHelper should not leave stray socket files in /tmp.
1687         https://bugs.webkit.org/show_bug.cgi?id=46722
1688
1689         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1690         (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper): close the socket.
1691         (WebKit::ProcessLauncherHelper::ProcessLauncherHelper): delete the helper on exit.
1692
1693 2010-09-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
1694
1695         Reviewed by Andreas Kling.
1696
1697         [Qt] Remove support for Qt 4.5
1698         https://bugs.webkit.org/show_bug.cgi?id=46718
1699
1700         Remove the code for versions of Qt prior to 4.6.
1701
1702         * UIProcess/API/qt/qgraphicswkview.cpp:
1703         (QGraphicsWKView::event):
1704         * UIProcess/API/qt/qwkpage.cpp:
1705         * UIProcess/API/qt/qwkpage_p.h:
1706
1707 2010-09-28  Andras Becsi  <abecsi@webkit.org>
1708
1709         Reviewed by Csaba Osztrogonác.
1710
1711         [Qt] Fix generation of WebPageMessages.h and WebPageMessageReceiver.cpp
1712         to avoid rebuilding them every time.
1713
1714         * DerivedSources.pro: add target to extra compilers.
1715
1716 2010-09-27  Brady Eidson  <beidson@apple.com>
1717
1718         Reviewed by Sam Weinig.
1719
1720         https://bugs.webkit.org/show_bug.cgi?id=46688 - Add an API to get the WKBackForwardItem at an arbitrary index.
1721
1722         * UIProcess/API/C/WKBackForwardList.cpp:
1723         (WKBackForwardListGetItemAtIndex):
1724         * UIProcess/API/C/WKBackForwardList.h:
1725
1726 2010-09-27  Anders Carlsson  <andersca@apple.com>
1727
1728         Turns out people other than me might want to build this thing.
1729
1730         * WebKit2.xcodeproj/project.pbxproj:
1731
1732 2010-09-27  Darin Adler  <darin@apple.com>
1733
1734         * Scripts/webkit2: Added property svn:ignore.
1735
1736 2010-09-27  Anders Carlsson  <andersca@apple.com>
1737
1738         Reviewed by Sam Weinig.
1739
1740         * Platform/CoreIPC/Connection.h:
1741         (CoreIPC::Connection::sendSync):
1742         Add new sendSync overload that takes a message struct.
1743
1744         * PluginProcess/WebProcessConnection.cpp:
1745         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1746         Call didReceiveSyncWebProcessConnectionMessage.
1747         
1748         * WebProcess/Plugins/PluginProcessConnection.cpp:
1749         (WebKit::PluginProcessConnection::addPluginProxy):
1750         Add the plug-in proxy to the map.
1751
1752         (WebKit::PluginProcessConnection::removePluginProxy):
1753         Remove the plug-in proxy from the map. If the map is empty, disconnect from the
1754         plug-in process.
1755
1756         * WebProcess/Plugins/PluginProxy.cpp:
1757         (WebKit::generatePluginInstanceID):
1758         Generate a unique plug-in instance ID.
1759
1760         (WebKit::PluginProxy::PluginProxy):
1761         Add the plug-in proxy to the map.
1762         
1763         (WebKit::PluginProxy::~PluginProxy):
1764         Remove the plug-in proxy from the map.
1765
1766         (WebKit::PluginProxy::initialize):
1767         Ask the plug-in process to create a plug-in.
1768
1769 2010-09-27  Sam Weinig  <sam@webkit.org>
1770
1771         Reviewed by Anders Carlsson.
1772
1773         Add remaining event handlers to WKView.
1774
1775         Also fixes <rdar://problem/8467058>
1776         Does not get decidePolicyForNavigationAction callback when middle clicking a link
1777
1778         - Adds otherButton and rightButton NSResponder event handlers to WKView.
1779         - Renames WebPageProxy event handlers to use the handle prefix.
1780         - Uses a macro to reduce duplicate code for WKView event handlers.
1781         - Add view parameter to WebEventFactory::createWebKeyboardEvent on the mac
1782           for uniformity.
1783
1784         * Shared/mac/WebEventFactory.h:
1785         * Shared/mac/WebEventFactory.mm:
1786         (WebKit::WebEventFactory::createWebKeyboardEvent):
1787         * UIProcess/API/mac/WKView.mm:
1788         * UIProcess/API/qt/qwkpage.cpp:
1789         (QWKPagePrivate::keyPressEvent):
1790         (QWKPagePrivate::keyReleaseEvent):
1791         (QWKPagePrivate::mouseMoveEvent):
1792         (QWKPagePrivate::mousePressEvent):
1793         (QWKPagePrivate::mouseReleaseEvent):
1794         (QWKPagePrivate::mouseDoubleClickEvent):
1795         (QWKPagePrivate::wheelEvent):
1796         (QWKPagePrivate::touchEvent):
1797         * UIProcess/WebPageProxy.cpp:
1798         (WebKit::WebPageProxy::handleMouseEvent):
1799         (WebKit::WebPageProxy::handleWheelEvent):
1800         (WebKit::WebPageProxy::handleKeyboardEvent):
1801         (WebKit::WebPageProxy::handleTouchEvent):
1802         * UIProcess/WebPageProxy.h:
1803         * UIProcess/win/WebView.cpp:
1804         (WebKit::WebView::onMouseEvent):
1805         (WebKit::WebView::onWheelEvent):
1806         (WebKit::WebView::onKeyEvent):
1807
1808 2010-09-27  Ivan Krstić  <ike@apple.com>
1809
1810         Reviewed by Mark Rowe.
1811
1812         <rdar://problem/8348990> / <http://webkit.org/b/46633> Make it possible to disable sandboxing of
1813         web process via runtime flag.
1814
1815         Enable sandboxing of the web process only if the DisableSandbox user default is not set for the
1816         web process.
1817
1818         * WebProcess/mac/WebProcessMainMac.mm:
1819         (WebKit::WebProcessMain):
1820
1821 2010-09-27  Anders Carlsson  <andersca@apple.com>
1822
1823         Reviewed by Adam Roben.
1824
1825         Add WebProcessConnection CreatePlugin message
1826         https://bugs.webkit.org/show_bug.cgi?id=46668
1827
1828         * DerivedSources.make:
1829         Add WebProcessConnection.
1830
1831         * Platform/CoreIPC/HandleMessage.h:
1832         Add handleMessage overload for a sync message with two input parameters
1833         and one output parameter.
1834
1835         (CoreIPC::handleMessage):
1836         * Platform/CoreIPC/MessageID.h:
1837         Add MessageClassWebProcessConnection.
1838
1839         * PluginProcess/WebProcessConnection.cpp:
1840         (WebKit::WebProcessConnection::createPlugin):
1841         Add stub.
1842
1843         * PluginProcess/WebProcessConnection.messages.in: Added.
1844         * Scripts/webkit2/messages.py:
1845         Include headers directly for types that we believe are nested structs.
1846
1847         * Scripts/webkit2/messages_unittest.py:
1848         Update expected results.
1849
1850         * WebKit2.xcodeproj/project.pbxproj:
1851         Add new files.
1852
1853 2010-09-27  Anders Carlsson  <andersca@apple.com>
1854
1855         Reviewed by Adam Roben.
1856
1857         Add support for autogenerating synchronous message handlers
1858         https://bugs.webkit.org/show_bug.cgi?id=46654
1859
1860         * Scripts/webkit2/messages.py:
1861         (reply_type): Renamed from reply_base_class.
1862         (delayed_reply_type): Renamed from delayed_reply_base_class.
1863         (message_to_struct_declaration): Add a Reply type typedef.
1864         (async_case_statement): Rename from case_statement.
1865         (generate_message_handler): Generate a sync message handler as well.
1866
1867         * Scripts/webkit2/messages_unittest.py:
1868         Update expected results.
1869
1870 2010-09-27  Andras Becsi  <abecsi@webkit.org>
1871
1872         Reviewed by Csaba Osztrogonác.
1873
1874         [Qt] Make generate-forwarding-headers.pl aware of moved headers
1875         https://bugs.webkit.org/show_bug.cgi?id=46621
1876
1877         * generate-forwarding-headers.pl:
1878
1879 2010-09-27  Sam Weinig  <sam@webkit.org>
1880
1881         Reviewed by Anders Carlsson.
1882
1883         The mouseDidMoveOverElement callback in the injected bundle should include modifier info
1884         https://bugs.webkit.org/show_bug.cgi?id=46629
1885
1886         - Moves event related API enums to WKEvent.h which can be shared between
1887           both the bundle and the main API.
1888
1889         * Shared/API/c/WKEvent.h: Added.
1890         * Shared/API/c/WKSharedAPICast.h:
1891         (WebKit::toRef):
1892         * UIProcess/API/C/WKAPICast.h:
1893         * UIProcess/API/C/WKPage.h:
1894         * WebKit2.xcodeproj/project.pbxproj:
1895         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1896         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1897         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
1898         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1899         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1900         (WebKit::WebChromeClient::mouseDidMoveOverElement):
1901         * win/WebKit2.vcproj:
1902         * win/WebKit2Generated.make:
1903
1904 2010-09-27  Adam Roben  <aroben@apple.com>
1905
1906         Give mouse wheel events the right coordinates on Windows
1907
1908         Fixes <http://webkit.org/b/46625> <rdar://problem/8481161> Placing
1909         mouse cursor inside a scrollable area and scrolling the mouse wheel
1910         generally doesn't scroll the area
1911
1912         Reviewed by Sam Weinig.
1913
1914         * Shared/win/WebEventFactory.cpp:
1915         (WebKit::point): Renamed from positionForEvent. The old name implied
1916         that all events used the same relative origin, which is untrue.
1917         (WebKit::WebEventFactory::createWebMouseEvent): Changed to use point
1918         and ::ClientToScreen explicitly rather than relying on
1919         positionForEvent/globalPositionForEvent.
1920         (WebKit::WebEventFactory::createWebWheelEvent): Changed to use point
1921         and ::ScreenToClient. The old code was assuming that wheel event
1922         points are relative to the client area, but they are in fact relative
1923         to the screen.
1924
1925 2010-09-27  Sam Weinig  <sam@webkit.org>
1926
1927         Reviewed by Adam Roben.
1928
1929         Opening links in a new window asserts while decoding decidePolicyForNewWindowAction.
1930         <rdar://problem/8479445>
1931         https://bugs.webkit.org/show_bug.cgi?id=46623
1932
1933         * UIProcess/WebPageProxy.cpp:
1934         (WebKit::WebPageProxy::didReceiveMessage): Fix the order of decoding to
1935         match the order of encoding. (Swapping url and mouseButton).
1936
1937 2010-09-27  Adam Roben  <aroben@apple.com>
1938
1939         Stop leaking the web process's process handle on Windows
1940
1941         Fixes <http://webkit.org/b/46133> <rdar://problem/8455343>
1942
1943         Reviewed by Anders Carlsson.
1944
1945         * UIProcess/Launcher/ProcessLauncher.cpp:
1946         (WebKit::ProcessLauncher::invalidate): Call platformInvalidate.
1947
1948         * UIProcess/Launcher/ProcessLauncher.h: Added platformInvalidate.
1949
1950         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1951         (WebKit::ProcessLauncher::platformInvalidate):
1952         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1953         (WebKit::ProcessLauncher::platformInvalidate):
1954         Stubbed out.
1955
1956         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
1957         (WebKit::ProcessLauncher::platformInvalidate): Close the process
1958         handle like MSDN says we should.
1959
1960 2010-09-27  Adam Roben  <aroben@apple.com>
1961
1962         Don't double-free CERT_CONTEXTs when copying PlatformCertificateInfos
1963         on Windows
1964
1965         Fixes <http://webkit.org/b/46536> <rdar://problem/8477292> REGRESSION
1966         (r68260): Crash in PlatformCertificateInfo::~PlatformCertificateInfo
1967         when navigating away from Gmail
1968
1969         Reviewed by Sam Weinig.
1970
1971         * Shared/win/PlatformCertificateInfo.cpp:
1972         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
1973         (WebKit::PlatformCertificateInfo::operator=):
1974         * Shared/win/PlatformCertificateInfo.h:
1975         Added a copy constructor and assigment operator to handle correctly
1976         reffing/dereffing the CERT_CONTEXTs when copying a
1977         PlatformCertificateInfo.
1978
1979 2010-09-26  Sam Weinig  <sam@webkit.org>
1980
1981         Reviewed by Simon Fraser.
1982
1983         MiniBrowser crashes when opening main menu item
1984         https://bugs.webkit.org/show_bug.cgi?id=46588
1985
1986         * UIProcess/API/mac/PageClientImpl.mm:
1987         (WebKit::PageClientImpl::setEditCommandState): Don't allow default
1988         String -> NSString conversion to take place, and use the increasingly
1989         misnamed nsStringFromWebCoreString instead.
1990
1991 2010-09-26  Sam Weinig  <sam@webkit.org>
1992
1993         Another windows build fix windows attempt.
1994
1995         * win/WebKit2Common.vsprops:
1996
1997 2010-09-26  Sam Weinig  <sam@webkit.org>
1998
1999         Another windows build fix windows attempt.
2000
2001         * win/WebKit2Generated.make:
2002
2003 2010-09-26  Sam Weinig  <sam@webkit.org>
2004
2005         Attempt to fix windows build.
2006
2007         * win/WebKit2Common.vsprops:
2008
2009 2010-09-26  Sam Weinig  <sam@webkit.org>
2010
2011         Attempt to fix Qt build.
2012
2013         * WebKit2.pro:
2014
2015 2010-09-26  Sam Weinig  <sam@webkit.org>
2016
2017         Reviewed by Anders Carlsson.
2018
2019         Move shared WebKit2 API (used by both bundle and main API) to WebKit2/Shared/API
2020         https://bugs.webkit.org/show_bug.cgi?id=46587
2021
2022         - Moves shared types (WKArrayRef, WKDictionaryRef, etc) to Shared/API/c.
2023         - Removes WKBundleBase.h and moves all opaque type declarations to WKBase.h (which
2024           moves to Shared/API/c).
2025         - Adds WKSharedAPICast.h which includes shared API casting logic and is included
2026           by both WKAPICast.h and WKBundleAPICast.h now. Moved to using macros for API 
2027           mappings to reduce verbosity.
2028         - Move windows c API files from UIProcess/API/win to UIProcess/API/C/win.
2029
2030         * Shared/API: Added.
2031         * Shared/API/c: Added.
2032         * Shared/API/c/WKArray.cpp: Copied from UIProcess/API/C/WKArray.cpp.
2033         * Shared/API/c/WKArray.h: Copied from UIProcess/API/C/WKArray.h.
2034         * Shared/API/c/WKBase.h: Copied from UIProcess/API/C/WKBase.h.
2035         * Shared/API/c/WKCertificateInfo.cpp: Copied from UIProcess/API/C/WKCertificateInfo.cpp.
2036         * Shared/API/c/WKCertificateInfo.h: Copied from UIProcess/API/C/WKCertificateInfo.h.
2037         * Shared/API/c/WKData.cpp: Copied from UIProcess/API/C/WKData.cpp.
2038         * Shared/API/c/WKData.h: Copied from UIProcess/API/C/WKData.h.
2039         * Shared/API/c/WKDictionary.cpp: Copied from UIProcess/API/C/WKDictionary.cpp.
2040         * Shared/API/c/WKDictionary.h: Copied from UIProcess/API/C/WKDictionary.h.
2041         * Shared/API/c/WKError.cpp: Copied from UIProcess/API/C/WKError.cpp.
2042         * Shared/API/c/WKError.h: Copied from UIProcess/API/C/WKError.h.
2043         * Shared/API/c/WKMutableArray.cpp: Copied from UIProcess/API/C/WKMutableArray.cpp.
2044         * Shared/API/c/WKMutableArray.h: Copied from UIProcess/API/C/WKMutableArray.h.
2045         * Shared/API/c/WKMutableDictionary.cpp: Copied from UIProcess/API/C/WKMutableDictionary.cpp.
2046         * Shared/API/c/WKMutableDictionary.h: Copied from UIProcess/API/C/WKMutableDictionary.h.
2047         * Shared/API/c/WKNumber.cpp: Copied from UIProcess/API/C/WKNumber.cpp.
2048         * Shared/API/c/WKNumber.h: Copied from UIProcess/API/C/WKNumber.h.
2049         * Shared/API/c/WKSerializedScriptValue.cpp: Copied from UIProcess/API/C/WKSerializedScriptValue.cpp.
2050         * Shared/API/c/WKSerializedScriptValue.h: Copied from UIProcess/API/C/WKSerializedScriptValue.h.
2051         * Shared/API/c/WKSharedAPICast.h: Copied from UIProcess/API/C/WKAPICast.h.
2052         * Shared/API/c/WKString.cpp: Copied from UIProcess/API/C/WKString.cpp.
2053         * Shared/API/c/WKString.h: Copied from UIProcess/API/C/WKString.h.
2054         * Shared/API/c/WKType.cpp: Copied from UIProcess/API/C/WKType.cpp.
2055         * Shared/API/c/WKType.h: Copied from UIProcess/API/C/WKType.h.
2056         * Shared/API/c/WKURL.cpp: Copied from UIProcess/API/C/WKURL.cpp.
2057         * Shared/API/c/WKURL.h: Copied from UIProcess/API/C/WKURL.h.
2058         * Shared/API/c/WKURLRequest.cpp: Copied from UIProcess/API/C/WKURLRequest.cpp.
2059         * Shared/API/c/WKURLRequest.h: Copied from UIProcess/API/C/WKURLRequest.h.
2060         * Shared/API/c/WKURLResponse.cpp: Copied from UIProcess/API/C/WKURLResponse.cpp.
2061         * Shared/API/c/WKURLResponse.h: Copied from UIProcess/API/C/WKURLResponse.h.
2062         * Shared/API/c/cf: Copied from UIProcess/API/C/cf.
2063         * Shared/API/c/mac: Copied from UIProcess/API/C/mac.
2064         * Shared/API/c/win: Added.
2065         * Shared/API/c/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
2066         * Shared/API/c/win/WKCertificateInfoWin.cpp: Copied from UIProcess/API/C/win/WKCertificateInfoWin.cpp.
2067         * Shared/API/c/win/WKCertificateInfoWin.h: Copied from UIProcess/API/C/win/WKCertificateInfoWin.h.
2068         * UIProcess/API/C/WKAPICast.h: Replaced.
2069         * UIProcess/API/C/WKArray.cpp: Removed.
2070         * UIProcess/API/C/WKArray.h: Removed.
2071         * UIProcess/API/C/WKBase.h: Removed.
2072         * UIProcess/API/C/WKCertificateInfo.cpp: Removed.
2073         * UIProcess/API/C/WKCertificateInfo.h: Removed.
2074         * UIProcess/API/C/WKData.cpp: Removed.
2075         * UIProcess/API/C/WKData.h: Removed.
2076         * UIProcess/API/C/WKDictionary.cpp: Removed.
2077         * UIProcess/API/C/WKDictionary.h: Removed.
2078         * UIProcess/API/C/WKError.cpp: Removed.
2079         * UIProcess/API/C/WKError.h: Removed.
2080         * UIProcess/API/C/WKMutableArray.cpp: Removed.
2081         * UIProcess/API/C/WKMutableArray.h: Removed.
2082         * UIProcess/API/C/WKMutableDictionary.cpp: Removed.
2083         * UIProcess/API/C/WKMutableDictionary.h: Removed.
2084         * UIProcess/API/C/WKNumber.cpp: Removed.
2085         * UIProcess/API/C/WKNumber.h: Removed.
2086         * UIProcess/API/C/WKSerializedScriptValue.cpp: Removed.
2087         * UIProcess/API/C/WKSerializedScriptValue.h: Removed.
2088         * UIProcess/API/C/WKString.cpp: Removed.
2089         * UIProcess/API/C/WKString.h: Removed.
2090         * UIProcess/API/C/WKType.cpp: Removed.
2091         * UIProcess/API/C/WKType.h: Removed.
2092         * UIProcess/API/C/WKURL.cpp: Removed.
2093         * UIProcess/API/C/WKURL.h: Removed.
2094         * UIProcess/API/C/WKURLRequest.cpp: Removed.
2095         * UIProcess/API/C/WKURLRequest.h: Removed.
2096         * UIProcess/API/C/WKURLResponse.cpp: Removed.
2097         * UIProcess/API/C/WKURLResponse.h: Removed.
2098         * UIProcess/API/C/cf: Removed.
2099         * UIProcess/API/C/cf/WKStringCF.cpp: Removed.
2100         * UIProcess/API/C/cf/WKStringCF.h: Removed.
2101         * UIProcess/API/C/cf/WKURLCF.cpp: Removed.
2102         * UIProcess/API/C/cf/WKURLCF.h: Removed.
2103         * UIProcess/API/C/cf/WKURLRequestCF.cpp: Removed.
2104         * UIProcess/API/C/cf/WKURLRequestCF.h: Removed.
2105         * UIProcess/API/C/cf/WKURLResponseCF.cpp: Removed.
2106         * UIProcess/API/C/cf/WKURLResponseCF.h: Removed.
2107         * UIProcess/API/C/mac: Removed.
2108         * UIProcess/API/C/mac/WKCertificateInfoMac.h: Removed.
2109         * UIProcess/API/C/mac/WKCertificateInfoMac.mm: Removed.
2110         * UIProcess/API/C/mac/WKURLRequestNS.h: Removed.
2111         * UIProcess/API/C/mac/WKURLRequestNS.mm: Removed.
2112         * UIProcess/API/C/mac/WKURLResponseNS.h: Removed.
2113         * UIProcess/API/C/mac/WKURLResponseNS.mm: Removed.
2114         * UIProcess/API/C/win/WKAPICastWin.h: Copied from UIProcess/API/win/WKAPICastWin.h.
2115         * UIProcess/API/C/win/WKBaseWin.h: Copied from UIProcess/API/win/WKBaseWin.h.
2116         * UIProcess/API/C/win/WKCertificateInfoWin.cpp: Removed.
2117         * UIProcess/API/C/win/WKCertificateInfoWin.h: Removed.
2118         * UIProcess/API/C/win/WKView.cpp: Copied from UIProcess/API/win/WKView.cpp.
2119         * UIProcess/API/C/win/WKView.h: Copied from UIProcess/API/win/WKView.h.
2120         * UIProcess/API/win: Removed.
2121         * UIProcess/API/win/WKAPICastWin.h: Removed.
2122         * UIProcess/API/win/WKBaseWin.h: Removed.
2123         * UIProcess/API/win/WKView.cpp: Removed.
2124         * UIProcess/API/win/WKView.h: Removed.
2125         * WebKit2.pro:
2126         * WebKit2.xcodeproj/project.pbxproj:
2127         * WebProcess/InjectedBundle/API/c/WKBundle.h:
2128         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2129         * WebProcess/InjectedBundle/API/c/WKBundleBase.h: Removed.
2130         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2131         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2132         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2133         * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
2134         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.h:
2135         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2136         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2137         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2138         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.h:
2139         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
2140         * win/WebKit2.vcproj:
2141         * win/WebKit2Generated.make:
2142
2143 2010-09-26  Anders Carlsson  <andersca@apple.com>
2144
2145         Fix non-Mac builds.
2146
2147         * Platform/SharedMemory.h:
2148         * Platform/mac/SharedMemoryMac.cpp:
2149         (WebKit::SharedMemory::Handle::isNull):
2150
2151 2010-09-26  Anders Carlsson  <andersca@apple.com>
2152
2153         Reviewed by Sam Weinig.
2154
2155         Add PluginProxy class
2156         https://bugs.webkit.org/show_bug.cgi?id=46586
2157
2158         * WebKit2.xcodeproj/project.pbxproj:
2159         Add files.
2160
2161         * WebProcess/Plugins/PluginProxy.cpp: Added.
2162         * WebProcess/Plugins/PluginProxy.h: Added.
2163
2164         * WebProcess/WebPage/WebPage.cpp:
2165         (WebKit::WebPage::createPlugin):
2166         Create a PluginProxy wrapper.
2167
2168 2010-09-26  Anders Carlsson  <andersca@apple.com>
2169
2170         Reviewed by Sam Weinig.
2171
2172         Make it possible to encode null SharedMemory::Handle objects
2173         https://bugs.webkit.org/show_bug.cgi?id=46585
2174
2175         * Platform/SharedMemory.h:
2176         (WebKit::SharedMemory::Handle::isNull):
2177         Add isNull.
2178
2179         * Platform/mac/SharedMemoryMac.cpp:
2180         (WebKit::SharedMemory::Handle::encode):
2181         Remove asserts.
2182
2183         (WebKit::SharedMemory::create):
2184         Bail if we see a null handle. Also work around a kernel bug where
2185         mach_vm_map fails if the given address to map is already mapped, even if
2186         VM_FLAG_ANYWHERE is set.
2187
2188 2010-09-26  Anders Carlsson  <andersca@apple.com>
2189
2190         Reviewed by Sam Weinig.
2191
2192         Add BackingStore class
2193         https://bugs.webkit.org/show_bug.cgi?id=46584
2194
2195         * Shared/BackingStore.cpp: Added.
2196         (WebKit::BackingStore::create):
2197         Create a backing store backed by fastMalloc memory.
2198
2199         (WebKit::BackingStore::createSharable):
2200         Create a backing store backed by shared memory.
2201
2202         (WebKit::BackingStore::createHandle):
2203         Create a handle that can be sent over the wire.
2204
2205         (WebKit::BackingStore::resize):
2206         Resize the backing store memory.
2207
2208         (WebKit::BackingStore::data):
2209         Return the backing store data.
2210
2211         * Shared/mac/BackingStoreMac.mm: Added.
2212         (WebKit::BackingStore::createGraphicsContext):
2213         Create a graphics context that will paint into the backing store.
2214
2215         (WebKit::BackingStore::paint):
2216         Paint the backing store in a graphics context.
2217
2218         * WebKit2.xcodeproj/project.pbxproj:
2219         Add files.
2220
2221 2010-09-26  Anders Carlsson  <andersca@apple.com>
2222
2223         Reviewed by Sam Weinig.
2224
2225         Establish a connection between the plug-in process and the web process
2226         https://bugs.webkit.org/show_bug.cgi?id=46583
2227
2228         * PluginProcess/PluginProcess.cpp:
2229         (WebKit::PluginProcess::didReceiveMessage):
2230         Call the auto-generated didReceivePluginProcessMessage.
2231
2232         * PluginProcess/PluginProcess.h:
2233         Add didReceivePluginProcessMessage declaration.
2234
2235         * PluginProcess/PluginProcess.messages.in:
2236         Add new "CreateWebProcessConnection" message.
2237
2238         * PluginProcess/WebProcessConnection.cpp:
2239         (WebKit::WebProcessConnection::didReceiveMessage):
2240         (WebKit::WebProcessConnection::didReceiveSyncMessage):
2241         (WebKit::WebProcessConnection::didClose):
2242         (WebKit::WebProcessConnection::didReceiveInvalidMessage):
2243         Add stubbed out member functions.
2244
2245         * UIProcess/Plugins/PluginProcessManager.cpp:
2246         (WebKit::PluginProcessManager::getPluginProcessConnection):
2247         Ask the plug-in process proxy to create a connection.
2248
2249         * UIProcess/Plugins/PluginProcessProxy.cpp:
2250         (WebKit::PluginProcessProxy::createWebProcessConnection):
2251         Add the WebProcessProxy and the reply encoder to the queue of pending replies.
2252         If the process is still launching, keep track of how many pending requests we have, otherwise
2253         just send the request.
2254
2255         (WebKit::PluginProcessProxy::didReceiveMessage):
2256         Call the auto-generated didReceivePluginProcessMessage.
2257
2258         (WebKit::PluginProcessProxy::didFinishLaunching):
2259         Send all pending connection requests.
2260
2261         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2262         Get the first pending reply and send it with the mach port.
2263
2264         * WebKit2.xcodeproj/project.pbxproj:
2265         Actually compile PluginProcessMessageReceiver.
2266
2267         * WebProcess/Plugins/PluginProcessConnection.cpp:
2268         (WebKit::PluginProcessConnection::PluginProcessConnection):
2269         Create a CoreIPC connection.
2270
2271         (WebKit::PluginProcessConnection::didReceiveMessage):
2272         (WebKit::PluginProcessConnection::didClose):
2273         (WebKit::PluginProcessConnection::didReceiveInvalidMessage):
2274         Add stubbed out member functions.
2275
2276         * WebProcess/WebPage/WebPage.cpp:
2277         (WebKit::WebPage::createPlugin):
2278         Ask the plug-in process connection manager for a connection.
2279
2280 2010-09-26  Anders Carlsson  <andersca@apple.com>
2281
2282         Reviewed by Sam Weinig.
2283
2284         Generated message handlers should include argument coder headers for some types
2285         https://bugs.webkit.org/show_bug.cgi?id=46582
2286
2287         * Scripts/webkit2/messages.py:
2288         When determining which headers to use when generating a message handler, consider the
2289         argument coder headers.
2290
2291         * Scripts/webkit2/messages_unittest.py:
2292         Update test result.
2293
2294 2010-09-24  Sam Weinig  <sam@webkit.org>
2295
2296         Fix release build.
2297
2298         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2299
2300 2010-09-24  Enrica Casucci  <enrica@apple.com>
2301
2302         One more build fix.
2303
2304         * UIProcess/API/qt/qwkpage.cpp:
2305         (QWKPagePrivate::setEditCommandState):
2306
2307 2010-09-24  Sam Weinig  <sam@webkit.org>
2308
2309         Reviewed by Darin Adler.
2310
2311         Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
2312         <rdar://problem/8359279>
2313         https://bugs.webkit.org/show_bug.cgi?id=46546
2314
2315         - Adds new WKBundleHitTestResultRef object to represent a content under a cursor.
2316         - Adds new Bundle and UI level mouseDidMoveOverElement UIClient callbacks, with
2317           pass through userData to communicate context up to the UIProcess
2318
2319         * Shared/APIObject.h:
2320         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2321         * UIProcess/API/C/WKPage.h:
2322         * UIProcess/API/qt/qwkpage.cpp:
2323         (QWKPage::QWKPage):
2324         * UIProcess/WebPageProxy.cpp:
2325         (WebKit::WebPageProxy::didReceiveMessage):
2326         (WebKit::WebPageProxy::mouseDidMoveOverElement):
2327         * UIProcess/WebPageProxy.h:
2328         * UIProcess/WebUIClient.cpp:
2329         (WebKit::WebUIClient::mouseDidMoveOverElement):
2330         * UIProcess/WebUIClient.h:
2331         * WebKit2.pro:
2332         * WebKit2.xcodeproj/project.pbxproj:
2333         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2334         * WebProcess/InjectedBundle/API/c/WKBundleBase.h:
2335         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: Added.
2336         (WKBundleHitTestResultGetTypeID):
2337         (WKBundleHitTestResultGetNodeHandle):
2338         (WKBundleHitTestResultGetFrame):
2339         (WKBundleHitTestResultCopyAbsoluteLinkURL):
2340         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Added.
2341         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2342         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: Added.
2343         (WebKit::InjectedBundleHitTestResult::create):
2344         (WebKit::InjectedBundleHitTestResult::nodeHandle):
2345         (WebKit::InjectedBundleHitTestResult::webFrame):
2346         (WebKit::InjectedBundleHitTestResult::absoluteLinkURL):
2347         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: Added.
2348         (WebKit::InjectedBundleHitTestResult::coreHitTestResult):
2349         (WebKit::InjectedBundleHitTestResult::InjectedBundleHitTestResult):
2350         (WebKit::InjectedBundleHitTestResult::type):
2351         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2352         (WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
2353         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2354         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2355         (WebKit::WebChromeClient::mouseDidMoveOverElement):
2356         * win/WebKit2.vcproj:
2357
2358 2010-09-24  Enrica Casucci  <enrica@apple.com>
2359
2360         Build fix.
2361
2362         * UIProcess/API/qt/qwkpage_p.h:
2363         * UIProcess/win/WebView.cpp:
2364         (WebKit::WebView::setEditCommandState):
2365         * UIProcess/win/WebView.h:
2366
2367 2010-09-24  Enrica Casucci  <enrica@apple.com>
2368
2369         Reviewed by Darin Adler.
2370
2371         Maui: Pasteboard support (42317)
2372         <rdar://problem/7660537>
2373         https://bugs.webkit.org/show_bug.cgi?id=42317
2374         
2375         This is the final piece of the pasteboard support for WebKit2.
2376         The menu validation has been hooked up for Mac. The validation is
2377         performed asynchronously and the menu entries updated while the menu
2378         is visible. I've created a generic mechanism to call editing commands
2379         that will make it easy to add new commands we will support in the future.
2380         The commands supported now are copy, cut, paste, pasteAsPlainText, delete
2381         and selectAll.
2382
2383         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added DidValidateMenuItem.
2384         * UIProcess/API/mac/PageClientImpl.h: Added setEditCommandState.
2385         * UIProcess/API/mac/PageClientImpl.mm: Added setEditCommandState implementation.
2386         (WebKit::PageClientImpl::setEditCommandState): Added.
2387         * UIProcess/API/mac/WKView.mm:
2388         (WebCore::MenuItemInfo::MenuItemInfo):
2389         (-[WKView initWithFrame:pageNamespaceRef:]):
2390         (createSelectorExceptionMap): Added.
2391         (commandNameForSelector): Added.
2392         (-[WKView validateUserInterfaceItem:]): Added implementation.
2393         (-[WKView _setUserInterfaceItemState:enabled:state:]): Added.
2394         * UIProcess/API/mac/WKViewInternal.h:
2395         * UIProcess/PageClient.h:
2396         * UIProcess/WebPageProxy.cpp:
2397         (WebKit::WebPageProxy::validateMenuItem):
2398         (WebKit::WebPageProxy::executeEditCommand):
2399         (WebKit::WebPageProxy::didReceiveMessage): Now processing also
2400         DidValidateMenuItem.
2401         * UIProcess/WebPageProxy.h:
2402         * WebProcess/WebPage/WebPage.cpp:
2403         (WebKit::WebPage::executeEditingCommand): Fixed.
2404         (WebKit::WebPage::isEditingCommandEnabled): Fixed.
2405         (WebKit::WebPage::validateMenuItem): Added.
2406         (WebKit::WebPage::executeEditCommand): Added.
2407         * WebProcess/WebPage/WebPage.h: Removed cut, copy, paste, selectAll.
2408         Added validateMenuItem and executeEditCommand.
2409         * WebProcess/WebPage/WebPage.messages.in: Added new messages.
2410         * UIProcess/API/qt/qwkpage.cpp:
2411         (WebKit::QWKPage::setEditCommandState): Added.
2412         * UIProcess/API/qt/qwkpage_p.h: Added 
2413         
2414
2415 2010-09-24  Anders Carlsson  <andersca@apple.com>
2416
2417         Build fix.
2418
2419         * WebKit2.xcodeproj/project.pbxproj:
2420
2421 2010-09-24  Adam Roben  <aroben@apple.com>
2422
2423         Give windowed Netscape plugins their own window
2424
2425         The plugin window is a child of the WebView's window. The WebView's
2426         window is in the UI process, and the plugin's window is in the web
2427         process (though someday it will be in the plugin process), but Windows
2428         mostly handles this just fine. Right now we move the plugin's window
2429         in the web process, but we need to do it at paint time in the UI
2430         process instead so that the plugin windows will stay in sync with the
2431         web page's contents. There are also a whole bunch of plugin quirks
2432         that WebKit1 supports that we don't support yet, but that's a task for
2433         another day.
2434
2435         Fixes <http://webkit.org/b/44428> Get basic in-process windowed
2436         plugins working in WebKit2 on Windows
2437
2438         Reviewed by Anders Carlsson.
2439
2440         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2441         (WebKit::NetscapePlugin::destroy):
2442         (WebKit::NetscapePlugin::geometryDidChange):
2443         Call the new platform-specific functions.
2444
2445         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added
2446         platformDestroy/platformGeometryDidChange, and an m_window member on
2447         Windows to hold our window.
2448
2449         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2450         (WebKit::NetscapePlugin::platformDestroy):
2451         (WebKit::NetscapePlugin::platformGeometryDidChange):
2452         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2453         (WebKit::NetscapePlugin::platformDestroy):
2454         (WebKit::NetscapePlugin::platformGeometryDidChange):
2455         Stubbed these out.
2456
2457         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2458         (WebKit::registerPluginView): Added. The code came from
2459         WebCore's PluginViewWin.cpp, though I changed it to add one to
2460         COLOR_WINDOW, since that's what MSDN says we should do.
2461         (WebKit::NetscapePlugin::platformPostInitialize): If we're windowed,
2462         create a window for the plugin and make it a child of the WebView's
2463         window. If we're not windowed, just set m_window to 0.
2464         (WebKit::NetscapePlugin::platformDestroy): Destroy our window if we
2465         have one and it hasn't been destroyed already.
2466         (WebKit::NetscapePlugin::platformGeometryDidChange): Update our
2467         window's size and position.
2468
2469         * WebProcess/Plugins/PluginController.h:
2470         * WebProcess/Plugins/PluginView.cpp:
2471         (WebKit::PluginView::nativeParentWindow):
2472         * WebProcess/Plugins/PluginView.h:
2473         Added nativeParentWindow on Windows to return the WebView's window.
2474
2475 2010-09-24  Adam Roben  <aroben@apple.com>
2476
2477         Pass the WebView's HWND over to the web process
2478
2479         The HWND is packaged up in the WebPageCreationParameters and stored in
2480         the WebPage. It will eventually be used by windowed plugins.
2481
2482         Fixes <http://webkit.org/b/46512> WebPage needs access to its
2483         corresponding HWND from the UI process
2484
2485         Reviewed by Anders Carlsson.
2486
2487         * Shared/WebPageCreationParameters.cpp:
2488         (WebKit::WebPageCreationParameters::encode):
2489         (WebKit::WebPageCreationParameters::decode):
2490         Encode and decode the HWND as a uint64_t.
2491
2492         * Shared/WebPageCreationParameters.h: Added a nativeWindow member to
2493         store the HWND.
2494
2495         * UIProcess/PageClient.h: Added a nativeWindow function on Windows.
2496
2497         * UIProcess/WebPageProxy.cpp:
2498         (WebKit::WebPageProxy::creationParameters): Store the HWND from the
2499         page client in the struct to be sent to the web process.
2500
2501         * UIProcess/win/WebView.cpp:
2502         (WebKit::WebView::WebView): Moved the call to initializeWebPage after
2503         we've created our window so that our window will be ready when
2504         WebPageProxy asks for it to send it to the web process.
2505         (WebKit::WebView::nativeWindow): Added. Just returns our window.
2506
2507         * UIProcess/win/WebView.h: Added nativeWindow.
2508
2509         * WebProcess/WebPage/WebPage.cpp:
2510         (WebKit::WebPage::WebPage): Store the HWND in the new m_nativeWindow
2511         member.
2512
2513         * WebProcess/WebPage/WebPage.h:
2514         (WebKit::WebPage::nativeWindow): Added this simple getter.
2515
2516 2010-09-24  Adam Roben  <aroben@apple.com>
2517
2518         Add WebPageProxy::creationParameters
2519
2520         Fixes <http://webkit.org/b/46510> WebPageProxy has a bunch of
2521         duplicated WebPageCreationParameters code
2522
2523         Reviewed by Anders Carlsson.
2524
2525         * UIProcess/WebPageProxy.cpp:
2526         (WebKit::WebPageProxy::initializeWebPage):
2527         (WebKit::WebPageProxy::reinitializeWebPage):
2528         (WebKit::WebPageProxy::didReceiveSyncMessage):
2529         Use creationParameters.
2530
2531         (WebKit::WebPageProxy::creationParameters):
2532         * UIProcess/WebPageProxy.h:
2533         Added creationParameters.
2534
2535 2010-09-24  Adam Roben  <aroben@apple.com>
2536
2537         Make WebPage::create take a WebPageCreationParameter struct
2538
2539         It only makes sense, after all.
2540
2541         Fixes <http://webkit.org/b/46502>.
2542
2543         Reviewed by Anders Carlsson.
2544
2545         * WebProcess/WebPage/WebPage.cpp:
2546         (WebKit::WebPage::create):
2547         (WebKit::WebPage::WebPage):
2548         * WebProcess/WebPage/WebPage.h:
2549         Changed to take a WebPageCreationParameters struct.
2550
2551         * WebProcess/WebProcess.cpp:
2552         (WebKit::WebProcess::createWebPage): Changed to pass a
2553         WebPageCreationParameters struct.
2554
2555 2010-09-24  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2556
2557         Reviewed by Andreas Kling.
2558
2559         Expose all WebKit2 C API preferences via the Qt API.
2560
2561         Also rename a wrongly named C method (was using Web instead of WK).
2562
2563         * UIProcess/API/C/WKPreferences.cpp:
2564         (WKPreferencesCopyStandardFontFamily):
2565         * UIProcess/API/C/WKPreferences.h:
2566         * UIProcess/API/qt/qwkpreferences.cpp:
2567         (QWKPreferences::setFontFamily):
2568         (QWKPreferences::fontFamily):
2569         (QWKPreferences::testAttribute):
2570         (QWKPreferences::setAttribute):
2571         * UIProcess/API/qt/qwkpreferences.h:
2572
2573 2010-09-24  Anders Carlsson  <andersca@apple.com>
2574
2575         Reviewed by Adam Roben.
2576
2577         Fill in more of PluginProcess
2578         https://bugs.webkit.org/show_bug.cgi?id=46534
2579
2580         * DerivedSources.make:
2581         Add PluginProcessProxy.
2582
2583         * Platform/CoreIPC/MessageID.h:
2584         Add a MessageClassPluginProcessProxy message class.
2585
2586         * PluginProcess/PluginProcess.cpp:
2587         (WebKit::PluginProcess::PluginProcess):
2588         Initialize the shutdown timer.
2589
2590         (WebKit::PluginProcess::initializeConnection):
2591         Rename this to initializeConnection to avoid conflicts in the CoreIPC message handler.
2592
2593         (WebKit::PluginProcess::removeWebProcessConnection):
2594         Remove the given web process connection from our vector.
2595
2596         (WebKit::PluginProcess::initialize):
2597         Create the plug-in module.
2598
2599         (WebKit::PluginProcess::createWebProcessConnection):
2600         Create a connection handle and send it to the UI process.
2601
2602         (WebKit::PluginProcess::shutdownTimerFired):
2603         Quit.
2604
2605         * PluginProcess/mac/PluginProcessMainMac.mm:
2606         (WebKit::PluginProcessMain):
2607         Call initializeConnection.
2608
2609         * Scripts/webkit2/messages.py:
2610         Add CoreIPC::MachPort as a special case.
2611
2612         * Scripts/webkit2/messages_unittest.py:
2613         Add test case.
2614
2615         * UIProcess/Plugins/PluginProcessProxy.cpp:
2616         (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
2617         Add empty function.
2618
2619         * UIProcess/Plugins/PluginProcessProxy.messages.in: Added.
2620         * WebKit2.xcodeproj/project.pbxproj:
2621         Add PluginProcessProxy.messages.in.
2622
2623         * WebKit2Prefix.h:
2624         Add an ENABLE_PLUGIN_PROCESS #define which is 0 for now.
2625
2626 2010-09-24  Anders Carlsson  <andersca@apple.com>
2627
2628         Reviewed by Adam Roben.
2629
2630         messages_unittest.py should compare the generated results against expected results
2631         https://bugs.webkit.org/show_bug.cgi?id=46490
2632
2633         * Scripts/webkit2/messages_unittest.py:
2634
2635 2010-09-24  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2636
2637         Reviewed by Antonio Gomes.
2638
2639         Make it possible to get the page preferences for Qt WebKit2 port.
2640
2641         * UIProcess/API/qt/qwkpage.cpp:
2642         (QWKPagePrivate::QWKPagePrivate):
2643         (QWKPage::preferences):
2644         * UIProcess/API/qt/qwkpage.h:
2645         * UIProcess/API/qt/qwkpage_p.h:
2646         * UIProcess/API/qt/qwkpreferences.cpp:
2647         (QWKPreferencesPrivate::createPreferences):
2648         (QWKPreferencesPrivate::createSharedPreferences):
2649         (QWKPreferences::sharedPreferences):
2650         (QWKPreferences::QWKPreferences):
2651         * UIProcess/API/qt/qwkpreferences.h:
2652
2653 2010-09-24  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2654
2655         Reviewed by Sam Weinig.
2656
2657         Add WebKit2 C API for setting/getting frame flattening and plugin settings.
2658         http://webkit.org/b/46477
2659
2660         NOTE: The plugin setting was partly done but there was no C API.
2661
2662         * Shared/WebPreferencesStore.cpp:
2663         (WebKit::WebPreferencesStore::WebPreferencesStore):
2664         (WebKit::WebPreferencesStore::encode):
2665         (WebKit::WebPreferencesStore::decode):
2666         * Shared/WebPreferencesStore.h:
2667         * UIProcess/API/C/WKPreferences.cpp:
2668         (WKPreferencesSetFrameFlatteningEnabled):
2669         (WKPreferencesGetFrameFlatteningEnabled):
2670         (WKPreferencesSetPluginsEnabled):
2671         (WKPreferencesGetPluginsEnabled):
2672         * UIProcess/API/C/WKPreferences.h:
2673         * UIProcess/WebPreferences.cpp:
2674         (WebKit::WebPreferences::setFrameFlatteningEnabled):
2675         (WebKit::WebPreferences::frameFlatteningEnabled):
2676         (WebKit::WebPreferences::setPluginsEnabled):
2677         (WebKit::WebPreferences::pluginsEnabled):
2678         * UIProcess/WebPreferences.h:
2679         * WebProcess/WebPage/WebPage.cpp:
2680         (WebKit::WebPage::WebPage):
2681         (WebKit::WebPage::preferencesDidChange):
2682
2683 2010-09-24  Adam Roben  <aroben@apple.com>
2684
2685         Add WebPageCreationParameters
2686
2687         This struct is used in any messages that end up creating a WebPage.
2688         Using a struct instead of individual parameters will make it easier to
2689         add platform-specific data, such as an HWND on Windows.
2690
2691         Fixes <http://webkit.org/b/46470> Pass parameters for creating a
2692         WebPage in a single struct
2693
2694         Reviewed by Anders Carlsson.
2695
2696         * Shared/WebPageCreationParameters.cpp: Added.
2697         (WebKit::WebPageCreationParameters::encode):
2698         (WebKit::WebPageCreationParameters::decode):
2699         Simple encode/decode functions.
2700
2701         * Shared/WebPageCreationParameters.h: Added.
2702
2703         * UIProcess/WebPageProxy.cpp:
2704         (WebKit::WebPageProxy::initializeWebPage):
2705         (WebKit::WebPageProxy::reinitializeWebPage):
2706         (WebKit::WebPageProxy::didReceiveSyncMessage):
2707         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2708         (WebKit::WebChromeClient::createWindow):
2709         * WebProcess/WebProcess.cpp:
2710         (WebKit::WebProcess::createWebPage):
2711         (WebKit::WebProcess::didReceiveMessage):
2712         * WebProcess/WebProcess.h:
2713         Changed to use WebPageCreationParameters instead of passing the
2714         values individually.
2715
2716         * WebKit2.pro:
2717         * WebKit2.xcodeproj/project.pbxproj:
2718         * win/WebKit2.vcproj:
2719         Added WebPageCreationParameters.
2720
2721 2010-09-24  Adam Roben  <aroben@apple.com>
2722
2723         Stop pretending that we know how to encode a DrawingArea and just
2724         encode the DrawingAreaInfo directly
2725
2726         DrawingAreaBase and friends were trying to hide the fact that they
2727         were just encoding/decoding a DrawingAreaInfo behind the scenes, but
2728         everyone knew what was going on and it was getting embarassing.
2729
2730         Fixes <http://webkit.org/b/46469> Code to encode/decode a
2731         DrawingAreaInfo is confusing
2732
2733         Reviewed by Anders Carlsson.
2734
2735         * Shared/DrawingAreaBase.cpp: Removed.
2736         * Shared/DrawingAreaBase.h: Removed encode/decode.
2737         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed encode override.
2738
2739         * UIProcess/WebPageProxy.cpp:
2740         (WebKit::WebPageProxy::initializeWebPage):
2741         (WebKit::WebPageProxy::reinitializeWebPage):
2742         (WebKit::WebPageProxy::didReceiveSyncMessage):
2743         Changed to encode the DrawingAreaInfo directly.
2744
2745         * WebKit2.pro:
2746         * WebKit2.xcodeproj/project.pbxproj:
2747         * win/WebKit2.vcproj:
2748         Removed DrawingAreaBase.cpp.
2749
2750 2010-09-24  Adam Roben  <aroben@apple.com>
2751
2752         Expose a whole DrawingAreaInfo instead of its constituent parts from
2753         DrawingAreaBase
2754
2755         This is just a step toward cleaning up how drawing areas are
2756         encoded/ecoded.
2757
2758         Fixes <http://webkit.org/b/46468> DrawingAreaInfo should be used in
2759         more places
2760
2761         Reviewed by Anders Carlsson.
2762
2763         * Shared/DrawingAreaBase.cpp:
2764         (WebKit::DrawingAreaBase::encode): Changed to use info().
2765
2766         * Shared/DrawingAreaBase.h:
2767         (WebKit::DrawingAreaBase::info): Added. Replaces type() and id().
2768         (WebKit::DrawingAreaBase::DrawingAreaBase): Changed to store a
2769         DrawingAreaInfo instead of storing its constituent parts.
2770
2771         * UIProcess/API/mac/WKView.mm:
2772         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2773         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2774         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2775         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2776         * WebProcess/WebPage/WebPage.cpp:
2777         Updated to use info().
2778
2779 2010-09-24  Anders Carlsson  <andersca@apple.com>
2780
2781         Reviewed by Sam Weinig.
2782
2783         Add WebProcessConnection class
2784         https://bugs.webkit.org/show_bug.cgi?id=46478
2785
2786         * PluginProcess/WebProcessConnection.cpp: Added.
2787         * PluginProcess/WebProcessConnection.h: Added.
2788         Add stubbed out WebProcessConnection class.
2789
2790         * WebKit2.xcodeproj/project.pbxproj:
2791         Add files.
2792
2793 2010-09-24  Anders Carlsson  <andersca@apple.com>
2794
2795         Reviewed by Sam Weinig.
2796
2797         Add PluginProcess class
2798         https://bugs.webkit.org/show_bug.cgi?id=46476
2799
2800         * PluginProcess/PluginProcess.cpp: Added.
2801         * PluginProcess/PluginProcess.h: Added.
2802         Add stubbed out PluginProcess class.
2803
2804         * PluginProcess/mac/PluginProcessMainMac.mm:
2805         (WebKit::PluginProcessMain):
2806         Initialize the plug-in process.
2807
2808         * WebKit2.xcodeproj/project.pbxproj:
2809         Add files.
2810
2811         * WebProcess/Plugins/PluginProcessConnection.h:
2812         Add a comment about which connection this is.
2813
2814 2010-09-24  Sam Weinig  <sam@webkit.org>
2815
2816         Fix windows build.
2817
2818         * Shared/win/PlatformCertificateInfo.cpp:
2819         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2820
2821 2010-09-23  Sam Weinig  <sam@webkit.org>
2822
2823         Reviewed by Adam Roben.
2824
2825         Add Windows implementation of PlatformCertificateInfo
2826         Part of <rdar://problem/8350189>
2827         https://bugs.webkit.org/show_bug.cgi?id=46450
2828
2829         * Shared/win/PlatformCertificateInfo.cpp: Added.
2830         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
2831         (WebKit::PlatformCertificateInfo::~PlatformCertificateInfo):
2832         (WebKit::PlatformCertificateInfo::encode):
2833         (WebKit::PlatformCertificateInfo::decode):
2834         (WebKit::organizationNameForCertificate):
2835         * Shared/win/PlatformCertificateInfo.h:
2836         (WebKit::PlatformCertificateInfo::certificateContext):
2837         * UIProcess/API/C/win/WKCertificateInfoWin.cpp: Added.
2838         (WKCertificateInfoGetCertificateContext):
2839         * UIProcess/API/C/win/WKCertificateInfoWin.h: Added.
2840         * win/WebKit2.vcproj:
2841         * win/WebKit2Generated.make:
2842
2843 2010-09-23  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
2844
2845         Reviewed by Sam Weinig.
2846
2847         Add WebKit2 C API for setting the font families.
2848         https://bugs.webkit.org/show_bug.cgi?id=46408
2849
2850         * UIProcess/API/C/WKPreferences.cpp:
2851         (WKPreferencesSetStandardFontFamily):
2852         (WebPreferencesCopyStandardFontFamily):
2853         (WKPreferencesSetFixedFontFamily):
2854         (WKPreferencesCopyFixedFontFamily):
2855         (WKPreferencesSetSerifFontFamily):
2856         (WKPreferencesCopySerifFontFamily):
2857         (WKPreferencesSetSansSerifFontFamily):
2858         (WKPreferencesCopySansSerifFontFamily):
2859         (WKPreferencesSetCursiveFontFamily):
2860         (WKPreferencesCopyCursiveFontFamily):
2861         (WKPreferencesSetFantasyFontFamily):
2862         (WKPreferencesCopyFantasyFontFamily):
2863         * UIProcess/API/C/WKPreferences.h:
2864         * UIProcess/WebPreferences.cpp:
2865         (WebKit::WebPreferences::setStandardFontFamily):
2866         (WebKit::WebPreferences::standardFontFamily):
2867         (WebKit::WebPreferences::setFixedFontFamily):
2868         (WebKit::WebPreferences::fixedFontFamily):
2869         (WebKit::WebPreferences::setSerifFontFamily):
2870         (WebKit::WebPreferences::serifFontFamily):
2871         (WebKit::WebPreferences::setSansSerifFontFamily):
2872         (WebKit::WebPreferences::sansSerifFontFamily):
2873         (WebKit::WebPreferences::setCursiveFontFamily):
2874         (WebKit::WebPreferences::cursiveFontFamily):
2875         (WebKit::WebPreferences::setFantasyFontFamily):
2876         (WebKit::WebPreferences::fantasyFontFamily):
2877         * UIProcess/WebPreferences.h:
2878         * WebProcess/WebPage/WebPage.cpp:
2879         (WebKit::WebPage::preferencesDidChange):
2880
2881 2010-09-23  Csaba Osztrogonác  <ossy@webkit.org>
2882
2883         Unreviewed buildfix after r68220 on WebKit2.
2884
2885         WebKit2 API: Need way to know when a frame is removed from the hierarchy
2886         https://bugs.webkit.org/show_bug.cgi?id=46432
2887
2888         [Qt] qt_wk_didRemoveFrameFromHierarchy needs to be implemented
2889
2890         * UIProcess/API/qt/ClientImpl.cpp:
2891         (qt_wk_didRemoveFrameFromHierarchy):
2892         * UIProcess/API/qt/ClientImpl.h:
2893         * UIProcess/API/qt/qwkpage.cpp:
2894         (QWKPage::QWKPage):
2895
2896 2010-09-23  Sam Weinig  <sam@webkit.org>
2897
2898         Reviewed by Anders Carlsson.
2899
2900         WebKit2 API: Need way to know when a frame is removed from the hierarchy
2901         <rdar://problem/8414062>
2902         https://bugs.webkit.org/show_bug.cgi?id=46432
2903
2904         * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
2905         * UIProcess/API/C/WKPage.h:
2906         * UIProcess/WebLoaderClient.cpp:
2907         (WebKit::WebLoaderClient::didRemoveFrameFromHierarchy):
2908         * UIProcess/WebLoaderClient.h:
2909         * UIProcess/WebPageProxy.cpp:
2910         (WebKit::WebPageProxy::didReceiveMessage):
2911         (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
2912         * UIProcess/WebPageProxy.h:
2913         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2914         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2915         (WebKit::InjectedBundlePageLoaderClient::didRemoveFrameFromHierarchy):
2916         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2917         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2918         (WebKit::WebFrameLoaderClient::detachedFromParent2):
2919         (WebKit::WebFrameLoaderClient::didTransferChildFrameToNewDocument):
2920
2921 2010-09-23  Anders Carlsson  <andersca@apple.com>
2922
2923         Reviewed by Sam Weinig.
2924
2925         Add PluginProcessConnection and PluginProcessConnectionManager
2926         https://bugs.webkit.org/show_bug.cgi?id=46425
2927
2928         * WebKit2.xcodeproj/project.pbxproj:
2929         Add files.
2930
2931         * WebProcess/Plugins/PluginProcessConnection.cpp:
2932         Add empty file for now.
2933         
2934         * WebProcess/Plugins/PluginProcessConnection.h:
2935         Add header.
2936
2937         * WebProcess/Plugins/PluginProcessConnectionManager.cpp: Added.
2938         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2939         Check for an existing plug-in process connection. If we don't have one, ask the 
2940         UI process to create one.
2941         
2942         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
2943         Remove the connection from our global vector.
2944
2945 2010-09-23  Adam Roben  <aroben@apple.com>
2946
2947         Remove the DrawingAreaProxy parameter to
2948         WebPagProxy::initializeWebPage
2949
2950         Callers are now required to set the drawing area via
2951         WebPageProxy::setDrawingArea before calling initializeWebPage. This
2952         will allow us to delay calling initializeWebPage on Windows until
2953         after we've created the WebView's HWND, which in turn will allow us to
2954         send the HWND over to the web process when the page is created. (The
2955         drawing area must be set before creating the HWND so that its size can
2956         be updated, etc., as the window is created.)
2957
2958         Fixes <http://webkit.org/b/46409> DrawingAreaProxy parameter to
2959         initializeWebPage is unnecessary, and causes problems on Windows
2960
2961         Reviewed by Anders Carlsson.
2962
2963         * UIProcess/API/mac/WKView.mm:
2964         (-[WKView initWithFrame:pageNamespaceRef:]):
2965         * UIProcess/API/qt/qwkpage.cpp:
2966         (QWKPagePrivate::init):
2967         * UIProcess/win/WebView.cpp:
2968         (WebKit::WebView::WebView):
2969         Added explicit calls to setDrawingArea.
2970
2971         * UIProcess/WebPageProxy.cpp:
2972         (WebKit::WebPageProxy::initializeWebPage):
2973         * UIProcess/WebPageProxy.h:
2974         Removed the DrawingAreaProxy parameter and a stray puts(), and added
2975         an assertion.
2976
2977 2010-09-23  Anders Carlsson  <andersca@apple.com>
2978
2979         Reviewed by Darin Adler.
2980
2981         Implement handlers for the GetPluginProcessConnection message
2982         https://bugs.webkit.org/show_bug.cgi?id=46415
2983
2984         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2985         Add GetPluginProcessConnection message kind
2986
2987         * UIProcess/Plugins/PluginProcessManager.cpp:
2988         (WebKit::PluginProcessManager::PluginProcessManager):
2989         Add missing constructor.
2990
2991         * UIProcess/WebProcessProxy.cpp:
2992         (WebKit::WebProcessProxy::getPluginProcessConnection):
2993         Ask the plug-in process manager for a connection.
2994         
2995         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2996         Call getPluginProcessConnection.
2997
2998         * UIProcess/WebProcessProxy.h:
2999         * WebProcess/WebPage/WebPage.cpp:
3000         (WebKit::WebPage::createPlugin):
3001         Send the GetPluginProcessConnection message.
3002
3003 2010-09-23  Matthew Delaney  <mdelaney@apple.com>
3004
3005         Reviewed by Simon Fraser.
3006
3007         Reduce minimum DOMTimer interval
3008         https://bugs.webkit.org/show_bug.cgi?id=45362
3009
3010         * WebProcess/WebPage/WebPage.cpp:
3011         Updating set interval call to use Settings' static version.
3012
3013 2010-09-23  Adam Roben  <aroben@apple.com>
3014
3015         Try to fix the Windows build
3016
3017         * win/WebKit2Common.vsprops: Add WebKit2/PluginProcess to the include
3018         path.
3019
3020 2010-09-23  Anders Carlsson  <andersca@apple.com>
3021
3022         Reviewed by Sam Weinig.
3023
3024         Add PluginProcessMain files
3025         https://bugs.webkit.org/show_bug.cgi?id=46379
3026
3027         * PluginProcess/PluginProcessMain.h: Added.
3028         * PluginProcess/mac/PluginProcessMainMac.mm: Added.
3029         
3030         * WebKit2.xcodeproj/project.pbxproj:
3031         Add PluginProcessMain files. Remove PluginProcess.messages.in from the target so it
3032         won't be installed in the WebKit2.framework bundle.
3033
3034         * WebProcess/WebKitMain.cpp:
3035         (WebKitMain):
3036         Call PluginProcessMain if the process type is ProcessLauncher::PluginProcess.
3037
3038 2010-09-23  Anders Carlsson  <andersca@apple.com>
3039
3040         Reviewed by Sam Weinig.
3041
3042         Add PluginProcessProxy class
3043         https://bugs.webkit.org/show_bug.cgi?id=46377
3044
3045         * DerivedSources.make:
3046         Add PluginProcess.
3047
3048         * Platform/CoreIPC/Connection.h:
3049         (CoreIPC::Connection::send):
3050         Add send overload that takes a message.
3051
3052         * Platform/CoreIPC/MessageID.h:
3053         Add MessageClassPluginProcess message kind.
3054
3055         * PluginProcess/PluginProcess.messages.in: Added.
3056         Add PluginProcess messages.
3057
3058         * UIProcess/Plugins/PluginInfoStore.cpp:
3059         (WebKit::PluginInfoStore::infoForPluginWithPath):
3060         * UIProcess/Plugins/PluginInfoStore.h:
3061         New function that returns the plug-in info for a plug-in with the given path.
3062
3063         * UIProcess/Plugins/PluginProcessManager.cpp:
3064         (WebKit::PluginProcessManager::getPluginProcessConnection):
3065         Look for an existing plug-in process proxy.
3066
3067         * UIProcess/Plugins/PluginProcessProxy.cpp: Added.
3068         (WebKit::PluginProcessProxy::create):
3069         Launch the process.
3070
3071         (WebKit::PluginProcessProxy::didReceiveMessage):
3072         (WebKit::PluginProcessProxy::didReceiveInvalidMessage):
3073         Add stubbed out functions.
3074
3075         (WebKit::PluginProcessProxy::didClose):
3076         Delete the plug-in process proxy.
3077         
3078         (WebKit::PluginProcessProxy::didFinishLaunching):
3079         Open a connection to the plug-in process proxy.
3080
3081         * UIProcess/Plugins/PluginProcessProxy.h: Added.
3082         (WebKit::PluginProcessProxy::pluginInfo):
3083         Return the plug-in info.
3084
3085         * UIProcess/WebProcessProxy.h:
3086         (WebKit::WebProcessProxy::context):
3087         Add a context getter.
3088
3089         * WebKit2.xcodeproj/project.pbxproj:
3090         Add new files.
3091
3092 2010-09-23  Jessie Berlin  <jberlin@apple.com>
3093
3094         Reviewed by Sam Weinig.
3095
3096         Expose the BundlePage on the BundleFrame in the API.
3097         https://bugs.webkit.org/show_bug.cgi?id=46366
3098
3099         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3100         (WKBundleFrameGetPage):
3101         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3102
3103 2010-09-23  Kenneth Rohde Christiansen  <kenneth.christiansen@openbossa.org>
3104
3105         Reviewed by Andreas Kling.
3106
3107         Add a preference class for Qt for WebKit2.
3108
3109         * UIProcess/API/qt/qwkpreferences.cpp: Added.
3110         (QWKPreferences::globalPreferences):
3111         (QWKPreferences::QWKPreferences):
3112         (QWKPreferences::~QWKPreferences):
3113         (QWKPreferences::testAttribute):
3114         (QWKPreferences::setAttribute):
3115         * UIProcess/API/qt/qwkpreferences.h: Added.
3116         * WebKit2.pro:
3117
3118 2010-09-23  Anders Carlsson  <andersca@apple.com>
3119
3120         Reviewed by Adam Roben.
3121
3122         It should be possible to conditionally define an entire group of messages
3123         https://bugs.webkit.org/show_bug.cgi?id=46368
3124
3125         * Scripts/webkit2/messages.py:
3126         Check for a condition when parsing the "messages -> " string and set it as the
3127         message receiver condition.
3128
3129         * Scripts/webkit2/messages_unittest.py:
3130         Add test.
3131
3132 2010-09-23  Anders Carlsson  <andersca@apple.com>
3133
3134         Reviewed by Adam Roben.
3135
3136         Message autogeneration script should parse sync message syntax
3137         https://bugs.webkit.org/show_bug.cgi?id=46359
3138
3139         * Scripts/webkit2/messages.py:
3140         (MessageReceiver.parse): Expand the regular expression to handle sync messages.
3141         (function_parameter_type): Use a const reference for all parameters except the known builtins.
3142         (base_class): Returns the base class for a sync message reply struct.
3143         (delayed_base_class): Returns the base class for a delayed sync message reply struct.
3144         
3145         * Scripts/webkit2/messages_unittest.py:
3146         Add unit tests for various sync messages.
3147
3148 2010-09-22  Andras Becsi  <abecsi@webkit.org>
3149
3150         Unreviewed build fix after r68079.
3151
3152         [Qt] Also generate WebPage's message-receiving code and message types
3153         for the Qt port of WebKit2.
3154
3155         * DerivedSources.pro:
3156         * WebKit2.pro:
3157
3158 2010-09-22  Anders Carlsson  <andersca@apple.com>
3159
3160         Reviewed by Adam Roben.
3161
3162         Stub out a PluginProcessManager class
3163         https://bugs.webkit.org/show_bug.cgi?id=46305
3164
3165         * UIProcess/Plugins/PluginProcessManager.cpp: Added.
3166         (WebKit::PluginProcessManager::shared):
3167         (WebKit::PluginProcessManager::getPluginProcessConnection):
3168         (WebKit::PluginProcessManager::removePluginProcessProxy):
3169         * UIProcess/Plugins/PluginProcessManager.h: Added.
3170         * WebKit2.xcodeproj/project.pbxproj:
3171
3172 2010-09-22  Kenneth Rohde Christiansen  <kenneth@webkit.org>
3173
3174         Reviewed by Antonio Gomes.
3175
3176         Add a ViewportConfiguration class for the Qt WebKit2 API, which
3177         currently calculated a fallback viewport configuration.
3178
3179         * UIProcess/API/qt/qwkpage.cpp:
3180         (QWKPage::ViewportConfiguration::ViewportConfiguration):
3181         (QWKPage::ViewportConfiguration::~ViewportConfiguration):
3182         (QWKPage::ViewportConfiguration::operator=):
3183         (QWKPage::viewportConfigurationForSize):
3184         * UIProcess/API/qt/qwkpage.h:
3185         * UIProcess/API/qt/qwkpage_p.h:
3186         (QtViewportConfigurationPrivate::QtViewportConfigurationPrivate):
3187
3188 2010-09-22  Adam Roben  <aroben@apple.com>
3189
3190         Windows build fix
3191
3192         * WebProcess/WebKitMain.cpp:
3193         (WebKitMain): Fix typo
3194
3195 2010-09-22  Adam Roben  <aroben@apple.com>
3196
3197         Autogenerate WebPage's message-receiving code and message types
3198
3199         This patch encompasses several changes that allow message types and
3200         receiving code to be generated by a script, and add some type-safety
3201         as a bonus. Messages are now represented by structs instead of an ID +
3202         ArgumentCoder. The struct contains the arguments and the ID together,
3203         and has a constructor that enforces the use of correct types.
3204         Correspondingly, a new overload of WebProcessProxy::send that takes a
3205         message struct (instead of a message ID and separate arguments) has
3206         been added. Eventually all callers should use this overload and the
3207         old one can be removed.
3208
3209         This patch only touches WebPage's messages. We should transition other
3210         message receivers over to this new system eventually.
3211
3212         Fixes <http://webkit.org/b/43636> <rdar://problem/8282462> Add a
3213         type-safe IPC mechanism to WebKit2
3214
3215         Reviewed by Anders Carlsson.
3216
3217         * DerivedSources.make: Added. Calls generate-message-receiver.py and
3218         generate-messages-header.py for each message receiver it knows about
3219         (just WebPage for now).
3220
3221         * Platform/CoreIPC/Arguments.h: Added First/Second/ThirdArgumentType
3222         typedefs for use in handleMessage.
3223
3224         * Platform/CoreIPC/HandleMessage.h: Added.
3225         (CoreIPC::handleMessage): This overloaded function template decodes
3226         arguments and passes them along to the specified function.
3227
3228         * Scripts/generate-message-receiver.py: Added.
3229         * Scripts/generate-messages-header.py: Added.
3230         These scripts just wrap functionality in messages.py.
3231
3232         * Scripts/webkit2/__init__.py: Added. This just exists so that Python
3233         will treat this directory as a package.
3234
3235         * Scripts/webkit2/messages.py: Added. Contains the code to parse
3236         messages files and generate .cpp/.h files from them.
3237         (MessageReceiver.__init__): This class represents a single receiver of
3238         messages.
3239         (MessageReceiver.iterparameters): Returns a generator that can be used
3240         to iterate over all the parameters of all the messages of this
3241         receiver.
3242         (MessageReceiver.parse): Reads a messages file from a file-like object
3243         and parses it into a MessageReceiver object.
3244         (Message.__init__): This class represents a single message.
3245         (Message.id): Returns the ID name for this message.
3246         (Parameter.__init__): This class represents a single parameter for a
3247         message.
3248         (messages_header_filename): Returns the name of the header that
3249         defines the messages for a given receiver.
3250         (surround_in_condition): Surrounds the given string in #if/#endif if
3251         there is an associated condition.
3252         (messages_to_kind_enum): Returns a string that defines the Kind enum
3253         for these messages.
3254         (function_parameter_type): Returns the type that should be used when
3255         passing a value of the given type as a parameter to a function.
3256         (base_class): Returns the base class for a message struct.
3257         (message_to_struct_declaration): Returns a string that declares the
3258         struct for this message.
3259         (forward_declarations_for_namespace): Returns a string that contains
3260         forward-declarations for a set of types in a given namespace.
3261         (forward_declarations): Returns a string that contains all the
3262         forward-declarations needed in order to declare all the message
3263         structs for this receiver.
3264         (generate_header_file): Returns a string containing the messages
3265         header file for this receiver.
3266         (handler_function): Returns the name of the function that handles a
3267         given message for a given receiver.
3268         (case_statement): Returns a string containing a case statement for
3269         handling the given message.
3270         (header_for_type): Returns the header needed to define a given type,
3271         enclosed in quotes or angle brackets as needed.
3272         (generate_message_handler): Returns a string containing the contents
3273         of a .cpp file that defines a didReceive*Message function.
3274
3275         * Scripts/webkit2/messages_unittest.py: Added. Contains tests for
3276         messages.py.
3277
3278         * Shared/CoreIPCSupport/WebPageMessageKinds.h: Removed. This has been
3279         replaced by a generated WebPageMessages.h header.
3280
3281         * UIProcess/WebEditCommandProxy.cpp:
3282         * UIProcess/WebPageProxy.cpp:
3283         Updated to use the new message structs and WebProcessProxy::send
3284         overload.
3285
3286         * UIProcess/WebProcessProxy.h:
3287         (WebKit::WebProcessProxy::send): Added this new overload that takes a
3288         message struct.
3289
3290         * WebKit2.xcodeproj/project.pbxproj: Added a Derived Sources shell
3291         script target that invokes DerivedSources.make. Added "Derived
3292         Sources" and "Scripts" groups that contain the various new files.
3293
3294         * WebProcess/WebPage/WebPage.cpp:
3295         (WebKit::WebPage::didReceivePolicyDecision):
3296         (WebKit::WebPage::getSourceForFrame):
3297         Changed these functions to take the raw IPC types and do the necessary
3298         translation themselves. This keeps the generated code from need to
3299         know how to perform the translation.
3300
3301         (WebKit::WebPage::didReceiveMessage): Replaced handling of WebPage
3302         messages with a call to didReceiveWebPageMessage, whose implementation
3303         is generated by the scripts.
3304
3305         * WebProcess/WebPage/WebPage.h: Added didReceiveWebPageMessage.
3306
3307         * WebProcess/WebPage/WebPage.messages.in: Added. This file declares
3308         all of the messages that WebPage receives, roughly grouped by
3309         functionality.
3310
3311         * win/WebKit2.vcproj: Added "Derived Sources" and "Scripts" filters
3312         that contain the various new files. Let VS resort some other files.
3313
3314         * win/WebKit2Common.vsprops: Added
3315         $(WebKitOutputDir)\obj\$(ProjectName)\DerivedSources to the include
3316         path so that the generated messages header can be found.
3317
3318         * win/WebKit2.make: Copy the generated source files to $(DSTROOT).
3319
3320         * win/WebKit2Generated.make: Added a call to build-generated-files.sh.
3321
3322         * win/WebKit2Generated.vcproj: Added build-generated-files.sh.
3323
3324         * win/build-generated-files.sh: Added. Invokes DerivedSources.make.
3325
3326 2010-09-22  Anders Carlsson  <andersca@apple.com>
3327
3328         Reviewed by Darin Adler.
3329
3330         Enhance ProcessLauncher to be able to launch plug-in processes
3331         https://bugs.webkit.org/show_bug.cgi?id=46295
3332
3333         * UIProcess/Launcher/ProcessLauncher.cpp:
3334         (WebKit::ProcessLauncher::ProcessLauncher):
3335         Make the ProcessLauncher constructor take a LaunchOptions struct.
3336
3337         (WebKit::ProcessLauncher::processTypeAsString):
3338         Given a process type, return its string representation.
3339
3340         (WebKit::ProcessLauncher::getProcessTypeFromString):
3341         And vice versa.
3342
3343         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3344         (WebKit::ProcessLauncher::launchProcess):
3345         Rename "mode" to "type" and pass the type as a string based on the LaunchOptions struct.
3346         Also, set the launch architecture from the LaunchOptions struct.
3347
3348         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3349         (WebKit::ProcessLauncher::launchProcess):
3350         Rename "mode" to "type."
3351
3352         * UIProcess/WebProcessProxy.cpp:
3353         (WebKit::WebProcessProxy::connect):
3354         Initialize a LaunchOptions struct.
3355
3356         * WebProcess/WebKitMain.cpp:
3357         (WebKitMain):
3358         Factor code that can be shared between the mac and windows WebKitMain code out into a
3359         WebKitMain overload that takes a CommandLine.
3360
3361         * WebProcess/WebProcessMain.h:
3362         * WebProcess/mac/WebProcessMainMac.mm:
3363         (WebKit::WebProcessMain):
3364         * WebProcess/win/WebProcessMainWin.cpp:
3365         (WebKit::WebProcessMain):
3366         Change WebProcessMain to take a const CommandLine reference instead of a pointer.
3367
3368 2010-09-22  Anders Carlsson  <andersca@apple.com>
3369
3370         Reviewed by Adam Roben.
3371
3372         Rename GetPluginHostConnection to GetPluginPath
3373         https://bugs.webkit.org/show_bug.cgi?id=46292
3374
3375         Rename GetPluginHostConnection to GetPluginPath since this message will always get the
3376         plug-in path. We'll add another message to actually get the connection.
3377
3378         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
3379         * UIProcess/WebProcessProxy.cpp:
3380         (WebKit::WebProcessProxy::getPluginPath):
3381         (WebKit::WebProcessProxy::didReceiveMessage):
3382         (WebKit::WebProcessProxy::didReceiveSyncMessage):
3383         * UIProcess/WebProcessProxy.h:
3384         * WebProcess/WebPage/WebPage.cpp:
3385         (WebKit::WebPage::createPlugin):
3386
3387 2010-09-22  Anders Carlsson  <andersca@apple.com>
3388
3389         Reviewed by Adam Roben.
3390
3391         Move plug-in creation to WebPage::createPlugin
3392         https://bugs.webkit.org/show_bug.cgi?id=46289
3393
3394         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3395         (WebKit::WebFrameLoaderClient::createPlugin):
3396         Call WebPage::createPlugin.
3397
3398         * WebProcess/WebPage/WebPage.cpp:
3399         (WebKit::WebPage::createPlugin):
3400         Create the plug-in.
3401
3402 2010-09-22  Anders Carlsson  <andersca@apple.com>
3403
3404         Reviewed by Darin Adler.
3405
3406         Random plug-in cleanups
3407         https://bugs.webkit.org/show_bug.cgi?id=46279
3408
3409         * WebProcess/Plugins/Plugin.cpp:
3410         (WebKit::Plugin::Parameters::encode):
3411         (WebKit::Plugin::Parameters::decode):
3412         Add CoreIPC coding support for the Plugin::Parameters struct.
3413
3414         * WebProcess/Plugins/PluginController.h:
3415         Add pluginProcessCrashed pure virtual member function.
3416
3417         * WebProcess/Plugins/PluginView.cpp:
3418         (WebKit::PluginView::handleEvent):
3419         handleEvent can be called when m_plugin is null.
3420
3421         (WebKit::PluginView::pluginProcessCrashed):
3422         Ask the renderer to show the crashed plug-in indicator.
3423         
3424 2010-09-22  Anders Carlsson  <andersca@apple.com>
3425
3426         Reviewed by John Sullivan.
3427
3428         Don't listen for some window notifications on all windows
3429         https://bugs.webkit.org/show_bug.cgi?id=46277
3430
3431         Only listen for NSWindowDidBecomeKeyNotification and NSWindowDidResignKeyNotification notifications
3432         on all windows; this matches old WebKit and fixes a crash where we would send notifications to views whose
3433         underlying pages were invalid.
3434
3435         * UIProcess/API/mac/WKView.mm:
3436         (-[WKView addWindowObserversForWindow:]):
3437         (-[WKView removeWindowObservers]):
3438
3439 2010-09-22  Anders Carlsson  <andersca@apple.com>
3440
3441         Reviewed by Adam Roben.
3442
3443         Crash when running plug-in layout tests
3444         https://bugs.webkit.org/show_bug.cgi?id=46269
3445
3446         Store the web page directly in the PluginView class, instead of getting it from the frame
3447         of the plug-in element; this fixes two crashes, one where the plug-in element had been deallocated
3448         before the plug-in view, and another where the plug-in element's document did not have a frame.
3449
3450         This also makes things more robust since we're asserting in the WebPage destructor that no plug-ins have
3451         an outstanding reference to it.
3452         
3453         * WebProcess/Plugins/PluginView.cpp:
3454         (WebKit::webPage):
3455         (WebKit::PluginView::PluginView):
3456         (WebKit::PluginView::~PluginView):
3457         (WebKit::PluginView::initializePlugin):
3458         * WebProcess/Plugins/PluginView.h:
3459
3460 2010-09-22  Anders Carlsson  <andersca@apple.com>
3461
3462         Reviewed by Adam Roben.
3463
3464         Change a bunch of Vector<char> to Vector<uint8_t> to better indicate that we're
3465         dealing with raw bytes.
3466
3467         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3468         (WebKit::parsePostBuffer):
3469         (WebKit::NPN_GetURL):
3470         (WebKit::NPN_PostURL):
3471         (WebKit::NPN_GetURLNotify):
3472         (WebKit::NPN_PostURLNotify):
3473         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3474         (WebKit::NetscapePlugin::loadURL):
3475         (WebKit::NetscapePlugin::initialize):
3476         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3477         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3478         (WebKit::NetscapePluginStream::deliverData):
3479         (WebKit::NetscapePluginStream::deliverDataToPlugin):
3480         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3481         * WebProcess/Plugins/PluginController.h:
3482         * WebProcess/Plugins/PluginView.cpp:
3483         (WebKit::PluginView::loadURL):
3484         * WebProcess/Plugins/PluginView.h:
3485
3486 2010-09-22  Anders Carlsson  <andersca@apple.com>
3487
3488         Reviewed by Adam Roben.
3489
3490         Assertion fails in [WKView _updateWindowFrame] when closing a WebKit2 window
3491         https://bugs.webkit.org/show_bug.cgi?id=46264
3492         <rdar://problem/8463534>
3493
3494         * UIProcess/API/mac/WKView.mm:
3495         (-[WKView viewDidMoveToWindow]):
3496         Only update window visibility and frame when we're moving to a window.
3497
3498 2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
3499
3500         Reviewed by Kenneth Rohde Christiansen.
3501
3502         [Qt] PluginStrategy implementation is broken
3503         https://bugs.webkit.org/show_bug.cgi?id=46078
3504
3505         * UIProcess/API/qt/qwkpage.cpp:
3506         (QWKPagePrivate::QWKPagePrivate):
3507         Initialize the WebPlatformStrategies at the UI side as well because
3508         we are using the LocalizationStrategy in the UI process.
3509         Added a FIXME since this should be fixed in the future.
3510
3511 2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
3512
3513         Reviewed by Kenneth Rohde Christiansen.
3514
3515         PluginStrategy should satisfy the needs of Qt
3516         https://bugs.webkit.org/show_bug.cgi?id=45857
3517         No new functionality so no new tests.
3518
3519         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3520         (WebKit::WebPlatformStrategies::getPluginInfo):
3521         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3522
3523 2010-09-21  Steve Falkenburg  <sfalken@apple.com>
3524
3525         Rubber stamped by Simon Fraser.
3526
3527         Add DirectX SDK include path.
3528
3529         * win/WebKit2DirectX.vsprops:
3530
3531 2010-09-21  Anders Carlsson  <andersca@apple.com>
3532
3533         Reviewed by Dan Bernstein.
3534
3535         Forward window focus changes to the plug-in
3536         https://bugs.webkit.org/show_bug.cgi?id=46227
3537
3538         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3539         (WebKit::NetscapePlugin::windowFocusChanged):
3540         Send the NPCocoaEventWindowFocusChanged event.
3541
3542         (WebKit::NetscapePlugin::windowFrameChanged):
3543         (WebKit::NetscapePlugin::windowVisibilityChanged):
3544         Add stubs.
3545
3546         * WebProcess/Plugins/Plugin.h:
3547         Add windowFocusChanged, windowFrameChanged and windowVisibilityChanged.
3548
3549         * WebProcess/Plugins/PluginView.cpp:
3550         (WebKit::PluginView::webPage):
3551         Make webPage a member function instead.
3552
3553         (WebKit::PluginView::setWindowIsFocused):
3554         Call the plug-in member function.
3555
3556         (WebKit::PluginView::initializePlugin):
3557         When the plug-in has been initialized, update its window frame, window visibility 
3558         and window focus states.
3559
3560         (WebKit::PluginView::setParent):
3561         Move viewGeometryDidChange to initializePlugin.
3562         
3563         * WebProcess/Plugins/PluginView.h:
3564         * WebProcess/WebPage/WebPage.cpp:
3565         (WebKit::WebPage::setActive):
3566         Tell all plug-in views about the new window focus state.
3567
3568         (WebKit::WebPage::windowIsFocused):
3569         Return whether the window is focused or not.
3570
3571         * WebProcess/WebPage/WebPage.h:
3572         (WebKit::WebPage::windowIsVisible):
3573         (WebKit::WebPage::windowFrame):
3574         Add getters.
3575
3576 2010-09-21  Anders Carlsson  <andersca@apple.com>
3577
3578         Reviewed by John Sullivan.
3579
3580         Handle booleans in injected bundle messages
3581         https://bugs.webkit.org/show_bug.cgi?id=46213
3582
3583         * Shared/UserMessageCoders.h:
3584         (WebKit::UserMessageEncoder::baseEncode):
3585         (WebKit::UserMessageDecoder::baseDecode):
3586
3587 2010-09-21  Brian Weinstein  <bweinstein@apple.com>
3588
3589         Reviewed by Adam Roben.
3590
3591         WebKit2 should look for WebKit2WebProcess.exe next to WebKit.dll
3592         https://bugs.webkit.org/show_bug.cgi?id=46209
3593         <rdar://problem/8445639>
3594         
3595         Find WebKit2WebProcess.exe by getting the full path to WebKit.dll, and then
3596         removing the last path component and replacing it with WebKit2WebProcess.exe.
3597
3598         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
3599         (WebKit::ProcessLauncher::launchProcess):
3600
3601 2010-09-21  Anders Carlsson  <andersca@apple.com>
3602
3603         Reviewed by Adam Roben.
3604
3605         Send window visibility and window frame change sizes to the plug-in
3606         https://bugs.webkit.org/show_bug.cgi?id=46202
3607
3608         * Shared/CoreIPCSupport/WebPageMessageKinds.h:
3609         * UIProcess/API/mac/WKView.mm:
3610         (-[WKView _updateWindowVisibility]):
3611         Call WebPageProxy::setWindowIsVisible.
3612
3613         (-[WKView addWindowObserversForWindow:]):
3614         Add additional observers.
3615
3616         (-[WKView removeWindowObservers]):
3617         Remove observers.
3618
3619         (-[WKView _updateWindowFrame]):
3620         Call WebPageProxy::setWindowFrame.
3621
3622         (-[WKView viewDidMoveToWindow]):
3623         Update the window visibility and the web frame.
3624
3625         (-[WKView _windowDidMiniaturize:]):
3626         (-[WKView _windowDidDeminiaturize:]):
3627         Update the window visibility.
3628
3629         (-[WKView _windowFrameDidChange:]):
3630         Update the window frame.
3631
3632         * UIProcess/WebPageProxy.cpp:
3633         (WebKit::WebPageProxy::setWindowIsVisible):
3634         (WebKit::WebPageProxy::setWindowFrame):
3635         Send messages along to the web process.
3636
3637         * WebProcess/Plugins/PluginView.cpp:
3638         (WebKit::PluginView::PluginView):
3639         Register the plug-in view.
3640
3641         (WebKit::PluginView::~PluginView):
3642         Unregister the plug-in view.
3643
3644         (WebKit::PluginView::setWindowIsVisible):
3645         (WebKit::PluginView::setWindowFrame):
3646         Add empty stubs.