[Cocoa] -[WKWebsiteDataStore httpCookieStore] is declared in the main @interface...
[WebKit-https.git] / Source / WebKit2 / ChangeLog-2011-06-04
1 2011-06-04  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Anders Carlsson.
4
5         Disable WebProcess side display throttling when in a user scroll
6         <rdar://problem/9517175>
7         https://bugs.webkit.org/show_bug.cgi?id=62095
8
9         Add the ability to disable WebProcess side display throttling that
10         takes place in DrawingAreaImpl::displayTimerFired. Disable the throttling
11         when in a user or animated scroll.
12
13         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
14         (WebKit::WebChromeClient::didStartRubberBandForFrame):
15         (WebKit::WebChromeClient::didCompleteRubberBandForFrame):
16         (WebKit::WebChromeClient::didStartAnimatedScroll):
17         (WebKit::WebChromeClient::didCompleteAnimatedScroll):
18         * WebProcess/WebPage/DrawingArea.h:
19         (WebKit::DrawingArea::enableDisplayThrottling):
20         (WebKit::DrawingArea::disableDisplayThrottling):
21         * WebProcess/WebPage/DrawingAreaImpl.cpp:
22         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
23         (WebKit::DrawingAreaImpl::enableDisplayThrottling):
24         (WebKit::DrawingAreaImpl::disableDisplayThrottling):
25         (WebKit::DrawingAreaImpl::displayTimerFired):
26         * WebProcess/WebPage/DrawingAreaImpl.h:
27         * WebProcess/WebPage/WebPage.cpp:
28         (WebKit::WebPage::wheelEvent):
29
30 2011-06-04  Darin Adler  <darin@apple.com>
31
32         Reviewed by Anders Carlsson.
33
34         [Mac WebKit2] REGRESSION (r86692): Synchronous XMLHttpRequest hangs in credential shim (affects Netgear ReadyNAS admin page)
35         https://bugs.webkit.org/show_bug.cgi?id=62094
36         rdar://problem/9539204
37
38         * WebKit2.xcodeproj/project.pbxproj: Added new source files.
39         * WebProcess/mac/CoreIPCClientRunLoop.h: Added.
40         * WebProcess/mac/CoreIPCClientRunLoop.mm: Added.
41         (-[WKFunctionAdapter perform]): Added.
42         (WebKit::createCoreIPCRunLoopModesArray): Added.
43         (WebKit::coreIPCRunLoopModesArray): Added.
44         (WebKit::callOnCoreIPCClientRunLoopAndWait): Added.
45
46         * WebProcess/mac/KeychainItemShimMethods.mm:
47         (WebKit::webFreeAttributeListContent): Use callOnCoreIPCClientRunLoopAndWait.
48         (WebKit::webFreeKeychainItemContent): Ditto.
49         (WebKit::webSecKeychainItemCopyContent): Ditto.
50         (WebKit::webSecKeychainItemCreateFromContent): Ditto.
51         (WebKit::webSecKeychainItemModifyContent): Ditto.
52         * WebProcess/mac/SecItemShimMethods.mm:
53         (WebKit::webSecItemCopyMatching): Ditto.
54         (WebKit::webSecItemAdd): Ditto.
55         (WebKit::webSecItemUpdate): Ditto.
56         (WebKit::webSecItemDelete): Ditto.
57
58 2011-06-04  Sam Weinig  <sam@webkit.org>
59
60         Reviewed by Anders Carlsson.
61
62         WebKit2 needs to know when a scroll is happening due to the ScrollAnimator
63         https://bugs.webkit.org/show_bug.cgi?id=62093
64
65         Stub out new ChromeClient functions regarding the start and end of ScrollAnimator
66         animated scrolls, and update logic for rubber-band ending to check for main frame
67         now that it is called for all frames.
68
69         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
70         (WebKit::WebChromeClient::didStartRubberBandForFrame):
71         (WebKit::WebChromeClient::didCompleteRubberBandForFrame):
72         (WebKit::WebChromeClient::didStartAnimatedScroll):
73         (WebKit::WebChromeClient::didCompleteAnimatedScroll):
74         * WebProcess/WebCoreSupport/WebChromeClient.h:
75
76 2011-06-03  Brady Eidson  <beidson@apple.com>
77
78         Reviewed by Steve Falkenburg.
79
80         <rdar://problem/9553645> and https://bugs.webkit.org/show_bug.cgi?id=62064
81         WebBackForwardListItem::setBackForwardData actually appends data
82
83         * Shared/WebBackForwardListItem.cpp:
84         (WebKit::WebBackForwardListItem::setBackForwardData): Clear the Vector out before appending
85           the replacement data.
86
87 2011-06-03  Anders Carlsson  <andersca@apple.com>
88
89         Reviewed by Brady Eidson.
90
91         Disable the sync message timeout for the Microsoft SharePoint plug-in
92         https://bugs.webkit.org/show_bug.cgi?id=62043
93         <rdar://problem/9536303>
94
95         * WebProcess/Plugins/PluginProcessConnection.cpp:
96         (WebKit::defaultSyncMessageTimeout):
97
98 2011-06-03  Andreas Kling  <kling@webkit.org>
99
100         Reviewed by Benjamin Poulain.
101
102         [Qt] TiledDrawingArea: Initialize tiles to transparent.
103
104         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
105         (WebKit::TiledDrawingAreaTile::incorporateUpdate): When constructing new
106         back buffers, fill them with transparent pixels.
107
108 2011-06-03  No'am Rosenthal  <noam.rosenthal@nokia.com>
109
110         Reviewed by Andreas Kling.
111
112         [Qt][WK2] Make tiling on WebKit2 more responsive.
113         https://bugs.webkit.org/show_bug.cgi?id=50064
114
115         Instead of creating and destroying pixmaps, and copying them using QPixmap::copy()
116         or relying on the implicit sharing functionality, we keep the QPixmaps alive
117         and just make sure their content is synchronized.
118
119         This seems to improve responsiveness noticably, as now the UI process doesn't deal
120         with allocating/deallocating pixmaps, and the copies are done with the optimized
121         path (QPainter) vs the unoptimized ones (QPixmap::copy().)
122
123         * UIProcess/TiledDrawingAreaTile.h:
124         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
125         (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile):
126         (WebKit::TiledDrawingAreaTile::isReadyToPaint):
127         (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer):
128         (WebKit::TiledDrawingAreaTile::swapBackBufferToFront):
129         (WebKit::TiledDrawingAreaTile::incorporateUpdate):
130
131 2011-06-03  Mikhail Naganov  <mnaganov@chromium.org>
132
133         Reviewed by Yury Semikhatsky.
134
135         Web Inspector: [Chromium] cpu-profiler-profiling layout test is flaky on Linux Debug.
136         https://bugs.webkit.org/show_bug.cgi?id=61533
137
138         Skip cpu-profiler-profiling in debug, implement a fast headless alternative.
139
140         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
141         (WKBundleInspectorSetJavaScriptProfilingEnabled):
142         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
143         * WebProcess/WebPage/WebInspector.cpp:
144         (WebKit::WebInspector::setJavaScriptProfilingEnabled):
145         * WebProcess/WebPage/WebInspector.h:
146
147 2011-06-02  Anders Carlsson  <andersca@apple.com>
148
149         Reviewed by Mark Rowe.
150
151         Assert when trying to unload a module that failed to load
152         https://bugs.webkit.org/show_bug.cgi?id=61980
153
154         Remove an invalid ASSERT; it's OK for m_bundle to be null if the bundle failed to load.
155
156         * Platform/mac/ModuleMac.mm:
157         (WebKit::Module::unload):
158
159 2011-06-02  Anders Carlsson  <andersca@apple.com>
160
161         Reviewed by Simon Fraser.
162
163         Add quirk for plug-ins that return a retained CALayer
164         https://bugs.webkit.org/show_bug.cgi?id=61948
165         <rdar://problem/9530390>
166
167         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
168         (WebKit::NetscapePluginModule::determineQuirks):
169         Set the ReturnsRetainedCoreAnimationLayer quirk for Flash.
170
171         * Shared/Plugins/PluginQuirks.h:
172         Add ReturnsRetainedCoreAnimationLayer quirk.
173
174         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
175         (WebKit::NPN_GetValue):
176         Handle WKNVExpectsNonretainedLayer by always returning true, and also
177         call NetscapePlugin::setPluginReturnsNonretainedLayer(true) to add a way
178         for plug-ins to opt into returning non-retained layers even if they have
179         the quirk specified.
180
181         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
182         (WebKit::NetscapePlugin::NetscapePlugin):
183         Initialize m_pluginReturnsNonretainedLayer to true.
184
185         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
186         (WebKit::NetscapePlugin::setPluginReturnsNonretainedLayer):
187         Add setter.
188
189         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
190         (WebKit::NetscapePlugin::platformPostInitialize):
191         If m_pluginReturnsNonretainedLayer is false, adopt the layer.
192
193 2011-06-02  Brent Fulgham  <bfulgham@webkit.org>
194
195         Unreviewed WinCairo build correction.
196
197         * UIProcess/win/WebView.cpp: Don't include CG file header
198         when building without CoreGraphics support.
199
200 2011-06-02  Carlos Garcia Campos  <cgarcia@igalia.com>
201
202         Reviewed by Martin Robinson.
203
204         [GTK] Implement popup menus in Webkit2
205         https://bugs.webkit.org/show_bug.cgi?id=61854
206
207         * GNUmakefile.am: Add new files to compilation.
208         * UIProcess/API/gtk/PageClientImpl.cpp:
209         (WebKit::PageClientImpl::createPopupMenuProxy): Create a new
210         WebPopupMenuProxy.
211         * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Added.
212         (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
213         (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
214         (WebKit::WebPopupMenuProxyGtk::showPopupMenu):
215         (WebKit::WebPopupMenuProxyGtk::hidePopupMenu):
216         (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop):
217         (WebKit::WebPopupMenuProxyGtk::menuItemActivated):
218         (WebKit::WebPopupMenuProxyGtk::menuUnmapped):
219         * UIProcess/gtk/WebPopupMenuProxyGtk.h: Added.
220         (WebKit::WebPopupMenuProxyGtk::create):
221         (WebKit::WebPopupMenuProxyGtk::setActiveItem):
222
223 2011-06-01  Sam Weinig  <sam@webkit.org>
224
225         Reviewed by Anders Carlsson.
226
227         Non-users need access to the mds caches for SSL support.
228         <rdar://problem/9471799>
229
230         * WebProcess/com.apple.WebProcess.sb:
231
232 2011-06-01  Jer Noble  <jer.noble@apple.com>
233
234         Reviewed by Maciej Stachowiak.
235
236         Flash of old video frame at the end of full screen transition
237         https://bugs.webkit.org/show_bug.cgi?id=61752
238
239         Add a new method and message, DisposeOfLayerClient, which will invalidate and release
240         the WKRemoteLayerClient used during the full-screen animation.  This ensures that 
241         the root layer used for the full-screen animation will be in a clean state at the start
242         of the next transition.
243
244         * UIProcess/WebFullScreenManagerProxy.cpp:
245         (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient): Added.
246         * UIProcess/WebFullScreenManagerProxy.h:
247         * UIProcess/mac/WKFullScreenWindowController.mm:
248         (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Call disposeOfLayerClient.
249         * WebProcess/FullScreen/WebFullScreenManager.h:
250         (WebKit::WebFullScreenManager::disposeOfLayerClient): Added.
251         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added DisposeOfLayerClient.
252         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
253         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
254         (WebKit::WebFullScreenManagerMac::disposeOfLayerClient): Added, invalidates and clears m_rootLayerClient.
255
256 2011-06-01  Adam Roben  <aroben@apple.com>
257
258         Build fix after r87831
259
260         * UIProcess/win/WebView.cpp:
261         (WebKit::WebView::enterAcceleratedCompositingMode):
262         (WebKit::WebView::exitAcceleratedCompositingMode):
263         Added some HAVE(WKQCA) guards.
264
265 2011-06-01  Adam Roben  <aroben@apple.com>
266
267         Delete a bunch of dead code in DrawingAreaImpl
268
269         LayerTreeHost::participatesInDisplay always returns false now, which means a bunch of code
270         in DrawingAreaImpl no longer runs.
271
272         Cleanup after fixing <http://webkit.org/b/58054>
273         <rdar://problem/9249839> REGRESSION (WebKit2): Accelerated CSS animations have a lower
274         framerate than in WebKit1
275
276         Reviewed by Anders Carlsson.
277
278         * WebProcess/WebPage/DrawingAreaImpl.cpp:
279         (WebKit::DrawingAreaImpl::forceRepaint):
280         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
281         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
282         (WebKit::DrawingAreaImpl::didUpdate):
283         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
284         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
285         (WebKit::DrawingAreaImpl::scheduleDisplay):
286         (WebKit::DrawingAreaImpl::displayTimerFired):
287         (WebKit::DrawingAreaImpl::display):
288         * WebProcess/WebPage/DrawingAreaImpl.h:
289         * WebProcess/WebPage/LayerTreeHost.h:
290         Reverted r82959.
291
292 2011-06-01  Adam Roben  <aroben@apple.com>
293
294         Render accelerated content into a web process-owned child HWND
295
296         This allows us to use WKCACFView's far more efficient kWKCACFViewDrawingDestinationWindow
297         mode, which gives us asynchronous rendering on a background thread and doesn't require us to
298         read bits off the GPU back into system memory.
299
300         A new class, WKCACFViewWindow, represents the child HWND. The child HWND is placed at the
301         bottom of the z-order so it won't obscure any other child HWNDs (i.e., windowed plugins).
302         The child HWND is made transparent to mouse events so that WKView will continue to receive
303         mouse events even though it is obscured by the child HWND.
304
305         There is now a bunch of dead code in DrawingAreaImpl to handle our old rendering model. I'll
306         remove that in a future patch.
307
308         Fixes <http://webkit.org/b/58054> <rdar://problem/9249839> REGRESSION (WebKit2): Accelerated
309         CSS animations have a lower framerate than in WebKit1
310
311         Reviewed by Anders Carlsson.
312
313         * Shared/LayerTreeContext.h: Added HWND member on Windows.
314
315         * Shared/win/CoalescedWindowGeometriesUpdater.cpp:
316         (WebKit::CoalescedWindowGeometriesUpdater::updateGeometries):
317         * Shared/win/CoalescedWindowGeometriesUpdater.h:
318         Added new BringToTopOrNot argument. Allows the caller to specify that all windows being
319         updated should also be brought to the top of the z-order.
320
321         * Shared/win/LayerTreeContextWin.cpp:
322         (WebKit::LayerTreeContext::LayerTreeContext):
323         (WebKit::LayerTreeContext::~LayerTreeContext):
324         (WebKit::LayerTreeContext::encode):
325         (WebKit::LayerTreeContext::decode):
326         (WebKit::LayerTreeContext::isEmpty):
327         (WebKit::operator==):
328         Implemented based on new window member.
329
330         * UIProcess/win/WebView.cpp:
331         (WebKit::WebView::WebView): Initialize new member.
332         (WebKit::WebView::onSizeEvent): Resize the layer host window to cover our entire view, if we
333         have one.
334         (WebKit::WebView::enterAcceleratedCompositingMode): Store, position, and show the layer host
335         window.
336         (WebKit::WebView::exitAcceleratedCompositingMode): Destroy the layer host window.
337         (WebKit::WebView::updateChildWindowGeometries): Updated for change to
338         CoalescedWindowGeometriesUpdater.
339
340         * UIProcess/win/WebView.h: Added m_layerHostWindow member.
341
342         * WebProcess/WebPage/LayerTreeHost.h: Added scheduleChildWindowGeometryUpdate.
343
344         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
345         (WebKit::LayerTreeHostCAWin::supportsAcceleratedCompositing): Simplified by using
346         WKCACFViewWindow.
347
348         (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Removed initialization of a removed
349         member.
350         (WebKit::LayerTreeHostCAWin::platformInitialize): Changed to use WKCACFViewWindow,
351         kWKCACFViewDrawingDestinationWindow, and to initialize the LayerTreeContext.
352         (WebKit::LayerTreeHostCAWin::invalidate): Leak our window and tell it to clean up after
353         itself. The UI process will take care of destroying the window when it finishes switching
354         out of accelerated compositing mode. Removed a WKCACFViewUpdate call that is now handled by
355         WKCACFViewWindow.
356         (WebKit::LayerTreeHostCAWin::scheduleChildWindowGeometryUpdate): Added. Calls through to
357         m_geometriesUpdater.
358         (WebKit::LayerTreeHostCAWin::sizeDidChange): Updated to use WKCACFViewWindow.
359         (WebKit::LayerTreeHostCAWin::contextDidChange): Update child window geometries now to keep
360         them (almost) in sync with the accelerated content. <http://webkit.org/b/61867> covers the
361         slight asynchrony that still exists.
362         (WebKit::LayerTreeHostCAWin::setRootCompositingLayer): Don't flush any changes when we don't
363         have a root layer. This prevents a flash of white when switching out of compositing mode.
364
365         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added m_window and m_geometriesUpdater.
366         Removed code related to the old, synchronous display model.
367
368         * WebProcess/WebPage/ca/win/WKCACFViewWindow.cpp: Added.
369         (WebKit::WKCACFViewWindow::WKCACFViewWindow): Initialize members and create our window.
370         (WebKit::WKCACFViewWindow::~WKCACFViewWindow): Destroy our window if needed.
371         (WebKit::WKCACFViewWindow::onCustomDestroy): Just call ::DestroyWindow.
372         (WebKit::WKCACFViewWindow::onDestroy): Tell our view not to render into our window anymore.
373         (WebKit::WKCACFViewWindow::onEraseBackground): Tell Windows not to erase us.
374         (WebKit::WKCACFViewWindow::onNCDestroy): Clear out m_window since it's now pointing to a
375         destroy window, and destroy ourselves if requested.
376         (WebKit::WKCACFViewWindow::onPaint): Tell the view to draw, then clear our invalid region.
377         (WebKit::WKCACFViewWindow::onPrintClient): Tell our view to draw into the given HDC.
378         (WebKit::WKCACFViewWindow::registerClass): Register our class (duh).
379         (WebKit::WKCACFViewWindow::staticWndProc): Get the WKCACFViewWindow pointer, or store the
380         pointer if needed, then call through to wndProc.
381         (WebKit::WKCACFViewWindow::wndProc): Call out to the appropriate handler function.
382
383         * WebProcess/WebPage/ca/win/WKCACFViewWindow.h: Added.
384         (WebKit::WKCACFViewWindow::setDeletesSelfWhenWindowDestroyed): Simple setter.
385         (WebKit::WKCACFViewWindow::window): Simple getter.
386
387         * WebProcess/WebPage/win/DrawingAreaImplWin.cpp:
388         (WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate): Let the LayerTreeHost handle
389         the geometry update, if we have one.
390
391         * win/WebKit2.vcproj: Added WKCACFViewWindow files.
392
393 2011-06-01  Adam Roben  <aroben@apple.com>
394
395         Route plugin window geometry updates through the DrawingArea
396
397         This will allow the geometry updates to be handled by the LayerTreeHost in compositing mode
398         in the future.
399
400         More rep work for <http://webkit.org/b/58054> <rdar://problem/9249839> REGRESSION (WebKit2):
401         Accelerated CSS animations have a lower framerate than in WebKit1
402
403         Reviewed by Anders Carlsson.
404
405         * WebProcess/Plugins/PluginView.cpp:
406         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate): Tell the DrawingArea, not the
407         WebPage, about the geometry update.
408
409         * WebProcess/WebPage/DrawingArea.h:
410         * WebProcess/WebPage/DrawingAreaImpl.h:
411         * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added.
412         (WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate):
413         Moved code here...
414
415         * WebProcess/WebPage/WebPage.h:
416         * WebProcess/WebPage/win/WebPageWin.cpp:
417         ...from here.
418
419         * win/WebKit2.vcproj: Added DrawingAreaImplWin.cpp.
420
421 2011-06-01  Adam Roben  <aroben@apple.com>
422
423         Move WebView's window geometry updating code to a new class
424
425         This will allow us to share this code with LayerTreeHostCAWin.
426
427         Prep work for <http://webkit.org/b/58054> <rdar://problem/9249839> REGRESSION (WebKit2):
428         Accelerated CSS animations have a lower framerate than in WebKit1
429
430         Reviewed by Anders Carlsson.
431
432         * Shared/win/CoalescedWindowGeometriesUpdater.cpp: Added.
433         (WebKit::CoalescedWindowGeometriesUpdater::CoalescedWindowGeometriesUpdater):
434         (WebKit::CoalescedWindowGeometriesUpdater::~CoalescedWindowGeometriesUpdater):
435         Simple constructor/destructor.
436
437         (WebKit::CoalescedWindowGeometriesUpdater::addPendingUpdate):
438         (WebKit::setWindowRegion):
439         (WebKit::CoalescedWindowGeometriesUpdater::updateGeometries):
440         * Shared/win/CoalescedWindowGeometriesUpdater.h: Added.
441         Moved code here...
442
443         * UIProcess/win/WebView.cpp:
444         (WebKit::WebView::scheduleChildWindowGeometryUpdate):
445         (WebKit::WebView::updateChildWindowGeometries):
446         * UIProcess/win/WebView.h:
447         ...from here.
448
449         * win/WebKit2.vcproj: Added new files.
450
451 2011-06-01  Adam Roben  <aroben@apple.com>
452
453         Windows build fix after r87755
454
455         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
456         (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): Fixed
457         typo.
458
459 2011-06-01  Oleg Romashin  <romaxa@gmail.com>
460
461         Reviewed by Kenneth Rohde Christiansen.
462
463         platformGeometryDidChange function definition was changed everywhere except Qt.
464         This is fix for Qt WK2 plugins compilation
465         https://bugs.webkit.org/show_bug.cgi?id=61832
466
467         * PluginProcess/qt/PluginControllerProxyQt.cpp:
468         (WebKit::PluginControllerProxy::platformGeometryDidChange):
469
470 2011-05-31  Jer Noble  <jer.noble@apple.com>
471
472         Reviewed by Darin Adler.
473
474         Flash of black at the end of full screen transition at apple.com product videos
475         https://bugs.webkit.org/show_bug.cgi?id=61756
476
477         The @"WebKitLayerHostChanged" notification is causing the QTMovie to tear down its layer
478         (which is good) at the wrong time (which is bad).  Send this notification only after 
479         the dragImage snapshot is taken.  This exposed another problem, that the snapshot has
480         a white background.  Set the default background color and transparency for the view (making
481         sure to reset them afterwards) to transparent.
482
483         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
484         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
485
486 2011-03-30  Martin Robinson  <mrobinson@igalia.com>
487
488         Reviewed by Adam Roben.
489
490         [GTK] [WebKit2] Implement a basic WebKitTestRunner
491         https://bugs.webkit.org/show_bug.cgi?id=57068
492
493         Added InjectedBundle support for GTK+.
494
495         * WebProcess/InjectedBundle/InjectedBundle.h: Added typedef for GTK+.
496         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added implementation.
497         (WebKit::InjectedBundle::load): 
498         (WebKit::InjectedBundle::activateMacFontAscentHack):
499         * WebProcess/WebPage/gtk/WebPageGtk.cpp: Remove unnecessary method definition.
500
501 2011-05-31  Dan Bernstein  <mitz@apple.com>
502
503         Reviewed by Simon Fraser.
504
505         <rdar://problem/9523192> REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages on wsj.com, other sites (when navigating away from composited page)
506         https://bugs.webkit.org/show_bug.cgi?id=61808
507
508         WebKit1 has a mechanism to prevent the stale bits from the outgoing page from being erased
509         until the incoming page has layout. Adapt this in WebKit2 to prevent the composited layer tree
510         of the outgoing page from being torn down or updated until the incoming page has layout.
511
512         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
513         (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Unfreeze the layer tree state.
514         (WebKit::WebFrameLoaderClient::frameLoadCompleted): Ditto.
515         (WebKit::WebFrameLoaderClient::provisionalLoadStarted): Freeze the layer tree state.
516
517         * WebProcess/WebPage/DrawingArea.h:
518         (WebKit::DrawingArea::setLayerTreeStateIsFrozen): Added.
519
520         * WebProcess/WebPage/DrawingAreaImpl.cpp:
521         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member variables.
522         (WebKit::DrawingAreaImpl::setLayerTreeStateIsFrozen): Added. When freezing, sets the flag and
523         disables layer flush scheduling and exiting accelerated compositing mode. When unfreezing,
524         clears the flag and exits compositing mode if needed.
525         (WebKit::DrawingAreaImpl::setRootCompositingLayer): Reset m_wantsToExitAcceleratedCompositingMode.
526         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Ditto.
527         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto.
528         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon): If the layer tree state is frozen,
529         bail out but set m_wantsToExitAcceleratedCompositingMode.
530
531         * WebProcess/WebPage/DrawingAreaImpl.h:
532         * WebProcess/WebPage/LayerTreeHost.h:
533
534         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
535         (WebKit::LayerTreeHostCA::LayerTreeHostCA): Initialize m_layerFlushSchedulingEnabled.
536
537         * WebProcess/WebPage/ca/LayerTreeHostCA.h:
538         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
539
540         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
541         (WebKit::LayerTreeHostCAMac::scheduleLayerFlush): Bail out if scheduling is not enabled.
542         (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling
543         flushing, cancels the pending flush.
544         (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Added an assertion.
545
546         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
547         (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Bail out if scheduling is not enabled.
548         (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling
549         flushing, cancels the pending flush.
550
551         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
552
553 2011-05-31  ChangeLog  <james.cooley@nokia.com>
554
555         Reviewed by Andreas Kling.
556
557         [Qt][WK2] Qt port needs test content for QWKHistory
558         https://bugs.webkit.org/show_bug.cgi?id=57850
559
560         Created data-driven QTestLib tests for existing QWKHistory APIs.
561
562         This walks through loading four simple pages, navigating
563         backwards and forwards.
564
565         We check the results at each action by creating expected forward/back
566         lists and comparing those lists in count and membership to those kept by
567         WebKit and retrieved via the QWKHistory APIs.
568
569         * UIProcess/API/qt/tests/html/a.htm: Added.
570         * UIProcess/API/qt/tests/html/b.htm: Added.
571         * UIProcess/API/qt/tests/html/c.htm: Added.
572         * UIProcess/API/qt/tests/html/d.htm: Added.
573         Four added simple pages
574
575         * UIProcess/API/qt/tests/qwkhistory: Added.
576         * UIProcess/API/qt/tests/qwkhistory/qwkhistory.pro: Added.
577         Created qwkhistory folder and pro
578
579         * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: Added.
580         (TestHistoryItem::title):
581         (TestHistoryItem::url):
582         (TestHistoryItem::TestHistoryItem):
583         Utility class to hold expected url,title for test
584
585         (tst_QWKHistory::initTestCase):
586         (tst_QWKHistory::historyFBTest_data):
587         (tst_QWKHistory::historyFBTest):
588         init, data, and data-driven test case
589
590         * UIProcess/API/qt/tests/tests.pro:
591         Included qwkhistory in tests.pro
592
593 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
594
595         Reviewed by Simon Hausmann.
596
597         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
598         https://bugs.webkit.org/show_bug.cgi?id=61694
599
600         Create an ArgumentCoder for WebCore::Animation.
601
602         * Scripts/webkit2/messages.py:
603         * Shared/WebCoreArgumentCoders.h:
604
605 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
606
607         Reviewed by Simon Hausmann.
608
609         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
610         https://bugs.webkit.org/show_bug.cgi?id=61694
611
612         Add an ArgumentCoder for WebCore::TimingFunction. This serializer can create the appropriate
613         TimingFunction subclass based on the type of timing function.
614
615         * Scripts/webkit2/messages.py:
616         * Shared/WebCoreArgumentCoders.h:
617
618 2011-05-30  No'am Rosenthal  <noam.rosenthal@nokia.com>
619
620         Reviewed by Simon Hausmann.
621
622         WebKit2: Enable serializing of data types needed for cross-process accelerated compositing
623         https://bugs.webkit.org/show_bug.cgi?id=61694
624
625         Add WebCore::Length and WebCore::TransformationMatrix to the types that use SimpleArgumentCoder.
626
627         * Scripts/webkit2/messages.py:
628         * Shared/WebCoreArgumentCoders.h:
629
630 2011-05-30  Anders Carlsson  <andersca@apple.com>
631
632         Reviewed by Simon Fraser.
633
634         Remove incorrect asserts from PluginProcessConnection
635         https://bugs.webkit.org/show_bug.cgi?id=61731
636
637         There might be pending incoming messages from a PluginProxy even though we've
638         destroyed the plug-in and removed it from the m_plugins map, so remove the incorrect assertions.
639
640         * WebProcess/Plugins/PluginProcessConnection.cpp:
641         (WebKit::PluginProcessConnection::didReceiveMessage):
642         (WebKit::PluginProcessConnection::didReceiveSyncMessage):
643
644 2011-05-30  Carlos Garcia Campos  <cgarcia@igalia.com>
645
646         Reviewed by Martin Robinson.
647
648         [GTK] Initial tooltips implementation for WebKit2
649         https://bugs.webkit.org/show_bug.cgi?id=59318
650
651         * UIProcess/API/gtk/PageClientImpl.cpp:
652         (WebKit::PageClientImpl::toolTipChanged): Update view's tooltip
653         text.
654         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
655         (webkitWebViewBaseQueryTooltip): Implement GtkWidget::query-tooltip.
656         (webkit_web_view_base_class_init): Override GtkWidget::query-tooltip.
657         (webkitWebViewBaseSetTooltipText): Update tooltip text and trigger
658         GtkWidget::query-tooltip.
659         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
660
661 2011-05-30  Carlos Garcia Campos  <cgarcia@igalia.com>
662
663         Reviewed by Martin Robinson.
664
665         [GTK] Remove some unneeded header includes
666         https://bugs.webkit.org/show_bug.cgi?id=60536
667
668         * Platform/CoreIPC/Connection.cpp: Remove WebProcess.h.
669         * Platform/CoreIPC/unix/ConnectionUnix.cpp: Remove
670         ProcessLauncher.h and WebProcessProxy.h. Add <wtf/OwnArrayPtr.h>.
671         * WebProcess/Plugins/Netscape/NPJSObject.cpp: Remove PluginView.h.
672
673 2011-05-29  Darin Adler  <darin@apple.com>
674
675         Reviewed by Dan Bernstein.
676
677         Race condition in full screen controller, which leads to problem when web process crashes
678         https://bugs.webkit.org/show_bug.cgi?id=61707
679
680         Second try at this. First try could lead to a WKView leak.
681
682         * UIProcess/mac/WKFullScreenWindowController.h: Added _isExitingAcceleratedCompositingMode.
683         Needed to track whether we have retained so we don't leak if the page goes away before
684         we get the callback.
685
686         * UIProcess/mac/WKFullScreenWindowController.mm:
687         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Added code to set
688         the new variable to YES.
689         (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Added code to
690         deal with the new boolean and to release.
691         (exitCompositedModeRepaintCompleted): Removed the release that was here.
692         (-[WKFullScreenWindowController close]): Added a call to exitCompositedModeRepaintCompleted
693         here. We're as complete as we'll ever be when we're closed; we can't get the callback
694         after that point.
695
696 2011-05-29  Sam Weinig  <sam@webkit.org>
697
698         Reviewed by Anders Carlsson.
699
700         REGRESSION (r87637): nytimes.com freezes after going back to it
701         <rdar://problem/9521928>
702
703         * WebProcess/WebPage/DrawingAreaImpl.cpp:
704         (WebKit::DrawingAreaImpl::forceRepaint):
705         Add call to setShouldNotifyAfterNextScheduledLayerFlush(false) to prevent a
706         redundant call to layerHostDidFlushLayers which would cause the layer state
707         to get out of sync with the UIProcess.
708
709 2011-05-29  Jer Noble  <jer.noble@apple.com>
710
711         Reviewed by Simon Fraser.
712
713         REGRESSION (r86924): webkitRequestFullScreen does not work properly (black screen, can’t interact)
714         https://bugs.webkit.org/show_bug.cgi?id=61710
715
716         When taking the documentElement full screen, we don't create a RenderFullScreen 
717         object and thus never enter accelerated compositing mode for the animation. Tell
718         the WKFullScreenWindowController to enter accelerated compositing mode anyway 
719         (with an empty layer context) so as to fulfill its expectations and cause the 
720         full screen animation to complete.
721
722         * UIProcess/mac/WKFullScreenWindowController.mm:
723         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added a 
724             comment explaining when we expect the animation to complete.
725         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
726             Remove an ASSERT which is no longer valid.
727         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
728         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Tell the UIProcess
729             to enter then exit full-screen mode.
730         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
731
732 2011-05-29  Darin Adler  <darin@apple.com>
733
734         Reviewed by Dan Bernstein.
735
736         Race condition in full screen controller, which leads to problem when web process crashes
737         https://bugs.webkit.org/show_bug.cgi?id=61707
738
739         Saw this while debugging a crash. We don't have a way to make regression tests for this
740         kind of issue at this time.
741
742         * UIProcess/mac/WKFullScreenWindowController.mm:
743         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Retain the controller
744         here since we are keeping a pointer to it.
745         (exitCompositedModeRepaintCompleted): Release the controller here.
746
747 2011-05-29  Anders Carlsson  <andersca@apple.com>
748
749         Reviewed by Darin Adler.
750
751         REGRESSION (87637): Entering WebKit Full Screen mode causes an assertion in DrawingAreaImpl::layerHostDidFlushLayers
752         https://bugs.webkit.org/show_bug.cgi?id=61706
753         <rdar://problem/9521970>
754
755         If we've already let the UI process know that we're in compositing mode, we just need to force a repaint.
756
757         * WebProcess/WebPage/DrawingAreaImpl.cpp:
758         (WebKit::DrawingAreaImpl::forceRepaint):
759
760 2011-05-29  Beth Dakin  <bdakin@apple.com>
761
762         Reviewed by Darin Adler.
763
764         https://bugs.webkit.org/show_bug.cgi?id=61700
765         Need WebKit2 API to get the size of the render tree
766         -and corresponding-
767         <rdar://problem/9512733>
768
769         * UIProcess/API/C/WKPage.cpp:
770         (WKPageGetRenderTreeSize):
771         * UIProcess/API/C/WKPage.h:
772         * UIProcess/WebPageProxy.h:
773         (WebKit::WebPageProxy::renderTreeSize):
774         (WebKit::WebPageProxy::setRenderTreeSize):
775         * UIProcess/WebPageProxy.messages.in:
776         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
777         (WebKit::WebChromeClient::setRenderTreeSize):
778         * WebProcess/WebCoreSupport/WebChromeClient.h:
779
780 2011-05-29  Darin Adler  <darin@apple.com>
781
782         Reviewed by Anders Carlsson and Simon Fraser.
783
784         <rdar://problem/9519453>
785         When calling ForceRepaint on a page with accelerated compositing, we can get
786         a race condition where the UI process paints the old content, resulting in showing
787         the previous page. That happens because forceRepaint's callback waits for the next
788         repaint to happen, but nothing notifies UI process that the page is in accelerated
789         compositing mode.
790
791         * WebProcess/WebPage/DrawingAreaImpl.cpp:
792         (WebKit::DrawingAreaImpl::forceRepaint): Call layerHostDidFlushLayers instead of
793         just calling forceRepaint on the layer tree host.
794
795 2011-05-28  Simon Fraser  <simon.fraser@apple.com>
796
797         Reviewed by Dan Bernstein, Maciej Stachowiak.
798
799         Denying access to your keychain on login crashes WebKit2
800         https://bugs.webkit.org/show_bug.cgi?id=61695
801         <rdar://problem/9520570>
802         
803         Fix two sources of crashes if you hit the Deny button when WebKit2 is
804         doing HTTP authentication.
805         
806         First, SecKeychainItemRequestData::attributeList() failed to initialize the
807         length and data members of SecKeychainAttributes in the list if there was no data.
808         This caused invalid memory reads later.
809         
810         Second, returning a non-zero error from the SecKeychainItemCopyContent shim method
811         would cause a later crash in a system framework, which is not set up to handle
812         errors. Instead, we always return noErr, and allow the authentication to fail.
813         
814         Finally, paranoically initialize the SecKeychainItemContext in two places
815         to avoid uninitialized data members, and initialize length and outData
816         to 0 in secKeychainItemCopyContent() in case SecKeychainItemCopyContent()
817         fails to set them on error.
818         
819         * Shared/mac/SecKeychainItemRequestData.cpp:
820         (WebKit::SecKeychainItemRequestData::attributeList):
821         * UIProcess/mac/WebProcessProxyMac.mm:
822         (WebKit::WebProcessProxy::secKeychainItemCopyContent): 
823         * WebProcess/mac/KeychainItemShimMethods.mm:
824         (WebKit::webSecKeychainItemCopyContent):
825         (WebKit::webSecKeychainItemCreateFromContent):
826
827 2011-05-28  Anders Carlsson  <andersca@apple.com>
828
829         Reviewed by Dan Bernstein.
830
831         REGRESSION (r86578): Flash content missing from mercurynews.com
832         https://bugs.webkit.org/show_bug.cgi?id=61691
833         <rdar://problem/9519893>
834
835         If the plug-in doesn't have access to the toplevel URL, make sure to
836         return *something* to the plug-in.
837
838         * PluginProcess/PluginControllerProxy.cpp:
839         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
840
841 2011-05-28  Adam Barth  <abarth@webkit.org>
842
843         Reviewed by Alexey Proskuryakov.
844
845         Audit all uses of KURL::prettyURL
846         https://bugs.webkit.org/show_bug.cgi?id=61201
847
848         Update callers of prettyURL to just call string.
849
850         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
851         (WebKit::WebFrameLoaderClient::createPlugin):
852         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
853         (WebKit::cancelledError):
854         (WebKit::blockedError):
855
856 2011-05-27  Stephanie Lewis  <slewis@apple.com>
857
858         Unreviewed.
859
860         Fix a typo in the order_file flag.
861
862         * Configurations/Base.xcconfig:
863
864 2011-05-27  Stephanie Lewis  <slewis@apple.com>
865
866         Rubber Stamped by Adam Roben.
867
868         Add Order File.  Use -order_file flag since it can order more of the binary.
869
870         * Configurations/Base.xcconfig:
871         * mac/WebKit2.order: Added.
872
873 2011-05-27  Carlos Garcia Campos  <cgarcia@igalia.com>
874
875         Reviewed by Martin Robinson.
876
877         [CAIRO] Don't copy the surface before drawing it into the context in ShareableBitmap::paint()
878         https://bugs.webkit.org/show_bug.cgi?id=60757
879
880         cairo_image_surface_create_for_data() is already a shallow copy of
881         the image, so we don't need to copy it again.
882
883         * Shared/cairo/ShareableBitmapCairo.cpp:
884         (WebKit::ShareableBitmap::paint):
885
886 2011-05-26  Jeff Miller  <jeffm@apple.com>
887
888         Reviewed by Alexey Proskuryakov.
889
890         Add a key handling logging channel for WebKit2
891         https://bugs.webkit.org/show_bug.cgi?id=61588
892         
893         Added a new LogKeyHandling channel, and logged some key events in WebPageProxy.
894         I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp.
895
896         * Platform/Logging.cpp:
897         (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel.
898         * Platform/Logging.h: Added LogKeyHandling channel.
899
900         * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment.
901         (WebKit::webKeyboardEventTypeString): Added to support logging.
902         (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event.
903         (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event.
904
905 2011-05-26  Chris Fleizach  <cfleizach@apple.com>
906
907         Reviewed by Darin Adler.
908
909         Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedTextMarkerRange of nil
910         https://bugs.webkit.org/show_bug.cgi?id=61492
911
912         The method for determining which WebPage is actually focused and foreground was faulty. More
913         extensive checks are required to check which WebPage should be returned as the focusable one.
914
915         * WebProcess/WebPage/WebPage.cpp:
916         (WebKit::WebPage::windowIsFocused):
917
918 2011-05-26  Jon Lee  <jonlee@apple.com>
919
920         Reviewed by Darin Adler.
921
922         REGRESSION (5.0.5-Jazz): Transition to full screen video animates in wrong location when scrolled (61559)
923         https://bugs.webkit.org/show_bug.cgi?id=61559
924         <rdar://problem/9496054>
925
926         The CALayer that gets animated has a position that is offset by the scroll position of the web view. To
927         fix this, we set the destination location based on the rect of the full screen, and add a position
928         animation which keeps the position of the layer centered. This prevents glitches if others
929         are trying to change the layer position while the animation is running.
930
931         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Refactor the calculation of the CALayer windowed
932         position into a private helper function, as well as the animation setup.
933         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
934         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
935         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
936         (WebKit::WebFullScreenManagerMac::animateFullScreen): Sets up the zoom animation, and the position offset
937         animation.
938         (WebKit::WebFullScreenManagerMac::windowedCGTransform): Calculates the placement of the windowed layer
939         in screen coordinates.
940
941 2011-05-26  Qi Zhang  <qi.2.zhang@nokia.com>
942
943         Reviewed by Andreas Kling.
944
945         WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled
946         https://bugs.webkit.org/show_bug.cgi?id=42676
947
948         Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner.
949
950         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
951         (WKBundleSetAuthorAndUserStylesEnabled):
952         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
953         * WebProcess/InjectedBundle/InjectedBundle.cpp:
954         (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled):
955         * WebProcess/InjectedBundle/InjectedBundle.h:
956
957 2011-05-25  Brian Weinstein  <bweinstein@apple.com>
958
959         Reviewed by Adam Roben.
960
961         WebKit2: Status bar, toolbar, and menu bar checks should be in the injected bundle
962         https://bugs.webkit.org/show_bug.cgi?id=61474
963         <rdar://problem/9468337>
964
965         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
966         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
967         (WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Call the function on the client
968             if it exists.
969         (WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto.
970         (WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto.
971         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
972         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
973         (WebKit::WebChromeClient::statusbarVisible): Add a possible short-circuit in the injected bundle.
974         (WebKit::WebChromeClient::menubarVisible): Ditto.
975         (WebKit::WebChromeClient::toolbarsVisible): Ditto.
976
977 2011-05-26  Steve Falkenburg  <sfalken@apple.com>
978
979         Reviewed by Adam Roben.
980
981         WebKit2 bundle missing localization subdirectories
982         https://bugs.webkit.org/show_bug.cgi?id=61512
983         
984         Better fix for this. We just need to specify CFBundleAllowMixedLocalizations.
985
986         * win/WebKit2WebProcess.resources/English.lproj: Removed.
987         * win/WebKit2WebProcess.resources/Info.plist:
988         * win/WebKit2WebProcess.resources/da.lproj: Removed.
989         * win/WebKit2WebProcess.resources/de.lproj: Removed.
990         * win/WebKit2WebProcess.resources/es.lproj: Removed.
991         * win/WebKit2WebProcess.resources/fi.lproj: Removed.
992         * win/WebKit2WebProcess.resources/fr.lproj: Removed.
993         * win/WebKit2WebProcess.resources/it.lproj: Removed.
994         * win/WebKit2WebProcess.resources/ja.lproj: Removed.
995         * win/WebKit2WebProcess.resources/ko.lproj: Removed.
996         * win/WebKit2WebProcess.resources/nb.lproj: Removed.
997         * win/WebKit2WebProcess.resources/nl.lproj: Removed.
998         * win/WebKit2WebProcess.resources/pl.lproj: Removed.
999         * win/WebKit2WebProcess.resources/pt.lproj: Removed.
1000         * win/WebKit2WebProcess.resources/pt_PT.lproj: Removed.
1001         * win/WebKit2WebProcess.resources/ru.lproj: Removed.
1002         * win/WebKit2WebProcess.resources/sv.lproj: Removed.
1003         * win/WebKit2WebProcess.resources/zh_CN.lproj: Removed.
1004         * win/WebKit2WebProcess.resources/zh_TW.lproj: Removed.
1005
1006 2011-05-26  Steve Falkenburg  <sfalken@apple.com>
1007
1008         Reviewed by Adam Roben.
1009
1010         WebKit2 bundle missing localization subdirectories
1011         https://bugs.webkit.org/show_bug.cgi?id=61512
1012         <rdar://problem/9498607>
1013         
1014         These lproj directories are intentionally left empty.
1015         Their presence indicates that this exe is localized to this
1016         set of languages.
1017
1018         * win/WebKit2WebProcess.resources/English.lproj: Added.
1019         * win/WebKit2WebProcess.resources/da.lproj: Added.
1020         * win/WebKit2WebProcess.resources/de.lproj: Added.
1021         * win/WebKit2WebProcess.resources/es.lproj: Added.
1022         * win/WebKit2WebProcess.resources/fi.lproj: Added.
1023         * win/WebKit2WebProcess.resources/fr.lproj: Added.
1024         * win/WebKit2WebProcess.resources/it.lproj: Added.
1025         * win/WebKit2WebProcess.resources/ja.lproj: Added.
1026         * win/WebKit2WebProcess.resources/ko.lproj: Added.
1027         * win/WebKit2WebProcess.resources/nb.lproj: Added.
1028         * win/WebKit2WebProcess.resources/nl.lproj: Added.
1029         * win/WebKit2WebProcess.resources/pl.lproj: Added.
1030         * win/WebKit2WebProcess.resources/pt.lproj: Added.
1031         * win/WebKit2WebProcess.resources/pt_PT.lproj: Added.
1032         * win/WebKit2WebProcess.resources/ru.lproj: Added.
1033         * win/WebKit2WebProcess.resources/sv.lproj: Added.
1034         * win/WebKit2WebProcess.resources/zh_CN.lproj: Added.
1035         * win/WebKit2WebProcess.resources/zh_TW.lproj: Added.
1036         * win/WebKit2WebProcessPostBuild.cmd: Copy entire resources directory, exclude .svn directories.
1037         * win/xcopy.excludes: Added. Excludes .svn directories.
1038
1039 2011-05-25  Qi Zhang  <qi.2.zhang@nokia.com>
1040
1041         Reviewed by Simon Hausmann.
1042
1043         WebKitTestRunner needs layoutTestController.setPrivateBrowsingEnabled
1044         https://bugs.webkit.org/show_bug.cgi?id=42697
1045
1046         Implemented layoutTestController.setPrivateBrowsingEnabled for WebKitTestRunner.
1047
1048         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1049         (WKBundleSetPrivateBrowsingEnabled):
1050         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1051         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1052         (WebKit::InjectedBundle::setPrivateBrowsingEnabled):
1053         * WebProcess/InjectedBundle/InjectedBundle.h:
1054
1055 2011-05-25  Mark Rowe  <mrowe@apple.com>
1056
1057         Reviewed by Sam Weinig.
1058
1059         <rdar://problem/9504058> Need some way to query user gesture state from injected bundle
1060
1061         Add WKBundleIsProcessingUserGesture.
1062
1063         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1064         (WKBundleIsPageBoxVisible):
1065         (WKBundleIsProcessingUserGesture):
1066         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1067         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1068         (WebKit::InjectedBundle::isProcessingUserGesture):
1069         * WebProcess/InjectedBundle/InjectedBundle.h:
1070
1071 2011-05-24  Jer Noble  <jer.noble@apple.com>
1072
1073         Reviewed by Darin Adler.
1074
1075         Video fails to play on Vimeo
1076         https://bugs.webkit.org/show_bug.cgi?id=61403
1077
1078         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1079         (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and
1080             wkQTMovieResolvedURL.
1081
1082 2011-05-25  Jon Honeycutt  <jhoneycutt@apple.com>
1083
1084         REGRESSION (WebKit2): Crash in Flash on USA Today photo gallery
1085         https://bugs.webkit.org/show_bug.cgi?id=61428
1086         <rdar://problem/9457006>
1087
1088         Reviewed by Adam Roben.
1089
1090         The crash occurs when Flash posts a message to a window that it
1091         creates, and in processing the message, it calls NPN_Evaluate to
1092         evaluate JavaScript that removes the plug-in from the page. Flash then
1093         crashes when we return to Flash code.
1094
1095         * Platform/WorkItem.h:
1096         (DerefWorkItem::DerefWorkItem):
1097         Initialize m_ptr.
1098         (DerefWorkItem::execute):
1099         Deref the object.
1100         (WorkItem::createDeref):
1101         Create and return a DerefWorkItem.
1102
1103         * WebProcess/Plugins/PluginView.cpp:
1104         (WebKit::PluginView::unprotectPluginFromDestruction):
1105         If the PluginView has only one reference left, deref it asynchronously.
1106
1107 2011-05-25  Dan Bernstein  <mitz@apple.com>
1108
1109         Reviewed by Anders Carlsson.
1110
1111         <rdar://problem/9496795> REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale
1112         https://bugs.webkit.org/show_bug.cgi?id=61448
1113
1114         * WebProcess/Plugins/PluginView.cpp:
1115         (WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale
1116         after intersecting the two rectangles.
1117
1118 2011-05-24  Timothy Hatcher  <timothy@apple.com>
1119
1120         Make the Web Inspector bring the right window to the front when docked.
1121
1122         rdar://problem/9464685
1123         https://webkit.org/b/61420
1124
1125         Reviewed by Brian Weinstein.
1126
1127         * UIProcess/mac/WebInspectorProxyMac.mm:
1128         (WebKit::WebInspectorProxy::platformBringToFront): Order front the parent window of the Inspector's WKView.
1129         * UIProcess/win/WebInspectorProxyWin.cpp:
1130         (WebKit::WebInspectorProxy::platformBringToFront): Ditto.
1131
1132 2011-05-24  Keishi Hattori  <keishi@webkit.org>
1133
1134         Reviewed by Kent Tamura.
1135
1136         Disable textfield implementation of <input type=color>. Add INPUT_COLOR feature flag. Add input color sanitizer.
1137         https://bugs.webkit.org/show_bug.cgi?id=61273
1138
1139         * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag.
1140
1141 2011-05-24  Maciej Stachowiak  <mjs@apple.com>
1142
1143         Reviewed by Dan Bernstein.
1144
1145         Update the WebProcess sandbox exceptions to silence warnings for a file that is accessed uselessly
1146         https://bugs.webkit.org/show_bug.cgi?id=61349
1147         <rdar://problem/9476255>
1148
1149         * WebProcess/com.apple.WebProcess.sb:
1150
1151 2011-05-24  Mark Rowe  <mrowe@apple.com>
1152
1153         Fix the 32-bit build.
1154
1155         Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType,
1156         as this is declared as different underlying types in 32- and 64-bit (unsigned long
1157         vs unsigned int).
1158         
1159         * Shared/mac/KeychainAttribute.cpp:
1160         (CoreIPC::encode):
1161         (CoreIPC::decode):
1162
1163 2011-05-24  Sam Weinig  <sam@webkit.org>
1164
1165         Reviewed by Maciej Stachowiak.
1166
1167         Enable coalesced wheel events
1168         <rdar://problem/9444786>
1169
1170         * UIProcess/WebPageProxy.cpp:
1171         Flip the switch for coalescing wheel events rather than dropping them.
1172
1173 2011-05-24  Sam Weinig  <sam@webkit.org>
1174
1175         Reviewed by Maciej Stachowiak.
1176
1177         Additional sandbox extension required for quarantine database
1178         <rdar://problem/9397494>
1179         https://bugs.webkit.org/show_bug.cgi?id=61405
1180
1181         * WebProcess/com.apple.WebProcess.sb:
1182         Add read-data access for ~/Library/Preferences.
1183
1184 2011-05-24  Michael Saboff  <msaboff@apple.com>
1185
1186         Reviewed by Geoffrey Garen.
1187
1188         Improve handling in WebCore of low memory situations
1189         https://bugs.webkit.org/show_bug.cgi?id=61222
1190
1191         Added call to enable memory pressure handling for Mac case.
1192
1193         * WebProcess/WebProcess.cpp:
1194         (WebKit::WebProcess::initializeWebProcess):
1195         * WebProcess/WebProcess.h:
1196         * WebProcess/mac/WebProcessMac.mm:
1197         (WebKit::WebProcess::platformInitializeWebProcess):
1198
1199 2011-05-24  Brady Eidson  <beidson@apple.com>
1200
1201         Reviewed by Darin Adler.
1202
1203         Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
1204         Should shim a few SecKeychainItem* methods on SnowLeopard
1205
1206         Initialize the KeychainItem shim on SnowLeopard:
1207         * WebProcess/mac/WebProcessMac.mm:
1208         (WebKit::WebProcess::initializeShim):
1209
1210         On SnowLeopard, shim the 4 SecKeychainItem methods:
1211         * WebProcess/mac/WebProcessShim.h:
1212         * WebProcess/mac/WebProcessShim.mm:
1213         (WebKit::shimSecKeychainItemCopyContent):
1214         (WebKit::shimSecKeychainItemCreateFromContent):
1215         (WebKit::shimSecKeychainItemModifyContent):
1216         (WebKit::shimSecKeychainItemFreeContent):
1217         (WebKit::WebKitWebProcessKeychainItemShimInitialize):
1218
1219         * WebProcess/mac/KeychainItemShimMethods.h: Added.
1220         * WebProcess/mac/KeychainItemShimMethods.mm: Added.
1221         Manage a set of shim-controlled AttributeList data:
1222         (WebKit::shimManagedAttributeLists):
1223         (WebKit::freeAttributeListContents):
1224         (WebKit::allocateAttributeListContents):
1225
1226         Manage a set of shim-controlled KeychainItem data:
1227         (WebKit::shimManagedKeychainItemContents):
1228         (WebKit::allocateKeychainItemContentData):
1229
1230         Free any shim-controlled AttributeList or KeychainItem data:
1231         (WebKit::webFreeAttributeListContentOnMainThread):
1232         (WebKit::webFreeAttributeListContent):
1233         (WebKit::webFreeKeychainItemContentOnMainThread):
1234         (WebKit::webFreeKeychainItemContent):
1235
1236         Marshall these 3 KeychainItem methods to the UIProcess:
1237         (WebKit::webSecKeychainItemCopyContentOnMainThread):
1238         (WebKit::webSecKeychainItemCopyContent):
1239         (WebKit::webSecKeychainItemCreateFromContentOnMainThread):
1240         (WebKit::webSecKeychainItemCreateFromContent):
1241         (WebKit::webSecKeychainItemModifyContentOnMainThread):
1242         (WebKit::webSecKeychainItemModifyContent):
1243         (WebKit::initializeKeychainItemShim):
1244
1245         Container for an AttributeList entry that knows how to encode/decode:
1246         * Shared/mac/KeychainAttribute.cpp: Added.
1247         (WebKit::KeychainAttribute::KeychainAttribute):
1248         (CoreIPC::encode):
1249         (CoreIPC::decode):
1250         * Shared/mac/KeychainAttribute.h: Added.
1251
1252         Container for the relevant arguments to the shimmed methods, to send to the UIProcess:
1253         * Shared/mac/SecKeychainItemRequestData.cpp: Added.
1254         (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData):
1255         (WebKit::SecKeychainItemRequestData::initializeWithAttributeList):
1256         (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData):
1257         (WebKit::SecKeychainItemRequestData::attributeList):
1258         (WebKit::SecKeychainItemRequestData::encode):
1259         (WebKit::SecKeychainItemRequestData::decode):
1260         * Shared/mac/SecKeychainItemRequestData.h: Added.
1261         (WebKit::SecKeychainItemRequestData::keychainItem):
1262         (WebKit::SecKeychainItemRequestData::itemClass):
1263         (WebKit::SecKeychainItemRequestData::length):
1264         (WebKit::SecKeychainItemRequestData::data):
1265
1266         Container for the possible output from the shimmed methods, to send back to the WebProcess:
1267         * Shared/mac/SecKeychainItemResponseData.cpp: Added.
1268         (WebKit::SecKeychainItemResponseData::SecKeychainItemResponseData):
1269         (WebKit::SecKeychainItemResponseData::encode):
1270         (WebKit::SecKeychainItemResponseData::decode):
1271         * Shared/mac/SecKeychainItemResponseData.h: Added.
1272         (WebKit::SecKeychainItemResponseData::itemClass):
1273         (WebKit::SecKeychainItemResponseData::data):
1274         (WebKit::SecKeychainItemResponseData::resultCode):
1275         (WebKit::SecKeychainItemResponseData::attributes):
1276         (WebKit::SecKeychainItemResponseData::keychainItem):
1277
1278         Actually implement the calls to the SecKeychainItem* methods in the UIProcess:
1279         * UIProcess/WebProcessProxy.h:
1280         * UIProcess/WebProcessProxy.messages.in:
1281         * UIProcess/mac/WebProcessProxyMac.mm:
1282         (WebKit::WebProcessProxy::secKeychainItemCopyContent):
1283         (WebKit::WebProcessProxy::secKeychainItemCreateFromContent):
1284         (WebKit::WebProcessProxy::secKeychainItemModifyContent):
1285
1286         * WebKit2.xcodeproj/project.pbxproj: Project file stuff
1287         * Configurations/Shim.xcconfig:
1288
1289 2011-05-24  Jay Civelli  <jcivelli@chromium.org>
1290
1291         Rubberstamped by David Kilzer.
1292
1293         Updated some files that I forgot in my previous MHTML CL.
1294
1295        * Configurations/FeatureDefines.xcconfig:
1296
1297 2011-05-24  Sam Weinig  <sam@webkit.org>
1298
1299         Clean up after Geoff and fix the WebKit2 build.
1300
1301         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
1302
1303 2011-05-24  Adam Roben  <aroben@apple.com>
1304
1305         Invalidate JSNPObjects when they are finalized
1306
1307         This will cause the underlying NPObject to be released at finalization time, rather than at
1308         destruction time (which is unpredictable and could occur after the plugin has been
1309         unloaded).
1310
1311         Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html
1312
1313         Fixes <http://webkit.org/b/61316> <rdar://problem/9489824> Crash in deallocateNPObject when
1314         reloading yahoo.com webarchive in WebKit2
1315
1316         Reviewed by Oliver Hunt.
1317
1318         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1319         (WebKit::JSNPObject::~JSNPObject): Assert that we've already been invalidated, rather than
1320         trying to perform invalidation now (when the plugin might already be unloaded).
1321
1322         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
1323         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
1324         (WebKit::NPRuntimeObjectMap::invalidate):
1325         Updated for m_jsNPObjects type change.
1326
1327         (WebKit::NPRuntimeObjectMap::finalize): Added. Invalidates the JSNPObject and removes it
1328         from the map.
1329
1330         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Now inherits from WeakHandleOwner.
1331         Changed m_jsNPObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will be
1332         notified when the JSNPObjects are finalized.
1333
1334 2011-05-24  Qi Zhang  <qi.2.zhang@nokia.com>
1335
1336         Reviewed by Adam Roben.
1337
1338         WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
1339         https://bugs.webkit.org/show_bug.cgi?id=42669
1340
1341         Fixes a typo issue for patch 94265.
1342
1343         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1344         (WKBundleSetJavaScriptCanAccessClipboard):
1345
1346 2011-05-24  Sam Weinig  <sam@webkit.org>
1347
1348         Reviewed by John Sullivan.
1349
1350         WebKit tells client that the page has become unresponsive while the beforeUnloadConfirm dialog is up
1351         https://bugs.webkit.org/show_bug.cgi?id=61372
1352
1353         * UIProcess/WebPageProxy.cpp:
1354         (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel):
1355         Stop the unresponsiveness timer like we do for other client functions that spin a
1356         runloop.
1357
1358 2011-05-24  Andreas Kling  <kling@webkit.org>
1359
1360         Reviewed by Simon Hausmann.
1361
1362         [WK2] Change TiledDrawingArea to use ShareableBitmap instead of UpdateChunk.
1363         https://bugs.webkit.org/show_bug.cgi?id=61296
1364
1365         Pass UpdateInfo containing ShareableBitmaps instead of UpdateChunk for tile updates.
1366         Only the bounds rect and bitmap handle in the UpdateInfo are used since none of the
1367         other parameters are needed for TiledDrawingArea.
1368
1369         * Shared/ShareableBitmap.h:
1370         * Shared/qt/ShareableBitmapQt.cpp:
1371         (WebKit::ShareableBitmap::createQImage):
1372         (WebKit::ShareableBitmap::createGraphicsContext):
1373         (WebKit::ShareableBitmap::paint):
1374         * Shared/qt/UpdateChunk.cpp: Removed.
1375         * Shared/qt/UpdateChunk.h: Removed.
1376         * UIProcess/TiledDrawingAreaProxy.cpp:
1377         (WebKit::TiledDrawingAreaProxy::didReceiveMessage):
1378         (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete):
1379         * UIProcess/TiledDrawingAreaProxy.h:
1380         * UIProcess/TiledDrawingAreaTile.h:
1381         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
1382         (WebKit::TiledDrawingAreaProxy::snapshotTaken):
1383         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
1384         (WebKit::TiledDrawingAreaTile::incorporateUpdate):
1385         * WebKit2.pro:
1386         * WebProcess/WebPage/TiledDrawingArea.cpp:
1387         (WebKit::TiledDrawingArea::updateTile):
1388         (WebKit::TiledDrawingArea::didReceiveMessage):
1389         * WebProcess/WebPage/TiledDrawingArea.h:
1390         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
1391         (WebKit::TiledDrawingArea::paintIntoBitmap):
1392
1393 2011-05-24  Brady Eidson  <beidson@apple.com>
1394
1395         Build fix after r87153
1396
1397         * WebProcess/mac/SecItemShimMethods.mm: Don't compile this code on SnowLeopard.
1398
1399 2011-05-23  Brady Eidson  <beidson@apple.com>
1400
1401         Reviewed by Sam Weinig.
1402
1403         Part of <rdar://problem/9434311> and https://bugs.webkit.org/show_bug.cgi?id=61334
1404         Should shim a few SecKeychainItem* methods on SnowLeopard
1405
1406         In preparation for different WebProcess shims depending on platform, move the current
1407         shim to its own files.
1408         
1409         * WebKit2.xcodeproj/project.pbxproj:
1410         
1411         * WebProcess/mac/WebProcessMac.mm:
1412         (WebKit::WebProcess::initializeShim): For non-SnowLeopard platforms, call initializeSecItemShim().
1413         
1414         * WebProcess/mac/SecItemShimMethods.h: Added.
1415         * WebProcess/mac/SecItemShimMethods.mm: Added. Actual webSecItem* methods moved from WebProcessMac.mm.
1416         (WebKit::webSecItemCopyMatchingMainThread):
1417         (WebKit::webSecItemCopyMatching):
1418         (WebKit::webSecItemAddOnMainThread):
1419         (WebKit::webSecItemAdd):
1420         (WebKit::webSecItemUpdateOnMainThread):
1421         (WebKit::webSecItemUpdate):
1422         (WebKit::webSecItemDeleteOnMainThread):
1423         (WebKit::webSecItemDelete):
1424         (WebKit::initializeSecItemShim): Initialize the callbacks via WebKitWebProcessSecItemShimInitialize
1425
1426         * WebProcess/mac/WebProcessShim.h:
1427         * WebProcess/mac/WebProcessShim.mm: Wrap all the actual code here in a !BUILDING_ON_SNOW_LEOPARD block
1428         (WebKit::shimSecItemCopyMatching):
1429         (WebKit::shimSecItemAdd):
1430         (WebKit::shimSecItemUpdate):
1431         (WebKit::shimSecItemDelete):
1432         (WebKit::WebKitWebProcessSecItemShimInitialize):
1433
1434 2011-05-23  Anders Carlsson  <andersca@apple.com>
1435
1436         Reviewed by Sam Weinig.
1437
1438         Cap painting to 30fps on Windows
1439         https://bugs.webkit.org/show_bug.cgi?id=61337
1440         <rdar://problem/9213388>
1441
1442         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1443         (WebKit::DrawingAreaImpl::displayTimerFired):
1444
1445 2011-05-23  Jeremy Noble  <jer.noble@apple.com>
1446
1447         Reviewed by Darin Adler.
1448
1449         REGRESSION (r86990:86992): World leak when all windows closed
1450         https://bugs.webkit.org/show_bug.cgi?id=61311
1451
1452         Three interlocking problems:
1453         
1454         1) Calling [WKView fullScreenController] will create the controller if it doesn't all ready
1455         exist, so move the closing code into WKView, where we can bail early if there isn't a 
1456         controller.
1457         
1458         2) A retain-cycle exists between WKView and WKFullScreenWindowController.  Make sure to break
1459         the cycle explicitly by clearing the _fullScreenWindowController ivar when closing the
1460         controller.
1461         
1462         3) [NSWindowController close] was overridden without calling [super close].  Do that.
1463
1464         * UIProcess/API/mac/WKView.mm:
1465         (-[WKView closeFullScreenWindowController]): Moved here from WebFullScreenManagerProxyMac.mm.
1466         * UIProcess/API/mac/WKViewInternal.h:
1467         * UIProcess/mac/WKFullScreenWindowController.mm:
1468         (-[WKFullScreenWindowController close]): Call [super close].
1469         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
1470         (WebKit::WebFullScreenManagerProxy::invalidate):
1471
1472 2011-05-20  Jer Noble  <jer.noble@apple.com>
1473
1474         Reviewed by Darin Adler.
1475
1476         Video looks squished when animating to full screen.
1477         https://bugs.webkit.org/show_bug.cgi?id=61220
1478
1479         Instead of scaling between the client sizes of the full-screen element before and after 
1480         entering full-screen, scale between their content boxes.  The difference is that the client
1481         sizes can have different aspect ratios, and thus the animation can end up "squishing" the
1482         content at one end of the animation.  When animating between the two content box sizes, their
1483         aspect ratios (for the case of video) are equal, so the animation will appear to scale 
1484         smoothly between the two states without "squishing" the content.
1485
1486         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1487         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Set the destination frame
1488             to be the content box of the current full screen element.
1489         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
1490
1491 2011-05-23  Sam Weinig  <sam@webkit.org>
1492
1493         Reviewed by Darin Adler.
1494
1495         Terminating a WebProcess should work even while a page is being closed
1496         <rdar://problem/8934632>
1497         https://bugs.webkit.org/show_bug.cgi?id=61299
1498
1499         * UIProcess/WebPageProxy.cpp:
1500         (WebKit::WebPageProxy::terminateProcess):
1501         Change validity check to only check for process validity, since terminating the process of a page that
1502         is closed or is closing is acceptable behavior.
1503
1504 2011-05-23  Jessie Berlin  <jberlin@apple.com>
1505
1506         Reviewed by Darin Adler.
1507
1508         [Windows] Initial Cookie Accept Policy not set on Deserialized Storage Session.
1509         https://bugs.webkit.org/show_bug.cgi?id=61255
1510
1511         * WebProcess/win/WebProcessWin.cpp:
1512         (WebKit::WebProcess::platformInitializeWebProcess):
1513         Move the code to set the cookie policy before the early return that is taken when using the
1514         default storage session from the UI Process.
1515         Also, remove unnecessary #ifdefs (USE(CFURLSTORAGESESSIONS) is true if USE(CFNETWORK) is
1516         true) and add a comment explaining the early return.
1517
1518 2011-05-23  Qi Zhang  <qi.2.zhang@nokia.com>
1519
1520         Reviewed by Darin Adler.
1521
1522         WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
1523         https://bugs.webkit.org/show_bug.cgi?id=42669
1524
1525         Implement setJavaScriptCanAccessClipboard in WebKitTestRunner.
1526
1527         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1528         (WKBundleSetJavaScriptCanAccessClipboard):
1529         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1530         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1531         (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard):
1532         * WebProcess/InjectedBundle/InjectedBundle.h:
1533
1534 2011-05-23  Csaba Osztrogonác  <ossy@webkit.org>
1535
1536         [Qt][WK2] Unreviewed trivial fix after r86990.
1537
1538         * WebKit2.pro: Remove UIProcess/ChunkedUpdateDrawingAreaProxy.h.
1539
1540 2011-05-23  Carlos Garcia Campos  <cgarcia@igalia.com>
1541
1542         Unreviewed. Fix WebKit2 GTK build after r86990.
1543
1544         * GNUmakefile.am: Remove UpdateChunk.cpp and UpdateChunk.h.
1545
1546 2011-05-21  John Sullivan  <sullivan@apple.com>
1547
1548         Reviewed by Darin Adler.
1549
1550         https://bugs.webkit.org/show_bug.cgi?id=61244
1551         <rdar://problem/9482856>
1552         Undo operations for a web page linger after page is destroyed
1553
1554         * UIProcess/WebPageProxy.cpp:
1555         (WebKit::WebPageProxy::closePage):
1556         Clear editing commands before telling UI client to close the page (this must be done
1557         while the page is still in a window so its undo manager can be accessed, so waiting
1558         for WebPageProxy::close() is too late).
1559
1560 2011-05-22  Jeff Miller  <jeffm@apple.com>
1561
1562         Reviewed by Darin Adler.
1563
1564         Don't call WebKit::initializeLogChannelsIfNecessary if logging is disabled
1565         https://bugs.webkit.org/show_bug.cgi?id=61249
1566
1567         * UIProcess/WebContext.cpp:
1568         (WebKit::WebContext::WebContext): Check #if !LOG_DISABLED, not #ifndef NDEBUG, to decide whether to call WebKit::initializeLogChannelsIfNecessary().
1569
1570 2011-05-21  Nancy Piedra  <nancy.piedra@nokia.com>
1571
1572         Reviewed by Andreas Kling.
1573
1574         [Qt][Symbian] WKStringCopyQString function is not exported
1575         https://bugs.webkit.org/show_bug.cgi?id=59285
1576
1577         A few functions were declared twice but without the export macro.
1578         On Symbian, the linking failed when trying to reference these functions.
1579
1580         * UIProcess/API/qt/qgraphicswkview.h:
1581
1582 2011-05-21  Jeremy Noble  <jer.noble@apple.com>
1583
1584         Reviewed by Eric Carlson.
1585
1586         WebKit2: fix failing fullscreen/full-screen-remove* tests.
1587         https://bugs.webkit.org/show_bug.cgi?id=61027
1588
1589         * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp:
1590         (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Call the 
1591             exit functions (was calling the enter functions).
1592
1593 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
1594
1595         Reviewed by Mark Rowe.
1596
1597         Crash in WebFullScreenManager::didExitFullScreen when closing a window in Safari.
1598         https://bugs.webkit.org/show_bug.cgi?id=61228
1599
1600         Do not attempt to exit full screen if we aren't in full screen to begin with, as the WebProcess
1601         won't be expecting will/didExitFullScreen notifications.
1602
1603         * UIProcess/mac/WKFullScreenWindowController.mm:
1604         (-[WKFullScreenWindowController close]):
1605
1606 2011-05-20  Andy Estes  <aestes@apple.com>
1607
1608         Reviewed by Darin Adler.
1609
1610         WebView loses firstResponder status when entering full-screen mode.
1611         https://bugs.webkit.org/show_bug.cgi?id=61153
1612
1613         * UIProcess/mac/WKFullScreenWindowController.mm:
1614         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): If
1615         the WebView was a descendant of the browser window's first responder
1616         when entering full-screen mode, set the full-screen window's first
1617         responder to that same NSResponder.
1618         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Do the
1619         reverse of what is done in finishedEnterFullScreenAnimation:.
1620
1621 2011-05-20  Jeremy Noble  <jer.noble@apple.com>
1622
1623         Reviewed by Maciej Stachowiak.
1624
1625         WebKit2: Exit full screen mode if the WebProcess crashes.
1626         https://bugs.webkit.org/show_bug.cgi?id=61151
1627
1628         If the WebProcess crashes, exit full-screen mode to avoid getting stuck.  Move the
1629         WebFullScreenManagerProxy::invalidate() implementation into the platform-specific
1630         files, and have them close their respective platform's full-screen window.
1631
1632         * UIProcess/WebFullScreenManagerProxy.cpp:
1633         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp:
1634         (WebKit::WebFullScreenManagerProxy::invalidate): Added. Copied from main implementation.
1635         * UIProcess/mac/WKFullScreenWindowController.h:
1636         * UIProcess/mac/WKFullScreenWindowController.mm:
1637         (-[WKFullScreenWindowController close]): Added.
1638         * UIProcess/mac/WebFullScreenManagerProxyMac.mm:
1639         (WebKit::WebFullScreenManagerProxy::invalidate): Added. 
1640         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
1641         (WebKit::WebFullScreenManagerProxy::invalidate): Added.
1642
1643 2011-05-20  Anders Carlsson  <andersca@apple.com>
1644
1645         Reviewed by Dan Bernstein.
1646
1647         Remove the chunked update drawing area
1648         https://bugs.webkit.org/show_bug.cgi?id=61216
1649
1650         The chunked update drawing area is no longer used in any port, so remove all traces of it.
1651
1652         Qt still uses UpdateChunks for the tiled drawing area so keep the Shared/qt/UpdateChunk.* classes for now.
1653
1654         * GNUmakefile.am:
1655         * Shared/DrawingAreaInfo.h:
1656         * Shared/gtk/UpdateChunk.cpp: Removed.
1657         * Shared/gtk/UpdateChunk.h: Removed.
1658         * Shared/mac/UpdateChunk.cpp: Removed.
1659         * Shared/mac/UpdateChunk.h: Removed.
1660         * Shared/win/UpdateChunk.cpp: Removed.
1661         * Shared/win/UpdateChunk.h: Removed.
1662         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: Removed.
1663         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed.
1664         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Removed.
1665         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: Removed.
1666         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Removed.
1667         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: Removed.
1668         * UIProcess/win/WebView.cpp:
1669         (WebKit::WebView::paint):
1670         (WebKit::WebView::createDrawingAreaProxy):
1671         (WebKit::WebView::enterAcceleratedCompositingMode):
1672         (WebKit::WebView::exitAcceleratedCompositingMode):
1673         * WebKit2.pro:
1674         * WebKit2.xcodeproj/project.pbxproj:
1675         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: Removed.
1676         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: Removed.
1677         * WebProcess/WebPage/DrawingArea.cpp:
1678         (WebKit::DrawingArea::create):
1679         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: Removed.
1680         * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Removed.
1681         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp: Removed.
1682         * win/WebKit2.vcproj:
1683
1684 2011-05-20  Matthew Delaney  <mdelaney@apple.com>
1685
1686         Reviewed by Steve Falkenburg.
1687
1688         Default min DOM Timer interval is not set soon enough for first page to pick it up in WK2
1689         https://bugs.webkit.org/show_bug.cgi?id=61215 
1690
1691         * WebProcess/WebPage/WebPage.cpp: Simply moving the DOM min timer interval setting to before the first page creation.
1692
1693 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
1694
1695         Reviewed by Sam Weinig.
1696
1697         numberOfActiveAnimations() can include animations from documents in the page cache
1698         https://bugs.webkit.org/show_bug.cgi?id=53641
1699
1700         Pass the Frame's document as the one to count animations on.
1701
1702         * WebProcess/WebPage/WebFrame.cpp:
1703         (WebKit::WebFrame::numberOfActiveAnimations):
1704
1705 2011-05-20  Simon Fraser  <simon.fraser@apple.com>
1706
1707         Reviewed by Sam Weinig.
1708
1709         WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId
1710         https://bugs.webkit.org/show_bug.cgi?id=42550
1711         
1712         Plumb through methods to pause a transition of a given property on an element.
1713
1714         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1715         (WKBundleFramePauseAnimationOnElementWithId):
1716         (WKBundleFramePauseTransitionOnElementWithId):
1717         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1718         * WebProcess/WebPage/WebFrame.cpp:
1719         (WebKit::WebFrame::pauseTransitionOnElementWithId):
1720         * WebProcess/WebPage/WebFrame.h:
1721
1722 2011-05-20  Sam Weinig  <sam@webkit.org>
1723
1724         Reviewed by Anders Carlsson.
1725
1726         WebKit2: Media files cannot be saved in the Application Cache due to a sandbox violation
1727         https://bugs.webkit.org/show_bug.cgi?id=61199
1728
1729         Instead of using a sandbox extension to give permission to the application cache directory,
1730         initialize the sandbox with access to it like we do for other databases.
1731
1732         * Shared/WebProcessCreationParameters.cpp:
1733         (WebKit::WebProcessCreationParameters::encode):
1734         (WebKit::WebProcessCreationParameters::decode):
1735         * Shared/WebProcessCreationParameters.h:
1736         * UIProcess/WebContext.cpp:
1737         (WebKit::WebContext::ensureWebProcess):
1738         * WebProcess/WebProcess.cpp:
1739         (WebKit::WebProcess::initializeWebProcess):
1740         * WebProcess/com.apple.WebProcess.sb:
1741         * WebProcess/mac/WebProcessMac.mm:
1742         (WebKit::initializeSandbox):
1743
1744 2011-05-20  Jer Noble  <jer.noble@apple.com>
1745
1746         Reviewed by Maciej Stachowiak.
1747
1748         Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
1749         https://bugs.webkit.org/show_bug.cgi?id=61108
1750
1751         When the fullScreenController asks us to repaint, make an async repaint request, and when the
1752         callback is fired, notify the fullScreenController that repaint has completed.
1753
1754         * UIProcess/win/WebView.cpp:
1755         (WebKit::fullScreenClientForceRepaintCompleted): Added.
1756         (WebKit::WebView::fullScreenClientForceRepaint): Added.
1757         * UIProcess/win/WebView.h:
1758
1759 2011-05-19  Adam Roben  <aroben@apple.com>
1760
1761         Don't try to process DownloadProxy messages twice (and robustify code that runs if we do)
1762
1763         Fixes <http://webkit.org/b/61142> <rdar://problem/9471680> REGRESSION (r86812): Crash
1764         (preceded by assertion) in fastMalloc when downloading a file
1765
1766         Reviewed by Darin Adler.
1767
1768         * Platform/CoreIPC/ArgumentDecoder.cpp:
1769         (CoreIPC::alignedBufferIsLargeEnoughToContain): Added. This helper function checks that the
1770         given buffer is large enough to hold |size| bytes (and correctly handles the case where
1771         we're already at the end or beyond the end of the buffer).
1772
1773         (CoreIPC::ArgumentDecoder::alignBufferPosition):
1774         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain):
1775         Replaced old code that was vulnerable to underflow with the new helper function.
1776
1777         * UIProcess/WebProcessProxy.cpp:
1778         (WebKit::WebProcessProxy::didReceiveSyncMessage): Added back an early return that was
1779         mistakenly removed in r86812 so that we don't mistakenly pass DownloadProxy messages on to
1780         a WebPageProxy after we've already handled them.
1781
1782 2011-05-19  Jer Noble  <jer.noble@apple.com>
1783
1784         Reviewed by Maciej Stachowiak.
1785
1786         WebKit2: Flashing when entering and exiting full screen mode
1787         https://bugs.webkit.org/show_bug.cgi?id=56957
1788
1789         In the WKFullscreenWindowController, when exiting accelerated compositing mode, 
1790         force a repaint, and don't actually remove the animation layer until the repaint
1791         completes.  Also, move back to parenting the WebView in a layer-backed view, and
1792         work around the SnowLeopard bug which causes a crash in those situations.  We no
1793         longer need to do a bunch of work in finishedEnterFullScreenAnimation, because 
1794         the animation layer is "hiding" all the drawing happening in the webView underneath.
1795
1796         In the WebFullScreenManagerMac, when asked to tear down the root layer, instead
1797         remove all its children, and set its contents to a flattened image of the full
1798         screen element and its children.  This helps patch over the time where everything 
1799         is re-rendering and helps give the appearance of continuousness in the animation.
1800
1801         * UIProcess/mac/WKFullScreenWindowController.mm:
1802         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
1803         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
1804         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]):
1805         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]):
1806         (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]):
1807         (exitCompositedModeRepaintCompleted):
1808         (-[WKFullScreenWindowController _page]):
1809         (-[WKFullScreenWindowController _manager]):
1810         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]):
1811         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1812         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
1813
1814 2011-05-19  Anders Carlsson  <andersca@apple.com>
1815
1816         Address a review comment by Sam Weinig.
1817
1818         * UIProcess/WebContext.cpp:
1819         (WebKit::WebContext::didUpdateHistoryTitle):
1820
1821 2011-05-19  Anders Carlsson  <andersca@apple.com>
1822
1823         Reviewed by Sam Weinig.
1824
1825         Hang UI appears when WebProcess isn't running
1826         https://bugs.webkit.org/show_bug.cgi?id=61147
1827         <rdar://problem/9413683>
1828
1829         This fixes two bugs:
1830
1831         1. The HistoryClient related message handlers in WebContext could get invoked for pages that have been closed,
1832            and thus didn't have any subframes. Since we have a MESSAGE_CHECK that checks that the frame exists, we'd
1833            mark the currently dispatched message as invalid, which would end up calling Connection::Client::didReceiveInvalidMessage.
1834            Fix this by checking that the page exists first.
1835
1836         2. In the call to WebProcessProxy::didReceiveInvalidMessage we'd first invalidate the CoreIPC connection to make sure 
1837            that we won't get any further messages from this connection. We'd then go ahead and terminate the web process, 
1838            but because we've already invalidated the CoreIPC connection we would never get the Connection::Client::didClose
1839            callback that would call WebPageProxy::processDidCrash. Fix this by explicitly calling WebProcessProxy::didClose.
1840            Also, add logging when we receive an invalid message
1841
1842         * UIProcess/WebContext.cpp:
1843         (WebKit::WebContext::didNavigateWithNavigationData):
1844         (WebKit::WebContext::didPerformClientRedirect):
1845         (WebKit::WebContext::didPerformServerRedirect):
1846         (WebKit::WebContext::didUpdateHistoryTitle):
1847         * UIProcess/WebProcessProxy.cpp:
1848         (WebKit::WebProcessProxy::didReceiveInvalidMessage):
1849
1850 2011-05-19  Brian Weinstein  <bweinstein@apple.com>
1851
1852         Reviewed by Adam Roben.
1853
1854         Crash when detaching Web Inspector when parent is in process of closing.
1855         https://bugs.webkit.org/show_bug.cgi?id=61141
1856         <rdar://problem/9470027>
1857         
1858         We were trying to send a WM_SIZE to a window that was in the process of closing. Switch
1859         to using PostMessage, so the window will finish closing, and then it won't need to
1860         process the WM_SIZE message anymore.
1861
1862         * UIProcess/win/WebInspectorProxyWin.cpp:
1863         (WebKit::WebInspectorProxy::platformAttach): Call PostMessage instead of SendMessage.
1864         (WebKit::WebInspectorProxy::platformDetach): Ditto.
1865
1866 2011-05-19  Robert Hogan  <robert@webkit.org>
1867
1868         Reviewed by Andreas Kling.
1869
1870         [Qt] Fix plugins/windowless_plugin_paint_test.html
1871
1872         Call gdk_init_check before gdk_display_get_default().
1873         If we don't do this, gdk_display_get_default() will hang
1874         the next time it's called.
1875
1876         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
1877         (WebKit::getPluginDisplay):
1878
1879 2011-05-18  Chris Marrin  <cmarrin@apple.com>
1880
1881         Reviewed by Anders Carlsson.
1882
1883         Plug-ins at YouTube, cnn.com, nytimes vanish when their top/left is scrolled out of view when zoomed
1884         https://bugs.webkit.org/show_bug.cgi?id=61101
1885
1886         Scale both bounding boxes sent to m_plugin->geometryDidChange(), not just the frameRect. This fools
1887         the plugin into thinking it is drawing into an unscaled box with an unscaled view even when scaled.
1888
1889         * WebProcess/Plugins/PluginView.cpp:
1890         (WebKit::PluginView::frame):Made this const so it can be used in clipRectInWindowCoordinates()
1891         (WebKit::PluginView::viewGeometryDidChange):Used IntRect::scale() rather than scaling by hand
1892         (WebKit::PluginView::clipRectInWindowCoordinates):Added scale of clipRect.
1893         * WebProcess/Plugins/PluginView.h:
1894
1895 2011-05-19  Carlos Garcia Campos  <cgarcia@igalia.com>
1896
1897         Reviewed by Anders Carlsson.
1898
1899         Fix build with ENABLE_PLUGIN_PROCESS=1 for non-mac platforms after r86578
1900         https://bugs.webkit.org/show_bug.cgi?id=61113
1901
1902         * PluginProcess/PluginControllerProxy.cpp:
1903         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
1904         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
1905
1906 2011-05-19  Philippe Normand  <pnormand@igalia.com>
1907
1908         Unreviewed, follow-up fix of the messages python unittests after r86812.
1909
1910         [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
1911         https://bugs.webkit.org/show_bug.cgi?id=60872
1912
1913         * Scripts/webkit2/messages_unittest.py:
1914
1915 2011-05-18  Brady Eidson  <beidson@apple.com>
1916
1917         As originally reviewed by Anders Carlsson.
1918
1919         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
1920         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
1921
1922         Restore r86797 to how it was supposed to be using the appropriate #ifdef,
1923         reverting the temporary r86814 in the process.
1924
1925         The #ifdef is BUILDING_ON_SNOW_LEOPARD, not BUILDING_ON_SNOWLEOPARD!
1926         
1927         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1928         (WebKit::ProcessLauncher::launchProcess):
1929         * WebProcess/mac/WebProcessMainMac.mm:
1930         (WebKit::WebProcessMain):
1931
1932 2011-05-18  Brady Eidson  <beidson@apple.com>
1933
1934         Fix the WK2 SnowLeopard layouttests (again) until I can explore on a SnowLeopard machine tomorrow.
1935
1936         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1937         (WebKit::ProcessLauncher::launchProcess):
1938         * WebProcess/mac/WebProcessMainMac.mm:
1939         (WebKit::WebProcessMain):
1940
1941 2011-05-18  Darin Adler  <darin@apple.com>
1942
1943         Reviewed by Anders Carlsson.
1944
1945         [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails
1946         https://bugs.webkit.org/show_bug.cgi?id=60872
1947
1948         Eliminate the concept of SyncReplyMode and instead hand around ownership
1949         of the reply decoder using an OwnPtr.
1950
1951         * Platform/CoreIPC/Connection.cpp:
1952         (CoreIPC::Connection::dispatchSyncMessage): Eliminated comments that say
1953         the same things the code itself does. Removed code that handles the
1954         reply mode. Instead, pass the OwnPtr to the message handling function and
1955         make the call to sendSyncReply conditional on whether the reply encoder
1956         is still non-null.
1957
1958         * Platform/CoreIPC/Connection.h: Removed SyncReplyMode. Made
1959         didReceiveSyncMessage return void, and take OwnPtr<ArgumentEncoder>& for
1960         the reply encoder.
1961
1962         * Platform/CoreIPC/HandleMessage.h:
1963         (CoreIPC::handleMessageDelayed): Take an OwnPtr&. Replaced the call to
1964         adoptPtr with a call to release.
1965
1966         * PluginProcess/PluginControllerProxy.h: Updated to take an OwnPtr& and
1967         not return SyncReplyMode.
1968         * PluginProcess/WebProcessConnection.cpp:
1969         (WebKit::WebProcessConnection::didReceiveSyncMessage): Ditto.
1970         * PluginProcess/WebProcessConnection.h: Ditto.
1971
1972         * Scripts/webkit2/messages.py: Updated for changes to sync messages.
1973         Eliminated unneeded return types and use get() when apporopriate to call
1974         the handleMessage functions.
1975
1976         * Scripts/webkit2/messages_unittest.py: Tried to update this too.
1977         I don't know how to run the test, though.
1978
1979         * Shared/Plugins/NPObjectMessageReceiver.h: Updated to take an OwnPtr& and
1980         not return SyncReplyMode.
1981         * Shared/Plugins/NPRemoteObjectMap.cpp:
1982         (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): Ditto.
1983         * Shared/Plugins/NPRemoteObjectMap.h: Ditto.
1984         * UIProcess/Downloads/DownloadProxy.h: Ditto.
1985         * UIProcess/WebContext.cpp:
1986         (WebKit::WebContext::didReceiveSyncMessage): Ditto.
1987         * UIProcess/WebContext.h: Ditto.
1988         * UIProcess/WebFullScreenManagerProxy.cpp:
1989         (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): Ditto.
1990         * UIProcess/WebFullScreenManagerProxy.h: Ditto.
1991         * UIProcess/WebIconDatabase.cpp:
1992         (WebKit::WebIconDatabase::didReceiveSyncMessage): Ditto.
1993         * UIProcess/WebIconDatabase.h: Ditto.
1994         * UIProcess/WebInspectorProxy.h: Ditto.
1995         * UIProcess/WebPageProxy.cpp:
1996         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
1997         * UIProcess/WebPageProxy.h: Ditto.
1998         * UIProcess/WebProcessProxy.cpp:
1999         (WebKit::WebProcessProxy::didReceiveSyncMessage): Ditto.
2000         * UIProcess/WebProcessProxy.h: Ditto.
2001
2002         * WebProcess/Plugins/Netscape/JSNPObject.cpp: Added a missing include.
2003
2004         * WebProcess/Plugins/PluginProcessConnection.cpp:
2005         (WebKit::PluginProcessConnection::didReceiveSyncMessage): Updated to take
2006         an OwnPtr& and not return SyncReplyMode.
2007         * WebProcess/Plugins/PluginProcessConnection.h: Ditto.
2008         * WebProcess/Plugins/PluginProxy.h: Ditto.
2009         * WebProcess/WebPage/WebPage.cpp:
2010         (WebKit::WebPage::didReceiveSyncMessage): Ditto.
2011         * WebProcess/WebPage/WebPage.h: Ditto.
2012         * WebProcess/WebProcess.cpp:
2013         (WebKit::WebProcess::didReceiveSyncMessage): Ditto.
2014         * WebProcess/WebProcess.h: Ditto.
2015
2016 2011-05-18  Chris Fleizach  <cfleizach@apple.com>
2017
2018         Reviewed by Maciej Stachowiak.
2019
2020         WK2: VoiceOver cannot move focus into a web area programmatically
2021         https://bugs.webkit.org/show_bug.cgi?id=60661
2022
2023         Add a makeFirstResponder method that will bring focus to the widget view within the UI
2024         process.
2025
2026         * UIProcess/API/mac/PageClientImpl.h:
2027         * UIProcess/API/mac/PageClientImpl.mm:
2028         (WebKit::PageClientImpl::makeFirstResponder):
2029         * UIProcess/PageClient.h:
2030         * UIProcess/WebPageProxy.h:
2031         * UIProcess/WebPageProxy.messages.in:
2032         * UIProcess/mac/WebPageProxyMac.mm:
2033         (WebKit::WebPageProxy::makeFirstResponder):
2034         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2035         (WebKit::WebChromeClient::makeFirstResponder):
2036         * WebProcess/WebCoreSupport/WebChromeClient.h:
2037
2038 2011-05-18  Brady Eidson  <beidson@apple.com>
2039
2040         Reviewed by Anders Carlsson.
2041
2042         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
2043         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
2044
2045         * Platform/unix/EnvironmentUtilities.cpp: Remove an unnecessary #include, as reviewed.
2046
2047 2011-05-17  Timothy Hatcher  <timothy@apple.com>
2048
2049         Update the the context menu to reflect the system search provider on Mac.
2050
2051         <rdar://problem/9198419>
2052
2053         Reviewed by Sam Weinig.
2054
2055         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2056         (WebKit::WebContextMenuClient::searchWithGoogle): Add a FIXME about using NSPerformService on Mac.
2057         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2058         (InitWebCoreSystemInterface): Added CopyDefaultSearchProviderDisplayName.
2059
2060 2011-05-18  Brady Eidson  <beidson@apple.com>
2061
2062         Reviewed by Anders Carlsson.
2063
2064         <rdar://problem/9457633> and https://bugs.webkit.org/show_bug.cgi?id=61009
2065         Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims.
2066
2067         If the WebProcess or PluginProcess forks, it shouldn't pass WebKit2 shims along to the new process
2068         in the DYLD_INSERT_LIBRARIES environment variable.
2069
2070         Add Environment Utilities helper to strip unwanted values from an environment variable:
2071         * Platform/unix/EnvironmentUtilities.cpp: Added.
2072         (WebKit::EnvironmentUtilities::stripValuesEndingWithString):
2073         * Platform/unix/EnvironmentUtilities.h: Added.
2074         * WebKit2.xcodeproj/project.pbxproj:
2075
2076         Strip PluginProcessShim.dylib from DYLD_INSERT_LIBRARIES:
2077         * PluginProcess/mac/PluginProcessMainMac.mm:
2078         (WebKit::PluginProcessMain):
2079
2080         Strip WebProcessShim.dylib from DYLD_INSERT_LIBRARIES:
2081         * WebProcess/mac/WebProcessMainMac.mm:
2082         (WebKit::WebProcessMain):
2083
2084         Unprotect SnowLeopard now that it will behave and not spawn processes trying to use WebKit2 shims:
2085         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2086         (WebKit::ProcessLauncher::launchProcess):
2087
2088 2011-05-18  Jon Lee  <jonlee@apple.com>
2089
2090         Reviewed by Simon Fraser.
2091
2092         Crash in injected bundle client
2093         https://bugs.webkit.org/show_bug.cgi?id=61086
2094
2095         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2096         (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection): Check for existence of method in client prior to calling.
2097
2098 2011-05-18  Andreas Kling  <kling@webkit.org>
2099
2100         Reviewed by Kenneth Rohde Christiansen.
2101
2102         [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
2103         https://bugs.webkit.org/show_bug.cgi?id=60901
2104
2105         To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
2106         make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
2107
2108         * UIProcess/API/qt/qgraphicswkview.cpp:
2109         * UIProcess/API/qt/qgraphicswkview.h:
2110         * UIProcess/API/qt/qwkpage.cpp:
2111         (QWKPagePrivate::createDrawingAreaProxy):
2112
2113 2011-05-18  Andreas Kling  <kling@webkit.org>
2114
2115         Reviewed by Kenneth Rohde Christiansen.
2116
2117         [Qt][WK2] Don't lie about supporting accelerated compositing.
2118         https://bugs.webkit.org/show_bug.cgi?id=61054
2119
2120         Until we have an implementation of LayerTreeHost, we shouldn't lie about it.
2121
2122         * WebKit2.pro:
2123         * WebProcess/WebPage/LayerTreeHost.h:
2124         * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: Added.
2125         (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
2126
2127 2011-05-17  Jeremy Noble  <jer.noble@apple.com>
2128
2129         Reviewed by Darin Adler.
2130
2131         Exiting full screen will leave up invisible full-screen window, blocking all mouse clicks.
2132         https://bugs.webkit.org/show_bug.cgi?id=60982
2133
2134         The GraphicsLayer tree has unparented m_fullScreenRootLayer behind our backs, replacing the 
2135         tiled layer with a normal one.  Instead of holding on to a specific layer, assume that the 
2136         w_rootLayer will only have 0 or 1 children, and if a child is present, then that is our full-
2137         screen layer.
2138
2139         Additionally, check to see if the animating layer's presentationLayer is nil
2140         before calling it; asking a nil object for a CATransform3D will give back a struct full of 
2141         garbage.
2142
2143         In WKFullScreenWindowController, when the exit animation completes, ignore the "completed"
2144         parameter.  This eliminates the possibility that the full screen window will end up left
2145         on top of the screen if the animation is cancelled and a enter full screen animation isn't
2146         forthcoming.
2147
2148         * UIProcess/mac/WKFullScreenWindowController.mm:
2149         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2150         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
2151         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2152         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
2153         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
2154         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
2155
2156 2011-05-17  Dan Bernstein  <mitz@apple.com>
2157
2158         Reviewed by Alice Liu.
2159
2160         <rdar://problem/9458300> REGRESSION (r86724): Repro crash loading any webpage in WebKit2 on SnowLeopard
2161         https://bugs.webkit.org/show_bug.cgi?id=61022
2162
2163         * WebProcess/mac/WebProcessMainMac.mm:
2164         (WebKit::WebProcessMain): As long as we are not loading the shim on Snow Leopard, we should not
2165         try to initialize it.
2166
2167 2011-05-17  Brady Eidson  <beidson@apple.com>
2168
2169         Rubberstamped by Sam Weinig.
2170
2171         https://bugs.webkit.org/show_bug.cgi?id=60595
2172         Fix the rampant WebProcess crashing because we're trying to install the WebProcess shim
2173         into QTKitServer when we launch it.
2174
2175         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2176         (WebKit::ProcessLauncher::launchProcess): This is only happening on SnowLeopard, so put
2177           SnowLeopard build guards around the shim install path.
2178
2179 2011-05-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2180
2181         Unreviewed, rolling out r86668.
2182         http://trac.webkit.org/changeset/86668
2183         https://bugs.webkit.org/show_bug.cgi?id=61001
2184
2185         It made 52 tests crash on Qt WK2 bot (Requested by Ossy on
2186         #webkit).
2187
2188         * UIProcess/API/qt/qgraphicswkview.cpp:
2189         * UIProcess/API/qt/qgraphicswkview.h:
2190         * UIProcess/API/qt/qwkpage.cpp:
2191         (QWKPagePrivate::createDrawingAreaProxy):
2192
2193 2011-05-17  Brian Weinstein  <bweinstein@apple.com>
2194
2195         Build fix after r86717.
2196
2197         * UIProcess/API/C/win/WKView.h: Add a forward declaration of IDropTarget
2198
2199 2011-05-17  Brian Weinstein  <bweinstein@apple.com>
2200
2201         Reviewed by Adam Roben.
2202
2203         WebKit2: Needs API to set a custom drop target
2204         https://bugs.webkit.org/show_bug.cgi?id=60991
2205         <rdar://problem/9090868>
2206         
2207         Add API to set a custom drop target on a WKView.
2208
2209         * UIProcess/API/C/win/WKView.cpp:
2210         (WKViewSetCustomDropTarget): Call through to WebView::setCustomDropTarget.
2211         * UIProcess/API/C/win/WKView.h:
2212         * UIProcess/win/WebView.cpp:
2213         (WebKit::WebView::setCustomDropTarget): Revoke the current drop target, and register the
2214             custom one.
2215         * UIProcess/win/WebView.h:
2216
2217 2011-05-17  Sam Weinig  <sam@webkit.org>
2218
2219         Reviewed by Dan Bernstein.
2220
2221         Add API to determine if a frame has any form elements without going to javascript
2222         https://bugs.webkit.org/show_bug.cgi?id=60999
2223
2224         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2225         (WKBundleFrameContainsAnyFormElements):
2226         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2227         * WebProcess/WebPage/WebFrame.cpp:
2228         (WebKit::WebFrame::containsAnyFormElements):
2229         * WebProcess/WebPage/WebFrame.h:
2230         Add WKBundleFrameContainsAnyFormElements which does a walk of the document to determine
2231         if there are any form elements.
2232
2233 2011-05-17  Andreas Kling  <kling@webkit.org>
2234
2235         Reviewed by Kenneth Rohde Christiansen.
2236
2237         [Qt][WK2] Initial support for favicons.
2238         https://bugs.webkit.org/show_bug.cgi?id=58937
2239
2240         Add the following API to QWKContext:
2241
2242         - void setIconDatabasePath(QString)
2243         - void iconChangedForPageURL(QUrl) [signal]
2244         - QIcon iconForPageURL(QUrl)
2245
2246         This is mostly analogous to the QWebSettings/QWebFrame icon API we had in WebKit1.
2247
2248         * UIProcess/API/qt/ClientImpl.h: Added WKIconDatabaseClient methods.
2249
2250         * UIProcess/API/qt/ClientImpl.cpp:
2251         (toQWKContext): Helper to cast from "void* clientInfo" to a QWKContext*.
2252         (qt_wk_didChangeIconForPageURL): Emits QWKContext::iconChangedForPageURL(QUrl).
2253         (qt_wk_didRemoveAllIcons): Stub.
2254
2255         * UIProcess/API/qt/qwkcontext.h:
2256         * UIProcess/API/qt/qwkcontext_p.h:
2257         * UIProcess/API/qt/qwkcontext.cpp:
2258         (QWKContextPrivate::QWKContextPrivate): Set up and register a WKIconDatabaseClient.
2259         (QWKContext::QWKContext): Minor refactor to avoid code duplication in constructors.
2260         (QWKContext::setIconDatabasePath): Exactly what it sounds like.
2261         (QWKContext::iconForPageURL): Retrieves the favicon for a given page URL as a QIcon.
2262
2263         * WebKit2API.pri: Add WKIconDatabase.cpp and WKIconDatabase.h to build.
2264
2265 2011-05-17  Brady Eidson  <beidson@apple.com>
2266
2267         Reviewed by Anders Carlsson.
2268
2269         Part 4 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
2270         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
2271
2272         This patch actually hooks up the shim to the WebProcess shim callbacks, which messages these
2273         4 calls up to the UIProcess and returns the result.
2274
2275         Note that this patch uncovered the fact that CoreIPC can't sync message out from a secondary thread,
2276         so I filed https://bugs.webkit.org/show_bug.cgi?id=60975 as a followup to allow that.
2277
2278         * Shared/mac/SecItemResponseData.cpp:
2279         (WebKit::SecItemResponseData::SecItemResponseData): Reorder the constructor arguments to be 
2280           a little cleaner.
2281         * Shared/mac/SecItemResponseData.h:
2282
2283         Call the shim callbacks for each method:
2284         * WebProcess/mac/WebProcessShim.mm:
2285         (WebKit::shimSecItemCopyMatching):
2286         (WebKit::shimSecItemAdd):
2287         (WebKit::shimSecItemUpdate):
2288         (WebKit::shimSecItemDelete):
2289
2290         Implement the shim callbacks, which each marshall to the main thread, which then calls out to CoreIPC:
2291         * WebProcess/mac/WebProcessMac.mm:
2292         (WebKit::WebSecItemCopyMatchingMainThread):
2293         (WebKit::WebSecItemCopyMatching):
2294         (WebKit::WebSecItemAddOnMainThread):
2295         (WebKit::WebSecItemAdd):
2296         (WebKit::WebSecItemUpdateOnMainThread):
2297         (WebKit::WebSecItemUpdate):
2298         (WebKit::WebSecItemDeleteOnMainThread):
2299         (WebKit::WebSecItemDelete):
2300
2301         Add the 4 messages and their implementations in the UIProcess:
2302         * UIProcess/WebProcessProxy.h:
2303         * UIProcess/WebProcessProxy.messages.in:
2304         * UIProcess/mac/WebProcessProxyMac.mm: Added.
2305         (WebKit::WebProcessProxy::secItemCopyMatching):
2306         (WebKit::WebProcessProxy::secItemAdd):
2307         (WebKit::WebProcessProxy::secItemUpdate):
2308         (WebKit::WebProcessProxy::secItemDelete):
2309
2310         * WebKit2.xcodeproj/project.pbxproj:
2311
2312 2011-05-17  Anders Carlsson  <andersca@apple.com>
2313
2314         Reviewed by Dan Bernstein.
2315
2316         Incomplete page painting at dropbox.com
2317         https://bugs.webkit.org/show_bug.cgi?id=60974
2318         <rdar://problem/9448213>
2319
2320         When we're exiting compositing mode and haven't sent an EnterAcceleratedCompositingMode
2321         message to the UI process, we still need to send the updated bits to the ui process.
2322         
2323         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2324         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2325
2326 2011-05-17  Brady Eidson  <beidson@apple.com>
2327
2328         Reviewed by Anders Carlsson.
2329
2330         Part 3 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
2331         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
2332
2333         Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back.
2334
2335         Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs:
2336         * Shared/cf/ArgumentCodersCF.cpp:
2337         (CoreIPC::typeFromCFTypeRef):
2338         (CoreIPC::encode):
2339         (CoreIPC::decode):
2340         * Shared/cf/ArgumentCodersCF.h:
2341
2342         Serializable object that contains the query CFDictionaryRef and optionally the 
2343         "attributesToMatch" CFDictionaryRef:
2344         * Shared/mac/SecItemRequestData.cpp: Added.
2345         (WebKit::SecItemRequestData::SecItemRequestData):
2346         (WebKit::SecItemRequestData::encode):
2347         (WebKit::SecItemRequestData::decode):
2348         * Shared/mac/SecItemRequestData.h: Added.
2349         (WebKit::SecItemRequestData::query):
2350         (WebKit::SecItemRequestData::attributesToMatch):
2351
2352         Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef:
2353         * Shared/mac/SecItemResponseData.cpp: Added.
2354         (WebKit::SecItemResponseData::SecItemResponseData):
2355         (WebKit::SecItemResponseData::encode):
2356         (WebKit::SecItemResponseData::decode):
2357         * Shared/mac/SecItemResponseData.h: Added.
2358         (WebKit::SecItemResponseData::resultObject):
2359         (WebKit::SecItemResponseData::resultCode):
2360
2361         * WebKit2.xcodeproj/project.pbxproj:
2362
2363 2011-05-17  Brady Eidson  <beidson@apple.com>
2364
2365         Reviewed by Anders Carlsson.
2366
2367         Part 2 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
2368         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
2369
2370         Hookup some of the methods we plan to shim in the patch, but just have them call through
2371         to the actual implementations for now.
2372
2373         Also stub-out the future shimmed versions of the methods.
2374
2375         * WebProcess/mac/WebProcessShim.h: Add the methods to the shim callbacks.
2376         * WebProcess/mac/WebProcessShim.mm:
2377         (WebKit::shimSecItemCopyMatching): Call through to the actual function for now.
2378         (WebKit::shimSecItemAdd): Ditto.
2379         (WebKit::shimSecItemUpdate): Ditto.
2380         (WebKit::shimSecItemDelete): Ditto.
2381         (WebKit::WebKitWebProcessShimInitialize): Copy over the shim callbacks.
2382         * WebKit2.xcodeproj/project.pbxproj: Link the shim to required frameworks.
2383         
2384         * WebProcess/mac/WebProcessMac.mm:
2385         (WebKit::WebSecItemCopyMatching): Add placeholders for the future to-be-shimmed functions.
2386         (WebKit::WebSecItemAdd): Ditto.
2387         (WebKit::WebSecItemUpdate): Ditto.
2388         (WebKit::WebSecItemDelete): Ditto.
2389         (WebKit::WebProcess::initializeShim): Pass along those placeholders to the shim initializer.
2390
2391 2011-05-17  Brady Eidson  <beidson@apple.com>
2392
2393         Reviewed by Anders Carlsson.
2394
2395         Part 1 of <rdar://problem/8814289> and https://bugs.webkit.org/show_bug.cgi?id=60595
2396         Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess
2397
2398         Add am empty shim for a new WebProcess shim and install it at launch.
2399
2400         Use the same Shim.xcconfig for both the web and plugin processes:
2401         * Configurations/PluginProcessShim.xcconfig: Removed.
2402         * Configurations/Shim.xcconfig: Copied from Configurations/PluginProcessShim.xcconfig.
2403         * WebKit2.xcodeproj/project.pbxproj:
2404
2405         * WebProcess/WebProcess.h: Add initializeShim() for Mac-only
2406         * WebProcess/mac/WebProcessMac.mm:
2407         (WebKit::WebProcess::initializeShim): Initialize the (empty) shim callbacks.
2408
2409         * WebProcess/mac/WebProcessMainMac.mm:
2410         (WebKit::WebProcessMain): Call initializeShim()
2411
2412         * WebProcess/mac/WebProcessShim.h: Added.
2413         * WebProcess/mac/WebProcessShim.mm: Added.
2414         (WebKit::WebKitWebProcessShimInitialize): Empty for now.
2415
2416         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2417         (WebKit::ProcessLauncher::launchProcess): Install the Plugin Process shim for plugin processes
2418           and the WebProcess shim for the web content process.
2419
2420 2011-05-17  John Sullivan  <sullivan@apple.com>
2421
2422         Reviewed by Adam Roben.
2423
2424         Loose end from fix for https://bugs.webkit.org/show_bug.cgi?id=60938
2425
2426         * WebKit2.xcodeproj/project.pbxproj:
2427         Made new header file "private" instead of "project" so clients can access it.
2428
2429 2011-05-17  Andreas Kling  <kling@webkit.org>
2430
2431         Reviewed by Kenneth Rohde Christiansen.
2432
2433         [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea.
2434         https://bugs.webkit.org/show_bug.cgi?id=60901
2435
2436         To prepare for the eventual removal of the ChunkedUpdateDrawingArea,
2437         make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl.
2438
2439         * UIProcess/API/qt/qgraphicswkview.cpp:
2440         * UIProcess/API/qt/qgraphicswkview.h:
2441         * UIProcess/API/qt/qwkpage.cpp:
2442         (QWKPagePrivate::createDrawingAreaProxy):
2443
2444 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
2445
2446         Take another shot at fixing the WinCairo build.
2447
2448         * Shared/cairo/LayerTreeContextCairo.cpp: Include NotImplemented.h using a framework include.
2449
2450 2011-05-16  Sam Weinig  <sam@webkit.org>
2451
2452         Reviewed by Jon Honeycutt.
2453
2454         Add access to process pid in WebKit2 API
2455         https://bugs.webkit.org/show_bug.cgi?id=60938
2456
2457         * UIProcess/API/C/mac/WKPagePrivateMac.cpp: Added.
2458         (WKPageGetProcessIdentifier):
2459         * UIProcess/API/C/mac/WKPagePrivateMac.h: Added.
2460         * UIProcess/WebPageProxy.cpp:
2461         (WebKit::WebPageProxy::processIdentifier):
2462         * UIProcess/WebPageProxy.h:
2463         * WebKit2.xcodeproj/project.pbxproj:
2464         Add WKPageGetProcessIdentifier as SPI for the mac.
2465
2466 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
2467
2468         Add file missing from my previous commit.
2469
2470         * Shared/cairo/LayerTreeContextCairo.cpp: Added.
2471
2472 2011-05-16  Martin Robinson  <martin.james.robinson@gmail.com>
2473
2474         Try to fix the WinCairo build after r86612.
2475
2476         Move the LayerTreeContextGtk.cpp stub to LayerTreeContextCairo.cpp and add
2477         it to the WinCairo build.
2478
2479         * GNUmakefile.am: Update the source list.
2480         * Shared/cairo/LayerTreeContextCairo.cpp: Renamed from Source/WebKit2/Shared/gtk/LayerTreeContextGtk.cpp.
2481         * win/WebKit2.vcproj: Update the source list.
2482
2483 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
2484
2485         Reviewed by Anders Carlsson.
2486
2487         [GTK] [WebKit2] Provide a fast version of the backing store for X11
2488         https://bugs.webkit.org/show_bug.cgi?id=60912
2489
2490         Instead of allocating the backing store surface directly in WebKit2,
2491         instantiate the GtkWidgetBackingStore class which abstracts away the
2492         platform-specific details of maintaining the backing store.
2493
2494         * UIProcess/BackingStore.h:
2495         * UIProcess/gtk/BackingStoreGtk.cpp:
2496         (WebKit::BackingStore::paint): Call into GtkWidgetBackingStore to get the Cairo surface now.
2497         (WebKit::BackingStore::incorporateUpdate): Ditto.
2498         (WebKit::BackingStore::scroll): Call into GtkWidgetBackingStore to do the actual backing store scroll.
2499
2500 2011-05-16  Chris Marrin  <cmarrin@apple.com>
2501
2502         Reviewed by Darin Adler.
2503
2504         Plug-in hit testing is broken after zooming
2505         https://bugs.webkit.org/show_bug.cgi?id=60916
2506
2507         Construct a WebMouseEvent to send to plugin, adjusting values to take pageScaleFactor
2508         into account. Also adjusted bounds sent to viewGeometryDidChange to take pageScaleFactor
2509         into account. Both are needed or the plugin will think the mouse positions are outside
2510         its bounds.
2511
2512         * Shared/WebEvent.h:
2513         * Shared/WebMouseEvent.cpp:Add ctor to clone a WebMouseEvent and add a scaleFactor to values
2514         (WebKit::WebMouseEvent::WebMouseEvent):
2515         * WebProcess/Plugins/PluginView.cpp:
2516         (WebKit::PluginView::handleEvent):Adjust mouse coords to take pageScaleFactor into account
2517         (WebKit::PluginView::viewGeometryDidChange):Adjust bounds to take pageScaleFactor into account
2518
2519 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
2520
2521         Reviewed by Anders Carlsson.
2522
2523         GTK port of WebKit2 should switch to new DrawingAreaImpl model
2524         https://bugs.webkit.org/show_bug.cgi?id=59655
2525
2526         * GNUmakefile.am: Add the files necessary to use the DrawingAreaProxyImpl
2527         to the source list. The source list also needs the LayerContextTree stubs.
2528         * Shared/LayerTreeContext.h: This file should not be guarded by
2529         USE(ACCELERATED_COMPOSITING) as it's needed for the DrawingAreaProxyImpl
2530         IPC messaging.
2531         * Shared/gtk/LayerTreeContextGtk.cpp: Added this stub.
2532         * UIProcess/API/gtk/PageClientImpl.cpp:
2533         (WebKit::PageClientImpl::createDrawingAreaProxy): Instead of creating the deprecated
2534         chunked drawing area, create a DrawingAreaProxyImpl.
2535         (WebKit::PageClientImpl::setViewNeedsDisplay): Here we must now queue a redraw. Previously
2536         the chunked drawing area was doing this manually. This is the appropriate place though.
2537         (WebKit::PageClientImpl::scrollView): Add an implementation that just calls into setViewNeedsDisplay.
2538         * UIProcess/API/gtk/PageClientImpl.h: Added a getter for m_viewWidget.
2539         (WebKit::PageClientImpl::viewWidget):
2540         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2541         (callDrawingAreaPaintMethod): Added this helper which reduces code duplication between
2542         GTK+ 2.x and 3.x
2543         (webkitWebViewBaseExpose): Call the new helper now.
2544         (webkitWebViewBaseDraw): Ditto.
2545         * UIProcess/BackingStore.h: Updated to include GTK+ specific types.
2546         * UIProcess/DrawingAreaProxy.h: Ditto.
2547         * UIProcess/DrawingAreaProxy.messages.in: Do not the DrawingAreaProxyImpl-specific
2548          message with USE(ACCELERATED_COMPOSITING).
2549         * UIProcess/WebPageProxy.cpp: Removed these guards, as DrawingAreProxyImpl is used on all platforms now.
2550         (WebKit::WebPageProxy::didReceiveMessage): Ditto.
2551         * UIProcess/WebPageProxy.h: Ditto.
2552         * UIProcess/gtk/BackingStoreGtk.cpp: Added. This implementation heavily uses Cairo,
2553         but depends on GTK+/GDK in a few places.
2554         (WebKit::BackingStore::paint):
2555         (WebKit::BackingStore::incorporateUpdate):
2556         (WebKit::BackingStore::scroll):
2557         * UIProcess/gtk/WebPageProxyGtk.cpp: Added a getting for the viewWidget, which is
2558         required by BackingStoreGtk. A similar getter exists for Windows and Mac.
2559         (WebKit::WebPageProxy::viewWidget): Ditto.
2560         * WebProcess/WebPage/DrawingArea.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
2561         (WebKit::DrawingArea::create): Ditto.
2562         * WebProcess/WebPage/DrawingArea.h: Ditto.
2563         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2564         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Do not guard
2565         this DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING)
2566         * WebProcess/WebPage/WebPage.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now.
2567         (WebKit::WebPage::didReceiveMessage): Ditto.
2568
2569 2011-05-16  Maciej Stachowiak  <mjs@apple.com>
2570
2571         Reviewed by Sam Weinig.
2572
2573         Sandbox denies Kerberos authentication
2574         https://bugs.webkit.org/show_bug.cgi?id=60921
2575         <rdar://problem/9133872>
2576         
2577         * WebProcess/com.apple.WebProcess.sb:
2578
2579 2011-05-16  David Kilzer  <ddkilzer@apple.com>
2580
2581         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
2582         <rdar://problem/9446430>
2583
2584         Reviewed by Mark Rowe.
2585
2586         * Configurations/Base.xcconfig: Fixed typo.
2587
2588 2011-05-16  Anders Carlsson  <andersca@apple.com>
2589
2590         Reviewed by Dan Bernstein.
2591
2592         If the root compositing layer changes while we're about to exit compositing mode, make sure to enter compositing mode
2593         https://bugs.webkit.org/show_bug.cgi?id=60905
2594         <rdar://problem/9365574>
2595
2596         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2597         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
2598         If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen
2599         when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host
2600         does it next flush. This will end up sending the EnterAcceleratedCompositingMode message.
2601
2602 2011-05-13  Jer Noble  <jer.noble@apple.com>
2603
2604         Reviewed by Simon Fraser.
2605
2606         Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
2607         https://bugs.webkit.org/show_bug.cgi?id=60826
2608
2609         Emit a notification when moving a CALayer from the WebProcess's main
2610         layer host to a new context.  This allows listeners to invalidate their
2611         layers which may not support moving between different CAContexts (as is
2612         the case with QTMovieLayer).  In order to allow listeners to determine if they
2613         are affected, the notification will pass the root CALayer in a userInfo
2614         dictionary.
2615
2616         In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted
2617         class (GraphicsLayer) to a retainable class (PlatformLayer).
2618
2619         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h:
2620         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2621         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize
2622             m_fullScreenRootLayer now that it is a RetainPtr<>.
2623         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification
2624             after either creating or destroying the full screen layer host.
2625         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation):
2626         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
2627
2628 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
2629
2630         Rubber-stamped by Csaba Osztrogonác.
2631
2632         [Qt][Wk2][Symbian] Fix build after r86560
2633         https://bugs.webkit.org/show_bug.cgi?id=60887
2634
2635         Temporarily fix Symbian build by re-enabling compilation
2636         of Qt/Gtk common code (as was the case for Symbian before r55875).
2637         This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875
2638         As of this revision, only the native SharedMemory implementation is in trunk.
2639
2640         * Platform/CoreIPC/Attachment.h: Compile Qt/Gtk common code for Qt-Symbian too
2641         * Platform/CoreIPC/Connection.h: ditto
2642         * Platform/SharedMemory.h:       ditto
2643         * Platform/qt/SharedMemorySymbian.cpp: stub implementations of attachment handling
2644         (WebKit::SharedMemory::Handle::releaseToAttachment):
2645         (WebKit::SharedMemory::Handle::adoptFromAttachment):
2646
2647 2011-05-16  Jon Lee  <jonlee@apple.com>
2648
2649         Reviewed by Simon Fraser.
2650
2651         Can't horizontally scroll iframes and overflow because wheel events are always accepted
2652         https://bugs.webkit.org/show_bug.cgi?id=60779
2653
2654         We keep track of the number of horizontal scrollbars and mouse wheel event handlers in the
2655         UI process as a means of determining whether horizontal scroll events will be handled
2656         by the web process.
2657
2658         * UIProcess/WebPageProxy.cpp:
2659         (WebKit::WebPageProxy::willHandleHorizontalScrollEvents): Return true if there is at least
2660         one wheel event handler
2661         * UIProcess/WebPageProxy.h: Add new variable to cache the count
2662         (WebKit::WebPageProxy::numWheelEventHandlersChanged): Sets the count
2663
2664         The rest just provides all the connections.
2665         * UIProcess/API/C/WKPage.cpp:
2666         (WKPageWillHandleHorizontalScrollEvents):
2667         * UIProcess/API/C/WKPage.h:
2668         * UIProcess/WebPageProxy.messages.in:
2669         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2670         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2671         (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection):
2672         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
2673         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2674         (WebKit::WebChromeClient::shouldRubberBandInDirection): Forward to injected bundle UI client
2675         (WebKit::WebChromeClient::updateCountWheelEventHandlers): Updates the web page proxy
2676         * WebProcess/WebCoreSupport/WebChromeClient.h:
2677
2678 2011-05-16  Anders Carlsson  <andersca@apple.com>
2679
2680         Reviewed by Oliver Hunt.
2681
2682         Silverlight: Selection via keyboard selects the entire plugin instead of the contents of a TextBox
2683         https://bugs.webkit.org/show_bug.cgi?id=60898
2684         <rdar://problem/9309903>
2685
2686         Special-case Command-A and always return true, indicating that the plug-in handled the event.
2687         This matches WebKit1.
2688
2689         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2690         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
2691
2692 2011-05-16  Anders Carlsson  <andersca@apple.com>
2693
2694         Reviewed by Oliver Hunt.
2695
2696         Short-circuit NPRuntime calls made by Flash during plug-in instantiation
2697         https://bugs.webkit.org/show_bug.cgi?id=60894
2698         <rdar://problem/8804681>
2699
2700         During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the
2701         URL of the current document as well as the URL of the toplevel document. This leads to
2702         a bunch of IPC traffic that slows down instantiation.
2703
2704         Since we know what calls Flash is making and what results are expected, we can handle the
2705         NPRuntime calls directly in the plug-in process and avoid extra IPC overhead.
2706
2707         * PluginProcess/PluginControllerProxy.cpp:
2708         (WebKit::PluginControllerProxy::PluginControllerProxy):
2709         Initialize m_pluginCreationParameters.
2710
2711         (WebKit::PluginControllerProxy::initialize):
2712         Set m_pluginCreationParameters to point to the creation parameters right before
2713         calling Plugin::initialize and restore it back afterwards.
2714
2715         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
2716         If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization
2717         quirk, and we're being initialized, check for the __flash_getWindowLocation and
2718         __flash_getTopLocation function calls and return the correct values.
2719
2720         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
2721         Check if the script string has the definitions of __flash_getWindowLocation or __flash_getTopLocation
2722         and just ignore them. Note that ignoring them has the effect of not adding them to the window object,
2723         which could in theory be a backwards compatibility problem if web pages were to assume that these
2724         functions existed on a page with plug-ins. In practice this is probably not a problem, especially since
2725         these functions are only used on Mac WebKit.
2726
2727         * PluginProcess/PluginControllerProxy.h:
2728         (WebKit::PluginControllerProxy::inInitialize):
2729         Add helper function.
2730
2731         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2732         (WebKit::NetscapePluginModule::determineQuirks):
2733         Add the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk for Flash on Mac.
2734
2735         * Shared/Plugins/PluginQuirks.h:
2736         Add Mac specific CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk.
2737
2738 2011-05-16  Anders Carlsson  <andersca@apple.com>
2739
2740         Reviewed by Adam Roben.
2741
2742         Add a returnValue parameter to tryToShortCircuitInvoke
2743         https://bugs.webkit.org/show_bug.cgi?id=60891
2744
2745         tryToShortCircuitInvoke needs to be able to indicate that an invoke
2746         call failed. Add a returnValue parameter and have the real return value
2747         indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not.
2748
2749         * PluginProcess/PluginControllerProxy.cpp:
2750         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
2751         * PluginProcess/PluginControllerProxy.h:
2752         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2753         (WebKit::NPN_Invoke):
2754         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2755         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
2756         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2757         * WebProcess/Plugins/PluginController.h:
2758         * WebProcess/Plugins/PluginView.cpp:
2759         (WebKit::PluginView::tryToShortCircuitInvoke):
2760         * WebProcess/Plugins/PluginView.h:
2761
2762 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
2763
2764         Reviewed by Csaba Osztrogonác.
2765
2766         [Qt][Wk2][Symbian] Fix build after r86560
2767         https://bugs.webkit.org/show_bug.cgi?id=60887
2768
2769         * Platform/CoreIPC/ArgumentDecoder.cpp:
2770         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): guard Unix and Gtk code with USE(UNIX_DOMAIN_SOCKETS)
2771         * Platform/CoreIPC/ArgumentEncoder.cpp:
2772         (CoreIPC::ArgumentEncoder::~ArgumentEncoder): ditto
2773
2774 2011-05-16  Anders Carlsson  <andersca@apple.com>
2775
2776         Reviewed by Adam Roben.
2777
2778         Add the ability for a plug-in controller to short-circuit calls to NPN_Invoke
2779         https://bugs.webkit.org/show_bug.cgi?id=60886
2780
2781         Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which
2782         will be useful for avoiding sync IPC messages during instantiation.
2783
2784         * PluginProcess/PluginControllerProxy.cpp:
2785         (WebKit::PluginControllerProxy::evaluate):
2786         Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to
2787         the web process to ask it to evaluate the script string.
2788
2789         (WebKit::PluginControllerProxy::tryToShortCircuitInvoke):
2790         (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate):
2791         Always return false for now.
2792
2793         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2794         (WebKit::NPN_Invoke):
2795         Get the plug-in and call tryToShortCircuitInvoke.
2796
2797         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2798         (WebKit::NetscapePlugin::tryToShortCircuitInvoke):
2799         Call the plug-in controller.
2800
2801         * WebProcess/Plugins/PluginView.cpp:
2802         (WebKit::PluginView::tryToShortCircuitInvoke):
2803         Always return false here, since there's no need to short-circuit calls
2804         for plug-ins that live in the web process.
2805
2806 2011-05-16  Siddharth Mathur  <siddharth.mathur@nokia.com>
2807
2808         Reviewed by Laszlo Gombos.
2809
2810         [Qt][WK2][Symbian] Shared memory implementation for Symbian
2811         https://bugs.webkit.org/show_bug.cgi?id=55875
2812
2813         Use global chunks for sharing data between processes.
2814         This is an initial implementation. An outstanding issue
2815         is the correct way to close() the chunk in the SharedMemory d'tor
2816         without triggering a delete by the kernel when the ref-count
2817         temporarily goes to zero.
2818
2819         * Platform/SharedMemory.h: platform specific handle and chunk name
2820         * Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation
2821         using RChunk.CreateGlobal() for named chunks. The chunk name is serialized
2822         and sent over the IPC channel and opened by the remote process using
2823         RChunk.OpenGlobal().
2824
2825         (WebKit::SharedMemory::Handle::Handle):
2826         (WebKit::SharedMemory::Handle::~Handle):
2827         (WebKit::SharedMemory::Handle::isNull):
2828         (WebKit::SharedMemory::Handle::encode):
2829         (WebKit::SharedMemory::Handle::decode):
2830         (WebKit::SharedMemory::create):
2831         (WebKit::SharedMemory::~SharedMemory):
2832         (WebKit::SharedMemory::createHandle):
2833         (WebKit::SharedMemory::systemPageSize):
2834         * Platform/unix/SharedMemoryUnix.cpp: Exclude Qt-Symbian using HAVE(UNIX_DOMAIN_SOCKETS)
2835         * WebKit2.pro: Add SharedMemorySymbian.cpp
2836
2837 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2838
2839         Unreviewed. Fix WebKit2 GTK build after r86489.
2840
2841         * GNUmakefile.am: Add PluginProcess/PluginCreationParameters.cpp
2842         and PluginProcess/PluginCreationParameters.h to compilation.
2843
2844 2011-05-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2845
2846         Reviewed by Martin Robinson.
2847
2848         [GTK] Enable building GTK port with ENABLE_PLUGIN_PROCESS=1
2849         https://bugs.webkit.org/show_bug.cgi?id=58223
2850
2851         * GNUmakefile.am: Add new files to compilation.
2852         * PluginProcess/gtk/PluginControllerProxyGtk.cpp: Added.
2853         (WebKit::PluginControllerProxy::platformInitialize):
2854         (WebKit::PluginControllerProxy::platformDestroy):
2855         (WebKit::PluginControllerProxy::platformGeometryDidChange):
2856         * PluginProcess/gtk/PluginProcessGtk.cpp: Added.
2857         (WebKit::PluginProcess::platformInitialize):
2858         * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: Added.
2859         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2860         * WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp: Added.
2861         (WebKit::PluginProxy::needsBackingStore):
2862
2863 2011-05-16  Adam Barth  <abarth@webkit.org>
2864
2865         Attempt to fix the Qt build.  (Strict PassOwnPtr fix.)
2866
2867         * Shared/qt/ShareableBitmapQt.cpp:
2868         (WebKit::ShareableBitmap::createGraphicsContext):
2869
2870 2011-05-15  Michael Saboff  <msaboff@apple.com>
2871
2872         Reviewed by Geoffrey Garen.
2873
2874         Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl
2875         https://bugs.webkit.org/show_bug.cgi?id=60864
2876
2877         Implemented reuse of BackingStore's in 
2878         DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed
2879         matches the size of the existing BackingStore.
2880         Also reduced the discardBackingStoreTimer from 5 to 2 seconds.
2881         These changes reduces memory usage up to 10MB on memory tests.
2882
2883         * UIProcess/DrawingAreaProxyImpl.cpp:
2884         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2885         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
2886
2887 2011-05-15  Anders Carlsson  <andersca@apple.com>
2888
2889         Reviewed by Maciej Stachowiak.
2890
2891         Pass the window NPObject identifier in the plug-in creation parameters
2892         https://bugs.webkit.org/show_bug.cgi?id=60865
2893
2894         This avoids a synchronous call when the plug-in wants to get the NPObject that
2895         corresponds to the window.
2896
2897         * PluginProcess/PluginControllerProxy.cpp:
2898         (WebKit::PluginControllerProxy::initialize):
2899         Change this to take the PluginCreationParameters. Initialize the window NPObject.
2900
2901         (WebKit::PluginControllerProxy::windowScriptNPObject):
2902         Just return the window NPObject; it's already been initialized.
2903
2904         * PluginProcess/PluginControllerProxy.h:
2905         * PluginProcess/PluginCreationParameters.cpp:
2906         (WebKit::PluginCreationParameters::PluginCreationParameters):
2907         (WebKit::PluginCreationParameters::encode):
2908         (WebKit::PluginCreationParameters::decode):
2909         * PluginProcess/PluginCreationParameters.h:
2910         Add the window NPObject ID.
2911
2912         * PluginProcess/WebProcessConnection.cpp:
2913         (WebKit::WebProcessConnection::createPlugin):
2914         Pass the creation parameters to PluginControllerProxy::initialize.
2915
2916         * WebProcess/Plugins/PluginProxy.cpp:
2917         (WebKit::PluginProxy::initialize):
2918         Initialize the window NPObject ID.
2919
2920         * WebProcess/Plugins/PluginProxy.messages.in:
2921         Remove the GetWindowScriptNPObject message.
2922
2923 2011-05-15  Anders Carlsson  <andersca@apple.com>
2924
2925         Reviewed by Geoffrey Garen.
2926
2927         Pass the document URL and toplevel document URL when creating a plug-in
2928         https://bugs.webkit.org/show_bug.cgi?id=60863
2929
2930         This is the first of a series of patches intended to reduce the IPC traffic
2931         during plug-in instantiation.
2932
2933         * WebProcess/Plugins/Plugin.cpp:
2934         (WebKit::Plugin::Parameters::encode):
2935         Encode the URLs.
2936
2937         (WebKit::Plugin::Parameters::decode):
2938         Decode the URLs.
2939
2940         * WebProcess/Plugins/Plugin.h:
2941         Add the document and toplevel document URLs.
2942
2943         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2944         (WebKit::WebFrameLoaderClient::createPlugin):
2945         Initialize the document and toplevel document URLs.
2946
2947 2011-05-13  Oliver Hunt  <oliver@apple.com>
2948
2949         Reviewed by Geoffrey Garen.
2950
2951         Make GC validation more aggressive
2952         https://bugs.webkit.org/show_bug.cgi?id=60802
2953
2954         Add GC_VALIDATION calls to all the JSNPObject methods.
2955
2956         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2957         (WebKit::JSNPObject::invalidate):
2958         (WebKit::JSNPObject::callMethod):
2959         (WebKit::JSNPObject::callObject):
2960         (WebKit::JSNPObject::callConstructor):
2961         (WebKit::JSNPObject::getCallData):
2962         (WebKit::JSNPObject::getConstructData):
2963         (WebKit::JSNPObject::getOwnPropertySlot):
2964         (WebKit::JSNPObject::getOwnPropertyDescriptor):
2965         (WebKit::JSNPObject::put):
2966         (WebKit::JSNPObject::getOwnPropertyNames):
2967         (WebKit::JSNPObject::propertyGetter):
2968         (WebKit::JSNPObject::methodGetter):
2969
2970 2011-05-13  Oliver Hunt  <oliver@apple.com>
2971
2972         Reviewed by Geoffrey Garen.
2973
2974         Make GC validation more aggressive
2975         https://bugs.webkit.org/show_bug.cgi?id=60802
2976
2977         Add GC_VALIDATION calls to all the JSNPObject methods.
2978
2979         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2980         (WebKit::JSNPObject::invalidate):
2981         (WebKit::JSNPObject::callMethod):
2982         (WebKit::JSNPObject::callObject):
2983         (WebKit::JSNPObject::callConstructor):
2984         (WebKit::JSNPObject::getCallData):
2985         (WebKit::JSNPObject::getConstructData):
2986         (WebKit::JSNPObject::getOwnPropertySlot):
2987         (WebKit::JSNPObject::getOwnPropertyDescriptor):
2988         (WebKit::JSNPObject::put):
2989         (WebKit::JSNPObject::getOwnPropertyNames):
2990         (WebKit::JSNPObject::propertyGetter):
2991         (WebKit::JSNPObject::methodGetter):
2992
2993 2011-05-14  Alexey Proskuryakov  <ap@apple.com>
2994
2995         Reviewed by Sam Weinig.
2996
2997         WebKit2: Smart cut&paste is broken
2998         https://bugs.webkit.org/show_bug.cgi?id=60840
2999         <rdar://problem/9439927>
3000
3001         * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::isSmartInsertDeleteEnabled):
3002         Match WK1 - this default defaults to YES if not present.
3003
3004 2011-05-14  Dan Bernstein  <mitz@apple.com>
3005
3006         Reviewed by Alice Liu.
3007
3008         WKView does not draw after forced repaint before the first update
3009         https://bugs.webkit.org/show_bug.cgi?id=60845
3010
3011         * UIProcess/DrawingAreaProxy.h:
3012         (WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added.
3013         * UIProcess/DrawingAreaProxyImpl.cpp:
3014         (WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate
3015         to true, ensuring that paint() will wait for an update if needed.
3016         * UIProcess/DrawingAreaProxyImpl.h:
3017         * UIProcess/WebPageProxy.cpp:
3018         (WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint().
3019
3020 2011-05-14  Anders Carlsson  <andersca@apple.com>
3021
3022         Reviewed by Sam Weinig.
3023
3024         Document the WantsMozillaUserAgent quirk and make it Windows specific
3025         https://bugs.webkit.org/show_bug.cgi?id=60843
3026
3027         * Shared/Plugins/PluginQuirks.h:
3028         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3029         (WebKit::NetscapePlugin::userAgent):
3030
3031 2011-05-14  Anders Carlsson  <andersca@apple.com>
3032
3033         Reviewed by Sam Weinig.
3034
3035         Consolidate plug-in creation parameters to a single struct
3036         https://bugs.webkit.org/show_bug.cgi?id=60839
3037
3038         * PluginProcess/PluginControllerProxy.cpp:
3039         (WebKit::PluginControllerProxy::create):
3040         (WebKit::PluginControllerProxy::PluginControllerProxy):
3041         * PluginProcess/PluginControllerProxy.h:
3042         * PluginProcess/PluginCreationParameters.cpp: Added.
3043         (WebKit::PluginCreationParameters::PluginCreationParameters):
3044         (WebKit::PluginCreationParameters::encode):
3045         (WebKit::PluginCreationParameters::decode):
3046         * PluginProcess/PluginCreationParameters.h: Added.
3047         * PluginProcess/WebProcessConnection.cpp:
3048         (WebKit::WebProcessConnection::createPlugin):
3049         * PluginProcess/WebProcessConnection.h:
3050         * PluginProcess/WebProcessConnection.messages.in:
3051         * Scripts/webkit2/messages.py:
3052         * WebKit2.xcodeproj/project.pbxproj:
3053         * WebProcess/Plugins/PluginProxy.cpp:
3054         (WebKit::PluginProxy::initialize):
3055
3056 2011-05-14  Anders Carlsson  <andersca@apple.com>
3057
3058         Reviewed by Kevin Decker.
3059
3060         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
3061         https://bugs.webkit.org/show_bug.cgi?id=60823
3062         <rdar://problem/9430386>
3063
3064         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
3065
3066         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3067         (WebKit::NetscapePluginStream::stop):
3068         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
3069
3070         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
3071         Pass the request URL to NPP_URLNotify, matching other browsers.
3072
3073 2011-05-14  Jer Noble  <jer.noble@apple.com>
3074
3075         Reviewed by Simon Fraser.
3076
3077         Flashing window frame and graphical glitches after exiting full screen mode.
3078         https://bugs.webkit.org/show_bug.cgi?id=60825
3079
3080         A layer-backed WebView throws an exception when moved from a layer-backed parent view
3081         to a non-layer-backed one, so make the WebView a child of the content view, instead of
3082         the animation view.  There is an unrelated fix in beganExitFullScreen, which was calling
3083         finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when 
3084         notifications come out of order.
3085
3086         * UIProcess/mac/WKFullScreenWindowController.mm:
3087         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView
3088             to the full screen window's content view, instead of the _animationView.
3089         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call 
3090             finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:.
3091         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the
3092             _layerHostingView to the contentView, instead of the animationView.
3093
3094 2011-05-14  Csaba Osztrogonác  <ossy@webkit.org>
3095
3096         Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt.
3097
3098         Make GC validation more aggressive
3099         https://bugs.webkit.org/show_bug.cgi?id=60802
3100
3101         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3102         (WebKit::JSNPObject::invalidate):
3103         (WebKit::JSNPObject::callMethod):
3104         (WebKit::JSNPObject::callObject):
3105         (WebKit::JSNPObject::callConstructor):
3106         (WebKit::JSNPObject::getCallData):
3107         (WebKit::JSNPObject::getConstructData):
3108         (WebKit::JSNPObject::getOwnPropertySlot):
3109         (WebKit::JSNPObject::getOwnPropertyDescriptor):
3110         (WebKit::JSNPObject::put):
3111         (WebKit::JSNPObject::getOwnPropertyNames):
3112         (WebKit::JSNPObject::propertyGetter):
3113         (WebKit::JSNPObject::methodGetter):
3114
3115 2011-05-14  Sheriff Bot  <webkit.review.bot@gmail.com>
3116
3117         Unreviewed, rolling out r86476.
3118         http://trac.webkit.org/changeset/86476
3119         https://bugs.webkit.org/show_bug.cgi?id=60832
3120
3121         It made plugins/get-url-notify-with-url-that-fails-to-
3122         load.html crash on GTK (Requested by Ossy on #webkit).
3123
3124         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3125         (WebKit::NetscapePluginStream::stop):
3126         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
3127
3128 2011-05-13  Enrica Casucci  <enrica@apple.com>
3129
3130         Reviewed by Darin Adler and Brian Weinstein.
3131
3132         REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop
3133         https://bugs.webkit.org/show_bug.cgi?id=60819
3134         <rdar://problem/9370689>
3135
3136         To support drag-and-drop to the desktop and other windows applications,
3137         we need to support the fileDescriptor and fileContentZero clipboard formats.
3138         This patch adds the support for serializing these types across the process boundary.
3139
3140         * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments.
3141         (CoreIPC::Arguments10::Arguments10):
3142         (CoreIPC::Arguments10::encode):
3143         (CoreIPC::Arguments10::decode):
3144         (CoreIPC::In):
3145         (CoreIPC::Out):
3146         * Platform/CoreIPC/HandleMessage.h:
3147         (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments.
3148         * UIProcess/WebPageProxy.cpp:
3149         (WebKit::WebPageProxy::startDragDrop):
3150         * UIProcess/WebPageProxy.h:
3151         * UIProcess/WebPageProxy.messages.in:
3152         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
3153         (WebKit::WebDragClient::startDrag):
3154
3155 2011-05-13  Anders Carlsson  <andersca@apple.com>
3156
3157         Reviewed by Sam Weinig.
3158
3159         NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load
3160         https://bugs.webkit.org/show_bug.cgi?id=60823
3161         <rdar://problem/9430386>
3162
3163         If a plug-in stream fails to load before it's been started, we won't destroy the stream.
3164
3165         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3166         (WebKit::NetscapePluginStream::stop):
3167         Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream.
3168
3169         (WebKit::NetscapePluginStream::notifyAndDestroyStream):
3170         Pass the request URL to NPP_URLNotify, matching other browsers.
3171
3172 2011-05-13  Michael Saboff  <msaboff@apple.com>
3173
3174         Reviewed by Geoffrey Garen.
3175
3176         Backing store may not get discarded due to stopped timer
3177         https://bugs.webkit.org/show_bug.cgi?id=60816
3178
3179         Changed the backing store timer to restart if it has been stopped.
3180         The evaluation is done when the view's state is changed.
3181         This change appears to be worth ~3MB (one backing store worth)
3182         during memory tests.
3183
3184         * UIProcess/DrawingAreaProxyImpl.cpp:
3185         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
3186         * UIProcess/WebPageProxy.cpp:
3187         (WebKit::WebPageProxy::viewStateDidChange):
3188
3189 2011-05-13  Oliver Hunt  <oliver@apple.com>
3190
3191         Reviewed by Geoffrey Garen.
3192
3193         Make GC validation more aggressive
3194         https://bugs.webkit.org/show_bug.cgi?id=60802
3195
3196         Add GC_VALIDATION calls to all the JSNPObject methods.
3197
3198         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3199         (WebKit::JSNPObject::invalidate):
3200         (WebKit::JSNPObject::callMethod):
3201         (WebKit::JSNPObject::callObject):
3202         (WebKit::JSNPObject::callConstructor):
3203         (WebKit::JSNPObject::getCallData):
3204         (WebKit::JSNPObject::getConstructData):
3205         (WebKit::JSNPObject::getOwnPropertySlot):
3206         (WebKit::JSNPObject::getOwnPropertyDescriptor):
3207         (WebKit::JSNPObject::put):
3208         (WebKit::JSNPObject::getOwnPropertyNames):
3209         (WebKit::JSNPObject::propertyGetter):
3210         (WebKit::JSNPObject::methodGetter):
3211
3212 2011-05-13  Anders Carlsson  <andersca@apple.com>
3213
3214         Reviewed by Sam Weinig.
3215
3216         NPN_GetURL with a javascript: URL doesn't send back the result in the stream
3217         https://bugs.webkit.org/show_bug.cgi?id=60810
3218
3219         In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL
3220         to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object
3221         to avoid sending it over the wire.
3222
3223         * PluginProcess/PluginControllerProxy.cpp:
3224         (WebKit::PluginControllerProxy::didEvaluateJavaScript):
3225         * PluginProcess/PluginControllerProxy.h:
3226         * PluginProcess/PluginControllerProxy.messages.in:
3227         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3228         (WebKit::NetscapePlugin::loadURL):
3229         (WebKit::NetscapePlugin::didEvaluateJavaScript):
3230         (WebKit::NetscapePlugin::manualStreamDidReceiveResponse):
3231         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3232         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3233         (WebKit::NetscapePluginStream::NetscapePluginStream):
3234         (WebKit::NetscapePluginStream::sendJavaScriptStream):
3235         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
3236         (WebKit::NetscapePluginStream::create):
3237         * WebProcess/Plugins/Plugin.h:
3238         * WebProcess/Plugins/PluginProxy.cpp:
3239         (WebKit::PluginProxy::didEvaluateJavaScript):
3240         * WebProcess/Plugins/PluginProxy.h:
3241         * WebProcess/Plugins/PluginView.cpp:
3242         (WebKit::PluginView::performJavaScriptURLRequest):
3243
3244 2011-05-13  Jeff Miller  <jeffm@apple.com>
3245
3246         Reviewed by Darin Adler.
3247
3248         Make some page() member functions const
3249         https://bugs.webkit.org/show_bug.cgi?id=60794
3250
3251         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Make page() const.
3252         * UIProcess/WebFrameProxy.h:
3253         (WebKit::WebFrameProxy::page): Make page() const.
3254         * UIProcess/WebInspectorProxy.h:
3255         (WebKit::WebInspectorProxy::page): Make page() const.
3256         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
3257         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
3258         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
3259         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
3260         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
3261         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
3262         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
3263         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const.
3264
3265 2011-05-13  Adam Roben  <aroben@apple.com>
3266
3267         Load plugins in the order they're found
3268
3269         Fixes <http://webkit.org/b/60788> <rdar://problem/9435787> REGRESSION (r69790): WebKit2
3270         doesn't prefer plugins in the additional plugins directory
3271
3272         Reviewed by Anders Carlsson.
3273
3274         * UIProcess/Plugins/PluginInfoStore.cpp:
3275         (WebKit::addFromVector):
3276         Changed to use a ListHashSet instead of a HashSet to store the plugin paths.
3277
3278 2011-05-13  Sam Weinig  <sam@webkit.org>
3279
3280         Reviewed by Anders Carlsson.
3281
3282         Prune #includes from FrameView.h (Part 2)
3283         https://bugs.webkit.org/show_bug.cgi?id=60748
3284
3285         - Update files that were depending on FrameView.h #including Frame.h or
3286           Page.h.
3287
3288         * WebProcess/Plugins/PluginView.cpp:
3289         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
3290         * WebProcess/WebPage/WebContextMenu.cpp:
3291         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
3292
3293 2011-05-13  Martin Robinson  <mrobinson@igalia.com>
3294
3295         Reviewed by Eric Seidel.
3296
3297         [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2
3298         https://bugs.webkit.org/show_bug.cgi?id=59765
3299
3300         Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility
3301         class we can now share the code with WebKit2.
3302
3303         * UIProcess/API/gtk/PageClientImpl.cpp:
3304         (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code.
3305         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class.
3306         * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member.
3307
3308 2011-05-12  Pratik Solanki  <psolanki@apple.com>
3309
3310         Reviewed by Antti Koivisto.
3311
3312         Part of WebCore should use CFNetwork-based loader on Mac
3313         https://bugs.webkit.org/show_bug.cgi?id=51836
3314
3315         Use CFRunLoop when using CFNetwork.
3316
3317         * WebProcess/WebPage/mac/WebPageMac.mm:
3318         (WebKit::WebPage::platformInitialize):
3319
3320 2011-05-12  Sam Weinig  <sam@webkit.org>
3321
3322         Reviewed by Gavin Barraclough.
3323
3324         WebProcess sandbox denies file:/// accesses after you navigate to a nonexistent file
3325         <rdar://problem/9427752>
3326         https://bugs.webkit.org/show_bug.cgi?id=60745
3327
3328         * WebProcess/WebPage/WebPage.cpp:
3329         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad):
3330         Don't attempt to re-use a non-existent committed sandbox extension. This can
3331         happen when the previous load was file: url, but did not require an extension,
3332         such as an error page.
3333
3334 2011-05-12  Jia Pu  <jpu@apple.com>
3335
3336         Reviewed by Darin Adler.
3337
3338         Regression caused by changeset 86281
3339         https://bugs.webkit.org/show_bug.cgi?id=60712
3340         <rdar://problem/9427970>
3341
3342         Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking.
3343         So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal()
3344         returns. So we don't need to use the condition to coordinate between these two function. In fact,
3345         all callbacks are delivered on main thread. We don't really need any locking here.
3346
3347         Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has
3348         been removed.
3349
3350         * UIProcess/API/mac/PageClientImpl.mm:
3351         (We