WebCore: [chromium] REGRESSION(72141): Chromium fails acid3 on windows and linux
[WebKit-https.git] / WebKit2 / ChangeLog
1 2010-11-18  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Keep the web process alive if there are active downloads
6         https://bugs.webkit.org/show_bug.cgi?id=49755
7
8         Make sure that Download objects are destroyed when the download finishes or fails.
9         Don't close the web process if there are live Download objects.
10         
11         * UIProcess/Downloads/DownloadProxy.cpp:
12         (WebKit::DownloadProxy::didFail):
13         Add stub.
14
15         * UIProcess/Downloads/DownloadProxy.h:
16         * UIProcess/Downloads/DownloadProxy.messages.in:
17         Add DidFail message.
18
19         * WebProcess/Downloads/Download.cpp:
20         (WebKit::Download::didFinish):
21         Call DownloadManager::downloadFinished.
22
23         (WebKit::Download::didFail):
24         Send DidFail message and call DownloadManager::downloadFinished.
25         
26         * WebProcess/Downloads/Download.h:
27         (WebKit::Download::destinationID):
28         Call downloadID().
29
30         (WebKit::Download::downloadID):
31         Return the download ID.
32
33         * WebProcess/Downloads/DownloadManager.cpp:
34         (WebKit::DownloadManager::downloadFinished):
35         Delete the Download object and call WebProcess::shutdownIfPossible.
36
37         * WebProcess/Downloads/DownloadManager.h:
38         (WebKit::DownloadManager::isDownloading):
39         Return whether the download manager has any active downloads.
40
41         * WebProcess/Downloads/mac/DownloadMac.mm:
42         (-[WKDownloadAsDelegate download:didFailWithError:]):
43         Call Download::didFail.
44
45         * WebProcess/WebProcess.cpp:
46         (WebKit::WebProcess::removeWebPage):
47         Call shutdownIfPossible.
48
49         (WebKit::WebProcess::shutdownIfPossible):
50         New function. Don't shutdown if there are live pages or active downloads.
51
52         * WebProcess/WebProcess.h:
53
54 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
55
56         Reviewed by Adam Roben.
57
58         Debug_Internal Windows configuration is unnecessary, should be removed
59         https://bugs.webkit.org/show_bug.cgi?id=49753
60
61         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
62         * WebKit2Prefix.h:
63
64 2010-11-18  Steve Falkenburg  <sfalken@apple.com>
65
66         Reviewed by Adam Roben.
67
68         Clean up vcproj errors
69         https://bugs.webkit.org/show_bug.cgi?id=49741
70
71         * win/WebKit2WebProcess.vcproj:
72
73 2010-11-18  Benjamin Poulain  <benjamin.poulain@nokia.com>
74
75         Reviewed by Laszlo Gombos.
76
77         [Qt] [WK2] WebKit 2 would not compile for Qt without ENABLE_TOUCH_EVENT
78         https://bugs.webkit.org/show_bug.cgi?id=49664
79
80         Move the ENABLE(TOUCH_EVENTS) to the code where internal WebKit touch
81         types are used.
82
83         * UIProcess/API/qt/qgraphicswkview.cpp:
84         (QGraphicsWKView::touchEvent):
85         * UIProcess/API/qt/qwkpage.cpp:
86         (QWKPagePrivate::touchEvent):
87
88 2010-11-17  Andreas Kling  <kling@webkit.org>
89
90         Reviewed by Kenneth Rohde Christiansen.
91
92         Reuse the size of the actualVisibleContentRect when loading a new page
93         or navigating session history.
94
95         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
96         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
97
98 2010-11-17  Dimitri Glazkov  <dglazkov@chromium.org>
99
100         Reviewed by Darin Adler.
101
102         Converge means of querying a parent node into one way, which is Node::parentNode.
103         https://bugs.webkit.org/show_bug.cgi?id=49686
104
105         * WebProcess/WebPage/WebPage.cpp: Changed to use parentNode.
106         (WebKit::WebPage::findZoomableAreaForPoint): Ditto.
107
108 2010-11-17  Timothy Hatcher  <timothy@apple.com>
109
110         Remove duplicate Web Inspector message handeling in WebPage::didReceiveMessage.
111
112         https://webkit.org/b/49689
113
114         Reviewed by Andreas Kling.
115
116         * WebProcess/WebPage/WebPage.cpp:
117         (WebKit::WebPage::didReceiveMessage): Remove duplicate code.
118
119 2010-11-17  Timothy Hatcher  <timothy@apple.com>
120
121         Fix a crash when closing the inspected page when the Web Inspector
122         page was never created.
123
124         https://bugs.webkit.org/show_bug.cgi?id=49687
125
126         Reviewed by John Sullivan.
127
128         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
129         (WebKit::WebInspectorClient::sendMessageToFrontend): Null check the Inspector WebPage.
130
131 2010-11-17  Anders Carlsson  <andersca@apple.com>
132
133         Reviewed by John Sullivan.
134
135         Don't crash when invalidating a page overlay that hasn't been installed yet
136         https://bugs.webkit.org/show_bug.cgi?id=49685
137
138         Null check the web page.
139
140         * WebProcess/WebPage/PageOverlay.cpp:
141         (WebKit::PageOverlay::setNeedsDisplay):
142
143 2010-11-17  Brady Eidson  <beidson@apple.com>
144
145         Reviewed by Darin Adler.
146
147         https://bugs.webkit.org/show_bug.cgi?id=49682 - Expose "removeItemAtIndex" in WKMutableArray
148
149         * Shared/API/c/WKMutableArray.cpp:
150         (WKArrayRemoveItemAtIndex):
151         * Shared/API/c/WKMutableArray.h:
152
153         * Shared/MutableArray.cpp:
154         (WebKit::MutableArray::removeItemAtIndex):
155         * Shared/MutableArray.h:
156
157 2010-11-17  Brady Eidson  <beidson@apple.com>
158
159         Reviewed by Anders Carlsson.
160
161         https://bugs.webkit.org/show_bug.cgi?id=49683 - Export WKContextMenuItem and WKContextMenuItemTypes as public headers
162
163         * WebKit2.xcodeproj/project.pbxproj:
164
165 2010-11-17  Anders Carlsson  <andersca@apple.com>
166
167         Reviewed by Darin Adler.
168
169         Need way to invalidate part of a WKOverlayRef so it will be redrawn
170         https://bugs.webkit.org/show_bug.cgi?id=49679
171         <rdar://problem/8679152>
172
173         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
174         (WKBundlePageOverlaySetNeedsDisplay):
175         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
176         * WebProcess/WebPage/PageOverlay.cpp:
177         (WebKit::PageOverlay::setNeedsDisplay):
178         * WebProcess/WebPage/PageOverlay.h:
179
180 2010-11-17  Timothy Hatcher  <timothy@apple.com>
181
182         Provide a way to create a WKView (WebPage) that is hidden from
183         the InjectedBundle. This is needed for the Web Inspector.
184
185         https://webkit.org/b/49670
186
187         Reviewed by Sam Weinig.
188
189         * Shared/WebPageCreationParameters.cpp:
190         (WebKit::WebPageCreationParameters::encode): Added visibleToInjectedBundle.
191         (WebKit::WebPageCreationParameters::decode): Ditto.
192         * Shared/WebPageCreationParameters.h: Ditto.
193         * UIProcess/API/C/win/WKView.cpp:
194         (WKViewCreate): Pass VisibleToInjectedBundle to the WebView create function.
195         * UIProcess/API/C/win/WKViewPrivate.cpp:
196         (WKViewCreateForWebInspector): Added. Not used yet. Passes HiddenFromInjectedBundle
197         to the WebView create function.
198         * UIProcess/API/C/win/WKViewPrivate.h: Added WKViewCreateForWebInspector.
199         * UIProcess/API/mac/WKView.mm:
200         (-[WKView initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:]): Added hiddenFromInjectedBundle
201         parameter and calls WebPageProxy::setVisibleToInjectedBundle.
202         (-[WKView initWithFrame:pageNamespaceRef:]): Calls initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:
203         and passes NO for hiddenFromInjectedBundle.
204         (-[WKView initWithFrame:]): Cleaned up by removing the local assignment to self and just returns the result.
205         * UIProcess/API/mac/WKViewInternal.h: Added initWithFrame:pageNamespaceRef:hiddenFromInjectedBundle:.
206         * UIProcess/WebPageProxy.cpp:
207         (WebKit::WebPageProxy::WebPageProxy): Initialize m_visibleToInjectedBundle from the creation parameters.
208         (WebKit::WebPageProxy::creationParameters): Set visibleToInjectedBundle using m_visibleToInjectedBundle.
209         * UIProcess/WebPageProxy.h: Added m_visibleToInjectedBundle.
210         (WebKit::WebPageProxy::visibleToInjectedBundle): Added. Return m_visibleToInjectedBundle.
211         (WebKit::WebPageProxy::setVisibleToInjectedBundle): Added. Set m_visibleToInjectedBundle.
212         * UIProcess/win/WebView.cpp:
213         (WebKit::WebView::WebView): Added InjectedBundleVisibility parameter and calls
214         WebPageProxy::setVisibleToInjectedBundle.
215         * UIProcess/win/WebView.h: Added InjectedBundleVisibility enum.
216         (WebKit::WebView::create): Added InjectedBundleVisibility parameter.
217         * WebProcess/WebPage/WebPage.cpp:
218         (WebKit::WebPage::create): Checks visibleToInjectedBundle before talking to the injected bundle.
219         (WebKit::WebPage::WebPage): Initialize m_isVisibleToInjectedBundle from the creation parameters.
220         (WebKit::WebPage::close): Checks m_isVisibleToInjectedBundle before talking to the injected bundle.
221         * WebProcess/WebPage/WebPage.h: Added m_isVisibleToInjectedBundle.
222
223 2010-11-17  Andras Becsi  <abecsi@webkit.org>
224
225         Unreviewed buildfix.
226
227         [Qt] D'oh! I screwed up the dependencies.
228
229         * DerivedSources.pro:
230
231 2010-11-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
232
233         Reviewed by Andreas Kling.
234
235         [WK2] Set paintsEntireContents for "resizes to contents" mode
236
237         Only relevant for the tiled backing store.
238
239         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
240         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
241         * WebProcess/WebPage/WebPage.cpp:
242         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
243
244 2010-11-17  Andras Becsi  <abecsi@webkit.org>
245
246         Reviewed by Andreas Kling.
247
248         [Qt][WK2] Make it possible to set custom user agent strings in MiniBrowser
249         https://bugs.webkit.org/show_bug.cgi?id=49627
250
251         Copy the MiniBrowser.qrc and QtTestBrowser's useragentlist.txt file
252         to the build directory of MiniBrowser because it has to be in a
253         subdirectory of the resource file.
254         Add a method to QWKPage to retrieve the custom user agent string.
255
256         * DerivedSources.pro:
257         * UIProcess/API/qt/qwkpage.cpp:
258         (QWKPage::customUserAgent):
259         * UIProcess/API/qt/qwkpage.h:
260
261 2010-11-17  Simon Fraser  <simon.fraser@apple.com>
262
263         Reviewed by Adam Roben.
264
265         https://bugs.webkit.org/show_bug.cgi?id=45567
266         Add stubbed-out layer-backed drawing area for Windows.
267
268         Add implementations of LayerBackedDrawingArea and
269         LayerBackedDrawingAreaProxy for Windows, and add them
270         to the vcproj.
271
272         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
273         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Added.
274         (WebKit::LayerBackedDrawingAreaProxy::page):
275         (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
276         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
277         (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
278         (WebKit::LayerBackedDrawingAreaProxy::paint):
279         * UIProcess/win/WebView.cpp:
280         (WebKit::WebView::pageDidEnterAcceleratedCompositing):
281         (WebKit::WebView::pageDidLeaveAcceleratedCompositing):
282         (WebKit::WebView::switchToDrawingAreaTypeIfNecessary):
283         * UIProcess/win/WebView.h:
284         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
285         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Added.
286         (WebKit::LayerBackedDrawingArea::platformInit):
287         (WebKit::LayerBackedDrawingArea::platformClear):
288         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
289         (WebKit::LayerBackedDrawingArea::detachCompositingContext):
290         (WebKit::LayerBackedDrawingArea::setRootCompositingLayer):
291         (WebKit::LayerBackedDrawingArea::scheduleCompositingLayerSync):
292         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
293         * win/WebKit2.vcproj:
294
295 2010-11-17  Benjamin Poulain  <benjamin.poulain@nokia.com>
296
297         Reviewed by Kenneth Rohde Christiansen.
298
299         [Qt] [WK2] The focus switching does not seems to work with QGraphicsWKView
300         https://bugs.webkit.org/show_bug.cgi?id=49545
301
302         Implement focus switching with Tab. This is now done asynchronously,
303         waiting for webkit to call takeFocus() and switching the widget.
304
305         Since the focus can change between the Tab press and the callback,
306         QGraphicsWKView::focusNextPrevChildCallback() make sure the view still has
307         focus before passing it to the next widget.
308
309         * UIProcess/API/qt/qgraphicswkview.cpp:
310         (QGraphicsWKView::QGraphicsWKView):
311         (QGraphicsWKView::focusNextPrevChildCallback):
312         (QGraphicsWKView::focusNextPrevChild):
313         * UIProcess/API/qt/qgraphicswkview.h:
314         * UIProcess/API/qt/qwkpage.cpp:
315         (QWKPagePrivate::takeFocus):
316         * UIProcess/API/qt/qwkpage.h:
317         * UIProcess/API/qt/qwkpage_p.h:
318
319 2010-11-17  Andreas Kling  <kling@webkit.org>
320
321         Reviewed by Kenneth Rohde Christiansen.
322
323         Don't prohibit scrolling in tiled backing store mode.
324
325         We delegate scrolling instead.
326
327         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
328         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
329
330 2010-11-17  Simon Hausmann  <simon.hausmann@nokia.com>
331
332         Reviewed by Kenneth Christiansen.
333
334         [Qt] Improve painting performance on 16-bit displays
335
336         When the default pixmap depth is 16-bit, then use RGB16 instead of
337         RGB32 for the chunks, to avoid unnecessary conversions and reduce
338         chunk size. The conversions happen as images as QPixmaps have 16-bit
339         depth and the tiles on the ui process are also backed by QPixmaps.
340
341         * Shared/qt/UpdateChunk.cpp:
342         (WebKit::UpdateChunk::size):
343         (WebKit::UpdateChunk::createImage):
344         * Shared/qt/UpdateChunk.h:
345
346 2010-11-16  Sam Weinig  <sam@webkit.org>
347
348         Reviewed by Adam Roben.
349
350         WebKit2: Support enabling site-specific quirks
351         <rdar://problem/8451371>
352         https://bugs.webkit.org/show_bug.cgi?id=46076
353
354         * Shared/WebPreferencesStore.cpp:
355         (WebKit::WebPreferencesStore::WebPreferencesStore):
356         (WebKit::WebPreferencesStore::encode):
357         (WebKit::WebPreferencesStore::decode):
358         * Shared/WebPreferencesStore.h:
359         Add needsSiteSpecificQuirks;
360
361         * UIProcess/API/C/WKAPICast.h:
362         (WebKit::toFontSmoothingLevel):
363         (WebKit::toAPI):
364         Move FontSmoothing conversion functions here.
365
366         * UIProcess/API/C/WKPreferences.cpp:
367         (WKPreferencesSetFontSmoothingLevel):
368         (WKPreferencesGetFontSmoothingLevel):
369         (WKPreferencesSetAcceleratedCompositingEnabled):
370         (WKPreferencesGetAcceleratedCompositingEnabled):
371         (WKPreferencesSetCompositingBordersVisible):
372         (WKPreferencesGetCompositingBordersVisible):
373         (WKPreferencesSetCompositingRepaintCountersVisible):
374         (WKPreferencesGetCompositingRepaintCountersVisible):
375         (WKPreferencesSetNeedsSiteSpecificQuirks):
376         (WKPreferencesGetNeedsSiteSpecificQuirks):
377         Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks
378         and move implementations from WKPreferencesPrivate.cpp here.
379
380         * UIProcess/API/C/WKPreferencesPrivate.cpp: Removed.
381
382         * UIProcess/API/C/WKPreferencesPrivate.h:
383         Add Add WKPreferencesSetNeedsSiteSpecificQuirks/WKPreferencesGetNeedsSiteSpecificQuirks.
384
385         * UIProcess/WebPreferences.cpp:
386         (WebKit::WebPreferences::setNeedsSiteSpecificQuirks):
387         (WebKit::WebPreferences::needsSiteSpecificQuirks):
388         * UIProcess/WebPreferences.h:
389         * WebProcess/WebPage/WebPage.cpp:
390         (WebKit::WebPage::updatePreferences):
391         Pipe through needsSiteSpecificQuirks.
392
393         * WebKit2.xcodeproj/project.pbxproj:
394         * WebKit2.pro:
395         * win/WebKit2.vcproj:
396         Update for removed files.
397
398 2010-11-16  Adam Roben  <aroben@apple.com>
399
400         Fix horizontal scrolling via the mousewheel/trackpad on Windows
401
402         Reviewed by Mark Rowe.
403
404         * Shared/win/WebEventFactory.cpp: Fixed typo in the
405         WM_VISTA_MOUSEHWHEEL constant.
406
407 2010-11-16  Steve Falkenburg  <sfalken@apple.com>
408
409         Reviewed by Adam Roben.
410
411         Disable LTCG for Windows Release builds. Add new Release_LTCG configuration.
412         https://bugs.webkit.org/show_bug.cgi?id=49632
413
414         * win/WebKit2.make:
415         * win/WebKit2.submit.sln:
416         * win/WebKit2.vcproj:
417         * win/WebKit2WebProcess.vcproj:
418
419 2010-11-16  Anders Carlsson  <andersca@apple.com>
420
421         Reviewed by Sam Weinig.
422
423         Handle converting a ResourceHandle to a download
424         https://bugs.webkit.org/show_bug.cgi?id=49631
425
426         * WebProcess/Downloads/Download.h:
427         Add startWithHandle.
428
429         * WebProcess/Downloads/DownloadManager.h:
430         * WebProcess/Downloads/DownloadManager.cpp:
431         (WebKit::DownloadManager::convertHandleToDownload):
432         Create a new Download object and call startWithHandle on it.
433
434         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
435         (WebKit::Download::startWithHandle):
436         Add stub.
437
438         * WebProcess/Downloads/mac/DownloadMac.mm:
439         (WebKit::Download::startWithHandle):
440         Create an NSURLDownload object from passed in ResourceHandle.
441
442         * WebProcess/Downloads/qt/DownloadQt.cpp:
443         (WebKit::Download::startWithHandle):
444         Add stub.
445
446         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
447         (WebKit::WebFrameLoaderClient::download):
448         Call WebFrame::convertHandleToDownload.
449
450         * WebProcess/WebPage/WebFrame.cpp:
451         (WebKit::WebFrame::convertHandleToDownload):
452         Call DownloadManager::convertHandleToDownload.
453
454 2010-11-16  Anders Carlsson  <andersca@apple.com>
455
456         Reviewed by John Sullivan.
457
458         Set the original URL for downloads
459         https://bugs.webkit.org/show_bug.cgi?id=49628
460
461         * WebProcess/Downloads/DownloadManager.cpp:
462         (WebKit::DownloadManager::startDownload):
463         * WebProcess/Downloads/DownloadManager.h:
464         startDownload now takes the originating web page.
465
466         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
467         (WebKit::Download::start):
468         start now takes the originating web page.
469
470         * WebProcess/Downloads/mac/DownloadMac.mm:
471         (WebKit::originatingURL):
472         (WebKit::setOriginalURLForDownload):
473         Port code over from WebKit1 that sets the download URL.
474
475         (WebKit::Download::start):
476         Call setOriginalURLForDownload.
477
478         * WebProcess/Downloads/qt/DownloadQt.cpp:
479         (WebKit::Download::start):
480         start now takes the originating web page.
481
482         * WebProcess/WebPage/WebFrame.cpp:
483         (WebKit::WebFrame::startDownload):
484         Pass the web page to DownloadManager::startDownload.
485
486 2010-11-16  Dave Hyatt  <hyatt@apple.com>
487
488         Reviewed by Dan Bernstein.
489
490         https://bugs.webkit.org/show_bug.cgi?id=11004
491         
492         font-size:0 is ignored.  Remove the minimum font size of 1 in CSSStyleSelector.
493         Change the pref value for minimum font size from 1 to 0.  Make sure to never use the NSFont's size,
494         since it doesn't honor a size of 0.  Instead pass the size in to the FontPlatformData(NSFont*) version
495         of the constructor rather than using [NSFont pointSize].
496
497         https://bugs.webkit.org/show_bug.cgi?id=49582
498         
499         Negative leading is not handled correctly.  There are two bugs here.  The first is that
500         maxAscent and maxDescent can be negative, so we need a notion of whether or not we have
501         set them before so that we can allow them to be < 0.
502         
503         The second issue is that we should understand where fonts will end up relative to
504         our baseline (excluding line height), and only allow those boxes to impact ascent and
505         descent if the actual font box (without factoring in line height) is above or below the
506         root line box baseline.
507
508         Added fast/css/negative-leading.html
509         
510         These two bug fixes have to land together to keep the Acid 3 test rendering correctly.
511
512         * Shared/WebPreferencesStore.cpp:
513         (WebKit::WebPreferencesStore::WebPreferencesStore):
514
515 2010-11-16  Anders Carlsson  <andersca@apple.com>
516
517         Fix clang++ build.
518
519         * Scripts/webkit2/messages.py:
520         * WebProcess/WebPage/WebInspector.h:
521
522 2010-11-16  Anders Carlsson  <andersca@apple.com>
523
524         Reviewed by Sam Weinig.
525
526         Add WKPageCanShowMIMEType
527         https://bugs.webkit.org/show_bug.cgi?id=49612
528
529         * UIProcess/API/C/WKPage.cpp:
530         (WKPageCanShowMIMEType):
531         * UIProcess/API/C/WKPage.h:
532         * UIProcess/WebPageProxy.cpp:
533         (WebKit::WebPageProxy::canShowMIMEType):
534         * UIProcess/WebPageProxy.h:
535
536 2010-11-16  Anders Carlsson  <andersca@apple.com>
537
538         Reviewed by Sam Weinig.
539
540         Make WebPageProxy::decidePolicyForMIMEType a tad synchronous
541         https://bugs.webkit.org/show_bug.cgi?id=49605
542
543         Change the DecidePolicyForMIMEType message to be synchronous, and if the policy listener is
544         invoked from within the decidePolicyForMIMEType callback return the policy information as out
545         parameters. This is needed in order to convert a loading connection to a download.
546
547         * Platform/CoreIPC/HandleMessage.h:
548         (CoreIPC::callMemberFunction):
549         * UIProcess/WebPageProxy.cpp:
550         (WebKit::WebPageProxy::WebPageProxy):
551         (WebKit::WebPageProxy::receivedPolicyDecision):
552         (WebKit::WebPageProxy::decidePolicyForMIMEType):
553         * UIProcess/WebPageProxy.h:
554         * UIProcess/WebPageProxy.messages.in:
555         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
556         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
557
558 2010-11-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>, Zalan Bujtas  <zbujtas@gmail.com>
559
560         Reviewed by Andreas Kling.
561
562         [WK2][Qt] Add API for finding a zoomable area for a given point
563
564         This is useful for implementing e.g "double tap zoom"
565
566         Only enabled for Qt.
567
568         * UIProcess/API/qt/qwkpage.cpp:
569         (QWKPage::findZoomableAreaForPoint):
570         (QWKPagePrivate::didFindZoomableArea):
571         * UIProcess/API/qt/qwkpage.h:
572         * UIProcess/API/qt/qwkpage_p.h:
573         * UIProcess/PageClient.h:
574         * UIProcess/WebPageProxy.cpp:
575         (WebKit::WebPageProxy::didFindZoomableArea):
576         (WebKit::WebPageProxy::findZoomableAreaForPoint):
577         * UIProcess/WebPageProxy.h:
578         * UIProcess/WebPageProxy.messages.in:
579         * WebProcess/WebPage/WebPage.cpp:
580         (WebKit::WebPage::findZoomableAreaForPoint):
581         * WebProcess/WebPage/WebPage.h:
582         * WebProcess/WebPage/WebPage.messages.in:
583
584 2010-11-16  Andreas Kling  <kling@webkit.org>
585
586         Rubber-stamped by Simon Hausmann.
587
588         Revert !ENABLE(INSPECTOR) fix- we don't need it right now,
589         and it was less maintainable than I had though.
590
591         * Shared/API/c/WKSharedAPICast.h:
592         (WebKit::toAPI):
593         (WebKit::toImpl):
594         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
595         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
596         * WebProcess/WebPage/WebInspector.cpp:
597
598 2010-11-16  Andreas Kling  <kling@webkit.org>
599
600         Reviewed by Simon Hausmann.
601
602         Fix compilation with !ENABLE(INSPECTOR)
603
604         * Shared/API/c/WKSharedAPICast.h:
605         (WebKit::toAPI):
606         (WebKit::toImpl):
607         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
608         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
609         * WebProcess/WebPage/WebInspector.cpp:
610
611 2010-11-16  Andras Becsi  <abecsi@webkit.org>
612
613         Reviewed by Andreas Kling.
614
615         [Qt] Use SIGINT instead of SIGKILL to let the web process clean up after itself.
616
617         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
618         (WebKit::QtWebProcess::setupChildProcess):
619
620 2010-11-16  Kenneth Rohde Christiansen  <kenneth@webkit.org>
621
622         Reviewed by Andreas Kling.
623
624         [WK2][Qt] Expose resizes-to-contents mode in WebKit2
625
626         Only available with ENABLE(TILED_BACKING_STORE)
627
628         Based on a patch by Antti Koivisto.
629
630         * UIProcess/API/qt/qwkpage.cpp:
631         (QWKPage::setResizesToContentsUsingLayoutSize):
632         * UIProcess/API/qt/qwkpage.h:
633         * UIProcess/WebPageProxy.cpp:
634         (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize):
635         * UIProcess/WebPageProxy.h:
636         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
637         (WebKit::WebChromeClient::contentsSizeChanged):
638         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
639         (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
640         * WebProcess/WebPage/WebPage.cpp:
641         (WebKit::WebPage::setSize):
642         (WebKit::WebPage::setResizesToContentsUsingLayoutSize):
643         (WebKit::WebPage::resizeToContentsIfNeeded):
644         * WebProcess/WebPage/WebPage.h:
645         (WebKit::WebPage::resizesToContentsEnabled):
646         (WebKit::WebPage::resizesToContentsLayoutSize):
647         * WebProcess/WebPage/WebPage.messages.in:
648
649 2010-11-16  Andreas Kling  <kling@webkit.org>
650
651         Reviewed by Kenneth Rohde Christiansen.
652
653         [Qt][WK2] Get proxy settings from environment (http[s]_proxy)
654
655         If http_proxy and/or https_proxy are set in the environment,
656         pass those in to QNetworkAccessManager.
657
658         * WebProcess/qt/WebProcessMainQt.cpp:
659         (WebKit::EnvHttpProxyFactory::EnvHttpProxyFactory):
660         (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
661         (WebKit::EnvHttpProxyFactory::queryProxy):
662         (WebKit::initializeProxy):
663         (WebKit::WebProcessMainQt):
664
665 2010-11-16  Andreas Kling  <kling@webkit.org>
666
667         Reviewed by Kenneth Rohde Christiansen.
668
669         [Qt][WK2] Emit windowCloseRequested signal on window.close()
670
671         Original patch by Zalan Bujtas.
672
673         * UIProcess/API/qt/ClientImpl.cpp:
674         (qt_wk_close):
675         * UIProcess/API/qt/qwkpage.h:
676
677 2010-11-15  Andreas Kling  <kling@webkit.org>
678
679         Reviewed by Kenneth Rohde Christiansen.
680
681         [Qt] Kill the web process if the UI process dies
682
683         Connect UI (parent) process death signal to SIGKILL of the web
684         process (child). This ensures that there's no stale web processes
685         after the UI process has crashed.
686
687         Original patch by Kimmo Kinnunen.
688
689         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
690         (WebKit::QtWebProcess::QtWebProcess):
691         (WebKit::QtWebProcess::setupChildProcess):
692         (WebKit::ProcessLauncherHelper::launch):
693
694 2010-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
695
696         Rubber-stamped by Andreas Kling.
697
698         [Qt] Trivial build fix for building WebKit2 inside Qt Creator
699
700         Similar to WebCore.pro, define a fallback for OUTPUT_DIR.
701
702         * WebKit2.pro:
703
704 2010-11-15  Andreas Kling  <kling@webkit.org>
705
706         Reviewed by Tor Arne Vestbø.
707
708         [Qt] Make sure qwkpage.h and qwkpreferences.h are copied into includes/WebKit2
709
710         * UIProcess/API/qt/WKView.h:
711
712 2010-11-15  Andreas Kling  <kling@webkit.org>
713
714         Reviewed by Tor Arne Vestbø.
715
716         [Qt] Use $${PYTHON} rather than "python" to execute Python scripts
717
718         Fixes building with the old Python that currently ships with Scratchbox.
719
720         * DerivedSources.pro:
721
722 2010-11-15  Brady Eidson  <beidson@apple.com>
723
724         Reviewed by a better attempt at a Windows build fix.
725
726         * win/WebKit2Generated.make:
727
728 2010-11-15  Brady Eidson  <beidson@apple.com>
729
730         Reviewed by my attempt to fix the Windows build
731
732         * win/WebKit2Generated.make: Add new API headers here.
733
734 2010-11-15  Brady Eidson  <beidson@apple.com>
735
736         Reviewed by Sam Weinig.
737
738         Finish off <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
739         Customizable context menu support in WebKit2.
740
741         - Adds an API-level WKContextMenuItem.
742         - Round trips through both the InjectedBundle client and the new PageContextMenuClient before
743           actually displaying the menu.
744
745         * WebKit2.pro:
746         * WebKit2.xcodeproj/project.pbxproj:
747         * win/WebKit2.vcproj:
748
749         * Shared/API/c/WKBase.h:
750         * Shared/API/c/WKContextMenuItem.cpp: Added.
751         (WKContextMenuItemGetTypeID):
752         (WKContextMenuItemCreateAsAction):
753         (WKContextMenuItemCreateAsCheckableAction):
754         (WKContextMenuItemCreateAsSubmenu):
755         (WKContextMenuItemSeparatorItem):
756         (WKContextMenuItemGetTag):
757         (WKContextMenuItemGetType):
758         (WKContextMenuItemCopyTitle):
759         (WKContextMenuItemGetEnabled):
760         (WKContextMenuItemGetChecked):
761         (WKContextMenuCopySubmenuItems):
762         * Shared/API/c/WKContextMenuItem.h: Added.
763         * Shared/API/c/WKContextMenuItemTypes.h: Added.
764
765         * Shared/API/c/WKSharedAPICast.h:
766         (WebKit::toAPI):
767         (WebKit::toImpl):
768
769         * Shared/WebContextMenuItem.cpp:
770         (WebKit::WebContextMenuItem::create):
771         (WebKit::WebContextMenuItem::separatorItem):
772         (WebKit::WebContextMenuItem::submenuItemsAsImmutableArray):
773         * Shared/WebContextMenuItem.h:
774
775         * UIProcess/API/C/WKPage.cpp:
776         (WKPageSetPageContextMenuClient):
777         (WKPageSetPageFindClient):
778         (WKPageSetPageLoaderClient):
779         (WKPageSetPagePolicyClient):
780         (WKPageSetPageUIClient):
781         * UIProcess/API/C/WKPage.h:
782
783         * UIProcess/WebPageContextMenuClient.cpp: Added.
784         (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu):
785         * UIProcess/WebPageContextMenuClient.h: Added.
786
787         * UIProcess/WebPageProxy.cpp:
788         (WebKit::WebPageProxy::initializeContextMenuClient):
789         (WebKit::WebPageProxy::showContextMenu):
790         * UIProcess/WebPageProxy.h:
791         * UIProcess/WebPageProxy.messages.in:
792
793         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
794         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
795         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
796         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
797
798         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
799         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems):
800         * WebProcess/WebPage/WebContextMenu.cpp:
801         (WebKit::WebContextMenu::show):
802
803 2010-11-15  Anders Carlsson  <andersca@apple.com>
804
805         Reviewed by Sam Weinig.
806
807         Add shouldDecodeSourceDataOfMIMEType WKContextDownloadClient callback
808         https://bugs.webkit.org/show_bug.cgi?id=49558
809
810         * UIProcess/API/C/WKContext.h:
811         Add shouldDecodeSourceDataOfMIMEType callback.
812
813         * UIProcess/Downloads/DownloadProxy.cpp:
814         (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType):
815         Call WebDownloadClient::shouldDecodeSourceDataOfMIMEType.
816
817         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
818         Add allowOverwrite out parameter.
819
820         * UIProcess/Downloads/DownloadProxy.h:
821         * UIProcess/Downloads/DownloadProxy.messages.in:
822         Add ShouldDecodeSourceDataOfMIMEType message.
823
824         * UIProcess/WebDownloadClient.cpp:
825         (WebKit::WebDownloadClient::shouldDecodeSourceDataOfMIMEType):
826         Call the WKContextDownloadClient.
827
828         (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
829         Add allowOverwrite out parameter.
830
831         * UIProcess/WebDownloadClient.h:
832         * WebProcess/Downloads/Download.cpp:
833         (WebKit::Download::shouldDecodeSourceDataOfMIMEType):
834         Send the ShouldDecodeSourceDataOfMIMEType message.
835
836         (WebKit::Download::decideDestinationWithSuggestedFilename):
837         Add allowOverwrite reply parameter.
838
839         * WebProcess/Downloads/mac/DownloadMac.mm:
840         (-[WKDownloadAsDelegate download:shouldDecodeSourceDataOfMIMEType:]):
841         Call Download::shouldDecodeSourceDataOfMIMEType.
842
843         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
844         Add allowOverwrite parameter.
845
846 2010-11-15  Anders Carlsson  <andersca@apple.com>
847
848         Reviewed by Sam Weinig.
849
850         Add decideDestinationWithSuggestedFilename WKContextDownloadClient callback
851         https://bugs.webkit.org/show_bug.cgi?id=49554
852
853         * Platform/CoreIPC/MessageSender.h:
854         (CoreIPC::MessageSender::sendSync):
855         Add sendSync capabilities to Messagesender.
856         
857         * UIProcess/API/C/WKContext.h:
858         Add decideDestinationWithSuggestedFilename callback.
859
860         * UIProcess/Downloads/DownloadProxy.cpp:
861         (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename):
862         Call WebDownloadClient::decideDestinationWithSuggestedFilename.
863
864         * UIProcess/Downloads/DownloadProxy.messages.in:
865         Add DecideDestinationWithSuggestedFilename.
866
867         * UIProcess/WebContext.cpp:
868         (WebKit::WebContext::didReceiveSyncMessage):
869         Process MessageClassDownloadProxy messages.
870
871         * UIProcess/WebDownloadClient.cpp:
872         (WebKit::WebDownloadClient::decideDestinationWithSuggestedFilename):
873         Ask the WKContextDownloadClient for the destination.
874
875         * UIProcess/WebProcessProxy.cpp:
876         (WebKit::WebProcessProxy::didReceiveSyncMessage):
877         MessageClassDownloadProxy messages should go to the WebContext.
878
879         * WebProcess/Downloads/Download.cpp:
880         (WebKit::Download::decideDestinationWithSuggestedFilename):
881         Send the DecideDestinationWithSuggestedFilename message.
882
883         * WebProcess/Downloads/Download.h:
884         * WebProcess/Downloads/mac/DownloadMac.mm:
885         (-[WKDownloadAsDelegate download:decideDestinationWithSuggestedFilename:]):
886         call Download::decideDestinationWithSuggestedFilename and set the destination.
887
888 2010-11-15  Andreas Kling  <kling@webkit.org>
889
890         Reviewed by Kenneth Rohde Christiansen.
891
892         [WK2][Qt] Add "page snapshot" functionality to tiled backing store
893
894         Original patch by Antti Koivisto.
895
896         Add a way to take a snapshot of a specific part of the page, at a specific scale.
897         Only implemented for the tiled drawing area.
898
899         * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
900         New message: TakeSnapshot.
901
902         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
903         New message: SnapshotTaken.
904
905         * UIProcess/API/qt/qgraphicswkview.h:
906         * UIProcess/API/qt/qgraphicswkview.cpp:
907         (QGraphicsWKView::takeSnapshot):
908         Expose the snapshot functionality.
909
910         * UIProcess/TiledDrawingAreaProxy.cpp:
911         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
912         (WebKit::TiledDrawingAreaProxy::takeSnapshot):
913         * UIProcess/TiledDrawingAreaProxy.h:
914         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
915         (WebKit::TiledDrawingAreaProxy::snapshotTaken):
916         * WebProcess/WebPage/TiledDrawingArea.cpp:
917         (WebKit::TiledDrawingArea::didReceiveMessage):
918
919 2010-11-15  Andreas Kling  <andreas.kling@nokia.com>
920
921         Reviewed by Kenneth Rohde Christiansen.
922
923         [WK2][Qt] WebKit2 implementation of tiled backing store
924         https://bugs.webkit.org/show_bug.cgi?id=49526
925
926         Basic opt-in tiling implementation for WebKit2/Qt.
927
928         Original patch by Antti Koivisto.
929
930         * Shared/CoreIPCSupport/DrawingAreaMessageKinds.h:
931         New messages: RequestTileUpdate and CancelTileUpdate.
932
933         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
934         New messages: Invalidate, TileUpdated, AllTileUpdatesProcessed.
935
936         * Shared/DrawingAreaBase.h:
937         New area type: TiledDrawingAreaType.
938
939         * UIProcess/API/qt/qgraphicswkview.h:
940         * UIProcess/API/qt/qgraphicswkview.cpp:
941         (QGraphicsWKView::QGraphicsWKView):
942         (QGraphicsWKView::setGeometry):
943         (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
944         (QGraphicsWKView::prepareScaleChange):
945         (QGraphicsWKView::commitScaleChange):
946         (QGraphicsWKViewPrivate::onScaleChanged):
947         (QGraphicsWKViewPrivate::commitScale):
948         Support for tiled backing store.
949
950         * UIProcess/TiledDrawingAreaProxy.cpp: Added.
951         (WebKit::TiledDrawingAreaProxy::create):
952         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
953         (WebKit::TiledDrawingAreaProxy::~TiledDrawingAreaProxy):
954         (WebKit::TiledDrawingAreaProxy::setSize):
955         (WebKit::TiledDrawingAreaProxy::setPageIsVisible):
956         (WebKit::TiledDrawingAreaProxy::didSetSize):
957         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
958         (WebKit::TiledDrawingAreaProxy::didReceiveSyncMessage):
959         (WebKit::TiledDrawingAreaProxy::requestTileUpdate):
960         (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
961         (WebKit::TiledDrawingAreaProxy::createTile):
962         (WebKit::TiledDrawingAreaProxy::setTileSize):
963         (WebKit::TiledDrawingAreaProxy::setTileCreationDelay):
964         (WebKit::TiledDrawingAreaProxy::setKeepAndCoverAreaMultipliers):
965         (WebKit::TiledDrawingAreaProxy::invalidate):
966         (WebKit::TiledDrawingAreaProxy::updateTileBuffers):
967         (WebKit::TiledDrawingAreaProxy::tileBufferUpdateComplete):
968         (WebKit::TiledDrawingAreaProxy::paint):
969         (WebKit::TiledDrawingAreaProxy::adjustVisibleRect):
970         (WebKit::TiledDrawingAreaProxy::setContentsScale):
971         (WebKit::TiledDrawingAreaProxy::removeAllTiles):
972         (WebKit::TiledDrawingAreaProxy::tileDistance):
973         (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
974         (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
975         (WebKit::TiledDrawingAreaProxy::createTiles):
976         (WebKit::TiledDrawingAreaProxy::resizeEdgeTiles):
977         (WebKit::TiledDrawingAreaProxy::dropTilesOutsideRect):
978         (WebKit::TiledDrawingAreaProxy::tileAt):
979         (WebKit::TiledDrawingAreaProxy::setTile):
980         (WebKit::TiledDrawingAreaProxy::removeTile):
981         (WebKit::TiledDrawingAreaProxy::mapToContents):
982         (WebKit::TiledDrawingAreaProxy::mapFromContents):
983         (WebKit::TiledDrawingAreaProxy::contentsRect):
984         (WebKit::TiledDrawingAreaProxy::tileRectForCoordinate):
985         (WebKit::TiledDrawingAreaProxy::tileCoordinateForPoint):
986         (WebKit::TiledDrawingAreaProxy::startTileBufferUpdateTimer):
987         (WebKit::TiledDrawingAreaProxy::tileBufferUpdateTimerFired):
988         (WebKit::TiledDrawingAreaProxy::startTileCreationTimer):
989         (WebKit::TiledDrawingAreaProxy::tileCreationTimerFired):
990         (WebKit::TiledDrawingAreaProxy::hasPendingUpdates):
991         * UIProcess/TiledDrawingAreaProxy.h: Added.
992         (WebKit::TiledDrawingAreaProxy::contentsScale):
993         (WebKit::TiledDrawingAreaProxy::attachCompositingContext):
994         (WebKit::TiledDrawingAreaProxy::detachCompositingContext):
995         (WebKit::TiledDrawingAreaProxy::tileSize):
996         (WebKit::TiledDrawingAreaProxy::tileCreationDelay):
997         (WebKit::TiledDrawingAreaProxy::getKeepAndCoverAreaMultipliers):
998         * UIProcess/TiledDrawingAreaTile.h: Added.
999         (WebKit::TiledDrawingAreaTile::create):
1000         (WebKit::TiledDrawingAreaTile::hasBackBufferUpdatePending):
1001         (WebKit::TiledDrawingAreaTile::coordinate):
1002         (WebKit::TiledDrawingAreaTile::rect):
1003         (WebKit::TiledDrawingAreaTile::ID):
1004         * WebProcess/WebPage/DrawingArea.cpp:
1005         (WebKit::DrawingArea::create):
1006         * WebProcess/WebPage/TiledDrawingArea.cpp: Added.
1007         (WebKit::TiledDrawingArea::TiledDrawingArea):
1008         (WebKit::TiledDrawingArea::~TiledDrawingArea):
1009         (WebKit::TiledDrawingArea::invalidateWindow):
1010         (WebKit::TiledDrawingArea::invalidateContentsAndWindow):
1011         (WebKit::TiledDrawingArea::invalidateContentsForSlowScroll):
1012         (WebKit::TiledDrawingArea::scroll):
1013         (WebKit::TiledDrawingArea::setNeedsDisplay):
1014         (WebKit::TiledDrawingArea::display):
1015         (WebKit::TiledDrawingArea::scheduleDisplay):
1016         (WebKit::TiledDrawingArea::setSize):
1017         (WebKit::TiledDrawingArea::suspendPainting):
1018         (WebKit::TiledDrawingArea::resumePainting):
1019         (WebKit::TiledDrawingArea::didUpdate):
1020         (WebKit::TiledDrawingArea::updateTile):
1021         (WebKit::TiledDrawingArea::tileUpdateTimerFired):
1022         (WebKit::TiledDrawingArea::didReceiveMessage):
1023         * WebProcess/WebPage/TiledDrawingArea.h: Added.
1024         (WebKit::TiledDrawingArea::attachCompositingContext):
1025         (WebKit::TiledDrawingArea::detachCompositingContext):
1026         (WebKit::TiledDrawingArea::setRootCompositingLayer):
1027         (WebKit::TiledDrawingArea::scheduleCompositingLayerSync):
1028         (WebKit::TiledDrawingArea::syncCompositingLayers):
1029         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: Added.
1030         (WebKit::TiledDrawingArea::paintIntoUpdateChunk):
1031         * WebKit2.pro:
1032         * UIProcess/qt/TiledDrawingAreaTileQt.cpp: Added.
1033         (WebKit::checkeredPixmap):
1034         (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
1035         (WebKit::TiledDrawingAreaTile::~TiledDrawingAreaTile):
1036         (WebKit::TiledDrawingAreaTile::isDirty):
1037         (WebKit::TiledDrawingAreaTile::isReadyToPaint):
1038         (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
1039         (WebKit::TiledDrawingAreaTile::invalidate):
1040         (WebKit::TiledDrawingAreaTile::resize):
1041         (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
1042         (WebKit::TiledDrawingAreaTile::paint):
1043         (WebKit::TiledDrawingAreaTile::paintCheckerPattern):
1044         (WebKit::TiledDrawingAreaTile::updateFromChunk):
1045         (WebKit::TiledDrawingAreaTile::updateBackBuffer):
1046         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: Added.
1047         (WebKit::TiledDrawingAreaProxy::updateWebView):
1048         (WebKit::TiledDrawingAreaProxy::webViewVisibleRect):
1049         (WebKit::TiledDrawingAreaProxy::page):
1050
1051 2010-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
1052
1053         Reviewed by Andreas Kling.
1054
1055         [Qt] Need to implement WebKit::pluginWillHandleLoadError for WebKit2
1056         https://bugs.webkit.org/show_bug.cgi?id=48764
1057
1058         Add the missing error to Qt support.
1059
1060         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
1061         (WebKit::pluginWillHandleLoadError):
1062
1063 2010-11-12  John Sullivan  <sullivan@apple.com>
1064
1065         Reviewed by Anders Carlsson.
1066
1067         Fixed Target for WKBundlePageOverlay.cpp.
1068
1069         * WebKit2.xcodeproj/project.pbxproj:
1070         Changed Target for WKBundlePageOverlay.cpp from WebProcess to WebKit2.
1071
1072 2010-11-12  Anders Carlsson  <andersca@apple.com>
1073
1074         Reviewed by John Sullivan.
1075
1076         Need a way that WKBundlePageOverlayRef clients can make sure they only uninstall the overlay they installed
1077         https://bugs.webkit.org/show_bug.cgi?id=49461
1078         <rdar://problem/8662760>
1079
1080         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1081         (WKBundlePageUninstallPageOverlay):
1082         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1083         * WebProcess/WebPage/FindController.cpp:
1084         (WebKit::FindController::findString):
1085         (WebKit::FindController::hideFindUI):
1086         * WebProcess/WebPage/WebPage.cpp:
1087         (WebKit::WebPage::uninstallPageOverlay):
1088         * WebProcess/WebPage/WebPage.h:
1089
1090 2010-11-12  Anders Carlsson  <andersca@apple.com>
1091
1092         Reviewed by Sam Weinig.
1093
1094         Allow MessageSender to override sendMessage
1095         https://bugs.webkit.org/show_bug.cgi?id=49457
1096
1097         Change MessageSender::send to encode the message and then call sendMessage.
1098         This allows for clients to override sendMessage, something which WebProcessProxy
1099         will be able to take advantage of.
1100
1101         * Platform/CoreIPC/MessageSender.h:
1102         (CoreIPC::MessageSender::send):
1103         (CoreIPC::MessageSender::sendMessage):
1104
1105 2010-11-12  Anders Carlsson  <andersca@apple.com>
1106
1107         Reviewed by Sam Weinig.
1108
1109         CoreIPC cleanup
1110         https://bugs.webkit.org/show_bug.cgi?id=49455
1111
1112         Add a static create function to ArgumentEncoder. 
1113         Factor sync message argument encoder creation out into a new function,
1114         createSyncMessageArgumentEncoder.
1115         
1116         * Platform/CoreIPC/ArgumentEncoder.cpp:
1117         (CoreIPC::ArgumentEncoder::create):
1118         * Platform/CoreIPC/ArgumentEncoder.h:
1119         * Platform/CoreIPC/Connection.cpp:
1120         (CoreIPC::Connection::createSyncMessageArgumentEncoder):
1121         (CoreIPC::Connection::dispatchSyncMessage):
1122         * Platform/CoreIPC/Connection.h:
1123         (CoreIPC::Connection::send):
1124         (CoreIPC::Connection::sendSync):
1125         * UIProcess/WebProcessProxy.h:
1126         (WebKit::WebProcessProxy::send):
1127
1128 2010-11-12  Sam Weinig  <sam@webkit.org>
1129
1130         Reviewed by Anders Carlsson.
1131
1132         ASSERTION when converting some WKStringRefs returned from willSubmitForm to CFStringRef
1133         <rdar://problem/8662180>
1134         https://bugs.webkit.org/show_bug.cgi?id=49454
1135
1136         Enforce the invariant that a WebString never contains a null WTF::String at a
1137         lower level, in the WebString constructor, instead of relying on the callers of
1138         WebString::create to do it.
1139
1140         * Shared/API/c/WKSharedAPICast.h:
1141         (WebKit::toAPI):
1142         (WebKit::toCopiedAPI): Remove null string check...
1143
1144         * Shared/WebString.h:
1145         (WebKit::WebString::WebString): ... and move it to the constructor.
1146
1147         * Shared/API/c/WKURL.cpp:
1148         (WKURLCopyString): Use toCopiedAPI() instead of calling WebString directly
1149         to match other similar uses.
1150
1151 2010-11-12  Andreas Kling  <kling@webkit.org>
1152
1153         Reviewed by Antonio Gomes.
1154
1155         [Qt][WK2] Fix leaking of mapped files
1156
1157         MappedMemory::fileName was never set on the receiving side, which led
1158         the MappedMemoryPool to call QFile::map() again when reusing an existing file.
1159
1160         * Platform/qt/MappedMemoryPool.cpp:
1161         (WebKit::MappedMemoryPool::mapFile):
1162
1163 2010-11-12  Adam Roben  <aroben@apple.com>
1164
1165         Windows build fix
1166
1167         * win/WebKit2Generated.make: Copy WKBundlePageOverlay.h.
1168
1169 2010-11-12  Benjamin Poulain  <benjamin.poulain@nokia.com>
1170
1171         Unreviewed fix after r71857.
1172
1173         * UIProcess/qt/WebInspectorProxyQt.cpp:
1174         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1175
1176 2010-11-11  Anders Carlsson  <andersca@apple.com>
1177
1178         Reviewed by Darin Adler.
1179
1180         Add didReceiveResponse and didReceiveData to the download client
1181         https://bugs.webkit.org/show_bug.cgi?id=49418
1182
1183         * UIProcess/API/C/WKContext.h:
1184         Add didReceiveResponse and didReceiveData to WKContextDownloadClient.
1185
1186         * UIProcess/Downloads/DownloadProxy.cpp:
1187         (WebKit::DownloadProxy::didReceiveResponse):
1188         (WebKit::DownloadProxy::didReceiveData):
1189         Call WebDownloadClient member functions.
1190
1191         * UIProcess/Downloads/DownloadProxy.messages.in:
1192         Add DidReceiveResponse and DidReceiveData messages.
1193
1194         * UIProcess/WebDownloadClient.cpp:
1195         (WebKit::WebDownloadClient::didReceiveResponse):
1196         (WebKit::WebDownloadClient::didReceiveData):
1197         Call client functions.
1198
1199         * WebKit2.xcodeproj/project.pbxproj:
1200         Let Xcode update the file.
1201
1202         * WebProcess/Downloads/Download.cpp:
1203         (WebKit::Download::didReceiveResponse):
1204         (WebKit::Download::didReceiveData):
1205         Send messages.
1206
1207         * WebProcess/Downloads/mac/DownloadMac.mm:
1208         (WebKit::Download::start):
1209         Set deletesFileUponFailure to NO.
1210
1211         (-[WKDownloadAsDelegate download:didReceiveResponse:]):
1212         Call didReceiveResponse.
1213
1214 2010-11-11  Anders Carlsson  <andersca@apple.com>
1215
1216         Reviewed by Sam Weinig.
1217
1218         Add an argument coder for ResourceResponse.
1219         https://bugs.webkit.org/show_bug.cgi?id=49415
1220
1221         * Shared/WebCoreArgumentCoders.h:
1222         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1223         (CoreIPC::encodeResourceResponse):
1224         (CoreIPC::decodeResourceResponse):
1225         * Shared/mac/WebCoreArgumentCodersMac.mm:
1226         (CoreIPC::encodeResourceResponse):
1227         (CoreIPC::decodeResourceResponse):
1228         * Shared/qt/WebCoreArgumentCodersQt.cpp:
1229         (CoreIPC::encodeResourceResponse):
1230         (CoreIPC::decodeResourceResponse):
1231         * Shared/win/WebCoreArgumentCodersWin.cpp:
1232         (CoreIPC::encodeResourceResponse):
1233         (CoreIPC::decodeResourceResponse):
1234
1235 2010-11-11  Ryosuke Niwa  <rniwa@webkit.org>
1236
1237         Unreviewed build fix for r71587.
1238
1239         * WebKit2.xcodeproj/project.pbxproj: No longer uses absolute path.
1240
1241 2010-11-11  Csaba Osztrogonác  <ossy@webkit.org>
1242
1243         [Qt] Unreviewed WebKit2 buildfix after r71587.
1244
1245         * UIProcess/qt/WebInspectorProxyQt.cpp:
1246         * WebKit2.pro:
1247
1248 2010-11-11  Brian Weinstein  <bweinstein@apple.com>
1249
1250         More Windows build fixing. Change another #import to a #include, and remove an unneeded
1251         namespace.
1252
1253         * UIProcess/win/WebInspectorProxyWin.cpp:
1254         * WebProcess/WebPage/win/WebInspectorWin.cpp:
1255
1256 2010-11-11  Brent Fulgham  <bfulgham@webkit.org>
1257
1258         Windows [Cairo] build fix. Unreviewed.
1259
1260         Provide stubs for two BackingStore methods.
1261
1262         * Shared/cairo/BackingStoreCairo.cpp:
1263         (WebKit::BackingStore::createFlippedGraphicsContext):
1264         (WebKit::BackingStore::paint):
1265
1266 2010-11-11  Brian Weinstein  <bweinstein@apple.com>
1267
1268         Windows Build Fix. Change #imports to #includes.
1269
1270         * UIProcess/win/WebInspectorProxyWin.cpp:
1271
1272 2010-11-08  Timothy Hatcher  <timothy@apple.com>
1273
1274         Create and load the Web Inspector page.
1275
1276         https://webkit.org/b/49207
1277
1278         Reviewed by Anders Carlsson.
1279
1280         * UIProcess/WebInspectorProxy.cpp:
1281         (WebKit::WebInspectorProxy::createInspectorPage): Added. Call platformCreateInspectorPage and then
1282         call WebPageProxy::loadURL with inspectorPageURL.
1283         (WebKit::WebInspectorProxy::didLoadInspectorPage): Added stub.
1284         * UIProcess/WebInspectorProxy.h:
1285         * UIProcess/WebInspectorProxy.messages.in: Added.
1286         * UIProcess/WebPageProxy.cpp:
1287         (WebKit::WebPageProxy::didReceiveMessage): Call WebInspectorProxy::didReceiveWebInspectorProxyMessage.
1288         (WebKit::WebPageProxy::didReceiveSyncMessage): Call WebInspectorProxy::didReceiveSyncWebInspectorProxyMessage.
1289         * UIProcess/WebPageProxy.h: Made creationParameters public so WebInspectorProxy can use it.
1290
1291         * UIProcess/mac/WebInspectorProxyMac.mm:
1292         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Make a WkView and return the WebPageProxy.
1293         (WebKit::WebInspectorProxy::inspectorPageURL): Return the file URL for the inspector.html file.
1294         * UIProcess/qt/WebInspectorProxyQt.cpp:
1295         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
1296         (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
1297         * UIProcess/win/WebInspectorProxyWin.cpp:
1298         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Added stub.
1299         (WebKit::WebInspectorProxy::inspectorPageURL): Ditto.
1300
1301         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
1302         (WebKit::WebInspectorClient::openInspectorFrontend): Call WebInspector::createInspectorPage and set up the WebInspectorFrontendClient.
1303         (WebKit::WebInspectorClient::sendMessageToFrontend): Call doDispatchMessageOnFrontendPage in the base class.
1304         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1305         (WebKit::WebInspectorFrontendClient::frontendLoaded): Call WebInspector::didLoadInspectorPage.
1306         (WebKit::WebInspectorFrontendClient::localizedStringsURL): Call WebInspector::localizedStringsURL.
1307         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
1308
1309         * WebProcess/WebPage/WebInspector.cpp:
1310         (WebKit::WebInspector::WebInspector):
1311         (WebKit::WebInspector::createInspectorPage): Send a sync WebInspectorProxy::CreateInspectorPage message and set up
1312         the WebPage using the result page ID.
1313         (WebKit::WebInspector::didLoadInspectorPage): Send a WebInspectorProxy::DidLoadInspectorPage message.
1314         * WebProcess/WebPage/WebInspector.h:
1315         (WebKit::WebInspector::inspectorPage): Added.
1316         * WebProcess/WebPage/WebPage.cpp:
1317         (WebKit::WebPage::didReceiveMessage): Call WebInspector::didReceiveWebInspectorMessage.
1318
1319         * WebProcess/WebPage/mac/WebInspectorMac.mm:
1320         (WebKit::WebInspector::localizedStringsURL): Return the file URL for the localizedStrings.js file.
1321         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
1322         (WebKit::WebInspector::localizedStringsURL): Added stub.
1323         * WebProcess/WebPage/win/WebInspectorWin.cpp:
1324         (WebKit::WebInspector::localizedStringsURL): Added stub.
1325
1326         * DerivedSources.make: Added WebInspectorProxy.messages.in.
1327         * DerivedSources.pro: Ditto.
1328
1329         * WebKit2.pro: Added new files.
1330         * WebKit2.xcodeproj/project.pbxproj: Ditto.
1331         * win/WebKit2.vcproj: Ditto.
1332
1333 2010-11-11  Sam Weinig  <sam@webkit.org>
1334
1335         Reviewed by Anders Carlsson.
1336
1337         Move the remaining API client classes to use the APIClient base class.
1338         https://bugs.webkit.org/show_bug.cgi?id=49404
1339
1340         Also moves InjectedBundleClient into its own class to match other API clients.
1341
1342         * UIProcess/WebContextInjectedBundleClient.cpp:
1343         * UIProcess/WebContextInjectedBundleClient.h:
1344         * UIProcess/WebHistoryClient.cpp:
1345         (WebKit::WebHistoryClient::didNavigateWithNavigationData):
1346         (WebKit::WebHistoryClient::didPerformClientRedirect):
1347         (WebKit::WebHistoryClient::didPerformServerRedirect):
1348         (WebKit::WebHistoryClient::didUpdateHistoryTitle):
1349         (WebKit::WebHistoryClient::populateVisitedLinks):
1350         * UIProcess/WebHistoryClient.h:
1351         (WebKit::WebHistoryClient::shouldTrackVisitedLinks):
1352         * WebKit2.pro:
1353         * WebKit2.xcodeproj/project.pbxproj:
1354         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1355         (WebKit::InjectedBundle::initializeClient):
1356         (WebKit::InjectedBundle::reportException):
1357         (WebKit::InjectedBundle::didCreatePage):
1358         (WebKit::InjectedBundle::willDestroyPage):
1359         (WebKit::InjectedBundle::didReceiveMessage):
1360         * WebProcess/InjectedBundle/InjectedBundle.h:
1361         * WebProcess/InjectedBundle/InjectedBundleClient.cpp: Added.
1362         (WebKit::InjectedBundleClient::didCreatePage):
1363         (WebKit::InjectedBundleClient::willDestroyPage):
1364         (WebKit::InjectedBundleClient::didReceiveMessage):
1365         * WebProcess/InjectedBundle/InjectedBundleClient.h: Added.
1366         * win/WebKit2.vcproj:
1367
1368 2010-11-11  Anders Carlsson  <andersca@apple.com>
1369
1370         Reviewed by Adam Roben.
1371
1372         Remove an unneeded CFAllocatorRef parameter.
1373
1374         * Shared/API/c/mac/WKURLResponseNS.h:
1375         * Shared/API/c/mac/WKURLResponseNS.mm:
1376         (WKURLResponseCopyNSURLResponse):
1377
1378 2010-11-11  Anders Carlsson  <andersca@apple.com>
1379
1380         Reviewed by Adam Roben.
1381
1382         Add and implement WKDownloadCopyRequest
1383         https://bugs.webkit.org/show_bug.cgi?id=49393
1384
1385         * Shared/API/c/mac/WKURLRequestNS.h:
1386         * Shared/API/c/mac/WKURLRequestNS.mm:
1387         (WKURLRequestCopyNSURLRequest):
1388         Remove unneeded CFAllocator parameter.
1389
1390         * Shared/WebURLRequest.cpp:
1391         (WebKit::WebURLRequest::WebURLRequest):
1392         * Shared/WebURLRequest.h:
1393         (WebKit::WebURLRequest::create):
1394         Change create to take a ResourceRequest instead.
1395
1396         * UIProcess/API/C/WKDownload.cpp:
1397         (WKDownloadCopyRequest):
1398         Return a copied WKURLRequest.
1399
1400         * UIProcess/API/C/WKDownload.h:
1401         * UIProcess/Downloads/DownloadProxy.cpp:
1402         (WebKit::DownloadProxy::didStart):
1403         Set the request.
1404
1405         * UIProcess/Downloads/DownloadProxy.h:
1406         (WebKit::DownloadProxy::request):
1407         Return the request.
1408
1409         * UIProcess/Downloads/DownloadProxy.messages.in:
1410         * WebProcess/Downloads/Download.cpp:
1411         (WebKit::Download::didStart):
1412         Pass the request along when sending the DidStart message.
1413
1414 2010-11-11  John Sullivan  <sullivan@apple.com>
1415
1416         Rubber-stamped by Anders Carlsson.
1417
1418         * WebKit2.xcodeproj/project.pbxproj:
1419         Added WKBundlePageOverlay.h to the WebKit2 Target and made it public.
1420
1421 2010-11-11  Anders Carlsson  <andersca@apple.com>
1422
1423         Reviewed by John Sullivan.
1424
1425         Move GraphicsContext setup code to PageOverlay::drawRect
1426         https://bugs.webkit.org/show_bug.cgi?id=49389
1427
1428         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
1429         * WebProcess/WebPage/FindController.cpp:
1430         (WebKit::FindController::drawRect):
1431         * WebProcess/WebPage/PageOverlay.cpp:
1432         (WebKit::PageOverlay::drawRect):
1433
1434 2010-11-11  Adam Roben  <aroben@apple.com>
1435
1436         Build fix after r71816
1437
1438         * WebProcess/WebPage/WebPage.messages.in: Compile out
1439         SetActualVisibleContentRect when ENABLE(TILED_BACKING_STORE) is
1440         turned off.
1441
1442 2010-11-11  Balazs Kelemen  <kbalazs@webkit.org>
1443
1444         Reviewed by Andreas Kling.
1445
1446         [Qt][WK2] Implement BackingStore
1447         https://bugs.webkit.org/show_bug.cgi?id=49377
1448
1449         * Shared/qt/BackingStoreQt.cpp:
1450         (WebKit::createQImage): Added static helper. Creates a QImage
1451         from the shared memory buffer.
1452         (WebKit::BackingStore::createGraphicsContext):
1453         (WebKit::BackingStore::createFlippedGraphicsContext): Leave
1454         unimplemented with an ASSERT_NOT_REACHED since this is only
1455         needed for the CoreGraphics backend.
1456         (WebKit::BackingStore::paint):
1457
1458 2010-11-11  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1459
1460         Reviewed by Andreas Kling.
1461
1462         [Qt] Add a Qt WebKit2 API for overriding the actual visible content rect
1463         https://bugs.webkit.org/show_bug.cgi?id=49381
1464
1465         Add an Qt WebKit2 API for overriding the actual visible content rect in
1466         WebCore. This is supposed to be used in combination with tiling.
1467
1468         * UIProcess/API/qt/qwkpage.cpp:
1469         (QWKPage::setActualVisibleContentsRect):
1470         * UIProcess/API/qt/qwkpage.h:
1471         * UIProcess/WebPageProxy.cpp:
1472         (WebKit::WebPageProxy::setActualVisibleContentRect):
1473         * UIProcess/WebPageProxy.h:
1474         * WebProcess/WebPage/WebPage.cpp:
1475         (WebKit::WebPage::setActualVisibleContentRect):
1476         * WebProcess/WebPage/WebPage.h:
1477         * WebProcess/WebPage/WebPage.messages.in:
1478
1479 2010-11-10  Beth Dakin  <bdakin@apple.com>
1480
1481         Reviewed by Simon Fraser.
1482
1483         Fix for https://bugs.webkit.org/show_bug.cgi?id=49356 
1484         -[WebView _scaleWebView:] should take and origin and scroll the 
1485         document
1486         -and corresponding-
1487         <rdar://problem/8643921>
1488
1489         * Shared/API/c/WKSharedAPICast.h:
1490         (WebKit::toImpl):
1491         * UIProcess/API/C/WKPage.cpp:
1492         (WKPageScaleWebView):
1493         * UIProcess/API/C/WKPage.h:
1494         * UIProcess/WebPageProxy.cpp:
1495         (WebKit::WebPageProxy::scaleWebView):
1496         * UIProcess/WebPageProxy.h:
1497         * WebProcess/WebPage/WebPage.cpp:
1498         (WebKit::WebPage::scaleWebView):
1499         * WebProcess/WebPage/WebPage.h:
1500         * WebProcess/WebPage/WebPage.messages.in:
1501
1502 2010-11-10  Ada Chan  <adachan@apple.com>
1503         
1504         Fix Windows build.
1505
1506         * win/WebKit2Generated.make:
1507
1508 2010-11-10  Simon Fraser  <simon.fraser@apple.com>
1509
1510         Reviewed by Anders Carlsson.
1511
1512         Misc drawing area cleanup
1513         https://bugs.webkit.org/show_bug.cgi?id=49349
1514         
1515         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1516         (WebKit::LayerBackedDrawingAreaProxy::setSize):
1517         (WebKit::LayerBackedDrawingAreaProxy::setPageIsVisible):
1518         (WebKit::LayerBackedDrawingAreaProxy::update):
1519         Call process()->send() instead of process()->connection()->send() in case
1520         the web process has not been launched yet.
1521         
1522         * WebProcess/WebPage/WebPage.cpp:
1523         (WebKit::WebPage::WebPage): Delay creation of the drawing area
1524         until after other WebPage state has been initialized, in case
1525         the DrawingArea creation needs to call back to the WebPage.
1526
1527 2010-11-10  Simon Fraser  <simon.fraser@apple.com>
1528
1529         Reviewed by Adam Roben.
1530
1531         Push m_viewSize down to DrawingAreaProxy base class
1532         https://bugs.webkit.org/show_bug.cgi?id=49347
1533         
1534         Some refactoring so that the various drawing area classes
1535         can share m_size.
1536
1537         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1538         (WebKit::ChunkedUpdateDrawingAreaProxy::setSize):
1539         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1540         * UIProcess/DrawingAreaProxy.h:
1541         (WebKit::DrawingAreaProxy::setSize):
1542         (WebKit::DrawingAreaProxy::size):
1543         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1544         (WebKit::LayerBackedDrawingAreaProxy::setSize):
1545         * UIProcess/LayerBackedDrawingAreaProxy.h:
1546         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1547         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1548         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
1549         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
1550         (WebKit::LayerBackedDrawingAreaProxy::platformSetSize):
1551         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
1552         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
1553         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1554         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
1555         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
1556
1557 2010-11-10  Anders Carlsson  <andersca@apple.com>
1558
1559         Reviewed by Dan Bernstein.
1560
1561         Closing tabs sometimes crashes the WebProcess in invalidateContentsAndWindow
1562         https://bugs.webkit.org/show_bug.cgi?id=49335
1563         <rdar://problem/8646621>
1564
1565         * WebProcess/WebPage/WebPage.cpp:
1566         (WebKit::WebPage::changeAcceleratedCompositingMode):
1567         If we fail to send the DidChangeAcceleratedCompositing message, don't null out the
1568         drawing area. This will happen during page teardown.
1569
1570 2010-11-10  Csaba Osztrogonác  <ossy@webkit.org>
1571
1572         Reviewed by David Hyatt.
1573
1574         HTML5 Ruby support should be mandatory feature
1575         https://bugs.webkit.org/show_bug.cgi?id=49272
1576
1577         Remove Ruby as optional feature.
1578
1579         * Configurations/FeatureDefines.xcconfig:
1580         * WebKit2Prefix.h: Touch it to avoid incremental build failure on Windows.
1581
1582 2010-11-10  Sam Weinig  <sam@webkit.org>
1583
1584         Reviewed by Anders Carlsson.
1585
1586         Add license to DerivedSources.make.
1587
1588         * DerivedSources.make:
1589
1590 2010-11-09  Sam Weinig  <sam@webkit.org>
1591
1592         Reviewed by Adam Roben.
1593
1594         Convert client classes to use APIClient base class.
1595         https://bugs.webkit.org/show_bug.cgi?id=49322
1596
1597         * UIProcess/WebFormClient.cpp:
1598         (WebKit::WebFormClient::willSubmitForm):
1599         * UIProcess/WebFormClient.h:
1600         * UIProcess/WebLoaderClient.cpp:
1601         * UIProcess/WebLoaderClient.h:
1602         * UIProcess/WebPolicyClient.cpp:
1603         * UIProcess/WebPolicyClient.h:
1604         * UIProcess/WebUIClient.cpp:
1605         * UIProcess/WebUIClient.h:
1606         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
1607         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h:
1608         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
1609         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
1610         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1611         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1612         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
1613         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
1614         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
1615         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
1616
1617 2010-11-10  Andreas Kling  <kling@webkit.org>
1618
1619         Reviewed by Kenneth Rohde Christiansen.
1620
1621         [Qt][WK2] Fix re-use of memory-mapped files
1622         https://bugs.webkit.org/show_bug.cgi?id=49310
1623
1624         QTemporaryFile::fileName() returns an empty string after close()
1625         so we have to keep separate track of the filename.
1626
1627         Also, we can't reopen the file if it's been QFile::remove()d,
1628         so we defer unlinking until the MappedMemoryPool is destroyed or
1629         the CrashHandler kicks in.
1630
1631         This makes re-use of memory-mapped files work (after we kill an
1632         assertion that the file size == the new mmap size - it's fine if
1633         the file is larger, too.)
1634
1635         * Platform/qt/MappedMemoryPool.cpp:
1636         (WebKit::MappedMemoryPool::~MappedMemoryPool):
1637         (WebKit::MappedMemoryPool::clear):
1638         (WebKit::MappedMemoryPool::mapMemory):
1639         (WebKit::MappedMemoryPool::mapFile):
1640         * Platform/qt/MappedMemoryPool.h:
1641         (WebKit::MappedMemory::mappedFileName):
1642         * Shared/qt/CrashHandler.cpp:
1643         (WebKit::CrashHandler::deleteObjects):
1644         * Shared/qt/UpdateChunk.cpp:
1645         (WebKit::UpdateChunk::encode):
1646
1647 2010-11-09  Brady Eidson  <beidson@apple.com>
1648
1649         Reviewed by the ever-picky Windows build-bot.
1650
1651         Windows build bot was complaining about this.
1652
1653         * Shared/WebContextMenuItemData.cpp:
1654         (WebKit::WebContextMenuItemData::core):
1655
1656 2010-11-09  Anders Carlsson  <andersca@apple.com>
1657
1658         Reviewed by John Sullivan.
1659
1660         WKDownload.h should be a public header.
1661
1662         * WebKit2.xcodeproj/project.pbxproj:
1663
1664 2010-11-09  Brady Eidson  <beidson@apple.com>
1665
1666         Reviewed by Darin Adler.
1667
1668         Part of <rdar://problem/8613727> and https://bugs.webkit.org/show_bug.cgi?id=48720
1669         Customizable context menu support in WebKit2.
1670
1671         This adds a BundlePageContextMenu client and lets WebKit2 consult it with the proposed
1672         list of WebContextMenuItems.
1673         There is no realistic API for the embedding app to actually inspect or create new
1674         WebContextMenuItems (will be "WKContextMenuItem") and that ability will come later.
1675
1676         * WebKit2.pro:
1677         * WebKit2.xcodeproj/project.pbxproj:
1678         * win/WebKit2.vcproj:
1679
1680         * Platform/Logging.cpp:
1681         (initializeLogChannelsIfNecessary):
1682         * Platform/Logging.h:
1683
1684         * Shared/APIObject.h:
1685
1686         * Shared/MutableArray.cpp:
1687         (WebKit::MutableArray::reserveCapacity):
1688         * Shared/MutableArray.h:
1689
1690         * Shared/WebContextMenuItem.cpp: Added.
1691         (WebKit::WebContextMenuItem::WebContextMenuItem):
1692         (WebKit::WebContextMenuItem::data):
1693         * Shared/WebContextMenuItem.h: Added.
1694         (WebKit::WebContextMenuItem::create):
1695         (WebKit::WebContextMenuItem::type):
1696
1697         * Shared/WebContextMenuItemData.cpp:
1698         (WebKit::WebContextMenuItemData::core):
1699         (WebKit::kitItems):
1700         (WebKit::coreItems):
1701         * Shared/WebContextMenuItemData.h:
1702
1703         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1704         (WKBundlePageSetContextMenuClient):
1705         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1706
1707         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: Added.
1708         (WebKit::InjectedBundlePageContextMenuClient::InjectedBundlePageContextMenuClient):
1709         (WebKit::InjectedBundlePageContextMenuClient::initialize):
1710         (WebKit::InjectedBundlePageContextMenuClient::getCustomMenuFromDefaultItems):
1711         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: Added.
1712
1713         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
1714         (WebKit::WebContextMenuClient::getCustomMenuFromDefaultItems): Call through to the injected bundle client
1715           with the default items and convert the returned items back for WebCore to use.
1716
1717         * WebProcess/WebPage/WebPage.cpp:
1718         (WebKit::WebPage::initializeInjectedBundleContextMenuClient):
1719         * WebProcess/WebPage/WebPage.h:
1720         (WebKit::WebPage::injectedBundleContextMenuClient):
1721
1722 2010-11-09  Sam Weinig  <sam@webkit.org>
1723
1724         Add some stylistic flourish to the last patch as suggested by Lord Darin Adler.
1725
1726         * UIProcess/API/C/WKPage.cpp:
1727         (WKPageGetSourceForFrame):
1728         (WKPageGetContentsAsString):
1729         * UIProcess/WebPageProxy.cpp:
1730         (WebKit::invalidateCallbackMap):
1731         * WebProcess/WebPage/WebFrame.cpp:
1732         (WebKit::WebFrame::contentsAsString):
1733
1734 2010-11-09  Sam Weinig  <sam@webkit.org>
1735
1736         Reviewed by Anders Carlsson.
1737
1738         Need WebKit2 mechanism for getting the visible page text
1739         <rdar://problem/8646928>
1740         https://bugs.webkit.org/show_bug.cgi?id=49275
1741
1742         * UIProcess/API/C/WKPage.cpp:
1743         (WKPageGetContentsAsString):
1744         (callContentsAsStringBlockBlockAndDispose):
1745         (WKPageGetContentsAsString_b):
1746         * UIProcess/API/C/WKPage.h:
1747         Add GetContentsAsString callback function declaration and forwarding.
1748
1749         * UIProcess/WebPageProxy.cpp:
1750         (WebKit::invalidateCallbackMap):
1751         (WebKit::WebPageProxy::close):
1752         (WebKit::WebPageProxy::getContentsAsString):
1753         (WebKit::WebPageProxy::didGetContentsAsString):
1754         (WebKit::WebPageProxy::processDidCrash):
1755         * UIProcess/WebPageProxy.h:
1756         Add GetContentsAsString callback and generalize invalidating the callback
1757         maps into a standalone function.
1758
1759         * UIProcess/WebPageProxy.messages.in:
1760         Add DidGetContentsAsString return message.
1761
1762         * WebProcess/WebPage/WebFrame.h:
1763         * WebProcess/WebPage/WebFrame.cpp:
1764         (WebKit::WebFrame::contentsAsString):
1765         Gets the string content of all the subframes.
1766
1767         (WebKit::WebFrame::isFrameSet):
1768         Call through to the document.
1769
1770         * WebProcess/WebPage/WebPage.h:
1771         * WebProcess/WebPage/WebPage.cpp:
1772         (WebKit::WebPage::getContentsAsString):
1773         Forward to the the main frames contentsAsString function.
1774
1775         * WebProcess/WebPage/WebPage.messages.in:
1776         Add GetContentsAsString and collect all callback messages together.
1777
1778 2010-11-09  Sam Weinig  <sam@webkit.org>
1779
1780         Fix mac build.
1781
1782         * WebProcess/mac/WebProcessMac.mm:
1783         (WebKit::WebProcess::platformSetCacheModel):
1784
1785 2010-11-09  Simon Fraser  <simon.fraser@apple.com>
1786
1787         Reviewed by Darin Adler, Dan Bernstein.
1788
1789         <rdar://problem/8360145> Pages using accelerated compositing missing content on Windows
1790
1791         Disable accelerated compositing on Windows until we have cross-process
1792         rendering implemented.
1793
1794         * WebProcess/WebPage/WebPage.cpp:
1795         (WebKit::WebPage::updatePreferences):
1796
1797 2010-11-09  Anders Carlsson  <andersca@apple.com>
1798
1799         Reviewed by Sam Weinig.
1800
1801         Add injected bundle API for creating page overlays
1802         https://bugs.webkit.org/show_bug.cgi?id=49282
1803
1804         * Shared/API/c/WKBase.h:
1805         Add WKBundlePageOverlayRef.
1806
1807         * Shared/APIObject.h:
1808         Add TypeBundlePageOverlay.
1809
1810         * WebKit2.pro:
1811         * WebKit2.xcodeproj/project.pbxproj:
1812         Add new files.
1813
1814         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
1815         Add WKBundlePageOverlayRef mapping.
1816
1817         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1818         (WKBundlePageInstallPageOverlay):
1819         Install the passed in page overlay.
1820
1821         (WKBundlePageUninstallPageOverlay):
1822         Uninstall the passed in page overlay.
1823
1824         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: Added.
1825         (PageOverlayClientImpl::create):
1826         (PageOverlayClientImpl::PageOverlayClientImpl):
1827         (PageOverlayClientImpl::pageOverlayDestroyed):
1828         (PageOverlayClientImpl::willMoveToWebPage):
1829         (PageOverlayClientImpl::didMoveToWebPage):
1830         (PageOverlayClientImpl::drawRect):
1831         (PageOverlayClientImpl::mouseEvent):
1832         Add a PageOverlay::Client subclass that forwards everything to its client.
1833
1834         (WKBundlePageOverlayGetTypeID):
1835         (WKBundlePageOverlayCreate):
1836         Create a page overlay.
1837
1838         * WebProcess/WebPage/FindController.cpp:
1839         (WebKit::FindController::pageOverlayDestroyed):
1840         * WebProcess/WebPage/FindController.h:
1841         Add stub.
1842
1843         * WebProcess/WebPage/PageOverlay.h:
1844         Inherit from APIObject.
1845
1846         (WebKit::PageOverlay::type):
1847         return TypeBundlePageOverlay.
1848
1849         * win/WebKit2.vcproj:
1850         Add new files.
1851
1852 2010-11-09  Anders Carlsson  <andersca@apple.com>
1853
1854         Reviewed by Sam Weinig.
1855
1856         Get rid of FindPageOverlay
1857         https://bugs.webkit.org/show_bug.cgi?id=49268
1858
1859         * WebKit2.pro:
1860         * WebKit2.xcodeproj/project.pbxproj:
1861         Remove files.
1862
1863         * WebProcess/WebPage/FindController.cpp:
1864         (WebKit::FindController::findString):
1865         Create a PageOverlay with the FindController as its client.
1866
1867         (WebKit::FindController::willMoveToWebPage):
1868         Null out the find page overlay if the web page is null.
1869
1870         (WebKit::FindController::didMoveToWebPage):
1871         Add stub.
1872
1873         * WebProcess/WebPage/FindController.h:
1874         FindController is now a PageOverlay::Client.
1875
1876         * WebProcess/WebPage/FindPageOverlay.cpp: Removed.
1877         * WebProcess/WebPage/FindPageOverlay.h: Removed.
1878         * WebProcess/WebPage/PageOverlay.cpp:
1879         (WebKit::PageOverlay::setPage):
1880         Call the willMoveToWebPage and didMoveToWebPage client functions.
1881
1882         (WebKit::PageOverlay::setNeedsDisplay):
1883         Pass the page overlay bounds instead of the web page size.
1884
1885         * WebProcess/WebPage/WebPage.cpp:
1886         (WebKit::WebPage::installPageOverlay):
1887         Clear the page of the previous page overlay.
1888
1889         (WebKit::WebPage::uninstallPageOverlay):
1890         Clear the page of the previous page overlay.
1891
1892         * WebProcess/WebPage/WebPage.h:
1893         The page overlay is now refcounted.
1894
1895         * win/WebKit2.vcproj:
1896         Remove files.
1897
1898 2010-11-09  Sam Weinig  <sam@webkit.org>
1899
1900         Fix windows build.
1901
1902         * WebProcess/win/WebProcessWin.cpp:
1903         (WebKit::WebProcess::platformSetCacheModel):
1904
1905 2010-11-09  Sam Weinig  <sam@webkit.org>
1906
1907         Reviewed by Adam Roben.
1908
1909         Factor calculation of cache sizes based on cache model into shared function
1910         https://bugs.webkit.org/show_bug.cgi?id=48706
1911
1912         * WebProcess/WebProcess.cpp:
1913         (WebKit::WebProcess::calculateCacheSizes):
1914         * WebProcess/WebProcess.h:
1915         * WebProcess/mac/WebProcessMac.mm:
1916         (WebKit::volumeFreeSize):
1917         (WebKit::WebProcess::platformSetCacheModel):
1918         * WebProcess/win/WebProcessWin.cpp:
1919         (WebKit::memorySize):
1920         (WebKit::volumeFreeSize):
1921         (WebKit::WebProcess::platformSetCacheModel):
1922
1923 2010-11-09  Sam Weinig  <sam@webkit.org>
1924
1925         Reviewed by Anders Carlsson.
1926
1927         Context menus show up in the wrong place when the page is scrolled
1928         https://bugs.webkit.org/show_bug.cgi?id=49264
1929
1930         Convert the hitTestResult point into 'window' coordinates before sending over
1931         to the UIProcess to show the menu.
1932
1933         * WebProcess/WebPage/WebContextMenu.cpp:
1934         (WebKit::WebContextMenu::show):
1935         Convert to use message sender interface.
1936
1937         (WebKit::WebContextMenu::itemSelected):
1938         Remove unnecessary WebCore::'s.
1939
1940 2010-11-09  Sam Weinig  <sam@webkit.org>
1941
1942         Reviewed by Anders Carlsson.
1943
1944         Send messages directly to the WebContext
1945         https://bugs.webkit.org/show_bug.cgi?id=49262
1946
1947         * Platform/CoreIPC/MessageID.h:
1948         Temporarily add MessageClassWebContextLegacy.
1949
1950         * Shared/CoreIPCSupport/WebContextMessageKinds.h:
1951         Rename adding Legacy prefix.
1952
1953         * UIProcess/WebContext.cpp:
1954         (WebKit::WebContext::didNavigateWithNavigationData):
1955         (WebKit::WebContext::didPerformClientRedirect):
1956         (WebKit::WebContext::didPerformServerRedirect):
1957         (WebKit::WebContext::didUpdateHistoryTitle):
1958         (WebKit::WebContext::setCacheModel):
1959         (WebKit::WebContext::addVisitedLink):
1960         (WebKit::WebContext::addVisitedLinkHash):
1961         (WebKit::WebContext::getPlugins):
1962         (WebKit::WebContext::getPluginPath):
1963         (WebKit::WebContext::didReceiveMessage):
1964         (WebKit::WebContext::didReceiveSyncMessage):
1965         * UIProcess/WebContext.h:
1966         * UIProcess/WebContext.messages.in: Added.
1967         * UIProcess/WebProcessProxy.cpp:
1968         (WebKit::WebProcessProxy::getPluginProcessConnection):
1969         (WebKit::WebProcessProxy::didReceiveMessage):
1970         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1971         * UIProcess/WebProcessProxy.h:
1972         * UIProcess/WebProcessProxy.messages.in:
1973         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1974         (WebKit::InjectedBundle::postMessage):
1975         (WebKit::InjectedBundle::postSynchronousMessage):
1976         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1977         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
1978         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1979         (WebKit::WebFrameLoaderClient::setTitle):
1980         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1981         (WebKit::WebPlatformStrategies::populatePluginCache):
1982         * WebProcess/WebPage/WebPage.cpp:
1983         (WebKit::WebPage::createPlugin):
1984         * WebProcess/WebProcess.cpp:
1985         (WebKit::WebProcess::addVisitedLink):
1986         Move context related messages to be sent directly to the context.
1987
1988         * DerivedSources.make:
1989         * DerivedSources.pro:
1990         * WebKit2.pro:
1991         * WebKit2.xcodeproj/project.pbxproj:
1992         * win/WebKit2.vcproj:
1993         Add new files.
1994
1995 2010-11-09  Anders Carlsson  <andersca@apple.com>
1996
1997         Reviewed by John Sullivan.
1998
1999         Move the find page overlay code to FindController
2000         https://bugs.webkit.org/show_bug.cgi?id=49266
2001
2002         * WebProcess/WebPage/FindController.cpp:
2003         (WebKit::FindController::~FindController):
2004         (WebKit::FindController::rectsForTextMatches):
2005         (WebKit::overlayBackgroundColor):
2006         (WebKit::FindController::drawRect):
2007         (WebKit::FindController::mouseEvent):
2008         * WebProcess/WebPage/FindController.h:
2009         * WebProcess/WebPage/FindPageOverlay.cpp:
2010         (WebKit::FindPageOverlay::drawRect):
2011         (WebKit::FindPageOverlay::mouseEvent):
2012         * WebProcess/WebPage/FindPageOverlay.h:
2013         * WebProcess/WebPage/PageOverlay.cpp:
2014         (WebKit::PageOverlay::bounds):
2015         (WebKit::PageOverlay::drawRect):
2016         (WebKit::PageOverlay::mouseEvent):
2017         * WebProcess/WebPage/PageOverlay.h:
2018
2019 2010-11-09  Anders Carlsson  <andersca@apple.com>
2020
2021         Reviewed by John Sullivan.
2022
2023         Add a PageOverlay::Client object in preparation of not allowing subclassing of PageOverlay
2024         https://bugs.webkit.org/show_bug.cgi?id=49263
2025
2026         * WebProcess/WebPage/FindPageOverlay.cpp:
2027         (WebKit::FindPageOverlay::FindPageOverlay):
2028         Call the PageOverlay constructor.
2029
2030         (WebKit::FindPageOverlay::drawRect):
2031         (WebKit::FindPageOverlay::mouseEvent):
2032         These now take a PageOverlay callback.
2033
2034         * WebProcess/WebPage/FindPageOverlay.h:
2035         FindPageOverlay now inherits from PageOverlay::Client.
2036
2037         * WebProcess/WebPage/PageOverlay.cpp:
2038         (WebKit::PageOverlay::create):
2039         Add create function.
2040
2041         (WebKit::PageOverlay::PageOverlay):
2042         The constructor now takes a client.
2043
2044         (WebKit::PageOverlay::drawRect):
2045         (WebKit::PageOverlay::mouseEvent):
2046         Call the client methods.
2047
2048         * WebProcess/WebPage/PageOverlay.h:
2049         Add Client class.
2050
2051 2010-11-09  Dan Bernstein  <mitz@apple.com>
2052
2053         Rubber-stamped by Darin Adler.
2054
2055         <rdar://problem/8646456> WebProcess crashes reproducibly on complex text
2056
2057         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2058         (InitWebCoreSystemInterface): Initialize wkCreateCTTypesetterWithUniCharProviderAndOptions
2059         and wkCreateCTLineWithUniCharProvider.
2060
2061 2010-11-09  Sam Weinig  <sam@webkit.org>
2062
2063         Fix Windows build.
2064
2065         * win/WebKit2.vcproj:
2066
2067 2010-11-09  Sam Weinig  <sam@webkit.org>
2068
2069         Fix Qt build.
2070
2071         * WebKit2.pro:
2072
2073 2010-11-09  Sam Weinig  <sam@webkit.org>
2074
2075         Reviewed by Anders Carlsson.
2076
2077         Windows Popup widget support (<select>)
2078         <rdar://problem/8559439>
2079         https://bugs.webkit.org/show_bug.cgi?id=48701
2080
2081         Port WebCore's PopupMenuWin's implementation to work within the confines of WebKit2.
2082         Since we currently can't draw text using WebCore in the UIProcess, this approach uses
2083         the WebProcess to create two bitmaps representing the full popup menu (both unselected and 
2084         selected) and sends them to the UIProcess to be drawn in an HWND.
2085
2086         * Shared/BackingStore.h:
2087         * Shared/cg/BackingStoreCG.cpp:
2088         * Shared/qt/BackingStoreQt.cpp:
2089
2090         Add new function to create a flipped graphics context from the backing store, 
2091         and add additional parameters to paint, to allow more control of how the backing
2092         store is painted into the destination context.
2093
2094         * Shared/PlatformPopupMenuData.cpp: Added.
2095         (WebKit::PlatformPopupMenuData::PlatformPopupMenuData):
2096         (WebKit::PlatformPopupMenuData::encode):
2097         (WebKit::PlatformPopupMenuData::decode):
2098         * Shared/PlatformPopupMenuData.h: Added.
2099         Add struct so platforms can send platform specific data to their popup menu implementations.
2100
2101         * Shared/WebPopupItem.cpp:
2102         (WebKit::WebPopupItem::WebPopupItem):
2103         (WebKit::WebPopupItem::encode):
2104         (WebKit::WebPopupItem::decode):
2105         * Shared/WebPopupItem.h:
2106         Add isLabel for each menu item.
2107
2108         * UIProcess/FindIndicator.cpp:
2109         (WebKit::FindIndicator::draw):
2110         Update for new BackingStore::paint signature.
2111
2112         * UIProcess/WebPageProxy.cpp:
2113         (WebKit::WebPageProxy::showPopupMenu):
2114         * UIProcess/WebPageProxy.h:
2115         * UIProcess/WebPageProxy.messages.in:
2116         * UIProcess/WebPopupMenuProxy.h:
2117         * UIProcess/mac/WebPopupMenuProxyMac.h:
2118         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2119         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2120         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2121         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2122         * UIProcess/qt/WebPopupMenuProxyQt.h:
2123         Pass through the new PlatformPopupMenuData.
2124
2125         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2126         * UIProcess/win/WebPopupMenuProxyWin.h:
2127         Port implementation from WebCore.
2128
2129         * UIProcess/win/WebView.cpp:
2130         (WebKit::WebView::createPopupMenuProxy):
2131         Pass the WebView to the WebPopupMenuProxyWin.
2132
2133         * WebProcess/Plugins/PluginProxy.cpp:
2134         (WebKit::PluginProxy::paint):
2135         (WebKit::PluginProxy::update):
2136         Update for new BackingStore::paint signature.
2137
2138         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2139         (WebKit::WebPopupMenu::populateItems): Add isLabel for each item.
2140         (WebKit::WebPopupMenu::show): Give each platform a chance to add platform specific data.
2141         * WebProcess/WebCoreSupport/WebPopupMenu.h:
2142
2143         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: Added.
2144         (WebKit::WebPopupMenu::setUpPlatformData):
2145         * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp: Added.
2146         (WebKit::WebPopupMenu::setUpPlatformData):
2147         Add stubbed out setUpPlatformData.
2148
2149         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Added.
2150         (WebKit::WebPopupMenu::setUpPlatformData):
2151         Compute data needed in the UIProcess including generating the bitmaps.
2152
2153         * WebKit2.pro:
2154         * WebKit2.xcodeproj/project.pbxproj:
2155         * win/WebKit2.vcproj:
2156         Add new files.
2157
2158 2010-11-09  Balazs Kelemen  <kbalazs@webkit.org>
2159
2160         Reviewed by Csaba Osztrogonác.
2161
2162         [Qt][WK2] ASSERT fail in fast/frames/lots-of-objects.html
2163         https://bugs.webkit.org/show_bug.cgi?id=49253
2164
2165         * Platform/qt/SharedMemoryQt.cpp:
2166         (WebKit::SharedMemory::create): Do not assert
2167         when the attach was unsuccessful but return with 0.
2168
2169 2010-11-09  Balazs Kelemen  <kbalazs@webkit.org>
2170
2171         Reviewed by Andreas Kling.
2172
2173         [Qt][WK2] WebKitTestRunner is dead
2174         https://bugs.webkit.org/show_bug.cgi?id=49129
2175
2176         * Platform/qt/SharedMemoryQt.cpp:
2177         (WebKit::SharedMemory::~SharedMemory):
2178         Follow up fix: do not access the QSharedMemory object
2179         in an assert if it has been deleted.
2180
2181 2010-11-08  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2182
2183         Reviewed by Andreas Kling.
2184
2185         Send page scroll requests to the PageClient when scroll delegation is turned on
2186         https://bugs.webkit.org/show_bug.cgi?id=49171
2187
2188         Implement the IPC and API required for making scroll delegation work
2189         with WebKit2. This is only used when you have tiling enabled.
2190
2191         * UIProcess/API/qt/qwkpage.cpp:
2192         (QWKPagePrivate::pageDidRequestScroll):
2193         * UIProcess/API/qt/qwkpage.h:
2194         * UIProcess/API/qt/qwkpage_p.h:
2195         * UIProcess/PageClient.h:
2196         * UIProcess/WebPageProxy.cpp:
2197         (WebKit::WebPageProxy::pageDidRequestScroll):
2198         * UIProcess/WebPageProxy.h:
2199         * UIProcess/WebPageProxy.messages.in:
2200         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2201         (WebKit::WebChromeClient::delegatedScrollRequested):
2202         * WebProcess/WebPage/WebPage.cpp:
2203         (WebKit::WebPage::pageDidRequestScroll):
2204         * WebProcess/WebPage/WebPage.h:
2205
2206 2010-11-08  Ivan Krstić  <ike@apple.com>
2207
2208         Reviewed by Mark Rowe.
2209
2210         <rdar://problem/8531943> Enable partial symbolication for sandbox violations in WebProcess.
2211
2212         * WebProcess/com.apple.WebProcess.sb:
2213
2214 2010-11-08  Juha Savolainen  <juha.savolainen@weego.fi>
2215
2216         Reviewed by Andreas Kling.
2217
2218         [Qt] Added new methods to QWKHistory and made QWKHistoryItemPrivate to shared object.
2219         https://bugs.webkit.org/show_bug.cgi?id=49063
2220
2221         Added more functionality to the QWKHistory and changed QWKHistoryItemPrivate to shared object.
2222         This is needed because we cannot delete the QWKHistoryItemPrivate pointer in destructor of QWKHistoryItem,
2223         there may have other history instances which share same private implementation.
2224
2225         * UIProcess/API/qt/qwkhistory.cpp:
2226         (QWKHistoryItemPrivate::~QWKHistoryItemPrivate):
2227         (QWKHistoryItem::QWKHistoryItem):
2228         (QWKHistoryItem::QWKHistoryItem::operator=):
2229         (QWKHistory::currentItem): Added
2230         (QWKHistory::backItem): Added
2231         (QWKHistory::forwardItem): Added
2232         (QWKHistory::itemAt): Added
2233         (QWKHistory::backItems): Added
2234         (QWKHistory::forwardItems): Added
2235         * UIProcess/API/qt/qwkhistory.h:
2236         * UIProcess/API/qt/qwkhistory_p.h:
2237
2238 2010-11-08  Anders Carlsson  <andersca@apple.com>
2239
2240         Reviewed by Dan Bernstein.
2241
2242         Add WKDownloadClient API
2243         https://bugs.webkit.org/show_bug.cgi?id=49227
2244
2245         * Shared/API/c/WKBase.h:
2246         Add WKDownloadRef.
2247
2248         * UIProcess/API/C/WKAPICast.h:
2249         Add WKDownloadRef <-> DownloadProxy mapping.
2250         
2251         * UIProcess/API/C/WKContext.cpp:
2252         (WKContextSetDownloadClient):
2253         Initialize the download client.
2254
2255         * UIProcess/API/C/WKContext.h:
2256         Add new WKContextDownloadClient API.
2257         
2258         * UIProcess/API/C/WKDownload.cpp: Added.
2259         * UIProcess/API/C/WKDownload.h:
2260         Add WKDownload files.
2261
2262         * UIProcess/Downloads/DownloadProxy.cpp:
2263         (WebKit::DownloadProxy::didStart):
2264         (WebKit::DownloadProxy::didCreateDestination):
2265         (WebKit::DownloadProxy::didFinish):
2266         Call down to the the WebDownloadClient.
2267         
2268         * UIProcess/Downloads/DownloadProxy.messages.in:
2269         Rename DidBegin to DidStart.
2270
2271         * UIProcess/WebContext.cpp:
2272         (WebKit::WebContext::initializeDownloadClient):
2273         Initialize the download client.
2274
2275         * UIProcess/WebContext.h:
2276         (WebKit::WebContext::downloadClient):
2277         Add getter.
2278
2279         * UIProcess/WebDownloadClient.cpp:
2280         (WebKit::WebDownloadClient::didStart):
2281         (WebKit::WebDownloadClient::didCreateDestination):
2282         (WebKit::WebDownloadClient::didFinish):
2283         Call the relevant WKContextDownloadClient functions.
2284
2285         * WebKit2.pro:
2286         * WebKit2.xcodeproj/project.pbxproj:
2287         Add new files.
2288
2289         * WebProcess/Downloads/Download.cpp:
2290         (WebKit::Download::didStart):
2291         * WebProcess/Downloads/Download.h:
2292         * WebProcess/Downloads/mac/DownloadMac.mm:
2293         (-[WKDownloadAsDelegate downloadDidBegin:]):
2294         Rename Download::didBegin to Download::didStart.
2295
2296         * win/WebKit2.vcproj:
2297         Add new files.
2298
2299 2010-11-08  Brady Eidson  <beidson@apple.com>
2300
2301         Reviewed by Anders Carlsson.
2302
2303         Part of https://bugs.webkit.org/show_bug.cgi?id=49222
2304         Rename "WebContextMenuItem" to "WebContextMenuItemData"
2305
2306         * WebKit2.pro:
2307         * WebKit2.xcodeproj/project.pbxproj:
2308         * win/WebKit2.vcproj:
2309
2310         * Shared/WebContextMenuItem.cpp: Removed.
2311         * Shared/WebContextMenuItem.h: Removed.
2312         * Shared/WebContextMenuItemData.cpp: Copied from Shared/WebContextMenuItem.cpp.
2313         (WebKit::WebContextMenuItemData::WebContextMenuItemData):
2314         (WebKit::WebContextMenuItemData::encode):
2315         (WebKit::WebContextMenuItemData::decode):
2316         (WebKit::kitItems):
2317         * Shared/WebContextMenuItemData.h: Copied from Shared/WebContextMenuItem.h.
2318         (WebKit::WebContextMenuItemData::submenu):
2319
2320         * UIProcess/WebContextMenuProxy.h:
2321
2322         * UIProcess/WebPageProxy.cpp:
2323         (WebKit::WebPageProxy::showContextMenu):
2324         (WebKit::WebPageProxy::contextMenuItemSelected):
2325         * UIProcess/WebPageProxy.h:
2326         * UIProcess/WebPageProxy.messages.in:
2327
2328         * UIProcess/mac/WebContextMenuProxyMac.h:
2329         * UIProcess/mac/WebContextMenuProxyMac.mm:
2330         (-[WebMenuTarget forwardContextMenuAction:]):
2331         (WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
2332         (WebKit::nsMenuItemVector):
2333         (WebKit::WebContextMenuProxyMac::populate):
2334         (WebKit::WebContextMenuProxyMac::showContextMenu):
2335
2336         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2337         (WebKit::WebContextMenuProxyQt::showContextMenu):
2338         * UIProcess/qt/WebContextMenuProxyQt.h:
2339
2340         * UIProcess/win/WebContextMenuProxyWin.cpp:
2341         (WebKit::WebContextMenuProxyWin::showContextMenu):
2342         * UIProcess/win/WebContextMenuProxyWin.h:
2343
2344         * WebProcess/WebPage/WebContextMenu.cpp:
2345         (WebKit::WebContextMenu::itemSelected):
2346         * WebProcess/WebPage/WebContextMenu.h:
2347
2348         * WebProcess/WebPage/WebPage.cpp:
2349         (WebKit::WebPage::didSelectItemFromActiveContextMenu):
2350         * WebProcess/WebPage/WebPage.h:
2351         * WebProcess/WebPage/WebPage.messages.in:
2352
2353 2010-11-08  Anders Carlsson  <andersca@apple.com>
2354
2355         Reviewed by John Sullivan and Dan Bernstein.
2356
2357         Find in Page: scrolling the page with the scrollbar while overlay is up dismisses the overlay
2358         https://bugs.webkit.org/show_bug.cgi?id=49219
2359         <rdar://problem/8569550>
2360
2361         * WebProcess/WebPage/FindPageOverlay.cpp:
2362         (WebKit::FindPageOverlay::bounds):
2363         Return the bounds of the find page overlay, excluding any scrollbars.
2364
2365         (WebKit::FindPageOverlay::drawRect):
2366         Call bounds.
2367
2368         (WebKit::FindPageOverlay::mouseEvent):
2369         Only dismiss the find UI if the mouse down event happens inside the overlay bounds.
2370
2371 2010-11-08  Anders Carlsson  <andersca@apple.com>
2372
2373         Reviewed by Adam Roben.
2374
2375         Add the ability to send messages to DownloadProxy objects
2376         https://bugs.webkit.org/show_bug.cgi?id=49213
2377
2378         * DerivedSources.make:
2379         * DerivedSources.pro:
2380         Add Download.messages.in.
2381
2382         * Platform/CoreIPC/MessageID.h:
2383         Add MessageClassDownloadProxy message class.
2384
2385         * Platform/CoreIPC/MessageSender.h:
2386         Include Connection.h directly since it's required.
2387
2388         * UIProcess/Downloads/DownloadProxy.cpp:
2389         (WebKit::DownloadProxy::didBegin):
2390         (WebKit::DownloadProxy::didCreateDestination):
2391         (WebKit::DownloadProxy::didFinish):
2392         Add stubs.
2393
2394         * UIProcess/Downloads/DownloadProxy.messages.in: Added.
2395
2396         * UIProcess/WebContext.cpp:
2397         (WebKit::WebContext::didReceiveMessage):
2398         Handle DownloadProxy messages.
2399
2400         * UIProcess/WebProcessProxy.cpp:
2401         (WebKit::WebProcessProxy::didReceiveMessage):
2402         Hand DownloadProxy messages off to the context.
2403
2404         * WebKit2.pro:
2405         * WebKit2.xcodeproj/project.pbxproj:
2406         Add new files.
2407
2408         * WebProcess/Downloads/Download.cpp:
2409         (WebKit::Download::didBegin):
2410         (WebKit::Download::didReceiveData):
2411         (WebKit::Download::didCreateDestination):
2412         (WebKit::Download::didFinish):
2413         Send messages.
2414
2415         * WebProcess/Downloads/mac/DownloadMac.mm:
2416         (-[WKDownloadAsDelegate download:didCreateDestination:]):
2417         Call Download::didCreateDestination.
2418
2419         * win/WebKit2.vcproj:
2420         Add new files.
2421
2422 2010-11-08  Anders Carlsson  <andersca@apple.com>
2423
2424         Reviewed by Adam Roben.
2425
2426         Add DownloadProxy object
2427         https://bugs.webkit.org/show_bug.cgi?id=49211
2428
2429         DownloadProxy will be the implementation of the forthcoming WKDownloadRef object.
2430
2431         * Shared/APIObject.h:
2432         Add TypeDownload.
2433
2434         * UIProcess/Downloads/DownloadProxy.cpp:
2435         (WebKit::generateDownloadID):
2436         Generate a unique download ID.
2437
2438         (WebKit::DownloadProxy::invalidate):
2439         Null out the web context.
2440
2441         * UIProcess/Downloads/DownloadProxy.h:
2442         (WebKit::WebContext::processDidClose):
2443         Invalidate all downloads.
2444
2445         (WebKit::WebContext::createDownloadProxy):
2446         Create a WebDownload object.
2447
2448         * UIProcess/WebPageProxy.cpp:
2449         (WebKit::WebPageProxy::receivedPolicyDecision):
2450         Call createDownloadProxy instead.
2451
2452         * WebKit2.pro:
2453         * WebKit2.xcodeproj/project.pbxproj:
2454         * win/WebKit2.vcproj:
2455         Add new files.
2456
2457         * win/WebKit2Common.vsprops:
2458         Add new include path.
2459
2460 2010-11-08  Alexey Proskuryakov  <ap@apple.com>
2461
2462         Reviewed by Darin Adler.
2463
2464         https://bugs.webkit.org/show_bug.cgi?id=49201
2465         Crash when closing a page
2466
2467         Handle null frame by passing a 0 frame id (normal ones start from 1).
2468
2469         * UIProcess/WebPageProxy.cpp:
2470         (WebKit::WebPageProxy::focusedFrameChanged):
2471         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2472         (WebKit::WebChromeClient::focusedFrameChanged):
2473
2474 2010-11-08  Nate Chapin  <japhet@chromium.org>
2475
2476         Reviewed by Alexey Proskuryakov.
2477
2478         Function call update for 
2479         https://bugs.webkit.org/show_bug.cgi?id=27165.
2480
2481         * WebProcess/Plugins/PluginView.cpp:
2482         (WebKit::PluginView::Stream::start):
2483
2484 2010-11-08  Anders Carlsson  <andersca@apple.com>
2485
2486         Reviewed by Adam Roben.
2487
2488         NPClass::construct and NPClass::invokeDefault never called with out-of-process plug-ins in WebKit2
2489         https://bugs.webkit.org/show_bug.cgi?id=49198
2490
2491         * Shared/Plugins/NPObjectMessageReceiver.cpp:
2492         (WebKit::NPObjectMessageReceiver::invokeDefault):
2493         Call NPClass::invokeDefault.
2494
2495         (WebKit::NPObjectMessageReceiver::construct):
2496         Call NPClass::construct
2497         
2498         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2499         Add InvokeDefault and Construct messages.
2500
2501         * Shared/Plugins/NPObjectProxy.cpp:
2502         (WebKit::NPObjectProxy::invokeDefault):
2503         Send the InvokeDefault message.
2504
2505         (WebKit::NPObjectProxy::construct):
2506         Send the Construct message.
2507
2508         (WebKit::NPObjectProxy::NP_InvokeDefault):
2509         Call NPObjectProxy::invokeDefault.
2510
2511         (WebKit::NPObjectProxy::NP_Construct):
2512         Call NPObjectProxy::construct.
2513
2514 2010-11-08  Anders Carlsson  <andersca@apple.com>
2515
2516         Reviewed by Dan Bernstein.
2517
2518         Plug-in views should not assume that plugins are RenderEmbeddedObjects
2519         https://bugs.webkit.org/show_bug.cgi?id=49196
2520         <rdar://problem/8638467>
2521
2522         * WebProcess/Plugins/PluginView.cpp:
2523         (WebKit::PluginView::pluginProcessCrashed):
2524
2525 2010-11-08  Anders Carlsson  <andersca@apple.com>
2526
2527         Reviewed by Adam Roben.
2528
2529         NPN_Evaluate doesn't work with out-of-process plugins in WebKit2
2530         https://bugs.webkit.org/show_bug.cgi?id=49193
2531
2532         * PluginProcess/PluginControllerProxy.cpp:
2533         (WebKit::PluginControllerProxy::evaluate):
2534         Send an Evaluate message.
2535
2536         * WebProcess/Plugins/PluginProxy.cpp:
2537         (WebKit::PluginProxy::evaluate):
2538         Call Evaluate on the plug-in proxy.
2539
2540         * WebProcess/Plugins/PluginProxy.h:
2541         * WebProcess/Plugins/PluginProxy.messages.in:
2542         Add Evaluate message.
2543
2544 2010-11-08  Anders Carlsson  <andersca@apple.com>
2545
2546         Reviewed by John Sullivan.
2547
2548         Correctly convert NPObjectProxy to NPVariantData
2549         https://bugs.webkit.org/show_bug.cgi?id=49190
2550
2551         * Shared/Plugins/NPObjectMessageReceiver.h:
2552         (WebKit::NPObjectMessageReceiver::npObject):
2553         Add NPObject getter.
2554
2555         * Shared/Plugins/NPObjectProxy.h:
2556         (WebKit::NPObjectProxy::npObjectID):
2557         Add NPObjectID getter.
2558
2559         * Shared/Plugins/NPRemoteObjectMap.cpp:
2560         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
2561         Handle the case where the NPObject is an NPObjectProxy.
2562
2563         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
2564         Handle NPVariantData::LocalNPObjectID.
2565
2566         * Shared/Plugins/NPVariantData.cpp:
2567         (WebKit::NPVariantData::makeRemoteNPObjectID):
2568         * Shared/Plugins/NPVariantData.h:
2569         New function for creating an NPVariantData that contains a remote NPObject ID.
2570
2571 2010-11-08  Alexey Proskuryakov  <ap@apple.com>
2572
2573         Reviewed by Darin Adler.
2574
2575         https://bugs.webkit.org/show_bug.cgi?id=48685
2576         Notify UI process about focused frame
2577
2578         Handle notifications, store the current one in WebPageProxy in UI process.
2579
2580         * UIProcess/API/C/WKPage.cpp:
2581         (WKPageGetFocusedFrame):
2582         * UIProcess/API/C/WKPage.h:
2583         * UIProcess/WebPageProxy.cpp:
2584         (WebKit::WebPageProxy::focusedFrameChanged):
2585         * UIProcess/WebPageProxy.h:
2586         (WebKit::WebPageProxy::focusedFrame):
2587         * UIProcess/WebPageProxy.messages.in:
2588         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2589         (WebKit::WebChromeClient::focusedFrameChanged):
2590         * WebProcess/WebCoreSupport/WebChromeClient.h:
2591
2592 2010-11-07  Adam Barth  <abarth@webkit.org>
2593
2594         Reviewed by Eric Seidel.
2595
2596         Rename Cache to MemoryCache
2597         https://bugs.webkit.org/show_bug.cgi?id=49159
2598
2599         * WebProcess/WebProcess.cpp:
2600         * WebProcess/mac/WebProcessMac.mm:
2601         * WebProcess/win/WebProcessWin.cpp:
2602
2603 2010-11-06  Balazs Kelemen  <kbalazs@webkit.org>
2604
2605         Reviewed by Andreas Kling.
2606
2607         [Qt][WK2] WebKitTestRunner is dead
2608         https://bugs.webkit.org/show_bug.cgi?id=49129
2609
2610         * Platform/qt/SharedMemoryQt.cpp:
2611         (WebKit::SharedMemory::~SharedMemory):
2612         Avoid double deletion when deleteLater has
2613         already been called.
2614
2615 2010-11-05  Chris Marrin  <cmarrin@apple.com>
2616
2617         Reviewed by Simon Fraser.
2618
2619         suspendAnimations/resumeAnimations not present in WebKit2
2620         https://bugs.webkit.org/show_bug.cgi?id=49109
2621
2622         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2623         (WKBundleFrameSuspendAnimations):
2624         (WKBundleFrameResumeAnimations):
2625         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2626         * WebProcess/WebPage/WebFrame.cpp:
2627         (WebKit::WebFrame::suspendAnimations):
2628         (WebKit::WebFrame::resumeAnimations):
2629         * WebProcess/WebPage/WebFrame.h:
2630
2631 2010-11-05  Anders Carlsson  <andersca@apple.com>
2632
2633         Reviewed by Darin Adler.
2634
2635         WebProcess won't kill itself if UIProcess goes away while WebProcess is spinning
2636         https://bugs.webkit.org/show_bug.cgi?id=49090
2637         <rdar://problem/7834575>
2638
2639         * Platform/CoreIPC/Connection.cpp:
2640         (CoreIPC::Connection::connectionDidClose):
2641         Call Client::didCloseOnConnectionWorkQueue.
2642
2643         * Platform/CoreIPC/Connection.h:
2644         (CoreIPC::Connection::Client::didCloseOnConnectionWorkQueue):
2645         Add new client function. Will be called on the connection work queue when the connection is closed.
2646
2647         * Platform/WorkItem.h:
2648         (FunctionWorkItem0::FunctionWorkItem0):
2649         (FunctionWorkItem0::execute):
2650         (WorkItem::create):
2651         Add a new WorkItem subclass that will invoke a C function.
2652
2653         * Platform/WorkQueue.h:
2654         * Platform/mac/WorkQueueMac.cpp:
2655         (WorkQueue::scheduleWorkAfterDelay):
2656         New function which will schedule the given work item to be executed in at least 'delay' seconds.
2657
2658         * Platform/qt/WorkQueueQt.cpp:
2659         (WorkQueue::scheduleWorkAfterDelay):
2660         Add empty stub.
2661         
2662         * Platform/win/WorkQueueWin.cpp:
2663         (WorkQueue::scheduleWorkAfterDelay):
2664         Ditto.
2665
2666         * PluginProcess/PluginProcess.h:
2667         Derive from ChildProcess.
2668
2669         * Shared/ChildProcess.cpp: Added.
2670         (WebKit::ChildProcess::ChildProcess):
2671         (WebKit::ChildProcess::~ChildProcess):
2672         (WebKit::watchdogCallback):
2673         Call _exit.
2674
2675         (WebKit::ChildProcess::didCloseOnConnectionWorkQueue):
2676         When the connection is closed, schedule a work item to be run in 10 seconds. If the process hasn't
2677         exited normally by then, we'll exit.
2678
2679         * Shared/ChildProcess.h: 
2680         Add new ChildProcess class which is a common base class of WebProcess and PluginProcess and which contains
2681         the watchdog timer logic.
2682
2683         * WebKit2.pro:
2684         * WebKit2.xcodeproj/project.pbxproj:
2685         Add new files.
2686
2687         * WebProcess/WebProcess.h:
2688         Derive from ChildProcess.
2689
2690         * win/WebKit2.vcproj:
2691         Add new files.
2692
2693 2010-11-05  Adam Roben  <aroben@apple.com>
2694
2695         Implement PluginInfoStore::shouldUsePlugin on Windows
2696
2697         Fixes <http://webkit.org/b/43509> <rdar://problem/8273822> WebKit2
2698         should refuse to load the same plugins that old-WebKit refuses to load
2699
2700         Reviewed by Anders Carlsson.
2701
2702         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2703         (WebKit::fileVersion): Helper function to construct a 64-bit file
2704         version from two 32-bit numbers.
2705         (WebKit::PluginInfoStore::getPluginInfo): Ported code from
2706         WebCore::PluginPackage::fetchInfo to get the plugin's version. We now
2707         store it in Plugin::fileVersion.
2708
2709         (WebKit::isOldWindowsMediaPlayerPlugin):
2710         (WebKit::isNewWindowsMediaPlayerPlugin):
2711         Added these helpers. The code came from
2712         WebCore::PluginDatabase::getPluginPathsInDirectories.
2713
2714         (WebKit::PluginInfoStore::shouldUsePlugin): Implemented. The code was
2715         ported from WebCore::PluginDatabase::getPluginPathsInDirectories and
2716         WebCore::PluginPackage::isPluginBlacklisted.
2717
2718 2010-11-05  Adam Roben  <aroben@apple.com>
2719
2720         Operate on m_plugins directly in PluginInfoStore::shouldUsePlugin
2721
2722         We'll need to operate on m_plugins if we ever want to unload an
2723         already-loaded plugin before loading the new one.
2724
2725         Fixes <http://webkit.org/b/49076> loadedPlugins parameter to
2726         PluginInfoStore::shouldUsePlugin is redundant
2727
2728         Reviewed by Anders Carlsson.
2729
2730         * UIProcess/Plugins/PluginInfoStore.cpp:
2731         (WebKit::PluginInfoStore::loadPlugin):
2732         * UIProcess/Plugins/PluginInfoStore.h:
2733         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2734         (WebKit::PluginInfoStore::shouldUsePlugin):
2735         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
2736         (WebKit::PluginInfoStore::shouldUsePlugin):
2737         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2738         (WebKit::PluginInfoStore::shouldUsePlugin):
2739         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2740         (WebKit::PluginInfoStore::shouldUsePlugin):
2741         Removed the loadedPlugins parameter from shouldUsePlugin. The single
2742         implementation (Mac) now uses m_plugins directly.
2743
2744 2010-11-05  Anders Carlsson  <andersca@apple.com>
2745
2746         Reviewed by Adam Roben.
2747
2748         Implement pluginElementNPObject
2749         https://bugs.webkit.org/show_bug.cgi?id=49077
2750
2751         * PluginProcess/PluginControllerProxy.cpp:
2752         (WebKit::PluginControllerProxy::pluginElementNPObject):
2753         Send the GetPluginElementNPObject message.
2754
2755         * WebProcess/Plugins/PluginProxy.cpp:
2756         (WebKit::PluginProxy::getPluginElementNPObject):
2757         Get the plug-in element NPObject and expose it to the other side of the connection.
2758
2759         * WebProcess/Plugins/PluginProxy.messages.in:
2760         Add GetPluginElementNPObject.
2761
2762 2010-11-04  Anders Carlsson  <andersca@apple.com>
2763
2764         Reviewed by Oliver Hunt.
2765
2766         Implement NP_RemoveProperty and NP_Enumerate
2767         https://bugs.webkit.org/show_bug.cgi?id=49046
2768
2769         * Shared/Plugins/NPObjectMessageReceiver.cpp:
2770         (WebKit::NPObjectMessageReceiver::removeProperty):
2771         Call the removeProperty NPClass function.
2772
2773         (WebKit::NPObjectMessageReceiver::enumerate):
2774         Call the enumerate NPClass function.
2775
2776         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
2777         Add RemoveProperty and Enumerate messages.
2778
2779         * Shared/Plugins/NPObjectProxy.cpp:
2780         (WebKit::NPObjectProxy::removeProperty):
2781         Send the RemoveProperty message.
2782
2783         (WebKit::NPObjectProxy::enumerate):
2784         Send the Enumerate message.
2785
2786         (WebKit::NPObjectProxy::NP_RemoveProperty):
2787         Call removeProperty.
2788
2789         (WebKit::NPObjectProxy::NP_Enumerate):
2790         Call enumerate.
2791
2792 2010-11-05  Sam Weinig  <sam@webkit.org>
2793
2794         Fix failing python tests.
2795
2796         * Scripts/webkit2/messages.py:
2797         * Scripts/webkit2/messages_unittest.py:
2798
2799 2010-11-05  Sam Weinig  <sam@webkit.org>
2800
2801         Reviewed by Adam Roben..
2802
2803         Generate the messages sent to the WebProcessProxy
2804         https://bugs.webkit.org/show_bug.cgi?id=49062
2805
2806         * Platform/CoreIPC/MessageID.h:
2807         Temporarily add MessageClassWebProcessProxyLegacy while we still can't
2808         support GetPluginProcessConnection (and deferred sync replies) in the
2809         general mechanism.
2810
2811         * Scripts/webkit2/messages.py:
2812         Add support for WebCore::PluginData and WebKit::WebNavigationDataStore.
2813
2814         * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h:
2815         Remove now unused kinds. Rename to MessageClassWebProcessProxyLegacy.
2816
2817         * UIProcess/WebProcessProxy.cpp:
2818         (WebKit::WebProcessProxy::getPluginPath):
2819         (WebKit::WebProcessProxy::addBackForwardItem):
2820         (WebKit::WebProcessProxy::didNavigateWithNavigationData):
2821         (WebKit::WebProcessProxy::didPerformClientRedirect):
2822         (WebKit::WebProcessProxy::didPerformServerRedirect):
2823         (WebKit::WebProcessProxy::didUpdateHistoryTitle):
2824         (WebKit::WebProcessProxy::didReceiveMessage):
2825         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2826         (WebKit::WebProcessProxy::didDestroyFrame):
2827         * UIProcess/WebProcessProxy.h:
2828         * UIProcess/WebProcessProxy.messages.in: Added.
2829         Move implementations to their own functions.
2830
2831         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2832         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
2833         Change to use WebProcessProxyLegacyMessage.
2834
2835         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2836         (WebKit::WebFrameLoaderClient::updateGlobalHistory):
2837         (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
2838         (WebKit::WebFrameLoaderClient::setTitle):
2839         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2840         (WebKit::WebPlatformStrategies::populatePluginCache):
2841         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2842         (WebKit::updateBackForwardItem):
2843         * WebProcess/WebPage/WebPage.cpp:
2844         (WebKit::WebPage::createPlugin):
2845         * WebProcess/WebProcess.cpp:
2846         (WebKit::WebProcess::addVisitedLink):
2847         (WebKit::WebProcess::removeWebFrame):
2848         Use generated messages.
2849
2850         * DerivedSources.make:
2851         * DerivedSources.pro:
2852         * WebKit2.pro:
2853         * WebKit2.xcodeproj/project.pbxproj:
2854         * win/WebKit2.vcproj:
2855         Add new files.
2856
2857 2010-11-04  Adam Roben  <aroben@apple.com>
2858
2859         Use a window region to clip windowed plugins
2860
2861         Fixes <http://webkit.org/b/49024> <rdar://problem/8487847> Windowed
2862         plugins aren't clipped in WebKit2 on Windows
2863
2864         Reviewed by Jon Honeycutt.
2865
2866         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2867         (WebKit::registerPluginView): Removed the CS_PARENTDC style. This style
2868         makes Windows ignore the window region and always clip to the parent
2869         window. Also pass WebKit.dll's HINSTANCE as part of the WNDCLASSW
2870         struct so that the window class will be specific to WebKit.dll rather
2871         than to WebKit2WebProcess.exe. This is useful for testing, but also
2872         more pedantically correct.
2873         (WebKit::setWindowRegion): Helper function to set a window region and
2874         deal with ownership of the HRGN correctly.
2875         (WebKit::NetscapePlugin::platformGeometryDidChange): Make an HRGN that
2876         corresponds to m_clipRect and set it on the plugin's window.
2877
2878 2010-11-05  Balazs Kelemen  <kbalazs@webkit.org>
2879
2880         Reviewed by Andreas Kling.
2881
2882         [Qt][WK2] Left over files and shared memory segments
2883         https://bugs.webkit.org/show_bug.cgi?id=48985
2884
2885         * Platform/qt/SharedMemoryQt.cpp:
2886         (WebKit::SharedMemory::create): Force deletion of the QSharedMemory
2887         object on terminate by connecting QCoreApplication::aboutToQuit with
2888         deleteLater. Add the object to the CrashHandler as well to release the
2889         shared memory segment even on crash.
2890         (WebKit::SharedMemory::~SharedMemory):
2891         * Shared/qt/CrashHandler.cpp: Added.
2892         CrashHandler has a container for QObjects that we want to
2893         destroy on crash. When we got a signal that we interpret as
2894         a crash then it destroys those objects.
2895         (WebKit::CrashHandler::CrashHandler):
2896         (WebKit::CrashHandler::signalHandler):
2897         (WebKit::CrashHandler::deleteObjects):
2898         * Shared/qt/CrashHandler.h: Added.
2899         (WebKit::CrashHandler::instance):
2900         (WebKit::CrashHandler::didDelete):
2901         (WebKit::CrashHandler::markForDeletionOnCrash):
2902         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2903         (WebKit::ProcessLauncherHelper::ProcessLauncherHelper):
2904         Add the object itself to the CrashHandler to close the QLocalServer
2905         even on crash. Without that the QLocalServer leaves over socket files on the disk.
2906         (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
2907         * WebKit2.pro:
2908
2909 2010-11-04  Jia Pu  <jpu@apple.com>
2910
2911         Reviewed by Dan Bernstein.
2912
2913         reversion bubble in WebViews
2914         https://bugs.webkit.org/show_bug.cgi?id=47630
2915         <rdar://problem/8530960>
2916
2917         This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
2918
2919         * WebProcess/WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
2920         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Ditto.
2921         (WebKit::WebEditorClient::showCorrectionPanel):
2922         (WebKit::WebEditorClient::dismissCorrectionPanel):
2923
2924 2010-11-04  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2925
2926         Reviewed by David Hyatt.
2927
2928         Delegate scrolling via a separate method
2929         https://bugs.webkit.org/show_bug.cgi?id=48988
2930
2931         Add delegatedScrollRequested method to WebChromeClient,
2932         which is only used in conjunging with tiling, and thus ifdef'ed.
2933
2934         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2935         (WebKit::WebChromeClient::delegatedScrollRequested):
2936         * WebProcess/WebCoreSupport/WebChromeClient.h:
2937
2938 2010-11-03  Enrica Casucci  <enrica@apple.com>
2939
2940         Reviewed by Alexey Proskuryakov.
2941
2942         Need a way to test in WebKit2 whether a form field contains marked text
2943         <rdar://problem/8555293>
2944         https://bugs.webkit.org/show_bug.cgi?id=48969
2945         
2946         Added a selection changed notification from the Web process to the UI process.
2947         The message being sent contains information about the current selection.
2948         Event though for this specific bug the only information required is the marked text,
2949         I've added other selection information that will be needed to support IME.
2950         All the stubbed methods are required methods by the NSTextInput protocol.
2951         
2952         * UIProcess/API/mac/PageClientImpl.h:
2953         * UIProcess/API/mac/PageClientImpl.mm:
2954         (WebKit::PageClientImpl::selectionChanged): Added.
2955         * UIProcess/API/mac/WKView.h:
2956         * UIProcess/API/mac/WKView.mm:
2957         (-[WKView initWithFrame:pageNamespaceRef:]): Added initialization of new members.
2958         (-[WKView _selectionChanged:isEditable:isPassword:hasMarkedText:]): Stores the values from
2959         the selection changed message.
2960         (-[WKView selectedRange]): Added stub.
2961         (-[WKView hasMarkedText]): Implemented.
2962         (-[WKView unmarkText]): Added stub.
2963         (-[WKView validAttributesForMarkedText]): Added stub.
2964         (-[WKView setMarkedText:selectedRange:]): Added stub.
2965         (-[WKView markedRange]): Added stub.
2966         (-[WKView attributedSubstringFromRange:]): Added stub.
2967         (-[WKView conversationIdentifier]): Added stub.
2968         (-[WKView characterIndexForPoint:]): Added stub.
2969         (-[WKView firstRectForCharacterRange:]): Added stub.
2970         * UIProcess/API/mac/WKViewInternal.h:
2971         * UIProcess/API/qt/qwkpage.cpp:
2972         (QWKPagePrivate::selectionChanged): Added.
2973         * UIProcess/API/qt/qwkpage_p.h:
2974         * UIProcess/PageClient.h:
2975         * UIProcess/WebPageProxy.cpp:
2976         (WebKit::WebPageProxy::didSelectionChange): New message handler.
2977         * UIProcess/WebPageProxy.h:
2978         * UIProcess/WebPageProxy.messages.in:
2979         * UIProcess/win/WebView.cpp:
2980         (WebKit::WebView::selectionChanged): Added.
2981         * UIProcess/win/WebView.h:
2982         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2983         (WebKit::WebEditorClient::respondToChangedSelection): Added implementation.
2984
2985 2010-11-04  Balazs Kelemen  <kbalazs@webkit.org>
2986
2987         Reviewed by Andreas Kling.
2988
2989         [Qt][WK2] Cleanup UpdateChunk and MappedMemoryPool
2990         https://bugs.webkit.org/show_bug.cgi?id=48994
2991
2992         * Platform/qt/MappedMemoryPool.cpp:
2993         (WebKit::MappedMemoryPool::mapMemory):
2994         Removed argument with default value that was always
2995         used with the default value.
2996         (WebKit::MappedMemoryPool::mapFile): Ditto and
2997         add some asserts.
2998         * Platform/qt/MappedMemoryPool.h:
2999         Encapsulating MappedMemory and remove the unused
3000         MappedMemoryPool::searchForMappedMemory method.
3001         (WebKit::MappedMemory::mappedFile):
3002         (WebKit::MappedMemory::markFree):
3003         (WebKit::MappedMemory::data):
3004         (WebKit::MappedMemory::MappedMemory):
3005         (WebKit::MappedMemory::markUsed):
3006         (WebKit::MappedMemory::mapSize):
3007         (WebKit::MappedMemory::isFree):
3008         (WebKit::MappedMemoryPool::instance):
3009         * Shared/qt/UpdateChunk.cpp:
3010         Removed the unused data method besides other cleanups.
3011         (WebKit::UpdateChunk::UpdateChunk):
3012         (WebKit::UpdateChunk::encode):
3013         (WebKit::UpdateChunk::decode):
3014         (WebKit::UpdateChunk::createImage):
3015         * Shared/qt/UpdateChunk.h:
3016
3017 2010-11-04  Andreas Kling  <kling@webkit.org>
3018
3019         Reviewed by Tor Arne Vestbø.
3020
3021         [Qt] Add a stub WebContextMenuProxy
3022
3023         This is the Qt equivalent of r71333.
3024
3025         * UIProcess/API/qt/qwkpage.cpp:
3026         (QWKPagePrivate::createContextMenuProxy):
3027         * UIProcess/qt/WebContextMenuProxyQt.cpp: Added.
3028         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3029         (WebKit::WebContextMenuProxyQt::create):
3030         (WebKit::WebContextMenuProxyQt::showContextMenu):
3031         (WebKit::WebContextMenuProxyQt::hideContextMenu):
3032         * UIProcess/qt/WebContextMenuProxyQt.h: Added.
3033         * WebKit2.pro:
3034
3035 2010-11-04  Adam Roben  <aroben@apple.com>
3036
3037         Add a do-nothing WebContextMenuProxy implementation on Windows
3038
3039         Fixes <http://webkit.org/b/48992> REGRESSION (r71041): Crash in
3040         WebPageProxy::showContextMenu when right-clicking in WebKit2 on
3041         Windows
3042
3043         Reviewed by Dan Bernstein.
3044
3045         * UIProcess/win/WebContextMenuProxyWin.cpp: Added.
3046         (WebKit::WebContextMenuProxyWin::WebContextMenuProxyWin):
3047         (WebKit::WebContextMenuProxyWin::create):
3048         (WebKit::WebContextMenuProxyWin::showContextMenu):
3049         (WebKit::WebContextMenuProxyWin::hideContextMenu):
3050         * UIProcess/win/WebContextMenuProxyWin.h: Added.
3051         Just stubbed-out this class.
3052
3053         * UIProcess/win/WebView.cpp:
3054         (WebKit::WebView::createContextMenuProxy): Create a new
3055         WebContextMenuProxyWin and return it. Returning 0 results in a crash.
3056
3057         * win/WebKit2.vcproj: Added WebContextMenuProxyWin.
3058
3059 2010-11-04  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3060
3061         Reviewed by Andreas Kling..
3062
3063         [Qt] Build Webkit2 both in debug and release on Mac
3064
3065         On Mac OS X we build QtWebKit in both debug and release, so
3066         we need to also build the webkit2 library in both configs.
3067
3068         * WebKit2.pro:
3069
3070 2010-11-04  Adam Roben  <aroben@apple.com>
3071
3072         Remove lame puts()s from WebPageProxy
3073
3074         Rubber-stamped by Anders Carlsson.
3075
3076         * UIProcess/WebPageProxy.cpp:
3077         (WebKit::WebPageProxy::loadURL):
3078         (WebKit::WebPageProxy::loadURLRequest):
3079
3080 2010-11-03  Alice Liu  <alice.liu@apple.com>
3081
3082         Fix clang++ build 
3083
3084         * PluginProcess/PluginProcess.h:
3085         * UIProcess/Plugins/PluginProcessProxy.h:
3086         * UIProcess/WebContextMenuProxy.h:
3087         Change class to struct and vise versa where needed.
3088
3089 2010-11-03  Anders Carlsson  <andersca@apple.com>
3090
3091         Reviewed by Adam Roben.
3092
3093         Implement NP_SetProperty
3094         https://bugs.webkit.org/show_bug.cgi?id=48956
3095
3096         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3097         (WebKit::NPObjectMessageReceiver::setProperty):
3098         Call the NPClass setProperty function.
3099
3100         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3101         Add SetProperty message.
3102
3103         * Shared/Plugins/NPObjectProxy.cpp:
3104         (WebKit::NPObjectProxy::setProperty):
3105         Send a SetProperty message.
3106
3107         (WebKit::NPObjectProxy::NP_SetProperty):
3108         Call NPObjectProxy::setProperty.
3109
3110 2010-11-03  Anders Carlsson  <andersca@apple.com>
3111
3112         Reviewed by Simon Fraser.
3113
3114         Out of process plug-ins don't support the CA drawing model
3115         https://bugs.webkit.org/show_bug.cgi?id=48950
3116         <rdar://problem/8626019>
3117
3118         * Platform/CoreIPC/HandleMessage.h:
3119         (CoreIPC::callMemberFunction):
3120         Add new overload.
3121
3122         * PluginProcess/PluginControllerProxy.cpp:
3123         (WebKit::PluginControllerProxy::initialize):
3124         Call platformInitialize().
3125
3126         (WebKit::PluginControllerProxy::destroy):
3127         Call platformDestroy().
3128
3129         (WebKit::PluginControllerProxy::isAcceleratedCompositingEnabled):
3130         Assume that accelerated compositing is available if we have a render server port.
3131
3132         (WebKit::PluginControllerProxy::geometryDidChange):
3133         Call platformGeometryDidChange().
3134
3135         * PluginProcess/PluginProcess.h:
3136         * PluginProcess/WebProcessConnection.cpp:
3137         (WebKit::WebProcessConnection::createPlugin):
3138         Pass back the remote layer client ID.
3139
3140         * PluginProcess/WebProcessConnection.messages.in:
3141         Add a remoteLayerClientID out parameter to CreatePlugin.
3142
3143         * PluginProcess/mac/PluginControllerProxyMac.mm: Added.
3144         (WebKit::PluginControllerProxy::platformInitialize):
3145         If the plug-in has a layer, create a remote layer client and associate it with the layer.
3146
3147         (WebKit::PluginControllerProxy::platformDestroy):
3148         Invalidate the remote layer client.
3149
3150         (WebKit::PluginControllerProxy::remoteLayerClientID):
3151         Return the remote layer client ID if one exists.
3152
3153         (WebKit::PluginControllerProxy::platformGeometryDidChange):
3154         Update the layer bounds.
3155
3156         * WebKit2.xcodeproj/project.pbxproj:
3157         Add new files.
3158
3159         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: Added.
3160         (WebKit::PluginProxy::pluginLayer):
3161         Create a render layer if needed.
3162
3163         (WebKit::PluginProxy::needsBackingStore):
3164         Return whether the plug-in needs a backing store. (It doesn't need a backing store if it's a CA plug-in).
3165
3166         * WebProcess/Plugins/PluginProxy.cpp:
3167         (WebKit::PluginProxy::PluginProxy):
3168         Initialize m_remoteLayerClientID.
3169
3170         (WebKit::PluginProxy::initialize):
3171         Set m_remoteLayerClientID.
3172
3173         (WebKit::PluginProxy::paint):
3174         Bail if the plug-in doesn't need a backing store.
3175
3176         (WebKit::PluginProxy::geometryDidChange):
3177         Don't create a backing store if the plug-in doesn't need one.
3178
3179         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3180         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
3181         Remove RetainPtr initialization.
3182
3183         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3184         (WebKit::LayerBackedDrawingArea::platformClear):
3185         Use nullptr instead of 0.
3186
3187 2010-11-03  Anders Carlsson  <andersca@apple.com>
3188
3189         Reviewed by Simon Fraser.
3190
3191         Crash when layout in response to setSize changes the drawing area
3192         https://bugs.webkit.org/show_bug.cgi?id=48947
3193
3194         This is tested by compositing/plugins/small-to-large-composited-plugin.html.
3195
3196         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3197         (WebKit::ChunkedUpdateDrawingArea::setSize):
3198         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3199         (WebKit::LayerBackedDrawingArea::setSize):
3200
3201 2010-11-03  Anders Carlsson  <andersca@apple.com>
3202
3203         Reviewed by Adam Roben.
3204
3205         Pass the accelerated compositing render server port to the plug-in process at startup
3206         https://bugs.webkit.org/show_bug.cgi?id=48925
3207
3208         * PluginProcess/PluginProcess.cpp:
3209         (WebKit::PluginProcess::PluginProcess):
3210         Initialize m_compositingRenderServerPort to MACH_PORT_NULL.
3211
3212         (WebKit::PluginProcess::initialize):
3213         Get the plug-in path and render server port from the creation parameters.
3214         
3215         * PluginProcess/PluginProcess.messages.in:
3216         Change the Initialize message to take a PluginProcessCreationParameters struct.
3217
3218         * Shared/Plugins/PluginProcessCreationParameters.cpp: Added.
3219         * Shared/Plugins/PluginProcessCreationParameters.h: Added.
3220         Add new PluginProcessCreationParameters struct.
3221
3222         * UIProcess/Plugins/PluginProcessProxy.cpp:
3223         (WebKit::PluginProcessProxy::didFinishLaunching):
3224         Initialize now takes a PluginProcessCreationParameters struct.
3225
3226         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: Added.
3227         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
3228         Initialize the render server port.
3229
3230         * WebKit2.xcodeproj/project.pbxproj:
3231         Add new files.
3232
3233 2010-11-03  Tor Arne Vestbø  <tor.arne.vestbo@nokia.com>
3234
3235         Reviewed by Kenneth Rohde Christiansen.
3236
3237         [Qt] Add the webkit2 library to LIBS instead of QMAKE_LFLAGS
3238
3239         Otherwise the library order will get messed up and cause
3240         missing symbols on Mac OS X.
3241
3242         * WebKit2.pri:
3243         * WebKit2.pro:
3244
3245 2010-11-02  Daniel Bates  <dbates@rim.com>
3246
3247         Reviewed by Adam Barth.
3248
3249         For unnamed frames, window.name returns a generated name
3250         https://bugs.webkit.org/show_bug.cgi?id=6751
3251
3252         Part 1 of 2.
3253
3254         Substitute FrameTree::uniqueName() for FrameTree::name() in WebKit2.
3255
3256         * WebProcess/WebPage/WebFrame.cpp:
3257         (WebKit::WebFrame::name):
3258
3259 2010-11-02  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
3260
3261         Reviewed by Martin Robinson.
3262
3263         Changes to enable building WebKit2 for Gtk port.
3264         (https://bugs.webkit.org/show_bug.cgi?id=37369)
3265
3266         * Platform/gtk: Added.
3267         * Platform/gtk/SharedMemoryGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
3268         (WebKit::SharedMemory::Handle::Handle):
3269         (WebKit::SharedMemory::Handle::~Handle):
3270         (WebKit::SharedMemory::Handle::encode):
3271         (WebKit::SharedMemory::Handle::decode):
3272         (WebKit::SharedMemory::create):
3273         (WebKit::SharedMemory::~SharedMemory):
3274         (WebKit::SharedMemory::createHandle):
3275         (WebKit::SharedMemory::systemPageSize):
3276         * Shared/gtk: Added.
3277         * Shared/gtk/BackingStoreGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3278         (WebKit::BackingStore::createGraphicsContext):
3279         (WebKit::BackingStore::paint):
3280         * Shared/gtk/PlatformCertificateInfo.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
3281         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
3282         (WebKit::PlatformCertificateInfo::encode):
3283         (WebKit::PlatformCertificateInfo::decode):
3284         * Shared/gtk/WebCoreArgumentCodersGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3285         (CoreIPC::encodeResourceRequest):
3286         (CoreIPC::decodeResourceRequest):
3287         * UIProcess/Plugins/gtk: Added.
3288         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
3289         (WebKit::PluginInfoStore::pluginsDirectories):
3290         (WebKit::PluginInfoStore::pluginPathsInDirectory):
3291         (WebKit::PluginInfoStore::individualPluginPaths):
3292         (WebKit::PluginInfoStore::getPluginInfo):
3293         (WebKit::PluginInfoStore::shouldUsePlugin):
3294         * WebProcess/InjectedBundle/InjectedBundle.h:
3295         * WebProcess/InjectedBundle/gtk: Added.
3296         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
3297         (WebKit::InjectedBundle::load):
3298         (WebKit::InjectedBundle::activateMacFontAscentHack):
3299         * WebProcess/Plugins/Netscape/gtk: Added.
3300         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Added.  Stubbed implementation for GTK port. Yet to implement.
3301         (WebKit::NetscapePlugin::platformPostInitialize):
3302         (WebKit::NetscapePlugin::platformDestroy):
3303         (WebKit::NetscapePlugin::platformGeometryDidChange):
3304         (WebKit::NetscapePlugin::platformPaint):
3305         (WebKit::toNP):
3306         (WebKit::NetscapePlugin::platformHandleMouseEvent):
3307         (WebKit::NetscapePlugin::platformHandleWheelEvent):
3308         (WebKit::NetscapePlugin::platformSetFocus):
3309         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3310         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3311         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
3312         * WebProcess/WebCoreSupport/gtk: Added.
3313         * WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h: Added. Added. Stubbed implementation for GTK port. Yet to implement.
3314         (WebFrameNetworkingContext::create):
3315         (WebFrameNetworkingContext::WebFrameNetworkingContext):
3316
3317 2010-11-02  Jing Jin  <jjin@apple.com>
3318
3319         Reviewed by Alexey Proskuryakov.
3320
3321         Key down calls are not being sent to the application.
3322         https://bugs.webkit.org/show_bug.cgi?id=48867
3323
3324         * UIProcess/API/mac/WKView.mm:
3325         (-[WKView keyDown:]): Call super when ignoring a key down.
3326
3327 2010-11-02  Anders Carlsson  <andersca@apple.com>
3328
3329         Reviewed by John Sullivan.
3330
3331         Add Null and Int32 to NPVariantData
3332         https://bugs.webkit.org/show_bug.cgi?id=48887
3333
3334         * Shared/Plugins/NPRemoteObjectMap.cpp:
3335         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3336         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3337         * Shared/Plugins/NPVariantData.cpp:
3338         (WebKit::NPVariantData::NPVariantData):
3339         (WebKit::NPVariantData::makeNull):
3340         (WebKit::NPVariantData::makeInt32):
3341         (WebKit::NPVariantData::encode):
3342         (WebKit::NPVariantData::decode):
3343         * Shared/Plugins/NPVariantData.h:
3344         (WebKit::NPVariantData::int32Value):
3345
3346 2010-11-02  Anders Carlsson  <andersca@apple.com>
3347
3348         Reviewed by Adam Roben.
3349
3350         Add support for NP_HasMethod and NP_Invoke
3351         https://bugs.webkit.org/show_bug.cgi?id=48882
3352
3353         * Platform/CoreIPC/HandleMessage.h:
3354         (CoreIPC::callMemberFunction):
3355         Add new overload.
3356
3357         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3358         (WebKit::NPObjectMessageReceiver::hasMethod):
3359         Call hasMethod and return the result.
3360
3361         (WebKit::NPObjectMessageReceiver::invoke):
3362         Convert the arguments, call invoke and return the result.
3363
3364         (WebKit::NPObjectMessageReceiver::getProperty):
3365         Release the converted variant.
3366
3367         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3368         Add HasMethod and Invoke messages.
3369         
3370         * Shared/Plugins/NPObjectProxy.cpp:
3371         (WebKit::NPObjectProxy::hasMethod):
3372         Send the HasMethod message.
3373
3374         (WebKit::NPObjectProxy::invoke):
3375         Send the Invoke message.
3376
3377         (WebKit::NPObjectProxy::NP_HasMethod):
3378         Call hasMethod.
3379
3380         (WebKit::NPObjectProxy::NP_Invoke):
3381         Call invoke.
3382
3383 2010-11-02  Anders Carlsson  <andersca@apple.com>
3384
3385         Reviewed by Sam Weinig.
3386
3387         Implement NP_HasProperty for NPObjectProxy
3388         https://bugs.webkit.org/show_bug.cgi?id=48876
3389
3390         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3391         (WebKit::NPObjectMessageReceiver::hasProperty):
3392         Call The hasProperty callback function.
3393
3394         * Shared/Plugins/NPObjectMessageReceiver.messages.in:
3395         Add HasProperty message.
3396
3397         * Shared/Plugins/NPObjectProxy.cpp:
3398         (WebKit::NPObjectProxy::hasProperty):
3399         Send the HasProperty message.
3400
3401         (WebKit::NPObjectProxy::NP_HasProperty):
3402         Call hasProperty.
3403
3404
3405 2010-11-02  Sam Weinig  <sam@webkit.org>
3406
3407         Reviewed by Anders Carlsson.
3408
3409         Add a way to send startup messages on the context which can be posted when a process launches
3410         <rdar://problem/8617928>
3411         https://bugs.webkit.org/show_bug.cgi?id=48838
3412
3413         Adds WKContextSetInitializationUserDataForInjectedBundle which sets an
3414         APIObject on WebContext to be sent to the InjectedBundle's WKBundleInitialize
3415         function each time a process starts up. This can help in cases where
3416         the WebProcess dies, and will be helpful in the world where there are
3417         multiple WebProcess's per context.
3418
3419         * Scripts/webkit2/messages.py:
3420         * UIProcess/API/C/WKContext.cpp:
3421         (WKContextSetInitializationUserDataForInjectedBundle):
3422         * UIProcess/API/C/WKContext.h:
3423         * UIProcess/WebContext.cpp:
3424         (WebKit::WebContext::ensureWebProcess):
3425         * UIProcess/WebContext.h:
3426         (WebKit::WebContext::setInjectedBundleInitializationUserData):
3427         (WebKit::WebContext::injectedBundleInitializationUserData):
3428         * WebProcess/InjectedBundle/API/c/WKBundleInitialize.h:
3429         * WebProcess/InjectedBundle/InjectedBundle.h:
3430         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
3431         (WebKit::InjectedBundle::load):
3432         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
3433         (WebKit::InjectedBundle::load):
3434         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
3435         (WebKit::InjectedBundle::load):
3436         * WebProcess/WebProcess.cpp:
3437         (WebKit::WebProcess::initializeWebProcess):
3438         * WebProcess/WebProcess.h:
3439         * WebProcess/WebProcess.messages.in:
3440
3441 2010-11-02  Anders Carlsson  <andersca@apple.com>
3442
3443         Reviewed by Sam Weinig.
3444
3445         Implement PluginProxy::pluginScriptableNPObject
3446         https://bugs.webkit.org/show_bug.cgi?id=48874
3447
3448         * PluginProcess/PluginControllerProxy.cpp:
3449         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
3450         Ask the plug-in for its scriptable NPObject, register it with the map and return its object ID.
3451
3452         * PluginProcess/PluginControllerProxy.messages.in:
3453         Add GetPluginScriptableNPObject message.
3454
3455         * WebProcess/Plugins/PluginProxy.cpp:
3456         (WebKit::PluginProxy::pluginScriptableNPObject):
3457         Send the GetPluginScriptableNPObject message.
3458
3459 2010-11-02  Anders Carlsson  <andersca@apple.com>
3460
3461         Reviewed by Dan Bernstein.
3462
3463         Add strings to NPVariantData
3464         https://bugs.webkit.org/show_bug.cgi?id=48871
3465
3466         * Shared/Plugins/NPRemoteObjectMap.cpp:
3467         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3468         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3469         * Shared/Plugins/NPVariantData.cpp:
3470         (WebKit::NPVariantData::makeString):
3471         (WebKit::NPVariantData::encode):
3472         (WebKit::NPVariantData::decode):
3473         * Shared/Plugins/NPVariantData.h:
3474         (WebKit::NPVariantData::stringValue):
3475
3476 2010-11-02  Anders Carlsson  <andersca@apple.com>
3477
3478         Reviewed by Dan Bernstein.
3479
3480         Add convenience functions for allocating NPAPI memory
3481         https://bugs.webkit.org/show_bug.cgi?id=48870
3482
3483         Add npnMemAlloc, npnMemFree and createNPString functions and 
3484         npnMemNew, npnMemNewArray function templates.
3485
3486         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3487         (WebKit::JSNPObject::getOwnPropertyNames):
3488         Use npnMemFree.
3489
3490         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3491         (WebKit::NPJSObject::enumerate):
3492         Use npnMemNewArray.
3493
3494         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3495         (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant):
3496         Use createNPString.
3497
3498         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
3499         (WebKit::npnMemAlloc):
3500         Call malloc.
3501
3502         (WebKit::npnMemFree):
3503         Call free.
3504
3505         (WebKit::createNPString):
3506         Allocate the characters for a new NPString.
3507
3508         (WebKit::createNPObject):
3509         Call npnMemNew.
3510
3511         (WebKit::deallocateNPObject):
3512         Call npnMemFree.
3513
3514         (WebKit::releaseNPVariantValue):
3515         Call npnMemFree.
3516
3517         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h:
3518         (WebKit::npnMemNew):
3519         (WebKit::npnMemNewArray):
3520         Add new functions.
3521
3522         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3523         (WebKit::NPN_MemAlloc):
3524         Call npnMemAlloc.
3525
3526         (WebKit::NPN_MemFree):
3527         Call npnMemFree.
3528
3529         (WebKit::NPN_UTF8FromIdentifier):
3530         Call npnMemNewArray.
3531
3532         (WebKit::copyCString):
3533         Call npnMemNewArray. Correctly initialize the "len" out parameter.
3534
3535 2010-11-02  Jessie Berlin  <jberlin@apple.com>
3536
3537         Windows build fix. Unreviewed.
3538
3539         * win/WebKit2Generated.make:
3540         Add WKInspector.h so that it is copied over to the WebKitBuild directory.
3541
3542 2010-11-02  Anders Carlsson  <andersca@apple.com>
3543
3544         Reviewed by Adam Roben.
3545
3546         Add some support for remote and local NPObjects to NPRemoteObjectMap
3547         https://bugs.webkit.org/show_bug.cgi?id=48864
3548
3549         * Shared/Plugins/NPRemoteObjectMap.cpp:
3550         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3551         If the NPVariant contains an NPObject that isn't an NPObjectProxy, register it
3552         and return its ID.
3553
3554         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3555         If the NPVariantData contains a remote object, create an NPObjectProxy and return it.
3556
3557         * Shared/Plugins/NPVariantData.cpp:
3558         (WebKit::NPVariantData::NPVariantData):
3559         Initialize m_localNPObjectIDValue and m_remoteNPObjectIDValue.
3560
3561         (WebKit::NPVariantData::makeLocalNPObjectID):
3562         Create an NPVariantData that contains a local NPObject ID.
3563
3564         (WebKit::NPVariantData::encode):
3565         Handle local and remote NPObject IDs.
3566
3567         (WebKit::NPVariantData::decode):
3568         Decode local and remote NPObject IDs and "swap them" so an encoded remote NPObject ID is
3569         decoded as a local NPObjectID (and vice versa).
3570
3571         * Shared/Plugins/NPVariantData.h:
3572         (WebKit::NPVariantData::localNPObjectIDValue):
3573         (WebKit::NPVariantData::remoteNPObjectIDValue):
3574
3575 2010-11-02  Anders Carlsson  <andersca@apple.com>
3576
3577         Attempt to fix a GCC release only warning.
3578
3579         * Shared/Plugins/NPVariantData.cpp:
3580         (WebKit::NPVariantData::NPVariantData):
3581
3582 2010-11-02  Anders Carlsson  <andersca@apple.com>
3583
3584         Reviewed by John Sullivan.
3585
3586         Invalidate the NPRemoteObjectMap
3587         https://bugs.webkit.org/show_bug.cgi?id=48856
3588
3589         * Shared/Plugins/NPObjectMessageReceiver.cpp:
3590         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
3591         Remove FIXME. The NPRemoteObjectMap always outlives the NPObjectMessageReceiver.
3592
3593         * Shared/Plugins/NPObjectProxy.cpp:
3594         (WebKit::NPObjectProxy::~NPObjectProxy):
3595         Call npObjectProxyDestroyed here.
3596
3597         (WebKit::NPObjectProxy::invalidate):
3598         Null out m_npRemoteObjectMap.
3599
3600         * Shared/Plugins/NPRemoteObjectMap.cpp:
3601         (WebKit::NPRemoteObjectMap::~NPRemoteObjectMap):
3602         Add assertions.
3603
3604         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
3605         Keep track of the NPObjectProxy by adding it to the m_npObjectProxies set.
3606
3607         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
3608         Remove the NPObjectProxy from the m_npObjectProxies set.
3609
3610         (WebKit::NPRemoteObjectMap::invalidate):
3611         Delete all NPObjectMessageReceivers. Iterate over all NPObjectProxy objects and invalidate them.
3612
3613 2010-11-02  Mike Thole  <mthole@apple.com>
3614
3615         Reviewed by Anders Carlsson.
3616
3617         WebProcessManager informed about crashes too late (pages may have already tried to load a new URL)
3618         https://bugs.webkit.org/show_bug.cgi?id=48853
3619
3620         This also fixes: <rdar://problem/8610451> Webkit2: Crash in WebKit!WebKit::WebProcessProxy::sendMessage opening google.com page
3621
3622         * UIProcess/WebProcessProxy.cpp:
3623         (WebKit::WebProcessProxy::~WebProcessProxy):
3624         Removed invalid assertion that is hit when the WebProcess dies unexpectedly.
3625         (WebKit::WebProcessProxy::didClose):
3626         Reordered so that the individual pages are informed that the processDidCrash() after the shared
3627         WebProcessManager has been. This allows the pages to properly trigger a new process to be launched.
3628
3629 2010-11-02  Enrica Casucci  <enrica@apple.com>
3630
3631         Reviewed by Alexey Proskuryakov.
3632
3633         WebKit2: Repeated cmd-key presses lead to unusable UI state
3634         https://bugs.webkit.org/show_bug.cgi?id=48811
3635         <rdar://problem/8611924>
3636
3637         Given the asynchronous nature of every interaction with the WebProcess,
3638         we could re-send a keyDown event to AppKit that maps to an
3639         action that is currently disabled and therefore will not trigger an action
3640         but a call to the keyDown method of the NSView. We need to detect this
3641         situation to avoid an infinite loop.
3642
3643         * UIProcess/API/mac/WKView.mm:
3644         (-[WKView performKeyEquivalent:]): Delay the release of the last processed event
3645         to the moment we receive another event.
3646         (-[WKView keyDown:]): Added early return in case the event is one we have re-sent.
3647
3648 2010-11-02  Anders Carlsson  <andersca@apple.com>
3649
3650         Reviewed by John Sullivan.
3651
3652         Handle boolean values in NPVariant and NPVariantData
3653         https://bugs.webkit.org/show_bug.cgi?id=48852
3654
3655         * Shared/Plugins/NPRemoteObjectMap.cpp:
3656         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
3657         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
3658         * Shared/Plugins/NPVariantData.cpp:
3659         (WebKit::NPVariantData::makeBool):
3660         (WebKit::NPVariantData::encode):
3661         (WebKit::NPVariantData::decode):
3662         * Shared/Plugins/NPVariantData.h:
3663         (WebKit::NPVariantData::boolValue):
3664
3665 2010-11-02  Anders Carlsson  <andersca@apple.com>
3666
3667         Reviewed by John Sullivan.
3668
3669         Assertion hit in WebProcessProxy::~WebProcessProxy()
3670         https://bugs.webkit.org/show_bug.cgi?id=48849
3671         <rdar://problem/8617676>
3672
3673         It is perfectly valid for the page map to contain pages if the web process proxy
3674         goes away, this can happen if the process crashes for example.
3675
3676         * UIProcess/WebProcessProxy.cpp:
3677         (WebKit::WebProcessProxy::~WebProcessProxy):
3678         Remove the assertion.
3679
3680 2010-11-02  Christian Sejersen  <christian.webkit@gmail.com>
3681
3682         Reviewed by Andreas Kling.
3683
3684         The previous patch only took into account arm targets. This one
3685         now checks whether the build is done inside Scratchbox.
3686         https://bugs.webkit.org/show_bug.cgi?id=47895