8a00270da8c7bb29c61f639e2a3cee48ebb8f2d2
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-01-28  Anders Carlsson  <andersca@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         Add CoreAnimationRenderer class
6         https://bugs.webkit.org/show_bug.cgi?id=53343
7
8         * Shared/mac/CoreAnimationRenderer.h: Added.
9         * Shared/mac/CoreAnimationRenderer.mm: Added.
10
11         (WebKit::CoreAnimationRenderer::CoreAnimationRenderer):
12         Initialize the underlying CARenderer object and hook up a notification observer.
13
14         (WebKit::CoreAnimationRenderer::~CoreAnimationRenderer):
15         Assert that the client is null. It has been set to null by the call to invalidate().
16
17         (WebKit::CoreAnimationRenderer::setBounds):
18         Update the bounds on the CARenderer and the root layer.
19
20         (WebKit::CoreAnimationRenderer::render):
21         Ask the renderer to render and return the next frame time.
22
23         (WebKit::CoreAnimationRenderer::invalidate):
24         Remove the change observer and reset the client.
25
26         (WebKit::CoreAnimationRenderer::rendererDidChange):
27         Call the client member function.
28
29         * WebKit2.xcodeproj/project.pbxproj:
30         Add new files.
31
32 2011-01-28  Anders Carlsson  <andersca@apple.com>
33
34         Reviewed by Sam Weinig.
35
36         Add an OBJC_CLASS macro for forward declaring an Objective-C class
37         https://bugs.webkit.org/show_bug.cgi?id=53337
38
39         * Shared/NativeWebKeyboardEvent.h:
40         * Shared/PrintInfo.h:
41         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
42         * UIProcess/LayerBackedDrawingAreaProxy.h:
43         * UIProcess/WebInspectorProxy.h:
44         * UIProcess/mac/WebContextMenuProxyMac.h:
45         * UIProcess/mac/WebPopupMenuProxyMac.h:
46         * WebProcess/Downloads/Download.h:
47         * WebProcess/Plugins/PluginProxy.h:
48         * WebProcess/WebPage/LayerBackedDrawingArea.h:
49         * WebProcess/WebPage/WebPage.h:
50         * config.h:
51
52 2011-01-28  Anders Carlsson  <andersca@apple.com>
53
54         Reviewed by Sam Weinig.
55
56         Don't put config.h in the message headers.
57
58         * Scripts/webkit2/messages.py:
59         * Scripts/webkit2/messages_unittest.py:
60
61 2011-01-28  Anders Carlsson  <andersca@apple.com>
62
63         Fix build.
64
65         * Shared/mac/ShareableSurface.cpp:
66
67 2011-01-28  Anders Carlsson  <andersca@apple.com>
68
69         Try to unbreak the Windows build.
70
71         * UIProcess/cf/WebPageProxyCF.cpp:
72
73 2011-01-28  Brady Eidson  <beidson@apple.com>
74
75         Reviewed by John Sullivan.
76
77         https://bugs.webkit.org/show_bug.cgi?id=53330
78         Need InjectedBundle API to get the response MIMEType for a URL
79
80         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
81         (WKBundleFrameCopyMIMETypeForResourceWithURL):
82         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
83
84         Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
85         * WebProcess/WebPage/WebFrame.cpp:
86         (WebKit::WebFrame::mimeTypeForResourceWithURL):
87         * WebProcess/WebPage/WebFrame.h:
88
89         Get the MIMEType from the platform's disk cache if available:
90         * WebProcess/WebPage/WebPage.h:
91         * WebProcess/WebPage/mac/WebPageMac.mm:
92         (WebKit::WebPage::cachedResponseMIMETypeForURL):
93         * WebProcess/WebPage/qt/WebPageQt.cpp:
94         (WebKit::WebPage::cachedResponseMIMETypeForURL):
95         * WebProcess/WebPage/win/WebPageWin.cpp:
96         (WebKit::WebPage::cachedResponseMIMETypeForURL):
97
98 2011-01-28  Anders Carlsson  <andersca@apple.com>
99
100         Reviewed by Sam Weinig.
101
102         Clean up the mess introduced when config.h was added to the project:
103
104         - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
105           twice in each file, probably slowing down compile time.
106
107         - Add config.h to all the files that were forgotten in order to keep the build from breaking.
108
109         - Added trap to ensure that config.h is included at the top of every implementation file. If this
110           had been added it would have caught the previous issue.
111
112 2011-01-28  Stephanie Lewis  <slewis@apple.com>
113
114         Reviewed by Geoff Garen.
115
116         <rdar://problem/8857651> Implement unregisterWorld for WebKit2
117         Rename unregisterWorld to clearWrappers.  Clearing the wrappers reduces the 
118         memory use of isolated worlds.
119
120         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
121         (WKBundleScriptWorldClearWrappers):
122         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
123         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
124         (WebKit::InjectedBundleScriptWorld::clearWrappers):
125         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
126
127 2011-01-28  Dan Bernstein  <mitz@apple.com>
128
129         Reviewed by Sam Weinig.
130
131         <select> can't display right-to-left (rtl) languages
132         https://bugs.webkit.org/show_bug.cgi?id=19785
133
134         * Shared/WebPopupItem.cpp:
135         (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
136         (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
137         (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
138         * Shared/WebPopupItem.h:
139         * UIProcess/WebPageProxy.cpp:
140         (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
141         * UIProcess/WebPageProxy.h:
142         * UIProcess/WebPageProxy.messages.in: Ditto.
143         * UIProcess/WebPopupMenuProxy.h:
144         * UIProcess/mac/WebPopupMenuProxyMac.h:
145         * UIProcess/mac/WebPopupMenuProxyMac.mm:
146         (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
147         Set items' text alignment to match the menu's writing direction. Set items' writing direction
148         and direction override according to their styles.
149         (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
150         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
151         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
152         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
153         * WebProcess/WebCoreSupport/WebChromeClient.h:
154         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
155         (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
156         values.
157         (WebKit::WebPopupMenu::show): Pass the menu's writing direction.
158
159 2011-01-28  Anders Carlsson  <andersca@apple.com>
160
161         Reviewed by Adam Roben.
162
163         Add ShareableSurface class
164         https://bugs.webkit.org/show_bug.cgi?id=53313
165
166         * Shared/mac/ShareableSurface.cpp: Added.
167         (WebKit::ShareableSurface::Handle::Handle):
168         Initialize the mach port.
169
170         (WebKit::ShareableSurface::Handle::~Handle):
171         Deallocate our send right if needed.
172
173         (WebKit::ShareableSurface::Handle::encode):
174         Encode the send right, and then null it out.
175
176         (WebKit::ShareableSurface::Handle::decode):
177         Decode the send right.
178         
179         (WebKit::createIOSurface):
180         Create an IOSurface with the given size.
181
182         (WebKit::ShareableSurface::create):
183         Create an IOSurface, either from a size or from a handle.
184
185         (WebKit::ShareableSurface::~ShareableSurface):
186         Delete the texture and framebuffer.
187
188         (WebKit::ShareableSurface::createHandle):
189         Create a mach port from the surface.
190
191         (WebKit::ShareableSurface::attach):
192         Create an FBO if needed and bind it.
193
194         (WebKit::ShareableSurface::detach):
195         Unbind the FBO.
196
197         (WebKit::ShareableSurface::textureID):
198         Generate a new texture and bind it to the IOSurface.
199
200         * Shared/mac/ShareableSurface.h: Added.
201
202         * WebKit2.xcodeproj/project.pbxproj:
203         Add new files.
204
205 2011-01-27  Adam Roben  <aroben@apple.com>
206
207         Change BinarySemaphore to wrap an auto-reset Win32 event on Windows
208
209         Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
210
211         Reviewed by Dave Hyatt.
212
213         * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
214
215         * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
216         member that holds the event.
217
218         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
219         (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
220         (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
221         (CoreIPC::BinarySemaphore::signal): Signal the event.
222         (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
223         for the event to be signaled or for the interval to elapse.
224
225         * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
226
227 2011-01-27  Chris Marrin  <cmarrin@apple.com>
228
229         Reviewed by Anders Carlsson.
230
231         WebKit2: Page flashes just before accelerated compositing animation
232         https://bugs.webkit.org/show_bug.cgi?id=53274
233
234         When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
235         is getting created with the current page size. When the setSize() call is
236         subsequently made, the sizeDidChange() call is not made (which does the initial
237         render of the page) because the old size and new size are the same. The solution
238         is to skip the setting of the size in the ctor and let it go through a size
239         change sequence.
240
241         * UIProcess/DrawingAreaProxy.cpp:
242         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
243
244 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
245
246         Reviewed by Xan Lopez.
247
248         [GTK] Fix dist compilation for the release
249         https://bugs.webkit.org/show_bug.cgi?id=53290
250
251         * GNUmakefile.am: Remove a file that is not in the repository
252         anymore.
253
254
255 2011-01-28  Andreas Kling  <kling@webkit.org>
256
257         Rubber-stamped by Simon Hausmann.
258
259         [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
260
261         Having two signals for this is redundant, combine them into
262         QWKPage::engineConnectionChanged(bool connected).
263
264         * UIProcess/API/qt/qwkpage.cpp:
265         (QWKPagePrivate::didRelaunchProcess):
266         (QWKPagePrivate::processDidCrash):
267         * UIProcess/API/qt/qwkpage.h:
268
269 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
270
271         Reviewed by Maciej Stachowiak.
272
273         Build fix for Mac Intel Debug after r76916
274         https://bugs.webkit.org/show_bug.cgi?id=53284
275
276         Fix macro redefinition by guarding the redefined macros.
277
278         * config.h:
279
280 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
281
282         Unreviewed build fix for Mac Intel Debug after r76916.
283
284         Fix macro redefinition by guarding the redefined macros.
285
286         Check if the macro is already defined before defininig it.
287         c++config.h has the same macros with the same values.
288
289         * config.h:
290
291 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
292
293         Reviewed by Adam Barth.
294
295         Update the expected results for test-webkitpy after r76916.
296
297         Include "config.h" in the expected results as well.
298
299         * Scripts/webkit2/messages_unittest.py:
300
301 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
302
303         Unreviewed buildfix for SnowLeopard Intel Debug.
304
305         Fix macro redefinition by not including config.h.
306
307         Revert previous change in WebPageProxyCF.cpp.
308
309         * UIProcess/cf/WebPageProxyCF.cpp:
310
311 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
312
313         Reviewed by Laszlo Gombos.
314
315         Get rid of prefix header dependency for WebKit2 build system.
316         https://bugs.webkit.org/show_bug.cgi?id=50174
317
318         Add config.h include explicitelly.
319
320         * Platform/CoreIPC/ArgumentDecoder.cpp:
321         * Platform/CoreIPC/ArgumentEncoder.cpp:
322         * Platform/CoreIPC/Attachment.cpp:
323         * Platform/CoreIPC/BinarySemaphore.cpp:
324         * Platform/CoreIPC/Connection.cpp:
325         * Platform/CoreIPC/DataReference.cpp:
326         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
327         * Platform/CoreIPC/mac/ConnectionMac.cpp:
328         * Platform/CoreIPC/qt/ConnectionQt.cpp:
329         * Platform/CoreIPC/win/ConnectionWin.cpp:
330         * Platform/Logging.cpp:
331         * Platform/Module.cpp:
332         * Platform/Region.cpp:
333         * Platform/RunLoop.cpp:
334         * Platform/WorkQueue.cpp:
335         * Platform/cg/CGUtilities.cpp:
336         * Platform/gtk/RunLoopGtk.cpp:
337         * Platform/gtk/SharedMemoryGtk.cpp:
338         * Platform/gtk/WorkQueueGtk.cpp:
339         * Platform/mac/MachUtilities.cpp:
340         * Platform/mac/SharedMemoryMac.cpp:
341         * Platform/mac/WorkQueueMac.cpp:
342         * Platform/qt/MappedMemoryPool.cpp:
343         * Platform/qt/ModuleQt.cpp:
344         * Platform/qt/RunLoopQt.cpp:
345         * Platform/qt/WorkQueueQt.cpp:
346         * Platform/win/ModuleWin.cpp:
347         * Platform/win/RunLoopWin.cpp:
348         * Platform/win/SharedMemoryWin.cpp:
349         * Platform/win/WorkQueueWin.cpp:
350         * PluginProcess/PluginControllerProxy.cpp:
351         * PluginProcess/PluginProcess.cpp:
352         * PluginProcess/WebProcessConnection.cpp:
353         * Scripts/webkit2/messages.py:
354         * Shared/API/c/WKArray.cpp:
355         * Shared/API/c/WKCertificateInfo.cpp:
356         * Shared/API/c/WKContextMenuItem.cpp:
357         * Shared/API/c/WKData.cpp:
358         * Shared/API/c/WKDictionary.cpp:
359         * Shared/API/c/WKError.cpp:
360         * Shared/API/c/WKImage.cpp:
361         * Shared/API/c/WKMutableArray.cpp:
362         * Shared/API/c/WKMutableDictionary.cpp:
363         * Shared/API/c/WKNumber.cpp:
364         * Shared/API/c/WKSecurityOrigin.cpp:
365         * Shared/API/c/WKSerializedScriptValue.cpp:
366         * Shared/API/c/WKString.cpp:
367         * Shared/API/c/WKType.cpp:
368         * Shared/API/c/WKURL.cpp:
369         * Shared/API/c/WKURLRequest.cpp:
370         * Shared/API/c/WKURLResponse.cpp:
371         * Shared/API/c/WKUserContentURLPattern.cpp:
372         * Shared/API/c/cf/WKStringCF.cpp:
373         * Shared/API/c/cf/WKURLCF.cpp:
374         * Shared/API/c/cf/WKURLRequestCF.cpp:
375         * Shared/API/c/cf/WKURLResponseCF.cpp:
376         * Shared/API/c/cg/WKImageCG.cpp:
377         * Shared/API/c/win/WKCertificateInfoWin.cpp:
378         * Shared/ChildProcess.cpp:
379         * Shared/ImmutableArray.cpp:
380         * Shared/ImmutableDictionary.cpp:
381         * Shared/MutableArray.cpp:
382         * Shared/MutableDictionary.cpp:
383         * Shared/OriginAndDatabases.cpp:
384         * Shared/PlatformPopupMenuData.cpp:
385         * Shared/Plugins/NPIdentifierData.cpp:
386         * Shared/Plugins/NPObjectMessageReceiver.cpp:
387         * Shared/Plugins/NPObjectProxy.cpp:
388         * Shared/Plugins/NPRemoteObjectMap.cpp:
389         * Shared/Plugins/NPVariantData.cpp:
390         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
391         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
392         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
393         * Shared/Plugins/PluginProcessCreationParameters.cpp:
394         * Shared/PrintInfo.cpp:
395         * Shared/SessionState.cpp:
396         * Shared/ShareableBitmap.cpp:
397         * Shared/UpdateInfo.cpp:
398         * Shared/VisitedLinkTable.cpp:
399         * Shared/WebBackForwardListItem.cpp:
400         * Shared/WebContextMenuItem.cpp:
401         * Shared/WebContextMenuItemData.cpp:
402         * Shared/WebError.cpp:
403         * Shared/WebEvent.cpp:
404         * Shared/WebEventConversion.cpp:
405         * Shared/WebGeolocationPosition.cpp:
406         * Shared/WebImage.cpp:
407         * Shared/WebKeyboardEvent.cpp:
408         * Shared/WebMemorySampler.cpp:
409         * Shared/WebMouseEvent.cpp:
410         * Shared/WebOpenPanelParameters.cpp:
411         * Shared/WebPageCreationParameters.cpp:
412         * Shared/WebPageGroupData.cpp:
413         * Shared/WebPlatformTouchPoint.cpp:
414         * Shared/WebPopupItem.cpp:
415         * Shared/WebPreferencesStore.cpp:
416         * Shared/WebProcessCreationParameters.cpp:
417         * Shared/WebTouchEvent.cpp:
418         * Shared/WebURLRequest.cpp:
419         * Shared/WebURLResponse.cpp:
420         * Shared/WebWheelEvent.cpp:
421         * Shared/cairo/ShareableBitmapCairo.cpp:
422         * Shared/cf/ArgumentCodersCF.cpp:
423         * Shared/cg/ShareableBitmapCG.cpp:
424         * Shared/gtk/ShareableBitmapGtk.cpp:
425         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
426         * Shared/mac/CommandLineMac.cpp:
427         * Shared/mac/UpdateChunk.cpp:
428         * Shared/qt/CleanupHandler.cpp:
429         * Shared/qt/NativeWebKeyboardEventQt.cpp:
430         * Shared/qt/ShareableBitmapQt.cpp:
431         * Shared/qt/UpdateChunk.cpp:
432         * Shared/qt/WebCoreArgumentCodersQt.cpp:
433         * Shared/qt/WebEventFactoryQt.cpp:
434         * Shared/qt/WebURLRequestQt.cpp:
435         * Shared/qt/WebURLResponseQt.cpp:
436         * Shared/win/CommandLineWin.cpp:
437         * Shared/win/NativeWebKeyboardEventWin.cpp:
438         * Shared/win/PlatformCertificateInfo.cpp:
439         * Shared/win/UpdateChunk.cpp:
440         * Shared/win/WebCoreArgumentCodersWin.cpp:
441         * Shared/win/WebEventFactory.cpp:
442         * Shared/win/WebURLRequestWin.cpp:
443         * Shared/win/WebURLResponseWin.cpp:
444         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
445         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
446         * UIProcess/API/C/WKBackForwardList.cpp:
447         * UIProcess/API/C/WKBackForwardListItem.cpp:
448         * UIProcess/API/C/WKContext.cpp:
449         * UIProcess/API/C/WKCredential.cpp:
450         * UIProcess/API/C/WKDatabaseManager.cpp:
451         * UIProcess/API/C/WKDownload.cpp:
452         * UIProcess/API/C/WKFormSubmissionListener.cpp:
453         * UIProcess/API/C/WKFrame.cpp:
454         * UIProcess/API/C/WKFramePolicyListener.cpp:
455         * UIProcess/API/C/WKGeolocationManager.cpp:
456         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp:
457         * UIProcess/API/C/WKGeolocationPosition.cpp:
458         * UIProcess/API/C/WKInspector.cpp:
459         * UIProcess/API/C/WKNavigationData.cpp:
460         * UIProcess/API/C/WKOpenPanelParameters.cpp:
461         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
462         * UIProcess/API/C/WKPage.cpp:
463         * UIProcess/API/C/WKPageGroup.cpp:
464         * UIProcess/API/C/WKPreferences.cpp:
465         * UIProcess/API/C/WKProtectionSpace.cpp:
466         * UIProcess/API/C/win/WKContextWin.cpp:
467         * UIProcess/API/C/win/WKView.cpp:
468         * UIProcess/API/C/win/WKViewPrivate.cpp:
469         * UIProcess/API/cpp/qt/WKStringQt.cpp:
470         * UIProcess/API/cpp/qt/WKURLQt.cpp:
471         * UIProcess/API/qt/ClientImpl.cpp:
472         * UIProcess/API/qt/qgraphicswkview.cpp:
473         * UIProcess/API/qt/qwkcontext.cpp:
474         * UIProcess/API/qt/qwkpage.cpp:
475         * UIProcess/API/qt/qwkpreferences.cpp:
476         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
477         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
478         * UIProcess/Authentication/WebCredential.cpp:
479         * UIProcess/Authentication/WebProtectionSpace.cpp:
480         * UIProcess/BackingStore.cpp:
481         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
482         * UIProcess/Downloads/DownloadProxy.cpp:
483         * UIProcess/DrawingAreaProxy.cpp:
484         * UIProcess/DrawingAreaProxyImpl.cpp:
485         * UIProcess/FindIndicator.cpp:
486         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
487         * UIProcess/GeolocationPermissionRequestProxy.cpp:
488         * UIProcess/Launcher/ProcessLauncher.cpp:
489         * UIProcess/Launcher/ThreadLauncher.cpp:
490         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
491         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
492         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
493         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
494         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
495         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
496         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
497         * UIProcess/Plugins/PluginInfoStore.cpp:
498         * UIProcess/Plugins/PluginProcessManager.cpp:
499         * UIProcess/Plugins/PluginProcessProxy.cpp:
500         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
501         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
502         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
503         * UIProcess/ResponsivenessTimer.cpp:
504         * UIProcess/TiledDrawingAreaProxy.cpp:
505         * UIProcess/VisitedLinkProvider.cpp:
506         * UIProcess/WebBackForwardList.cpp:
507         * UIProcess/WebContext.cpp:
508         * UIProcess/WebContextInjectedBundleClient.cpp:
509         * UIProcess/WebContextMenuProxy.cpp:
510         * UIProcess/WebDatabaseManagerProxy.cpp:
511         * UIProcess/WebDatabaseManagerProxyClient.cpp:
512         * UIProcess/WebDownloadClient.cpp:
513         * UIProcess/WebEditCommandProxy.cpp:
514         * UIProcess/WebFindClient.cpp:
515         * UIProcess/WebFormClient.cpp:
516         * UIProcess/WebFormSubmissionListenerProxy.cpp:
517         * UIProcess/WebFrameListenerProxy.cpp:
518         * UIProcess/WebFramePolicyListenerProxy.cpp:
519         * UIProcess/WebFrameProxy.cpp:
520         * UIProcess/WebGeolocationManagerProxy.cpp:
521         * UIProcess/WebGeolocationProvider.cpp:
522         * UIProcess/WebHistoryClient.cpp:
523         * UIProcess/WebInspectorProxy.cpp:
524         * UIProcess/WebLoaderClient.cpp:
525         * UIProcess/WebNavigationData.cpp:
526         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
527         * UIProcess/WebPageContextMenuClient.cpp:
528         * UIProcess/WebPageGroup.cpp:
529         * UIProcess/WebPageProxy.cpp:
530         * UIProcess/WebPolicyClient.cpp:
531         * UIProcess/WebPreferences.cpp:
532         * UIProcess/WebProcessManager.cpp:
533         * UIProcess/WebProcessProxy.cpp:
534         * UIProcess/WebResourceLoadClient.cpp:
535         * UIProcess/WebUIClient.cpp:
536         * UIProcess/cf/WebBackForwardListCF.cpp:
537         * UIProcess/cf/WebPageProxyCF.cpp:
538         * UIProcess/cf/WebPreferencesCF.cpp:
539         * UIProcess/gtk/TextCheckerGtk.cpp:
540         * UIProcess/gtk/WebInspectorGtk.cpp:
541         * UIProcess/gtk/WebPageProxyGtk.cpp:
542         * UIProcess/gtk/WebPreferencesGtk.cpp:
543         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
544         * UIProcess/qt/TextCheckerQt.cpp:
545         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
546         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
547         * UIProcess/qt/WebContextMenuProxyQt.cpp:
548         * UIProcess/qt/WebContextQt.cpp:
549         * UIProcess/qt/WebInspectorProxyQt.cpp:
550         * UIProcess/qt/WebPageProxyQt.cpp:
551         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
552         * UIProcess/qt/WebPreferencesQt.cpp:
553         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
554         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
555         * UIProcess/win/TextCheckerWin.cpp:
556         * UIProcess/win/WebContextMenuProxyWin.cpp:
557         * UIProcess/win/WebContextWin.cpp:
558         * UIProcess/win/WebInspectorProxyWin.cpp:
559         * UIProcess/win/WebPageProxyWin.cpp:
560         * UIProcess/win/WebPopupMenuProxyWin.cpp:
561         * UIProcess/win/WebView.cpp:
562         * WebKit2.xcodeproj/project.pbxproj:
563         * WebProcess/Authentication/AuthenticationManager.cpp:
564         * WebProcess/Downloads/Download.cpp:
565         * WebProcess/Downloads/DownloadManager.cpp:
566         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
567         * WebProcess/Downloads/curl/DownloadCurl.cpp:
568         * WebProcess/Downloads/qt/DownloadQt.cpp:
569         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
570         * WebProcess/Geolocation/WebGeolocationManager.cpp:
571         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
572         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
573         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
574         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
575         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
576         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
577         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
578         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
579         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
580         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
581         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
582         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
583         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
584         * WebProcess/InjectedBundle/InjectedBundle.cpp:
585         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
586         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
587         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
588         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
589         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
590         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
591         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
592         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
593         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
594         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
595         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
596         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
597         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
598         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
599         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
600         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
601         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
602         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
603         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
604         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
605         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
606         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
607         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
608         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
609         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
610         * WebProcess/Plugins/Plugin.cpp:
611         * WebProcess/Plugins/PluginProcessConnection.cpp:
612         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
613         * WebProcess/Plugins/PluginProxy.cpp:
614         * WebProcess/Plugins/PluginView.cpp:
615         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
616         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
617         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
618         * WebProcess/WebCoreSupport/WebDragClient.cpp:
619         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
620         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
621         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
622         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
623         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
624         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
625         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
626         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
627         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
628         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
629         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
630         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
631         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
632         * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
633         * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
634         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
635         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
636         * WebProcess/WebKitMain.cpp:
637         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
638         * WebProcess/WebPage/DecoderAdapter.cpp:
639         * WebProcess/WebPage/DrawingArea.cpp:
640         * WebProcess/WebPage/DrawingAreaImpl.cpp:
641         * WebProcess/WebPage/EncoderAdapter.cpp:
642         * WebProcess/WebPage/FindController.cpp:
643         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
644         * WebProcess/WebPage/PageOverlay.cpp:
645         * WebProcess/WebPage/TiledDrawingArea.cpp:
646         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
647         * WebProcess/WebPage/WebContextMenu.cpp:
648         * WebProcess/WebPage/WebEditCommand.cpp:
649         * WebProcess/WebPage/WebFrame.cpp:
650         * WebProcess/WebPage/WebInspector.cpp:
651         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
652         * WebProcess/WebPage/WebPage.cpp:
653         * WebProcess/WebPage/WebPageGroupProxy.cpp:
654         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
655         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
656         * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp:
657         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
658         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
659         * WebProcess/WebPage/qt/WebPageQt.cpp:
660         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
661         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp:
662         * WebProcess/WebPage/win/WebInspectorWin.cpp:
663         * WebProcess/WebPage/win/WebPageWin.cpp:
664         * WebProcess/WebProcess.cpp:
665         * WebProcess/gtk/WebProcessGtk.cpp:
666         * WebProcess/gtk/WebProcessMainGtk.cpp:
667         * WebProcess/qt/WebProcessMainQt.cpp:
668         * WebProcess/qt/WebProcessQt.cpp:
669         * WebProcess/win/WebProcessMainWin.cpp:
670         * WebProcess/win/WebProcessWin.cpp:
671         * config.h: Copied from Source/WebKit2/WebKit2Prefix.h.
672         * win/WebKit2Common.vsprops:
673
674 2011-01-27  Maciej Stachowiak  <mjs@apple.com>
675
676         Reviewed by Darin Adler.
677
678         execCommand("Paste") doesn't work in WebKitTestRunner
679         https://bugs.webkit.org/show_bug.cgi?id=52785
680         
681         Thread through the new JavaScriptCanAccessClipboard setting.
682
683         * Shared/WebPreferencesStore.h:
684         * UIProcess/API/C/WKPreferences.cpp:
685         (WKPreferencesSetJavaScriptCanAccessClipboard):
686         (WKPreferencesGetJavaScriptCanAccessClipboard):
687         * UIProcess/API/C/WKPreferences.h:
688         * WebProcess/WebPage/WebPage.cpp:
689         (WebKit::WebPage::updatePreferences):
690
691 2011-01-27  Nate Chapin  <japhet@chromium.org>
692
693         Reviewed by Adam Barth.
694
695         Use Document::url() instead of FrameLoader::url().
696         https://bugs.webkit.org/show_bug.cgi?id=41165
697
698         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
699         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
700         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
701         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
702         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
703         * WebProcess/WebPage/WebFrame.cpp:
704         (WebKit::WebFrame::url):
705
706 2011-01-27  Sam Weinig  <sam@webkit.org>
707
708         Reviewed by Anders Carlsson.
709
710         Encode/Decode hasPreciseScrollingDeltas bit in WebWheelEvent
711         https://bugs.webkit.org/show_bug.cgi?id=53254
712
713         * Shared/WebWheelEvent.cpp:
714         (WebKit::WebWheelEvent::WebWheelEvent):
715         Initialize m_phase and m_hasPreciseScrollingDeltas.
716
717         (WebKit::WebWheelEvent::encode):
718         (WebKit::WebWheelEvent::decode):
719         Add missing coding for m_hasPreciseScrollingDeltas.
720
721 2011-01-26  Enrica Casucci  <enrica@apple.com>
722
723         Reviewed by Darin Adler and Adam Roben.
724
725         WebKit2: add support for drag and drop on Windows
726         https://bugs.webkit.org/show_bug.cgi?id=52775
727         <rdar://problem/8514409>
728
729         On Windows the access to the content being dragged is
730         provided via the IDataObject interface that is made available
731         to the window that registers itself as drop target.
732         Since this interface cannot be accessed from the WebProcess,
733         in every call to one of the methods of the IDropTarget interface
734         we serialize the content of the drag clipboard and send it over to
735         the WebProcess. The implementation uses the same messages as the
736         Mac one, with slightly different parameters to pass the serialized
737         clipboard.
738
739         * UIProcess/WebPageProxy.cpp:
740         (WebKit::WebPageProxy::performDragControllerAction): Added Windows
741         specific implementation.
742         * UIProcess/WebPageProxy.h:
743         * UIProcess/win/WebView.cpp:
744         (WebKit::WebView::WebView): Added dropTargetHelper object creation.
745         (WebKit::WebView::initialize): Added to register for drag/drop with out
746         refcount issues.
747         (WebKit::WebView::close):
748         (WebKit::WebView::windowReceivedMessage):
749         (WebKit::WebView::QueryInterface):
750         (WebKit::WebView::AddRef):
751         (WebKit::WebView::Release):
752         (WebKit::dragOperationToDragCursor):
753         (WebKit::WebView::keyStateToDragOperation):
754         (WebKit::WebView::DragEnter):
755         (WebKit::WebView::DragOver):
756         (WebKit::WebView::DragLeave):
757         (WebKit::WebView::Drop):
758         * UIProcess/win/WebView.h:
759         (WebKit::WebView::create):
760         * WebProcess/WebPage/WebPage.cpp:
761         (WebKit::WebPage::performDragControllerAction):
762         * WebProcess/WebPage/WebPage.h:
763         * WebProcess/WebPage/WebPage.messages.in:
764
765 2011-01-26  Alexey Proskuryakov  <ap@apple.com>
766
767         Reviewed by Darin Adler.
768
769         https://bugs.webkit.org/show_bug.cgi?id=53197
770         <rdar://problem/8895682> Make WebKit2 printing asynchronous
771
772         <rdar://problem/8899988> REGRESSION(WebKit2): Attempting to print WHATWG HTML spec shows
773         1-page blank preview
774
775         <rdar://problem/8900078> WebKit2 printing has a separate message exchange per page when
776         printing instead of printing all at once
777
778         * UIProcess/API/mac/WKPrintingView.h: Store a lot more cached information.
779
780         * UIProcess/API/mac/WKPrintingView.mm:
781         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use PrintOperation stored in
782         class. We generally want that now, because current operation will not be set up on other threads.
783         (-[WKPrintingView _isPrintingPreview]): Added. Preview is different, because it can draw
784         a placeholder - but actual printing need to wait until UI process has data.
785         (-[WKPrintingView _updatePreview]): Force AppKit to update print preview when we have real
786         data to replace placeholder with.
787         (-[WKPrintingView _hasPageRects]): Return if page rects have already been computed.
788         (-[WKPrintingView _expectedPreviewCallbackForRect:]): Find an existing request for this rect,
789         if any.
790         (pageDidDrawToPDF): Update preview - or if actually printing, release control to printing thread.
791         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ask for a PDF document with
792         pages the user asked to print.
793         (pageDidComputePageRects): When web process returns page geometry data, we update preview to display
794         a page count (which indirectly triggers a request for a preview). When actually printing,
795         request a PDF right away, we'll need it later.
796         (-[WKPrintingView _askPageToComputePageRects]): Ask web process for page geometry.
797         (prepareDataForPrintingOnSecondaryThread): This function starts preparing all data necessary
798         for actual printing on main thread.
799         (-[WKPrintingView knowsPageRange:]): Changed to be async for preview, and to call main
800         thread for actual printing.
801         (-[WKPrintingView _pageForRect:]): Find page number for a given range, assuming that AppKit
802         always asks for full pages.
803         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): A helper function to draw a PDF document.
804         (-[WKPrintingView _drawPreview:]): Draw the whole page for preview.
805         (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
806         Draw the whole page for actual printing.
807         (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): Call drawPageBorderWithSize: with
808         correct graphics context and print operation.
809         (-[WKPrintingView drawPageBorderWithSize:]): Delegate work to main thread when called from a
810         secondary one.
811         (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): Added an assertion that
812         our stored NSPrintOperation isn't out of sync with reality.
813         (-[WKPrintingView rectForPage:]): Handle the case where we don't have the data yet, drawing
814         a placeholder.
815         (-[WKPrintingView endDocument]): When page setup changes, we must reset all state.
816
817         * UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): Tell
818         NSPrintingView which operation it's serving, so that it knows it even when current operation
819         isn't set.
820
821         * UIProcess/GenericCallback.h:
822         (WebKit::ComputedPagesCallback::create):
823         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
824         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
825         (WebKit::ComputedPagesCallback::invalidate):
826         (WebKit::ComputedPagesCallback::callbackID):
827         (WebKit::ComputedPagesCallback::generateCallbackID):
828         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
829         Added ComputedPagesCallback, which returns a vector of IntRects and a double. Hopefully,
830         it will become a specialization of GenericCallback one day.
831
832         * UIProcess/WebPageProxy.cpp:
833         (WebKit::WebPageProxy::close): Added m_voidCallbacks - it looks like they were omitted
834         by accident.
835         (WebKit::WebPageProxy::computedPagesCallback): Added.
836         (WebKit::WebPageProxy::processDidCrash): Added m_computedPagesCallbacks.
837         (WebKit::WebPageProxy::computePagesForPrinting): Async now!
838         (WebKit::WebPageProxy::drawRectToPDF): Ditto.
839         (WebKit::WebPageProxy::drawPagesToPDF): Added.
840         * UIProcess/WebPageProxy.h:
841
842         * UIProcess/WebPageProxy.messages.in: Added ComputedPagesCallback.
843
844         * WebProcess/WebPage/WebPage.cpp:
845         (WebKit::WebPage::beginPriting): Compute page rects right away - we'll need them in
846         drawPagesToPDF(), which doesn't have a PrintInfo.
847         (WebKit::WebPage::computePagesForPrinting): Send async response.
848         (WebKit::WebPage::drawRectToPDF): This function used to draw into original
849         location at frame coordinates, and now it draws at (0, 0).
850         (WebKit::WebPage::drawPagesToPDF): Added - make a multi-page PDF.
851         * WebProcess/WebPage/WebPage.h:
852
853         * WebProcess/WebPage/WebPage.messages.in: Added DrawPagesToPDF.
854
855 2011-01-27  Alejandro G. Castro  <alex@igalia.com>
856
857         Unreviewed GTK build fix after r76797.
858
859         * Shared/WebPreferencesStore.h: Use Qt fonts preference for the moment.
860
861 2011-01-27  Dan Bernstein  <mitz@apple.com>
862
863         Reviewed by Anders Carlsson.
864
865         Allow pop-up menus to contain multiple items that have the same title.
866
867         * UIProcess/mac/WebPopupMenuProxyMac.mm:
868         (WebKit::WebPopupMenuProxyMac::populate): Set the item’s title after adding it rather than
869         when adding it, so that it will not replace any existing item with the same title.
870
871 2011-01-27  Andreas Kling  <kling@webkit.org>
872
873         Reviewed by Kenneth Rohde Christiansen.
874
875         [Qt][WK2] Add QWKPage APIs regarding engine process availability
876         https://bugs.webkit.org/show_bug.cgi?id=53237
877
878         QWKPage will now emit engineConnected() and engineDisconnected()
879         when the web process crashes and is relaunched respectively.
880
881         Also added QWKPage::isConnectedToEngine() for convenience.
882
883         * UIProcess/API/qt/qwkpage.cpp:
884         (QWKPagePrivate::QWKPagePrivate):
885         (QWKPagePrivate::didRelaunchProcess):
886         (QWKPagePrivate::processDidCrash):
887         (QWKPage::isConnectedToEngine):
888         * UIProcess/API/qt/qwkpage.h:
889         * UIProcess/API/qt/qwkpage_p.h:
890
891 2011-01-27  Balazs Kelemen  <kbalazs@webkit.org>
892
893         Reviewed by Andreas Kling.
894
895         [Qt][WK2] Lots of layout test failures due to wrong font type
896         https://bugs.webkit.org/show_bug.cgi?id=53233
897
898         * Shared/WebPreferencesStore.h:
899         Specialize default font families for Qt.
900
901 2011-01-26  Maciej Stachowiak  <mjs@apple.com>
902
903         Reviewed by Dan Bernstein.
904
905         WebKitTestRunner needs to support layoutTestController.evaluateInWebInspector
906         https://bugs.webkit.org/show_bug.cgi?id=42319
907
908         Add WKBundleInspector and APIs needed to implement WebKitTestRunner APIs.
909         
910         * GNUmakefile.am:
911         * Shared/API/c/WKBase.h:
912         * Shared/APIObject.h:
913         * WebKit2.pro:
914         * WebKit2.xcodeproj/project.pbxproj:
915         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
916         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: Added.
917         (WKBundleInspectorGetTypeID):
918         (WKBundleInspectorShow):
919         (WKBundleInspectorClose):
920         (WKBundleInspectorEvaluateScriptForTest):
921         (WKBundleInspectorSetPageProfilingEnabled):
922         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: Added.
923         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
924         (WKBundlePageGetInspector):
925         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
926         * WebProcess/WebPage/WebInspector.cpp:
927         (WebKit::WebInspector::create):
928         (WebKit::WebInspector::evaluateScriptForTest):
929         * WebProcess/WebPage/WebInspector.h:
930         (WebKit::WebInspector::type):
931         * WebProcess/WebPage/WebPage.cpp:
932         (WebKit::WebPage::inspector):
933         * WebProcess/WebPage/WebPage.h:
934         * win/WebKit2.vcproj:
935         * win/WebKit2Generated.make:
936
937 2011-01-26  David Kilzer  <ddkilzer@apple.com>
938
939         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
940         <rdar://problem/8821760>
941
942         Reviewed by Antti Koivisto.
943
944         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
945         (InitWebCoreSystemInterface): Added initialization for
946         GetHTTPPipeliningPriority and SetHTTPPipeliningPriority.
947
948 2011-01-26  Beth Dakin  <bdakin@apple.com>
949
950         Reviewed by Darin Adler.
951
952         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
953         when using WKScrollbars.
954
955         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
956         (InitWebCoreSystemInterface):
957
958 2011-01-26  Sam Weinig  <sam@webkit.org>
959
960         Reviewed by Maciej Stachowiak.
961
962         Add events to represent the start/end of a gesture scroll
963         https://bugs.webkit.org/show_bug.cgi?id=53215
964
965         * Scripts/webkit2/messages.py:
966         * Shared/WebEvent.h:
967         (WebKit::WebGestureEvent::WebGestureEvent):
968         (WebKit::WebGestureEvent::position):
969         (WebKit::WebGestureEvent::globalPosition):
970         * Shared/WebEventConversion.cpp:
971         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
972         (WebKit::platform):
973         * Shared/WebEventConversion.h:
974         * Shared/WebGestureEvent.cpp: Added.
975         (WebKit::WebGestureEvent::WebGestureEvent):
976         (WebKit::WebGestureEvent::encode):
977         (WebKit::WebGestureEvent::decode):
978         (WebKit::WebGestureEvent::isGestureEventType):
979         * Shared/mac/WebEventFactory.h:
980         * Shared/mac/WebEventFactory.mm:
981         (WebKit::gestureEventTypeForEvent):
982         (WebKit::WebEventFactory::createWebGestureEvent):
983         * UIProcess/API/mac/WKView.mm:
984         (-[WKView shortCircuitedEndGestureWithEvent:]):
985         (-[WKView beginGestureWithEvent:]):
986         (-[WKView viewDidMoveToWindow]):
987         * UIProcess/WebPageProxy.cpp:
988         (WebKit::WebPageProxy::handleGestureEvent):
989         (WebKit::WebPageProxy::didReceiveEvent):
990         * UIProcess/WebPageProxy.h:
991         * WebKit2.xcodeproj/project.pbxproj:
992         * WebProcess/WebPage/WebPage.cpp:
993         (WebKit::handleGestureEvent):
994         (WebKit::WebPage::gestureEvent):
995         * WebProcess/WebPage/WebPage.h:
996         * WebProcess/WebPage/WebPage.messages.in:
997         Pipe gesture events down to WebCore.
998
999 2011-01-26  Dan Bernstein  <mitz@apple.com>
1000
1001         Reviewed by Dave Hyatt.
1002
1003         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
1004         https://bugs.webkit.org/show_bug.cgi?id=53184
1005
1006         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1007         (WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the
1008         RenderText constructor.
1009
1010 2011-01-26  Jing Jin  <jjin@apple.com>
1011
1012         Reviewed by Darin Adler.
1013
1014         Methods to temporarily disable size updates to the page drawing area in WKView.
1015         https://bugs.webkit.org/show_bug.cgi?id=53206
1016         Part of <rdar://problem/8818585>
1017
1018         * UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount.
1019         * UIProcess/API/mac/WKView.mm:
1020         (-[WKView setFrameSize:]): Only update page size if frame size updates are enabled.
1021         (-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size.
1022         (-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount
1023         (-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning
1024         that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame.
1025         (-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates.
1026         * UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled.
1027         * UIProcess/API/mac/WKViewPrivate.h: Added.
1028         * WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h
1029
1030 2011-01-26  Jing Jin  <jjin@apple.com>
1031
1032         Rubber-stamped by Dan Bernstein.
1033         
1034         Several WKView Internal category methods are implemented in the main category.
1035         https://bugs.webkit.org/show_bug.cgi?id=53195
1036
1037         * UIProcess/API/mac/WKView.mm:
1038         (-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal).
1039         (-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal).
1040         (-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal).
1041         (-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal).
1042
1043 2011-01-26  Brian Weinstein  <bweinstein@apple.com>
1044
1045         Reviewed by John Sullivan.
1046
1047         WebKit2: Need API to get the frame load state of a BundleFrame
1048         https://bugs.webkit.org/show_bug.cgi?id=53193
1049
1050         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1051         (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
1052         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1053
1054 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
1055
1056         Reviewed by Antti Koivisto.
1057
1058         Crashes loading pages when cancelling subresource loads through WebKit
1059         https://bugs.webkit.org/show_bug.cgi?id=53123
1060         <rdar://problem/8914361>
1061
1062         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1063         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching
1064             a message.
1065
1066 2011-01-25  Chris Fleizach  <cfleizach@apple.com>
1067
1068         Reviewed by Darin Adler.
1069
1070         WK2 leaks when a page is closed
1071         https://bugs.webkit.org/show_bug.cgi?id=53100
1072
1073         Allow the WKView a chance to clean up on a page close. In this case,
1074         cleaning up means removing the references the accessibility token has
1075         to the window.
1076
1077         * UIProcess/API/mac/PageClientImpl.h:
1078         * UIProcess/API/mac/PageClientImpl.mm:
1079         (WebKit::PageClientImpl::pageClosed):
1080         * UIProcess/API/mac/WKView.mm:
1081         (-[WKView _setRemoteAccessibilityWindow:]):
1082         (-[WKView _setAccessibilityChildToken:]):
1083         (-[WKView _processDidCrash]):
1084         (-[WKView _pageClosed]):
1085         * UIProcess/API/mac/WKViewInternal.h:
1086         * UIProcess/API/qt/qwkpage_p.h:
1087         (QWKPagePrivate::pageClosed):
1088         * UIProcess/PageClient.h:
1089         * UIProcess/WebPageProxy.cpp:
1090         (WebKit::WebPageProxy::close):
1091         * UIProcess/win/WebView.cpp:
1092         (WebKit::WebView::pageClosed):
1093         * UIProcess/win/WebView.h:
1094
1095 2011-01-25  Chris Marrin  <cmarrin@apple.com>
1096
1097         Reviewed by Adam Roben.
1098
1099         Expose WebGL flag set/get in WK2
1100         https://bugs.webkit.org/show_bug.cgi?id=53096
1101
1102         * Shared/WebPreferencesStore.h:
1103         * UIProcess/API/C/WKPreferences.cpp:
1104         (WKPreferencesSetWebGLEnabled):
1105         (WKPreferencesGetWebGLEnabled):
1106         * UIProcess/API/C/WKPreferencesPrivate.h:
1107         * WebProcess/WebPage/WebPage.cpp:
1108         (WebKit::WebPage::updatePreferences):
1109
1110 2011-01-25  Anders Carlsson  <andersca@apple.com>
1111
1112         Reviewed by Adam Roben.
1113
1114         Add and implement LayerTreeHost::scheduleLayerFlush
1115         https://bugs.webkit.org/show_bug.cgi?id=53135
1116
1117         * WebKit2.xcodeproj/project.pbxproj:
1118         Add LayerTreeHostMac.mm.
1119
1120         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1121         (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
1122         Call LayerTreeHost::scheduleLayerFlush.
1123
1124         * WebProcess/WebPage/LayerTreeHost.cpp:
1125         (WebKit::LayerTreeHost::~LayerTreeHost):
1126         Call platformInvalidate().
1127
1128         (WebKit::LayerTreeHost::flushPendingLayerChanges):
1129         Rename from syncCompositingLayers.
1130
1131         * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
1132         (WebKit::LayerTreeHost::scheduleLayerFlush):
1133         Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
1134
1135         (WebKit::LayerTreeHost::platformInvalidate):
1136         Invalidate the run loop observer.
1137
1138         (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
1139         Call flushPendingChanges() and remove the run loop observer if it succeeded.
1140
1141 2011-01-25  Anders Carlsson  <andersca@apple.com>
1142
1143         Reviewed by Simon Fraser.
1144
1145         Add LayerTreeHost class
1146         https://bugs.webkit.org/show_bug.cgi?id=53132
1147
1148         * WebKit2.xcodeproj/project.pbxproj:
1149         Add LayerTreeHost files.
1150
1151         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1152         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1153         Initialize m_layerTreeHost.
1154
1155         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1156         Call the m_layerTreeHost.
1157
1158         * WebProcess/WebPage/LayerTreeHost.cpp: Added.
1159         (WebKit::LayerTreeHost::attachRootCompositingLayer):
1160         (WebKit::LayerTreeHost::detachRootCompositingLayer):
1161         Add stubbed out functions.
1162
1163         (WebKit::LayerTreeHost::syncCompositingLayers):
1164         Sync the compositing layers in the main frame.
1165
1166         * WebProcess/WebPage/LayerTreeHost.h: Added.
1167
1168 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
1169
1170         Rubber-stamped by Adam Roben.
1171
1172         Windows production build fix.
1173         Use correct environment variable escaping
1174
1175         * win/WebKit2.make:
1176         * win/WebKit2Generated.make:
1177
1178 2011-01-25  Anders Carlsson  <andersca@apple.com>
1179
1180         Reviewed by Sam Weinig.
1181
1182         Don't inform the UI process about compositing changes when using the new drawing area
1183         https://bugs.webkit.org/show_bug.cgi?id=53120
1184
1185         * WebProcess/WebPage/WebPage.cpp:
1186         (WebKit::WebPage::changeAcceleratedCompositingMode):
1187         Return early if we're using the new drawing area.
1188
1189         (WebKit::WebPage::exitAcceleratedCompositingMode):
1190         Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing.
1191
1192 2011-01-25  Sam Weinig  <sam@webkit.org>
1193
1194         Reviewed by Anders Carlsson.
1195
1196         Pipe a timestamp down into the PlatformWheelEvent for the Mac.
1197         https://bugs.webkit.org/show_bug.cgi?id=53111
1198
1199         * Shared/WebEventConversion.cpp:
1200         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1201         Assign the timestamp.
1202
1203 2011-01-25  Sam Weinig  <sam@webkit.org>
1204
1205         Reviewed by Anders Carlsson.
1206
1207         Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
1208         https://bugs.webkit.org/show_bug.cgi?id=53107
1209
1210         * Shared/WebEvent.h:
1211         (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
1212         * Shared/WebEventConversion.cpp:
1213         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
1214         * Shared/WebWheelEvent.cpp:
1215         (WebKit::WebWheelEvent::WebWheelEvent):
1216         * Shared/mac/WebEventFactory.mm:
1217         (WebKit::WebEventFactory::createWebWheelEvent):
1218
1219 2011-01-25  Anders Carlsson  <andersca@apple.com>
1220
1221         Reviewed by Sam Weinig.
1222
1223         need a way to request the host CALayer render server port
1224         https://bugs.webkit.org/show_bug.cgi?id=53101
1225         <rdar://problem/8913620>
1226
1227         * PluginProcess/PluginControllerProxy.cpp:
1228         (WebKit::PluginControllerProxy::compositingRenderServerPort):
1229         Get the render server port from the plug-in process.
1230
1231         * PluginProcess/PluginControllerProxy.h:
1232         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1233         (WebKit::NPN_GetValue):
1234         Call NetscapePlugin::compositingRenderServerPort.
1235
1236         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1237         (WebKit::NetscapePlugin::compositingRenderServerPort):
1238         Call PluginController::compositingRenderServerPort.
1239
1240         * WebProcess/Plugins/PluginView.cpp:
1241         (WebKit::PluginView::compositingRenderServerPort):
1242         Get the render server port from the web process.
1243
1244         * WebProcess/Plugins/PluginView.h:
1245         Add compositingRenderServerPort.
1246
1247 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
1248
1249         Rubber stamped by Dan Bernstein.
1250
1251         Change some floating point constants from 1.0 to 1.
1252
1253         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1254         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1255
1256 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
1257
1258         Reviewed by Anders Carlsson.
1259
1260         Improve scale factor resetting
1261         https://bugs.webkit.org/show_bug.cgi?id=53093
1262         
1263         Two key changes:
1264         - Don't set the scale factor to what it already is, as this causes an
1265         uneeded force layout and scroll
1266         - Don't ever set the scale factor based on a non-main frame committing
1267         
1268         This fixes two WebKit2 layout tests.
1269
1270         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1271         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1272
1273 2011-01-24  Chris Marrin  <cmarrin@apple.com>
1274
1275         Reviewed by Eric Seidel.
1276
1277         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
1278         https://bugs.webkit.org/show_bug.cgi?id=53041
1279
1280         * Configurations/FeatureDefines.xcconfig:
1281
1282 2011-01-25  Andreas Kling  <kling@webkit.org>
1283
1284         Reviewed by Kenneth Rohde Christiansen.
1285
1286         [Qt][WK2] Add QWKPage::processCrashed() signal
1287         https://bugs.webkit.org/show_bug.cgi?id=53076
1288
1289         * UIProcess/API/qt/qwkpage.cpp:
1290         (QWKPagePrivate::processDidCrash):
1291         * UIProcess/API/qt/qwkpage.h:
1292         * UIProcess/API/qt/qwkpage_p.h:
1293
1294 2011-01-24  Anders Carlsson  <andersca@apple.com>
1295
1296         Fix build.
1297         
1298         * WebProcess/mac/WebProcessMac.mm:
1299         (WebKit::initializeSandbox):
1300
1301 2011-01-24  Anders Carlsson  <andersca@apple.com>
1302
1303         Reviewed by Dan Bernstein.
1304
1305         Reset the page scale factor on standard frame loads
1306         https://bugs.webkit.org/show_bug.cgi?id=53058
1307         <rdar://problem/8908844>
1308
1309         * UIProcess/WebPageProxy.cpp:
1310         (WebKit::WebPageProxy::scaleWebView):
1311         Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
1312
1313         (WebKit::WebPageProxy::viewScaleFactorDidChange):
1314         Update m_viewScaleFactor.
1315
1316         * UIProcess/WebPageProxy.h:
1317         Add viewScaleFactorDidChange.
1318
1319         * UIProcess/WebPageProxy.messages.in:
1320         Add ViewScaleFactorDidChange message.
1321
1322         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1323         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
1324         Set the scale factor.
1325
1326         (WebKit::WebFrameLoaderClient::restoreViewState):
1327         Inform the UI process about the new view scale factor.
1328
1329         * WebProcess/WebPage/WebPage.cpp:
1330         (WebKit::WebPage::scaleWebView):
1331         Send a ViewScaleFactorDidChange message.
1332
1333 2011-01-24  Maciej Stachowiak  <mjs@apple.com>
1334
1335         Reviewed by Anders Carlsson.
1336
1337         Use designated temp directory for the database for WebKit2
1338         https://bugs.webkit.org/show_bug.cgi?id=53052
1339         
1340         Add the API necessary to support this. Database path is now
1341         determined on the UI process side and passed to the Web process.
1342         Reviewed by Anders Carlsson.
1343
1344         * GNUmakefile.am:
1345         * Shared/WebProcessCreationParameters.cpp:
1346         (WebKit::WebProcessCreationParameters::encode):
1347         (WebKit::WebProcessCreationParameters::decode):
1348         * Shared/WebProcessCreationParameters.h:
1349         * UIProcess/API/C/WKContext.cpp:
1350         (WKContextSetDatabaseDirectory):
1351         * UIProcess/API/C/WKContextPrivate.h:
1352         * UIProcess/WebContext.cpp:
1353         (WebKit::WebContext::ensureWebProcess):
1354         (WebKit::WebContext::databaseDirectory):
1355         * UIProcess/WebContext.h:
1356         (WebKit::WebContext::setDatabaseDirectory):
1357         * UIProcess/mac/WebContextMac.mm:
1358         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1359         * UIProcess/qt/WebContextQt.cpp:
1360         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1361         * UIProcess/win/WebContextWin.cpp:
1362         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1363         * WebKit2.pro:
1364         * WebKit2.xcodeproj/project.pbxproj:
1365         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
1366         (WebKit::WebDatabaseManager::initialize):
1367         (WebKit::WebDatabaseManager::WebDatabaseManager):
1368         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1369         * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
1370         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
1371         * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
1372         * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
1373         * WebProcess/WebProcess.cpp:
1374         (WebKit::WebProcess::WebProcess):
1375         (WebKit::WebProcess::initializeWebProcess):
1376         * WebProcess/com.apple.WebProcess.sb:
1377         * WebProcess/mac/WebProcessMac.mm:
1378         (WebKit::initializeSandbox):
1379         * win/WebKit2.vcproj:
1380
1381 2011-01-24  Brent Fulgham  <bfulgham@webkit.org>
1382
1383         Unreviewed build fix.
1384
1385         * win/WebKit2.vcproj: Don't build the CG Utilities when building
1386         without CG support.
1387
1388 2011-01-24  Anders Carlsson  <andersca@apple.com>
1389
1390         Reviewed by John Sullivan.
1391
1392         Don't use the timeout checker for non-user-interaction messages
1393         https://bugs.webkit.org/show_bug.cgi?id=53046
1394
1395         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1396         (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
1397         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
1398         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1399         (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
1400         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
1401
1402 2011-01-24  Adam Roben  <aroben@apple.com>
1403
1404         Windows Production build fix
1405
1406         * win/WebKit2.make: Update for move of WebKit2 into Source.
1407
1408 2011-01-24  Jessie Berlin  <jberlin@apple.com>
1409
1410         Reviewed by Adam Roben.
1411
1412         WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
1413         https://bugs.webkit.org/show_bug.cgi?id=53029
1414
1415         * UIProcess/win/TextCheckerWin.cpp:
1416         Disable the warnings for this file.
1417
1418 2011-01-24  Anders Carlsson  <andersca@apple.com>
1419
1420         Reviewed by Sam Weinig.
1421
1422         Wait for half a second if we're asked to paint when receiving a DidSetSize message
1423         https://bugs.webkit.org/show_bug.cgi?id=53028
1424
1425         * UIProcess/DrawingAreaProxyImpl.cpp:
1426         (WebKit::DrawingAreaProxyImpl::paint):
1427
1428 2011-01-24  Anders Carlsson  <andersca@apple.com>
1429
1430         Reviewed by Sam Weinig.
1431
1432         Implement forceRedisplay in the new drawing area
1433         https://bugs.webkit.org/show_bug.cgi?id=53026
1434
1435         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1436         (WebKit::DrawingAreaImpl::forceRepaint):
1437         * WebProcess/WebPage/DrawingAreaImpl.h:
1438
1439 2011-01-24  Anders Carlsson  <andersca@apple.com>
1440
1441         Reviewed by Sam Weinig.
1442
1443         Fill unpainted rects with the background color.
1444         https://bugs.webkit.org/show_bug.cgi?id=53025
1445
1446         * UIProcess/API/mac/WKView.mm:
1447         (drawPageBackground):
1448         Add new helper function.
1449
1450         (-[WKView drawRect:]):
1451         Iterate over the unpainted rects and fill them with the background color.
1452
1453 2011-01-24  Dan Bernstein  <mitz@apple.com>
1454
1455         Reviewed by John Sullivan.
1456
1457         WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter
1458
1459         * UIProcess/API/mac/PageClientImpl.mm:
1460         (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
1461
1462 2011-01-24  Balazs Kelemen  <kbalazs@webkit.org>
1463
1464         Rubber-stamped by Csaba Osztrogonác.
1465
1466         Typo fix.
1467
1468         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1469         (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
1470
1471 2011-01-24  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
1472
1473         Reviewed by Kenneth Rohde Christiansen.
1474
1475         [Qt] Remove CleanupHandler by passing file descriptors.
1476
1477         Deleting files in signal handler of UI process is not a good idea,
1478         because the memory where filenames are stored might not be valid
1479         after a crash.
1480
1481         To avoid the need of using signal handlers for cleanup,
1482         change following:
1483           1) Avoid passing filenames between processes, pass fds
1484           2) When mmap'ing files, delete them immediately after
1485              opening and mmap'ing them.
1486           3) Pass sockets with fds during fork+exec instead of
1487              passing them via the filesystem.
1488           4) Use mmap'ed files for implementation of SharedMemory.
1489              QSharedMemory does not support cleanup correctly.
1490
1491         Consquences:
1492           - Move MappedMemory to SharedMemory, make UpdateChunk use this.
1493           - Implement CoreIPC::Attachment using mmaped files.
1494           - Send messages using datagram socket. This solution works
1495             similiarly to Mach ports on Mac.
1496           - Send big messages out-of-line and thus avoid increasing
1497             the receive buffer.
1498           - Remove MemoryMappedPool and rely on libc/kernel caching
1499             of mmapped areas.
1500           - Unmap memory areas after use.
1501           - When UI process crashes, kill the web process using SIGKILL.
1502             This is possible again because cleanup handler is not needed.
1503
1504         [WK2][Qt] Multiple problems with MemoryMappedPool
1505         https://bugs.webkit.org/show_bug.cgi?id=51984
1506
1507         * Platform/CoreIPC/Attachment.cpp:
1508         (CoreIPC::Attachment::Attachment):
1509         * Platform/CoreIPC/Attachment.h:
1510         (CoreIPC::Attachment::size):
1511         (CoreIPC::Attachment::releaseFileDescriptor):
1512         (CoreIPC::Attachment::fileDescriptor):
1513         * Platform/CoreIPC/Connection.h:
1514         * Platform/CoreIPC/qt/ConnectionQt.cpp:
1515         (CoreIPC::MessageInfo::MessageInfo):
1516         (CoreIPC::MessageInfo::setMessageBodyOOL):
1517         (CoreIPC::MessageInfo::isMessageBodyOOL):
1518         (CoreIPC::MessageInfo::bodySize):
1519         (CoreIPC::MessageInfo::messageID):
1520         (CoreIPC::MessageInfo::attachmentCount):
1521         (CoreIPC::Connection::platformInitialize):
1522         (CoreIPC::Connection::platformInvalidate):
1523         (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
1524         (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
1525         (CoreIPC::Connection::readyReadHandler):
1526         (CoreIPC::Connection::open):
1527         (CoreIPC::Connection::platformCanSendOutgoingMessages):
1528         (CoreIPC::Connection::sendOutgoingMessage):
1529         * Platform/SharedMemory.h:
1530         * Platform/WorkQueue.h:
1531         * Platform/qt/MappedMemoryPool.cpp: Removed.
1532         * Platform/qt/MappedMemoryPool.h: Removed.
1533         * Platform/qt/SharedMemoryQt.cpp:
1534         (WebKit::SharedMemory::Handle::Handle):
1535         (WebKit::SharedMemory::Handle::~Handle):
1536         (WebKit::SharedMemory::Handle::isNull):
1537         (WebKit::SharedMemory::Handle::encode):
1538         (WebKit::SharedMemory::Handle::decode):
1539         (WebKit::SharedMemory::Handle::releaseToAttachment):
1540         (WebKit::SharedMemory::Handle::adoptFromAttachment):
1541         (WebKit::SharedMemory::create):
1542         (WebKit::accessModeMMap):
1543         (WebKit::SharedMemory::~SharedMemory):
1544         (WebKit::accessModeFile):
1545         (WebKit::SharedMemory::createHandle):
1546         * Platform/qt/WorkQueueQt.cpp:
1547         (WorkQueue::registerSocketEventHandler):
1548         * Shared/qt/UpdateChunk.cpp:
1549         (WebKit::UpdateChunk::UpdateChunk):
1550         (WebKit::UpdateChunk::~UpdateChunk):
1551         (WebKit::UpdateChunk::encode):
1552         (WebKit::UpdateChunk::decode):
1553         (WebKit::UpdateChunk::createImage):
1554         * Shared/qt/UpdateChunk.h:
1555         * UIProcess/Launcher/ProcessLauncher.h:
1556         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
1557         (WebKit::QtWebProcess::QtWebProcess):
1558         (WebKit::QtWebProcess::setupChildProcess):
1559         (WebKit::ProcessLauncher::launchProcess):
1560         (WebKit::ProcessLauncher::platformInvalidate):
1561         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
1562         (WebKit::webThreadBody):
1563         (WebKit::ThreadLauncher::createWebThread):
1564         * WebKit2.pro:
1565         * WebProcess/qt/WebProcessMainQt.cpp:
1566         (WebKit::WebProcessMainQt):
1567
1568 2011-01-24  Andras Becsi  <abecsi@webkit.org>
1569
1570         Reviewed by Csaba Osztrogonác.
1571
1572         [Qt] Move project files into Source
1573         https://bugs.webkit.org/show_bug.cgi?id=52891
1574
1575         * DerivedSources.pro:
1576         * WebKit2.pro:
1577         * WebProcess.pro:
1578
1579 2011-01-23  Damian Kaleta  <dkaleta@apple.com>
1580
1581         Reviewed by Kevin Decker.
1582
1583         <rdar://problem/8905171>
1584         https://bugs.webkit.org/show_bug.cgi?id=52985 
1585
1586         * UIProcess/WebPageProxy.cpp:
1587         (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it 
1588         consistent with WebKit1.
1589
1590 2011-01-23  Alexey Proskuryakov  <ap@apple.com>
1591
1592         Reviewed by Dan Bernstein.
1593
1594         https://bugs.webkit.org/show_bug.cgi?id=52968
1595         Use a separate NSView for printing
1596
1597         Also addresses <rdar://problem/8900148> Improper check for 
1598         -[NSGraphicsContext currentContextDrawingToScreen]
1599
1600         * UIProcess/API/mac/WKPrintingView.h: Added.
1601         * UIProcess/API/mac/WKPrintingView.mm: Added.
1602         (-[WKPrintingView initWithFrameProxy:]):
1603         (-[WKPrintingView isFlipped]):
1604         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
1605         (-[WKPrintingView knowsPageRange:]):
1606         (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1607         (-[WKPrintingView drawPageBorderWithSize:]):
1608         (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
1609         (-[WKPrintingView rectForPage:]):
1610         * UIProcess/API/mac/WKView.mm:
1611         (-[WKView drawRect:]):
1612         (-[WKView canChangeFrameLayout:]):
1613         (-[WKView printOperationWithPrintInfo:forFrame:]):
1614         * WebKit2.xcodeproj/project.pbxproj:
1615         Moved printing code to a separate view, simplifying as appropriate. The view is currently not
1616         referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
1617
1618 2011-01-22  Anders Carlsson  <andersca@apple.com>
1619
1620         Reviewed by Sam Weinig.
1621
1622         Transparent windows with compositing WebKit2 content show garbage
1623         https://bugs.webkit.org/show_bug.cgi?id=52966
1624         <rdar://problem/8765051>
1625
1626         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
1627         (WebKit::LayerBackedDrawingAreaProxy::paint):
1628         If the WKView should draw transparent background, do so.
1629
1630 2011-01-22  Anders Carlsson  <andersca@apple.com>
1631
1632         Reviewed by Sam Weinig.
1633
1634         Add an asynchronous WKPageForceRepaint
1635         https://bugs.webkit.org/show_bug.cgi?id=52964
1636         <rdar://problem/8898527>
1637
1638         * UIProcess/API/C/WKPage.cpp:
1639         (WKPageForceRepaint):
1640         Call WebPageProxy::forceRepaint.
1641
1642         * UIProcess/API/C/WKPage.h:
1643         Add WKPageForceRepaint.
1644
1645         * UIProcess/GenericCallback.h:
1646         Add a "generic" VoidCallback class.
1647
1648         * UIProcess/WebPageProxy.cpp:
1649         (WebKit::WebPageProxy::forceRepaint):
1650         Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
1651
1652         (WebKit::WebPageProxy::voidCallback):
1653         Call the right void callback.
1654
1655         (WebKit::WebPageProxy::processDidCrash):
1656         Invalidate m_voidCallbacks.
1657
1658         * UIProcess/WebPageProxy.messages.in:
1659         Add a VoidCallback message.
1660
1661         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1662         (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
1663         Force a repaint.
1664
1665         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1666         Add forceRepaint.
1667
1668         * WebProcess/WebPage/WebPage.cpp:
1669         (WebKit::WebPage::forceRepaint):
1670         Call forceRepaint on the drawing area.
1671
1672         * WebProcess/WebPage/WebPage.messages.in:
1673         Add a ForceRepaint message.
1674
1675 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
1676
1677         Reviewed by Dirk Schulze.
1678
1679         Introduce FontMetrics abstraction
1680         https://bugs.webkit.org/show_bug.cgi?id=51456
1681
1682         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
1683         (WebKit::WebPopupMenu::setUpPlatformData):
1684
1685 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
1686
1687         Reviewed by Dan Bernstein.
1688
1689         https://bugs.webkit.org/show_bug.cgi?id=52950
1690         Leak in WebPage::drawRectToPDF
1691
1692         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
1693
1694 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
1695
1696         Reviewed by Dan Bernstein.
1697
1698         https://bugs.webkit.org/show_bug.cgi?id=52951
1699         WebKit2 generates a bad PDF for cross process messaging
1700
1701         * UIProcess/API/mac/WKView.mm:
1702         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
1703         Use a correct offset when flipping.
1704
1705 2011-01-21  Alexey Proskuryakov  <ap@apple.com>
1706
1707         Reviewed by Dan Bernstein.
1708
1709         https://bugs.webkit.org/show_bug.cgi?id=52943
1710         Objective-C files should use #import, not #include
1711
1712         * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
1713         there is more than one WKView.h.
1714
1715         * Platform/mac/ModuleMac.mm:
1716         * Platform/mac/RunLoopMac.mm:
1717         * PluginProcess/mac/PluginControllerProxyMac.mm:
1718         * PluginProcess/mac/PluginProcessMac.mm:
1719         * PluginProcess/mac/PluginProcessMainMac.mm:
1720         * Shared/API/c/mac/WKCertificateInfoMac.mm:
1721         * Shared/API/c/mac/WKURLRequestNS.mm:
1722         * Shared/API/c/mac/WKURLResponseNS.mm:
1723         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1724         * Shared/mac/PlatformCertificateInfo.mm:
1725         * Shared/mac/SandboxExtensionMac.mm:
1726         * Shared/mac/WebCoreArgumentCodersMac.mm:
1727         * Shared/mac/WebMemorySampler.mac.mm:
1728         * Shared/mac/WebURLRequestMac.mm:
1729         * Shared/mac/WebURLResponseMac.mm:
1730         * UIProcess/API/mac/FindIndicatorWindow.mm:
1731         * UIProcess/API/mac/WKTextInputWindowController.mm:
1732         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1733         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
1734         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
1735         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1736         * UIProcess/mac/BackingStoreMac.mm:
1737         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1738         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
1739         * UIProcess/mac/TextCheckerMac.mm:
1740         * UIProcess/mac/WebContextMac.mm:
1741         * UIProcess/mac/WebContextMenuProxyMac.mm:
1742         * UIProcess/mac/WebPageProxyMac.mm:
1743         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1744         * UIProcess/mac/WebPreferencesMac.mm:
1745         * WebProcess/Downloads/mac/DownloadMac.mm:
1746         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1747         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
1748         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1749         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
1750         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1751         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1752         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1753         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1754         * WebProcess/WebPage/mac/WebPageMac.mm:
1755         * WebProcess/mac/WebProcessMac.mm:
1756
1757 2011-01-21  Mark Rowe  <mrowe@apple.com>
1758
1759         Reviewed by Sam Weinig.
1760
1761         Fix the WebKit2 build with clang.
1762
1763         * Scripts/webkit2/messages.py: Add some more structs to the list.
1764         * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
1765         * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
1766         * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
1767         * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
1768         functions expecting NSString* without generating warnings.
1769         * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
1770         * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
1771         * WebProcess/WebPage/WebPage.cpp:
1772         (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
1773         the if statement to suppress a warning.
1774
1775 2011-01-21  Brian Weinstein  <bweinstein@apple.com>
1776
1777         Reviewed by Adam Roben.
1778
1779         WebKit2: Need API to stop loading a WKFrame
1780         https://bugs.webkit.org/show_bug.cgi?id=52925
1781
1782         * UIProcess/API/C/WKFrame.cpp:
1783         (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
1784         * UIProcess/API/C/WKFrame.h:
1785         * UIProcess/WebFrameProxy.cpp:
1786         (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
1787             with the passed in ID.
1788         * UIProcess/WebFrameProxy.h:
1789         * WebProcess/WebPage/WebPage.cpp:
1790         (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
1791         * WebProcess/WebPage/WebPage.h:
1792         * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
1793
1794 2011-01-21  Brady Eidson  <beidson@apple.com>
1795
1796         Reviewed by Adam Roben.
1797
1798         <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
1799         Expose "suggested filename" for a resource based on its resource response.
1800
1801         API pieces:
1802         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1803         (WKBundleFrameCopySuggestedFilenameForResourceURL):
1804         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1805         
1806         Implementation:
1807         * WebProcess/WebPage/WebFrame.cpp:
1808         (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
1809           a resource for this URL and, if so, return the response's suggested filename.
1810         * WebProcess/WebPage/WebFrame.h:
1811
1812 2011-01-21  Anders Carlsson  <andersca@apple.com>
1813
1814         Reviewed by Dan Bernstein.
1815
1816         DrawingAreaProxyImpl::paint should return the unpainted region
1817         https://bugs.webkit.org/show_bug.cgi?id=52918
1818
1819         * UIProcess/API/mac/WKView.mm:
1820         (-[WKView drawRect:]):
1821         Add unpaintedRegion parameter.
1822
1823         * UIProcess/BackingStore.h:
1824         (WebKit::BackingStore::size):
1825         Add a size getter.
1826
1827         * UIProcess/DrawingAreaProxyImpl.cpp:
1828         (WebKit::DrawingAreaProxyImpl::paint):
1829         Initialize the unpainted region to the dirty region, then subtract the painted region.
1830
1831 2011-01-21  Anders Carlsson  <andersca@apple.com>
1832
1833         Reviewed by Dan Bernstein and Maciej Stachowiak.
1834
1835         Fix for <rdar://problem/8896057>
1836
1837         Give the Web Process access to the PubSub agent.
1838
1839         * WebProcess/com.apple.WebProcess.sb:
1840
1841 2011-01-21  Sam Weinig  <sam@webkit.org>
1842
1843         Reviewed by Anders Carlsson.
1844
1845         Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
1846         https://bugs.webkit.org/show_bug.cgi?id=52779
1847
1848         Rename ScrollbarClient -> ScrollableArea.
1849
1850         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1851         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
1852         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
1853         * UIProcess/win/WebPopupMenuProxyWin.h:
1854
1855 2011-01-21  Adam Roben  <aroben@apple.com>
1856
1857         Update for WKCACFLayerRenderer -> CACFLayerView rename
1858
1859         Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
1860
1861         Reviewed by Simon Fraser.
1862
1863         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
1864         #includes.
1865
1866 2011-01-20  Darin Adler  <darin@apple.com>
1867
1868         Reviewed by Dan Bernstein.
1869
1870         WebKit2: Implement showModalDialog
1871         https://bugs.webkit.org/show_bug.cgi?id=52855
1872
1873         * Shared/WebPageCreationParameters.h: Added canRunModal.
1874
1875         * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
1876         WKPageUIClient. Also removed a lot of redundant typedefs and added
1877         a new one, WKPageCallback, for callbacks without arguments or return
1878         values.
1879
1880         * UIProcess/API/qt/qwkpage.cpp:
1881         (QWKPage::QWKPage): Added a runModal function pointer of 0.
1882
1883         * UIProcess/WebPageProxy.cpp:
1884         (WebKit::WebPageProxy::creationParameters): Set canRunModal
1885         based on return value of WebUIClient::canRunModal.
1886
1887         * UIProcess/WebPageProxy.h: Added runModal.
1888         Calls WebUIClient::runModal.
1889
1890         * UIProcess/WebPageProxy.messages.in: Added RunModal message.
1891         Also removed the periods from the phrases in the comments
1892         as Maciej requested a while back.
1893
1894         * UIProcess/WebUIClient.cpp:
1895         (WebKit::WebUIClient::canRunModal): Added. Returns true or false
1896         based on whether a runModal function was supplied in the
1897         WKPageUIClient structure.
1898         (WebKit::WebUIClient::runModal): Added. Calls the runModal
1899         function from the WKPageUIClient structure.
1900         * UIProcess/WebUIClient.h: Declared the above functions.
1901
1902         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1903         (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
1904         (WebKit::WebChromeClient::runModal): Ditto.
1905
1906         * WebProcess/WebPage/WebPage.cpp:
1907         (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
1908         creation parameters. Initialize m_isRunningModal to false.
1909         (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
1910         (WebKit::WebPage::runModal): Send a message to ask the UI process to run
1911         modal and then start a nested run loop. It gets stopped when the page is closed.
1912         * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
1913         and declared the runModal function.
1914
1915 2011-01-20  Alexey Proskuryakov  <ap@apple.com>
1916
1917         Reviewed by Darin Adler.
1918
1919         https://bugs.webkit.org/show_bug.cgi?id=52849
1920         Make window.print work with WebKit2
1921
1922         * UIProcess/API/qt/qwkpage.cpp:
1923         (QWKPage::QWKPage):
1924         * UIProcess/WebPageProxy.cpp:
1925         (WebKit::WebPageProxy::printFrame):
1926         * UIProcess/WebPageProxy.h:
1927         * UIProcess/WebPageProxy.messages.in:
1928         * UIProcess/WebUIClient.cpp:
1929         (WebKit::WebUIClient::printFrame):
1930         * UIProcess/WebUIClient.h:
1931         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1932         (WebKit::WebChromeClient::print):
1933         Just pass through deelagte call to a WebKit2 client.
1934
1935         * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
1936         types.
1937
1938 2011-01-20  Anders Carlsson  <andersca@apple.com>
1939
1940         Reviewed by Darin Adler.
1941
1942         Keep track of the latest update timestamp in the backing store
1943         https://bugs.webkit.org/show_bug.cgi?id=52848
1944
1945         * Shared/UpdateInfo.h:
1946         (WebKit::UpdateInfo::UpdateInfo):
1947         Initialize timestamp to 0.
1948
1949         * UIProcess/BackingStore.cpp:
1950         (WebKit::BackingStore::BackingStore):
1951         Initialize m_latestUpdateTimestamp to 0.
1952
1953         (WebKit::BackingStore::incorporateUpdate):
1954         If the update is too old, discard it. Otherwise, create a bitmap
1955         and pass it to platformIncorporateUpdate. Finally update the timestamp.
1956
1957         * UIProcess/BackingStore.h:
1958         Add m_latestUpdateTimestamp.
1959
1960         * UIProcess/mac/BackingStoreMac.mm:
1961         (WebKit::BackingStore::platformIncorporateUpdate):
1962         Update now that we are already given the shareable bitmap.
1963
1964 2011-01-20  Beth Dakin  <bdakin@apple.com>
1965
1966         Reviewed by Geoffrey Garen.
1967
1968         Fix for <rdar://problem/8890255>
1969
1970         Allow WebKitSystemInterface to draw scrollbars 
1971         when appropriate.
1972         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1973         (InitWebCoreSystemInterface):
1974
1975 2011-01-20  Sam Weinig  <sam@webkit.org>
1976
1977         Reviewed by Dave Hyatt.
1978
1979         Cleanup Scrollbar/ScrollbarClient relationship
1980         https://bugs.webkit.org/show_bug.cgi?id=52779
1981
1982         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1983         (WebKit::WebPopupMenuProxyWin::scrollPosition):
1984         (WebKit::WebPopupMenuProxyWin::setScrollOffset):
1985         (WebKit::WebPopupMenuProxyWin::scrollTo):
1986         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
1987         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
1988         * UIProcess/win/WebPopupMenuProxyWin.h:
1989         (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
1990
1991 2011-01-20  Anders Carlsson  <andersca@apple.com>
1992
1993         Reviewed by Adam Roben.
1994
1995         Add a timestamp to UpdateInfo
1996         https://bugs.webkit.org/show_bug.cgi?id=52844
1997
1998         * Shared/UpdateInfo.cpp:
1999         (WebKit::UpdateInfo::encode):
2000         (WebKit::UpdateInfo::decode):
2001         * Shared/UpdateInfo.h:
2002         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2003         (WebKit::DrawingAreaImpl::setSize):
2004         (WebKit::DrawingAreaImpl::display):
2005
2006 2011-01-20  Anders Carlsson  <andersca@apple.com>
2007
2008         Reviewed by Beth Dakin.
2009
2010         Add Connection::waitForAndDispatchImmediately
2011         https://bugs.webkit.org/show_bug.cgi?id=52841
2012
2013         * Platform/CoreIPC/Connection.h:
2014         (CoreIPC::Connection::waitForAndDispatchImmediately):
2015
2016 2011-01-20  Kevin Decker  <kdecker@apple.com>
2017
2018         Reviewed by Anders Carlsson.
2019
2020         <rdar://problem/8880689> need a way to obtain the rendered rectangle for box elements
2021         https://bugs.webkit.org/show_bug.cgi?id=52823
2022         
2023         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2024         (WKBundleNodeHandleGetRenderRect): Added new method that will return a rendered rectangle for box elements
2025         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Ditto.
2026         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Ditto.
2027         (WebKit::InjectedBundleNodeHandle::renderRect): Ditto.
2028         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Ditto.
2029
2030 2011-01-20  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2031
2032         Reviewed by Andreas Kling.
2033
2034         Remove null ptr deref that happens when reattaching to
2035         a new web process.
2036
2037         Implement didRelaunchProcess that sets the drawing area size
2038         after the drawing area is re-instantiated.
2039
2040         [Qt][WK2] Null ptr deref in UI process after web process has crashed
2041         https://bugs.webkit.org/show_bug.cgi?id=52796
2042
2043         * UIProcess/API/qt/qgraphicswkview.cpp:
2044         (QGraphicsWKView::QGraphicsWKView):
2045         * UIProcess/API/qt/qwkpage.cpp:
2046         (QWKPagePrivate::QWKPagePrivate):
2047         (QWKPagePrivate::init):
2048         (QWKPagePrivate::createDrawingAreaProxy):
2049         (QWKPagePrivate::didRelaunchProcess): Reset drawing area size after crash.
2050         * UIProcess/API/qt/qwkpage_p.h:
2051
2052 2011-01-20  Maciej Stachowiak  <mjs@apple.com>
2053
2054         Reviewed by Adam Roben.
2055
2056         WebKitTestRunner needs to support layoutTestController.evaluateScriptInIsolatedWorld
2057         https://bugs.webkit.org/show_bug.cgi?id=42327
2058         
2059         Added a new API call, WKBundleFrameForJavaScriptContext, that gets the WKBundleFrameRef
2060         that corresponds to a JSContextRef (or null if none).
2061
2062         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2063         (WKBundleFrameForJavaScriptContext): Simple wrapper, defers to a WebFrame
2064         static method.
2065         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2066         * WebProcess/WebPage/WebFrame.cpp:
2067         (WebKit::WebFrame::frameForContext): Follow the maze of twisty pointers.
2068         * WebProcess/WebPage/WebFrame.h:
2069
2070 2011-01-20  Alejandro G. Castro  <alex@igalia.com>
2071
2072         Fix compilation error in GTK WebKit2.
2073
2074         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
2075         (CoreIPC::readBytesFromSocket):
2076         (CoreIPC::writeBytesToSocket):
2077
2078 2011-01-20  Zoltan Horvath  <zoltan@webkit.org>
2079
2080         Reviewed by Csaba Osztrogonác.
2081
2082         Refactoring of the custom allocation framework
2083         https://bugs.webkit.org/show_bug.cgi?id=49897
2084
2085         Inheriting from FastAllocBase can result in objects getting larger (bug #33896, #46589).
2086         The modification replaces Noncopyable and FastAllocBase classes and these inherits with their
2087         equivalent macro implementation at the necessary places.
2088
2089 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
2090
2091         Fix the WebKit2 build.
2092
2093         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2094         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2095
2096 2011-01-19  Brian Weinstein  <bweinstein@apple.com>
2097
2098         Reviewed by Darin Adler.
2099
2100         WebKit2: Need API to get the parent frame of a frame
2101         https://bugs.webkit.org/show_bug.cgi?id=52774
2102         
2103         Add the API to get the parent frame of a frame.
2104
2105         * UIProcess/API/C/WKFrame.cpp:
2106         (WKFrameGetParentFrame):
2107         * UIProcess/API/C/WKFrame.h:
2108
2109 2011-01-19  Enrica Casucci  <enrica@apple.com>
2110
2111         Reviewed by Darin Adler.
2112
2113         WebKit2: add support for drag and drop
2114         https://bugs.webkit.org/show_bug.cgi?id=52343
2115         <rdar://problem/7660558>
2116         
2117         This patch contains the remaining work to support drag and drop on Mac.
2118         I've added a PasteboardTypes class to encapsulate all the pasteboard formats
2119         supported for drag and drop.
2120         In this implementation we don't support the promised types, since I could not
2121         find an efficient way to do this across processes.
2122         The bulk of the patch consists in creating a shareable bitmap for the drag image,
2123         pass its handle to the UI process and create a new NSImage from it to be given to
2124         AppKit for dragging.
2125         I've added the missing implementation of the methods in the drag client to hook
2126         up the placement of the data in the pasteboard.
2127         
2128         * Shared/mac/PasteboardTypes.h: Added.
2129         * Shared/mac/PasteboardTypes.mm: Added.
2130         (WebKit::PasteboardTypes::forEditing):
2131         (WebKit::PasteboardTypes::forURL):
2132         (WebKit::PasteboardTypes::forImages):
2133         (WebKit::PasteboardTypes::forImagesWithArchive):
2134         * UIProcess/API/mac/PageClientImpl.h:
2135         * UIProcess/API/mac/PageClientImpl.mm:
2136         (WebKit::PageClientImpl::setDragImage): Added.
2137         * UIProcess/API/mac/WKView.mm:
2138         (-[WKView _registerDraggedTypes]): Refactored to use the new PasteboardTypes class.
2139         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2140         (-[WKView _setMouseDownEvent:]):
2141         (-[WKView _mouseHandler:]):
2142         (-[WKView mouseDown:]):
2143         (-[WKView mouseUp:]):
2144         (-[WKView mouseDragged:]):
2145         (-[WKView draggedImage:endedAt:operation:]):
2146         (-[WKView draggingEntered:]):
2147         (-[WKView _setDragImage:at:linkDrag:]):
2148         * UIProcess/API/mac/WKViewInternal.h:
2149         * UIProcess/PageClient.h:
2150         * UIProcess/WebPageProxy.cpp:
2151         (WebKit::WebPageProxy::setDragImage):
2152         (WebKit::WebPageProxy::dragEnded):
2153         * UIProcess/WebPageProxy.h:
2154         * UIProcess/WebPageProxy.messages.in:
2155         * WebKit2.xcodeproj/project.pbxproj:
2156         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2157         * WebProcess/WebCoreSupport/WebDragClient.h:
2158         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: Added.
2159         (WebKit::fontFromNSFont):
2160         (WebKit::WebDragClient::startDrag): Added implementation.
2161         (WebKit::WebDragClient::createDragImageForLink): Ditto.
2162         (WebKit::writeURL): Helper function.
2163         (WebKit::writeImage): Helper function.
2164         (WebKit::WebDragClient::declareAndWriteDragImage): Added implementation.
2165         * WebProcess/WebPage/WebPage.cpp:
2166         (WebKit::WebPage::dragEnded):
2167         * WebProcess/WebPage/WebPage.h:
2168         * WebProcess/WebPage/WebPage.messages.in:
2169
2170 2011-01-19  Anders Carlsson  <andersca@apple.com>
2171
2172         Reviewed by Dan Bernstein.
2173
2174         Put the deprecated Connection member functions next to eachother
2175         https://bugs.webkit.org/show_bug.cgi?id=52767
2176
2177         * Platform/CoreIPC/Connection.h:
2178         (CoreIPC::Connection::sendSync):
2179         (CoreIPC::Connection::send):
2180
2181 2011-01-19  Anders Carlsson  <andersca@apple.com>
2182
2183         Reviewed by Sam Weinig.
2184
2185         When resizing, the web process should repaint the page
2186         https://bugs.webkit.org/show_bug.cgi?id=52764
2187
2188         * UIProcess/DrawingAreaProxyImpl.cpp:
2189         (WebKit::DrawingAreaProxyImpl::didSetSize):
2190         Incorporate the update.
2191
2192         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2193         Return early if the update bounds rect is empty. This can happen if painting is
2194         disabled and we get a DidSetSize message.
2195
2196         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2197         (WebKit::DrawingAreaImpl::setSize):
2198         If painting is disabled, just send back an empty UpdateInfo struct. Otherwise,
2199         paint and fill in the UpdateInfo struct.
2200
2201         (WebKit::DrawingAreaImpl::display):
2202         Assert that painting is not disabled.
2203
2204 2011-01-19  Alexey Proskuryakov  <ap@apple.com>
2205
2206         Reviewed by Darin Adler.
2207
2208         https://bugs.webkit.org/show_bug.cgi?id=52739
2209         Make it possible for a WebKit2 client to print headers and footers
2210
2211         * UIProcess/API/C/WKPage.h:
2212         * UIProcess/WebPageProxy.cpp:
2213         (WebKit::WebPageProxy::headerHeight):
2214         (WebKit::WebPageProxy::footerHeight):
2215         (WebKit::WebPageProxy::drawHeader):
2216         (WebKit::WebPageProxy::drawFooter):
2217         * UIProcess/WebPageProxy.h:
2218         * UIProcess/WebUIClient.cpp:
2219         (WebKit::WebUIClient::headerHeight):
2220         (WebKit::WebUIClient::footerHeight):
2221         (WebKit::WebUIClient::drawHeader):
2222         (WebKit::WebUIClient::drawFooter):
2223         * UIProcess/WebUIClient.h:
2224         Pass UIClient calls through.
2225
2226         * UIProcess/API/mac/WKView.mm:
2227         (currentPrintOperationScale): A helper to extract scale factor from the current NSPrintOperation.
2228         (-[WKView _adjustPrintingMarginsForHeaderAndFooter]): Copied from WebKit1. Change current
2229         print info to account for header and footer height as provided by the client.
2230         (-[WKView knowsPageRange:]): Call -[self _adjustPrintingMarginsForHeaderAndFooter].
2231         (-[WKView drawPageBorderWithSize:]): When AppKit asks to print page border, call the client
2232         to do that. Code adapted form WebKit1.
2233
2234         * UIProcess/API/qt/qwkpage:
2235         (QWKPage::QWKPage): Added zeroes for new WKPageUIClient members to avoid breaking the build.
2236
2237 2011-01-19  Jessie Berlin  <jberlin@apple.com>
2238
2239         Reviewed by Darin Adler.
2240
2241         Crash in WebDatabaseManagerProxy::getDatabaseOrigins when called after the WebProcess has
2242         died at least once
2243         https://bugs.webkit.org/show_bug.cgi?id=52730
2244
2245         WebDatabaseManagerProxy::invalidate was setting m_webContext to 0, and invalidate gets
2246         called in WebContext::processDidClose. However, m_webContext is only set in the
2247         constructor, which is only called from the constructor of WebContext, so attempting to send
2248         a message to any new WebProcess after the first one died was causing a null deref.
2249
2250         This patch moves setting m_webcontext into clearContext and clearContext is only called in
2251         the WebContext destructor.
2252
2253         This patch also adds checks for a valid WebProcessProxy before attempting to send messages to
2254         the WebProcessProxy so that if the WebProcess has died and has not been revived, it does not
2255         attempt to dereference a null WebProcessProxy.
2256
2257         * UIProcess/WebContext.cpp:
2258         (WebKit::WebContext::~WebContext):
2259         Call WebDatabaseManagerProxy::clearContext.
2260         * UIProcess/WebContext.h:
2261         (WebKit::WebContext::hasValidProcess):
2262         Make this method public so that it can be called from WebDatabaseManagerProxy.
2263
2264         * UIProcess/WebDatabaseManagerProxy.cpp:
2265         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
2266         If there isn't a valid process, invalidate the callback and return early.
2267         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
2268         Ditto.
2269         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
2270         If tehre isn't a valid process return early.
2271         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
2272         Ditto.
2273         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
2274         Ditto.
2275         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
2276         Ditto.
2277         (WebKit::WebDatabaseManagerProxy::invalidate):
2278         Move setting m_webContext to 0 from here ...
2279         * UIProcess/WebDatabaseManagerProxy.h:
2280         (WebKit::WebDatabaseManagerProxy::clearContext):
2281         ... to here.
2282
2283 2011-01-19  Anders Carlsson  <andersca@apple.com>
2284
2285         Reviewed by Sam Weinig.
2286
2287         Suspend/resume painting as the WKView visibility changes
2288         https://bugs.webkit.org/show_bug.cgi?id=52738
2289
2290         * UIProcess/DrawingAreaProxy.h:
2291         (WebKit::DrawingAreaProxy::visibilityDidChange):
2292         Add new member function. It should really be pure virtual once setPageIsVisible
2293         is removed.
2294
2295         * UIProcess/DrawingAreaProxyImpl.cpp:
2296         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
2297         Send SuspendPainting/ResumePainting messages based on whether the view is visible or not.
2298
2299         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
2300         Make this a stub; it should really be removed.
2301
2302         * UIProcess/WebPageProxy.cpp:
2303         (WebKit::WebPageProxy::viewStateDidChange):
2304         Call visibilityDidChange.
2305
2306         * UIProcess/WebPageProxy.h:
2307         (WebKit::WebPageProxy::isViewVisible):
2308         Add new getter.
2309
2310         * WebProcess/WebPage/DrawingArea.messages.in:
2311         Add SuspendPainting and ResumePainting messages.
2312
2313         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2314         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2315         Initialize m_isPaintingSuspended.
2316
2317         (WebKit::DrawingAreaImpl::suspendPainting):
2318         Set m_isPaintingSuspended to true and stop the display timer.
2319
2320         (WebKit::DrawingAreaImpl::resumePainting):
2321         Set m_isPaintingSuspended to false.
2322
2323         (WebKit::DrawingAreaImpl::scheduleDisplay):
2324         (WebKit::DrawingAreaImpl::display):
2325         Bail if m_isPaintingSuspended is true.
2326
2327 2011-01-19  Andreas Kling  <kling@webkit.org>
2328
2329         Reviewed by Simon Hausmann.
2330
2331         [Qt][WK2] Implement formatLocalizedString() for Qt.
2332
2333         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2334         (WebKit::formatLocalizedString):
2335
2336 2011-01-19  Chris Marrin  <cmarrin@apple.com>
2337
2338         Reviewed by Simon Fraser.
2339
2340         WK2 - Multiple crashes in PlatformCALayer::replaceSublayer
2341         https://bugs.webkit.org/show_bug.cgi?id=52695
2342
2343         Added a hostingLayer as the parent of the existing drawingLayer.
2344         The hostingLayer is now the root which is passed to the 
2345         remote context. It never changes except to track the size
2346         of the window. The backingLayer is now a child of the 
2347         hostingLayer, which allow it to switch between tiled and
2348         non-tiled.
2349
2350         I also now give back accurate settings for debug borders and
2351         repaint counters.
2352
2353         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2354         (WebKit::LayerBackedDrawingArea::LayerBackedDrawingArea):
2355         (WebKit::LayerBackedDrawingArea::setSize):
2356         (WebKit::LayerBackedDrawingArea::showDebugBorders):
2357         (WebKit::LayerBackedDrawingArea::showRepaintCounter):
2358         * WebProcess/WebPage/LayerBackedDrawingArea.h:
2359         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2360         (WebKit::LayerBackedDrawingArea::platformInit):
2361         (WebKit::LayerBackedDrawingArea::attachCompositingContext):
2362         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2363
2364 2011-01-19  Anders Carlsson  <andersca@apple.com>
2365
2366         Reviewed by Sam Weinig.
2367
2368         Send a new SetSize message if the size differs from the current size
2369         https://bugs.webkit.org/show_bug.cgi?id=52728
2370
2371         * UIProcess/DrawingAreaProxy.h:
2372         (WebKit::DrawingAreaProxy::didSetSize):
2373         Add UpdateInfo parameter.
2374
2375         * UIProcess/DrawingAreaProxy.messages.in:
2376         Add UpdateInfo parameter to the DidSetSize message.
2377
2378         * UIProcess/DrawingAreaProxyImpl.cpp:
2379         (WebKit::DrawingAreaProxyImpl::didSetSize):
2380         If the view size differs from the current size send another SetSize message.
2381
2382         * UIProcess/DrawingAreaProxyImpl.h:
2383         Add UpdateInfo parameter to didSetSize.
2384
2385         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2386         (WebKit::DrawingAreaImpl::setSize):
2387         The DidSetSize message now takes an UpdateInfo parameter.
2388
2389 2011-01-19  Anders Carlsson  <andersca@apple.com>
2390
2391         Reviewed by Darin Adler.
2392
2393         Throttle sending of SetSize messages
2394         https://bugs.webkit.org/show_bug.cgi?id=52727
2395
2396         * UIProcess/DrawingAreaProxyImpl.cpp:
2397         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2398         Initialize m_isWaitingForDidSetSize to false.
2399
2400         (WebKit::DrawingAreaProxyImpl::didSetSize):
2401         Null out the backing store.
2402
2403         (WebKit::DrawingAreaProxyImpl::sendSetSize):
2404         If m_isWaitingForDidSetSize is true, do nothing. Otherwise, set m_isWaitingForDidSetSize
2405         to true and send a SetSize message.
2406
2407         * UIProcess/DrawingAreaProxyImpl.h:
2408         Add m_isWaitingForDidSetSize.
2409
2410 2011-01-19  Anders Carlsson  <andersca@apple.com>
2411
2412         Reviewed by Darin Adler.
2413
2414         Pass WebPageCreationParameters to DrawingArea::create
2415         https://bugs.webkit.org/show_bug.cgi?id=52726
2416
2417         * WebProcess/WebPage/DrawingArea.cpp:
2418         (WebKit::DrawingArea::create):
2419         * WebProcess/WebPage/DrawingArea.h:
2420         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2421         (WebKit::DrawingAreaImpl::create):
2422         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2423         * WebProcess/WebPage/DrawingAreaImpl.h:
2424         * WebProcess/WebPage/WebPage.cpp:
2425         (WebKit::WebPage::WebPage):
2426         (WebKit::WebPage::changeAcceleratedCompositingMode):
2427
2428 2011-01-19  Csaba Osztrogonác  <ossy@webkit.org>
2429
2430         Reviewed by Laszlo Gombos and Tor Arne Vestbø.
2431
2432         [Qt] Remove unnecessary "../Source" from paths
2433         after moving source files into Source is finished.
2434
2435         * DerivedSources.pro:
2436         * WebKit2.pro:
2437
2438 2011-01-18  Maciej Stachowiak  <mjs@apple.com>
2439
2440         Reviewed by Sam Weinig.
2441
2442         WebKitTestRunner should track loading more like DumpRenderTree
2443         https://bugs.webkit.org/show_bug.cgi?id=52692
2444         
2445         Relax the message check in didSaveFrameToPageCache a bit more, since
2446         layout tests were still hitting the old one.
2447
2448         * UIProcess/WebPageProxy.cpp:
2449         (WebKit::isDisconnectedFrame):
2450         (WebKit::WebPageProxy::didSaveFrameToPageCache):
2451
2452 2011-01-18  Brady Eidson  <beidson@apple.com>
2453
2454         Reviewed by Darin Adler.
2455
2456         <rdar://problem/8860833> and https://bugs.webkit.org/show_bug.cgi?id=52599
2457         UIProcess crash in WebPageProxy::reattachToWebProcess when web process crashes with a new tab/window.
2458
2459         * UIProcess/WebPageProxy.cpp:
2460         (WebKit::WebPageProxy::reattachToWebProcessWithItem): Null check item *both* places it is used.
2461
2462 2011-01-18  Brady Eidson  <beidson@apple.com>
2463
2464         Reviewed by Maciej Stachowiak. 
2465
2466         <rdar://problem/8752200> and https://bugs.webkit.org/show_bug.cgi?id=52664
2467         Need WebKit2 API to asynchronously get the resource data for a URL
2468
2469         Rename WKFrameGetMainResourceDataFunction to WKFrameGetResourceDataFunction, and add
2470         new API to get a resource by URL:
2471         * UIProcess/API/C/WKFrame.cpp:
2472         (WKFrameGetMainResourceData):
2473         (WKFrameGetResourceData):
2474         (callGetResourceDataBlockAndDispose):
2475         (WKFrameGetMainResourceData_b):
2476         (WKFrameGetResourceData_b):
2477         * UIProcess/API/C/WKFrame.h:
2478
2479         Implement the new API in the UIProcess side:
2480         * UIProcess/WebFrameProxy.cpp:
2481         (WebKit::WebFrameProxy::getResourceData):
2482         * UIProcess/WebFrameProxy.h:
2483         * UIProcess/WebPageProxy.cpp:
2484         (WebKit::WebPageProxy::getResourceDataFromFrame):
2485         * UIProcess/WebPageProxy.h:
2486
2487         Have the WebProcess get the data and call back to the UIProcess:
2488         * WebProcess/WebPage/WebPage.cpp:
2489         (WebKit::WebPage::getResourceDataFromFrame):
2490         * WebProcess/WebPage/WebPage.h:
2491         * WebProcess/WebPage/WebPage.messages.in:
2492
2493 2011-01-18  Anders Carlsson  <andersca@apple.com>
2494
2495         Reviewed by Dan Bernstein.
2496
2497         Make PageClientImpl::scrollView do hardware blitting
2498         https://bugs.webkit.org/show_bug.cgi?id=52689
2499
2500         * UIProcess/API/mac/PageClientImpl.mm:
2501         (WebKit::PageClientImpl::scrollView):
2502         Clip the scroll rect and scroll the view.
2503
2504         * UIProcess/DrawingAreaProxyImpl.cpp:
2505         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2506         Scroll before painting.
2507
2508 2011-01-18  Anders Carlsson  <andersca@apple.com>
2509
2510         Reviewed by Darin Adler.
2511
2512         Artifacts when scrolling with new drawing area
2513         https://bugs.webkit.org/show_bug.cgi?id=52682
2514
2515         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2516         (WebKit::WebChromeClient::scroll):
2517         When scrolling, we want the intersection of the scroll rect and clip rect.
2518
2519 2011-01-18  Anders Carlsson  <andersca@apple.com>
2520
2521         Reviewed by Darin Adler.
2522
2523         Use a CGLayer for the backing store when possible
2524         https://bugs.webkit.org/show_bug.cgi?id=52679
2525
2526         * UIProcess/mac/BackingStoreMac.mm:
2527         (WebKit::BackingStore::paint):
2528         If there is a layer, paint it into the given context.
2529
2530         (WebKit::BackingStore::backingStoreContext):
2531         If we can get the containing window graphics context, use it to create a 
2532         CGLayer that we'll use for the backing store.
2533
2534         (WebKit::BackingStore::scroll):
2535         Paint the layer into itself.
2536
2537         * UIProcess/mac/WebPageProxyMac.mm:
2538         (WebKit::WebPageProxy::containingWindowGraphicsContext):
2539         Call the page client.
2540
2541 2011-01-18  Anders Carlsson  <andersca@apple.com>
2542
2543         Reviewed by Dan Bernstein.
2544
2545         Pass the web page proxy to BackingStore::create
2546         https://bugs.webkit.org/show_bug.cgi?id=52673
2547
2548         * UIProcess/BackingStore.cpp:
2549         (WebKit::BackingStore::create):
2550         Add WebPageProxy parameter.
2551     
2552         (WebKit::BackingStore::BackingStore):
2553         Add WebPageProxy parameter.
2554
2555         * UIProcess/BackingStore.h:
2556         Add WebPageProxy member variable.
2557
2558         * UIProcess/DrawingAreaProxyImpl.cpp:
2559         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2560         Pass the web page proxy when creating the backing store.
2561
2562         * UIProcess/mac/BackingStoreMac.mm:
2563         (WebKit::BackingStore::backingStoreContext):
2564         Set the default blend mode.
2565
2566 2011-01-18  Anders Carlsson  <andersca@apple.com>
2567
2568         Reviewed by Darin Adler.
2569
2570         Factor code to create the backing store bitmap context out into a new function
2571         https://bugs.webkit.org/show_bug.cgi?id=52670
2572
2573         * UIProcess/BackingStore.h:
2574         * UIProcess/mac/BackingStoreMac.mm:
2575         (WebKit::BackingStore::backingStoreContext):
2576         Create the backing store context.
2577
2578         (WebKit::BackingStore::incorporateUpdate):
2579         Call backingStoreContext.
2580
2581         (WebKit::BackingStore::scroll):
2582         Assert that the context is not null.
2583
2584 2011-01-18  Anders Carlsson  <andersca@apple.com>
2585
2586         Reviewed by Dan Bernstein.
2587
2588         Add PageClientImpl::containingWindowGraphicsContext
2589         https://bugs.webkit.org/show_bug.cgi?id=52666
2590
2591         * UIProcess/API/mac/PageClientImpl.h:
2592         * UIProcess/API/mac/PageClientImpl.mm:
2593         (WebKit::PageClientImpl::containingWindowGraphicsContext):
2594         * UIProcess/PageClient.h:
2595         * UIProcess/WebPageProxy.h:
2596
2597 2011-01-18  Damian Kaleta  <dkaleta@apple.com>
2598
2599         Reviewed by Sam Weinig.
2600
2601         WK2 methods WKPageScaleWebView and WKPageGetViewScaleFactor need to have consistent names
2602         https://bugs.webkit.org/show_bug.cgi?id=52647
2603
2604         * UIProcess/API/C/WKPage.cpp:
2605         (WKPageSetScaleFactor):
2606         (WKPageGetScaleFactor):
2607         * UIProcess/API/C/WKPage.h:
2608
2609 2011-01-18  Anders Carlsson  <andersca@apple.com>
2610
2611         Reviewed by Dan Bernstein.
2612
2613         Ask the web page proxy to scroll the view when needed
2614         https://bugs.webkit.org/show_bug.cgi?id=52665
2615
2616         * UIProcess/DrawingAreaProxyImpl.cpp:
2617         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
2618         * UIProcess/WebPageProxy.cpp:
2619         (WebKit::WebPageProxy::scrollView):
2620         * UIProcess/WebPageProxy.h:
2621
2622 2011-01-18  Anders Carlsson  <andersca@apple.com>
2623
2624         Fix build.
2625
2626         * UIProcess/win/WebView.cpp:
2627         (WebKit::WebView::scrollView):
2628
2629 2011-01-18  Anders Carlsson  <andersca@apple.com>
2630
2631         Reviewed by Sam Weinig.
2632
2633         Add PageClient::scrollView
2634         https://bugs.webkit.org/show_bug.cgi?id=52663
2635
2636         * UIProcess/API/mac/PageClientImpl.h:
2637         * UIProcess/API/mac/PageClientImpl.mm:
2638         (WebKit::PageClientImpl::scrollView):
2639         * UIProcess/API/qt/qwkpage.cpp:
2640         (QWKPagePrivate::scrollView):
2641         * UIProcess/API/qt/qwkpage_p.h:
2642         * UIProcess/PageClient.h:
2643         * UIProcess/win/WebView.cpp:
2644         (WebKit::PageClientImpl::scrollView):
2645         * UIProcess/win/WebView.h:
2646
2647 2011-01-18  Anders Carlsson  <andersca@apple.com>
2648
2649         Reviewed by Sam Weinig.
2650
2651         Rename scrollDelta to scrollOffset everywhere.
2652
2653         * Shared/UpdateInfo.cpp:
2654         (WebKit::UpdateInfo::encode):
2655         (WebKit::UpdateInfo::decode):
2656         * Shared/UpdateInfo.h:
2657         * UIProcess/BackingStore.h:
2658         * UIProcess/mac/BackingStoreMac.mm:
2659         (WebKit::BackingStore::incorporateUpdate):
2660         (WebKit::BackingStore::scroll):
2661         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2662         (WebKit::WebChromeClient::scroll):
2663         (WebKit::WebChromeClient::delegatedScrollRequested):
2664         * WebProcess/WebCoreSupport/WebChromeClient.h:
2665         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2666         (WebKit::ChunkedUpdateDrawingArea::scroll):
2667         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2668         * WebProcess/WebPage/DrawingArea.h:
2669         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2670         (WebKit::DrawingAreaImpl::scroll):
2671         (WebKit::DrawingAreaImpl::display):
2672         * WebProcess/WebPage/DrawingAreaImpl.h:
2673         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2674         (WebKit::LayerBackedDrawingArea::scroll):
2675         * WebProcess/WebPage/LayerBackedDrawingArea.h:
2676
2677 2011-01-18  Anders Carlsson  <andersca@apple.com>
2678
2679         Reviewed by Sam Weinig.
2680
2681         Get and paint each individual rect in -[WKView drawRect:]
2682         https://bugs.webkit.org/show_bug.cgi?id=52660
2683
2684         * UIProcess/API/mac/WKView.mm:
2685         (-[WKView drawRect:]):
2686
2687 2011-01-18  Anders Carlsson  <andersca@apple.com>
2688
2689         Reviewed by Darin Adler.
2690
2691         Assertion when loading two URLs in quick succession
2692         https://bugs.webkit.org/show_bug.cgi?id=52649
2693         <rdar://problem/8764645>
2694
2695         If beginLoad is called twice without didStartProvisionalLoad being called in between,
2696         m_pendingProvisionalSandboxExtension would be non-null and an assert would fire.
2697
2698         * WebProcess/WebPage/WebPage.cpp:
2699         (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
2700         Instead of asserting that m_pendingProvisionalSandboxExtension is null, invalidate it
2701         if it is not null, since that's valid.
2702
2703 2011-01-18  Anders Carlsson  <andersca@apple.com>
2704
2705         Reviewed by Sam Weinig.
2706
2707         Implement NPN_PopUpContextMenu
2708         https://bugs.webkit.org/show_bug.cgi?id=52646
2709         <rdar://problem/8735616>
2710
2711         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2712         (WebKit::NPN_PopUpContextMenu):
2713         Call NetscapePlugin::popUpContextMenu.
2714
2715         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2716         (WebKit::NetscapePlugin::NetscapePlugin):
2717         Initialize m_currentMouseEvent.
2718
2719         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2720         Add m_currentMouseEvent.
2721
2722         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2723         (WebKit::NetscapePlugin::popUpContextMenu):
2724         Convert the coordinates from the current mouse event to screen coordinates and call
2725         WKPopupContextMenu.
2726
2727         (WebKit::NetscapePlugin::platformHandleMouseEvent):
2728         Update m_currentMouseEvent.
2729
2730 2011-01-18  Jessie Berlin  <jberlin@apple.com>
2731
2732         Reviewed by Darin Adler.
2733
2734         WebKit2: Do not assert that the provisional and committed URLs cannot be empty/null
2735         https://bugs.webkit.org/show_bug.cgi?id=52641
2736
2737         * UIProcess/WebFrameProxy.cpp:
2738         (WebKit::WebFrameProxy::didStartProvisionalLoad):
2739         (WebKit::WebFrameProxy::didCommitLoad):
2740         (WebKit::WebFrameProxy::didFinishLoad):
2741
2742 2011-01-18  Anders Carlsson  <andersca@apple.com>
2743
2744         Reviewed by Sam Weinig.
2745
2746         ASSERT in plug-in code when going to youtube
2747         https://bugs.webkit.org/show_bug.cgi?id=52638
2748
2749         * PluginProcess/PluginControllerProxy.cpp:
2750         (WebKit::PluginControllerProxy::paintEntirePlugin):
2751         Don't try to paint the plug-in if the plug-in frame is empty.
2752
2753 2011-01-18  Anders Carlsson  <andersca@apple.com>
2754
2755         Reviewed by Dan Bernstein.
2756
2757         Plug-in hosting WebProcess instances appear in Activity Monitor as WebProcess
2758         https://bugs.webkit.org/show_bug.cgi?id=52635
2759         <rdar://problem/8731337>
2760
2761         * PluginProcess/PluginProcess.cpp:
2762         (WebKit::PluginProcess::initialize):
2763         Call platformInitialize.
2764
2765         * PluginProcess/PluginProcess.h:
2766         Add platformInitialize.
2767
2768         * PluginProcess/mac/PluginProcessMac.mm:
2769         (WebKit::PluginProcess::platformInitialize):
2770         Set the compositing render server port and the visible application name.
2771
2772         * Shared/Plugins/PluginProcessCreationParameters.cpp:
2773         (WebKit::PluginProcessCreationParameters::encode):
2774         (WebKit::PluginProcessCreationParameters::decode):
2775         Encode/decode the parent process name.
2776
2777         * Shared/Plugins/PluginProcessCreationParameters.h:
2778         Add parentProcessName.
2779
2780         * Shared/WebProcessCreationParameters.cpp:
2781         (WebKit::WebProcessCreationParameters::encode):
2782         (WebKit::WebProcessCreationParameters::decode):
2783         Encode/decode the parent process name.
2784
2785         * Shared/WebProcessCreationParameters.h:
2786         Add parentProcessName.
2787
2788         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2789         (WebKit::ProcessLauncher::launchProcess):
2790         Don't pass the parent process name here.
2791
2792         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
2793         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2794         Set the visible name.
2795
2796         * UIProcess/mac/WebContextMac.mm:
2797         (WebKit::WebContext::platformInitializeWebProcess):
2798         Pass along the parent process name.
2799
2800         * WebProcess/mac/WebProcessMac.mm:
2801         (WebKit::WebProcess::platformInitializeWebProcess):
2802         Set the visible name.
2803
2804         * WebProcess/mac/WebProcessMainMac.mm:
2805         (WebKit::WebProcessMain):
2806         Don't set the visible name here. It's done in platformInitializeWebProcess.
2807
2808 2011-01-18  Balazs Kelemen  <kbalazs@webkit.org>
2809
2810         Reviewed by Csaba Osztrogonác.
2811
2812         [Qt][WK2] Not implemented warnings should not break layout tests
2813         https://bugs.webkit.org/show_bug.cgi?id=52616
2814
2815         * WebKit2Prefix.h: Define DISABLE_NOT_IMPLEMENTED_WARNINGS on Qt.
2816
2817 2011-01-17  Jon Honeycutt  <jhoneycutt@apple.com>
2818
2819         Windows build fix. Unreviewed.
2820
2821         * Shared/PrintInfo.cpp:
2822         Use #include, not #import.
2823
2824 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2825
2826         Actually wrote a FIXME promised for a review comment.
2827
2828         * UIProcess/API/mac/WKView.mm:
2829         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2830
2831 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2832
2833         Reviewed by Anders Carlsson and Darin Adler.
2834
2835         https://bugs.webkit.org/show_bug.cgi?id=52595
2836         Make basic printing work in WebKit2
2837
2838         * Shared/WebPreferencesStore.h:
2839         * UIProcess/API/C/WKPreferences.cpp:
2840         (WKPreferencesSetShouldPrintBackgrounds):
2841         (WKPreferencesGetShouldPrintBackgrounds):
2842         * UIProcess/API/C/WKPreferences.h:
2843         Implement a preference for printing backgrounds.
2844
2845         * Shared/PrintInfo.cpp: Added.
2846         (WebKit::PrintInfo::encode):
2847         (WebKit::PrintInfo::decode):
2848         * Shared/PrintInfo.h: Added.
2849         * Shared/mac/PrintInfoMac.mm: Added.
2850         (WebKit::PrintInfo::PrintInfo):
2851         A new class for passing page setup information down to the web process.
2852
2853         * WebKit2.xcodeproj/project.pbxproj:
2854         * GNUmakefile.am:
2855         * WebKit2.pro:
2856         * win/WebKit2.vcproj:
2857         Added PrintInfo.
2858
2859         * Scripts/webkit2/messages.py: Added PrintInfo.h to a list of structs.
2860
2861         * UIProcess/API/mac/WKView.mm:
2862         (WKViewData): Cache page count and geometry.
2863         (WebFrameWrapper): Added a wrapper class for adding a WebFrameProxy to an NSDictionary.
2864         (-[WKView drawRect:]): Added logging.
2865         (setFrameBeingPrinted): Store a frame into NSPrintOperation's NSPrintInfo, so that all 
2866         methods invoked for this operation would know what's being printed.
2867         (frameBeingPrinted): Retrieve this data.
2868         (-[WKView printOperationWithPrintInfo:forFrame:]): Create a print operation that's appropriate
2869         for the frame.
2870         (-[WKView knowsPageRange:]): Ask the web process.
2871         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2872         Take over printing, because I couldn't make drawRect: work correctly with WebKit custom fit
2873         to page implementation.
2874         (-[WKView _provideTotalScaleFactorForPrintOperation:]): Help AppKit clip correctly.
2875         (-[WKView rectForPage:]): Return a pre-calculated rect.
2876
2877         * UIProcess/WebPageProxy.h: Added m_isInPrintingMode to track whether the web page is in
2878         printing mode. The UI process controls that.
2879
2880         * UIProcess/WebPageProxy.cpp:
2881         (WebKit::WebPageProxy::WebPageProxy): Initialize m_isInPrintingMode.
2882         (WebKit::WebPageProxy::beginPrinting): Change printing mode in web process if the value changes.
2883         (WebKit::WebPageProxy::endPrinting): Ditto.
2884         (WebKit::WebPageProxy::computePagesForPrinting): Ask the web process about output page geometry.
2885         (WebKit::WebPageProxy::drawRectToPDF): Ask the web process about printed page data.
2886
2887         * WebProcess/WebPage/WebPage.cpp:
2888         (WebKit::WebPage::close): Delete m_printContext while there is still a Frame pointer.
2889         (WebKit::WebPage::updatePreferences): Pass through ShouldPrintBackgrounds.
2890         (WebKit::WebPage::beginPrinting): Switch into printing mode (or update parameters if we're
2891         already in printing mode).
2892         (WebKit::WebPage::endPrinting): Delete m_printContext, implicitly calling end().
2893         (WebKit::WebPage::computePagesForPrinting): Make sure that we're in printing mode, and
2894         copmute page rects.
2895         (WebKit::WebPage::drawRectToPDF): Added a CG specific function to create a PDF document out
2896         of a page rect. It should really work for onscreen content, but we only need it for printing.
2897
2898         * WebProcess/WebPage/WebPage.h:
2899
2900         * WebProcess/WebPage/WebPage.messages.in: Added BeginPrinting, EndPrinting,
2901         ComputePagesForPrinting and DrawRectToPDF.
2902
2903 2011-01-17  Tony Gentilcore  <tonyg@chromium.org>
2904
2905         Reviewed by Alexey Proskuryakov.
2906
2907         Fix some headers with missing or misspelled #ifndef guards
2908         https://bugs.webkit.org/show_bug.cgi?id=52545
2909
2910         * Shared/UserMessageCoders.h:
2911         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2912         * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h:
2913         * WebProcess/WebProcessMain.h:
2914
2915 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2916
2917         Build fix.
2918
2919         * Platform/Logging.cpp:
2920
2921 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2922
2923         Reviewed by Dan Bernstein.
2924
2925         https://bugs.webkit.org/show_bug.cgi?id=52592
2926         Add a logging channel for WKView
2927
2928         * Platform/Logging.cpp:
2929         * Platform/Logging.h:
2930
2931 2011-01-17  Anders Carlsson  <andersca@apple.com>
2932
2933         Reviewed by Sam Weinig.
2934
2935         Factor bitmap context drawing code out into a shared function
2936         https://bugs.webkit.org/show_bug.cgi?id=52589
2937
2938         * Platform/cg/CGUtilities.h: Added.
2939         * Platform/cg/CGUtilities.cpp: Added.
2940         (WebKit::paintBitmapContext):
2941         New function that will paint a bitmap context into a CGContext.
2942
2943         * Shared/cg/ShareableBitmapCG.cpp:
2944         (WebKit::ShareableBitmap::paint):
2945         Use paintBitmapContext.
2946
2947         * UIProcess/mac/BackingStoreMac.mm:
2948         (WebKit::BackingStore::paint):
2949         (WebKit::BackingStore::scroll):
2950         Use paintBitmapContext.
2951
2952         * WebKit2.xcodeproj/project.pbxproj:
2953         * win/WebKit2.vcproj:
2954         * win/WebKit2Common.vsprops:
2955         Add CGUtilities.{cpp|h}.
2956
2957 2011-01-17  Dan Bernstein  <mitz@apple.com>
2958
2959         Rubber-stamped by Mark Rowe.
2960
2961         Update xcodeproj svn:ignore to include xcuserdata.
2962
2963         * WebKit2.xcodeproj: Modified property svn:ignore.
2964
2965 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2966
2967         Fixing a typo from a bad merge.
2968
2969         * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]):
2970
2971 2011-01-17  Alexey Proskuryakov  <ap@apple.com>
2972
2973         Reviewed by John Sullivan.
2974
2975         https://bugs.webkit.org/show_bug.cgi?id=52590
2976         Should pass a frame into -[WKView canPrintHeadersAndFooters]
2977
2978         * UIProcess/API/mac/WKView.h:
2979         * UIProcess/API/mac/WKView.mm: (-[WKView canChangeFrameLayout:]): Also, renamed the method
2980         to canChangeFrameLayout.
2981
2982 2011-01-17  Anders Carlsson  <andersca@apple.com>
2983
2984         Reviewed by Sam Weinig.
2985
2986         Implement scrolling support
2987         https://bugs.webkit.org/show_bug.cgi?id=52502
2988
2989         * Shared/UpdateInfo.cpp:
2990         (WebKit::UpdateInfo::encode):
2991         (WebKit::UpdateInfo::decode):
2992         * Shared/UpdateInfo.h:
2993         Add scrollRect and scrollDelta member variables.
2994
2995         * UIProcess/BackingStore.h:
2996         Add scroll member function.
2997
2998         * UIProcess/DrawingAreaProxyImpl.cpp:
2999         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3000         Repaint the scroll rect. Force a display of the view when the update info contains a scroll rect.
3001
3002         * UIProcess/mac/BackingStoreMac.mm:
3003         (WebKit::BackingStore::incorporateUpdate):
3004         Call scroll.
3005
3006         (WebKit::BackingStore::scroll):
3007         Paint the backing store into itself.
3008
3009         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3010         (WebKit::DrawingAreaImpl::display):
3011         Pass the scroll information in the update info.
3012
3013 2011-01-17  Andrey Kosyakov  <caseq@chromium.org>
3014
3015         Unreviewed. Fixed malformed reference to WebKitVSPropsRedirectionDir that broke win build.
3016
3017         * win/WebKit2.vcproj:
3018         * win/WebKit2GeneratedCommon.vsprops:
3019         * win/WebKit2WebProcess.vcproj:
3020
3021 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
3022
3023         Reviewed by Yury Semikhatsky.
3024
3025         Web Inspector: simplify debugger enabling routine.
3026         https://bugs.webkit.org/show_bug.cgi?id=52472
3027
3028         * WebProcess/WebPage/WebInspector.cpp:
3029         (WebKit::WebInspector::startJavaScriptDebugging):
3030
3031 2011-01-17  Balazs Kelemen  <kbalazs@webkit.org>
3032
3033         Reviewed by Andreas Kling.
3034
3035         [Qt][WK2] Crash due to double destruction of QSharedMemory
3036         https://bugs.webkit.org/show_bug.cgi?id=52569
3037
3038         Avoid deleting the QSharedMemory twice.
3039         * Platform/qt/SharedMemoryQt.cpp:
3040         (WebKit::SharedMemory::~SharedMemory):
3041         * Shared/qt/CleanupHandler.cpp:
3042         Renamed m_inDeleteObjects to m_hasStartedDeleting and
3043         added a getter for it.
3044         (WebKit::CleanupHandler::CleanupHandler):
3045         (WebKit::CleanupHandler::deleteObjects):
3046         * Shared/qt/CleanupHandler.h:
3047         (WebKit::CleanupHandler::unmark):
3048         (WebKit::CleanupHandler::hasStartedDeleting):
3049
3050 2011-01-15  Adam Barth  <abarth@webkit.org>
3051
3052         Rubber-stamped by Eric Seidel.
3053
3054         Move WebKit2 into Source
3055         https://bugs.webkit.org/show_bug.cgi?id=52438
3056
3057         * DerivedSources.pro:
3058         * GNUmakefile.am:
3059         * WebKit2.pro:
3060         * WebProcess.pro:
3061         * win/WebKit2.vcproj:
3062         * win/WebKit2WebProcess.vcproj:
3063
3064 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
3065
3066         Reviewed by Antti Koivisto.
3067
3068         Rename cache() to memoryCache()
3069         https://bugs.webkit.org/show_bug.cgi?id=52433
3070
3071         * WebProcess/WebProcess.cpp:
3072         (WebKit::WebProcess::shutdownIfPossible):
3073         (WebKit::WebProcess::didClose):
3074         * WebProcess/mac/WebProcessMac.mm:
3075         (WebKit::WebProcess::platformSetCacheModel):
3076         * WebProcess/win/WebProcessWin.cpp:
3077         (WebKit::WebProcess::platformSetCacheModel):
3078
3079 2011-01-13  Geoffrey Garen  <ggaren@apple.com>
3080
3081         Reviewed by Oliver Hunt.
3082
3083         Split out a MarkedSpace strategy object from Heap.
3084         https://bugs.webkit.org/show_bug.cgi?id=52421
3085
3086         * Shared/mac/WebMemorySampler.mac.mm:
3087         (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
3088
3089 2011-01-14  Anders Carlsson  <andersca@apple.com>
3090
3091         Reviewed by Dan Bernstein.
3092
3093         Add a new PageClient::displayView function and expose it on WebPageProxy
3094         https://bugs.webkit.org/show_bug.cgi?id=52500
3095
3096         * UIProcess/API/mac/PageClientImpl.h:
3097         * UIProcess/API/mac/PageClientImpl.mm:
3098         (WebKit::PageClientImpl::displayView):
3099         * UIProcess/API/qt/qwkpage.cpp:
3100         (QWKPagePrivate::displayView):
3101         * UIProcess/API/qt/qwkpage_p.h:
3102         * UIProcess/PageClient.h:
3103         * UIProcess/WebPageProxy.cpp:
3104         (WebKit::WebPageProxy::displayView):
3105         * UIProcess/WebPageProxy.h:
3106         * UIProcess/win/WebView.cpp:
3107         (WebKit::WebView::displayView):
3108         * UIProcess/win/WebView.h:
3109
3110 2011-01-14  Anders Carlsson  <andersca@apple.com>
3111
3112         Reviewed by Sam Weinig.
3113
3114         Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
3115         https://bugs.webkit.org/show_bug.cgi?id=52499
3116
3117         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3118         (WebKit::shouldPaintBoundsRect):
3119         Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
3120
3121         (WebKit::DrawingAreaImpl::display):
3122         If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
3123
3124 2011-01-14  Brian Weinstein  <bweinstein@apple.com>
3125
3126         Reviewed by Geoff Garen.
3127
3128         ShouldLoadResourceForFrame should use strings, not URLs.
3129         https://bugs.webkit.org/show_bug.cgi?id=52476
3130
3131         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3132         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
3133         (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
3134             a URL, and rename from subresourceURL to resourceURL.
3135
3136 2011-01-14  Anders Carlsson  <andersca@apple.com>
3137
3138         Reviewed by Sam Weinig.
3139
3140         Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
3141
3142         Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
3143
3144         * Shared/WebProcessCreationParameters.cpp:
3145         (WebKit::WebProcessCreationParameters::encode):
3146         (WebKit::WebProcessCreationParameters::decode):
3147         Encode and decode the uiProcessBundleResourcePath member variable.
3148
3149         * Shared/WebProcessCreationParameters.h:
3150         Add uiProcessBundleResourcePath member variable.
3151
3152         * UIProcess/mac/WebContextMac.mm:
3153         (WebKit::WebContext::platformInitializeWebProcess):
3154         Set the uiProcessBundleResourcePath member variable.
3155
3156         * WebProcess/com.apple.WebProcess.sb:
3157         Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
3158
3159         * WebProcess/mac/WebProcessMac.mm:
3160         (WebKit::initializeSandbox):
3161         When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
3162
3163         (WebKit::WebProcess::platformInitializeWebProcess):
3164         Remove the code that would consume a sandbox extension for the url cache path.
3165
3166 2011-01-14  Anders Carlsson  <andersca@apple.com>
3167
3168         Reviewed by Sam Weinig.
3169
3170         Delay initializing the sandbox until we get the InitializeWebProcess message.
3171
3172         * WebProcess/mac/WebProcessMac.mm:
3173         (WebKit::initializeSandbox):
3174         (WebKit::WebProcess::platformInitializeWebProcess):
3175         * WebProcess/mac/WebProcessMainMac.mm:
3176         (WebKit::WebProcessMain):
3177
3178 2011-01-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
3179
3180         Reviewed by Kenneth Rohde Christiansen.
3181
3182         Align import/export directives
3183         https://bugs.webkit.org/show_bug.cgi?id=52208
3184
3185         * Shared/API/c/WKBase.h: Align import/export directives with
3186         JavaScriptCore/API/JSBase.h.
3187
3188 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
3189
3190         Reviewed by Yury Semikhatsky.
3191
3192         Web Inspector: extract InspectorSettings from InspectorState, 
3193         simplify it.
3194         https://bugs.webkit.org/show_bug.cgi?id=52429
3195
3196         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3197
3198 2011-01-13  Enrica Casucci  <enrica@apple.com>
3199
3200         Reviewed by Darin Adler.
3201
3202         WebKit2: Add support for drag and drop
3203         https://bugs.webkit.org/show_bug.cgi?id=52343
3204         <rdar://problem/7660558>
3205                
3206         This patch contains the changes required to support dropping content
3207         in WebKit on the Mac. The DragData class has been extended to provide
3208         additional context from the application (keyboard state, modal windows, etc.)
3209         as well as information of the drag pasteboard being used.
3210         The support for WebKit as drag source will be added with a separate patch.
3211
3212         * Shared/DragControllerAction.h: Added.
3213         * UIProcess/API/mac/WKView.mm:
3214         Added implemention of the methods required to add suport for a drop target.
3215         To maintain asynchronous communication with the WebProcess, we always return
3216         the previous calculated value for the drag operation.
3217         (-[WKView _registerDraggedTypes]):
3218         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
3219         (-[WKView applicationFlags:]):
3220         (-[WKView draggingEntered:]):
3221         (-[WKView draggingUpdated:]):
3222         (-[WKView draggingExited:]):
3223         (-[WKView prepareForDragOperation:]):
3224         (-[WKView performDragOperation:]):
3225         * UIProcess/WebPageProxy.cpp:
3226         (WebKit::WebPageProxy::WebPageProxy):
3227         (WebKit::WebPageProxy::performDragControllerAction):
3228         (WebKit::WebPageProxy::didPerformDragControllerAction):
3229         * UIProcess/WebPageProxy.h:
3230         (WebKit::WebPageProxy::dragOperation):
3231         (WebKit::WebPageProxy::resetDragOperation):
3232         * UIProcess/WebPageProxy.messages.in:
3233         * WebKit2.xcodeproj/project.pbxproj:
3234         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3235         (WebKit::WebDragClient::willPerformDragDestinationAction):
3236         (WebKit::WebDragClient::willPerformDragSourceAction):
3237         (WebKit::WebDragClient::actionMaskForDrag):
3238         (WebKit::WebDragClient::dragSourceActionMaskForPoint):
3239         (WebKit::WebDragClient::startDrag):
3240         * WebProcess/WebPage/WebPage.cpp:
3241         (WebKit::WebPage::performDragControllerAction):
3242         * WebProcess/WebPage/WebPage.h:
3243         * WebProcess/WebPage/WebPage.messages.in:
3244
3245 2011-01-13  Dan Bernstein  <mitz@apple.com>
3246
3247         Reviewed by John Sullivan.
3248
3249         Incorrect assertion in DrawingAreaImpl::scroll()
3250         https://bugs.webkit.org/show_bug.cgi?id=52376
3251
3252         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3253         (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
3254         This made the assertion valid, but I removed it anyway.
3255
3256 2011-01-12  Balazs Kelemen  <kbalazs@webkit.org>
3257
3258         Unreviewed.
3259
3260         Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
3261         The argument is unused since http://trac.webkit.org/changeset/75468.
3262
3263         * UIProcess/API/qt/qgraphicswkview.cpp:
3264         (QGraphicsWKView::QGraphicsWKView):
3265         * UIProcess/API/qt/qwkpage.cpp:
3266         (QWKPagePrivate::init):
3267         * UIProcess/API/qt/qwkpage_p.h:
3268
3269 2011-01-12  Anders Carlsson  <andersca@apple.com>
3270
3271         Reviewed by Sam Weinig.
3272
3273         Implement DrawingAreaImpl::scroll
3274         https://bugs.webkit.org/show_bug.cgi?id=52346
3275
3276         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3277         (WebKit::DrawingAreaImpl::scroll):
3278         If there is already an active scroll, compute the area of both scroll rects and
3279         invalidate the smallest one. Compute a new dirty region if necessary and also
3280         add the scroll repaint region to the dirty region.
3281
3282         (WebKit::DrawingAreaImpl::display):
3283         Reset the scroll area and scroll delta.
3284
3285         * WebProcess/WebPage/DrawingAreaImpl.h:
3286         Add scroll area and scroll delta member variables.
3287
3288 2011-01-12  Anders Carlsson  <andersca@apple.com>
3289
3290         Reviewed by Dan Bernstein.
3291
3292         Region improvements
3293         https://bugs.webkit.org/show_bug.cgi?id=52344
3294
3295         * Platform/Region.cpp:
3296         (WebKit::Region::Shape::move):
3297         (WebKit::Region::move):
3298         Change Region::move to take an IntSize.
3299
3300         * Platform/Region.h:
3301         (WebKit::intersect):
3302         (WebKit::subtract):
3303         (WebKit::move):
3304         Add convenience functions.
3305
3306 2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>
3307
3308         Unreviewed Qt build fix for r75661
3309
3310         * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
3311
3312 2011-01-12  Beth Dakin  <bdakin@apple.com>
3313
3314         Reviewed by Anders Carlsson.
3315
3316         Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 
3317         Expose fixed layout through WebKit SPI
3318         -and corresponding-
3319         <rdar://problem/8844464>
3320
3321         And now with getters!
3322         * UIProcess/API/C/WKPage.cpp:
3323         (WKPageUseFixedLayout):
3324         (WKPageFixedLayoutSize):
3325         * UIProcess/API/C/WKPage.h:
3326         * UIProcess/WebPageProxy.h:
3327         (WebKit::WebPageProxy::useFixedLayout):
3328         (WebKit::WebPageProxy::fixedLayoutSize):
3329
3330 2011-01-12  Sam Weinig  <sam@webkit.org>
3331
3332         Reviewed by Anders Carlsson.
3333
3334         https://bugs.webkit.org/show_bug.cgi?id=52337
3335         PlatformWheelEvent should know about the scroll phase on the Mac
3336
3337         Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
3338
3339         * Shared/WebEvent.h:
3340         (WebKit::WebWheelEvent::phase):
3341         * Shared/WebEventConversion.cpp:
3342         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
3343         * Shared/WebWheelEvent.cpp:
3344         (WebKit::WebWheelEvent::WebWheelEvent):
3345         (WebKit::WebWheelEvent::encode):
3346         (WebKit::WebWheelEvent::decode):
3347         * Shared/mac/WebEventFactory.mm:
3348         (WebKit::phaseForEvent):
3349         (WebKit::WebEventFactory::createWebWheelEvent):
3350
3351 2011-01-12  Anders Carlsson  <andersca@apple.com>
3352
3353         Reviewed by Sam Weinig.
3354
3355         Get rid of an unneeded parameter from DrawingArea::scroll
3356         https://bugs.webkit.org/show_bug.cgi?id=52336
3357
3358         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3359         (WebKit::WebChromeClient::scroll):
3360         * WebProcess/WebCoreSupport/WebChromeClient.h:
3361         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3362         (WebKit::ChunkedUpdateDrawingArea::scroll):
3363         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3364         * WebProcess/WebPage/DrawingArea.h:
3365         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3366         (WebKit::DrawingAreaImpl::scroll):
3367         * WebProcess/WebPage/DrawingAreaImpl.h:
3368         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
3369         (WebKit::LayerBackedDrawingArea::scroll):
3370         * WebProcess/WebPage/LayerBackedDrawingArea.h:
3371         * WebProcess/WebPage/TiledDrawingArea.cpp:
3372         (WebKit::TiledDrawingArea::scroll):
3373         * WebProcess/WebPage/TiledDrawingArea.h:
3374
3375 2011-01-12  Anders Carlsson  <andersca@apple.com>
3376
3377         Reviewed by Sam Weinig.
3378
3379         Get the new drawing area painting to the screen
3380         https://bugs.webkit.org/show_bug.cgi?id=52331
3381
3382         * UIProcess/DrawingAreaProxyImpl.cpp:
3383         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3384         Call setViewNeedsDisplay on all the update rects.
3385
3386         * UIProcess/WebPageProxy.cpp:
3387         (WebKit::WebPageProxy::setViewNeedsDisplay):
3388         Call through to the page client.
3389
3390         (WebKit::WebPageProxy::processDidCrash):
3391         Null out the drawing area proxy.
3392         
3393         * UIProcess/mac/BackingStoreMac.mm:
3394         (WebKit::BackingStore::paint):
3395         Paint.
3396
3397 2011-01-12  Anders Carlsson  <andersca@apple.com>
3398
3399         Reviewed by Sam Weinig.
3400
3401         More work on getting the drawing area proxy to paint
3402         https://bugs.webkit.org/show_bug.cgi?id=52328
3403
3404         * UIProcess/API/mac/WKView.mm:
3405         (-[WKView drawRect:]):
3406         Handle the new drawing area.
3407
3408         * UIProcess/BackingStore.cpp:
3409         (WebKit::BackingStore::BackingStore):
3410         Assert that the size isn't empty.
3411         
3412         * UIProcess/BackingStore.h:
3413         * UIProcess/mac/BackingStoreMac.mm:
3414         (WebKit::BackingStore::incorporateUpdate):
3415         Paint all update rects into the bitmap context.
3416
3417         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3418         (WebKit::DrawingAreaImpl::display):
3419         Create a handle so the shareable bitmap will actually be transferred over.
3420
3421 2011-01-12  Anders Carlsson  <andersca@apple.com>
3422
3423         Fix build.
3424
3425         * UIProcess/DrawingAreaProxyImpl.cpp:
3426         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3427
3428 2011-01-12  Anders Carlsson  <andersca@apple.com>
3429
3430         Reviewed by Sam Weinig.
3431
3432         Begin stubbing out some more BackingStore member functions
3433         https://bugs.webkit.org/show_bug.cgi?id=52323
3434
3435         * UIProcess/BackingStore.cpp:
3436         (WebKit::BackingStore::~BackingStore):
3437         This was accidentally made into a constructor; it should be a destructor.
3438
3439         * UIProcess/DrawingAreaProxyImpl.cpp:
3440         (WebKit::DrawingAreaProxyImpl::paint):
3441         Call the backing store.
3442
3443         (WebKit::DrawingAreaProxyImpl::update):
3444         Incorporate the update.
3445
3446         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
3447         Create the backing store if needed and incorporate the update.
3448
3449         * UIProcess/mac/BackingStoreMac.mm: Added.
3450         (WebKit::BackingStore::platformInitialize):
3451         Create a bitmap context.
3452
3453         (WebKit::BackingStore::paint):
3454         (WebKit::BackingStore::incorporateUpdate):
3455         Add stubs.
3456
3457         * WebKit2.xcodeproj/project.pbxproj:
3458         Add BackingStoreMac.mm
3459
3460 2011-01-12  Beth Dakin  <bdakin@apple.com>
3461
3462         Reviewed by Anders Carlsson.
3463
3464         Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
3465         fixed layout through WebKit SPI
3466         -and corresponding-
3467         <rdar://problem/8844464>
3468
3469         Store useFixedLayout and fixedLayoutSize in the 
3470         WebPageCreationParameters and the WebPageProxy.
3471         * Shared/WebPageCreationParameters.cpp:
3472         (WebKit::WebPageCreationParameters::encode):
3473         (WebKit::WebPageCreationParameters::decode):
3474         * Shared/WebPageCreationParameters.h:
3475         * UIProcess/API/C/WKPage.cpp:
3476         (WKPageSetUseFixedLayout):
3477         (WKPageSetFixedLayoutSize):
3478         * UIProcess/API/C/WKPage.h:
3479         * UIProcess/WebPageProxy.cpp:
3480         (WebKit::WebPageProxy::WebPageProxy):
3481         (WebKit::WebPageProxy::setUseFixedLayout):
3482         (WebKit::WebPageProxy::setFixedLayoutSize):
3483         (WebKit::WebPageProxy::creationParameters):
3484         * UIProcess/WebPageProxy.h:
3485         * WebProcess/WebPage/WebPage.cpp:
3486         (WebKit::WebPage::setUseFixedLayout):
3487         (WebKit::WebPage::setFixedLayoutSize):
3488         * WebProcess/WebPage/WebPage.h:
3489         * WebProcess/WebPage/WebPage.messages.in:
3490
3491 2011-01-12  Anders Carlsson  <andersca@apple.com>
3492
3493         Reviewed by Beth Dakin.
3494
3495         Add BackingStore class
3496         https://bugs.webkit.org/show_bug.cgi?id=52318
3497
3498         * UIProcess/BackingStore.cpp: Added.
3499         (WebKit::BackingStore::create):
3500         (WebKit::BackingStore::BackingStore):
3501         * UIProcess/BackingStore.h: Added.
3502         * WebKit2.xcodeproj/project.pbxproj:
3503
3504 2011-01-12  Brady Eidson  <beidson@apple.com>
3505
3506         Reviewed by Sam Weinig.
3507
3508         <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
3509         Back/forward list recovery after a WebProcess crash is crashy itself.
3510
3511         Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
3512         * Shared/SessionState.cpp:
3513         (WebKit::SessionState::isEmpty):
3514         * Shared/SessionState.h:
3515
3516         Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
3517         * Shared/WebBackForwardListItem.cpp:
3518         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3519         (WebKit::WebBackForwardListItem::highedUsedItemID):
3520         * Shared/WebBackForwardListItem.h:
3521         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3522         (WebKit::generateHistoryItemID):
3523         (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
3524         (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
3525           now tells the WebProcess that a previous WebProcess created.
3526         * WebProcess/WebPage/WebBackForwardListProxy.h:
3527
3528         Encode/decode data relevant to restoring a session on WebPage creation:
3529         * Shared/WebPageCreationParameters.cpp:
3530         (WebKit::WebPageCreationParameters::encode):
3531         (WebKit::WebPageCreationParameters::decode):
3532         * Shared/WebPageCreationParameters.h:
3533
3534         If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to 
3535         update the current back/forward item (if necessary) then relaunch the process:
3536         * UIProcess/WebPageProxy.cpp:
3537         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
3538         (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
3539         (WebKit::WebPageProxy::initializeWebPage):
3540         (WebKit::WebPageProxy::loadURL):
3541         (WebKit::WebPageProxy::loadURLRequest):
3542         (WebKit::WebPageProxy::reload):
3543         (WebKit::WebPageProxy::goForward):
3544         (WebKit::WebPageProxy::goBack):
3545         (WebKit::WebPageProxy::goToBackForwardItem):
3546         (WebKit::WebPageProxy::creationParameters):
3547         * UIProcess/WebPageProxy.h:
3548
3549         Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
3550         * WebProcess/WebPage/WebPage.messages.in:
3551         * UIProcess/cf/WebPageProxyCF.cpp:
3552         (WebKit::WebPageProxy::restoreFromSessionStateData):
3553
3554         Restore a session on page creation if the parameters include it:
3555         * WebProcess/WebPage/WebPage.cpp:
3556         (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
3557         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
3558         (WebKit::WebPage::restoreSession):
3559         * WebProcess/WebPage/WebPage.h:
3560
3561 2011-01-12  Anders Carlsson  <andersca@apple.com>
3562
3563         Reviewed by Sam Weinig.
3564
3565         Send Update and DidUpdate messages
3566         https://bugs.webkit.org/show_bug.cgi?id=52316
3567
3568         * UIProcess/DrawingAreaProxy.h:
3569         (WebKit::DrawingAreaProxy::update):
3570         Add empty stub.
3571
3572         * UIProcess/DrawingAreaProxy.messages.in:
3573         Add Update message.
3574
3575         * UIProcess/DrawingAreaProxyImpl.cpp:
3576         (WebKit::DrawingAreaProxyImpl::update):
3577         Just send back a DidUpdate message.
3578
3579         * WebProcess/WebPage/DrawingArea.h:
3580         (WebKit::DrawingArea::didUpdate):
3581         Add empty stub.
3582
3583         * WebProcess/WebPage/DrawingArea.messages.in:
3584         Add DidUpdate message.
3585
3586         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3587         (WebKit::DrawingAreaImpl::didUpdate):
3588         Call display().
3589
3590         (WebKit::DrawingAreaImpl::display):
3591         Send an Update message.
3592
3593 2011-01-12  Anders Carlsson  <andersca@apple.com>
3594
3595         Reviewed by Sam Weinig.
3596
3597         Make the new drawing area actually draw something
3598         https://bugs.webkit.org/show_bug.cgi?id=52314
3599
3600         * Shared/UpdateInfo.cpp:
3601         (WebKit::UpdateInfo::encode):
3602         (WebKit::UpdateInfo::decode):
3603         Encode and decode newly added fields.
3604
3605         * Shared/UpdateInfo.h:
3606         Add a vector of update rects and a handle for the sharable bitmap.
3607
3608         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3609         (WebKit::DrawingAreaImpl::display):
3610         Get the individual rects from the region and paint them into the shareable bitmap.
3611
3612         * WebProcess/WebPage/WebPage.cpp:
3613         (WebKit::WebPage::mainFrameHasCustomRepresentation):
3614         * WebProcess/WebPage/WebPage.h:
3615         Add helper function.
3616
3617         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
3618         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
3619         Use helper function.
3620
3621 2011-01-12  Anders Carlsson  <andersca@apple.com>
3622
3623         Reviewed by Sam Weinig.
3624
3625         Add UpdateInfo class
3626         https://bugs.webkit.org/show_bug.cgi?id=52306
3627
3628         * Shared/UpdateInfo.cpp: Added.
3629         (WebKit::UpdateInfo::encode):
3630         (WebKit::UpdateInfo::decode):
3631         * Shared/UpdateInfo.h: Added.
3632         (WebKit::UpdateInfo::UpdateInfo):
3633         * WebKit2.xcodeproj/project.pbxproj:
3634
3635 2011-01-12  Anders Carlsson  <andersca@apple.com>
3636
3637         Reviewed by Sam Weinig.
3638
3639         More work on the new drawing area implementation
3640         https://bugs.webkit.org/show_bug.cgi?id=52302
3641
3642         * Platform/Region.cpp:
3643         (WebKit::Region::Shape::segments_end):
3644         segments_end could end up returning an iterator that is one element past the Vector data, so
3645         we can't use operator[] since that will assert.
3646
3647         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3648         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
3649         Initialize the timer.
3650
3651         (WebKit::DrawingAreaImpl::setNeedsDisplay):
3652         Unite the rect with the dirty region and schedule a display.
3653
3654         (WebKit::DrawingAreaImpl::setSize):
3655         Tell the web page to resize.
3656
3657         (WebKit::DrawingAreaImpl::scheduleDisplay):
3658         Start a display timer if needed.
3659
3660         (WebKit::DrawingAreaImpl::display):
3661         Add a stub.
3662
3663 2011-01-12  Brent Fulgham  <bfulgham@webkit.org>
3664
3665         Unreviewed build fix after r75527.  Rename 'BackingStoreCairo.cpp'
3666         to 'ShareableBitmapCairo.cpp' to match VS project changes.
3667
3668         * Shared/cairo/BackingStoreCairo.cpp: Removed.
3669         * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
3670
3671 2011-01-11  Jeff Miller  <jeffm@apple.com>
3672
3673         Reviewed by John Sullivan.
3674
3675         WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
3676         https://bugs.webkit.org/show_bug.cgi?id=52242
3677
3678         * UIProcess/WebPageProxy.cpp:
3679         (WebKit::WebPageProxy::showPopupMenu):
3680         On Windows, stop the responsiveness timer before calling showPopupMenu().
3681
3682 2011-01-11  Maciej Stachowiak  <mjs@apple.com>
3683
3684         Reviewed by Anders Carlsson.
3685
3686         UIProcess kills the WebProcess sometimes when detached frames exist
3687         https://bugs.webkit.org/show_bug.cgi?id=52227
3688
3689         * UIProcess/WebPageProxy.cpp:
3690         (WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
3691         if it came in for a detached frame.
3692
3693 2011-01-11  Anders Carlsson  <andersca@apple.com>
3694
3695         Build fix.
3696
3697         * WebKit2.xcodeproj/project.pbxproj:
3698
3699 2011-01-11  Anders Carlsson  <andersca@apple.com>
3700
3701         Reviewed by Sam Weinig.
3702
3703         Add a Region class which represents a graphical region
3704         https://bugs.webkit.org/show_bug.cgi?id=52255
3705
3706         * Platform/Region.cpp: Added.
3707         (WebKit::Region::Region):
3708         (WebKit::Region::rects):
3709         (WebKit::Region::Shape::Shape):
3710         (WebKit::Region::Shape::appendSpan):
3711         (WebKit::Region::Shape::canCoalesce):
3712         (WebKit::Region::Shape::appendSpans):
3713         (WebKit::Region::Shape::appendSegment):
3714         (WebKit::Region::Shape::spans_begin):
3715         (WebKit::Region::Shape::spans_end):
3716         (WebKit::Region::Shape::segments_begin):
3717         (WebKit::Region::Shape::segments_end):
3718         (WebKit::Region::Shape::dump):
3719         (WebKit::Region::Shape::bounds):
3720         (WebKit::Region::Shape::move):
3721         (WebKit::Region::Shape::swap):
3722         (WebKit::Region::Shape::shapeOperation):
3723         (WebKit::Region::Shape::UnionOperation::trySimpleOperation):
3724         (WebKit::Region::Shape::unionShapes):
3725         (WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
3726         (WebKit::Region::Shape::intersectShapes):
3727         (WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
3728         (WebKit::Region::Shape::subtractShapes):
3729         (WebKit::Region::dump):
3730         (WebKit::Region::intersect):
3731         (WebKit::Region::unite):
3732         (WebKit::Region::subtract):
3733         (WebKit::Region::move):
3734         * Platform/Region.h: Added.
3735         (WebKit::Region::bounds):
3736         (WebKit::Region::isEmpty):
3737         (WebKit::Region::Span::Span):
3738         (WebKit::Region::Shape::isEmpty):
3739         * WebKit2.xcodeproj/project.pbxproj:
3740
3741 2011-01-11  Anders Carlsson  <andersca@apple.com>
3742
3743         Reviewed by Darin Adler.
3744
3745         Add DidSetSize message
3746         https://bugs.webkit.org/show_bug.cgi?id=52254
3747
3748         * DerivedSources.make:
3749         Add DrawingAReaProxy.messages.in.
3750
3751         * Platform/CoreIPC/MessageID.h:
3752         Add DrawingAreaProxy message class.
3753
3754         * UIProcess/DrawingAreaProxy.h:
3755         (WebKit::DrawingAreaProxy::didSetSize):
3756         Add CoreIPC message handler function.
3757
3758         * UIProcess/DrawingAreaProxy.messages.in: Added.
3759
3760         * UIProcess/DrawingAreaProxyImpl.cpp:
3761         (WebKit::DrawingAreaProxyImpl::didSetSize):
3762         Add stub.
3763
3764         * UIProcess/WebPageProxy.cpp:
3765         (WebKit::WebPageProxy::didReceiveMessage):
3766         Handle DrawingAreaProxy messages.
3767
3768         * WebKit2.xcodeproj/project.pbxproj:
3769         Add new files.
3770
3771         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3772         (WebKit::DrawingAreaImpl::setSize):
3773         Send a DidSetSize message for now.
3774
3775 2011-01-11  Sam Weinig  <sam@webkit.org>
3776
3777         Reviewed by Anders Carlsson.
3778
3779         Fix spelling mistake. Sharable -> Shareable.
3780
3781         * Shared/API/c/WKImage.h:
3782         * Shared/API/c/WKSharedAPICast.h:
3783         (WebKit::toImageOptions):
3784         * Shared/ImageOptions.h:
3785         * Shared/WebImage.cpp:
3786         (WebKit::WebImage::create):
3787
3788 2011-01-11  Anders Carlsson  <andersca@apple.com>
3789
3790         Reviewed by Sam Weinig.
3791
3792         Add SetSize message
3793         https://bugs.webkit.org/show_bug.cgi?id=52247
3794
3795         * DerivedSources.make:
3796         Add DrawingArea.messages.in
3797
3798         * Platform/CoreIPC/MessageID.h:
3799         Add DrawingArea message class.
3800
3801         * UIProcess/DrawingAreaProxyImpl.cpp:
3802         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
3803         Call sendSetSize.
3804
3805         (WebKit::DrawingAreaProxyImpl::sendSetSize):
3806         Send a SetSize message.
3807
3808         * UIProcess/DrawingAreaProxyImpl.h:
3809         Add setSize override.
3810
3811         * WebKit2.xcodeproj/project.pbxproj:
3812         Add new files.
3813
3814         * WebProcess/WebPage/DrawingArea.h:
3815         (WebKit::DrawingArea::setSize):
3816         Add setSize member function.
3817
3818         * WebProcess/WebPage/DrawingArea.messages.in: Added.
3819
3820         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3821         * WebProcess/WebPage/DrawingAreaImpl.h:
3822         Add setSize.
3823
3824         * WebProcess/WebPage/WebPage.cpp:
3825         (WebKit::WebPage::didReceiveMessage):
3826         Handle drawing area messages.
3827
3828 2011-01-11  Anders Carlsson  <andersca@apple.com>
3829
3830         Reviewed by Sam Weinig.
3831
3832         Replace ASSERTs with FIXMEs.
3833
3834         * UIProcess/DrawingAreaProxyImpl.cpp:
3835         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
3836         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
3837
3838 2011-01-11  Anders Carlsson  <andersca@apple.com>
3839
3840         Reviewed by Sam Weinig.
3841
3842         Add DrawingAreaImpl skeleton class
3843         https://bugs.webkit.org/show_bug.cgi?id=52246
3844
3845         * UIProcess/API/mac/WKView.mm:
3846         (useNewDrawingArea):
3847         New function which controls which drawing area to use, through an environment variable.
3848
3849         (-[WKView drawRect:]):
3850         Bail if we're using the new drawing area (for now).
3851
3852         (-[WKView WebKit::]):
3853         Create a DrawingAreaProxyImpl when asked to.
3854
3855         * WebKit2.xcodeproj/project.pbxproj:
3856         Add new files.
3857
3858         * WebProcess/WebPage/DrawingArea.cpp:
3859         (WebKit::DrawingArea::create):
3860         Create a DrawingAreaImpl when asked to.
3861
3862         * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
3863         * WebProcess/WebPage/DrawingAreaImpl.h: Added.
3864         Add DrawingAreaImpl class.
3865
3866 2011-01-11  Anders Carlsson  <andersca@apple.com>
3867
3868         Reviewed by Sam Weinig.
3869
3870         Add Mac-only DrawingAreaProxyImpl class skeleton
3871         https://bugs.webkit.org/show_bug.cgi?id=52243
3872
3873         This is the proxy side of a new drawing area implementation. This is Mac only for now
3874         while the design is being fleshed out.
3875
3876         * Shared/DrawingAreaInfo.h:
3877         * UIProcess/API/mac/WKView.mm:
3878         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
3879         * UIProcess/DrawingAreaProxyImpl.cpp: Added.
3880         (WebKit::DrawingAreaProxyImpl::create):
3881         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
3882         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
3883         (WebKit::DrawingAreaProxyImpl::didReceiveMessage):
3884         (WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
3885         (WebKit::DrawingAreaProxyImpl::paint):
3886         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
3887         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
3888         (WebKit::DrawingAreaProxyImpl::attachCompositingContext):
3889         (WebKit::DrawingAreaProxyImpl::detachCompositingContext):
3890         * UIProcess/DrawingAreaProxyImpl.h: Added.
3891         * WebKit2.xcodeproj/project.pbxproj:
3892         * WebProcess/WebPage/DrawingArea.cpp:
3893         (WebKit::DrawingArea::create):
3894
3895 2011-01-11  Anders Carlsson  <andersca@apple.com>
3896
3897         Fix Windows build.
3898
3899         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
3900         (WebKit::WebPopupMenu::setUpPlatformData):
3901
3902 2011-01-11  Anders Carlsson  <andersca@apple.com>
3903
3904         Reviewed by Sam Weinig.
3905
3906         Rename ShareableBitmap::createSharable to createShareable
3907         https://bugs.webkit.org/show_bug.cgi?id=52234
3908
3909         * Shared/ShareableBitmap.cpp:
3910         (WebKit::ShareableBitmap::createShareable):
3911         * Shared/ShareableBitmap.h:
3912         * Shared/WebImage.cpp:
3913         (WebKit::WebImage::create):
3914         * WebProcess/Plugins/PluginProxy.cpp:
3915         (WebKit::PluginProxy::geometryDidChange):
3916         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
3917         (WebKit::WebPopupMenu::setUpPlatformData):
3918         * WebProcess/WebPage/FindController.cpp:
3919         (WebKit::FindController::updateFindIndicator):
3920
3921 2011-01-11  Anders Carlsson  <andersca@apple.com>
3922
3923         Reviewed by Sam Weinig.
3924
3925         Rename BackingStore to ShareableBitmap
3926         https://bugs.webkit.org/show_bug.cgi?id=52228
3927
3928         * GNUmakefile.am:
3929         * PluginProcess/PluginControllerProxy.cpp:
3930         (WebKit::PluginControllerProxy::geometryDidChange):
3931         * PluginProcess/PluginControllerProxy.h:
3932         * Shared/API/c/cg/WKImageCG.cpp:
3933         (WKImageCreateCGImage):
3934         * Shared/BackingStore.cpp: Removed.
3935         * Shared/BackingStore.h: Removed.
3936         * Shared/PlatformPopupMenuData.cpp:
3937         (WebKit::PlatformPopupMenuData::decode):
3938         * Shared/PlatformPopupMenuData.h:
3939         * Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
3940         (WebKit::ShareableBitmap::create):
3941         (WebKit::ShareableBitmap::createSharable):
3942         (WebKit::ShareableBitmap::createHandle):
3943         (WebKit::ShareableBitmap::ShareableBitmap):
3944         (WebKit::ShareableBitmap::~ShareableBitmap):
3945         (WebKit::ShareableBitmap::resize):
3946         (WebKit::ShareableBitmap::data):
3947         * Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
3948         * Shared/UserMessageCoders.h:
3949         (WebKit::UserMessageEncoder::baseEncode):
3950         (WebKit::UserMessageDecoder::baseDecode):
3951         * Shared/WebImage.cpp:
3952         (WebKit::WebImage::create):
3953         (WebKit::WebImage::WebImage):
3954         (WebKit::WebImage::~WebImage):
3955         (WebKit::WebImage::size):
3956         * Shared/WebImage.h:
3957         (WebKit::WebImage::bitmap):
3958         * Shared/cairo/BackingStoreCairo.cpp:
3959         (WebKit::ShareableBitmap::createGraphicsContext):
3960         (WebKit::ShareableBitmap::paint):
3961         * Shared/cg/BackingStoreCG.cpp: Removed.
3962         * Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
3963         (WebKit::ShareableBitmap::createGraphicsContext):
3964         (WebKit::ShareableBitmap::paint):
3965         * Shared/gtk/BackingStoreGtk.cpp: Removed.
3966         * Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
3967         (WebKit::ShareableBitmap::createGraphicsContext):
3968         (WebKit::ShareableBitmap::paint):
3969         * Shared/qt/BackingStoreQt.cpp: Removed.
3970         * Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
3971         (WebKit::ShareableBitmap::createGraphicsContext):
3972         (WebKit::ShareableBitmap::paint):
3973         * UIProcess/FindIndicator.cpp:
3974         (WebKit::FindIndicator::create):
3975         (WebKit::FindIndicator::FindIndicator):
3976         * UIProcess/FindIndicator.h:
3977         (WebKit::FindIndicator::contentImage):
3978         * WebKit2.pro:
3979         * WebKit2.xcodeproj/project.pbxproj:
3980         * WebProcess/Plugins/PluginProxy.cpp:
3981         (WebKit::PluginProxy::geometryDidChange):
3982         * WebProcess/Plugins/PluginProxy.h:
3983         * WebProcess/WebPage/FindController.cpp:
3984         (WebKit::FindController::updateFindIndicator):
3985         * WebProcess/WebPage/WebPage.cpp:
3986         (WebKit::WebPage::snapshotInViewCoordinates):
3987         (WebKit::WebPage::snapshotInDocumentCoordinates):
3988         * win/WebKit2.vcproj:
3989
3990 2011-01-11  John Sullivan  <sullivan@apple.com>
3991
3992         Reviewed by Anders Carlsson.
3993
3994         [WKView setFrameSize:] derefs _page->drawingArea() without null check
3995         <https://bugs.webkit.org/show_bug.cgi?id=52231>
3996
3997         * UIProcess/API/mac/WKView.mm:
3998         (-[WKView setFrameSize:]):
3999         Null check drawingArea(). This is OK because if it doesn't exist then it will be
4000         created later with the correct initial size.
4001
4002 2011-01-07  Enrica Casucci  <enrica@apple.com>
4003
4004         Reviewed by Alexey Proskuryakov.
4005
4006         Paste and drag and drop use different code paths to interact with the pasteboard.
4007         https://bugs.webkit.org/show_bug.cgi?id=52093
4008         The change consists in a refactoring of the code to have only one class that
4009         deals with the pasteboard on Mac.
4010
4011         * WebProcess/WebCoreSupport/WebEditorClient.h:
4012         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
4013         exposed by NSURLExtras.
4014         (WebKit::WebEditorClient::canonicalizeURL):
4015         (WebKit::WebEditorClient::canonicalizeURLString):
4016
4017 2011-01-11  Jessie Berlin  <jberlin@apple.com>
4018
4019         Reviewed by Anders Carlsson and Sam Weinig.
4020
4021         Fix crash on launch on Windows.
4022
4023         * UIProcess/win/WebView.cpp:
4024         (WebKit::WebView::onSizeEvent):
4025         The drawing area is no longer initialized before the WebView is created and the first
4026         onSize is receieved.
4027
4028 2011-01-11  Anders Carlsson  <andersca@apple.com>
4029
4030         Reviewed by Dan Bernstein.
4031
4032         Automatically reinitialize the web page on relaunch
4033         https://bugs.webkit.org/show_bug.cgi?id=52224
4034         <rdar://problem/8765695>
4035
4036         * UIProcess/API/mac/WKView.mm:
4037         (-[WKView _didRelaunchProcess]):
4038         Remove call to reinitializeWebPage.
4039
4040         * UIProcess/WebPageProxy.cpp:
4041         (WebKit::WebPageProxy::relaunch):
4042         Call initializeWebPage().
4043
4044         (WebKit::WebPageProxy::initializeWebPage):
4045         Assert that the web page is valid here.
4046
4047         * UIProcess/WebPageProxy.h:
4048         Remove reinitializeWebPage.
4049
4050         * UIProcess/win/WebView.cpp:
4051         (WebKit::WebView::didRelaunchProcess):
4052         Remove call to reinitializeWebPage.
4053
4054 2011-01-10  Anders Carlsson  <andersca@apple.com>
4055
4056         Reviewed by Sam Weinig.
4057
4058         Pass the view size to the DrawingAreaProxy constructor
4059         https://bugs.webkit.org/show_bug.cgi?id=52189
4060
4061         * UIProcess/DrawingAreaProxy.cpp:
4062         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
4063         * UIProcess/WebPageProxy.cpp:
4064         (WebKit::WebPageProxy::viewSize):
4065         * UIProcess/WebPageProxy.h:
4066
4067 2011-01-11  Sam Weinig  <sam@webkit.org>
4068
4069         Roll r75460 back in with build fix.
4070
4071 2011-01-11  Anders Carlsson  <andersca@apple.com>
4072
4073         Reviewed by Andreas Kling.
4074
4075         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
4076         https://bugs.webkit.org/show_bug.cgi?id=52184
4077
4078         Qt part made my Balazs Kelemen.
4079
4080         * UIProcess/API/mac/PageClientImpl.h:
4081         * UIProcess/API/mac/PageClientImpl.mm:
4082         (WebKit::PageClientImpl::createDrawingAreaProxy):
4083         Call -[WKView _createDrawingAreaProxy].
4084
4085         (WebKit::PageClientImpl::setViewNeedsDisplay):
4086         Call setNeedsDisplayInRect on the WKView.
4087
4088         * UIProcess/API/mac/WKView.mm:
4089         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
4090         No need to set the drawing area proxy anymore.
4091
4092         (-[WKView _createDrawingAreaProxy]):
4093         Create a chunked update drawing area proxy for now.
4094
4095         * UIProcess/API/qt/qgraphicswkview.cpp:
4096         Added a QGraphicsItem* member that is initialized in init to the accociated view.
4097         Implement the new functions. This is a temporary solution, in the long term the view
4098         and the page should be decoupled.
4099         (QGraphicsWKView::QGraphicsWKView):
4100         * UIProcess/API/qt/qwkpage.cpp:
4101         (QWKPagePrivate::QWKPagePrivate):
4102         (QWKPagePrivate::init):
4103         (QWKPagePrivate::createDrawingAreaProxy):
4104         (QWKPagePrivate::setViewNeedsDisplay):
4105         * UIProcess/API/qt/qwkpage.h:
4106         * UIProcess/API/qt/qwkpage_p.h:
4107         
4108         * UIProcess/PageClient.h:
4109         Add new pure virtual member functions.
4110
4111         * UIProcess/WebPageProxy.cpp:
4112         (WebKit::WebPageProxy::initializeWebPage):
4113         (WebKit::WebPageProxy::reinitializeWebPage):
4114         Set the new drawing area proxy.
4115
4116         * UIProcess/win/WebView.cpp:
4117         (WebKit::WebView::WebView):
4118         No need to set the drawing area proxy anymore.
4119
4120         (WebKit::WebView::createDrawingAreaProxy):
4121         Create a chunked update drawing area proxy for now.
4122
4123         (WebKit::WebView::setViewNeedsDisplay):
4124         Invalidate the window.
4125
4126 2011-01-11  Adam Roben  <aroben@apple.com>
4127
4128         Fix a typo in a comment
4129
4130         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
4131
4132 2011-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
4133
4134         Unreviewed, rolling out r75460.
4135         http://trac.webkit.org/changeset/75460
4136         https://bugs.webkit.org/show_bug.cgi?id=52191
4137
4138         It broke Qt-WK2 build (Requested by Ossy on #webkit).
4139
4140         * Shared/API/c/WKBase.h:
4141         * Shared/APIObject.h:
4142         * UIProcess/API/C/WKAPICast.h:
4143         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
4144         * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
4145         * UIProcess/API/C/WKPage.h:
4146         * UIProcess/API/C/WebKit2.h:
4147         * UIProcess/API/qt/qwkpage.cpp:
4148         (QWKPage::QWKPage):
4149         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
4150         * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
4151         * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
4152         * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
4153         * UIProcess/WebPageProxy.cpp:
4154         (WebKit::WebPageProxy::WebPageProxy):
4155         (WebKit::WebPageProxy::close):
4156         (WebKit::WebPageProxy::processDidCrash):
4157         * UIProcess/WebPageProxy.h:
4158         * UIProcess/WebPageProxy.messages.in:
4159         * UIProcess/WebUIClient.cpp:
4160         * UIProcess/WebUIClient.h:
4161         * WebKit2.pro:
4162         * WebKit2.xcodeproj/project.pbxproj:
4163         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
4164         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
4165         * WebProcess/Geolocation/WebGeolocationManager.cpp:
4166         * WebProcess/Geolocation/WebGeolocationManager.h:
4167         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
4168         (WebKit::WebGeolocationClient::requestPermission):
4169         (WebKit::WebGeolocationClient::cancelPermissionRequest):
4170         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
4171         * WebProcess/WebPage/WebPage.cpp:
4172         (WebKit::WebPage::WebPage):
4173         * WebProcess/WebPage/WebPage.h:
4174         * WebProcess/WebPage/WebPage.messages.in:
4175         * win/WebKit2.vcproj:
4176         * win/WebKit2Generated.make:
4177
4178 2011-01-10  Csaba Osztrogonác  <ossy@webkit.org>
4179
4180         Unreviewed, rolling out r75459
4181         http://trac.webkit.org/changeset/75459
4182
4183         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
4184         https://bugs.webkit.org/show_bug.cgi?id=52184
4185
4186         * UIProcess/API/mac/PageClientImpl.h:
4187         * UIProcess/API/mac/PageClientImpl.mm:
4188         * UIProcess/API/mac/WKView.mm:
4189         * UIProcess/API/mac/WKViewInternal.h:
4190         * UIProcess/API/qt/qwkpage.cpp:
4191         * UIProcess/API/qt/qwkpage_p.h:
4192         * UIProcess/PageClient.h:
4193         * UIProcess/WebPageProxy.cpp:
4194         (WebKit::WebPageProxy::initializeWebPage):
4195         (WebKit::We