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