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