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