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