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