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