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