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