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