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