12011-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
302011-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
582011-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
762011-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
872011-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
982011-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
1082011-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
1312011-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
1472011-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
1592011-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
1932011-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
2002011-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
2232011-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
2322011-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
2562011-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
2652011-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
2922011-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
3932011-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
4212011-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
4512011-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
4592011-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
4702011-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
4862011-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
5012011-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
5532011-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
5932011-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
6052011-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
6182011-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
6302011-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
6442011-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
6612011-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
6732011-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
6962011-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
7092011-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
7322011-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
7472011-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
7602011-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
7802011-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
7952011-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
8272011-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
8412011-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
8562011-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
8642011-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
8732011-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
8862011-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
9052011-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
9182011-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
9412011-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
9572011-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
9772011-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
10062011-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
10392011-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
10552011-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
10712011-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
10822011-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
11072011-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
11182011-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
11322011-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
11412011-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
11512011-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
11632011-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
11732011-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
11842011-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
11992011-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
12892011-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
12972011-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
13032011-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
13342011-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
13462011-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
13582011-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
13932011-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
13992011-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
14342011-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
14452011-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
14722011-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
14912011-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
15042011-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
15182011-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
15342011-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
15402011-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
15462011-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
15602011-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
15702011-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
15822011-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
15932011-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
16062011-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
16212011-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
16432011-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
16842011-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
16932011-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
17052011-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
17222011-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
17442011-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
17592011-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
17822011-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
18142011-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
18212011-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
18502011-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
18662011-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
18792011-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
18952011-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
19062011-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
19152011-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
19322011-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
19412011-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
20162011-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
20382011-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
20472011-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
20602011-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
20882011-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
20982011-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
21132011-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
21272011-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
21562011-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
21672011-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
21792011-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
21932011-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
21992011-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
22172011-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
22332011-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
22652011-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
23122011-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
23262011-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
23632011-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
23912011-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
24202011-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
24292011-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
24442011-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
24502011-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
24662011-05-16  Martin Robinson  <mrobinson@igalia.com>
2467
2468        Add file missing from my previous commit.
2469
2470        * Shared/cairo/LayerTreeContextCairo.cpp: Added.
2471
24722011-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
24832011-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
25002011-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
25192011-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
25692011-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
25792011-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
25882011-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
26022011-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
26282011-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
26472011-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
26782011-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
26922011-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
27382011-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
27622011-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
27742011-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
28062011-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
28372011-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
28442011-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
28632011-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
28702011-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
28872011-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
29232011-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
29472011-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
29702011-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
29932011-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
30042011-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
30202011-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
30312011-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
30562011-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
30732011-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
30942011-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
31152011-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
31282011-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
31552011-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
31722011-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
31892011-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
32122011-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
32442011-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
32652011-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
32782011-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
32932011-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
33082011-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
33202011-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
33342011-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        (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
3352        * UIProcess/mac/CorrectionPanel.h:
3353        * UIProcess/mac/CorrectionPanel.mm:
3354        (WebKit::CorrectionPanel::CorrectionPanel):
3355        (WebKit::CorrectionPanel::show):
3356        (WebKit::CorrectionPanel::dismiss):
3357        (WebKit::CorrectionPanel::dismissInternal):
3358        (WebKit::CorrectionPanel::handleAcceptedReplacement):
3359
33602011-05-12  Brian Weinstein  <bweinstein@apple.com>
3361
3362        Reviewed by Adam Roben.
3363
3364        WebKit2: Implement plugin quirk for Mozilla user agent for older Flash
3365        https://bugs.webkit.org/show_bug.cgi?id=60726
3366        <rdar://problem/8470824>
3367        
3368        Implement the quirk for versions of Flash before v10 that only request windowless plugins
3369        if we use a Mozilla user agent.
3370
3371        * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
3372        (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the
3373            "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use
3374            the Mozilla user agent.
3375        * Shared/Plugins/PluginQuirks.h:
3376        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3377        (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user
3378            agent.
3379        * win/WebKit2.vcproj: Add PluginQuirks.h.
3380
33812011-05-12  Anders Carlsson  <andersca@apple.com>
3382
3383        Reviewed by Simon Fraser.
3384
3385        PluginView::invalidateRect doesn't work for transformed plug-ins
3386        https://bugs.webkit.org/show_bug.cgi?id=60727
3387        <rdar://problem/9331244>
3388
3389        Ask the RenderObject to repaint the plug-in instead of using invalidateContentsAndWindow.
3390        This matches what we do in WebKit1.
3391
3392        * WebProcess/Plugins/PluginView.cpp:
3393        (WebKit::PluginView::invalidateRect):
3394
33952011-05-12  Jessie Berlin  <jberlin@apple.com>
3396
3397        Reviewed by Darin Adler.
3398
3399        [Windows WebKit2] Use cookies set in WebKit1
3400        https://bugs.webkit.org/show_bug.cgi?id=60274
3401
3402        Properly handle the case where there is no serialized default storage session by not trying
3403        to encode or decode 0, while still making sure to decode any valid storage session.
3404
3405        * Shared/WebProcessCreationParameters.cpp:
3406        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3407        (WebKit::WebProcessCreationParameters::encode):
3408        Only encode the storage session if there is one to encode.
3409        (WebKit::WebProcessCreationParameters::decode):
3410        Only decode the storage session there is one to decode.
3411        * Shared/WebProcessCreationParameters.h:
3412
34132011-05-11  Brian Weinstein  <bweinstein@apple.com>
3414
3415        Reviewed by Anders Carlsson.
3416
3417        After relaunching an unresponsive web process, web page stops responding to mouse movement
3418        https://bugs.webkit.org/show_bug.cgi?id=60669
3419        <rdar://problem/9409934>
3420
3421        * UIProcess/WebPageProxy.cpp:
3422        (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
3423            crashes.
3424
34252011-05-10  Tony Gentilcore  <tonyg@chromium.org>
3426
3427        Reviewed by Darin Adler.
3428
3429        Perform some forward declarations suggested by include-what-you-use
3430        https://bugs.webkit.org/show_bug.cgi?id=60545
3431
3432        * WebProcess/WebPage/mac/WebPageMac.mm:
3433
34342011-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
3435
3436        Reviewed by Martin Robinson.
3437
3438        Fix the build with ENABLE_PLUGIN_PROCESS
3439        https://bugs.webkit.org/show_bug.cgi?id=60628
3440
3441        * WebProcess/Plugins/PluginProxy.cpp:
3442        (WebKit::PluginProxy::initialize): Move the call to
3443        pluginController->isAcceleratedCompositingEnabled() to a #ifdef block.
3444        * WebProcess/Plugins/PluginProxy.h: Add include for <WebCore/IntRect.h>.
3445
34462011-05-11  Damian Kaleta  <dkaleta@apple.com>
3447
3448        Reviewed by Brady Eidson.
3449
3450        Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
3451        https://bugs.webkit.org/show_bug.cgi?id=60674
3452
3453        * UIProcess/API/C/WKPage.cpp:
3454        (WKPageTryRestoreScrollPosition):
3455        * UIProcess/API/C/WKPage.h:
3456        * UIProcess/WebPageProxy.cpp:
3457        (WebKit::WebPageProxy::tryRestoreScrollPosition):
3458        * UIProcess/WebPageProxy.h:
3459        * WebProcess/WebPage/WebPage.cpp:
3460        (WebKit::WebPage::tryRestoreScrollPosition):
3461        * WebProcess/WebPage/WebPage.h:
3462        * WebProcess/WebPage/WebPage.messages.in:
3463
34642011-05-11  Sam Weinig  <sam@webkit.org>
3465
3466        Reviewed by Gavin Barraclough.
3467
3468        WebKit2 doesn't build on Mac with strict PassOwnPtr
3469        https://bugs.webkit.org/show_bug.cgi?id=60655
3470
3471        * Platform/CoreIPC/HandleMessage.h:
3472        (CoreIPC::handleMessageDelayed):
3473        Add explicit adoptPtr to indicate that the constructor is taking ownership.
3474
34752011-05-11  Jessie Berlin  <jberlin@apple.com>
3476
3477        Reviewed by Steve Falkenburg.
3478
3479        [Windows WebKit2] Use cookies set in WebKit1
3480        https://bugs.webkit.org/show_bug.cgi?id=60274
3481
3482        Share the default storage session between the UI and Web Processes.
3483
3484        * Shared/WebProcessCreationParameters.cpp:
3485        (WebKit::WebProcessCreationParameters::encode):
3486        Only encode the session parameter if it is valid.
3487        (WebKit::WebProcessCreationParameters::decode):
3488        Don't try to decode a null session data. 
3489        * Shared/WebProcessCreationParameters.h:
3490        Add a parameter for a serialized default storage session, used only on Windows.
3491
3492        * Shared/win/WebCoreArgumentCodersWin.cpp:
3493        (CoreIPC::decodeResourceRequest):
3494        Make sure to set the current storage session on any requests used by the Web
3495        Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
3496        doing anything with the Web Process's default storage session.
3497
3498        * UIProcess/win/WebContextWin.cpp:
3499        (WebKit::WebContext::platformInitializeWebProcess):
3500        Serialize the default storage session in the UI Process and add it to the
3501        WebProcessCreationParameters.
3502
3503        * WebProcess/WebPage/win/WebPageWin.cpp:
3504        (WebKit::cachedResponseForURL):
3505        Use the cache associated with the current storage session and make sure the request has the
3506        current storage session set on it before doing anything with it.
3507
3508        * WebProcess/win/WebProcessWin.cpp:
3509        (WebKit::WebProcess::platformSetCacheModel):
3510        Use the default storage session.
3511        (WebKit::WebProcess::platformClearResourceCaches):
3512        Ditto.
3513        (WebKit::WebProcess::platformInitializeWebProcess):
3514        Deserialize the default storage session passed in by the UI Process and hand it to the
3515        ResourceHandle.
3516
35172011-05-11  Jia Pu  <jpu@apple.com>
3518
3519        Reviewed by Darin Adler.
3520
3521        CorrectionPanel sometimes hangs in dismissSoon().
3522        https://bugs.webkit.org/show_bug.cgi?id=60599
3523        <rdar://problem/9313628>
3524
3525        Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal
3526        to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal,
3527        for condition checking.
3528
3529        * UIProcess/mac/CorrectionPanel.h:
3530        * UIProcess/mac/CorrectionPanel.mm:
3531        (WebKit::CorrectionPanel::CorrectionPanel):
3532        (WebKit::CorrectionPanel::show):
3533        (WebKit::CorrectionPanel::dismissSoon):
3534        (WebKit::CorrectionPanel::dismissInternal):
3535        (WebKit::CorrectionPanel::handleAcceptedReplacement):
3536
35372011-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
3538
3539        Unreviewed, rolling out r86255.
3540        http://trac.webkit.org/changeset/86255
3541        https://bugs.webkit.org/show_bug.cgi?id=60660
3542
3543        REGRESSION (r86255): Lots of tests crashing in
3544        CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
3545        (WebKit2 Tests) (Requested by aroben on #webkit).
3546
3547        * Shared/WebProcessCreationParameters.cpp:
3548        (WebKit::WebProcessCreationParameters::encode):
3549        (WebKit::WebProcessCreationParameters::decode):
3550        * Shared/WebProcessCreationParameters.h:
3551        * Shared/win/WebCoreArgumentCodersWin.cpp:
3552        (CoreIPC::decodeResourceRequest):
3553        * UIProcess/win/WebContextWin.cpp:
3554        (WebKit::WebContext::platformInitializeWebProcess):
3555        * WebProcess/WebPage/win/WebPageWin.cpp:
3556        (WebKit::cachedResponseForURL):
3557        * WebProcess/win/WebProcessWin.cpp:
3558        (WebKit::WebProcess::platformSetCacheModel):
3559        (WebKit::WebProcess::platformClearResourceCaches):
3560        (WebKit::WebProcess::platformInitializeWebProcess):
3561
35622011-05-11  Adam Roben  <aroben@apple.com>
3563
3564        Don't notify the plugin when a targeted javascript: URL request completes
3565
3566        This matches Mozilla and WebKit1.
3567
3568        Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
3569        plugin doesn't appear on a hanes.com page
3570
3571        Test: plugins/get-targeted-javascript-url.html
3572
3573        Reviewed by Anders Carlsson.
3574
3575        * WebProcess/Plugins/PluginView.cpp:
3576        (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
3577        request had a target.
3578
35792011-05-11  Jessie Berlin  <jberlin@apple.com>
3580
3581        Reviewed by Steve Falkenburg.
3582
3583        [Windows WebKit2] Use cookies set in WebKit1
3584        https://bugs.webkit.org/show_bug.cgi?id=60274
3585
3586        Share the default storage session between the UI and Web Processes.
3587
3588        * Shared/WebProcessCreationParameters.cpp:
3589        (WebKit::WebProcessCreationParameters::encode):
3590        (WebKit::WebProcessCreationParameters::decode):
3591        * Shared/WebProcessCreationParameters.h:
3592        Add a parameter for a serialized default storage session, used only on Windows.
3593
3594        * Shared/win/WebCoreArgumentCodersWin.cpp:
3595        (CoreIPC::decodeResourceRequest):
3596        Make sure to set the current storage session on any requests used by the Web
3597        Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
3598        doing anything with the Web Process's default storage session.
3599
3600        * UIProcess/win/WebContextWin.cpp:
3601        (WebKit::WebContext::platformInitializeWebProcess):
3602        Serialize the default storage session in the UI Process and add it to the
3603        WebProcessCreationParameters.
3604
3605        * WebProcess/WebPage/win/WebPageWin.cpp:
3606        (WebKit::cachedResponseForURL):
3607        Use the cache associated with the current storage session and make sure the request has the
3608        current storage session set on it before doing anything with it.
3609
3610        * WebProcess/win/WebProcessWin.cpp:
3611        (WebKit::WebProcess::platformSetCacheModel):
3612        Use the default storage session.
3613        (WebKit::WebProcess::platformClearResourceCaches):
3614        Ditto.
3615        (WebKit::WebProcess::platformInitializeWebProcess):
3616        Deserialize the default storage session passed in by the UI Process and hand it to the
3617        ResourceHandle.
3618
36192011-05-11  Sam Weinig  <sam@webkit.org>
3620
3621        Reviewed by Adam Roben.
3622
3623        WebKit2 should tell app that is unresponsive in more cases
3624        <rdar://problem/9110151>
3625        https://bugs.webkit.org/show_bug.cgi?id=60608
3626
3627        * UIProcess/DrawingAreaProxyImpl.cpp:
3628        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
3629        (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
3630        Invoke the responsiveness time when forcing a backing store update
3631        to catch the cases of activating tabs, resizing the window, etc.
3632
36332011-05-11  Martin Robinson  <mrobinson@igalia.com>
3634
3635        Try to fix the WinCairo build.
3636
3637        * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and
3638        guard it with USE(CAIRO) instead of PLATFORM(CAIRO).
3639
36402011-05-11  John Sullivan  <sullivan@apple.com>
3641
3642        Reviewed by Darin Adler.
3643
3644        <https://bugs.webkit.org/show_bug.cgi?id=60631>
3645        <rdar://problem/9420520>
3646        
3647        WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631]
3648
3649        * UIProcess/WebPageProxy.cpp:
3650        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
3651        Call clearPendingAPIRequestURL().
3652
36532011-05-11  Adam Roben  <aroben@apple.com>
3654
3655        Turn on strict PassOwnPtr on Windows
3656
3657        Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
3658
3659        Reviewed by Adam Barth.
3660
3661        * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
3662        (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0.
3663
36642011-05-11  Jessie Berlin  <jberlin@apple.com>
3665
3666        Reviewed by Darin Adler.
3667
3668        [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information
3669        about the usage for both the origin overall and the database in question.
3670        https://bugs.webkit.org/show_bug.cgi?id=60573
3671
3672        Add the currentOriginUsage parameter.
3673
3674        * Platform/CoreIPC/HandleMessage.h:
3675        (CoreIPC::callMemberFunction):
3676        * UIProcess/API/C/WKPage.h:
3677        * UIProcess/WebPageProxy.cpp:
3678        (WebKit::WebPageProxy::exceededDatabaseQuota):
3679        * UIProcess/WebPageProxy.h:
3680        * UIProcess/WebPageProxy.messages.in:
3681        * UIProcess/WebUIClient.cpp:
3682        (WebKit::WebUIClient::exceededDatabaseQuota):
3683        * UIProcess/WebUIClient.h:
3684        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3685        (WebKit::WebChromeClient::exceededDatabaseQuota):
3686
36872011-05-10  Oliver Hunt  <oliver@apple.com>
3688
3689        Reviewed by Geoffrey Garen.
3690
3691        Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page
3692        https://bugs.webkit.org/show_bug.cgi?id=60580
3693
3694        The plugin object map was incorrect trying to implement a weak map itself using
3695        destructors.  Switch to a WeakGCMap and the problem is fixed.
3696
3697        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3698        (WebKit::JSNPObject::~JSNPObject):
3699        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3700        (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
3701        (WebKit::NPRuntimeObjectMap::invalidate):
3702        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
3703
37042011-05-10  Sam Weinig  <sam@webkit.org>
3705
3706        Reviewed by Dan Bernstein.
3707
3708        Yet more quarantine related sandbox denial when downloading files
3709        <rdar://problem/9397494>
3710
3711        * WebProcess/com.apple.WebProcess.sb:
3712
37132011-05-10  Sam Weinig  <sam@webkit.org>
3714
3715        Reviewed by Anders Carlsson.
3716
3717        WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return
3718        https://bugs.webkit.org/show_bug.cgi?id=60584
3719
3720        * UIProcess/WebPageProxy.cpp:
3721        (WebKit::WebPageProxy::handleWheelEvent):
3722        (WebKit::canCoalesce):
3723        (WebKit::coalesce):
3724        (WebKit::coalescedWheelEvent):
3725        (WebKit::WebPageProxy::didReceiveEvent):
3726        (WebKit::WebPageProxy::processDidCrash):
3727        Reworks coalescing/merging code to happen on didReceiveEvent rather than in
3728        handleWheelEvent. This means we now store the pending events in a queue, and
3729        pull them out when we can.
3730
3731        * UIProcess/WebPageProxy.h:
3732        Change single event containers to contain all pending/merged/coalesced events
3733        and remove unused flag.
3734
37352011-05-09  Jeremy Noble  <jer.noble@apple.com>
3736
3737        Reviewed by Darin Adler.
3738
3739        WebKit2: Cancelling full screen before animation completes leads to full screen window staying up.
3740        https://bugs.webkit.org/show_bug.cgi?id=60531
3741
3742        Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and 
3743        _isExitingFullScreen.  These will ensure each is only called once per full screen request, and
3744        that if one exit/enter request interrupts another, that the required functions are called in 
3745        order.
3746
3747        * UIProcess/mac/WKFullScreenWindowController.h:
3748        * UIProcess/mac/WKFullScreenWindowController.mm:
3749        (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating.
3750        (-[WKFullScreenWindowController exitFullScreen]): Ditto.
3751        (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen
3752            and call [self finishedExitFullScreenAnimation:] if necessary.
3753        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen.
3754        (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen
3755            and call [self finishedEnterFullScreenAnimation:] if necessary.
3756        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen.
3757
37582011-05-10  Beth Dakin  <bdakin@apple.com>
3759
3760        Reviewed by Darin Adler.
3761
3762        https://bugs.webkit.org/show_bug.cgi?id=60582
3763        Crash switching overlay/non-overlay scrollbar preference still possible
3764        -and corresponding-
3765        <rdar://problem/9323983>
3766
3767        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3768        (InitWebCoreSystemInterface):
3769
37702011-05-10  Jeff Miller  <jeffm@apple.com>
3771
3772        Reviewed by Anders Carlsson.
3773
3774        WebKit2: Windows clients need to know if the page overlay is installed
3775        https://bugs.webkit.org/show_bug.cgi?id=60562
3776        <rdar://problem/8940164>
3777        
3778        Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
3779        WebKit clients need to know whether WebKit is drawing the page overlay or not.  Keep track of this in
3780        the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
3781
3782        * UIProcess/API/C/win/WKView.cpp:
3783        (WKViewIsPageOverlayInstalled): Added.
3784        * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
3785        
3786        * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
3787        * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
3788        * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
3789        * UIProcess/win/WebPageProxyWin.cpp:
3790        (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
3791        
3792        * UIProcess/win/WebView.cpp:
3793        (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
3794        (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
3795        * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
3796        (WebKit::WebView::pageOverlayInstalled): Added.
3797        
3798        * WebProcess/WebPage/WebPage.cpp:
3799        (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
3800        (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
3801
38022011-05-10  Anders Carlsson  <andersca@apple.com>
3803
3804        Reviewed by Adam Roben.
3805
3806        Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply
3807        https://bugs.webkit.org/show_bug.cgi?id=60567
3808        <rdar://problem/9377845>
3809
3810        It is possible to receive an incoming sync reply that is for a request we don't know about.
3811        This could happen if the sync message send timed out for example.
3812
3813        * Platform/CoreIPC/Connection.cpp:
3814        (CoreIPC::Connection::processIncomingSyncReply):
3815
38162011-05-05  Brent Fulgham  <bfulgham@webkit.org> and Martin Robinson  <mrobinson@igalia.com>
3817
3818        Reviewed by Anders Carlsson.
3819
3820        [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
3821        https://bugs.webkit.org/show_bug.cgi?id=60293
3822
3823        * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo.
3824        * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations.
3825        * Shared/cairo/ShareableBitmapCairo.cpp:
3826        (WebKit::ShareableBitmap::createGraphicsContext): Added.
3827        (WebKit::ShareableBitmap::paint): Added.
3828        (WebKit::ShareableBitmap::createCairoSurface): Added.
3829        (WebKit::ShareableBitmap::releaseSurfaceData): Added.
3830
38312011-05-10  Anders Carlsson  <andersca@apple.com>
3832
3833        Reviewed by Sam Weinig.
3834
3835        Extra sign in required to view video on MobileMe Gallery album
3836        https://bugs.webkit.org/show_bug.cgi?id=60560
3837
3838        Implement NPN_GetAuthenticationInfo.
3839
3840        * PluginProcess/PluginControllerProxy.cpp:
3841        (WebKit::PluginControllerProxy::getAuthenticationInfo):
3842        Send a GetAuthenticationInfo message to the web process.
3843
3844        * PluginProcess/PluginControllerProxy.h:
3845        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3846        (WebKit::initializeProtectionSpace):
3847        Initialize a WebCore::ProtectionSpace object from NPAPI parameters.
3848
3849        (WebKit::NPN_GetAuthenticationInfo):
3850        Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo. 
3851        Finally, copy the username/password and pass them back to the plug-in.
3852
3853        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3854        (WebKit::NetscapePlugin::getAuthenticationInfo):
3855        Call the plug-in controller.
3856
3857        * WebProcess/Plugins/PluginController.h:
3858        Add getAuthenticationInfo pure virtual member function.
3859
3860        * WebProcess/Plugins/PluginProxy.cpp:
3861        (WebKit::PluginProxy::getAuthenticationInfo):
3862        Call the real plug-in controller's getAuthenticationInfo member function.
3863
3864        * WebProcess/Plugins/PluginProxy.messages.in:
3865        Add GetAuthenticationInfo message.
3866
3867        * WebProcess/Plugins/PluginView.cpp:
3868        (WebKit::PluginView::getAuthenticationInfo):
3869        Try to get the authentication info from the credential storage. Failing that,
3870        get it from the persistent credential storage.
3871
38722011-05-10  Adam Roben  <aroben@apple.com>
3873
3874        Use FontSmoothingLevelWindows by default on Windows
3875
3876        Fixes <http://webkit.org/b/60557> REGRESSION (r86077): Web Inspector uses CG font rendering
3877        in WebKit2 on Windows
3878
3879        Reviewed by Darin Adler.
3880
3881        * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL
3882        macro to let Windows have a different default font smoothing level from other platforms.
3883
3884        * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font
3885        smoothing level.
3886
38872011-05-06  Tony Gentilcore  <tonyg@chromium.org>
3888
3889        Reviewed by Darin Adler.
3890
3891        Fix some unnecessary includes in headers
3892        https://bugs.webkit.org/show_bug.cgi?id=60388
3893
3894        * WebProcess/FullScreen/WebFullScreenManager.cpp:
3895
38962011-05-09  Jeremy Noble  <jer.noble@apple.com>
3897
3898        Reviewed by Darin Adler.
3899
3900        Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
3901        https://bugs.webkit.org/show_bug.cgi?id=60496
3902
3903        When animating into and out of full screen, order out and back in the original webView window,
3904        disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
3905        as the webView is hosted in the full screen window when we ask for it's parent window.
3906
3907        * UIProcess/mac/WKFullScreenWindowController.mm:
3908        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
3909        (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
3910
39112011-05-09  Dan Bernstein  <mitz@apple.com>
3912
3913        Reviewed by Darin Adler.
3914
3915        A WKView with plug-ins paints white when first moved into a window
3916        https://bugs.webkit.org/show_bug.cgi?id=60511
3917
3918        The UI process’s wait for DidUpdateBackingStoreState would always time out because the Web process
3919        was blocked on a synchronous message the UI process trying to get the connections for plug-ins in
3920        the view. This is avoided by deferring the call to Page::setCanStartMedia().
3921
3922        * WebProcess/WebPage/WebPage.cpp:
3923        (WebKit::WebPage::WebPage): Initialize the new m_setCanStartMediaTimer.
3924        (WebKit::WebPage::setCanStartMediaTimerFired): Added. Calls setCanStartMedia(true) when the timer
3925        fires.
3926        (WebKit::WebPage::setIsInWindow): When going out of a window, stop the timer. When going into a
3927        window, start it.
3928        * WebProcess/WebPage/WebPage.h:
3929
39302011-05-09  Anders Carlsson  <andersca@apple.com>
3931
3932        Reviewed by Dan Bernstein.
3933
3934        Crash when sending a sync message to a crashed web process
3935        https://bugs.webkit.org/show_bug.cgi?id=60514
3936        <rdar://problem/9281270>
3937
3938        Change WebProcessProxy::sendSync to return false if there's no connection.
3939
3940        Audit all WebProcessProxy::sendSync call sites to initialize reply parameters.
3941
3942        * UIProcess/WebPageProxy.cpp:
3943        (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
3944        (WebKit::WebPageProxy::getSelectedText):
3945        (WebKit::WebPageProxy::gestureWillBegin):
3946        * UIProcess/WebProcessProxy.h:
3947        (WebKit::WebProcessProxy::sendSync):
3948        * UIProcess/mac/WebPageProxyMac.mm:
3949        (WebKit::WebPageProxy::insertText):
3950        (WebKit::WebPageProxy::getMarkedRange):
3951        (WebKit::WebPageProxy::getSelectedRange):
3952        (WebKit::WebPageProxy::characterIndexForPoint):
3953        (WebKit::WebPageProxy::executeKeypressCommands):
3954        (WebKit::WebPageProxy::writeSelectionToPasteboard):
3955        (WebKit::WebPageProxy::readSelectionFromPasteboard):
3956
39572011-05-09  Anders Carlsson  <andersca@apple.com>
3958
3959        Reviewed by Sam Weinig.
3960
3961        Create a plug-in's MIME types preferences plist if it doesn't exist.
3962        https://bugs.webkit.org/show_bug.cgi?id=57204
3963        <rdar://problem/9195048>
3964
3965        Spawn a plug-in process and let it create the plist. For now, we'll do this on the
3966        main thread since it's a rare one-time computation and we have an API function,
3967        WKFrameCanShowMIMEType, which would have to block anyway.
3968
3969        * PluginProcess/mac/PluginProcessMainMac.mm:
3970        (WebKit::PluginProcessMain):
3971        If -createPluginMIMETypesPreferences is one of the command line argument keys,
3972        the plug-in path will be the argument value. Call NetscapePluginModule::createPluginMIMETypesPreferences
3973        to create the preferences file and then exit.
3974
3975        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3976        (WebKit::contentsOfPropertyListAtURL):
3977        Move code to read a property list out into a helper function.
3978
3979        (WebKit::getMIMETypesFromPluginBundle):
3980        If there's no property list file, try to create one.
3981
3982        (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences):
3983        Load the plug-in, find the BP_CreatePluginMIMETypesPreferences and call it.
3984
3985        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3986        (WebKit::PluginProcessProxy::createPropertyListFile):
3987        Spawn a plug-in process and pass the -createPluginMIMETypesPreferences flag to it and then wait
3988        for it to exit.
3989
39902011-05-09  Anders Carlsson  <andersca@apple.com>
3991
3992        Reviewed by Sam Weinig.
3993
3994        Move EnvironmentVariables out into its own .cpp file
3995        https://bugs.webkit.org/show_bug.cgi?id=60507
3996
3997        * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Added.
3998        (WebKit::EnvironmentVariables::EnvironmentVariables):
3999        (WebKit::EnvironmentVariables::~EnvironmentVariables):
4000        (WebKit::EnvironmentVariables::set):
4001        (WebKit::EnvironmentVariables::get):
4002        (WebKit::EnvironmentVariables::appendValue):
4003        (WebKit::EnvironmentVariables::valueIfVariableHasName):
4004        (WebKit::EnvironmentVariables::createStringForVariable):
4005        (WebKit::EnvironmentVariables::copyEnvironmentVariables):
4006        * UIProcess/Launcher/mac/EnvironmentVariables.h: Added.
4007        (WebKit::EnvironmentVariables::environmentPointer):
4008        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
4009        * WebKit2.xcodeproj/project.pbxproj:
4010
40112011-05-09  Adam Roben  <aroben@apple.com>
4012
4013        Always set the font rendering mode based on preference values
4014
4015        WebPage::platformInitialize and WebPage::platformPreferencesDidChange were fighting over the
4016        font rendering mode. The platformInitialize code predates preference-based font rendering
4017        mode support, and is now redundant and incorrect.
4018
4019        Fixes <http://webkit.org/b/60494> WebKit2 uses GDI text instead of CG text when
4020        FontSmoothing preference is set to kWKFontSmoothingLevelNoSubpixelAntiAliasing in a .plist
4021        on disk
4022
4023        Reviewed by Sam Weinig.
4024
4025        * WebProcess/WebPage/win/WebPageWin.cpp:
4026        (WebKit::WebPage::platformInitialize): Removed code to set the font rendering mode.
4027        platformPreferencesDidChange will take care of this for us.
4028
40292011-05-09  Anders Carlsson  <andersca@apple.com>
4030
4031        Reviewed by John Sullivan.
4032
4033        Clean up NetscapePluginModule::getPluginInfo
4034        https://bugs.webkit.org/show_bug.cgi?id=60486
4035
4036        Make all 'get' functions take a PluginInfoStore::Plugin reference, since getPluginInfoFromPropertyLists
4037        is going to need it to know the path and plug-in architecture.
4038
4039        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
4040        (WebKit::getPluginArchitecture):
4041        (WebKit::getPluginInfoFromPropertyLists):
4042        (WebKit::getPluginInfoFromCarbonResources):
4043        (WebKit::NetscapePluginModule::getPluginInfo):
4044
40452011-05-09  Dan Bernstein  <mitz@apple.com>
4046
4047        Reviewed by Darin Adler.
4048
4049        <rdar://problem/9005982> REGRESSION (r85780): Flash of white when a WKView with composited content moves on-screen
4050        https://bugs.webkit.org/show_bug.cgi?id=60488
4051
4052        * WebProcess/WebPage/DrawingAreaImpl.cpp:
4053        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Update m_compositingAccordingToProxyMessages,
4054        since the DidUpdateBackingStoreState message also changes the compositing state in the proxy.
4055
40562011-05-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
4057
4058        Reviewed by Andreas Kling.
4059
4060        Build fix for WebKit 2 on Qt
4061
4062        Qt treats warnings as errors so it does not build with unused variables. This patch removed two unused variable in WebKit 2.
4063
4064        * UIProcess/TiledDrawingAreaProxy.cpp:
4065        (WebKit::TiledDrawingAreaProxy::createTiles):
4066        * WebProcess/Plugins/PluginView.cpp:
4067        (WebKit::PluginView::~PluginView):
4068
40692011-05-07  Dan Bernstein  <mitz@apple.com>
4070
4071        Reviewed by Timothy Hatcher.
4072
4073        <rdar://problem/9365358> REGRESSION (WebKit2): When clicking in the page, Find overlay fades out instead of disappearing immediately
4074
4075        * WebProcess/WebPage/FindController.cpp:
4076        (WebKit::FindController::hideFindUI): Do not fade out the overlay.
4077
40782011-05-07  Dan Bernstein  <mitz@apple.com>
4079
4080        Avoid copying a header file into the WebKit2 framework wrapper.
4081
4082        * WebKit2.xcodeproj/project.pbxproj: Corrected the target membership of HTTPCookieAcceptPolicy.h.
4083
40842011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
4085
4086        Unreviewed, rolling out r86016.
4087        http://trac.webkit.org/changeset/86016
4088        https://bugs.webkit.org/show_bug.cgi?id=60445
4089
4090        caused crashes on the WK2 Windows bots (Requested by
4091        jessieberlin on #webkit).
4092
4093        * Shared/WebProcessCreationParameters.cpp:
4094        (WebKit::WebProcessCreationParameters::encode):
4095        (WebKit::WebProcessCreationParameters::decode):
4096        * Shared/WebProcessCreationParameters.h:
4097        * Shared/win/WebCoreArgumentCodersWin.cpp:
4098        (CoreIPC::decodeResourceRequest):
4099        * UIProcess/win/WebContextWin.cpp:
4100        (WebKit::WebContext::platformInitializeWebProcess):
4101        * WebProcess/WebPage/win/WebPageWin.cpp:
4102        (WebKit::cachedResponseForURL):
4103        * WebProcess/win/WebProcessWin.cpp:
4104        (WebKit::WebProcess::platformSetCacheModel):
4105        (WebKit::WebProcess::platformClearResourceCaches):
4106        (WebKit::WebProcess::platformInitializeWebProcess):
4107
41082011-05-07  Jessie Berlin  <jberlin@apple.com>
4109
4110        Reviewed by Steve Falkenburg.
4111
4112        [Windows WebKit2] Use cookies set in WebKit1
4113        https://bugs.webkit.org/show_bug.cgi?id=60274
4114
4115        Share the default storage session between the UI and Web Processes.
4116
4117        * Shared/WebProcessCreationParameters.cpp:
4118        (WebKit::WebProcessCreationParameters::encode):
4119        (WebKit::WebProcessCreationParameters::decode):
4120        * Shared/WebProcessCreationParameters.h:
4121        Add a parameter for a serialized default storage session, used only on Windows.
4122
4123        * Shared/win/WebCoreArgumentCodersWin.cpp:
4124        (CoreIPC::decodeResourceRequest):
4125        Make sure to set the current storage session on any requests used by the Web
4126        Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
4127        doing anything with the Web Process's default storage session.
4128
4129        * UIProcess/win/WebContextWin.cpp:
4130        (WebKit::WebContext::platformInitializeWebProcess):
4131        Serialize the default storage session in the UI Process and add it to the
4132        WebProcessCreationParameters.
4133
4134        * WebProcess/WebPage/win/WebPageWin.cpp:
4135        (WebKit::cachedResponseForURL):
4136        Use the cache associated with the current storage session and make sure the request has the
4137        current storage session set on it before doing anything with it.
4138
4139        * WebProcess/win/WebProcessWin.cpp:
4140        (WebKit::WebProcess::platformSetCacheModel):
4141        Use the default storage session.
4142        (WebKit::WebProcess::platformClearResourceCaches):
4143        Ditto.
4144        (WebKit::WebProcess::platformInitializeWebProcess):
4145        Deserialize the default storage session passed in by the UI Process and hand it to the
4146        ResourceHandle.
4147
41482011-05-07  Keith Kyzivat  <keith.kyzivat@nokia.com>
4149
4150        Reviewed by Adam Roben.
4151
4152        [Qt] Webkit2 PLUGIN_ARCHITECTURE(UNSUPPORTED) configuration broken by r85961
4153        https://bugs.webkit.org/show_bug.cgi?id=60420
4154
4155        * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
4156        (WebKit::NetscapePlugin::platformVisibilityDidChange):
4157
41582011-05-06  Martin Robinson  <mrobinson@igalia.com>
4159
4160        Reviewed by Xan Lopez.
4161
4162        [GTK] [WebKit2] WebView::windowToScreen needs an implementation
4163        https://bugs.webkit.org/show_bug.cgi?id=55960
4164
4165        Add an implementation of PageClient::windowToScreen for GTK+ WebKit2 using
4166        the newly abstracted widget to screen coordinate translation code in WebCore.
4167
4168        * UIProcess/API/gtk/PageClientImpl.cpp:
4169        (WebKit::PageClientImpl::windowToScreen): Added implementation.
4170
41712011-05-06  Anders Carlsson  <andersca@apple.com>
4172
4173        Reviewed by Dan Bernstein.
4174
4175        Simplify the PluginInfoStore interface
4176        https://bugs.webkit.org/show_bug.cgi?id=60406
4177
4178        Just expose a single API for getting a list of plug-ins from the info store,
4179        PluginInfoStore::plugins and remove PluginInfoStore::getPlugins and PluginInfoStore::getPluginPaths.
4180
4181        Also, change the WebContext::pluginInfoStore() getter to return a reference.
4182
4183        * UIProcess/Plugins/PluginInfoStore.cpp:
4184        (WebKit::PluginInfoStore::plugins):
4185        * UIProcess/Plugins/PluginInfoStore.h:
4186        * UIProcess/Plugins/PluginProcessManager.cpp:
4187        (WebKit::PluginProcessManager::getPluginProcessConnection):
4188        * UIProcess/Plugins/PluginProcessManager.h:
4189        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
4190        (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
4191        (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
4192        (WebKit::WebPluginSiteDataManager::getSitesWithData):
4193        (WebKit::WebPluginSiteDataManager::clearSiteData):
4194        * UIProcess/WebContext.cpp:
4195        (WebKit::WebContext::getPlugins):
4196        (WebKit::WebContext::getPluginPath):
4197        * UIProcess/WebContext.h:
4198        (WebKit::WebContext::pluginInfoStore):
4199        * UIProcess/WebPageProxy.cpp:
4200        (WebKit::WebPageProxy::canShowMIMEType):
4201
42022011-05-06  Anders Carlsson  <andersca@apple.com>
4203
4204        Windows build fix.
4205
4206        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
4207        (WebKit::PluginInfoStore::shouldUsePlugin):
4208
42092011-05-06  Anders Carlsson  <andersca@apple.com>
4210
4211        Reviewed by Dan Bernstein.
4212
4213        Make more PluginInfoStore member functions static
4214        https://bugs.webkit.org/show_bug.cgi?id=60401
4215
4216        This is a first step towards making PluginInfoStore thread safe.
4217
4218        * UIProcess/Plugins/PluginInfoStore.cpp:
4219        (WebKit::PluginInfoStore::loadPluginsIfNecessary):
4220        (WebKit::PluginInfoStore::loadPlugin):
4221        * UIProcess/Plugins/PluginInfoStore.h:
4222        * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
4223        (WebKit::PluginInfoStore::shouldUsePlugin):
4224        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
4225        (WebKit::PluginInfoStore::shouldUsePlugin):
4226        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
4227        (WebKit::PluginInfoStore::shouldUsePlugin):
4228
42292011-05-06  Adam Roben  <aroben@apple.com>
4230
4231        Mac build fix
4232
4233        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added a
4234        missing #import.
4235
42362011-05-06  Adam Roben  <aroben@apple.com>
4237
4238        Show/hide windowed plugins according to the plugin element's visibility CSS property
4239
4240        Fixes <http://webkit.org/b/60285> <rdar://problem/9152400> REGRESSION (WebKit2): A white
4241        rectangle covers up important UI elements when composing a new message at mail.yahoo.com
4242        with BrowserPlus! plug-in installed
4243
4244        Reviewed by Anders Carlsson.
4245
4246        * PluginProcess/PluginControllerProxy.cpp:
4247        (WebKit::PluginControllerProxy::isPluginVisible):
4248        * PluginProcess/PluginControllerProxy.h:
4249        Stubbed out.
4250
4251        * Shared/win/WindowGeometry.cpp:
4252        (WebKit::WindowGeometry::WindowGeometry):
4253        (WebKit::WindowGeometry::encode):
4254        (WebKit::WindowGeometry::decode):
4255        * Shared/win/WindowGeometry.h:
4256        Added visible member.
4257
4258        * UIProcess/win/WebView.cpp:
4259        (WebKit::WebView::updateChildWindowGeometries): Show or hide the window as specified in the
4260        geometry.
4261
4262        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
4263        (WebKit::NetscapePlugin::visibilityDidChange):
4264        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
4265        Added. Calls through to platform-specific code.
4266
4267        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
4268        (WebKit::NetscapePlugin::platformVisibilityDidChange):
4269        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
4270        (WebKit::NetscapePlugin::platformVisibilityDidChange):
4271        Stubbed out.
4272
4273        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
4274        (WebKit::NetscapePlugin::platformGeometryDidChange): Moved most logic from here to
4275        scheduleWindowedGeometryUpdate.
4276        (WebKit::NetscapePlugin::platformVisibilityDidChange): Added. Calls through to
4277        scheduleWindowedGeometryUpdate.
4278        (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): Added. Code came from
4279        platformGeometryDidChange. Now also records whether the plugin element is visible.
4280
4281        * WebProcess/Plugins/Plugin.h: Added visibilityDidChange.
4282
4283        * WebProcess/Plugins/PluginController.h: Added isPluginVisible.
4284
4285        * WebProcess/Plugins/PluginProxy.cpp:
4286        (WebKit::PluginProxy::visibilityDidChange):
4287        * WebProcess/Plugins/PluginProxy.h:
4288        Stubbed out.
4289
4290        * WebProcess/Plugins/PluginView.cpp:
4291        (WebKit::PluginView::show):
4292        (WebKit::PluginView::hide):
4293        Added. These Widget overrides were based on WebCore's PluginView class.
4294
4295        (WebKit::PluginView::viewVisibilityDidChange): Added. Similar to viewGeometryDidChange.
4296        Calls down to the plugin if it's been initialized.
4297        (WebKit::PluginView::isPluginVisible): Added. Just calls up to the Widget base class.
4298
4299        * WebProcess/Plugins/PluginView.h: Updated for PluginController changes.
4300
43012011-05-06  Adam Roben  <aroben@apple.com>
4302
4303        Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message
4304
4305        This will make it easier to add more info to this message in the future (like whether the
4306        window is visible).
4307
4308        Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate
4309        message is tedious
4310
4311        Reviewed by Anders Carlsson.
4312
4313        * Scripts/webkit2/messages.py:
4314        (struct_or_class): Added WindowGeometry to the list of structs.
4315
4316        * Shared/win/WindowGeometry.cpp: Added.
4317        * Shared/win/WindowGeometry.h: Added.
4318
4319        * win/WebKit2.vcproj: Added new files.
4320
4321        * UIProcess/PageClient.h:
4322        * UIProcess/WebPageProxy.h:
4323        * UIProcess/WebPageProxy.messages.in:
4324        * UIProcess/win/WebPageProxyWin.cpp:
4325        (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
4326        * UIProcess/win/WebView.cpp:
4327        (WebKit::WebView::scheduleChildWindowGeometryUpdate):
4328        (WebKit::WebView::updateChildWindowGeometries):
4329        * UIProcess/win/WebView.h:
4330        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
4331        (WebKit::NetscapePlugin::platformGeometryDidChange):
4332        * WebProcess/Plugins/PluginController.h:
4333        * WebProcess/Plugins/PluginView.cpp:
4334        (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
4335        * WebProcess/Plugins/PluginView.h:
4336        * WebProcess/WebPage/WebPage.h:
4337        * WebProcess/WebPage/win/WebPageWin.cpp:
4338        (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
4339        Changed to use WindowGeometry.
4340
43412011-05-06  David Kilzer  <ddkilzer@apple.com>
4342
4343        Remove unused GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings
4344
4345        Reviewed by Jon Honeycutt.
4346
4347        This fixes an Xcode 4 warning about using obsolete settings.
4348
4349        * WebKit2.xcodeproj/project.pbxproj: Removed
4350        GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings.
4351
43522011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
4353
4354        Reviewed by Martin Robinson.
4355
4356        [GTK] Implement NetscapePlugin::platformPaint for GTK platform
4357        https://bugs.webkit.org/show_bug.cgi?id=60368
4358
4359        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
4360        (WebKit::NetscapePlugin::platformPaint):
4361
43622011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
4363
4364        Reviewed by Martin Robinson.
4365
4366        Share PluginInfoStore implementation between Qt and GTK ports
4367        https://bugs.webkit.org/show_bug.cgi?id=60366
4368
4369        * GNUmakefile.am:
4370        * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Removed.
4371        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
4372        (WebKit::PluginInfoStore::pluginsDirectories):
4373        (WebKit::PluginInfoStore::pluginPathsInDirectory):
4374        (WebKit::PluginInfoStore::individualPluginPaths):
4375        (WebKit::PluginInfoStore::getPluginInfo):
4376        (WebKit::PluginInfoStore::shouldUsePlugin):
4377        * WebKit2.pro:
4378
43792011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
4380
4381        Unreviewed. Fix WebKit2 GTK build after r85860.
4382
4383        * UIProcess/API/gtk/PageClientImpl.h: Fix typo.
4384
43852011-05-05  Philippe Normand  <pnormand@igalia.com>
4386
4387        Reviewed by Dimitri Glazkov.
4388
4389        Implement LayoutTestController::pseudoShadowId()
4390        https://bugs.webkit.org/show_bug.cgi?id=60034
4391
4392        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
4393        (WKBundleNodeHandleShadowPseudoId):
4394        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
4395        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
4396        (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot):
4397        (WebKit::InjectedBundleNodeHandle::elementShadowPseudoId):
4398        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
4399
44002011-05-05  Sam Weinig  <sam@webkit.org>
4401
4402        Reviewed by Anders Carlsson.
4403
4404        REGRESSION (r85689): Unresponsive timer firing when closing background tabs
4405        <rdar://problem/9385988>
4406        https://bugs.webkit.org/show_bug.cgi?id=60325
4407
4408        When calling WKPageTryClose(), if the page close succeeded, the notification to stop
4409        the responsiveness timer would be dropped because the page was closed by the time it
4410        got to the UIProcess.
4411
4412        * UIProcess/WebPageProxy.cpp:
4413        (WebKit::WebPageProxy::closePage):
4414        * UIProcess/WebPageProxy.h:
4415        * UIProcess/WebPageProxy.messages.in:
4416        Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
4417
4418        * WebProcess/WebPage/WebPage.cpp:
4419        (WebKit::WebPage::tryClose):
4420        (WebKit::WebPage::sendClose):
4421        Instead of sending a StopResponsivenessTimer message after sending the ClosePage message,
4422        add a bit to the ClosePage message.
4423
44242011-05-05  Dan Bernstein  <mitz@apple.com>
4425
4426        Reviewed by Simon Fraser.
4427
4428        WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer
4429
4430        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
4431        (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
4432
44332011-05-05  Keith Kyzivat  <keith.kyzivat@nokia.com>
4434
4435        Reviewed by Laszlo Gombos.
4436
4437        [Qt] [WK2] Add method to disable plugins under WK2
4438        https://bugs.webkit.org/show_bug.cgi?id=57796
4439
4440        * config.h: Allow PLUGIN_ARCHITECTURE_UNSUPPORTED to be defined on build command line
4441
44422011-05-05  Anders Carlsson  <andersca@apple.com>
4443
4444        Reviewed by Sam Weinig.
4445
4446        When an underlay surface is active, paint normal web contents in a transparency layer
4447        https://bugs.webkit.org/show_bug.cgi?id=60296
4448
4449        In order for the page contents to correctly blend with the underlay, the page contents
4450        needs to be painted in a transparency layer.
4451
4452        * WebProcess/WebPage/WebPage.cpp:
4453        (WebKit::WebPage::drawRect):
4454
44552011-05-05  Brian Weinstein  <bweinstein@apple.com>
4456
4457        Reviewed by Timothy Hatcher.
4458
4459        WebKit2: Docking Web Inspector doesn't respect maximum inspector size
4460        https://bugs.webkit.org/show_bug.cgi?id=60294
4461        <rdar://problem/9388518>
4462        
4463        Before we place the inspector and the inspected views, make sure that we have constrained the height
4464        of the docked inspector. Putting the code here covers both when the inspector is initially attached 
4465        and when a window with the docked inspector is resized.
4466
4467        * UIProcess/mac/WebInspectorProxyMac.mm:
4468        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.
4469        * UIProcess/win/WebInspectorProxyWin.cpp:
4470        (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.
4471
44722011-05-05  Chang Shu  <cshu@webkit.org>
4473
4474        Reviewed by Andreas Kling.
4475
4476        [Qt][WK2] Support PageGroup in QGraphicsWKView/QWKPage constructors
4477        https://bugs.webkit.org/show_bug.cgi?id=59638
4478
4479        Added private constructors for class QGraphicsWKView and QWKPage to support
4480        WKPageGroupRef.
4481
4482        * UIProcess/API/qt/qgraphicswkview.cpp:
4483        (QGraphicsWKView::QGraphicsWKView):
4484        (QGraphicsWKView::~QGraphicsWKView):
4485        (QGraphicsWKView::init):
4486        * UIProcess/API/qt/qgraphicswkview.h:
4487        * UIProcess/API/qt/qwkpage.cpp:
4488        (QWKPagePrivate::QWKPagePrivate):
4489        (QWKPage::QWKPage):
4490        (QWKPage::~QWKPage):
4491        (QWKPage::init):
4492        * UIProcess/API/qt/qwkpage.h:
4493        * UIProcess/API/qt/qwkpage_p.h:
4494
44952011-05-05  Brent Fulgham  <bfulgham@webkit.org>
4496
4497        [WinCairo] Unreviewed build fix.
4498
4499        * WebProcess/WebPage/win/WebPageWin.cpp:
4500        (WebKit::WebPage::cachedResponseDataForURL): Stub out
4501        implementation for cURL networking case.
4502
45032011-05-05  Jeff Miller  <jeffm@apple.com>
4504
4505        Reviewed by Darin Adler.
4506
4507        Add didNotHandleWheelEvent callback to WKPageUIClient
4508        https://bugs.webkit.org/show_bug.cgi?id=60203
4509        
4510        Remove Windows-specific WebPageProxy::wheelEventNotHandled() member function and use
4511        didNotHandleWheelEvent callback in WKPageUIClient instead.  It turns out that just
4512        resending the wheel event to the parent window doesn't provide the client with enough context
4513        to know that WebKit has already attempted to handle the event.
4514
4515        * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleWheelEventCallback typedef and didNotHandleWheelEvent to WKPageUIClient.
4516
4517        * UIProcess/API/gtk/PageClientImpl.cpp:
4518        (WebKit::PageClientImpl::didNotHandleWheelEvent): Added, but not implemented.
4519        * UIProcess/API/gtk/PageClientImpl.h: Added didNotHandleWheelEvent().
4520        * UIProcess/API/qt/qwkpage.cpp:
4521        (QWKPage::QWKPage):Stubbed out didNotHandleWheelEvent callback.
4522
4523        * UIProcess/WebPageProxy.cpp:
4524        (WebKit::WebPageProxy::didReceiveEvent): Call didNotHandleWheelEvent in WKPageUIClient if wheel event is not handled.
4525        * UIProcess/WebPageProxy.h: Removed wheelEventNotHandled().
4526        
4527        * UIProcess/WebUIClient.cpp:
4528        (WebKit::WebUIClient::implementsDidNotHandleWheelEvent): Added.
4529        (WebKit::WebUIClient::didNotHandleWheelEvent): Added.
4530        * UIProcess/WebUIClient.h: Added implementsDidNotHandleWheelEvent() and didNotHandleWheelEvent().
4531
4532        * UIProcess/win/WebPageProxyWin.cpp: Removed wheelEventNotHandled().
4533
45342011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
4535
4536        Reviewed by Martin Robinson.
4537
4538        [GTK] Return correct GTK version for NPNVToolkit
4539        https://bugs.webkit.org/show_bug.cgi?id=60275
4540
4541        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
4542        (WebKit::NPN_GetValue): Return always 2 for NPNVToolkit in GTK
4543        platform.
4544
45452011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
4546
4547        Reviewed by Martin Robinson.
4548
4549        [GTK] Make native events code more consistent
4550        https://bugs.webkit.org/show_bug.cgi?id=60258
4551
4552        Make all other native events code follow the current keyboard
4553        events approach: use a GOwnPtr for the native event, and use
4554        const GdkEvent* in the API. We need to implement the copy
4555        constructors for native events to copy the gdk events with
4556        gdk_event_copy().
4557
4558        * Shared/NativeWebMouseEvent.h:
4559        (WebKit::NativeWebMouseEvent::nativeEvent):
4560        * Shared/NativeWebWheelEvent.h:
4561        (WebKit::NativeWebWheelEvent::nativeEvent):
4562        * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
4563        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
4564        * Shared/gtk/NativeWebMouseEventGtk.cpp:
4565        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
4566        * Shared/gtk/NativeWebWheelEventGtk.cpp:
4567        (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
4568        * Shared/gtk/WebEventFactory.cpp:
4569        (WebKit::buttonForEvent):
4570        (WebKit::WebEventFactory::createWebMouseEvent):
4571        (WebKit::WebEventFactory::createWebWheelEvent):
4572        (WebKit::WebEventFactory::createWebKeyboardEvent):
4573        * Shared/gtk/WebEventFactory.h:
4574        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
4575        (webkitWebViewBaseScrollEvent):
4576
45772011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
4578
4579        Reviewed by Martin Robinson.
4580
4581        [GTK] Module::load() should return true when g_module_open() returns a valid pointer
4582        https://bugs.webkit.org/show_bug.cgi?id=60261
4583
4584        * Platform/gtk/ModuleGtk.cpp:
4585        (WebKit::Module::load):
4586
45872011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
4588
4589        Unreviewed. Fix WebKit2 GTK build after r85808.
4590
4591        * Shared/NativeWebWheelEvent.h:
4592        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
4593        (webkitWebViewBaseScrollEvent):
4594
45952011-05-04  Cris Neckar  <cdn@chromium.org>
4596
4597        Reviewed by Adam Barth.
4598
4599        Expose WebView directly through ChromeClient.
4600        https://bugs.webkit.org/show_bug.cgi?id=49902
4601
4602        * WebProcess/WebCoreSupport/WebChromeClient.h:
4603        (WebKit::WebChromeClient::webView):
4604
46052011-05-04  Jeff Miller  <jeffm@apple.com>
4606
4607        Reviewed by Darin Adler.
4608
4609        Send unhandled wheel events to parent window on Windows
4610        https://bugs.webkit.org/show_bug.cgi?id=60220
4611
4612        Keep track of wheel events using NativeWebWheelEvent instead of WebWheelEvent in WebPageProxy
4613        so we can send the native event to the parent window if WebKit doesn't handle it.
4614
4615        * UIProcess/API/mac/WKView.mm: Use NativeWebWheelEvent instead of WebWheelEvent.
4616
4617        * UIProcess/API/qt/qwkpage.cpp:
4618        (QWKPagePrivate::wheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
4619
4620        * UIProcess/WebPageProxy.cpp:
4621        (WebKit::WebPageProxy::WebPageProxy): Removed initialization of obsolete m_processingWheelEvent member variable.
4622        (WebKit::coalesceWheelEvents): Use NativeWebWheelEvent instead of WebWheelEvent and add a note that this won't work if we ever enable MERGE_WHEEL_EVENTS. 
4623        (WebKit::WebPageProxy::handleWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent, keep track of the current event in m_currentlyProcessedWheelEvent.
4624        (WebKit::WebPageProxy::didReceiveEvent): Call wheelEventNotHandled() on Windows if wheel event is not handled.
4625        (WebKit::WebPageProxy::processDidCrash): Clear out m_currentlyProcessedWheelEvent.
4626        * UIProcess/WebPageProxy.h: Change handleWheelEvent() to take a NativeWebWheelEvent, added wheelEventNotHandled() on Windows, remove m_processingWheelEvent, add m_currentlyProcessedWheelEvent.
4627
4628        * UIProcess/win/WebPageProxyWin.cpp:
4629        (WebKit::WebPageProxy::wheelEventNotHandled): Added.
4630        
4631        * UIProcess/win/WebView.cpp:
4632        (WebKit::WebView::onWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
4633
46342011-05-04  Anders Carlsson  <andersca@apple.com>
4635
4636        Reviewed by Darin Adler.
4637
4638        Add bundle API for making a page paint as the background of another page
4639        https://bugs.webkit.org/show_bug.cgi?id=60227
4640
4641        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
4642        (WKBundlePageSetUnderlayPage):
4643        Call WebPage::setUnderlayPage.
4644
4645        * WebProcess/WebPage/WebPage.cpp:
4646        (WebKit::WebPage::close):
4647        Null out the underlay page.
4648
4649        (WebKit::WebPage::layoutIfNeeded):
4650        Layout the underlay page if necessary.
4651
4652        (WebKit::WebPage::drawRect):
4653        Draw the underlay page.
4654
46552011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
4656
4657        Reviewed by Laszlo Gombos.
4658
4659        [Qt][Wk2][Symbian] Capabilities for Qt MiniBrowser and QtWebProcess on Symbian
4660        https://bugs.webkit.org/show_bug.cgi?id=59462
4661
4662        * WebProcess.pro: Add Symbian OS capabilities to web process executable. Also enable
4663        data paging flag and prevent application's icon from showing up in the application grid. 
4664
46652011-05-04  Adam Roben  <aroben@apple.com>
4666
4667        Clip and reposition windowed plugins when the UI process paints
4668
4669        This ensures that their geometry updates in sync with the rest of the page.
4670
4671        Most of this patch is just plumbing the scheduleWindowedPluginGeometryUpdate and
4672        scheduleChildWindowGeometryUpdate calls through from NetscapePlugin all the way over to
4673        WebView. I've tried to call out the other parts below.
4674
4675        Fixes <http://webkit.org/b/60210> <rdar://problem/8483441> REGRESSION (WebKit2): Windowed
4676        plugins don't scroll at the same speed as the rest of the page
4677
4678        Reviewed by Darin Adler and Anders Carlsson.
4679
4680        * UIProcess/PageClient.h:
4681        * UIProcess/WebPageProxy.h:
4682        * UIProcess/WebPageProxy.messages.in:
4683        * UIProcess/win/WebPageProxyWin.cpp:
4684        (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
4685        Added plumbing.
4686
4687        * UIProcess/win/WebView.cpp:
4688        (WebKit::WebView::onPaintEvent): Update child windows before painting so that they will stay
4689        in sync with the rest of the page.
4690        (WebKit::WebView::scheduleChildWindowGeometryUpdate): Add this update information to the
4691        set of geometries to update on the next paint.
4692        (WebKit::setWindowRegion): Moved this helper function here from NetscapePluginWin.cpp.
4693        (WebKit::WebView::updateChildWindowGeometries): Update the size, position, and clip rects of
4694        all the child windows with scheduled geometry updates.
4695
4696        * UIProcess/win/WebView.h: Added new members to track and update child window geometries.
4697
4698        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
4699        (WebKit::NetscapePlugin::platformPostInitialize): Don't show the window immediately. Let the
4700        UI process take care of it.
4701        (WebKit::NetscapePlugin::platformGeometryDidChange): Don't update the window's position or
4702        clip rect. Let the UI process take care of it.
4703
4704        * WebProcess/Plugins/PluginController.h:
4705        * WebProcess/Plugins/PluginView.cpp:
4706        (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
4707        * WebProcess/Plugins/PluginView.h:
4708        * WebProcess/WebPage/WebPage.h:
4709        * WebProcess/WebPage/win/WebPageWin.cpp:
4710        (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
4711        Added plumbing.
4712
47132011-05-04  Anders Carlsson  <andersca@apple.com>
4714
4715        Reviewed by Adam Roben.
4716
4717        WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:]
4718        https://bugs.webkit.org/show_bug.cgi?id=52009
4719        <rdar://problem/8829746>
4720
4721        Add and implement WKViewSetDrawsTransparentBackground on windows.
4722
4723        * UIProcess/API/C/win/WKView.cpp:
4724        (WKViewSetDrawsTransparentBackground):
4725        (WKViewDrawsTransparentBackground):
4726        Call through to the WebPageProxy object.
4727
4728        * UIProcess/API/C/win/WKView.h:
4729        * UIProcess/win/WebView.cpp:
4730        (WebKit::drawPageBackground):
4731        Don't fill the rect with white if WebPageProxy::drawsBackground() or 
4732        WebPageProxy::drawsTransparentBackground() returns false. Because of limitations in Win32,
4733        both drawsBackground and drawsTransparentBackground are pretty much equivalent.
4734
4735        (WebKit::WebView::paint):
4736        Pass the WebPageProxy object to drawPageBackground.
4737
47382011-05-04  Tao Bai  <michaelbai@chromium.org>
4739
4740        Reviewed by David Kilzer.
4741
4742        Populate touch-icon url to FrameLoaderClient
4743        https://bugs.webkit.org/show_bug.cgi?id=59143
4744
4745        Respected the change of FrameLoaderClient.
4746        Added WebIconURL and WebIconType responding the new IconURL and IconType.
4747        Supported to get the multiple icon urls.
4748
4749        * Configurations/FeatureDefines.xcconfig:
4750        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
4751        (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons):
4752        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
4753
47542011-05-04  Anders Carlsson  <andersca@apple.com>
4755
4756        Reviewed by Dan Bernstein.
4757
4758        Can't save a link from "Save Linked File to Download" popup menu
4759        https://bugs.webkit.org/show_bug.cgi?id=60190
4760        <rdar://problem/9367927>
4761
4762        Make sure that suggestedFilenameForResourceWithURL and resourceDataForFrame both look
4763        in the cache if the resource can't be found in the current web page. This matches WebKit1.
4764
4765        * WebProcess/WebPage/WebFrame.cpp:
4766        (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
4767        Call WebPage::cachedSuggestedFilenameForURL if we can't find a resource in the page.
4768
4769        * WebProcess/WebPage/WebPage.cpp:
4770        (WebKit::resourceDataForFrame):
4771        Move code out from getResourceDataFromFrame.
4772
4773        (WebKit::WebPage::getResourceDataFromFrame):
4774        Call resourceDataForFrame first and then cachedResponseDataForURL.
4775
4776        * WebProcess/WebPage/WebPage.h:
4777        * WebProcess/WebPage/gtk/WebPageGtk.cpp:
4778        (WebKit::WebPage::platformHasLocalDataForURL):
4779        (WebKit::WebPage::cachedResponseMIMETypeForURL):
4780        (WebKit::WebPage::platformCanHandleRequest):
4781        (WebKit::WebPage::cachedSuggestedFilenameForURL):
4782        (WebKit::WebPage::cachedResponseDataForURL):
4783        Add stubs.
4784
4785        * WebProcess/WebPage/mac/WebPageMac.mm:
4786        (WebKit::cachedResponseForURL):
4787        Add helper function.
4788
4789        (WebKit::WebPage::cachedSuggestedFilenameForURL):
4790        (WebKit::WebPage::cachedResponseMIMETypeForURL):
4791        (WebKit::WebPage::cachedResponseDataForURL):
4792        Call helper function.
4793
4794        * WebProcess/WebPage/qt/WebPageQt.cpp:
4795        (WebKit::WebPage::platformHasLocalDataForURL):
4796        (WebKit::WebPage::cachedResponseMIMETypeForURL):
4797        (WebKit::WebPage::platformCanHandleRequest):
4798        (WebKit::WebPage::cachedSuggestedFilenameForURL):
4799        (WebKit::WebPage::cachedResponseDataForURL):
4800        Add stubs.
4801        
4802        * WebProcess/WebPage/win/WebPageWin.cpp:
4803        (WebKit::cachedResponseForURL):
4804        Add helper function.
4805
4806        (WebKit::WebPage::platformHasLocalDataForURL):
4807        (WebKit::WebPage::cachedResponseMIMETypeForURL):
4808        (WebKit::WebPage::cachedSuggestedFilenameForURL):
4809        (WebKit::WebPage::cachedResponseDataForURL):
4810        Call helper function.
4811
48122011-05-04  Simon Fraser  <simon.fraser@apple.com>
4813
4814        Reviewed by Anders Carlsson.
4815
4816        WebKit2 flashes if entering and exiting compositing rapidly
4817        https://bugs.webkit.org/show_bug.cgi?id=60198
4818        
4819        If a page enters then immediately leaves compositing mode, the
4820        DrawingAreaImpl would send a message to the UI process that it
4821        had entered compositing even after all the layers had been torn
4822        down. Fix this by never sending the 'enter' message if we're
4823        waiting for the 'exit' timer to fire.
4824        
4825        Also fix an assertion in the UI process caused by sending mismatched
4826        'enter' and 'leave' messages by keeping track of which messages
4827        we've sent.
4828
4829        * WebProcess/WebPage/DrawingAreaImpl.cpp:
4830        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
4831        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
4832        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
4833        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
4834        * WebProcess/WebPage/DrawingAreaImpl.h:
4835        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModePending):
4836
48372011-05-04  Jeff Miller  <jeffm@apple.com>
4838
4839        Fix typo in svn property in r85756.
4840
4841        * Shared/mac/NativeWebWheelEventMac.mm: Added property svn:eol-style. Removed property snv:eol-style.
4842
48432011-05-04  Jeff Miller  <jeffm@apple.com>
4844
4845        Reviewed by Darin Adler.
4846
4847        Add NativeWebWheelEvent class
4848        https://bugs.webkit.org/show_bug.cgi?id=60182
4849        
4850        This will be needed soon when we start notifying the UI process that a mouse wheel event wasn't handled by WebKit.
4851
4852        * GNUmakefile.am: Added NativeWebWheelEventGtk.cpp and NativeWebWheelEvent.h.
4853        * Shared/NativeWebWheelEvent.h: Added.
4854        (WebKit::NativeWebWheelEvent::nativeEvent): Added.
4855        * Shared/gtk/NativeWebWheelEventGtk.cpp: Added.
4856        (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
4857        * Shared/mac/NativeWebWheelEventMac.mm: Added.
4858        (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
4859        * Shared/qt/NativeWebWheelEventQt.cpp: Added.
4860        (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
4861        * Shared/win/NativeWebWheelEventWin.cpp: Added.
4862        (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):Added.
4863        * WebKit2.pro: Added NativeWebWheelEventQt.cpp and NativeWebWheelEvent.h.
4864        * WebKit2.xcodeproj/project.pbxproj: Added NativeWebWheelEventMac.mm and NativeWebWheelEvent.h.
4865        * win/WebKit2.vcproj: Added NativeWebWheelEventWin.cpp and NativeWebWheelEvent.h.
4866
48672011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
4868
4869        Reviewed by Anders Carlsson.
4870
4871        ArgumentDecoder should use aligned memory for its internal copy of data
4872        https://bugs.webkit.org/show_bug.cgi?id=59960 
4873
4874        Since we check for memory alignment when unpacking primitive types from the buffer,
4875        insure alignment of the base address.
4876        As uint64_t is the largest type we use in Argument encoder/decoder, use 8 byte alignment. 
4877
4878        * Platform/CoreIPC/ArgumentDecoder.cpp:
4879        (CoreIPC::ArgumentDecoder::~ArgumentDecoder): free m_alignedBase
4880        (CoreIPC::roundUpToAlignment): move this up in the source file
4881        (CoreIPC::ArgumentDecoder::initialize): m_buffer is now guaranteed sizeof(uint64_t) aligned
4882        * Platform/CoreIPC/ArgumentDecoder.h: add m_alignedBase member which needs to be freed in d'tor
4883
48842011-05-04  Adam Roben  <aroben@apple.com>
4885
4886        Make ShareableBitmap::makeCGImageCopy use a copy-on-write copy on Windows when possible
4887
4888        Fixes <http://webkit.org/b/57269> <rdar://problem/9198788> REGRESSION (r82151): Every WKView
4889        paint now makes an extra copy of the painted bits
4890
4891        Reviewed by Anders Carlsson.
4892
4893        * Platform/SharedMemory.h:
4894        * Platform/win/SharedMemoryWin.cpp:
4895        (WebKit::SharedMemory::createCopyOnWriteCopy):
4896        Added this new function. Creates a copy-on-write copy of the first |size| bytes of the
4897        original SharedMemory.
4898
4899        * Shared/ShareableBitmap.h: Added createCGImage helper function.
4900
4901        * Shared/cg/ShareableBitmapCG.cpp:
4902        (WebKit::ShareableBitmap::makeCGImageCopy): Don't compile this version of this function on
4903        Windows; we'll provide our own implementation since CGBitmapContextCreateImage isn't smart
4904        enough to make a copy-on-write copy on Windows.
4905        (WebKit::ShareableBitmap::makeCGImage): Moved some code from here...
4906        (WebKit::ShareableBitmap::createCGImage): ...to this new function.
4907
4908        * Shared/cg/win/ShareableBitmapCGWin.cpp: Added.
4909        (WebKit::derefSharedMemory): This function is called when the CGDataProvider is finalized.
4910        All we have to do is deref the SharedMemory that was backing the CGDataProvider.
4911        (WebKit::ShareableBitmap::makeCGImageCopy): Create a copy-on-write copy of the image data
4912        when possible. We use the copy-on-write copy to back this ShareableBitmap from here on out,
4913        and use the original SharedMemory to back the CGImage. This should prevent future
4914        modifications to the ShareableBitmap from affecting the CGImage. If we can't make a
4915        copy-on-write copy, we fall back to just copying the data normally.
4916
4917        * win/WebKit2.vcproj: Added ShareableBitmapCGWin.cpp.
4918
49192011-05-04  Adam Roben  <aroben@apple.com>
4920
4921        Let transparent windowless plugins draw into a graphics context with an alpha channel
4922
4923        Fixes <http://webkit.org/b/57647> <rdar://problem/9168462> Flash plugins with
4924        wmode=transparent have black (instead of transparent) background in WebKit2 on Windows
4925
4926        I had trouble writing a test case for this, so I split that task out into
4927        <http://webkit.org/b/60169>.
4928
4929        Reviewed by Sam Weinig.
4930
4931        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
4932        (WebKit::NetscapePlugin::platformPaint): Give the graphics context an alpha channel if this
4933        is a transparent windowless plugin.
4934
49352011-05-03  Adam Roben  <aroben@apple.com>
4936
4937        Remove WebPageProxy::setDrawingArea
4938
4939        It is unused. It also does a useless equality comparison between OwnPtrs; if they are equal,
4940        we've already lost.
4941
4942        Reviewed by Anders Carlsson and Antti Koivisto.
4943
4944        * UIProcess/WebPageProxy.cpp:
4945        * UIProcess/WebPageProxy.h:
4946        Removed setDrawingArea.
4947
4948        (WebKit::WebPageProxy::drawingArea):
4949        (WebKit::WebPageProxy::backForwardList):
4950        Made these functions const while I was at it.
4951
49522011-05-03  Pratik Solanki  <psolanki@apple.com>
4953
4954        Reviewed by Antti Koivisto.
4955
4956        Part of WebCore should use CFNetwork-based loader on Mac
4957        https://bugs.webkit.org/show_bug.cgi?id=51836
4958
4959        Merge the conflicting definitions of WebCore::privateBrowsingCookieStorage() into one.
4960
4961        * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
4962        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
4963
49642011-05-02  Jer Noble  <jer.noble@apple.com>
4965
4966        Reviewed by Adam Roben.
4967
4968        Implement FULLSCREEN_API on Windows, Part 3: WebKit2
4969        https://bugs.webkit.org/show_bug.cgi?id=59845
4970
4971        Implement a similar full screen mode to WebKit; Re-use the same
4972        full screen window class used in WebKit in the new WebFullScreenController.
4973        No animations (yet), so many of the stubs remain unimplemented.
4974
4975        * UIProcess/win/WebView.cpp:
4976        (WebKit::WebView::onKeyEvent): Handle VK_ESCAPE and cancel full screen
4977            mode if caught.
4978        (WebKit::WebView::fullScreenController): Lazily instantiate m_fullScreenController.
4979        (WebKit::WebView::fullScreenClientWindow): Added accessor.
4980        (WebKit::WebView::fullScreenClientParentWindow): Ditto.
4981        (WebKit::WebView::fullScreenClientSetParentWindow): Ditto.
4982        (WebKit::WebView::fullScreenClientWillEnterFullScreen): Pass through to WebFullScreenManagerProxy.
4983        (WebKit::WebView::fullScreenClientDidEnterFullScreen): Ditto.
4984        (WebKit::WebView::fullScreenClientWillExitFullScreen): Ditto.
4985        (WebKit::WebView::fullScreenClientDidExitFullScreen): Ditto.
4986        * UIProcess/win/WebView.h:
4987        * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
4988        (WebKit::WebFullScreenManagerProxy::enterFullScreen): Pass through to 
4989            WebFullScreenController.
4990        (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
4991        * UIProcess/win/WebView.cpp:
4992        (WebKit::WebView::WebView):
4993        (WebKit::WebView::onKeyEvent): Handle the escape key and exit
4994           full screen mode when detected.
4995        (WebKit::WebView::fullScreenWindowController): Added.
4996        * UIProcess/win/WebView.h:
4997        * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
4998        (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin):
4999        (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Host the root
5000            full screen layer if it gets detached.
5001        * WebProcess/FullScreen/win/WebFullScreenManagerWin.h:
5002        * win/WebKit2.vcproj:
5003
50042011-05-03  Brady Eidson  <beidson@apple.com>
5005
5006        Reviewed by Sam Weinig.
5007
5008        https://bugs.webkit.org/show_bug.cgi?id=60087 and <rdar://problem/9373182>
5009        WK2 Icon Database should provide access to all image representations in the icon.
5010
5011        Expose a CFArrayRef of CGImageRefs as API for CG platforms:
5012        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
5013        (WKIconDatabaseTryCopyCGImageArrayForURL):
5014        * UIProcess/API/C/cg/WKIconDatabaseCG.h:
5015
50162011-05-03  Sam Weinig  <sam@webkit.org>
5017
5018        Reviewed by Dan Bernstein.
5019
5020        WebKit2 should treat API calls that start/stop loads as user gestures for responsiveness timer
5021        https://bugs.webkit.org/show_bug.cgi?id=60083
5022
5023        * UIProcess/WebPageProxy.cpp:
5024        (WebKit::WebPageProxy::reattachToWebProcessWithItem):
5025        (WebKit::WebPageProxy::tryClose):
5026        (WebKit::WebPageProxy::loadURL):
5027        (WebKit::WebPageProxy::loadURLRequest):
5028        (WebKit::WebPageProxy::loadHTMLString):
5029        (WebKit::WebPageProxy::loadAlternateHTMLString):
5030        (WebKit::WebPageProxy::loadPlainTextString):
5031        (WebKit::WebPageProxy::stopLoading):
5032        (WebKit::WebPageProxy::reload):
5033        (WebKit::WebPageProxy::goForward):
5034        (WebKit::WebPageProxy::goBack):
5035        (WebKit::WebPageProxy::goToBackForwardItem):
5036        Start responsiveness timer for load start/stop and close.
5037
5038        * WebProcess/WebPage/WebPage.cpp:
5039        (WebKit::SendStopResponsivenessTimer::SendStopResponsivenessTimer):
5040        (WebKit::SendStopResponsivenessTimer::~SendStopResponsivenessTimer):
5041        Add simple RAII class to ensure the StopResponsivenessTimer is called.
5042
5043        (WebKit::WebPage::tryClose):
5044        (WebKit::WebPage::loadURLRequest):
5045        (WebKit::WebPage::loadData):
5046        (WebKit::WebPage::stopLoading):
5047        (WebKit::WebPage::reload):
5048        (WebKit::WebPage::goForward):
5049        (WebKit::WebPage::goBack):
5050        (WebKit::WebPage::goToBackForwardItem):
5051        Sends a message back to the UIProcess to indicate the WebProcess
5052        is still responsive.
5053
50542011-05-03  Darin Adler  <darin@apple.com>
5055
5056        Reviewed by Sam Weinig.
5057
5058        <rdar://problem/9250444> Enter key doesn't work in a web text field (but Return key does)
5059
5060        No test at this time because the WebKit2 eventSender doesn't use this code path.
5061
5062        * Shared/mac/WebEventFactory.mm:
5063        (WebKit::WebEventFactory::createWebKeyboardEvent): Copied the code to special-case certain
5064        keys from the corresponding Mac WebKit1 code path.
5065
50662011-05-03  Jeff Miller  <jeffm@apple.com>
5067
5068        Reviewed by Darin Adler.
5069
5070        Unreachable URL is lost when canceling load of a new page
5071        https://bugs.webkit.org/show_bug.cgi?id=60057
5072        <rdar://problem/9049135>
5073        
5074        When setting the unreachable URL in the WebFrameProxy, keep track of any previous unreachable URL
5075        so we can restore it if the page load fails.
5076
5077        * UIProcess/WebFrameProxy.cpp:
5078        (WebKit::WebFrameProxy::didFailProvisionalLoad): Restore m_unreachableURL to previous value.
5079        (WebKit::WebFrameProxy::setUnreachableURL): Keep track of previous unreachable URL in m_lastUnreachableURL.
5080        * UIProcess/WebFrameProxy.h: Moved setUnreachableURL() implementation to .cpp file, added m_lastUnreachableURL.
5081
50822011-05-03  Adam Roben  <aroben@apple.com>
5083
5084        Fix most strict PassOwnPtr violations on Windows
5085
5086        Fixes <http://webkit.org/b/60025> Windows should (almost) build with strict PassOwnPtr
5087        enabled
5088
5089        Reviewed by Anders Carlsson.
5090
5091        * Platform/CoreIPC/win/ConnectionWin.cpp:
5092        (CoreIPC::Connection::writeEventHandler): Use nullptr.
5093
50942011-05-03  Julien Chaffraix  <jchaffraix@codeaurora.org>
5095
5096        Reviewed by Dimitri Glazkov.
5097
5098        Element:shadowRoot & Element::ensureShadowRoot should return ShadowRoot*
5099        https://bugs.webkit.org/show_bug.cgi?id=58703
5100
5101        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added #include for ShadowRoot.h.
5102
51032011-05-03  Sam Weinig  <sam@webkit.org>
5104
5105        Reviewed by Anders Carlsson.
5106
5107        More quarantine related sandbox denial when downloading files
5108        <rdar://problem/9362626>
5109
5110        * WebProcess/com.apple.WebProcess.sb:
5111
51122011-05-02  Adam Roben  <aroben@apple.com>
5113
5114        Take advantage of implicit conversion from nullptr_t to PassOwnPtr
5115
5116        Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
5117        doesn't work, but should
5118
5119        Reviewed by Adam Barth.
5120
5121        * Platform/CoreIPC/Connection.cpp:
5122        * UIProcess/qt/WebContextMenuProxyQt.cpp:
5123        * WebProcess/InjectedBundle/InjectedBundle.cpp:
5124        * WebProcess/WebPage/DrawingArea.cpp:
5125
51262011-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
5127
5128        Reviewed by Eric Seidel.
5129
5130        [GTK] Build webkit1 even when webkit2 is enabled
5131        https://bugs.webkit.org/show_bug.cgi?id=59695
5132
5133        * GNUmakefile.am:
5134
51352011-05-02  Yael Aharon  <yael.aharon@nokia.com>
5136
5137        Reviewed by Andreas Kling.
5138
5139        [Qt] White screen displays when using MiniBrowser with DrawingAreaImpl
5140        https://bugs.webkit.org/show_bug.cgi?id=60003
5141
5142        When using DrawingAreaImpl, we need to properly pass the viewSize to the WebPage.
5143        Otherwise, the dirty rect will always be empty and we will not draw.
5144
5145        * UIProcess/API/qt/qwkpage.cpp:
5146        (QWKPagePrivate::viewSize):
5147
51482011-05-02  Anders Carlsson  <andersca@apple.com>
5149
5150        Fix crash that was introduced in r85515.
5151
5152        * Platform/CoreIPC/Connection.cpp:
5153        (CoreIPC::Connection::dispatchSyncMessage):
5154        If didReceiveSyncMessage returns ManualReply, the client took ownership of the reply
5155        encoder so we must leak it to avoid a double-free.
5156
51572011-05-02  Anders Carlsson  <andersca@apple.com>
5158
5159        Reviewed by Sam Weinig.
5160
5161        The web process locks up when the plug-in process crashes
5162        https://bugs.webkit.org/show_bug.cgi?id=59999
5163        <rdar://problem/8889303>
5164
5165        Add a hash map from plug-in paths to CoreIPC connections to PluginProcessConnectionManager.
5166        Add PluginProcessConnectionManager::pluginProcessCrashed and make it look up the corresponding
5167        CoreIPC connection and call postConnectionDidCloseOnConnectionWorkQueue on it.
5168
5169        * Platform/CoreIPC/Connection.cpp:
5170        (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
5171        * Platform/CoreIPC/Connection.h:
5172        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
5173        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
5174        (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
5175        (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
5176        * WebProcess/Plugins/PluginProcessConnectionManager.h:
5177        * WebProcess/WebProcess.cpp:
5178        (WebKit::WebProcess::pluginProcessCrashed):
5179
51802011-05-02  Anders Carlsson  <andersca@apple.com>
5181
5182        Try to fix Windows build.
5183
5184        * Scripts/webkit2/messages.py:
5185        * Scripts/webkit2/messages_unittest.py:
5186
51872011-05-02  Anders Carlsson  <andersca@apple.com>
5188
5189        Reviewed by Oliver Hunt.
5190
5191        Dispatch the PluginProcessCrashed on the connection work queue
5192        https://bugs.webkit.org/show_bug.cgi?id=59996
5193
5194        * WebProcess/WebProcess.cpp:
5195        (WebKit::WebProcess::initialize):
5196        Add the web process as a queue client.
5197
5198        (WebKit::WebProcess::terminate):
5199        Remove the web process as a queue client.
5200
5201        (WebKit::WebProcess::willProcessMessageOnClientRunLoop):
5202        Try calling willProcessWebProcessMessageOnClientRunLoop.
5203
5204        * WebProcess/WebProcess.messages.in:
5205        Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.
5206
52072011-05-02  Anders Carlsson  <andersca@apple.com>
5208
5209        Reviewed by Sam Weinig.
5210
5211        Send a PluginProcessCrashed message to all web processes when a plug-in crashes
5212        https://bugs.webkit.org/show_bug.cgi?id=59994
5213
5214        * UIProcess/Plugins/PluginProcessProxy.cpp:
5215        (WebKit::PluginProcessProxy::didClose):
5216        Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.
5217
5218        (WebKit::PluginProcessProxy::didFinishLaunching):
5219        Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.
5220
5221        * WebProcess/WebProcess.cpp:
5222        (WebKit::WebProcess::pluginProcessCrashed):
5223        Add empty stub.
5224
5225        * WebProcess/WebProcess.messages.in:
5226        Add message.
5227
52282011-05-02  Anders Carlsson  <andersca@apple.com>
5229
5230        Reviewed by Simon Fraser.
5231
5232        Plug-in not completely repainted after a crash
5233        https://bugs.webkit.org/show_bug.cgi?id=59991
5234
5235        Call Widget::invalidate().
5236
5237        * WebProcess/Plugins/PluginView.cpp:
5238        (WebKit::PluginView::pluginProcessCrashed):
5239
52402011-05-02  Anders Carlsson  <andersca@apple.com>
5241
5242        Reviewed by Dan Bernstein.
5243
5244        Make PluginProcessConnectionManager a member of WebProcess
5245        https://bugs.webkit.org/show_bug.cgi?id=59989
5246
5247        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
5248        * WebProcess/Plugins/PluginProcessConnectionManager.h:
5249        * WebProcess/Plugins/PluginProxy.cpp:
5250        (WebKit::PluginProxy::initialize):
5251        * WebProcess/WebProcess.h:
5252        (WebKit::WebProcess::pluginProcessConnectionManager):
5253
52542011-05-02  Mark Rowe  <mrowe@apple.com>
5255
5256        Reviewed by Brady Eidson.
5257
5258        <rdar://problem/9371289> WebKit2 can persist an invalid current back/forward item index when URLs are filtered from back/forward list
5259
5260        * UIProcess/cf/WebBackForwardListCF.cpp:
5261        (WebKit::WebBackForwardList::createCFDictionaryRepresentation): We need to update the current index to account for filtered items
5262        for all items before the current item in the array.
5263
52642011-05-02  Anders Carlsson  <andersca@apple.com>
5265
5266        Reviewed by Adam Roben.
5267
5268        Handle DispatchOnConnectionQueue for asynchronous messages
5269        https://bugs.webkit.org/show_bug.cgi?id=59959
5270
5271        If any asynchronous messages have the DispatchOnConnectionQueue attribute, 
5272        create a new willProcess{Receiver}MessageOnClientRunLoop.
5273
5274        * Scripts/webkit2/messages.py:
5275        - Fix a regex bug where we would only parse attributes on synchronous messages.
5276        - Collect messages with the dispatch_on_connection_queue flag set. We only handle
5277          asynchronous messages currently; sync message support will be added when/if the
5278          need arises.
5279
5280        * Scripts/webkit2/messages_unittest.py:
5281        Update test.
5282
52832011-05-02  Adam Barth  <abarth@webkit.org>
5284
5285        Reviewed by David Levin.
5286
5287        PLATFORM(MAC) should (almost!) build with strict PassOwnPtr
5288        https://bugs.webkit.org/show_bug.cgi?id=59924
5289
5290        * Platform/CoreIPC/Connection.cpp:
5291        (CoreIPC::Connection::sendSyncMessage):
5292        (CoreIPC::Connection::waitForSyncReply):
5293        (CoreIPC::Connection::dispatchSyncMessage):
5294        * Platform/CoreIPC/Connection.h:
5295        (CoreIPC::Connection::Message::releaseArguments):
5296            - The memory management for this class is very strange.  I wrote a
5297              large comment.  Hopefully a kind soul will come by and fix it.
5298        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
5299        (WebKit::NetscapePluginModule::unload):
5300        * UIProcess/API/mac/WKView.mm:
5301        (-[WKView _setFindIndicator:fadeOut:]):
5302        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
5303        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
5304        * WebProcess/InjectedBundle/InjectedBundle.cpp:
5305        (WebKit::toStringVector):
5306        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
5307        (WebKit::NetscapePluginStream::stop):
5308        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
5309        (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
5310        * WebProcess/WebPage/DrawingArea.cpp:
5311        (WebKit::DrawingArea::create):
5312
53132011-04-29  Chris Marrin  <cmarrin@apple.com>
5314
5315        Reviewed by Simon Fraser.
5316
5317        Pages with accelerated compositing do not redraw unless scrolled
5318        https://bugs.webkit.org/show_bug.cgi?id=59851
5319
5320        Added a setNeedDisplay on the non-composited content layer after
5321        the size is changed so it paints the full size of the layer. Called
5322        only for the areas newly exposed, if any.
5323
5324        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
5325        (WebKit::LayerTreeHostCA::sizeDidChange):
5326
53272011-05-02  Anders Carlsson  <andersca@apple.com>
5328
5329        Reviewed by Adam Roben.
5330
5331        Need a way to handle CoreIPC messages on the connection work queue
5332        https://bugs.webkit.org/show_bug.cgi?id=59954
5333
5334        Add a Connection::QueueClient abstract class. This class has a single pure virtual
5335        member function, willProcessMessageOnClientRunLoop which should return true if the message 
5336        should be forwarded to the next Connection::QueueClient in the list or Connection::Client's 
5337        run loop for processing and false otherwise. Users of Connection can use addQueueClient to
5338        add clients and all messages will be dispatched  to the queue clients first.
5339
5340        * Platform/CoreIPC/Connection.cpp:
5341        (CoreIPC::Connection::addQueueClient):
5342        (CoreIPC::Connection::removeQueueClient):
5343        (CoreIPC::Connection::processIncomingMessage):
5344        * Platform/CoreIPC/Connection.h:
5345        (CoreIPC::Connection::QueueClient::~QueueClient):
5346
53472011-05-02  Jeff Miller  <jeffm@apple.com>
5348
5349        Reviewed by Adam Roben.
5350
5351        WebKit2 thinks the web process is unresponsive when a plugin displays a context menu
5352        https://bugs.webkit.org/show_bug.cgi?id=59124
5353        <rdar://problem/9318600>
5354        
5355        This is the Windows version of <https://bugs.webkit.org/show_bug.cgi?id=58943>.
5356
5357        Since we have no control over how long a plugin will take to handle an event, we need
5358        to tell the UI process to stop its responsive timer when we're about to send an event
5359        to the plugin. The downside of doing this is that if the plugin does become unresponsive,
5360        the user won't know this immediately until they click on the web page again.  At that point,
5361        if the web process is unresponsive because of a hung plugin, the responsiveness timer will fire.
5362        
5363        We're only doing this on Windows currently when running plugins in the web process (Anders fixed
5364        bug 58943 in a different way when running plugins in a separate plugin process on the Mac).
5365
5366        * PluginProcess/PluginControllerProxy.cpp:
5367        (WebKit::PluginControllerProxy::willSendEventToPlugin): Added, not used when running plugins in a separate process.
5368        * PluginProcess/PluginControllerProxy.h: Added willSendEventToPlugin().
5369
5370        * UIProcess/WebPageProxy.cpp:
5371        (WebKit::WebPageProxy::stopResponsivenessTimer): Added.
5372        * UIProcess/WebPageProxy.h: Added stopResponsivenessTimer().
5373        * UIProcess/WebPageProxy.messages.in: Added StopResponsivenessTimer message.
5374
5375        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
5376        (WebKit::NetscapePlugin::platformPaint): Tell our controller when we're about to send an event to the plugin.
5377        (WebKit::NetscapePlugin::platformHandleMouseEvent): Ditto.
5378        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Ditto.
5379        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Ditto.
5380
5381        * WebProcess/Plugins/PluginController.h: Added willSendEventToPlugin().
5382        * WebProcess/Plugins/PluginView.cpp:
5383        (WebKit::PluginView::willSendEventToPlugin): Added, tell the UI process to stop its responsiveness timer.
5384        * WebProcess/Plugins/PluginView.h: Added willSendEventToPlugin().
5385
53862011-04-29  Steve Falkenburg  <sfalken@apple.com>
5387
5388        Reviewed by Maciej Stachowiak.
5389
5390        Plug-in failed to initialize message should be called when Java fails to initialize
5391        https://bugs.webkit.org/show_bug.cgi?id=59856
5392        
5393        To match the WebKit1 behavior, WebKit2 should dispatch the plug-in failed
5394        to initialize message when we can't instantiate the Java plug-in.
5395
5396        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
5397        (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
5398
53992011-05-02  Sam Weinig  <sam@webkit.org>
5400
5401        Reviewed by Adam Barth.
5402
5403        Prune some #includes from DOMWindow.h
5404        https://bugs.webkit.org/show_bug.cgi?id=59907
5405
5406        * WebProcess/WebPage/WebFrame.cpp:
5407        Add now missing SecurityOrigin.h #include.
5408
54092011-04-29  Brian Weinstein  <bweinstein@apple.com>
5410
5411        Reviewed by Dan Bernstein.
5412
5413        WebKit2: Crash closing tab with docked Web Inspector
5414        https://bugs.webkit.org/show_bug.cgi?id=59914
5415        <rdar://problem/9359672>
5416        
5417        When a tab is closed with a docked inspector, invalidate called platformClose, which
5418        didn't do the tear down that is needed, but is called when we close the web inspector explcitly.
5419        One part of tear down we weren't doing is removing ourselves as a WindowMessageBrodcaster listener
5420        on the inspected web view, and this can cause crashes.
5421        
5422        This patch also renames platformClose to platformDidClose, to be clearer about when the function
5423        is called.
5424
5425        * UIProcess/WebInspectorProxy.cpp:
5426        (WebKit::WebInspectorProxy::invalidate): Call didClose instead of platformClose.
5427        (WebKit::WebInspectorProxy::didClose): Call platformDidClose instead of platformClose.
5428        * UIProcess/WebInspectorProxy.h:
5429        * UIProcess/mac/WebInspectorProxyMac.mm:
5430        (WebKit::WebInspectorProxy::platformDidClose): Renamed from platformClose.
5431        * UIProcess/win/WebInspectorProxyWin.cpp:
5432        (WebKit::WebInspectorProxy::platformDidClose): Ditto.
5433        * UIProcess/gtk/WebInspectorGtk.cpp:
5434        (WebKit::WebInspectorProxy::platformDidClose): Ditto.
5435        * UIProcess/qt/WebInspectorProxyQt.cpp:
5436        (WebKit::WebInspectorProxy::platformDidClose): Ditto.
5437
54382011-05-01  Sam Weinig  <sam@webkit.org>
5439
5440        Reviewed by Anders Carlsson.
5441
5442        Prune some unnecessary #includes
5443        https://bugs.webkit.org/show_bug.cgi?id=59895
5444
5445        Start getting rid of unnecessary #includes and forward declares.
5446
5447        * WebProcess/Plugins/PluginView.cpp:
5448        * WebProcess/WebPage/WebPage.cpp:
5449
54502011-05-01  Patrick Gansterer  <paroga@webkit.org>
5451
5452        [WIN] Unreviewed buildfix after r85434.
5453
5454        * UIProcess/WebPageProxy.cpp:
5455        (WebKit::WebPageProxy::startDragDrop):
5456        * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
5457        (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
5458        (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
5459        * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
5460        (WebKit::WebDragClient::startDrag):
5461        * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
5462        (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
5463
54642011-05-01  Anders Carlsson  <andersca@apple.com>
5465
5466        Reviewed by Sam Weinig.
5467
5468        Can't open document from skydrive.com in Microsoft Word
5469        https://bugs.webkit.org/show_bug.cgi?id=59891
5470        <rdar://problem/9354285>
5471
5472        Add the AllowHalfBakedQuickDrawSupport quirk for the SharePoint plug-in.
5473
5474        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
5475        (WebKit::NetscapePluginModule::determineQuirks):
5476
54772011-05-01  Anders Carlsson  <andersca@apple.com>
5478
5479        Reviewed by Sam Weinig.
5480
5481        Don't try to create a backing store for a 0x0 plug-in
5482        https://bugs.webkit.org/show_bug.cgi?id=59887
5483
5484        * WebProcess/Plugins/PluginProxy.cpp:
5485        (WebKit::PluginProxy::geometryDidChange):
5486
54872011-05-01  Anders Carlsson  <andersca@apple.com>
5488
5489        Reviewed by Kevin Decker.
5490
5491        Sandbox violation by WebProcess for DownloadAssessment.plist
5492        https://bugs.webkit.org/show_bug.cgi?id=59879
5493        <rdar://problem/9326041>
5494
5495        * WebProcess/com.apple.WebProcess.sb:
5496        Allow reading ~/Library/Preferences/com.apple.DownloadAssessment.plist
5497
54982011-05-01  Ivan Krstić  <ike@apple.com>
5499
5500        Reviewed by Maciej Stachowiak.
5501
5502        Remove unnecessary keychain and CoreAudio debris from WebProcess sandbox
5503        https://bugs.webkit.org/show_bug.cgi?id=59873
5504
5505        These rules have been obsoleted by <rdar://problem/9301520> and
5506        <rdar://problem/9181468>.
5507
5508        * WebProcess/com.apple.WebProcess.sb:
5509
55102011-05-01  Ivan Krstić  <ike@apple.com>
5511
5512        Reviewed by Maciej Stachowiak.
5513
5514        Simplify WebProcess sandbox with homedir-relative path filters.
5515        https://bugs.webkit.org/show_bug.cgi?id=59872
5516
5517        * WebProcess/com.apple.WebProcess.sb:
5518
55192011-05-01  Ivan Krstić  <ike@apple.com>
5520
5521        Reviewed by Maciej Stachowiak.
5522
5523        On-demand VPN support for sandboxed WebProcess.
5524        <rdar://problem/8994181>
5525
5526        * WebProcess/com.apple.WebProcess.sb:
5527
55282011-04-30  Ivan Krstić  <ike@apple.com>
5529
5530        Reviewed by Sam Weinig.
5531
5532        Reindent WebProcess sandbox to standard scheme style
5533        https://bugs.webkit.org/show_bug.cgi?id=59870
5534
5535        * WebProcess/com.apple.WebProcess.sb:
5536
55372011-04-28  Jer Noble  <jer.noble@apple.com>
5538
5539        Reviewed by Jon Honeycutt.
5540
5541        Implement FULLSCREEN_API on Windows, Part 1: Stubs
5542        https://bugs.webkit.org/show_bug.cgi?id=59778
5543
5544        Add Windows specific stubs for WebKit2 full screen APIs.
5545
5546        * UIProcess/win/WebFullScreenManagerProxyWin.cpp: Added.
5547        (WebKit::WebFullScreenManagerProxy::enterFullScreen): Added stub.
5548        (WebKit::WebFullScreenManagerProxy::exitFullScreen): Added stub.
5549        (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
5550        (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
5551        (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
5552        (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
5553        (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
5554        (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
5555        (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
5556        * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Added.
5557        (WebKit::WebFullScreenManager::create): Added. Returns a WebFullScreenManagerWin.
5558        (WebKit::WebFullScreenManagerWin::create): Added.
5559        (WebKit::WebFullScreenManagerWin::WebFullScreenManagerWin): Added.
5560        (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin): Added.
5561        (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Added stub.
5562        (WebKit::WebFullScreenManagerWin::beginEnterFullScreenAnimation): Added stub.
5563        (WebKit::WebFullScreenManagerWin::beginExitFullScreenAnimation): Added stub.
5564        * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Added.
5565        * win/WebKit2.vcproj: Added new classes.
5566
55672011-04-29  Alexey Proskuryakov  <ap@apple.com>
5568
5569        Reviewed by Simon Fraser and Dan Bernstein.
5570
5571        WebKit2: WebPluginTypeEnabled key is ignored when enumerating plug-ins
5572        https://bugs.webkit.org/show_bug.cgi?id=59852
5573        <rdar://problem/9314011>
5574
5575        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
5576        (WebKit::getPluginInfoFromPropertyLists): Do what WebKit1 does (but in CF dialect). And yes,
5577        I've seen plists with both numbers and booleans used .
5578
55792011-04-29  Beth Dakin  <bdakin@apple.com>
5580
5581        Reviewed by Simon Fraser.
5582
5583        https://bugs.webkit.org/show_bug.cgi?id=59846
5584        Scrolling causes rounded bottom window corners to become square
5585        <rdar://problem/9234239>
5586
5587        Keep track of the m_windowBottomCornerIntersectionRect in WKView. 
5588        Invalidate the rect before scrolling. And if the rect is non-zero during a 
5589        display, mask the corners, then set the rect to zero so that only displays that 
5590        happen right after a scroll bother to do this.
5591        * UIProcess/API/mac/PageClientImpl.mm:
5592        (WebKit::PageClientImpl::scrollView):
5593        * UIProcess/API/mac/WKView.mm:
5594        (-[WKView displayIfNeeded]):
5595        (-[WKView _cacheWindowBottomCornerRect]):
5596        * UIProcess/API/mac/WKViewInternal.h:
5597
55982011-04-29  Jia Pu  <jpu@apple.com>
5599
5600        Reviewed by Sam Weinig.
5601
5602        [Mac] Scrolling WK2 window should dismiss autocorrection panel.
5603        https://bugs.webkit.org/show_bug.cgi?id=59809
5604        <rdar://problem/9317410>
5605
5606        * UIProcess/WebPageProxy.cpp:
5607        (WebKit::WebPageProxy::pageDidScroll): Dimiss autocorrection panel in this function.
5608
56092011-04-29  Alexey Proskuryakov  <ap@apple.com>
5610
5611        Reviewed by Dan Bernstein.
5612
5613        WebKit2: Typing with Input methods still enters Roman characters in Safari search field frequently
5614        https://bugs.webkit.org/show_bug.cgi?id=59829
5615        <rdar://problem/9336907>
5616
5617        This patch regresses behavior somewhat in that inline input isn't discarded when something
5618        happens in an inactive window. This doesn't work well in shipping Safari either.
5619
5620        * UIProcess/API/mac/WKView.mm:
5621        (-[WKView _notifyInputContextAboutDiscardedComposition]): Added a method that calls
5622        -discardMarkedText with a safety check.
5623        (-[WKView setMarkedText:selectedRange:replacementRange:]): Use it.
5624        (-[WKView _updateTextInputStateIncludingSecureInputState:]): Use it.
5625        (-[WKView _resetTextInputState]): Use it.
5626
56272011-04-29  Chris Fleizach  <cfleizach@apple.com>
5628
5629        Reviewed by Beth Dakin.
5630
5631        AX: Remote accessibility should build on snow leopard
5632        https://bugs.webkit.org/show_bug.cgi?id=59767
5633
5634        * UIProcess/API/mac/WKView.mm:
5635        (-[WKView _updateRemoteAccessibilityRegistration:]):
5636        (-[WKView viewDidMoveToWindow]):
5637        (-[WKView _setAccessibilityWebProcessToken:]):
5638        * WebProcess/WebPage/mac/WebPageMac.mm:
5639        (WebKit::WebPage::platformInitialize):
5640        (WebKit::WebPage::registerUIProcessAccessibilityTokens):
5641        * WebProcess/mac/WebProcessMainMac.mm:
5642        (WebKit::WebProcessMain):
5643
56442011-04-29  Sam Weinig  <sam@webkit.org>
5645
5646        Reviewed by Dan Bernstein.
5647
5648        Add protection for shared memory failing to allocate
5649        <rdar://problem/9125287>
5650        https://bugs.webkit.org/show_bug.cgi?id=59842
5651
5652        * Platform/mac/SharedMemoryMac.cpp:
5653        (WebKit::SharedMemory::create):
5654        Add logging in shared memory failure cases.
5655
5656        * WebProcess/WebPage/DrawingAreaImpl.cpp:
5657        (WebKit::DrawingAreaImpl::display):
5658        Guard against ShareableBitmap failing to create a shared memory
5659        backing.
5660
56612011-04-28  Stephanie Lewis  <slewis@apple.com>
5662
5663        Reviewed by Darin Adler.
5664
5665        https://bugs.webkit.org/show_bug.cgi?id=59776
5666        <rdar://problem/9287113> REGRESSION: Safari cold/warm launch time 15% to 2x regression
5667        On the first draw the WebProcess is just going to send us blank bits anyway so don't 
5668        pause waiting for the update.  Continue drawing a blank window until the WebProcess
5669        sends us the update.
5670
5671        * UIProcess/DrawingAreaProxyImpl.cpp:
5672        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
5673        (WebKit::DrawingAreaProxyImpl::paint):
5674        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
5675        (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
5676        * UIProcess/DrawingAreaProxyImpl.h:
5677
56782011-04-29  Jon Lee  <jonlee@apple.com>
5679
5680        Reviewed by mitzpettel.
5681
5682        REGRESSION (WebKit2): (Mac) Selection is gone after switching tabs (59721)
5683        <rdar://problem/9327332>
5684        https://bugs.webkit.org/show_bug.cgi?id=59721
5685
5686        When resigning first responder status, check to see if we need to maintain an inactive
5687        selection in the web view. If we don't, we clear the selection.
5688
5689        This also reverts the change made in 83814, since that was a different attempt to solve this same issue.
5690
5691        * UIProcess/API/C/WKPage.cpp:
5692        (WKPageSetMaintainsInactiveSelection): Export setMaintainsInactiveSelection()
5693        * UIProcess/API/C/WKPage.h:
5694        * UIProcess/API/mac/WKView.mm:
5695        (-[WKView resignFirstResponder]): Check and see if we need to maintain the selection in the view prior to resigning.
5696        If not, we clear the selection
5697        * UIProcess/WebPageProxy.cpp:
5698        (WebKit::WebPageProxy::clearSelection): Send message across process boundary
5699        (WebKit::WebPageProxy::setMaintainsInactiveSelection): Sets variable
5700        * UIProcess/WebPageProxy.h: New member variable to keep track of whether we need to maintain the current selection
5701        (WebKit::WebPageProxy::maintainsInactiveSelection): Returns variable
5702        * WebProcess/WebPage/WebPage.cpp:
5703        (WebKit::WebPage::setFocused): Reverting code to just set the focused bit instead of also clearing the selection
5704        (WebKit::WebPage::clearSelection):
5705        * WebProcess/WebPage/WebPage.h:
5706        * WebProcess/WebPage/WebPage.messages.in: add new ClearSelection() message
5707
57082011-04-29  Anders Carlsson  <andersca@apple.com>
5709
5710        Reviewed by Darin Adler.
5711
5712        Application cache doesn't work due to a sandbox violation
5713        https://bugs.webkit.org/show_bug.cgi?id=59818
5714        <rdar://problem/9346971>
5715
5716        Add a sandbox extension for the application cache directory.
5717
5718        * Shared/WebProcessCreationParameters.cpp:
5719        (WebKit::WebProcessCreationParameters::encode):
5720        (WebKit::WebProcessCreationParameters::decode):
5721        Encode and decode the sandbox extension handle.
5722
5723        * Shared/WebProcessCreationParameters.h:
5724        Add a applicationCacheDirectoryExtensionHandle member.
5725
5726        * UIProcess/WebContext.cpp:
5727        (WebKit::WebContext::ensureWebProcess):
5728        If we have a non-empty application cache directory, create a sandbox extension
5729        and pass it to the creation parameters.
5730
5731        * WebProcess/WebProcess.cpp:
5732        (WebKit::WebProcess::initializeWebProcess):
5733        Create and consume a sandbox extension.
5734
5735        * WebProcess/WebProcess.h:
5736        Add an m_applicationCachePathExtension member variable.
5737
57382011-04-29  Dean Jackson  <dino@apple.com>
5739
5740        Reviewed by Simon Fraser.
5741
5742        Add ENABLE macro for WebKitAnimation
5743        https://bugs.webkit.org/show_bug.cgi?id=59729
5744
5745        Add new feature to toggle WebKit Animation API.
5746
5747        * Configurations/FeatureDefines.xcconfig:
5748
57492011-04-29  Anders Carlsson  <andersca@apple.com>
5750
5751        Reviewed by Brian Weinstein.
5752
5753        Crash when closing a tab that is unresponsive
5754        https://bugs.webkit.org/show_bug.cgi?id=59810
5755        <rdar://problem/9329133>
5756
5757        Back out r84643 - there was no rationale for this change, and it's causing crashes.
5758
5759        * UIProcess/WebPageProxy.cpp:
5760        (WebKit::WebPageProxy::close):
5761        (WebKit::WebPageProxy::processDidCrash):
5762
57632011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
5764
5765        Reviewed by Martin Robinson.
5766
5767        [GTK] Rename page as pageProxy in WebKitWebViewBase
5768        https://bugs.webkit.org/show_bug.cgi?id=59790
5769
5770        To avoid consufion between page client and page proxy. Also rename
5771        some methods to webkitWebViewBase* for consistency.
5772
5773        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
5774        (webkitWebViewBaseFinalize):
5775        (webkitWebViewBaseExpose):
5776        (webkitWebViewBaseDraw):
5777        (webkitWebViewBaseSizeAllocate):
5778        (webkitWebViewBaseFocusInEvent):
5779        (webkitWebViewBaseFocusOutEvent):
5780        (webkitWebViewBaseKeyPressEvent):
5781        (webkitWebViewBaseKeyReleaseEvent):
5782        (webkitWebViewBaseButtonPressEvent):
5783        (webkitWebViewBaseButtonReleaseEvent):
5784        (webkitWebViewBaseScrollEvent):
5785        (webkitWebViewBaseMotionNotifyEvent):
5786        (webkit_web_view_base_class_init):
5787        (webkitWebViewBaseCreate):
5788        (webkitWebViewBaseGetPage):
5789
57902011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
5791
5792        Unreviewed. Fix a crash after r85214.
5793
5794        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
5795        (webkit_web_view_base_init): Add line to create the page client
5796        instance, removed by mistake in r85214.
5797
57982011-04-28  David Levin  <levin@chromium.org>
5799
5800        Reviewed by Adam Barth.
5801
5802        Remove IMAGE_RESIZER related code.
5803        https://bugs.webkit.org/show_bug.cgi?id=59735
5804
5805        * Configurations/FeatureDefines.xcconfig:
5806
58072011-04-28  Sam Weinig  <sam@webkit.org>
5808
5809        Reviewed by Gavin Barraclough.
5810
5811        Original patch by Austin Jennings.
5812
5813        <rdar://problem/9350288>
5814        Update sandbox profile for extension changes
5815
5816        * WebProcess/com.apple.WebProcess.sb:
5817
58182011-04-28  Anders Carlsson  <andersca@apple.com>
5819
5820        Reviewed by Darin Adler.
5821
5822        Right-clicking on a Flash movie in an iframe shows the browser context menu
5823        https://bugs.webkit.org/show_bug.cgi?id=59760
5824        <rdar://problem/9340541>
5825
5826        Move context menu event handling out into a separate function. Make sure to call
5827        EventHandler::sendContextMenuEvent on the event handler belonging to the frame of the
5828        node that was clicked, and not the main frame.
5829
5830        * WebProcess/WebPage/WebPage.cpp:
5831        (WebKit::handleContextMenuEvent):
5832        (WebKit::handleMouseEvent):
5833
58342011-04-28  Adam Barth  <abarth@webkit.org>
5835
5836        Reviewed by Eric Seidel.
5837
5838        Remove WML
5839        https://bugs.webkit.org/show_bug.cgi?id=59678
5840
5841        Remove WML-related code in WebKit2.
5842
5843        * Configurations/FeatureDefines.xcconfig:
5844        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
5845        * WebProcess/WebPage/WebBackForwardListProxy.h:
5846
58472011-04-28  Alexey Proskuryakov  <ap@apple.com>
5848
5849        Reviewed by Anders Carlsson.
5850
5851        WebKit2: Frequent crashes in acceptsFirstMouse
5852        https://bugs.webkit.org/show_bug.cgi?id=59746
5853        <rdar://problem/9281270>
5854
5855        The crash occurred when connection was null (and it can become null at any time).
5856
5857        Added checks for the proxy being valid in all sync calls that lacked such.
5858        WebPageProxy::isValid() is not the same as WebProcessProxy::isValid(), but existing checks
5859        looked at the former, so I used that.
5860
5861        * UIProcess/WebPageProxy.cpp:
5862        (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
5863        (WebKit::WebPageProxy::getSelectedText):
5864        (WebKit::WebPageProxy::gestureWillBegin):
5865        (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
5866        * UIProcess/mac/WebPageProxyMac.mm:
5867        (WebKit::WebPageProxy::setComposition):
5868        (WebKit::WebPageProxy::confirmComposition):
5869        (WebKit::WebPageProxy::confirmCompositionWithoutDisturbingSelection):
5870        (WebKit::WebPageProxy::insertText):
5871        (WebKit::WebPageProxy::getMarkedRange):
5872        (WebKit::WebPageProxy::getSelectedRange):
5873        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
5874        (WebKit::WebPageProxy::characterIndexForPoint):
5875        (WebKit::WebPageProxy::firstRectForCharacterRange):
5876        (WebKit::WebPageProxy::executeKeypressCommands):
5877        (WebKit::WebPageProxy::writeSelectionToPasteboard):
5878        (WebKit::WebPageProxy::readSelectionFromPasteboard):
5879        (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
5880        (WebKit::WebPageProxy::acceptsFirstMouse):
5881
58822011-04-27  Brian Weinstein  <bweinstein@apple.com>
5883
5884        Reviewed by Timothy Hatcher.
5885
5886        Mac side of: WebKit2: Support docked mode for Web Inspector
5887        https://bugs.webkit.org/show_bug.cgi?id=59134
5888        <rdar://problem/8739005>
5889
5890        Implement docking of the Web Inspector on Mac. This matches the Windows (WK1 and WK2) closely,
5891        where the inspector and the inspected view are siblings.
5892
5893        * UIProcess/API/C/mac: Added.
5894        * UIProcess/API/C/mac/WKInspectorMac.h: Added.
5895        * UIProcess/API/mac/PageClientImpl.h:
5896        (WebKit::PageClientImpl::wkView): Returns the WKView.
5897        * UIProcess/PageClient.h:
5898        * UIProcess/WebInspectorProxy.h: The inspected view is now a WebInspectorWKView, so we can override tag.
5899        * UIProcess/WebPageProxy.h: Added a getter for the WKView.
5900
5901        * UIProcess/mac/WebInspectorProxyMac.mm:
5902        (-[WebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Calls through to WebInspectorProxy::inspectedViewFrameDidChange.
5903        (-[WebInspectorWKView tag]): Returns a constant defined in WKInspectorMac.h.
5904        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WebInspectorWKView instead of a WKView.
5905        (WebKit::WebInspectorProxy::platformClose): Removed a FIXME that isn't needed anymore (we always detach before closing).
5906        (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Place our inspector and the inspected view next to each other, assuming the
5907            bottom of the inspector is at the Y origin.
5908        (WebKit::WebInspectorProxy::platformAttach): Listen for changes to the inspected view's frame, and move the inspectorView from the
5909            detached inspector window to the superview of the inspected view (to make the inspector and inspected view siblings).
5910        (WebKit::WebInspectorProxy::platformDetach): Stop listening for changes to the inspected view's frame, and move the inspectorView
5911            back to the detached inspector window. We also resize the inspected view to take up the space the inspector took up before
5912            (assuming the bottom of the inspector was at the Y origin).
5913        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Resize the inspector's view, and call inspectedViewFrameDidChange (which
5914            syncs the inspector and the inspected view), and call setNeedsDisplay on both views.
5915        * UIProcess/mac/WebPageProxyMac.mm:
5916        (WebKit::WebPageProxy::wkView):
5917        
5918        * WebKit2.xcodeproj/project.pbxproj: Add a new file.
5919
59202011-04-28  Jessie Berlin  <jberlin@apple.com>
5921
5922        Reviewed by Darin Adler.
5923
5924        Crash under WKPageCreateSnapshotOfVisibleContent if there is no response from the Web Process
5925        in the allotted time.
5926        https://bugs.webkit.org/show_bug.cgi?id=59738
5927
5928        If the handle is null, don't try to create a ShareableBitmap and then a WebImage out of it.
5929
5930        * UIProcess/WebPageProxy.cpp:
5931        (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
5932
59332011-04-28  Xan Lopez  <xlopez@igalia.com>
5934
5935        Reviewed by Martin Robinson.
5936
5937        [Gtk] Split JSC and WebCore builds
5938        https://bugs.webkit.org/show_bug.cgi?id=19428
5939
5940        Build JavaScriptCore as a libtool shared library instead of a
5941        private convenience library.
5942
5943        * GNUmakefile.am: adapt to new name for javascriptcore target.
5944
59452011-04-28  Brady Eidson  <beidson@apple.com>
5946
5947        Reviewed by Sam Weinig.
5948
5949        <rdar://problem/8773946> and https://bugs.webkit.org/show_bug.cgi?id=59614
5950        Client certificate authentication in WebKit2
5951
5952        Project-file stuff:
5953        * WebKit2.xcodeproj/project.pbxproj:
5954
5955        Allow WKCredentials to store certificates:
5956        * UIProcess/Authentication/WebCredential.cpp:
5957        (WebKit::WebCredential::WebCredential):
5958        (WebKit::WebCredential::certificateInfo):
5959        * UIProcess/Authentication/WebCredential.h:
5960        (WebKit::WebCredential::create):
5961        * UIProcess/API/C/WKCredential.cpp:
5962        (WKCredentialCreateWithCertificateInfo):
5963        * UIProcess/API/C/WKCredential.h:
5964
5965        Pass the certificate info over the wire to the WebProcess:
5966        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
5967        (WebKit::AuthenticationChallengeProxy::useCredential): 
5968
5969        Change the WebProcess to prefer certificate info over basic credentials when responding to a challenge:
5970        * WebProcess/Authentication/AuthenticationManager.cpp:
5971        (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Stub for platforms other than Mac,
5972          as only Mac can currently respond to challenges with certificates.
5973        (WebKit::AuthenticationManager::useCredentialForChallenge):
5974        * WebProcess/Authentication/AuthenticationManager.h:
5975        * WebProcess/Authentication/AuthenticationManager.messages.in:
5976        * WebProcess/Authentication/mac: Added.
5977        * WebProcess/Authentication/mac/AuthenticationManager.mac.mm: Added.
5978        (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Recreate the identity and certificate
5979          chain and respond to the challenge with it.
5980
5981        Add a newly required #include:
5982        * UIProcess/API/C/WKAuthenticationChallenge.cpp:
5983        * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
5984
59852011-04-28  Martin Robinson  <mrobinson@igalia.com>
5986
5987        Reviewed by Xan Lopez.
5988
5989        [GTK] Click counting logic should be shared between WebKit1 and WebKit2
5990        https://bugs.webkit.org/show_bug.cgi?id=59715
5991
5992        Use the GtkClickCounter instead of doing click counting manually. This means that
5993        the code will now be shared between WebKit1 and WebKit2.
5994
5995        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
5996        (webkit_web_view_base_init): Remove private member initialization.
5997        (webViewButtonPressEvent): Call into GtkClickCounter.
5998
59992011-04-28  Martin Robinson  <mrobinson@igalia.com>
6000
6001        Build fix after r85197.
6002
6003        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6004        (webViewExpose): Use cr.get() here.
6005        (webViewDraw): Small clean up.
6006
60072011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6008
6009        Reviewed by Sam Weinig.
6010
6011        [GTK] Remove WKURLCreateWithURL()
6012        https://bugs.webkit.org/show_bug.cgi?id=59691
6013
6014        The name is a bit confusing and there's already
6015        WKURLCreateWithUTF8CString() in the C API.
6016
6017        * UIProcess/API/C/gtk/WKView.cpp:
6018        * UIProcess/API/C/gtk/WKView.h:
6019
60202011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6021
6022        Reviewed by Martin Robinson.
6023
6024        [GTK] Make WebKitWebViewBase public in the API
6025        https://bugs.webkit.org/show_bug.cgi?id=59689
6026
6027        Add WebKitWebViewBasePrivate.h and move WebKitWebViewBase inernal
6028        methods to it. Rename get_type() method, since it's part of the
6029        public API and should follow gtk coding style.
6030
6031        * GNUmakefile.am: Add WebKitWebViewBasePrivate.h.
6032        * UIProcess/API/C/gtk/WKView.cpp: Use WebKitWebViewBasePrivate.h.
6033        * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
6034        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6035        (webkitWebViewBaseFinalize):
6036        (webkit_web_view_base_init):
6037        (webViewSizeAllocate):
6038        (webViewFocusInEvent):
6039        (webViewFocusOutEvent):
6040        (webViewKeyPressEvent):
6041        (webViewKeyReleaseEvent):
6042        (webkit_web_view_base_class_init):
6043        * UIProcess/API/gtk/WebKitWebViewBase.h:
6044        * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Copied from Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp.
6045        * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Use WebKitWebViewBasePrivate.h.
6046
60472011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6048
6049        Reviewed by Martin Robinson.
6050
6051        [GTK] Move WebView to UIProcess/API/gtk
6052        https://bugs.webkit.org/show_bug.cgi?id=59686
6053
6054        And rename it as PageClientImpl, since it's a page client
6055        implementation, not a web view.
6056
6057        * GNUmakefile.am:
6058        * UIProcess/API/C/gtk/WKView.cpp:
6059        * UIProcess/API/gtk/PageClientImpl.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebView.cpp.
6060        (WebKit::backspaceCallback):
6061        (WebKit::selectAllCallback):
6062        (WebKit::cutClipboardCallback):
6063        (WebKit::copyClipboardCallback):
6064        (WebKit::pasteClipboardCallback):
6065        (WebKit::toggleOverwriteCallback):
6066        (WebKit::popupMenuCallback):
6067        (WebKit::showHelpCallback):
6068        (WebKit::deleteFromCursorCallback):
6069        (WebKit::moveCursorCallback):
6070        (WebKit::PageClientImpl::PageClientImpl):
6071        (WebKit::PageClientImpl::~PageClientImpl):
6072        (WebKit::PageClientImpl::getEditorCommandsForKeyEvent):
6073        (WebKit::PageClientImpl::createDrawingAreaProxy):
6074        (WebKit::PageClientImpl::setViewNeedsDisplay):
6075        (WebKit::PageClientImpl::displayView):
6076        (WebKit::PageClientImpl::scrollView):
6077        (WebKit::PageClientImpl::viewSize):
6078        (WebKit::PageClientImpl::isViewWindowActive):
6079        (WebKit::PageClientImpl::isViewFocused):
6080        (WebKit::PageClientImpl::isViewVisible):
6081        (WebKit::PageClientImpl::isViewInWindow):
6082        (WebKit::PageClientImpl::PageClientImpl::processDidCrash):
6083        (WebKit::PageClientImpl::didRelaunchProcess):
6084        (WebKit::PageClientImpl::takeFocus):
6085        (WebKit::PageClientImpl::toolTipChanged):
6086        (WebKit::PageClientImpl::setCursor):
6087        (WebKit::PageClientImpl::setViewportArguments):
6088        (WebKit::PageClientImpl::registerEditCommand):
6089        (WebKit::PageClientImpl::clearAllEditCommands):
6090        (WebKit::PageClientImpl::canUndoRedo):
6091        (WebKit::PageClientImpl::executeUndoRedo):
6092        (WebKit::PageClientImpl::convertToDeviceSpace):
6093        (WebKit::PageClientImpl::convertToUserSpace):
6094        (WebKit::PageClientImpl::windowToScreen):
6095        (WebKit::PageClientImpl::doneWithKeyEvent):
6096        (WebKit::PageClientImpl::didNotHandleKeyEvent):
6097        (WebKit::PageClientImpl::createPopupMenuProxy):
6098        (WebKit::PageClientImpl::createContextMenuProxy):
6099        (WebKit::PageClientImpl::setFindIndicator):
6100        (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
6101        (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
6102        (WebKit::PageClientImpl::didCommitLoadForMainFrame):
6103        (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
6104        (WebKit::PageClientImpl::customRepresentationZoomFactor):
6105        (WebKit::PageClientImpl::setCustomRepresentationZoomFactor):
6106        (WebKit::PageClientImpl::pageClosed):
6107        (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame):
6108        (WebKit::PageClientImpl::flashBackingStoreUpdates):
6109        (WebKit::PageClientImpl::findStringInCustomRepresentation):
6110        (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation):
6111        * UIProcess/API/gtk/PageClientImpl.h: Renamed from Source/WebKit2/UIProcess/gtk/WebView.h.
6112        (WebKit::PageClientImpl::create):
6113        (WebKit::PageClientImpl::addPendingEditorCommand):
6114        (WebKit::PageClientImpl::userSpaceScaleFactor):
6115        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6116        (webkitWebViewBaseInit):
6117        (webkitWebViewBaseCreate):
6118        * UIProcess/API/gtk/WebKitWebViewBase.h:
6119        * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
6120
61212011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6122
6123        Reviewed by Martin Robinson.
6124
6125        [GTK] Use the WebPage object in WebKitWebViewBase
6126        https://bugs.webkit.org/show_bug.cgi?id=59683
6127
6128        It simplifies the implementation of the event callbacks. Remove
6129        also all the methods from the page client that are no longer
6130        needed.
6131
6132        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6133        (webkitWebViewBaseInit):
6134        (webViewExpose):
6135        (webViewDraw):
6136        (webViewSizeAllocate):
6137        (webViewFocusInEvent):
6138        (webViewFocusOutEvent):
6139        (webViewKeyPressEvent):
6140        (webViewKeyReleaseEvent):
6141        (webViewButtonPressEvent):
6142        (webViewButtonReleaseEvent):
6143        (webViewScrollEvent):
6144        (webViewMotionNotifyEvent):
6145        * UIProcess/API/gtk/WebKitWebViewBase.h:
6146        * UIProcess/gtk/WebView.cpp:
6147        (WebKit::WebView::WebView):
6148        (WebKit::WebView::createDrawingAreaProxy):
6149        * UIProcess/gtk/WebView.h:
6150
61512011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6152
6153        Reviewed by Martin Robinson.
6154
6155        [GTK] Create the page client in the view widget
6156        https://bugs.webkit.org/show_bug.cgi?id=59679
6157
6158        * UIProcess/API/C/gtk/WKView.cpp:
6159        (WKViewCreate): Simply create a new view widget and return it.
6160        (WKViewGetPage): Use webkitWebViewBaseGetPage().
6161        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6162        (webkitWebViewBaseFinalize): Use finalize instead of dispose to
6163        make sure it's called only once, and release the private struct too.
6164        (webkitWebViewBaseInit): Create the page client.
6165        (webkitWebViewBaseClassInit): Don't use GObject private data structure.
6166        (webkitWebViewBaseCreate): New method to create a
6167        WebKitWebViewBase for a given context and page group.
6168        (webkitWebViewBaseGetWebViewInstance):
6169        (webkitWebViewBaseGetPage):
6170        * UIProcess/API/gtk/WebKitWebViewBase.h:
6171        * UIProcess/gtk/WebView.cpp:
6172        (WebKit::WebView::page): Get the page from the view widget.
6173        (WebKit::WebView::handleFocusInEvent): Ditto.
6174        (WebKit::WebView::handleFocusOutEvent): Ditto.
6175        (WebKit::WebView::WebView): Page client is now created with a view widget.
6176        (WebKit::WebView::paint): Get the page from the view widget.
6177        (WebKit::WebView::setSize): Ditto.
6178        (WebKit::WebView::handleKeyboardEvent): Ditto.
6179        (WebKit::WebView::handleMouseEvent): Ditto.
6180        (WebKit::WebView::handleWheelEvent): Ditto.
6181        (WebKit::WebView::close): Ditto.
6182        (WebKit::WebView::createDrawingAreaProxy): Ditto.
6183        * UIProcess/gtk/WebView.h:
6184        (WebKit::WebView::create): The page client will be created as
6185        private by the view widget, so it doesn't need to be ref counted,
6186        use PassOwnPtr instead of PassRefPtr.
6187
61882011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6189
6190        Reviewed by Martin Robinson.
6191
6192        [GTK] PlatformWebView should be the view widget
6193        https://bugs.webkit.org/show_bug.cgi?id=59676
6194
6195        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
6196        (webkitWebViewBaseGetPage): Return the page of the view.
6197        * UIProcess/API/gtk/WebKitWebViewBase.h:
6198        * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Map PlatformWebView
6199        to WebKitWebViewBase instead of the page client.
6200        * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
6201        (WebKit::ChunkedUpdateDrawingAreaProxy::page): Use the view widget
6202        directly.
6203        (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore): Ditto.
6204        (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Ditto.
6205        * UIProcess/gtk/WebView.cpp:
6206        (WebKit::WebView::createDrawingAreaProxy): Pass the view widget to
6207        the DrawingAreaProxy constructor instead of the page client.
6208        * UIProcess/gtk/WebView.h: Remove getWebViewWindow() which is no
6209        longer needed.
6210
62112011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
6212
6213        Reviewed by Martin Robinson.
6214
6215        [GTK] WKView should be a GtkWidget
6216        https://bugs.webkit.org/show_bug.cgi?id=59603
6217
6218        * UIProcess/API/C/gtk/WKAPICastGtk.h: Map WKViewRef to
6219        WebKitWebViewBase instead of WebView.
6220        * UIProcess/API/C/gtk/WKView.h: Remove WKViewGetWindow().
6221        * UIProcess/API/C/gtk/WKView.cpp:
6222        (WKViewCreate): Return the view instead of the page client.
6223        (WKViewGetPage): Use WebKitWebViewBase API to get the page client
6224        containing the page.
6225
62262011-04-27  Sam Weinig  <sam@webkit.org>
6227
6228        Reviewed by Adam Roben.
6229
6230        WebKit2 needs to notify the client when a plugin fails to initialize
6231        https://bugs.webkit.org/show_bug.cgi?id=59657
6232
6233        Add didFailToInitializePlugin client function and call it when a plugin
6234        fails to initialize.
6235
6236        * UIProcess/API/C/WKPage.h:
6237        * UIProcess/API/qt/qwkpage.cpp:
6238        (QWKPage::QWKPage):
6239        * UIProcess/WebLoaderClient.cpp:
6240        (WebKit::WebLoaderClient::didFailToInitializePlugin):
6241        * UIProcess/WebLoaderClient.h:
6242        * UIProcess/WebPageProxy.cpp:
6243        (WebKit::WebPageProxy::didFailToInitializePlugin):
6244        * UIProcess/WebPageProxy.h:
6245        * UIProcess/WebPageProxy.messages.in:
6246        * WebProcess/Plugins/PluginView.cpp:
6247        (WebKit::PluginView::initializePlugin):
6248
62492011-04-27  Pratik Solanki  <psolanki@apple.com>
6250
6251        Reviewed by Antti Koivisto.
6252
6253        Part of WebCore should use CFNetwork-based loader on Mac
6254        https://bugs.webkit.org/show_bug.cgi?id=51836
6255
6256        Add PLATFORM(WIN) ifdef around shouldCacheResponse.
6257
6258        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
6259        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
6260
62612011-04-27  Anders Carlsson  <andersca@apple.com>
6262
6263        Reviewed by Dan Bernstein.
6264
6265        Hang if a sync message handler invalidates the connection
6266        https://bugs.webkit.org/show_bug.cgi?id=59627
6267
6268        If dispatching incoming messages while waiting for the sync reply caused the connection to be invalidated,
6269        we need to return early or we'll wait forever.
6270
6271        * Platform/CoreIPC/Connection.cpp:
6272        (CoreIPC::Connection::waitForSyncReply):
6273
62742011-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
6275
6276        Reviewed by Martin Robinson.
6277
6278        [GTK] Move WebViewWidget to UIProcess/API/gtk
6279        https://bugs.webkit.org/show_bug.cgi?id=59594
6280
6281        API files should be under the API directory. This view widget will
6282        be used by both C and gtk high level API, so it has been renamed
6283        to WebKitWebViewBase.
6284
6285        * GNUmakefile.am:
6286        * UIProcess/API/gtk/WebKitWebViewBase.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.cpp.
6287        (webkitWebViewBaseRealize):
6288        (webkitWebViewBaseContainerAdd):
6289        (webkitWebViewBaseDispose):
6290        (webkitWebViewBaseInit):
6291        (webViewExpose):
6292        (webViewDraw):
6293        (webViewSizeAllocate):
6294        (webViewFocusInEvent):
6295        (webViewFocusOutEvent):
6296        (webViewKeyPressEvent):
6297        (webViewKeyReleaseEvent):
6298        (getEventTime):
6299        (webViewButtonPressEvent):
6300        (webViewButtonReleaseEvent):
6301        (webViewScrollEvent):
6302        (webViewMotionNotifyEvent):
6303        (webkitWebViewBaseClassInit):
6304        (webkitWebViewBaseGetType):
6305        (webkitWebViewBaseGetWebViewInstance):
6306        (webkitWebViewBaseSetWebViewInstance):
6307        (webkitWebViewBaseGetIMContext):
6308        * UIProcess/API/gtk/WebKitWebViewBase.h: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.h.
6309        * UIProcess/gtk/WebView.cpp:
6310        (WebKit::WebView::WebView):
6311
63122011-04-26  Chang Shu  <cshu@webkit.org>
6313
6314        Reviewed by Laszlo Gombos.
6315
6316        WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
6317        https://bugs.webkit.org/show_bug.cgi?id=42544
6318
6319        Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.
6320
6321        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
6322        (WKBundleAddOriginAccessWhitelistEntry):
6323        (WKBundleRemoveOriginAccessWhitelistEntry):
6324        (WKBundleResetOriginAccessWhitelists):
6325        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
6326        * WebProcess/InjectedBundle/InjectedBundle.cpp:
6327        (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
6328        (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
6329        (WebKit::InjectedBundle::resetOriginAccessWhitelists):
6330        * WebProcess/InjectedBundle/InjectedBundle.h:
6331
63322011-04-26  Dan Bernstein  <mitz@apple.com>
6333
6334        Build fix.
6335
6336        * Configurations/CompilerVersion.xcconfig:
6337
63382011-04-26  Anders Carlsson  <andersca@apple.com>
6339
6340        Fix 32-bit clang build.
6341
6342        * PluginProcess/mac/PluginProcessMac.mm:
6343        (WebKit::windowCoversAnyScreen):
6344        * UIProcess/API/mac/WKTextInputWindowController.mm:
6345        (-[WKTextInputPanel init]):
6346        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
6347        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
6348        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
6349        (WebKit::flipScreenYCoordinate):
6350        (WebKit::computeFakeWindowBoundsRect):
6351        * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
6352        (-[AccessibilityWebPageObject accessibilityHitTest:]):
6353
63542011-04-26  Sam Weinig  <sam@webkit.org>
6355
6356        Reviewed by David Hyatt.
6357
6358        Remove Datagrid from the tree
6359        https://bugs.webkit.org/show_bug.cgi?id=59543
6360
6361        * Configurations/FeatureDefines.xcconfig:
6362        Remove feature.
6363
63642011-04-26  Chang Shu  <cshu@webkit.org>
6365
6366        Reviewed by Laszlo Gombos.
6367
6368        WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
6369        https://bugs.webkit.org/show_bug.cgi?id=57572
6370
6371        Remove the unnecessary code that updates preference.
6372
6373        * Shared/WebPreferencesStore.cpp:
6374        (WebKit::WebPreferencesStore::decode):
6375        * Shared/WebPreferencesStore.h:
6376        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
6377        (WKBundleSetAllowUniversalAccessFromFileURLs):
6378        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
6379        * WebProcess/InjectedBundle/InjectedBundle.cpp:
6380        (WebKit::InjectedBundle::setAllowUniversalAccessFromFileURLs):
6381        (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
6382        * WebProcess/InjectedBundle/InjectedBundle.h:
6383
63842011-04-26  Brian Weinstein  <bweinstein@apple.com>
6385
6386        Reviewed by Steve Falkenburg.
6387
6388        WebKit2: Docked Inspector doesn't behave well if inspected web view isn't at 0,0
6389        https://bugs.webkit.org/show_bug.cgi?id=59554
6390        <rdar://problem/9341188>
6391        
6392        Use GetWindowRect and ScreenToClient to properly place our inspector and inspected
6393        web views instead of using GetClientRect. We need to correctly handle the case where
6394        the inspected web view isn't at 0, 0.
6395
6396        * UIProcess/win/WebInspectorProxyWin.cpp:
6397        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
6398
63992011-04-26  Dan Bernstein  <mitz@apple.com>
6400
6401        Reviewed by Mark Rowe.
6402
6403        Choose the compiler based on the Xcode version for Snow Leopard debug builds.
6404
6405        * Configurations/Base.xcconfig:
6406        * Configurations/CompilerVersion.xcconfig: Added.
6407
64082011-04-26  Balazs Kelemen  <kbalazs@webkit.org>
6409
6410        Unreviewed build fix.
6411
6412        * Platform/Region.cpp: Need to include stdio.h for printf
6413        (at least in my Qt-Linux environment).
6414
64152011-04-26  Mihai Parparita  <mihaip@chromium.org>
6416
6417        Reviewed by Adam Barth.
6418
6419        Turn off make built-in implicit rules for derived sources makefile
6420        https://bugs.webkit.org/show_bug.cgi?id=59418
6421
6422        We don't use any of make's built-in implicit rules, turning them off
6423        speeds up parsing of the makefile.
6424
6425        * WebKit2.xcodeproj/project.pbxproj:
6426
64272011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
6428
6429        Unreviewed. Fix WebKit2 GTK build after r84785.
6430
6431        * UIProcess/gtk/WebInspectorGtk.cpp:
6432        (WebKit::WebInspectorProxy::platformAttach):
6433        (WebKit::WebInspectorProxy::platformDetach):
6434        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
6435
64362011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
6437
6438        Unreviewed. Fix WebKit2 GTK build after r84886
6439
6440        * Platform/gtk/RunLoopGtk.cpp: Include WorkItem.h
6441
64422011-04-25  Adam Barth  <abarth@webkit.org>
6443
6444        Reviewed by David Levin.
6445
6446        WebKit2 should play nice with strict OwnPtrs
6447        https://bugs.webkit.org/show_bug.cgi?id=59426
6448
6449        * Platform/CoreIPC/Connection.cpp:
6450        (CoreIPC::Connection::waitForMessage):
6451            - Lack of OwnPtr in HashMap is sad face.  This code becomes very
6452              pretty if we could use OwnPtr in HashMap...
6453        * Platform/RunLoop.cpp:
6454        (RunLoop::performWork):
6455        (RunLoop::scheduleWork):
6456        * Platform/RunLoop.h:
6457        * Platform/mac/WorkQueueMac.cpp:
6458        (WorkQueue::executeWorkItem):
6459        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
6460        (WebKit::NetscapePluginStream::deliverData):
6461
64622011-04-25  Brian Weinstein  <bweinstein@apple.com>
6463
6464        Reviewed by Adam Roben.
6465
6466        WebKit2: Should be able to inspect Web Inspector in Debug Builds
6467        https://bugs.webkit.org/show_bug.cgi?id=59378
6468
6469        * UIProcess/WebInspectorProxy.cpp:
6470        (WebKit::createInspectorPageGroup): Creates an inspector page group and enables
6471            developer extras in a debug build.
6472        (WebKit::WebInspectorProxy::inspectorPageGroup): Calls createInspectorPageGroup.
6473
64742011-04-25  Brian Weinstein  <bweinstein@apple.com>
6475
6476        Reviewed by Timothy Hatcher.
6477
6478        WebKit2: Web Inspector's style sidebar fails to display when inspecting element
6479        https://bugs.webkit.org/show_bug.cgi?id=58071
6480        <rdar://problem/9243093>
6481        
6482        When creating our WebKit2 inspector views, we were creating them on both Mac and Windows
6483        with the empty rect for their initial size. Before we sized them correctly, the inspector
6484        was calling window.innerWidth on them, which returned 0, making the sidebar take up 0 pixels.
6485
6486        * UIProcess/mac/WebInspectorProxyMac.mm:
6487        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the window with the initial window width
6488            and height.
6489        * UIProcess/win/WebInspectorProxyWin.cpp:
6490        (WebKit::WebInspectorProxy::platformCreateInspectorPage): Ditto.
6491
64922011-04-25  Brian Weinstein  <bweinstein@apple.com>
6493
6494        Reviewed by Adam Roben.
6495
6496        Windows part of - WebKit2: Support docked mode for Web Inspector
6497        https://bugs.webkit.org/show_bug.cgi?id=59134
6498        <rdar://problem/8739005>
6499        
6500        Implement attaching and detaching of the Web Inspector on Windows,
6501        and also support setAttachedWindowHeight when the user changes the height
6502        of the docked inspector.
6503        
6504        This patch doesn't remember whether the user prefers attached or detached, and
6505        doesn't remember the user's preferred docked height, but that will be a separate
6506        bug.
6507        
6508        * UIProcess/WebInspectorProxy.cpp:
6509        (WebKit::WebInspectorProxy::attach): Set the attached flag and call platform-specific code.
6510        (WebKit::WebInspectorProxy::detach): Ditto.
6511        (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call platform-specific code.
6512        (WebKit::WebInspectorProxy::didClose): Set m_isVisible before calling platformClose. platformClose
6513            calls detach if the inspector was docked, and detach needs to know whether or not the window is
6514            visible.
6515        * UIProcess/WebInspectorProxy.h:
6516        * UIProcess/WebInspectorProxy.messages.in: Add new messages.
6517        * UIProcess/WebPageProxy.h:
6518        (WebKit::WebPageProxy::pageClient): Add a getter for the page client.
6519        * UIProcess/win/WebInspectorProxyWin.cpp:
6520        (WebKit::WebInspectorProxy::windowReceivedMessage): Relay WM_WINDOWPOSCHANGING messages from the inspected
6521            web view to the WebInspectorProxy.
6522        (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Resize the inspected web view to behave well
6523            with the docked inspector.
6524        (WebKit::WebInspectorProxy::platformClose): If we are attached, detach before destroying.
6525        (WebKit::WebInspectorProxy::platformAttach): Set the inspector's host window to be the inspected web view's parent
6526            window, so the inspected web view and the inspector are siblings.
6527        (WebKit::WebInspectorProxy::platformDetach): Set the inspector's host window to be the standalone inspector window.
6528        (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Size the views.
6529        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
6530        * WebProcess/WebCoreSupport/WebInspectorClient.h:
6531        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
6532        (WebKit::WebInspectorFrontendClient::attachWindow): Call WebInspector::attach.
6533        (WebKit::WebInspectorFrontendClient::closeWindow): Add a call to the InspectorController to disconnect the inspector frontend
6534            from the inspector backend. Without this line, when we close the attached inspector, it won't re-open, because the
6535            inspector controller still thinks there is a frontend. This matches WebKit1's behavior, although it seems like this is
6536            something WebCore should handle.
6537        (WebKit::WebInspectorFrontendClient::detachWindow): Call WebInspector::detach.
6538        (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Call WebInspector::setAttachedWindowHeight.
6539        * UIProcess/DrawingAreaProxyImpl.cpp:
6540        (WebKit::DrawingAreaImpl::sendUpdateBackingStoreState): Add an early return if the WebPageProxy's viewSize is empty. 
6541            This can be needed if the inspector takes up the whole view, and it is useful to prevent a possible synchronous message
6542            from the UIProcess -> WebProcess to update a backing store that isn't visible in the first place.
6543        * WebProcess/WebPage/WebInspector.cpp:
6544        (WebKit::WebInspector::attach): Send a message to the UIProcess.
6545        (WebKit::WebInspector::detach): Ditto.
6546        (WebKit::WebInspector::setAttachedWindowHeight): Ditto.
6547        * WebProcess/WebPage/WebInspector.h: Remove some dead code.
6548
65492011-04-25  Brian Weinstein  <bweinstein@apple.com>
6550
6551        Reviewed by Alice Liu.
6552
6553        WebKit2: Web Inspector: Support highlighting page elements
6554        https://bugs.webkit.org/show_bug.cgi?id=59263
6555        <rdar://problem/8767659>
6556
6557        Support highlighting of page elements for the inspector in WebKit2 by
6558        having the WebInspectorClient be a PageOverlay Client and be responsible
6559        for calling InspectorController::drawNodeHighlight.
6560
6561        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
6562        (WebKit::WebInspectorClient::highlight): Create our overlay if it hasn't been created,
6563            or call setNeedsDisplay if it has.
6564        (WebKit::WebInspectorClient::hideHighlight): Uninstall the page overlay if it exists.
6565        (WebKit::WebInspectorClient::pageOverlayDestroyed):
6566        (WebKit::WebInspectorClient::willMoveToWebPage): If it's being destroyed (moving to a null
6567            WebPage), clear the member variable.
6568        (WebKit::WebInspectorClient::didMoveToWebPage):
6569        (WebKit::WebInspectorClient::drawRect): Call InspectorController::drawNodeHighlight.
6570        (WebKit::WebInspectorClient::mouseEvent):
6571        * WebProcess/WebCoreSupport/WebInspectorClient.h:
6572        (WebKit::WebInspectorClient::WebInspectorClient): Add a new member variable.
6573
65742011-04-25  Jon Lee  <jonlee@apple.com>
6575
6576        Reviewed by Maciej Stachowiak.
6577
6578        Overlay scroller hard to see on pages with dark background (59183)
6579        https://bugs.webkit.org/show_bug.cgi?id=59183
6580        <rdar://problem/8975367>
6581
6582        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
6583        (InitWebCoreSystemInterface): adding method to allow changing style
6584        * WebProcess/WebPage/WebFrame.cpp:
6585        (WebKit::WebFrame::getDocumentBackgroundColor): refactoring to use common code for retrieving background color
6586
65872011-04-24  Dan Bernstein  <mitz@apple.com>
6588
6589        Reviewed by Maciej Stachowiak.
6590
6591        <rdar://problem/9329741> Reproducible crash in WebChromeClient::invalidateContentsAndWindow() on simonscat.com
6592        https://bugs.webkit.org/show_bug.cgi?id=59299
6593
6594        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
6595        (WebKit::WebChromeClient::invalidateContentsAndWindow): Null-check the document.
6596        (WebKit::WebChromeClient::invalidateContentsForSlowScroll): Ditto.
6597
65982011-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
6599
6600        Unreviewed, rolling out r84740.
6601        http://trac.webkit.org/changeset/84740
6602        https://bugs.webkit.org/show_bug.cgi?id=59290
6603
6604        change breaks apple internal builds and is incorrect
6605        (Requested by smfr on #webkit).
6606
6607        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
6608        (InitWebCoreSystemInterface):
6609
66102011-04-22  Jon Lee  <jonlee@apple.com>
6611
6612        Reviewed by Beth Dakin.
6613
6614        Overlay scroller hard to see on pages with dark background (59183)
6615        https://bugs.webkit.org/show_bug.cgi?id=59183
6616        <rdar://problem/8975367>
6617        
6618        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
6619        (InitWebCoreSystemInterface): adding method to allow changing style
6620
66212011-04-22  Brian Weinstein  <bweinstein@apple.com>
6622
6623        Reviewed by Sam Weinig.
6624
6625        WebKit2: Stop responsiveness timer before calling runOpenPanel
6626        https://bugs.webkit.org/show_bug.cgi?id=59268
6627        <rdar://problem/9327944>
6628
6629        * UIProcess/WebPageProxy.cpp:
6630        (WebKit::WebPageProxy::runOpenPanel): Stop the timer before calling WebUIClient::runOpenPanel,
6631            because runOpenPanel can spin a nested run loop.
6632
66332011-04-22  Chang Shu  <cshu@webkit.org>
6634
6635        Reviewed by Kenneth Rohde Christiansen.
6636
6637        WebKitTestRunner needs layoutTestController.setFrameFlatteningEnabled
6638        https://bugs.webkit.org/show_bug.cgi?id=42536
6639
6640        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
6641        (WKBundleSetFrameFlatteningEnabled):
6642        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
6643        * WebProcess/InjectedBundle/InjectedBundle.cpp:
6644        (WebKit::InjectedBundle::setFrameFlatteningEnabled):
6645        * WebProcess/InjectedBundle/InjectedBundle.h:
6646
66472011-04-22  Alejandro G. Castro  <alex@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
6648
6649        Reviewed by Xan Lopez.
6650
6651        [GTK] Use the libWebCore.a convenience library when compiling WebKit2
6652        https://bugs.webkit.org/show_bug.cgi?id=59258
6653
6654        * GNUmakefile.am: Remove the libWebKit2 convenience library and use the
6655        libWebCore convenience library when compiling WebKit2. Not only does this
6656        maintain the CPPFLAGS isolation, it prevents double-compilation of WebCore
6657        in some cases.
6658
66592011-04-19  Jer Noble  <jer.noble@apple.com>
6660
6661        Reviewed by Daniel Bates.
6662
6663        Full Screen from within an <iframe> does not cause <iframe> to resize.
6664        https://bugs.webkit.org/show_bug.cgi?id=58638
6665
6666        Tests: fullscreen/full-screen-frameset-allowed.html
6667               fullscreen/full-screen-frameset-not-allowed.html
6668
6669        * UIProcess/mac/WKFullScreenWindowController.mm:
6670        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation
6671            if the full screen animation finishes first.
6672        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
6673        (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized.
6674
66752011-04-22  Sam Weinig  <sam@webkit.org>
6676
6677        Reviewed by Brian Weinstein.
6678
6679        WebKit2: Implement JavaScript unresponsiveness callback
6680        https://bugs.webkit.org/show_bug.cgi?id=59248
6681
6682        Add support for suspending JavaScript in response to a callback.
6683
6684        * UIProcess/API/C/WKPage.h:
6685        * UIProcess/API/qt/qwkpage.cpp:
6686        (QWKPage::QWKPage):
6687        * UIProcess/WebPageProxy.cpp:
6688        (WebKit::WebPageProxy::shouldInterruptJavaScript):
6689        * UIProcess/WebPageProxy.h:
6690        * UIProcess/WebPageProxy.messages.in:
6691        * UIProcess/WebUIClient.cpp:
6692        (WebKit::WebUIClient::shouldInterruptJavaScript):
6693        * UIProcess/WebUIClient.h:
6694        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
6695        (WebKit::WebChromeClient::shouldInterruptJavaScript):
6696
66972011-04-22  Dan Bernstein  <mitz@apple.com>
6698
6699        Reviewed by Sam Weinig.
6700
6701        Paint the bounding rect of the dirty region instead of individual rectangles when the region
6702        covers at least 3/4 of its bounds.
6703
6704        * WebProcess/WebPage/DrawingAreaImpl.cpp:
6705        (WebKit::shouldPaintBoundsRect): Use floating point math so that the logic that was supposed to
6706        achieve this actually works.
6707
67082011-04-22  Jer Noble  <jer.noble@apple.com>
6709
6710        Reviewed by Maciej Stachowiak.
6711
6712        Crash at WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation + 79
6713        https://bugs.webkit.org/show_bug.cgi?id=59225
6714
6715        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
6716        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Guard against 
6717            m_fullScreenRootLayer being NULL.
6718        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
6719
67202011-04-22  Jer Noble  <jer.noble@apple.com>
6721
6722        Reviewed by Maciej Stachowiak.
6723
6724        Allow MediaPlayerPrivateAVFoundation to be disabled via a preference.
6725        https://bugs.webkit.org/show_bug.cgi?id=59179
6726
6727        Add API to allow the WebCore Settings preference to be called from the UIProcess.
6728
6729        * Shared/WebPreferencesStore.h: Added new preference definition macro.
6730        * UIProcess/API/C/WKPreferences.cpp:
6731        (WKPreferencesSetAVFoundationEnabled): Added.
6732        (WKPreferencesGetAVFoundationEnabled): Added.
6733        * UIProcess/API/C/WKPreferences.h:
6734        * WebProcess/WebPage/WebPage.cpp:
6735        (WebKit::WebPage::updatePreferences): Pass new preference along to WebCore
6736            Settings.
6737
67382011-04-22  Brian Weinstein  <bweinstein@apple.com>
6739
6740        Reviewed by Sam Weinig.
6741
6742        WebKit2: Stop Responsiveness Timer when WebPageProxy closes or WebProcess crashes
6743        https://bugs.webkit.org/show_bug.cgi?id=59210
6744
6745        * UIProcess/WebPageProxy.cpp:
6746        (WebKit::WebPageProxy::close): Stop the responsiveness timer.
6747        (WebKit::WebPageProxy::processDidCrash): Ditto.
6748
67492011-04-21  Adam Roben  <aroben@apple.com>
6750
6751        Give windowless plugins' context menus an owner window in the same thread as the plugin
6752
6753        In some cases, plugins pass the WKView's HWND to the ::TrackPopupMenu API. ::TrackPopupMenu
6754        fails in this case because the WKView's HWND is owned by another process/thread. We work
6755        around this by hooking the ::TrackPopupMenu API and providing our own window that's in the
6756        same thread as the plugin instead.
6757
6758        I couldn't figure out how to write a test for this. :-(
6759
6760        Fixes <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No context
6761        menu appears when right-clicking on windowless Flash plugin
6762
6763        Reviewed by Brian Weinstein, and looked at suspiciously by Jeff Miller.
6764
6765        * Platform/Module.h: Added installIATHook on Windows.
6766
6767        * Platform/win/ModuleWin.cpp:
6768        (WebKit::overwriteReadOnlyMemory): New helper function. Basically a wrapper around memcpy,
6769        but uses ::VirtualProtect to allow writing to otherwise-read-only memory.
6770        (WebKit::findFunctionPointerAddress): New helper function. The first overload iterates over
6771        the imported modules and functions looking for the given one. If found, returns the address
6772        of the function pointer that is used when calling that function. The second overload calls
6773        the first, first passing it an enumerator for the image's imported modules, then passing it
6774        an iterator for the image's delay-loaded modules.
6775        (WebKit::Module::installIATHook): Added. Finds the address of the function pointer that's
6776        used when code in this module calls the given function, then overwrites the function pointer
6777        with the passed-in one. Future calls to the given function made by code in this module
6778        should then end up calling to the passed-in function instead of the original one.
6779
6780        * Shared/Plugins/Netscape/NetscapePluginModule.h:
6781        (WebKit::NetscapePluginModule::module): Added this simple getter.
6782
6783        * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added some new Windows-only members.
6784
6785        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
6786        (WebKit::CurrentPluginSetter::CurrentPluginSetter):
6787        (WebKit::CurrentPluginSetter::~CurrentPluginSetter):
6788        This RAII class sets/unsets the currentPlugin global.
6789
6790        (WebKit::registerPluginView): Changed to use instanceHandle() instead of the mysterious
6791        gInstance.
6792        (WebKit::NetscapePlugin::platformPostInitialize): For windowless plugins, hook the
6793        ::TrackPopupMenu API and create a window to be used as the owner for context menus created
6794        by this plugin. (Also changed the ::CreateWindowExW call for windowed plugins to pass an
6795        instance handle so that the window will be associated with WebKit.dll instead of
6796        WebKit2WebProcess.exe. This should have no visible effect, but is more correct.)
6797        (WebKit::NetscapePlugin::platformDestroy): For windowless plugins, destroy the context menu
6798        owner window we created above.
6799
6800        (WebKit::NetscapePlugin::platformPaint):
6801        (WebKit::NetscapePlugin::platformHandleMouseEvent):
6802        (WebKit::NetscapePlugin::platformHandleWheelEvent):
6803        (WebKit::NetscapePlugin::platformSetFocus):
6804        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
6805        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
6806        (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
6807        Set ourselves as the current plugin.
6808
6809        (WebKit::NetscapePlugin::hookedTrackPopupMenu): Added. This is the function that actually
6810        gets called when windowless plugins call ::TrackPopupMenu. If the passed-in owner window is
6811        owned by the current thread, we have nothing to do; ::TrackPopupMenu should work just fine.
6812        Otherwise, we use the current plugin's context menu owner window as the context menu's
6813        owner. We also set focus to the new owner window because otherwise weird behavior results
6814        (e.g., it's possible to scroll the WKView while the context menu is up).
6815
68162011-04-21  Adam Roben  <aroben@apple.com>
6817
6818        Use WebCore's do-nothing window class instead of creating our own
6819
6820        Fixes <http://webkit.org/b/59102> WebKit has too many dummy window classes
6821
6822        Reviewed by Anders Carlsson.
6823
6824        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
6825        (WebKit::createDummyWindow): Less code!
6826
68272011-04-22  Balazs Kelemen  <kbalazs@webkit.org>
6828
6829        Reviewed by Kenneth Rohde Christiansen.
6830
6831        [Qt][WK2] Cannot play flash with NSPluginWrapper
6832        https://bugs.webkit.org/show_bug.cgi?id=59125
6833
6834        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
6835        (WebKit::NPN_GetValue): Handle the case when we have been
6836        called with a null plugin instance.
6837
68382011-04-22  Andreas Kling  <andreas.kling@nokia.com>
6839
6840        Reviewed by Sam Weinig.
6841
6842        [Qt][WK2] Implement DrawingAreaImpl for Qt.
6843        https://bugs.webkit.org/show_bug.cgi?id=59171
6844
6845        * WebKit2.pro: Build files necessary for DrawingAreaImpl.
6846        * DerivedSources.pro: Build message receivers for DrawingArea and DrawingAreaProxy.
6847
6848        * Shared/qt/LayerTreeContextQt.cpp:
6849        (WebKit::LayerTreeContext::LayerTreeContext): Stub.
6850        (WebKit::LayerTreeContext::~LayerTreeContext): Stub.
6851        (WebKit::LayerTreeContext::encode): Stub.
6852        (WebKit::LayerTreeContext::decode): Stub.
6853        (WebKit::LayerTreeContext::isEmpty): Stub.
6854        (WebKit::operator==): Stub.
6855
6856        * Shared/qt/ShareableBitmapQt.cpp:
6857        (WebKit::ShareableBitmap::paint): Don't translate the painter to accomodate the
6858        source rect. The rect is already adjusted at the call site.
6859
6860        * UIProcess/API/qt/qgraphicswkview.h: Add "Impl" to QGraphicsWKView::BackingStoreType.
6861
6862        * UIProcess/API/qt/qwkpage.cpp:
6863        (QWKPagePrivate::createDrawingAreaProxy): Create DrawingAreaProxyImpl if requested.
6864        (QWKPagePrivate::paint): Call the correct paint() method for DrawingAreaProxyImpl,
6865        since this drawing area will simple ASSERT_NOT_REACHED() in the "normal" paint().
6866
6867        * WebProcess/WebPage/DrawingArea.cpp:
6868        (WebKit::DrawingArea::create): Allow creation of DrawingAreaImpl for Qt.
6869
6870        * UIProcess/BackingStore.h: Add Qt-specific types and backing store.
6871
6872        * UIProcess/qt/BackingStoreQt.cpp:
6873        (WebKit::BackingStore::paint): Implemented.
6874        (WebKit::BackingStore::incorporateUpdate): Implemented.
6875        (WebKit::BackingStore::scroll): Implemented using QPixmap::scroll().
6876
6877        * UIProcess/DrawingAreaProxy.h: Enable drawing area message receivers for Qt.
6878        * UIProcess/WebPageProxy.cpp:
6879        (WebKit::WebPageProxy::didReceiveMessage): Ditto.
6880        * WebProcess/WebPage/DrawingArea.h: Ditto.
6881        * WebProcess/WebPage/WebPage.cpp:
6882        (WebKit::WebPage::didReceiveMessage): Ditto.
6883
68842011-04-22  Jon Honeycutt  <jhoneycutt@apple.com>
6885
6886        WinCairo build fix. Unreviewed.
6887
6888        * WebProcess/Downloads/curl/DownloadCurl.cpp:
6889        (WebKit::Download::useCredential):
6890        Stubbed.
6891        (WebKit::Download::continueWithoutCredential):
6892        Stubbed.
6893        (WebKit::Download::cancelAuthenticationChallenge):
6894        Stubbed.
6895
68962011-04-21  Jon Honeycutt  <jhoneycutt@apple.com>
6897
6898        Need to support authentication for downloads in WebKit2 on Windows
6899        https://bugs.webkit.org/show_bug.cgi?id=59175
6900        <rdar://problem/9206151>
6901        <rdar://problem/8958280>
6902
6903        Reviewed by Maciej Stachowiak.
6904
6905        * WebProcess/Downloads/Download.cpp:
6906        Include DownloadAuthenticationClient.h.
6907
6908        * WebProcess/Downloads/Download.h:
6909        Declare a function to get or create the authentication client, a member
6910        var to hold it, and functions that the client can call to use a
6911        credential, continue without a credential, or cancel an auth challenge.
6912
6913        * WebProcess/Downloads/DownloadAuthenticationClient.cpp: Added.
6914        (WebKit::DownloadAuthenticationClient::DownloadAuthenticationClient):
6915        (WebKit::DownloadAuthenticationClient::receivedCredential):
6916        Tell the Download to use the credential.
6917        (WebKit::DownloadAuthenticationClient::receivedRequestToContinueWithoutCredential):
6918        Tell the Download to continue with credentials.
6919        (WebKit::DownloadAuthenticationClient::receivedCancellation):
6920        Tell the Download to cancel the challenge.
6921
6922        * WebProcess/Downloads/DownloadAuthenticationClient.h: Added.
6923        (WebKit::DownloadAuthenticationClient::create):
6924        Return a new DownloadAuthenticationClient.
6925        (WebKit::DownloadAuthenticationClient::detach):
6926        Clear the Download.
6927        (WebKit::DownloadAuthenticationClient::refAuthenticationClient):
6928        (WebKit::DownloadAuthenticationClient::derefAuthenticationClient):
6929
6930        * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
6931        (WebKit::Download::useCredential):
6932        Create a CFURLCredentialRef from the WebCore credential, and tell
6933        CFNetwork to use it for the auth challenge.
6934        (WebKit::Download::continueWithoutCredential):
6935        Call CFURLDownloadUseCredential with a null credential.
6936        (WebKit::Download::cancelAuthenticationChallenge):
6937        Cancel the download, and clear m_download.
6938        (WebKit::Download::authenticationClient):
6939        Create if needed and return a DownloadAuthenticationClient.
6940        (WebKit::Download::platformInvalidate):
6941        Detach the DownloadAuthenticationClient.
6942        (WebKit::didReceiveAuthenticationChallengeCallback):
6943        Call Download::didReceiveAuthenticationChallenge(), passing a
6944        WebCore::AuthenticationChallenge with our DownloadAuthenticationClient.
6945        (WebKit::Download::receivedCredential):
6946        Get the client from the auth challenge, and call through to it.
6947        (WebKit::Download::receivedRequestToContinueWithoutCredential):
6948        Ditto.
6949        (WebKit::Download::receivedCancellation):
6950        Ditto.
6951
6952        * win/WebKit2.vcproj:
6953        Add new files to project.
6954
69552011-04-21  Alexey Proskuryakov  <ap@apple.com>
6956
6957        Reviewed by Maciej Stachowiak.
6958
6959        Minimize synchronous calls during loading
6960        https://bugs.webkit.org/show_bug.cgi?id=59169
6961
6962        <rdar://problem/9320128> REGRESSION(r84526): WK2 windows unresponsive
6963
6964        * UIProcess/API/mac/WKView.mm:
6965        (-[WKView resignFirstResponder]):
6966        (-[WKView _resetTextInputState]):
6967        Made _resetTextInputState deal with client side state only, letting Editor composition be
6968        discarded more discriminately.
6969
69702011-04-21  Maciej Stachowiak  <mjs@apple.com>
6971
6972        Reviewed by Adam Roben.
6973
6974        Add a feature define to allow <details> and <summary> to be disabled
6975        https://bugs.webkit.org/show_bug.cgi?id=59118
6976        <rdar://problem/9257045>
6977
6978        * Configurations/FeatureDefines.xcconfig:
6979
69802011-04-21  Ivan Krstić  <ike@apple.com>
6981
6982        Reviewed by Maciej Stachowiak.
6983
6984        <rdar://problem/9311103>
6985
6986        Remove unnecessary QTKitServer and Apple Events permissions
6987        from the WebProcess sandbox.
6988
6989        * WebProcess/com.apple.WebProcess.sb:
6990
69912011-04-21  Ivan Krstić  <ike@apple.com>
6992
6993        Reviewed by Maciej Stachowiak.
6994
6995        <rdar://problem/9033535>
6996
6997        Mute sandbox violations when attempting to read a temporary
6998        CFNetwork keychain.
6999
7000        * WebProcess/com.apple.WebProcess.sb:
7001
70022011-04-21  Ryosuke Niwa  <rniwa@webkit.org>
7003
7004        Reviewed by Sam Weinig.
7005
7006        Add Frame* to the argument lists of canCopyCut and canPaste
7007        https://bugs.webkit.org/show_bug.cgi?id=59153
7008
7009        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
7010        (WebKit::WebEditorClient::canCopyCut):
7011        (WebKit::WebEditorClient::canPaste):
7012        * WebProcess/WebCoreSupport/WebEditorClient.h:
7013
70142011-04-21  Ivan Krstić  <ike@apple.com>
7015
7016        Reviewed by Maciej Stachowiak.
7017
7018        <rdar://problem/8774116>
7019
7020        The WebProcess sandbox should only allow access to the
7021        parts of the Darwin cache directory needed by the Security
7022        framework.
7023
7024        * WebProcess/com.apple.WebProcess.sb:
7025
70262011-04-21  Ivan Krstić  <ike@apple.com>
7027
7028        Reviewed by Maciej Stachowiak.
7029
7030        <rdar://problem/9311053>
7031
7032        The WebProcess sandbox should not allow opening arbitrary
7033        IOKit user clients. Restrict to a whitelist required for normal
7034        WebProcess operation, including sound and accelerated graphics.
7035
7036        * WebProcess/com.apple.WebProcess.sb:
7037
70382011-04-21  Ivan Krstić  <ike@apple.com>
7039
7040        Reviewed by Maciej Stachowiak.
7041
7042        <rdar://problem/9311037>
7043
7044        The WebProcess sandbox should not allow modification of the
7045        CoreAudio component cache.
7046
7047        * WebProcess/com.apple.WebProcess.sb:
7048
70492011-04-21  Ivan Krstić  <ike@apple.com>
7050
7051        Reviewed by Maciej Stachowiak.
7052
7053        <rdar://problem/9263428>
7054
7055        The WebProcess sandbox should only allow outbound networking
7056        to remote destinations and local kernel controls.
7057
7058        * WebProcess/com.apple.WebProcess.sb:
7059
70602011-04-21  Sheriff Bot  <webkit.review.bot@gmail.com>
7061
7062        Unreviewed, rolling out r82052.
7063        http://trac.webkit.org/changeset/82052
7064        https://bugs.webkit.org/show_bug.cgi?id=59135
7065
7066        New full screen api should be opt-in, not opt-out. (Requested
7067        by jernoble on #webkit).
7068
7069        * Shared/WebPreferencesStore.h:
7070
70712011-04-21  Beth Dakin  <bdakin@apple.com>
7072
7073        Reviewed by Dan Bernstein.
7074
7075        https://bugs.webkit.org/show_bug.cgi?id=59048
7076        Need to track whether overlay scrollbar is currently visible and in lower-
7077        righthand corner
7078        -and corresponding-
7079        <rdar://problem/9211232>
7080
7081        WebPageProxy now stores an IntRect of the scroller thumb set by WebCore through 
7082        the client.
7083
7084        _windowResizeMouseLocationIsInVisibleScrollerThumb tests if the parameter point is 
7085        inside the cached scroller thumb rect.
7086        * UIProcess/API/mac/WKView.mm:
7087        (-[WKView _windowResizeMouseLocationIsInVisibleScrollerThumb:]):
7088
7089        Client work to cache the rect.
7090        * UIProcess/WebPageProxy.cpp:
7091        (WebKit::WebPageProxy::WebPageProxy):
7092        (WebKit::WebPageProxy::close):
7093        (WebKit::WebPageProxy::processDidCrash):
7094        (WebKit::WebPageProxy::notifyScrollerThumbIsVisibleInRect):
7095        * UIProcess/WebPageProxy.h:
7096        (WebKit::WebPageProxy::visibleScrollerThumbRect):
7097        * UIProcess/WebPageProxy.messages.in:
7098        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
7099        (WebKit::WebChromeClient::notifyScrollerThumbIsVisibleInRect):
7100        * WebProcess/WebCoreSupport/WebChromeClient.h:
7101
7102        New WebSystemInterface is needed by WebCore for this.
7103        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
7104        (InitWebCoreSystemInterface):
7105
71062011-04-21  Andreas Kling  <andreas.kling@nokia.com>
7107
7108        Reviewed by Kenneth Rohde Christiansen.
7109
7110        [Qt][WK2] Emit QWKPage::urlChanged() when navigating within the same document.
7111        https://bugs.webkit.org/show_bug.cgi?id=59044
7112
7113        Hook up the didSameDocumentNavigationForFrame callback to QWKPage::urlChanged().
7114
7115        * UIProcess/API/qt/ClientImpl.cpp:
7116        (qt_wk_didSameDocumentNavigationForFrame):
7117        * UIProcess/API/qt/ClientImpl.h:
7118        * UIProcess/API/qt/qwkpage.cpp:
7119        (QWKPage::QWKPage):
7120
71212011-04-20  Alexey Proskuryakov  <ap@apple.com>
7122
7123        Reviewed by Maciej Stachowiak.
7124
7125        WebKit2: Unconfirmed inline input session persists after reload
7126        https://bugs.webkit.org/show_bug.cgi?id=59054
7127        <rdar://problem/9291086>
7128
7129        Makes the inline input get properly confirmed or discarded when changing selection,
7130        navigating to another page, focusing another view in the window, or after a web process
7131        crash.
7132
7133        * Shared/EditorState.h: (WebKit::EditorState::EditorState):
7134        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState):
7135        Added a variable that Editor sets while processing input method calls. We don't want
7136        selection changes caused by -setMarkedText: discard the composition!
7137        
7138        * UIProcess/PageClient.h:
7139        * UIProcess/API/mac/PageClientImpl.h:
7140        * UIProcess/API/mac/PageClientImpl.mm:
7141        (WebKit::PageClientImpl::updateTextInputState):
7142        (WebKit::PageClientImpl::resetTextInputState):
7143        Extended updateSecureInputState() to potentially confirm the current inline input session.
7144        Added resetTextInputState, which is to be called when we get out of the current web page.
7145
7146        * UIProcess/API/mac/WKView.mm:
7147        (-[WKView resignFirstResponder]): Just call _resetTextInputState instead of dealing with
7148        input state here.
7149        (-[WKView _updateSecureInputState]): Use _isFocused to make the code simpler.
7150        (-[WKView _updateTextInputStateIncludingSecureInputState:]): Confirm the current inline
7151        input session if selection changed for any other reason but an input method changing the
7152        composition. We will want to do other work here, like dismissing a dictionary pop-up,
7153        updating a font panel etc.
7154        (-[WKView _resetTextInputState]): Added. We don't want secure text input persist after
7155        navigations, crashes an such, and we also don't want input methods to remember inline input
7156        state. Relying on selection changed notifications is fragile and insufficient.
7157
7158        * UIProcess/API/mac/WKViewInternal.h: Added internal functions to keep the build unbroken.
7159
7160        * UIProcess/WebPageProxy.cpp:
7161        (WebKit::WebPageProxy::didCommitLoadForFrame): This is the best chance we have to reset input
7162        state for a new page. This doesn't work well for cached page loads, but WK1 is quite broken
7163        in that case, too.
7164        (WebKit::WebPageProxy::editorStateChanged): Moved some logic up to the client, since the
7165        function now does much more than before.
7166
7167        * UIProcess/WebPageProxy.h:
7168        * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::confirmCompositionWithoutDisturbingSelection):
7169        * WebProcess/WebPage/WebPage.h:
7170        * WebProcess/WebPage/WebPage.messages.in:
7171        * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::confirmCompositionWithoutDisturbingSelection):
7172        Added confirmCompositionWithoutDisturbingSelection(). When we confirm the composition due
7173        to selection change, we obvisouly don't want the selection to move back.
7174
71752011-04-21  Sam Weinig  <sam@webkit.org>
7176
7177        Reviewed by Simon Fraser.
7178
7179        Remove warnings from DrawingAreaImpl and related classes
7180        https://bugs.webkit.org/show_bug.cgi?id=59120
7181
7182        DrawingAreaImpl is mature enough for others to adopt. Remove warnings.
7183
7184        * UIProcess/BackingStore.cpp:
7185        * UIProcess/DrawingAreaProxyImpl.cpp:
7186        * WebProcess/WebPage/DrawingAreaImpl.cpp:
7187        * WebProcess/WebPage/LayerTreeHost.cpp:
7188
71892011-04-21  Sam Weinig  <sam@webkit.org>
7190
7191        Reviewed by Simon Fraser.
7192
7193        Deploy GraphicsContextStateSaver in WebKit2
7194        https://bugs.webkit.org/show_bug.cgi?id=59116
7195
7196        * UIProcess/FindIndicator.cpp:
7197        (WebKit::FindIndicator::draw):
7198        * WebProcess/Plugins/PluginView.cpp:
7199        (WebKit::PluginView::paint):
7200        * WebProcess/WebPage/FindController.cpp:
7201        (WebKit::FindController::drawRect):
7202        * WebProcess/WebPage/PageOverlay.cpp:
7203        (WebKit::PageOverlay::drawRect):
7204        * WebProcess/WebPage/WebPage.cpp:
7205        (WebKit::WebPage::drawRect):
7206        (WebKit::WebPage::drawPageOverlay):
7207
72082011-04-21  Jessie Berlin  <jberlin@apple.com>
7209
7210        Reviewed by Sam Weinig.
7211
7212        WebKit2: Need a way to get a snapshot of the visible contents of a page from the UI Process.
7213        https://bugs.webkit.org/show_bug.cgi?id=59035
7214
7215        Added a sync call from the UI Process to the Web Process with comments saying that it should
7216        be removed as soon as possible.
7217
7218        * UIProcess/API/C/WKPage.cpp:
7219        (WKPageVisibleContentsSnapshot):
7220        * UIProcess/API/C/WKPagePrivate.h:
7221
7222        * UIProcess/WebPageProxy.cpp:
7223        (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
7224        * UIProcess/WebPageProxy.h:
7225
7226        * WebProcess/WebPage/WebPage.cpp:
7227        (WebKit::WebPage::createSnapshotOfVisibleContent):
7228        Ask the FrameView for the visibleContentRect, and call scaledSnapshotInDocumentCoordinates
7229        with a scale factor of 1 (which preserves the current scaling of the page - e.g. if the
7230        page is already zoomed then the snapshot will reflect the zoomed content).
7231        * WebProcess/WebPage/WebPage.h:
7232        * WebProcess/WebPage/WebPage.messages.in:
7233
72342011-04-20  Dominic Cooney  <dominicc@chromium.org>
7235
7236        Reviewed by Dimitri Glazkov.
7237
7238        layoutTestController can create and destroy shadow DOM
7239        https://bugs.webkit.org/show_bug.cgi?id=59058
7240
7241        Support for new methods in WK2 WebKitTestRunner.
7242
7243        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
7244        (WKBundleNodeHandleCopyElementEnsureShadowRoot):
7245        (WKBundleNodeHandleRemoveShadowRoot):
7246        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
7247        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
7248        (WebKit::InjectedBundleNodeHandle::elementShadowRoot):
7249        (WebKit::InjectedBundleNodeHandle::elementEnsureShadowRoot):
7250        (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot):
7251        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
7252
72532011-04-20  Anders Carlsson  <andersca@apple.com>
7254
7255        Reviewed by Sam Weinig.
7256
7257        Don't discard backing stores for hung web processes
7258        https://bugs.webkit.org/show_bug.cgi?id=59039
7259        <rdar://problem/9237090>
7260
7261        * UIProcess/WebPageProxy.cpp:
7262        (WebKit::WebPageProxy::viewStateDidChange):
7263        (WebKit::WebPageProxy::processDidBecomeUnresponsive):
7264        (WebKit::WebPageProxy::processDidBecomeResponsive):
7265        Call updateBackingStoreDiscardableState.
7266
7267        (WebKit::WebPageProxy::updateBackingStoreDiscardableState):
7268        Never mark the backing store as discardable if the web process is hung
7269
72702011-04-20  Maciej Stachowiak  <mjs@apple.com>
7271
7272        Reviewed by Sam Weinig.
7273
7274        Reproducible crash under WebPageProxy::didReceiveEvent
7275        https://bugs.webkit.org/show_bug.cgi?id=59036
7276        <rdar://problem/9252083>
7277
7278        * UIProcess/API/mac/WKView.mm:
7279        (-[WKView _resendKeyDownEvent:]): Protect against self-destruction
7280        when re-dispatching the event.        
7281        * UIProcess/WebProcessProxy.cpp:
7282        (WebKit::WebProcessProxy::createWebPage): Fixed a type mismatch
7283        I noticed while debugging.
7284
72852011-04-20  Timothy Hatcher  <timothy@apple.com>
7286
7287        Make the Web Insepctor come to the front when a breakpoint is hit.
7288
7289        <https://webkit.org/b/57480> REGRESSION (WebKit2): Inspector doesn't come to the front when a breakpoint is hit in the debugger
7290        <rdar://problem/9209472>
7291
7292        Reviewed by Adam Roben.
7293
7294        * UIProcess/WebInspectorProxy.cpp:
7295        (WebKit::WebInspectorProxy::bringToFront): Added. Call platformBringToFront.
7296        * UIProcess/WebInspectorProxy.h:
7297        * UIProcess/WebInspectorProxy.messages.in: Added BringToFront.
7298        * UIProcess/mac/WebInspectorProxyMac.mm:
7299        (WebKit::WebInspectorProxy::platformBringToFront): Added. Call orderFront:.
7300        * UIProcess/win/WebInspectorProxyWin.cpp:
7301        (WebKit::WebInspectorProxy::platformBringToFront): Added. Call ShowWindow.
7302        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
7303        (WebKit::WebInspectorFrontendClient::bringToFront): Call WebInspector::bringToFront.
7304        * WebProcess/WebPage/WebInspector.cpp:
7305        (WebKit::WebInspector::bringToFront): Added. Send WebInspectorProxy::BringToFront message.
7306        * WebProcess/WebPage/WebInspector.h: Added bringToFront.
7307
73082011-04-20  Chris Marrin  <cmarrin@apple.com>
7309
7310        Reviewed by Adam Roben.
7311
7312        REGRESSION (WebKit2): CSS animations on pages that use accelerated compositing stop after switching tabs
7313        https://bugs.webkit.org/show_bug.cgi?id=57868
7314        
7315        Subclassed setRootCompositingLayer so it can call ensureAnimationsSubmitted on Win.
7316
7317        * WebProcess/WebPage/ca/LayerTreeHostCA.h:
7318            Make setRootCompositingLayer protected so it can be called from subclass
7319        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
7320            Override setRootCompositingLayer to add call to root layer's
7321            PlatformCALayer::ensureAnimationsSubmitted method
7322        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h:
7323
73242011-04-18  Eric Carlson  <eric.carlson@apple.com>
7325
7326        Reviewed by Dan Bernstein.
7327
7328        Adopt QTKit API for listing and deleting file in its media cache.
7329        <rdar://problem/9130029> 
7330
7331        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
7332        (InitWebCoreSystemInterface): Initialize new functions.
7333
73342011-04-20  Alejandro G. Castro  <alex@igalia.com>
7335
7336        Fixed GTK+ compilation after r84206.
7337
7338        * GNUmakefile.am:
7339
73402011-04-20  Adam Roben  <aroben@apple.com>
7341
7342        Remove some unnecessary VS junk related to NativeWebMouseEventWin.cpp
7343
7344        * win/WebKit2.vcproj:
7345
73462011-04-20  Balazs Kelemen  <kbalazs@webkit.org>
7347
7348        Reviewed by Csaba Osztrogonác.
7349
7350        [Qt] Cleanup includepath adjustment for generated files
7351        https://bugs.webkit.org/show_bug.cgi?id=58869
7352
7353        * WebKit2.pri: Add the directory of generated files to the include
7354        path with absolute path to make it valid in the final build step.
7355
73562011-04-19  Anders Carlsson  <andersca@apple.com>
7357
7358        Reviewed by Sam Weinig.
7359
7360        UI process thinks the page is unresponsive when a plug-in is showing a context menu
7361        https://bugs.webkit.org/show_bug.cgi?id=58943
7362        <rdar://problem/9299901>
7363
7364        Change the HandleMouseEvent message to have a delayed reply and make the PluginControllerProxy
7365        respond to it immediately, before even passing the event to the plug-in. Since it doesn't matter
7366        for mouse events whether the plug-in handled them or not we can do this.
7367
7368        Another solution could have been to make handleMouseEvent an asynchronous message, but that could
7369        mess up the message ordering so this seemed like the least intrusive change.
7370
7371        * PluginProcess/PluginControllerProxy.cpp:
7372        (WebKit::PluginControllerProxy::handleMouseEvent):
7373        * PluginProcess/PluginControllerProxy.h:
7374        * PluginProcess/PluginControllerProxy.messages.in:
7375
73762011-04-19  Anders Carlsson  <andersca@apple.com>
7377
7378        Reviewed by Dan Bernstein.
7379
7380        Terminate hung plug-in processes after 45 seconds
7381        https://bugs.webkit.org/show_bug.cgi?id=58932
7382        <rdar://problem/8083219>
7383
7384        * UIProcess/Plugins/PluginProcessManager.cpp:
7385        (WebKit::PluginProcessManager::pluginSyncMessageSendTimedOut):
7386        Find the plug-in process proxy and terminate it.
7387
7388        (WebKit::PluginProcessManager::pluginProcessWithPath):
7389        Add new helper function.
7390
7391        (WebKit::PluginProcessManager::getOrCreatePluginProcess):
7392        Call pluginProcessWithPath.
7393
7394        * UIProcess/Plugins/PluginProcessProxy.cpp:
7395        (WebKit::PluginProcessProxy::terminate):
7396        Terminate the process.
7397
7398        * UIProcess/Plugins/PluginProcessProxy.h:
7399        * UIProcess/WebProcessProxy.cpp:
7400        (WebKit::WebProcessProxy::pluginSyncMessageSendTimedOut):
7401        Call PluginProcessManager::pluginSyncMessageSendTimedOut.
7402
7403        * UIProcess/WebProcessProxy.h:
7404        * UIProcess/WebProcessProxy.messages.in:
7405        Add PluginSyncMessageSendTimedOut message.
7406
7407        * WebProcess/Plugins/PluginProcessConnection.cpp:
7408        (WebKit::defaultSyncMessageTimeout):
7409        (WebKit::PluginProcessConnection::PluginProcessConnection):
7410        Set a sync message timeout on the plug-in process connection.
7411
7412        (WebKit::PluginProcessConnection::syncMessageSendTimedOut):
7413        Send a message to the web process proxy.
7414
74152011-04-19  Alexey Proskuryakov  <ap@apple.com>
7416
7417        Reviewed by Adele Peterson.
7418
7419        WebKit2: Merge SelectionState and TextInputState
7420        https://bugs.webkit.org/show_bug.cgi?id=58919
7421
7422        Combined TextInputState and EditorState in one structure, which is updated whenever we get
7423        a chance to. There is no sense to keep possibly stale SelectionState data when we have already
7424        requested the most recent data synchronously.
7425
7426        This also simplifies the code, as we don't need to pass the state around in a separate variable.
7427
7428        * GNUmakefile.am:
7429        * Scripts/webkit2/messages.py:
7430        * Shared/EditorState.h: Copied from Source/WebKit2/Shared/SelectionState.h.
7431        (WebKit::EditorState::EditorState):
7432        * Shared/SelectionState.h: Removed.
7433        * Shared/mac/TextInputState.h: Removed.
7434        * UIProcess/API/mac/PageClientImpl.h:
7435        * UIProcess/API/mac/PageClientImpl.mm:
7436        (WebKit::PageClientImpl::interpretKeyEvent):
7437        * UIProcess/API/mac/WKView.mm:
7438        (-[WKView validRequestorForSendType:returnType:]):
7439        (-[WKView validateUserInterfaceItem:]):
7440        (-[WKView shouldDelayWindowOrderingForEvent:]):
7441        (-[WKView doCommandBySelector:]):
7442        (-[WKView insertText:replacementRange:]):
7443        (-[WKView _handleStyleKeyEquivalent:]):
7444        (-[WKView _executeSavedKeypressCommands]):
7445        (-[WKView inputContext]):
7446        (-[WKView hasMarkedText]):
7447        (-[WKView unmarkText]):
7448        (-[WKView setMarkedText:selectedRange:replacementRange:]):
7449        (-[WKView attributedSubstringForProposedRange:actualRange:]):
7450        (-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]):
7451        (-[WKView _updateSecureInputState]):
7452        * UIProcess/API/mac/WKViewInternal.h:
7453        * UIProcess/PageClient.h:
7454        * UIProcess/WebPageProxy.cpp:
7455        (WebKit::WebPageProxy::editorStateChanged):
7456        * UIProcess/WebPageProxy.h:
7457        (WebKit::WebPageProxy::editorState):
7458        (WebKit::WebPageProxy::hasSelectedRange):
7459        (WebKit::WebPageProxy::isContentEditable):
7460        * UIProcess/WebPageProxy.messages.in:
7461        * UIProcess/mac/WebPageProxyMac.mm:
7462        (WebKit::WebPageProxy::setComposition):
7463        (WebKit::WebPageProxy::confirmComposition):
7464        (WebKit::WebPageProxy::insertText):
7465        (WebKit::WebPageProxy::executeKeypressCommands):
7466        (WebKit::WebPageProxy::writeSelectionToPasteboard):
7467        (WebKit::WebPageProxy::readSelectionFromPasteboard):
7468        (WebKit::WebPageProxy::interpretQueuedKeyEvent):
7469        * UIProcess/win/WebView.cpp:
7470        (WebKit::WebView::compositionSelectionChanged):
7471        (WebKit::WebView::onIMEComposition):
7472        (WebKit::WebView::onIMEEndComposition):
7473        (WebKit::WebView::onIMERequestCharPosition):
7474        (WebKit::WebView::onIMERequest):
7475        * WebKit2.xcodeproj/project.pbxproj:
7476        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
7477        (WebKit::WebEditorClient::respondToChangedSelection):
7478        * WebProcess/WebPage/WebPage.cpp:
7479        (WebKit::WebPage::editorState):
7480        * WebProcess/WebPage/WebPage.h:
7481        * WebProcess/WebPage/WebPage.messages.in:
7482        * WebProcess/WebPage/mac/WebPageMac.mm:
7483        (WebKit::WebPage::handleEditingKeyboardEvent):
7484        (WebKit::WebPage::setComposition):
7485        (WebKit::WebPage::confirmComposition):
7486        (WebKit::WebPage::insertText):
7487        (WebKit::WebPage::executeKeypressCommands):
7488        * win/WebKit2.vcproj:
7489
74902011-04-19  Alexey Proskuryakov  <ap@apple.com>
7491
7492        Reviewed by Timothy Hatcher.
7493
7494        100% reproducible crash when right-clicking any element in Web Inspector on any page
7495        https://bugs.webkit.org/show_bug.cgi?id=58822
7496
7497        Web Inspector changes selection from JavaScript, and checks in UI process are insufficient
7498        when selection is changing asynchronously.
7499
7500        * WebProcess/WebPage/mac/WebPageMac.mm:
7501        (WebKit::WebPage::writeSelectionToPasteboard): Check that there is a selection, matching WK1
7502        and UI process side. Perhaps the check should really be in WebCore, but for now, it's a
7503        WebKit responsibility.
7504        (WebKit::WebPage::readSelectionFromPasteboard): Same check, for no other reason but consistency.
7505
75062011-04-19  Anders Carlsson  <andersca@apple.com>
7507
7508        Reviewed by Sam Weinig.
7509
7510        Add syncMessageSendTimedOut CoreIPC Connection::Client member function
7511        https://bugs.webkit.org/show_bug.cgi?id=58928
7512
7513        * Platform/CoreIPC/Connection.cpp:
7514        (CoreIPC::Connection::waitForSyncReply):
7515        Call syncMessageSendTimedOut.
7516
7517        * Platform/CoreIPC/Connection.h:
7518        Add syncMessageSendTimedOut to Connection::Client.
7519
7520        * PluginProcess/PluginProcess.cpp:
7521        * PluginProcess/PluginProcess.h:
7522        * PluginProcess/WebProcessConnection.cpp:
7523        * PluginProcess/WebProcessConnection.h:
7524        * UIProcess/Plugins/PluginProcessProxy.cpp:
7525        * UIProcess/Plugins/PluginProcessProxy.h:
7526        * UIProcess/WebProcessProxy.cpp:
7527        * UIProcess/WebProcessProxy.h:
7528        * WebProcess/Plugins/PluginProcessConnection.cpp:
7529        * WebProcess/Plugins/PluginProcessConnection.h:
7530        * WebProcess/WebProcess.cpp:
7531        * WebProcess/WebProcess.h:
7532        Add syncMessageSendTimedOut stubs.
7533
75342011-04-19  Anders Carlsson  <andersca@apple.com>
7535
7536        Reviewed by Alexey Proskuryakov.
7537
7538        Replace the didFailToSendSyncMessage Connection::Client function with a flag
7539        https://bugs.webkit.org/show_bug.cgi?id=58923
7540
7541        * Platform/CoreIPC/Connection.cpp:
7542        (CoreIPC::Connection::Connection):
7543        Initialize m_shouldExitOnSyncMessageSendFailure to false.
7544
7545        (CoreIPC::Connection::setShouldExitOnSyncMessageSendFailure):
7546        Set m_didCloseOnConnectionWorkQueueCallback.
7547
7548        (CoreIPC::Connection::sendSyncMessage):
7549        Call didFailToSendSyncMessage if we fail to send the sync message for some reason.
7550
7551        (CoreIPC::Connection::didFailToSendSyncMessage):
7552        if m_shouldExitOnSyncMessageSendFailure is true, exit.
7553
7554        * Platform/CoreIPC/Connection.h:
7555        Remove didFailToSendSyncMessage from Connection::Client.
7556
7557        * PluginProcess/PluginProcess.cpp:
7558        * PluginProcess/PluginProcess.h:
7559        Remove didFailToSendSyncMessage.
7560
7561        * WebProcess/WebProcess.cpp:
7562        (WebKit::WebProcess::initialize):
7563        * WebProcess/WebProcess.h:
7564        Remove didFailToSendSyncMessage. Call setShouldExitOnSyncMessageSendFailure on our
7565        UI process connection.
7566
75672011-04-19  Anders Carlsson  <andersca@apple.com>
7568
7569        Reviewed by Sam Weinig.
7570
7571        Add a way to set the default sync message timeout for a CoreIPC connection
7572        https://bugs.webkit.org/show_bug.cgi?id=58908
7573
7574        * Platform/CoreIPC/Connection.cpp:
7575        (CoreIPC::Connection::Connection):
7576        Initialize m_defaultSyncMessageTimeout.
7577
7578        (CoreIPC::Connection::setDefaultSyncMessageTimeout):
7579        Set the m_defaultSyncMessageTimeout member variable.
7580
7581        (CoreIPC::Connection::waitForSyncReply):
7582        Handle the timeout being one of our two special magic values.
7583
7584        * Platform/CoreIPC/Connection.h:
7585        Add a DefaultTimeout constant and change the NoTimeout constant to be -1.
7586
75872011-04-19  Vsevolod Vlasov  <vsevik@chromium.org>
7588
7589        Reviewed by Pavel Feldman.
7590
7591        Web Inspector: Rename lengthReceived to encodedDataLength/dataLength
7592        https://bugs.webkit.org/show_bug.cgi?id=58883
7593
7594        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7595        (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength):
7596        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
7597
75982011-04-19  Andreas Kling  <andreas.kling@nokia.com>
7599
7600        Reviewed by Antonio Gomes.
7601
7602        WebKit2: Typo fix in WebPopupMenu::Type.
7603        https://bugs.webkit.org/show_bug.cgi?id=58891
7604
7605        Fixed a typo, Seperator -> Separator.
7606        Also removed m_ prefix on an argument variable name.
7607
7608        * Shared/WebPopupItem.h:
7609        * UIProcess/mac/WebPopupMenuProxyMac.mm:
7610        (WebKit::WebPopupMenuProxyMac::populate):
7611        * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
7612        (WebKit::WebPopupMenu::populateItems):
7613
76142011-04-19  Jon Honeycutt  <jhoneycutt@apple.com>
7615
7616        WKContextDownloadURLRequest() should return a WKDownloadRef
7617        https://bugs.webkit.org/show_bug.cgi?id=58867
7618        Part of <rdar://problem/8931717>
7619
7620        Reviewed by Steve Falkenburg.
7621
7622        * UIProcess/API/C/WKContext.cpp:
7623        (WKContextDownloadURLRequest):
7624        Return the result of calling WebContext::download().
7625
7626        * UIProcess/API/C/WKContext.h:
7627        Updated return type of WKContextDownloadURLRequest().
7628
7629        * UIProcess/WebContext.cpp:
7630        (WebKit::WebContext::download):
7631        Return the DownloadProxy returned by createDownloadProxy().
7632        (WebKit::WebContext::createDownloadProxy):
7633        Return the DownloadProxy.
7634
7635        * UIProcess/WebContext.h:
7636        Changed return type of download() and createDownloadProxy().
7637
7638        * UIProcess/WebPageProxy.cpp:
7639        (WebKit::WebPageProxy::receivedPolicyDecision):
7640        Call the DownloadProxy's downloadID() function to get the ID.
7641
76422011-04-18  Jia Pu  <jpu@apple.com>
7643
7644        Reviewed by Mark Rowe.
7645
7646        WebKit needs to stop importing <AppKit/NSTextChecker.h>
7647        https://bugs.webkit.org/show_bug.cgi?id=58798
7648        <rdar://problem/9294938>
7649
7650        Use public header <AppKit/NSSpellChecker.h> instead.
7651
7652        * UIProcess/mac/CorrectionPanel.h:
7653        * UIProcess/mac/CorrectionPanel.mm:
7654        (correctionIndicatorType):
7655        (WebKit::CorrectionPanel::show):
7656        (WebKit::CorrectionPanel::dismissInternal):
7657        (WebKit::CorrectionPanel::handleAcceptedReplacement):
7658        * UIProcess/mac/TextCheckerMac.mm:
7659        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
7660
76612011-04-05  Jer Noble  <jer.noble@apple.com>
7662
7663        Reviewed by Sam Weinig.
7664
7665        WebKit2: WKTR should support WebKit2 full screen APIs
7666        https://bugs.webkit.org/show_bug.cgi?id=56318
7667
7668        Add a new WKBundlePage API for Full Screen events, and move some of the implementation
7669        of WebFullScreenManager into the new InjectedBundlePageFullScreenClient class, so that
7670        the default behavior can be overridden by a WKBundlePageFullScreenClient.
7671
7672        * WebKit2.xcodeproj/project.pbxproj:
7673        * WebProcess/FullScreen/WebFullScreenManager.cpp:
7674        (WebKit::WebFullScreenManager::supportsFullScreen): Moved contents into InjectedBundlePageFullScreenClient.
7675        (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
7676        (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
7677        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
7678        (WKBundlePageSetFullScreenClient): Added.
7679        (WKBundlePageWillEnterFullScreenForElement): Added.
7680        (WKBundlePageDidEnterFullScreenForElement): Added.
7681        (WKBundlePageWillExitFullScreenForElement): Added.
7682        (WKBundlePageDidExitFullScreenForElement): Added.
7683        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
7684        * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: Added.
7685        (WebKit::InjectedBundlePageFullScreenClient::supportsFullScreen): Added. 
7686        (WebKit::InjectedBundlePageFullScreenClient::enterFullScreenForElement): Added.
7687        (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Added.
7688        * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: Added.
7689        * WebProcess/WebPage/WebPage.cpp:
7690        (WebKit::WebPage::initializeInjectedBundleFullScreenClient): Added.
7691        * WebProcess/WebPage/WebPage.h:
7692        (WebKit::WebPage::injectedBundleFullScreenClient): Added.
7693
76942011-04-18  Alexey Proskuryakov  <ap@apple.com>
7695
7696        Reviewed by Maciej Stachowiak.
7697
7698        Re-add a null check lost in r83081
7699        https://bugs.webkit.org/show_bug.cgi?id=58846
7700
7701        * WebProcess/WebPage/mac/WebPageMac.mm:
7702        (WebKit::WebPage::getSelectedRange):
7703
77042011-04-18  Andreas Kling  <kling@webkit.org>
7705
7706        Reviewed by Kenneth Rohde Christiansen.
7707
7708        [Qt][WK2] Clean up tool-tip/status-bar confusion.
7709        https://bugs.webkit.org/show_bug.cgi?id=58844
7710
7711        Tool-tips were incorrectly hooked up to the status bar text.
7712        Chrome::setStatusbarText() now correctly causes the QWKPage::statusBarMessage() signal.
7713
7714        New API:
7715        - QWKPage::toolTipChanged(const QString& toolTip) [signal]
7716
7717        QGraphicsWKView will automatically listen for this and set its own toolTip().
7718
7719        * UIProcess/API/qt/ClientImpl.cpp:
7720        (qt_wk_setStatusText):
7721        * UIProcess/API/qt/ClientImpl.h:
7722        * UIProcess/API/qt/qgraphicswkview.cpp:
7723        (QGraphicsWKView::QGraphicsWKView):
7724        (QGraphicsWKViewPrivate::onToolTipChanged):
7725        * UIProcess/API/qt/qgraphicswkview.h:
7726        * UIProcess/API/qt/qwkpage.cpp:
7727        (QWKPagePrivate::toolTipChanged):
7728        (QWKPage::QWKPage):
7729        * UIProcess/API/qt/qwkpage.h:
7730
77312011-04-18  Maciej Stachowiak  <mjs@apple.com>
7732
7733        Reviewed by Dan Bernstein.
7734
7735        sandbox violation for ~/Library/Dictionaries
7736        https://bugs.webkit.org/show_bug.cgi?id=58841
7737        <rdar://problem/9294770>
7738
7739        * WebProcess/com.apple.WebProcess.sb: Add to sandbox profile.
7740        No obvious harm from allowing this, though it's not 100% clear
7741        why it's needed.
7742
77432011-04-18  Anders Carlsson  <andersca@apple.com>
7744
7745        Try to fix the Windows build.
7746
7747        * Scripts/webkit2/messages.py:
7748
77492011-04-18  Anders Carlsson  <andersca@apple.com>
7750
7751        Reviewed by Dan Bernstein.
7752
7753        Get rid of WebProcessProxyLegacyMessage
7754        https://bugs.webkit.org/show_bug.cgi?id=58825
7755
7756        * GNUmakefile.am:
7757        * Platform/CoreIPC/MessageID.h:
7758        * Shared/CoreIPCSupport/WebProcessProxyMessageKinds.h: Removed.
7759        * UIProcess/WebProcessProxy.cpp:
7760        * WebKit2.xcodeproj/project.pbxproj:
7761        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
7762        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
7763        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
7764        * WebProcess/WebPage/WebPage.cpp:
7765        * win/WebKit2.vcproj:
7766
77672011-04-18  Anders Carlsson  <andersca@apple.com>
7768
7769        Fix build.
7770
7771        * UIProcess/Plugins/PluginInfoStore.h:
7772
77732011-04-18  Anders Carlsson  <andersca@apple.com>
7774
7775        Reviewed by Sam Weinig.
7776
7777        Use the message generator for the GetPluginProcessConnection message
7778        https://bugs.webkit.org/show_bug.cgi?id=58815
7779
7780        * Platform/CoreIPC/HandleMessage.h:
7781        (CoreIPC::callMemberFunction):
7782        (CoreIPC::handleMessageDelayed):
7783        Add helper functions.
7784
7785        * UIProcess/Plugins/PluginInfoStore.h:
7786        Mark class noncopyable.
7787
7788        * UIProcess/Plugins/PluginProcessManager.cpp:
7789        (WebKit::PluginProcessManager::getPluginProcessConnection):
7790        This now takes a delayed reply.
7791
7792        * UIProcess/Plugins/PluginProcessProxy.cpp:
7793        (WebKit::PluginProcessProxy::getPluginProcessConnection):
7794        This now takes a delayed reply.
7795
7796        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
7797        (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
7798        Call DelayedReply::send.
7799
7800        * UIProcess/WebProcessProxy.cpp:
7801        (WebKit::WebProcessProxy::getPluginProcessConnection):
7802        This now takes a delayed reply.
7803        
7804        (WebKit::WebProcessProxy::didReceiveSyncMessage):
7805        No need to handle this message here.
7806
7807        * UIProcess/WebProcessProxy.messages.in:
7808        Add GetPluginProcessConnection message.
7809
7810        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
7811        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
7812        Don't use deprecatedSendSync.
7813
78142011-04-18  Anders Carlsson  <andersca@apple.com>
7815
7816        Reviewed by Adam Roben.
7817
7818        Finish implementing delayed sync replies in the CoreIPC message generator
7819        https://bugs.webkit.org/show_bug.cgi?id=58814
7820
7821        Put the DelayedReply function definitions in the .cpp file and fix bugs found by
7822        actually trying to compile the generated files.
7823
7824        * Scripts/webkit2/messages.py:
7825        * Scripts/webkit2/messages_unittest.py:
7826
78272011-04-18  Anders Carlsson  <andersca@apple.com>
7828
7829        Reviewed by Adam Roben.
7830
7831        Reproducible crash in Find on Page, on pages that use accelerated compositing
7832        https://bugs.webkit.org/show_bug.cgi?id=58793
7833        <rdar://problem/9295870>
7834
7835        Move the call to PageOverlay::setNeedsDisplay() back to WebPage::installPageOverlay;
7836        it needs to be called after we've told the drawing area that a page overlay has been installed.
7837
7838        * WebProcess/WebPage/PageOverlay.cpp:
7839        (WebKit::PageOverlay::setPage):
7840        * WebProcess/WebPage/WebPage.cpp:
7841        (WebKit::WebPage::installPageOverlay):
7842
78432011-04-18  Jeff Miller  <jeffm@apple.com>
7844
7845        Reviewed by Timothy Hatcher.
7846
7847        WKFrameLoadState should be a uint32_t to match our API conventions
7848        https://bugs.webkit.org/show_bug.cgi?id=58785
7849
7850        * UIProcess/API/C/WKFrame.h: typedef WKFrameLoadState as a uint32_t and define its values as an anonymous enum.
7851
78522011-04-18  Carlos Garcia Campos  <cgarcia@igalia.com>
7853
7854        Unreviewed. Fix WebKit2 GTK build after 84017.
7855
7856        * GNUmakefile.am:
7857        * Shared/NativeWebMouseEvent.h:
7858        (WebKit::NativeWebMouseEvent::nativeEvent):
7859        * Shared/gtk/NativeWebMouseEventGtk.cpp: Copied from Source/WebKit2/Shared/NativeWebMouseEvent.h.
7860        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
7861        * UIProcess/gtk/WebView.cpp:
7862        (WebKit::WebView::handleMouseEvent):
7863
78642011-04-17  David Kilzer  <ddkilzer@apple.com>
7865
7866        <http://webkit.org/b/58463> Switch HTTP pipelining from user default to private setting
7867        <rdar://problem/9268729>
7868
7869        Reviewed by Dan Bernstein.
7870
7871        This replaces support for the WebKitEnableHTTPPipelining user
7872        default with methods on the WebCore::ResourceRequest class in
7873        WebCore, the WebView class in WebKit1, and the WebContext class
7874        in WebKit2.  It also removes support for the
7875        WebKitForceHTTPPipeliningPriorityHigh user default which was not
7876        needed.
7877
7878        * UIProcess/API/C/WKContext.cpp:
7879        (_WKContextSetHTTPPipeliningEnabled): Added.
7880        * UIProcess/API/C/WKContextPrivate.h:
7881        (_WKContextSetHTTPPipeliningEnabled): Added declaration.
7882        * UIProcess/WebContext.cpp:
7883        (WebKit::WebContext::setHTTPPipeliningEnabled): Added.
7884        (WebKit::WebContext::httpPipeliningEnabled): Added.
7885        * UIProcess/WebContext.h:
7886        (WebKit::WebContext::setHTTPPipeliningEnabled): Added declaration.
7887        (WebKit::WebContext::httpPipeliningEnabled): Added declaration.
7888
78892011-04-17  Sam Weinig  <sam@webkit.org>
7890
7891        Reviewed by Geoffrey Garen.
7892
7893        Make more strings in WebKit2 localizable
7894        https://bugs.webkit.org/show_bug.cgi?id=58757
7895
7896        * UIProcess/API/mac/PDFViewController.mm:
7897        (-[WKPDFView menuForEvent:]):
7898        * UIProcess/API/mac/PageClientImpl.mm:
7899        (WebKit::PageClientImpl::setViewportArguments):
7900        (WebKit::PageClientImpl::registerEditCommand):
7901        * UIProcess/WebEditCommandProxy.cpp:
7902        (WebKit::WebEditCommandProxy::nameForEditAction):
7903        * UIProcess/WebEditCommandProxy.h:
7904        Use WebCore's localization macro to make more strings localizable.
7905
79062011-04-17  Patrick Gansterer  <paroga@webkit.org>
7907
7908        Reviewed by Adam Barth.
7909
7910        Rename PLATFORM(CA) to USE(CA)
7911        https://bugs.webkit.org/show_bug.cgi?id=58742
7912
7913        * WebProcess/WebPage/LayerTreeHost.cpp:
7914        * WebProcess/WebPage/win/LayerTreeHostWin.cpp:
7915        (WebKit::LayerTreeHost::supportsAcceleratedCompositing):
7916
79172011-04-17  Patrick Gansterer  <paroga@webkit.org>
7918
7919        Reviewed by Adam Barth.
7920
7921        Rename PLATFORM(CG) to USE(CG)
7922        https://bugs.webkit.org/show_bug.cgi?id=58729
7923
7924        * Shared/ShareableBitmap.h:
7925        * Shared/WebCoreArgumentCoders.cpp:
7926        * Shared/WebCoreArgumentCoders.h:
7927        * Shared/WebGraphicsContext.cpp:
7928        (WebKit::WebGraphicsContext::WebGraphicsContext):
7929        * Shared/WebGraphicsContext.h:
7930        * Shared/win/PlatformCertificateInfo.cpp:
7931        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
7932        * UIProcess/win/WebView.cpp:
7933        (WebKit::WebView::setFindIndicator):
7934        * WebProcess/WebPage/WebPage.cpp:
7935        (WebKit::WebPage::drawRectToPDF):
7936        (WebKit::WebPage::drawPagesToPDF):
7937        * WebProcess/WebPage/win/WebPageWin.cpp:
7938        (WebKit::WebPage::platformPreferencesDidChange):
7939        * config.h:
7940
79412011-04-16  Anders Carlsson  <andersca@apple.com>
7942
7943        Reviewed by Sam Weinig.
7944
7945        Crash when NPP_Write returns -1 when writing the manual stream
7946        https://bugs.webkit.org/show_bug.cgi?id=58735
7947        <rdar://problem/9124993>
7948
7949        If NPP_Write returns -1 we must cancel the stream.
7950
7951        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
7952        (WebKit::NetscapePluginStream::deliverDataToPlugin):
7953
79542011-04-16  Sam Weinig  <sam@webkit.org>
7955
7956        Reviewed by Simon Fraser.
7957
7958        Pages in the PageCache don't have the correct visited link coloring after being restored
7959        https://bugs.webkit.org/show_bug.cgi?id=58721
7960
7961        * WebProcess/WebProcess.cpp:
7962        (WebKit::WebProcess::visitedLinkStateChanged):
7963        (WebKit::WebProcess::allVisitedLinkStateChanged):
7964        Mark all pages in the page cache as needing visited link style recalc
7965        whenever visited link information changes.
7966
79672011-04-15  Daniel Bates  <dbates@webkit.org>
7968
7969        Attempt to fix the Qt Linux Release build after changeset 84064 <http://trac.webkit.org/changeset/84064>
7970        (https://bugs.webkit.org/show_bug.cgi?id=58686).
7971
7972        * UIProcess/API/qt/qwkpage_p.h: Remove takeFocus().
7973
79742011-04-15  Shishir Agrawal  <shishir@chromium.org>
7975
7976        Reviewed by James Robinson.
7977
7978        Add a flag to guard Page Visibility API changes.
7979        https://bugs.webkit.org/show_bug.cgi?id=58464
7980
7981        * Configurations/FeatureDefines.xcconfig:
7982
79832011-04-15  Jeff Miller  <jeffm@apple.com>
7984
7985        Reviewed by Sam Weinig.
7986
7987        Add takeFocus callback to WKPageUIClient
7988        https://bugs.webkit.org/show_bug.cgi?id=58686
7989
7990        On Windows, we need to handle moving focus out of the web view in the client, so add a takeFocus callback to WKPageUIClient
7991        and stop handling taking focus in the framework in WKView.mm on the Mac.
7992
7993        * UIProcess/API/C/WKPage.h: Added WKFocusDirection enum and takeFocus to WKPageUIClient.
7994        * UIProcess/API/mac/PageClientImpl.h: Removed takeFocus().
7995        * UIProcess/API/mac/PageClientImpl.mm: Removed takeFocus().
7996        * UIProcess/API/mac/WKView.mm: Removed _takeFocus().
7997        * UIProcess/API/mac/WKViewInternal.h: Removed _takeFocus().
7998        * UIProcess/API/qt/ClientImpl.cpp:
7999        (qt_wk_takeFocus): Added.
8000        * UIProcess/API/qt/ClientImpl.h: Added qt_wk_takeFocus.
8001        * UIProcess/API/qt/qwkpage.cpp: Remove takeFocus().
8002        (QWKPage::QWKPage): Added takeFocus() callback.
8003        * UIProcess/PageClient.h: Removed takeFocus().
8004        * UIProcess/WebPageProxy.cpp:
8005        (WebKit::WebPageProxy::takeFocus): Call m_uiClient to take focus.
8006        * UIProcess/WebPageProxy.h: Pass FocusDirection as a uint32_t to takeFocus().
8007        * UIProcess/WebPageProxy.messages.in: Pass FocusDirection as a uint32_t in TakeFocus message.
8008        * UIProcess/WebUIClient.cpp:
8009        (WebKit::WebUIClient::takeFocus): Added.
8010        * UIProcess/WebUIClient.h: Added takeFocus().
8011        * UIProcess/win/WebView.cpp: Removed takeFocus(), which was never implemented on Windows.
8012        * UIProcess/win/WebView.h: Removed takeFocus().
8013        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
8014        (WebKit::WebChromeClient::takeFocus): Pass FocusDirection as a uint32_t in TakeFocus message.
8015
80162011-04-15  Alexey Proskuryakov  <ap@apple.com>
8017
8018        Reviewed by Sam Weinig.
8019
8020        WebKit2: Stop using deprecated NSInputManager
8021        https://bugs.webkit.org/show_bug.cgi?id=58709
8022
8023        Changed all mouse related functions to give NSInputContext a chance to handle the event,
8024        added logging. Removed -rightMouseMoved: method, which was added by accident.
8025
8026        * UIProcess/API/mac/WKView.mm:
8027        (-[WKView mouseMoved:]):
8028        (-[WKView mouseDown:]):
8029        (-[WKView mouseUp:]):
8030        (-[WKView mouseDragged:]):
8031
80322011-04-15  Jon Honeycutt  <jhoneycutt@apple.com>
8033
8034        Potential crash getting a JS wrapper.
8035
8036        <rdar://problem/8988741>
8037
8038        Reviewed by Brian Weinstein.
8039
8040        * WebProcess/WebPage/WebFrame.cpp:
8041        (WebKit::WebFrame::jsWrapperForWorld):
8042        Ensure that we have a valid m_coreFrame, because it can be cleared by
8043        invalidate().
8044
80452011-04-08  Luiz Agostini  <luiz.agostini@openbossa.org>
8046
8047        Reviewed by Kenneth Rohde Christiansen.
8048
8049        [Qt] QWebPage MIME type handling inconsistency with other web browsers
8050        https://bugs.webkit.org/show_bug.cgi?id=46968
8051
8052        Implementing mime type sniffing based on
8053        http://tools.ietf.org/html/draft-abarth-mime-sniff-06.
8054
8055        * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
8056        (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext):
8057        (WebCore::WebFrameNetworkingContext::MIMESniffingEnabled):
8058        * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h:
8059
80602011-04-15  Oliver Hunt  <oliver@apple.com>
8061
8062        GC allocate Structure
8063        https://bugs.webkit.org/show_bug.cgi?id=58483
8064
8065        Rolling r83894 r83827 r83810 r83809 r83808 back in with
8066        a workaround for the gcc bug seen by the gtk bots
8067
8068        * WebProcess/Plugins/Netscape/JSNPMethod.h:
8069        (WebKit::JSNPMethod::createStructure):
8070        * WebProcess/Plugins/Netscape/JSNPObject.h:
8071        (WebKit::JSNPObject::createStructure):
8072
80732011-04-15  Anders Carlsson  <andersca@apple.com>
8074
8075        Reviewed by Sam Weinig.
8076
8077        Add API to get the bundle page overlay fade in fraction.
8078
8079        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
8080        (WKBundlePageOverlayFractionFadedIn):
8081        * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h:
8082
80832011-04-15  Anders Carlsson  <andersca@apple.com>
8084
8085        Reviewed by Dan Bernstein.
8086
8087        Fade the find page overlay
8088        https://bugs.webkit.org/show_bug.cgi?id=58697
8089
8090        * WebProcess/WebPage/FindController.cpp:
8091        Make the color components floats.
8092
8093        (WebKit::overlayBackgroundColor):
8094        (WebKit::holeShadowColor):
8095        (WebKit::holeFillColor):
8096        Add helper functions for returning the colors given the fraction faded in.
8097
8098        (WebKit::FindController::drawRect):
8099        Use the new helper functions.
8100
8101        * WebProcess/WebPage/WebPage.cpp:
8102        (WebKit::WebPage::installPageOverlay):
8103        Start the fade animation unless we're replacing an already existing page overlay
8104        with another.
8105
81062011-04-15  Anders Carlsson  <andersca@apple.com>
8107
8108        Fix Windows build.
8109
8110        * WebProcess/WebPage/PageOverlay.cpp:
8111        (WebKit::PageOverlay::fadeAnimationTimerFired):
8112
81132011-04-15  Anders Carlsson  <andersca@apple.com>
8114
8115        Reviewed by Sam Weinig.
8116
8117        Add the ability for PageOverlays to fade in and out
8118        https://bugs.webkit.org/show_bug.cgi?id=58694
8119
8120        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
8121        (WKBundlePageUninstallPageOverlay):
8122        WebPage::uninstallPageOverlay now takes a boolean. Default to false for now.
8123
8124        * WebProcess/WebPage/FindController.cpp:
8125        (WebKit::FindController::findString):
8126        Pass false to uninstallPageOverlay.
8127
8128        (WebKit::FindController::hideFindUI):
8129        Pass true to uninstallPageOverlay.
8130        
8131        * WebProcess/WebPage/PageOverlay.cpp:
8132        (WebKit::PageOverlay::PageOverlay):
8133        Initialize new member variables.
8134
8135        (WebKit::PageOverlay::bounds):
8136        Get rid of an unnecessary webPage() getter.
8137
8138        (WebKit::PageOverlay::setPage):
8139        Stop the animation timer.
8140
8141        (WebKit::PageOverlay::startFadeInAnimation):
8142        Update m_fractionFadedIn and call startFadeAnimation.
8143
8144        (WebKit::PageOverlay::startFadeOutAnimation):
8145        Ditto.
8146        
8147        (WebKit::PageOverlay::startFadeAnimation):
8148        Initialize m_fadeAnimationStartTime and start the fade animation timer.
8149
8150        (WebKit::PageOverlay::fadeAnimationTimerFired):
8151        Update m_fractionFadedIn and call setNeedsDisplay().
8152
8153        * WebProcess/WebPage/PageOverlay.h:
8154        * WebProcess/WebPage/WebPage.cpp:
8155        (WebKit::WebPage::uninstallPageOverlay):
8156        If fadeOut is true, tell the page overlay to start the fade out animation.
8157        When the fade animation is complete, the page overlay will uninstall itself.
8158
81592011-04-15  Brian Weinstein  <bweinstein@apple.com>
8160
8161        Reviewed by Adam Roben.
8162
8163        Views should be made visible before painting in WM_PRINTCLIENT messages
8164        https://bugs.webkit.org/show_bug.cgi?id=58676
8165        <rdar://problem/9279211>
8166
8167        * UIProcess/win/WebView.cpp:
8168        (WebKit::WebView::onPrintClientEvent): If our view isn't currently visible set it to visible
8169            before painting, then reset it back to not visible after painting.
8170        (WebKit::WebView::onShowWindowEvent): Call setIsVisible instead of duplicating logic.
8171        (WebKit::WebView::setIsVisible): Set the m_isVisible flag and call viewStateDidChange.
8172        * UIProcess/win/WebView.h:
8173
81742011-04-15  Jon Lee  <jonlee@apple.com>
8175
8176        Reviewed by Anders Carlsson.
8177
8178        onClick does not function with <select> elements in WebKit2
8179        https://bugs.webkit.org/show_bug.cgi?id=57904
8180        <rdar://problem/9217757>
8181
8182        Reviewed by Anders Carlsson.
8183
8184        * Shared/NativeWebMouseEvent.h: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
8185        (WebKit::NativeWebMouseEvent::nativeEvent):
8186        * Shared/mac/NativeWebMouseEventMac.mm: Added.
8187        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
8188        * Shared/qt/NativeWebMouseEventQt.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
8189        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
8190        * Shared/win/NativeWebMouseEventWin.cpp: Copied from Source/WebKit2/UIProcess/WebPopupMenuProxy.h.
8191        (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
8192        * UIProcess/API/mac/WKView.mm:
8193        (-[WKView mouseMoved:]):
8194        (-[WKView _mouseHandler:]): Pre-compiler mouse handler calls need to use the new NativeWebMouseEvent class
8195        * UIProcess/API/qt/qwkpage.cpp:
8196        (QWKPagePrivate::mouseMoveEvent):
8197        (QWKPagePrivate::mousePressEvent):
8198        (QWKPagePrivate::mouseReleaseEvent):
8199        (QWKPagePrivate::mouseDoubleClickEvent):
8200        * UIProcess/WebPageProxy.cpp:
8201        (WebKit::WebPageProxy::handleMouseEvent): keep track of mouse down event in order to be able to send a fake mouse up event on the select element
8202        (WebKit::WebPageProxy::currentMouseDownEvent): for access by the popup menu proxy to dispatch the fake mouse up event
8203        (WebKit::WebPageProxy::didReceiveEvent): clear out the cached mouse down event
8204        (WebKit::WebPageProxy::processDidCrash): clear out the cached events since we assume that didReceiveEvent did not called prior to the crash
8205        * UIProcess/WebPageProxy.h:
8206        * UIProcess/WebPopupMenuProxy.h:
8207        * UIProcess/mac/WebPopupMenuProxyMac.mm:
8208        (WebKit::WebPopupMenuProxyMac::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
8209        * UIProcess/win/WebPopupMenuProxyWin.cpp:
8210        (WebKit::WebPopupMenuProxyWin::showPopupMenu): after notifying the popup menu client that the value changed, fake mouse up and mouse move events are posted
8211        * UIProcess/win/WebView.cpp:
8212        (WebKit::WebView::onMouseEvent):
8213        * WebKit2.pro:
8214        * WebKit2.xcodeproj/project.pbxproj:
8215        * win/WebKit2.vcproj:
8216
82172011-04-15  Alexey Proskuryakov  <ap@apple.com>
8218
8219        Qt build fix.
8220
8221        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::selectionStateChanged): Wrap the variable
8222        in PLATFORM(MAC), too, as it's unused on other platforms.
8223
82242011-04-15  Brady Eidson  <beidson@apple.com>
8225
8226        Reviewed by Dan Bernstein.
8227
8228        <rdar://problem/9287880> and https://bugs.webkit.org/show_bug.cgi?id=58596
8229        WK2: Past searches not remembered for <input type=search results="5" autosave="foo">
8230
8231        Add SaveRecentSearches and LoadRecentSearches messages:
8232        * UIProcess/WebPageProxy.messages.in:
8233        * UIProcess/WebPageProxy.h:
8234
8235        Message up to the UIProcess for the save/load operations:
8236        * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
8237        (WebKit::WebSearchPopupMenu::saveRecentSearches):
8238        (WebKit::WebSearchPopupMenu::loadRecentSearches):
8239        * WebProcess/WebCoreSupport/WebPopupMenu.h:
8240        (WebKit::WebPopupMenu::page):
8241
8242        Save the values to disk CFPreference-style:
8243        * UIProcess/cf/WebPageProxyCF.cpp:
8244        (WebKit::autosaveKey):
8245        (WebKit::WebPageProxy::saveRecentSearches):
8246        (WebKit::WebPageProxy::loadRecentSearches):
8247
8248        Stubbed out for non-CF platforms:
8249        * UIProcess/gtk/WebPageProxyGtk.cpp:
8250        (WebKit::WebPageProxy::saveRecentSearches):
8251        (WebKit::WebPageProxy::loadRecentSearches):
8252        * UIProcess/qt/WebPageProxyQt.cpp:
8253        (WebKit::WebPageProxy::saveRecentSearches):
8254        (WebKit::WebPageProxy::loadRecentSearches):
8255
82562011-04-14  Alexey Proskuryakov  <ap@apple.com>
8257
8258        Reviewed by Dan Bernstein.
8259
8260        WebKit2: Password field input does not switch to ASCII-compatible source
8261        https://bugs.webkit.org/show_bug.cgi?id=58583
8262        <rdar://problem/9059651>
8263
8264        The implementation is more modern than what we have in WK1. Instead of returning a null
8265        input context (as in non-editable content), we now set page context's properties.
8266
8267        * UIProcess/PageClient.h:
8268        * UIProcess/API/mac/PageClientImpl.h:
8269        * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::updateSecureInputState):
8270        Forward updateSecureInputState() call from WebPageProxy to WKView.
8271
8272        * UIProcess/API/mac/WKView.mm:
8273        (-[WKView dealloc]): ASSERT that we didn't somehow leave secure input events enabled.
8274        (-[WKView becomeFirstResponder]): Update secure event mode.
8275        (-[WKView resignFirstResponder]): Disable secure event mode.
8276        (-[WKView setMarkedText:selectedRange:replacementRange:]): Prevent most advanced editing
8277        behaviors in password fields, matching NSSecureTextInputField.
8278        (-[WKView attributedSubstringForProposedRange:actualRange:]): Disable TSM Document Access
8279        in password fields. There is also a check in web process, but it doest't hurt to check twice.
8280        (-[WKView _windowDidBecomeKey:]): Call _updateSecureInputState.
8281        (-[WKView _windowDidResignKey:]): Call _updateSecureInputState.
8282        (-[WKView _updateSecureInputState]): Update secure event mode and allowed input sources.
8283
8284        * UIProcess/API/mac/WKViewInternal.h: Added _updateSecureInputState.
8285
8286        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::selectionStateChanged): Update secure
8287        input state when going in or out a password field.
8288
82892011-04-14  Jer Noble  <jer.noble@apple.com>
8290
8291        Reviewed by Eric Carlson.
8292
8293        REGRESSION: Rendering in <video> element appears to render quickly to catch up if it has been playing in a background tab
8294        https://bugs.webkit.org/show_bug.cgi?id=58637
8295
8296        Notify AVFoundation that no one will be rendering when the view or window moves off screen.
8297
8298        * UIProcess/API/mac/PageClientImpl.mm:
8299        (WebKit::PageClientImpl::isViewVisible): Return false if the view's window is not visible.
8300        * UIProcess/API/mac/WKView.mm:
8301        (-[WKView addWindowObserversForWindow:]): Observe orderOut and orderIn events.
8302        (-[WKView removeWindowObservers]): Ditto.
8303        (-[WKView _windowDidOrderOffScreen:]): Added.
8304        (-[WKView _windowDidOrderOnScreen:]): Added.
8305        * WebProcess/WebPage/DrawingAreaImpl.cpp:
8306        (WebKit::DrawingAreaImpl::suspendPainting): Call LayerTreeHost::pauseRendering.
8307        (WebKit::DrawingAreaImpl::resumePainting): Call LayerTreeHost::resumeRendering.
8308        * WebProcess/WebPage/LayerTreeHost.h:
8309        (WebKit::LayerTreeHost::pauseRendering): Added stub.
8310        (WebKit::LayerTreeHost::resumeRendering): Added stub.
8311        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h:
8312        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
8313        (WebKit::LayerTreeHostCAMac::pauseRendering): Added. Post a notification with our
8314            intention to stop rendering.
8315        (WebKit::LayerTreeHostCAMac::resumeRendering): Added. Post a notification with our
8316            intention to start rendering.
8317
83182011-04-15  Jessie Berlin  <jberlin@apple.com>
8319
8320        Reviewed by Sam Weinig.
8321
8322        WebKit2: Need a way to keep the WebProcess alive for testing purposes.
8323        https://bugs.webkit.org/show_bug.cgi?id=58592
8324
8325        * UIProcess/API/C/WKContext.cpp:
8326        (WKContextDisableProcessTermination):
8327        (WKContextEnableProcessTermination):
8328        * UIProcess/API/C/WKContextPrivate.h:
8329
8330        * UIProcess/WebContext.cpp:
8331        (WebKit::WebContext::WebContext):
8332        Initialize m_processTerminationEnabled to true.
8333        (WebKit::WebContext::enableProcessTermination):
8334        Set m_processTerminationEnabled to true, and try to terminate the web process.
8335        (WebKit::WebContext::shouldTerminate):
8336        If !m_processTerminationEnabled, return false.
8337        * UIProcess/WebContext.h:
8338        (WebKit::WebContext::disableProcessTermination):
8339        Set m_processTerminationEnabled to false;
8340
83412011-04-15  Nancy Piedra  <nancy.piedra@nokia.com>
8342
8343        Reviewed by Laszlo Gombos.
8344
8345        [Qt][Symbian] Need to export ViewportAttributes class
8346        https://bugs.webkit.org/show_bug.cgi?id=58651
8347
8348        On Symbian, if the ViewportAttributes class is not exported we get
8349        linking errors.
8350
8351        Since this is a compilation issue, no new tests added.
8352
8353        * UIProcess/API/qt/qwkpage.h:
8354
83552011-04-15  Anna Cavender  <annacc@chromium.org>
8356
8357        Reviewed by Eric Carlson.
8358
8359        Renaming TRACK feature define to VIDEO_TRACK
8360        https://bugs.webkit.org/show_bug.cgi?id=53556
8361
8362        * Configurations/FeatureDefines.xcconfig:
8363
83642011-04-14  Anders Carlsson  <andersca@apple.com>
8365
8366        Reviewed by Sam Weinig.
8367
8368        Select All context menu item doesn't work in Flash
8369        https://bugs.webkit.org/show_bug.cgi?id=58615
8370        <rdar://problem/9225761>
8371
8372        In some cases, -[NSWindow isKeyWindow] will return false even if
8373        a window is the key window, so we have to compare our window
8374        against -[NSApplication keyWindow].
8375
8376        * UIProcess/API/mac/PageClientImpl.mm:
8377        (WebKit::PageClientImpl::isViewWindowActive):
8378
83792011-04-14  Sam Weinig  <sam@webkit.org>
8380
8381        Reviewed by Anders Carlsson.
8382
8383        Add CFPreference based backend for WebKit2 preferences
8384        https://bugs.webkit.org/show_bug.cgi?id=58605
8385
8386        * UIProcess/cf/WebPreferencesCF.cpp:
8387        (WebKit::cfStringFromWebCoreString):
8388        (WebKit::makeKey):
8389        (WebKit::setStringValueIfInUserDefaults):
8390        (WebKit::setBoolValueIfInUserDefaults):
8391        (WebKit::setUInt32ValueIfInUserDefaults):
8392        (WebKit::setDoubleValueIfInUserDefaults):
8393        (WebKit::WebPreferences::platformInitializeStore):
8394        (WebKit::WebPreferences::platformUpdateStringValueForKey):
8395        (WebKit::WebPreferences::platformUpdateBoolValueForKey):
8396        (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
8397        (WebKit::WebPreferences::platformUpdateDoubleValueForKey):
8398        Implement platform functions using CFPreferences API.
8399
84002011-04-14  Brady Eidson  <beidson@apple.com>
8401
8402        Reviewed by Sam Weinig.
8403
8404        <rdar://problem/8665102> and https://bugs.webkit.org/show_bug.cgi?id=58595
8405        Menu is not displayed for <input type=search results="5">
8406
8407        * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
8408        (WebKit::WebSearchPopupMenu::enabled): Return true, like all good search popup menus should.
8409
8410        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
8411        (WebKit::WebPopupMenu::setUpPlatformData): Remember the shouldPopOver-ness.
8412
8413        * Shared/PlatformPopupMenuData.cpp:
8414        (WebKit::PlatformPopupMenuData::encode): Remember the shouldPopOver-ness.
8415        (WebKit::PlatformPopupMenuData::decode): Remember the shouldPopOver-ness.
8416        * Shared/PlatformPopupMenuData.h:
8417
8418        * UIProcess/mac/WebPopupMenuProxyMac.mm:
8419        (WebKit::WebPopupMenuProxyMac::showPopupMenu): Use the shouldPopOver-ness to adjust display position.
8420
84212011-04-14  Anders Carlsson  <andersca@apple.com>
8422
8423        Reviewed by Dan Bernstein.
8424
8425        Crash in NetscapePluginModule::tryGetSitesWithData when NPP_GetSitesWithData returns null
8426        https://bugs.webkit.org/show_bug.cgi?id=58578
8427        <rdar://problem/9275201>
8428
8429        It's OK for NPP_GetSitesWithData to return null.
8430
8431        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
8432        (WebKit::NetscapePluginModule::tryGetSitesWithData):
8433
84342011-04-14  Sam Weinig  <sam@webkit.org>
8435
8436        Reviewed by Anders Carlsson.
8437
8438        Make creating WebPreferences lazy
8439        https://bugs.webkit.org/show_bug.cgi?id=58570
8440
8441        * UIProcess/WebPageGroup.cpp:
8442        (WebKit::WebPageGroup::WebPageGroup):
8443        (WebKit::WebPageGroup::~WebPageGroup):
8444        (WebKit::WebPageGroup::setPreferences):
8445        (WebKit::WebPageGroup::preferences):
8446        * UIProcess/WebPageGroup.h:
8447        Don't create the WebPreference object until it is requested.
8448
84492011-04-14  Pratik Solanki  <psolanki@apple.com>
8450
8451        Reviewed by David Kilzer.
8452
8453        Set minimum priority for fast lane connections
8454        https://bugs.webkit.org/show_bug.cgi?id=58353
8455
8456        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
8457        (InitWebCoreSystemInterface): Support for new WKSI method WKSetHTTPPipeliningMinimumFastLanePriority.
8458
84592011-04-14  Anders Carlsson  <andersca@apple.com>
8460
8461        Clang warning fixes.
8462
8463        * UIProcess/API/mac/PageClientImpl.h:
8464        * UIProcess/mac/TextCheckerMac.mm:
8465        * WebProcess/Downloads/mac/DownloadMac.mm:
8466
84672011-04-14  Jessie Berlin  <jberlin@apple.com>
8468
8469        Reviewed by Timothy Hatcher.
8470
8471        WebKit2: Add an option for a PageGroup to be invisible to the History Client.
8472        https://bugs.webkit.org/show_bug.cgi?id=58547
8473
8474        * Shared/WebPageGroupData.cpp:
8475        (WebKit::WebPageGroupData::encode):
8476        (WebKit::WebPageGroupData::decode):
8477        * Shared/WebPageGroupData.h:
8478
8479        * UIProcess/WebInspectorProxy.cpp:
8480        (WebKit::WebInspectorProxy::inspectorPageGroup):
8481        The Web Inspector should not be visible to the History Client, because its HTML-based nature
8482        should not be exposed through the API.
8483
8484        * UIProcess/WebPageGroup.cpp:
8485        (WebKit::WebPageGroup::create):
8486        (WebKit::WebPageGroup::WebPageGroup):
8487        * UIProcess/WebPageGroup.h:
8488
8489        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
8490        (WebKit::WebFrameLoaderClient::updateGlobalHistory):
8491        Do not send the message to the WebContent for the history client.
8492        (WebKit::WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
8493        Ditto.
8494        (WebKit::WebFrameLoaderClient::setTitle):
8495        Ditto.
8496
8497        * WebProcess/WebPage/WebPageGroupProxy.h:
8498        (WebKit::WebPageGroupProxy::isVisibleToHistoryClient):
8499
85002011-04-14  Balazs Kelemen  <kbalazs@webkit.org>
8501
8502        Reviewed by Andreas Kling.
8503
8504        [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1
8505        https://bugs.webkit.org/show_bug.cgi?id=55719
8506
8507        Guard functionality related to complex text and implementations
8508        that rely on MachPort with PLATFORM(MAC).
8509        Based on Oleg Romashin's patch.
8510
8511        * PluginProcess/PluginControllerProxy.cpp:
8512        * PluginProcess/PluginControllerProxy.messages.in:
8513        * PluginProcess/PluginProcess.cpp:
8514        (WebKit::PluginProcess::createWebProcessConnection):
8515        * PluginProcess/WebProcessConnection.cpp:
8516        (WebKit::WebProcessConnection::createPlugin):
8517        * Shared/Plugins/PluginProcessCreationParameters.cpp:
8518        (WebKit::PluginProcessCreationParameters::decode): Fix bad C++ that
8519        does not compile with gcc-linux.
8520        * UIProcess/Plugins/PluginProcessProxy.cpp:
8521        (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch):
8522        (WebKit::PluginProcessProxy::didCreateWebProcessConnection):
8523        * UIProcess/Plugins/PluginProcessProxy.h:
8524        * UIProcess/Plugins/PluginProcessProxy.messages.in:
8525        * WebKit2.pro: Move implementation that does not need external
8526        visibility from WebKit2API.pri. Adding the headers as well.
8527        * WebKit2API.pri:
8528        * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
8529        (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
8530        * WebProcess/WebPage/WebPage.cpp:
8531
85322011-04-13  James Robinson  <jamesr@chromium.org>
8533
8534        Reviewed by Simon Fraser.
8535
8536        Allow setting composited backing stores for scrollbars and scroll corners
8537        https://bugs.webkit.org/show_bug.cgi?id=57202
8538
8539        Update WebPopupMenuProxyWin to reflect ScrollableArea interface changes.
8540
8541        * UIProcess/win/WebPopupMenuProxyWin.h:
8542        (WebKit::WebPopupMenuProxyWin::invalidateScrollCornerRect):
8543        (WebKit::WebPopupMenuProxyWin::scrollCornerPresent):
8544        (WebKit::WebPopupMenuProxyWin::scrollCornerRect):
8545
85462011-04-13  Jon Lee  <jonlee@apple.com>
8547
8548        Reviewed by Maciej Stachowiak.
8549
8550        REGRESSION(r81880): Paste menu is disabled for many edit fields (yahoo and google search, yahoo mail msg, forms, etc)
8551        https://bugs.webkit.org/show_bug.cgi?id=58284
8552        <rdar://problem/9246149>
8553
8554        * WebProcess/WebPage/WebPage.cpp:
8555        (WebKit::WebPage::setFocused): Check for whether we are not supposed to be focused AND whether our platform behavior dictates to clear out the selection
8556
85572011-04-13  Dan Bernstein  <mitz@apple.com>
8558
8559        Reviewed by Sam Weinig.
8560
8561        Fixed a bug where WKView changed the cursor when the mouse was moving over other views.
8562
8563        * UIProcess/API/mac/WKView.mm:
8564        (-[WKView mouseMoved:]): If getting this message because this view is the first responder,
8565        ignore it unless it is inside the visible rect.
8566
85672011-04-13  Enrica Casucci  <enrica@apple.com>
8568
8569        Reviewed by Dan Bernstein.
8570
8571        Should not rely on WKEditableLinkBehavior being in synch
8572        with WebCore::EditableLinkBehavior.
8573        https://bugs.webkit.org/show_bug.cgi?id=58473
8574
8575        Adding conversion routines.
8576
8577        * UIProcess/API/C/WKAPICast.h:
8578        (WebKit::toAPI):
8579        (WebKit::toEditableLinkBehavior):
8580        * UIProcess/API/C/WKPreferences.cpp:
8581        (WKPreferencesSetEditableLinkBehavior):
8582        (WKPreferencesGetEditableLinkBehavior):
8583
85842011-04-13  Anders Carlsson  <andersca@apple.com>
8585
8586        Reviewed by Dan Bernstein.
8587
8588        After closing the last window, re-opening my last visited website is over 2X slower
8589        https://bugs.webkit.org/show_bug.cgi?id=58488
8590        <rdar://problem/9233518>
8591
8592        Give the web process a 60 second termination timeout.
8593
8594        * WebProcess/WebProcess.cpp:
8595        (WebKit::WebProcess::WebProcess):
8596
85972011-04-13  Anders Carlsson  <andersca@apple.com>
8598
8599        Reviewed by Adam Roben.
8600
8601        Convert WebProcess over to using disableTermination/enableTermination
8602        https://bugs.webkit.org/show_bug.cgi?id=58485
8603
8604        * PluginProcess/PluginProcess.cpp:
8605        (WebKit::PluginProcess::getSitesWithData):
8606        (WebKit::PluginProcess::clearSiteData):
8607        Use the LocalTerminationDisabler RAII class.
8608
8609        * Shared/ChildProcess.h:
8610        (WebKit::ChildProcess::LocalTerminationDisabler::LocalTerminationDisabler):
8611        (WebKit::ChildProcess::LocalTerminationDisabler::~LocalTerminationDisabler):
8612        Add RAII class for calling disableTermination/enableTermination.
8613
8614        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
8615        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
8616        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
8617        (WebKit::WebApplicationCacheManager::deleteAllEntries):
8618        Use the LocalTerminationDisabler RAII class.
8619
8620        * WebProcess/Cookies/WebCookieManager.cpp:
8621        (WebKit::WebCookieManager::getHostnamesWithCookies):
8622        (WebKit::WebCookieManager::deleteCookiesForHostname):
8623        (WebKit::WebCookieManager::deleteAllCookies):
8624        (WebKit::WebCookieManager::startObservingCookieChanges):
8625        (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
8626        (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
8627        Use the LocalTerminationDisabler RAII class.
8628
8629        * WebProcess/Downloads/Download.cpp:
8630        (WebKit::Download::Download):
8631        Call disableTermination().
8632
8633        (WebKit::Download::~Download):
8634        Call enableTermination().
8635
8636        * WebProcess/Downloads/DownloadManager.cpp:
8637        (WebKit::DownloadManager::downloadFinished):
8638        Remove call to terminateIfPossible.
8639
8640        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
8641        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
8642        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
8643        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
8644        Use the LocalTerminationDisabler RAII class.
8645        
8646        * WebProcess/MediaCache/WebMediaCacheManager.cpp:
8647        (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
8648        (WebKit::WebMediaCacheManager::clearCacheForHostname):
8649        (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
8650        Use the LocalTerminationDisabler RAII class.
8651        
8652        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
8653        (WebKit::WebResourceCacheManager::getCacheOrigins):
8654        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
8655        (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
8656        Use the LocalTerminationDisabler RAII class.
8657        
8658        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
8659        (WebKit::WebDatabaseManager::getDatabasesByOrigin):
8660        (WebKit::WebDatabaseManager::getDatabaseOrigins):
8661        (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
8662        (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
8663        (WebKit::WebDatabaseManager::deleteAllDatabases):
8664        (WebKit::WebDatabaseManager::setQuotaForOrigin):
8665        Use the LocalTerminationDisabler RAII class.
8666        
8667        * WebProcess/WebProcess.cpp:
8668        (WebKit::WebProcess::createWebPage):
8669        Call disableTermination().
8670
8671        (WebKit::WebProcess::removeWebPage):
8672        Call enableTermination().
8673
8674        (WebKit::WebProcess::shouldTerminate):
8675        Move logic from terminateIfPossible over here.
8676
8677        (WebKit::WebProcess::terminate):
8678        Move logic from terminateIfPossible over here.
8679
8680        (WebKit::WebProcess::getSitesWithPluginData):
8681        (WebKit::WebProcess::clearPluginSiteData):
8682        Use the LocalTerminationDisabler RAII class.
8683
8684        * WebProcess/WebProcess.h:
8685        Publically inherit from ChildProcess, LocalTerminationDisabler needs to be accessible
8686        from the WebProcess class.
8687
86882011-04-13  Steve Falkenburg  <sfalken@apple.com>
8689
8690        Reviewed by Adam Roben.
8691
8692        Follow-up to: WebKit2 will load two copies of the same plugin, but should not
8693        https://bugs.webkit.org/show_bug.cgi?id=49075
8694        
8695        Use pathGetFileName instead of Win32 PathFindFileNameW.
8696
8697        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
8698        (WebKit::PluginInfoStore::shouldUsePlugin):
8699
87002011-04-13  Sam Weinig  <sam@webkit.org>
8701
8702        Reviewed by Gavin Barraclough.
8703
8704        WebKit2 doesn't keep overlay scrollers shown while scroll gesture held
8705        <rdar://problem/9260518>
8706
8707        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
8708        (InitWebCoreSystemInterface):
8709        Initialize new WKSI functions.
8710
87112011-04-13  Steve Falkenburg  <sfalken@apple.com>
8712
8713        Reviewed by Oliver Hunt.
8714
8715        WebKit2 will load two copies of the same plugin, but should not
8716        https://bugs.webkit.org/show_bug.cgi?id=49075
8717        <rdar://problem/8635947>
8718
8719        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
8720        (WebKit::PluginInfoStore::shouldUsePlugin): Don't use a plug-in if we've already allowed a plug-in with the same filename.
8721
87222011-04-13  Timothy Hatcher  <timothy@apple.com>
8723
8724        Hide the dictionary panel when navigating or crashing.
8725
8726        <rdar://problem/9261202>
8727
8728        Reviewed by Sam Weinig.
8729
8730        * UIProcess/API/mac/PageClientImpl.h:
8731        * UIProcess/API/mac/PageClientImpl.mm:
8732        (WebKit::PageClientImpl::dismissDictionaryLookupPanel): Added. Call WKHideWordDefinitionWindow.
8733        * UIProcess/PageClient.h:
8734        * UIProcess/WebPageProxy.cpp:
8735        (WebKit::WebPageProxy::didCommitLoadForFrame): Call PageClient::dismissDictionaryLookupPanel.
8736        (WebKit::WebPageProxy::processDidCrash): Call dismissCorrectionPanel and PageClient::dismissDictionaryLookupPanel.
8737
87382011-04-13  Anders Carlsson  <andersca@apple.com>
8739
8740        Reviewed by Adam Roben.
8741
8742        Add support for disabling/enabling termination to ChildProcess
8743        https://bugs.webkit.org/show_bug.cgi?id=58476
8744
8745        Add ChildProcess::disableTermination and ChildProcess::enableTermination and convert
8746        the PluginProcess class over to using them.
8747
8748        * PluginProcess/PluginProcess.cpp:
8749        (WebKit::PluginProcess::PluginProcess):
8750        The child process now takes a terminationTimeout argument. Get rid of the shutdown timer.
8751
8752        (WebKit::PluginProcess::removeWebProcessConnection):
8753        Call enableTermination().
8754
8755        (WebKit::PluginProcess::shouldTerminate):
8756        Always return true.
8757
8758        (WebKit::PluginProcess::createWebProcessConnection):
8759        Call disableTermination().
8760
8761        (WebKit::PluginProcess::getSitesWithData):
8762        Call disableTermination()/enableTermination().
8763
8764        (WebKit::PluginProcess::clearSiteData):
8765        Ditto.
8766
8767        * Shared/ChildProcess.cpp:
8768        (WebKit::ChildProcess::disableTermination):
8769        Increment the counter and stop the timer.
8770
8771        (WebKit::ChildProcess::enableTermination):
8772        Decrement the counter; if it's zero, start the timer.
8773
8774        (WebKit::ChildProcess::terminationTimerFired):
8775        Call shouldTerminate(). If it returns true, call terminate().
8776
8777        (WebKit::ChildProcess::terminate):
8778        Call RunLoop::quit().
8779
8780        * WebProcess/WebProcess.cpp:
8781        (WebKit::WebProcess::WebProcess):
8782        Just initialize the termination timeout to 0 for now.
8783
8784        (WebKit::WebProcess::shouldTerminate):
8785        Always return true; this isn't used yet.
8786
8787        * WebProcess/WebProcess.h:
8788
87892011-04-13  Enrica Casucci  <enrica@apple.com>
8790
8791        Reviewed by Dan Bernstein.
8792
8793        REGRESSION: Links are clickable when a contentEditable is set to true.
8794        https://bugs.webkit.org/show_bug.cgi?id=58473
8795        <rdar://problem/9256793>
8796        
8797        Added support for editable link behavior property.
8798
8799        * Shared/WebPreferencesStore.cpp:
8800        * Shared/WebPreferencesStore.h:
8801        * UIProcess/API/C/WKPreferences.cpp:
8802        (WKPreferencesSetEditableLinkBehavior):
8803        (WKPreferencesGetEditableLinkBehavior):
8804        * UIProcess/API/C/WKPreferencesPrivate.h:
8805        * WebProcess/WebPage/WebPage.cpp:
8806        (WebKit::WebPage::updatePreferences):
8807
88082011-04-12  Alexey Proskuryakov  <ap@apple.com>
8809
8810        Reviewed by Oliver Hunt.
8811
8812        REGRESSION (WebKit2): Input methods are active in non-editable content
8813        https://bugs.webkit.org/show_bug.cgi?id=58404
8814        <rdar://problem/9275940>
8815
8816        * UIProcess/API/mac/WKView.mm:
8817        (-[WKView insertText:]): Re-add the old variant of this function, because it's not only part
8818        of deprecated NSTextInput protocol, but it's also part of NSResponder, and it's called when
8819        the input context in nil.
8820        (-[WKView inputContext]): Return nil when not in editable content.
8821
88222011-04-12  Brady Eidson  <beidson@apple.com>
8823
8824        Reviewed by Maciej Stachowiak.
8825
8826        <rdar://problem/9029193> and https://bugs.webkit.org/show_bug.cgi?id=58406
8827        Bringing up the context menu on a link might also follow the link.
8828
8829        This patch adds a flag that is set just before the WebProcess tells the UIProcess to show a context menu.
8830
8831        As long as this flag is set, the WebProcess will ignore any other mouse events that might have queued up
8832        by the time the UIProcess gets around to showing the menu.
8833
8834        After the UIProcess is done showing the menu, it messages back telling the WebProcess to clear the flag
8835        and resume normal MouseEvent handling.
8836
8837        * UIProcess/WebPageProxy.cpp:
8838        (WebKit::WebPageProxy::showContextMenu): No matter what internalShowContextMenu does, always notify
8839          the WebProcess that any context menu is now hidden.
8840        (WebKit::WebPageProxy::internalShowContextMenu):
8841        * UIProcess/WebPageProxy.h:
8842
8843        * WebProcess/WebPage/WebContextMenu.cpp:
8844        (WebKit::WebContextMenu::show): Since we're telling the UIProcess to show the menu, tell the WebPage a
8845          context menu is showing so it will stop handling mouse events.
8846
8847        * WebProcess/WebPage/WebPage.cpp:
8848        (WebKit::WebPage::WebPage):
8849        (WebKit::WebPage::mouseEvent): Don't try to handle mouse events if a context menu is flagged as showing.
8850
8851        Add accessors to twiddle the "context menu showing" flag:
8852        * WebProcess/WebPage/WebPage.h:
8853        (WebKit::WebPage::contextMenuShowing):
8854        (WebKit::WebPage::contextMenuHidden):
8855        * WebProcess/WebPage/WebPage.messages.in: Add the ContextMenuHidden message.
8856
88572011-04-12  Sam Weinig  <sam@webkit.org>
8858
8859        Reviewed by Maciej Stachowiak.
8860
8861        Quarantine related sandbox denial when downloading files
8862        <rdar://problem/9203736>
8863
8864        * WebProcess/com.apple.WebProcess.sb:
8865
88662011-04-12  Sam Weinig  <sam@webkit.org>
8867
8868        Reviewed by Anders Carlsson.
8869
8870        Sandbox violations dragging an image to the desktop.
8871        <rdar://problem/9261834>
8872
8873        * WebProcess/com.apple.WebProcess.sb:
8874
88752011-04-12  Sam Weinig  <sam@webkit.org>
8876
8877        Reviewed by Cameron Zwarich.
8878
8879        Sandbox violations trying to access ~/Library/Keyboard Layouts and ~/Library/Input Methods
8880        <rdar://problem/8973159> 
8881
8882        * WebProcess/com.apple.WebProcess.sb:
8883
88842011-04-12  Enrica Casucci  <enrica@apple.com>
8885
8886        Reviewed by Alexey Proskuryakov and Sam Weinig.
8887
8888        Implement non-activating clicks to allow dragging out of a background window.
8889        https://bugs.webkit.org/show_bug.cgi?id=55053
8890        <rdar://problem/9042197>
8891
8892        Added methods to WKView to support non activating click. Unfortunately both
8893        methods require a synchronous call to the WebProcess to decide what to do.
8894        acceptFirstMouse is called only if shouldDelayWindowOrderingForEvent returns
8895        true. In order to minimize the number of synchronous calls, we send the request
8896        only if our window is not the key window.
8897
8898        * UIProcess/API/mac/WKView.mm:
8899        (-[WKView acceptsFirstMouse:]):
8900        (-[WKView shouldDelayWindowOrderingForEvent:]):
8901        * UIProcess/WebPageProxy.h:
8902        * UIProcess/mac/WebPageProxyMac.mm:
8903        (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
8904        (WebKit::WebPageProxy::acceptsFirstMouse):
8905        * WebProcess/WebPage/WebPage.h:
8906        * WebProcess/WebPage/WebPage.messages.in:
8907        * WebProcess/WebPage/mac/WebPageMac.mm:
8908        (WebKit::WebPage::shouldDelayWindowOrderingEvent):
8909        (WebKit::WebPage::acceptsFirstMouse):
8910
89112011-04-12  Alexey Proskuryakov  <ap@apple.com>
8912
8913        Reviewed by Oliver Hunt.
8914
8915        Crash when serializing a null AttributedString
8916        https://bugs.webkit.org/show_bug.cgi?id=58393
8917        <rdar://problem/9275326>
8918
8919        * Shared/mac/AttributedString.mm:
8920        (WebKit::AttributedString::encode):
8921        (WebKit::AttributedString::decode):
8922        Prefix the serialized value with an isNull tag.
8923
89242011-04-12  Enrica Casucci  <enrica@apple.com>
8925
8926        Reviewed by Alexey Proskuryakov.
8927
8928        Infinite recursion in WebHTMLView executeSavedKeypressCommands.
8929        https://bugs.webkit.org/show_bug.cgi?id=58382
8930        <rdar://problem/9239370>
8931
8932        Execution of some editing commands could trigger a call to selectedRange that
8933        internally calls executeSavedKeypressCommands creating an infinite recursion.
8934
8935        * UIProcess/API/mac/WKView.mm:
8936        (-[WKView _executeSavedKeypressCommands]): Added flag to avoid recursion.
8937        (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
8938        Added flag initialization.
8939
89402011-04-12  Chris Marrin  <cmarrin@apple.com>
8941
8942        Reviewed by Simon Fraser.
8943
8944        Page tears and stutters in WebKit2 when page is > 2048 pixels wide
8945        https://bugs.webkit.org/show_bug.cgi?id=58330
8946
8947        Turn off tiling for nonCompositedContentLayer to avoid tearing when
8948        scrolling very wide (> 2048) windows.
8949
8950        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
8951        (WebKit::LayerTreeHostCA::initialize):
8952
89532011-04-12  Anders Carlsson  <andersca@apple.com>
8954
8955        Reviewed by Adam Roben.
8956
8957        Assertion in DrawingAreaImpl::resumePainting() (m_isPaintingSuspended) when clicking a link at twitter.com
8958        https://bugs.webkit.org/show_bug.cgi?id=58377
8959        <rdar://problem/8976531>
8960
8961        Remove the assertion.
8962
8963        * WebProcess/WebPage/DrawingAreaImpl.cpp:
8964        (WebKit::DrawingAreaImpl::resumePainting):
8965
89662011-04-11  Stephanie Lewis  <slewis@apple.com>
8967
8968        Reviewed by Oliver Hunt.
8969
8970        https://bugs.webkit.org/show_bug.cgi?id=58280
8971        <rdar://problem/9252824> javascript in an inconsistent state due to serialization returning an un-handled exception
8972        Change use of SerializedScriptValue::Create to use the same api as the rest of WebKit2.  This has the benefit
8973        of handling any exceptions so Javascript is not in an inconsistent state.
8974
8975        * Shared/API/c/WKSerializedScriptValue.h: fix a typo
8976        * WebProcess/WebPage/WebPage.cpp:
8977        (WebKit::WebPage::runJavaScriptInMainFrame):
8978
89792011-04-12  Jeff Miller  <jeffm@apple.com>
8980
8981        Reviewed by Adam Roben.
8982
8983        WebKit2: Pressing Tab in Web Inspector's console does not cycle through completion options
8984        https://bugs.webkit.org/show_bug.cgi?id=56020
8985
8986        Safari was always calling TranslateMessage() on key events since it has no way to know whether
8987        WebKit handled the event without a PageUIClient (which Safari only installs on pages inside
8988        a Safari window), which was generating a WM_CHAR message containing the tab in this case.  The fix
8989        is for Safari to never call TranslateMessage() on key events outside of a Safari window, but this
8990        means the WebPageProxy needs to do this for unhandled key events if there is no didNotHandleKeyEvent
8991        callback in the PageUIClient.
8992
8993        * UIProcess/WebPageProxy.cpp:
8994        (WebKit::WebPageProxy::didReceiveEvent): Call TranslateMessage() on Windows for unhandled key events that can't be handled by the PageUIClient.
8995        * UIProcess/WebUIClient.cpp:
8996        (WebKit::WebUIClient::canNotHandleKeyEvent): Added.
8997        * UIProcess/WebUIClient.h: Added canNotHandleKeyEvent().
8998
89992011-04-12  Alice Liu  <alice.liu@apple.com>
9000
9001        Reviewed by Sam Weinig.
9002
9003        https://bugs.webkit.org/show_bug.cgi?id=58292
9004        Provide new setting to allow site icon loading despite disabling automatic image loading in general.
9005
9006        * Shared/WebPreferencesStore.h: Add macro for setting default value.
9007        * UIProcess/API/C/WKPreferences.cpp:
9008        (WKPreferencesSetLoadsSiteIconsIgnoringImageLoadingPreference): Added setter.
9009        (WKPreferencesGetLoadsSiteIconsIgnoringImageLoadingPreference): Added getter.
9010        * UIProcess/API/C/WKPreferences.h:
9011        * WebProcess/WebPage/WebPage.cpp:
9012        (WebKit::WebPage::updatePreferences): Add to list of WebCore settings that get propagated to WebKit preferences.
9013
90142011-04-12  Jessie Berlin  <jberlin@apple.com>
9015
9016        Reviewed by Anders Carlsson.
9017
9018        WebKit2: Spelling and Grammar Checking: Make sure to remove the markings from the document
9019        when spelling and/or grammar checking is disabled.
9020        https://bugs.webkit.org/show_bug.cgi?id=58350
9021
9022        * UIProcess/API/mac/WKView.mm:
9023        (-[WKView toggleContinuousSpellChecking:]):
9024        Move the call to unmark the errors to the WebProcess.
9025        (-[WKView setGrammarCheckingEnabled:]):
9026        Ditto.
9027        (-[WKView toggleGrammarChecking:]):
9028        Ditto.
9029
9030        * UIProcess/WebPageProxy.cpp:
9031        Remove unused functions.
9032        * UIProcess/WebPageProxy.h:
9033        Ditto.
9034        * WebProcess/WebPage/WebPage.messages.in:
9035        Ditto.
9036        * WebProcess/WebPage/WebPage.h:
9037
9038        * WebProcess/WebProcess.cpp:
9039        (WebKit::WebProcess::setTextCheckerState):
9040        If grammar or spelling checking is disabled, unmark all the pages.
9041        Doing it here allows makes it possible to unmark all pages in a cross-platform way that is
9042        triggered both by selecting the the context menu items and by any other methods of updating
9043        the enabled / disabled state.
9044
90452011-04-12  Anders Carlsson  <andersca@apple.com>
9046
9047        Reviewed by Sam Weinig.
9048
9049        Cisco Meeting Center will not download or launch from Safari
9050        https://bugs.webkit.org/show_bug.cgi?id=58366
9051        <rdar://problem/8987139>
9052
9053        It's OK if a plug-in has less (or more) MIME type descriptions than actual MIME types.
9054        
9055        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
9056        (WebKit::getPluginInfoFromCarbonResources):
9057
90582011-04-12  Anders Carlsson  <andersca@apple.com>
9059
9060        Reviewed by Sam Weinig.
9061
9062        Call PluginControllerProxy::platformGeometryDidChange before Plugin::geometryDidChange
9063        https://bugs.webkit.org/show_bug.cgi?id=58361
9064
9065        Since Plugin::geometryDidChange ends up calling plug-in code it can resize the plug-in which causes
9066        platformGeometryDidChange to be called with the wrong rect.
9067
9068        * PluginProcess/PluginControllerProxy.cpp:
9069        (WebKit::PluginControllerProxy::geometryDidChange):
9070        Call platformGeometryDidChange.
9071
9072        * PluginProcess/PluginControllerProxy.h:
9073        * PluginProcess/mac/PluginControllerProxyMac.mm:
9074        (WebKit::PluginControllerProxy::platformGeometryDidChange):
9075        Remove the parameters to platformGeometryDidChange and just use m_frameRect instead.
9076
90772011-04-12  Anders Carlsson  <andersca@apple.com>
9078
9079        Reviewed by Sam Weinig.
9080
9081        Move three Mac specific functions to PluginControllerProxyMac.mm.
9082        
90832011-04-12  Anders Carlsson  <andersca@apple.com>
9084
9085        Reviewed by Sam Weinig.
9086
9087        Cache the window and plug-in element NPObjects
9088        https://bugs.webkit.org/show_bug.cgi?id=58355
9089
9090        * PluginProcess/PluginControllerProxy.cpp:
9091        (WebKit::PluginControllerProxy::PluginControllerProxy):
9092        (WebKit::PluginControllerProxy::~PluginControllerProxy):
9093        (WebKit::PluginControllerProxy::windowScriptNPObject):
9094        (WebKit::PluginControllerProxy::pluginElementNPObject):
9095        * PluginProcess/PluginControllerProxy.h:
9096
90972011-04-12  Alejandro G. Castro  <alex@igalia.com>
9098
9099        Fixed GTK compilation after r83454.
9100
9101        * UIProcess/gtk/WebView.cpp:
9102        (WebKit::WebView::findStringInCustomRepresentation):
9103        (WebKit::WebView::countStringMatchesInCustomRepresentation):
9104        * UIProcess/gtk/WebView.h:
9105
91062011-04-11  Daniel Bates  <dbates@webkit.org>
9107
9108        Attempt to fix the Qt Linux Release build after changeset 83550 <http://trac.webkit.org/changeset/83550>
9109        (https://bugs.webkit.org/show_bug.cgi?id=54159).
9110
9111        * WebKit2API.pri: Append UIProcess/API/C/WKResourceCacheManager.cpp to the list WEBKIT2_API_SOURCES.
9112
91132011-04-11  Sam Weinig  <sam@webkit.org>
9114
9115        Reviewed by Anders Carlsson.
9116
9117        Move focus management out of WebKit via  the UIClient
9118        <rdar://problem/8784068>
9119        https://bugs.webkit.org/show_bug.cgi?id=58278
9120
9121        * UIProcess/API/C/WKPage.h:
9122        * UIProcess/API/mac/PageClientImpl.h:
9123        * UIProcess/API/mac/PageClientImpl.mm:
9124        * UIProcess/API/qt/qwkpage.cpp:
9125        (QWKPage::QWKPage):
9126        * UIProcess/API/qt/qwkpage_p.h:
9127        * UIProcess/PageClient.h:
9128        * UIProcess/WebPageProxy.cpp:
9129        (WebKit::WebPageProxy::setFocus):
9130        * UIProcess/WebUIClient.cpp:
9131        (WebKit::WebUIClient::focus):
9132        (WebKit::WebUIClient::unfocus):
9133        * UIProcess/WebUIClient.h:
9134        * UIProcess/gtk/WebView.cpp:
9135        * UIProcess/gtk/WebView.h:
9136        * UIProcess/win/WebView.h:
9137        Remove PageClient::setFocus() in favor of WebUIClient::focus and WebUIClient::unfocus. 
9138
91392011-04-11  Alexey Proskuryakov  <ap@apple.com>
9140
9141        Reviewed by Maciej Stachowiak.
9142
9143        WebKit2: Cannot use Ctrl-Delete as a custom keyboard shortcut
9144        https://bugs.webkit.org/show_bug.cgi?id=58265
9145        <rdar://problem/9221468>
9146
9147        * WebProcess/WebPage/WebPage.cpp:
9148        (WebKit::WebPage::keyEvent): Added a comment explaining that doing work after DOM event
9149        dispatch isn't great.
9150        * WebProcess/WebPage/mac/WebPageMac.mm:
9151        (WebKit::WebPage::performNonEditingBehaviorForSelector): Added a comment explaining how this
9152        might be moved down to WebCore.
9153        (WebKit::WebPage::performDefaultBehaviorForKeyEvent): This is now empty, since both Space
9154        and Backspace behaviors are implemented in WebCore.
9155
91562011-04-11  Anders Carlsson  <andersca@apple.com>
9157
9158        Try to fix the Windows build.
9159
9160        * UIProcess/win/WebInspectorProxyWin.cpp:
9161        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
9162
91632011-04-11  Alexey Proskuryakov  <ap@apple.com>
9164
9165        Reviewed by Dan Bernstein.
9166
9167        REGRESSION (r83081): Esc key no longer removes current Kotoeri text operation
9168        https://bugs.webkit.org/show_bug.cgi?id=58274
9169        <rdar://problem/9263683>
9170
9171        * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getMarkedRange): Wrap the returned
9172        temporary in RefPtr.
9173
91742011-04-11  Anders Carlsson  <andersca@apple.com>
9175
9176        Reviewed by Sam Weinig.
9177
9178        Remove m_urlAtProcessExit from WebPageProxy
9179        https://bugs.webkit.org/show_bug.cgi?id=58275
9180
9181        Get rid of m_urlAtProcessExit and replace some zeros with nullptrs.
9182
9183        * UIProcess/WebPageProxy.cpp:
9184        (WebKit::WebPageProxy::processDidCrash):
9185        * UIProcess/WebPageProxy.h:
9186
91872011-04-11  Anders Carlsson  <andersca@apple.com>
9188
9189        Reviewed by Adam Roben.
9190
9191        Remove the WebContext member variable from WebPageProxy
9192        https://bugs.webkit.org/show_bug.cgi?id=58271
9193        <rdar://problem/9148125>
9194
9195        * UIProcess/API/C/WKPage.cpp:
9196        (WKPageGetContext):
9197        * UIProcess/WebPageProxy.cpp:
9198        (WebKit::WebPageProxy::create):
9199        (WebKit::WebPageProxy::WebPageProxy):
9200        (WebKit::WebPageProxy::process):
9201        (WebKit::WebPageProxy::reattachToWebProcess):
9202        (WebKit::WebPageProxy::canShowMIMEType):
9203        (WebKit::WebPageProxy::receivedPolicyDecision):
9204        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
9205        (WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrame):
9206        (WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
9207        (WebKit::WebPageProxy::didCommitLoadForFrame):
9208        (WebKit::WebPageProxy::didFinishDocumentLoadForFrame):
9209        (WebKit::WebPageProxy::didFinishLoadForFrame):
9210        (WebKit::WebPageProxy::didFailLoadForFrame):
9211        (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
9212        (WebKit::WebPageProxy::didReceiveTitleForFrame):
9213        (WebKit::WebPageProxy::didFirstLayoutForFrame):
9214        (WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
9215        (WebKit::WebPageProxy::didRemoveFrameFromHierarchy):
9216        (WebKit::WebPageProxy::didDisplayInsecureContentForFrame):
9217        (WebKit::WebPageProxy::didRunInsecureContentForFrame):
9218        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
9219        (WebKit::WebPageProxy::decidePolicyForNewWindowAction):
9220        (WebKit::WebPageProxy::decidePolicyForResponse):
9221        (WebKit::WebPageProxy::unableToImplementPolicy):
9222        (WebKit::WebPageProxy::willSubmitForm):
9223        (WebKit::WebPageProxy::mouseDidMoveOverElement):
9224        (WebKit::WebPageProxy::showContextMenu):
9225        (WebKit::WebPageProxy::contextMenuItemSelected):
9226        * UIProcess/WebPageProxy.h:
9227        * UIProcess/WebProcessProxy.cpp:
9228        (WebKit::WebProcessProxy::createWebPage):
9229        * UIProcess/mac/WebInspectorProxyMac.mm:
9230        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
9231
92322011-04-11  Eric Carlson  <eric.carlson@apple.com>
9233
9234        Reviewed by Adam Roben.
9235
9236        Ignore context change callbacks when not on the main thread
9237        https://bugs.webkit.org/show_bug.cgi?id=58256
9238        <rdar://problem/9266090>
9239
9240        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
9241        (WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Do nothing when not called
9242            on the main thread. This should only happen when no changes have actually 
9243            been committed to the context, eg. when a video frame has been added to an image
9244            queue, so return without triggering animations etc.
9245
92462011-04-11  Anders Carlsson  <andersca@apple.com>
9247
9248        Reviewed by Sam Weinig.
9249
9250        First step towards simplifying WebPageProxy/WebProcessProxy/WebContext ownership
9251        https://bugs.webkit.org/show_bug.cgi?id=58266
9252        <rdar://problem/9148125>
9253
9254        With this patch, the WKView holds a strong reference to a WebPageProxy. The 
9255        WebPageProxy in turn holds a strong reference to its WebProcessProxy. Finally,
9256        The WebProcessProxy holds a strong reference to its WebContext.
9257
9258        The WebContext holds a strong reference to the running WebProcessProxy which results
9259        in a reference cycle that's broken when the web process exits.
9260
9261        The reason for is to avoid crashes where WebPageProxy::process() returns null if the web process
9262        has crashed but has not yet been relaunched.
9263
9264        * UIProcess/WebContext.cpp:
9265        (WebKit::WebContext::disconnectProcess):
9266        Add comment.
9267
9268        (WebKit::WebContext::createWebPage):
9269        Return a PassRefPtr.
9270
9271        (WebKit::WebContext::relaunchProcessIfNecessary):
9272        Change this to return a WebPageProxy.
9273
9274        * UIProcess/WebPageProxy.cpp:
9275        (WebKit::WebPageProxy::create):
9276        This now takes a PassRefPtr<WebProcessProxy>.
9277
9278        (WebKit::WebPageProxy::WebPageProxy):
9279        Ditto.
9280
9281        (WebKit::WebPageProxy::~WebPageProxy):
9282        Call close() if necessary.
9283
9284        (WebKit::WebPageProxy::reattachToWebProcess):
9285        Replace the current process with the new process.
9286
9287        * UIProcess/WebProcessProxy.cpp:
9288        (WebKit::WebProcessProxy::create):
9289        Take a PassRefPtr<WebContext>.
9290        
9291        (WebKit::WebProcessProxy::WebProcessProxy):
9292        Ditto.
9293
9294        (WebKit::WebProcessProxy::webPage):
9295        Remove .get() now that the page map uses weak references.
9296
9297        (WebKit::WebProcessProxy::createWebPage):
9298        This now returns the created web page proxy.
9299
93002011-04-11  Adam Roben  <aroben@apple.com>
9301
9302        Dispatch sent messages to windows owned by the web process when waiting a sync CoreIPC reply
9303
9304        On Windows, windowed plugins' HWNDs are created as children of the WKView's window. This
9305        creates a cross-process window hierarchy, which in turn attaches the input states of the UI
9306        process's and web process's main threads (as if ::AttachThreadInput has been called). Having
9307        the input states attached means that changes to the input state (e.g., changing the focus
9308        window) can result in synchronous window messages being sent between the processes. This can
9309        result in deadlocks if the UI process changes the input state while handling a synchronous
9310        CoreIPC message from the web process. Since the web process isn't running its message loop
9311        while waiting for the reply, it never processes the messages Windows is sending it from the
9312        UI process.
9313
9314        The solution taken in this patch is to continue to dispatch sent (not posted) messages to
9315        windows created by the web process while waiting for a sync CoreIPC reply. Someday we can
9316        hopefully reduce the number of cases in which the UI process modifies the thread's input
9317        state while handling a synchronous message; see the bug for details.
9318
9319        Fixes <http://webkit.org/b/58239> <rdar://problem/8769302> REGRESSION (WebKit2): Deadlock
9320        clicking Flash plugin
9321
9322        Reviewed by Anders Carlsson.
9323
9324        * Platform/CoreIPC/BinarySemaphore.h:
9325        (CoreIPC::BinarySemaphore::event): Added. Simple getter to expose the underlying event
9326        HANDLE.
9327
9328        * Platform/CoreIPC/Connection.cpp:
9329        (CoreIPC::Connection::SyncMessageState::waitWhileDispatchingSentMessages): New Windows-only
9330        function that is used instead of wait() so that sent messages will continue to be
9331        dispatched.
9332        (CoreIPC::Connection::waitForSyncReply): Use waitWhileDispatchingSentMessages instead of
9333        wait on Windows. Our Client gives us the set of windows that need to have windows delivered
9334        to them.
9335
9336        * Platform/CoreIPC/Connection.h: Added new
9337        windowsToReceiveSentMessagesWhileWaitingForSyncReply function to Client.
9338
9339        * Platform/RunLoop.h: Added new dispatchSentMessagesUntil function to be used while waiting
9340        for a sync CoreIPC reply.
9341
9342        * Platform/win/RunLoopWin.cpp:
9343        (RunLoop::dispatchSentMessagesUntil): Added. If we have no windows to dispatch messages to,
9344        then just wait on the semaphore. Otherwise spin a ::MsgWaitForMultipleObjectsEx loop to
9345        detect when the semaphore is signaled, the timeout elapses, or sent messages are available,
9346        and handle each case appropriately.
9347
9348        * UIProcess/WebProcessProxy.h: Added new CoreIPC::Connection::Client function.
9349
9350        * UIProcess/win/WebProcessProxyWin.cpp: Added.
9351        (WebKit::WebProcessProxy::windowsToReceiveSentMessagesWhileWaitingForSyncReply): Just return
9352        an empty Vector. The web process never modifies the thread's input state while responding to
9353        a synchronous message, so we don't have anything to worry about here.
9354
9355        * WebProcess/WebProcess.h: Added new CoreIPC::Connection::Client function.
9356
9357        * WebProcess/win/WebProcessWin.cpp:
9358        (WebKit::addWindowToVectorIfOwnedByCurrentThread): New helper function to be called by
9359        ::EnumThreadWindows/::EnumChildWindows. Does what it says.
9360        (WebKit::WebProcess::windowsToReceiveSentMessagesWhileWaitingForSyncReply): Added. Returns
9361        all top-level windows created by this thread, descendants of those windows created by this
9362        thread, and descendants of WKViews' windows created by this thread.
9363
9364        * win/WebKit2.vcproj: Added WebProcessProxyWin.cpp.
9365
93662011-04-11  Jessie Berlin  <jberlin@apple.com>
9367
9368        Reviewed by Anders Carlsson.
9369
9370        WebKit2: Implement TextChecker on Windows
9371        https://bugs.webkit.org/show_bug.cgi?id=57862
9372
9373        Part 7: Implement getGuessesForWord, learnWord, and ignoreWord.
9374
9375        * UIProcess/API/C/win/WKTextChecker.cpp:
9376        (WKTextCheckerChangeSpellingToWord):
9377        * UIProcess/API/C/win/WKTextChecker.h:
9378
9379        * UIProcess/WebPageProxy.cpp:
9380        (WebKit::WebPageProxy::changeSpellingToWord):
9381        Make this function const since it does not modify the WebPageProxy and making it const
9382        allows WebTextChecker::changeSpellingToWord to take a const WebPageProxy.
9383        (WebKit::WebPageProxy::learnWord):
9384        * UIProcess/WebPageProxy.h:
9385
9386        * UIProcess/TextChecker.h:
9387        * UIProcess/win/TextCheckerWin.cpp:
9388        (WebKit::TextChecker::getGuessesForWord):
9389        Ask the TextCheckerClient for the guesses.
9390        (WebKit::TextChecker::learnWord):
9391        Tell the TextCheckerClient.
9392        (WebKit::TextChecker::ignoreWord):
9393        Ditto.
9394        * UIProcess/gtk/TextCheckerGtk.cpp:
9395        (WebKit::TextChecker::learnWord):
9396        Add an unused param that is necessary for Windows.
9397        * UIProcess/mac/TextCheckerMac.mm:
9398        (WebKit::TextChecker::learnWord):
9399        Ditto.
9400        * UIProcess/qt/TextCheckerQt.cpp:
9401        (WebKit::TextChecker::learnWord):
9402        Ditto.
9403
9404        * UIProcess/win/WebTextChecker.cpp:
9405        (WebKit::WebTextChecker::changeSpellingToWord):
9406        Tell the page.
9407        * UIProcess/win/WebTextChecker.h:
9408
9409        * UIProcess/win/WebTextCheckerClient.cpp:
9410        (WebKit::WebTextCheckerClient::guessesForWord):
9411        (WebKit::WebTextCheckerClient::learnWord):
9412        (WebKit::WebTextCheckerClient::ignoreWord):
9413        * UIProcess/win/WebTextCheckerClient.h:
9414
94152011-04-11  Anders Carlsson  <andersca@apple.com>
9416
9417        Reviewed by Sam Weinig.
9418
9419        Remove unused WebProcessProxy functions
9420        https://bugs.webkit.org/show_bug.cgi?id=58262
9421
9422        * UIProcess/WebProcessProxy.cpp:
9423        * UIProcess/WebProcessProxy.h:
9424
94252011-04-11  Anders Carlsson  <andersca@apple.com>
9426
9427        Reviewed by Sam Weinig.
9428
9429        Crash in WebPageProxy::countStringMatches
9430        https://bugs.webkit.org/show_bug.cgi?id=58255
9431        <rdar://problem/9243837>
9432
9433        * UIProcess/WebPageProxy.cpp:
9434        (WebKit::WebPageProxy::countStringMatches):
9435        Return early if the page is not valid.
9436
94372011-04-11  Sam Weinig  <sam@webkit.org>
9438
9439        Reviewed by Anders Carlsson.
9440
9441        WebKit2: links don’t update to look visited
9442        <rdar://problem/8806254>
9443        https://bugs.webkit.org/show_bug.cgi?id=58252
9444
9445        * WebProcess/WebProcess.cpp:
9446        (WebKit::WebProcess::visitedLinkStateChanged):
9447        (WebKit::WebProcess::allVisitedLinkStateChanged):
9448        * WebProcess/WebProcess.h:
9449        Remove use of vestigial sharedPageGroup and instead iterate set of
9450        page groups in use by the process.
9451
94522011-04-11  Brian Weinstein  <bweinstein@apple.com>
9453
9454        Reviewed by Adam Roben.
9455
9456        WebKit2: Windows 7 Gestures Window Bounce shouldn't require a sync message
9457        https://bugs.webkit.org/show_bug.cgi?id=58167
9458        <rdar://problem/9259813>
9459        
9460        Instead of making GestureDidScroll sync, have WebPageWin call from WebProcess ->
9461        UIProcess when the gesture causes the page to scroll to the beginning or the
9462        end of the document.
9463
9464        * UIProcess/PageClient.h:
9465        * UIProcess/WebPageProxy.cpp:
9466        (WebKit::WebPageProxy::gestureDidScroll): Not a sync message anymore.
9467        (WebKit::WebPageProxy::setGestureScrollingLimitReached): Tell the page client that the gesture
9468            scrolling limnit was reached.
9469        * UIProcess/WebPageProxy.h:
9470        * UIProcess/WebPageProxy.messages.in: Add a new message.
9471        * UIProcess/win/WebView.cpp:
9472        (WebKit::WebView::WebView): Initialize new variable.
9473        (WebKit::WebView::onGesture): Use the state of the member variable, not the response from
9474            the sync message.
9475        * UIProcess/win/WebView.h:
9476        (WebKit::WebView::setGestureScrollingLimitReached):
9477        * WebProcess/WebPage/WebPage.h:
9478        * WebProcess/WebPage/WebPage.messages.in:
9479        * WebProcess/WebPage/win/WebPageWin.cpp:
9480        (WebKit::scrollbarAtTopOfBottomOrDocument): Returns whether or not the scrollbar is at the
9481            top or bottom of the document.
9482        (WebKit::WebPage::gestureDidScroll): Track whether or not we started at the beginning
9483            or end of the document, and whether or not we ended at the beginning or end of the document,
9484            and send a message if the value changed.
9485
94862011-04-04  Jer Noble  <jer.noble@apple.com>
9487
9488        Reviewed by Maciej Stachowiak.
9489
9490        WK2: PDF: Find in page
9491        https://bugs.webkit.org/show_bug.cgi?id=57765
9492
9493        Support searching text within PDF documents.  Find requests must be routed from the
9494        WebPageProxy, through the PageClient, and to the WKView, where they can be passed to 
9495        the PDFViewController.
9496
9497        * UIProcess/API/mac/PDFViewController.h:
9498        * UIProcess/API/mac/PDFViewController.mm:
9499        (_PDFSelectionsAreEqual): Copied from WebPDFView.
9500        (-[WKPDFView _nextMatchFor:direction:caseSensitive:wrap:fromSelection:startInSelection:]): Copied from WebPDFView.
9501        (-[WKPDFView _countMatches:caseSensitive:]): Added.
9502        (WebKit::PDFViewController::findString): Added.
9503        (WebKit::PDFViewController::countStringMatches): Added.
9504        * UIProcess/PageClient.h:
9505        * UIProcess/API/mac/PageClientImpl.h:
9506        * UIProcess/API/mac/PageClientImpl.mm:
9507        (WebKit::PageClientImpl::findStringInCustomRepresentation): Added.
9508        (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation): Added.
9509        * UIProcess/API/mac/WKViewInternal.h:
9510        * UIProcess/API/mac/WKView.mm:
9511        (-[WKView _findStringInCustomRepresentation:withFindOptions:maxMatchCount:]): Added.
9512        (-[WKView _countStringMatchesInCustomRepresentation:withFindOptions:maxMatchCount:]): Added.
9513        * UIProcess/WebPageProxy.h: Moved a number of find-related functions from private: to public: so
9514            they could be called from PDFViewController.
9515        * UIProcess/WebPageProxy.cpp:
9516        (WebKit::WebPageProxy::findString): Added. 
9517        (WebKit::WebPageProxy::countStringMatches): Added.
9518        * UIProcess/win/WebView.cpp:
9519        (WebKit::WebView::findStringInCustomRepresentation): Added stub.
9520        (WebKit::WebView::countStringMatchesInCustomRepresentation): Ditto.
9521        * UIProcess/win/WebView.h:
9522        * UIProcess/API/qt/qwkpage_p.h:
9523        (QWKPagePrivate::findStringInCustomRepresentation): Added stub.
9524        (QWKPagePrivate::countStringMatchesInCustomRepresentation): Added stub.
9525
95262011-04-11  Jessie Berlin  <jberlin@apple.com>
9527
9528        Reviewed by Anders Carlsson.
9529
9530        WebKit2: Implement TextChecker on Windows
9531        https://bugs.webkit.org/show_bug.cgi?id=57862
9532
9533        Part 6: Update the Spelling UI with the spelling and grammar mistakes.
9534
9535        * UIProcess/API/C/win/WKAPICastWin.h:
9536        (WebKit::toAPI):
9537        Make it possible to go from a WebCore::GrammarDetail to a WebGrammarDetail.
9538 
9539        * UIProcess/API/C/win/WKGrammarDetail.cpp:
9540        (WKGrammarDetailCreate):
9541        (WKGrammarDetailGetLocation):
9542        (WKGrammarDetailGetLength):
9543        (WKGrammarDetailCopyGuesses):
9544        (WKGrammarDetailCopyUserDescription):
9545        * UIProcess/API/C/win/WKGrammarDetail.h:
9546
9547        * UIProcess/API/C/win/WKTextChecker.cpp:
9548        (WKTextCheckerCheckSpelling):
9549        Tell the WebTextChecker.
9550        * UIProcess/API/C/win/WKTextChecker.h:
9551
9552        * UIProcess/WebPageProxy.cpp:
9553        (WebKit::WebPageProxy::contextMenuItemSelected):
9554        If the show/hide spelling UI is selected and the spelling UI is not showing, make sure to
9555        advance to the next misspelling (in this case, the first).
9556        This behavior matches that in WebCore and WKView.mm.
9557        (WebKit::WebPageProxy::advanceToNextMisspelling):
9558        Make this function const since it does not modify the WebPageProxy and making it const
9559        allows WebTextChecker::checkSpelling to take a const WebPageProxy.
9560        (WebKit::WebPageProxy::spellDocumentTag):
9561        (WebKit::WebPageProxy::updateSpellingUIWithMisspelledWord):
9562        (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
9563        * UIProcess/WebPageProxy.h:
9564
9565        * UIProcess/TextChecker.h:
9566        * UIProcess/win/TextCheckerWin.cpp:
9567        (WebKit::TextChecker::uniqueSpellDocumentTag):
9568        Tell the TextCheckerClient which WebPageProxy this tag is for.
9569        (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
9570        Tell the TextCheckerClient.
9571        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
9572        Ditto.
9573        * UIProcess/mac/TextCheckerMac.mm:
9574        (WebKit::TextChecker::uniqueSpellDocumentTag):
9575        Add the new argument that is unused by this port.
9576        (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
9577        Ditto.
9578        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
9579        Ditto.
9580        * UIProcess/gtk/TextCheckerGtk.cpp:
9581        (WebKit::TextChecker::uniqueSpellDocumentTag):
9582        Ditto.
9583        (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
9584        Ditto.
9585        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
9586        Ditto.
9587        * UIProcess/qt/TextCheckerQt.cpp:
9588        (WebKit::TextChecker::uniqueSpellDocumentTag):
9589        Ditto.
9590        (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
9591        Ditto.
9592        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
9593        Ditto.
9594
9595        * UIProcess/win/WebGrammarDetail.cpp:
9596        (WebKit::WebGrammarDetail::create):
9597        (WebKit::WebGrammarDetail::WebGrammarDetail):
9598        (WebKit::WebGrammarDetail::guesses):
9599        * UIProcess/win/WebGrammarDetail.h:
9600        (WebKit::WebGrammarDetail::location):
9601        (WebKit::WebGrammarDetail::length):
9602        (WebKit::WebGrammarDetail::userDescription):
9603
9604        * UIProcess/win/WebTextChecker.cpp:
9605        (WebKit::WebTextChecker::checkSpelling):
9606        Tell the page to advance to the next misspelling. This matches the WK1 WebView.cpp logic.
9607
9608        * UIProcess/win/WebTextChecker.h:
9609        * UIProcess/win/WebTextCheckerClient.cpp:
9610        (WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
9611        (WebKit::WebTextCheckerClient::toggleSpellingUIIsShowing):
9612        (WebKit::WebTextCheckerClient::updateSpellingUIWithMisspelledWord):
9613        (WebKit::WebTextCheckerClient::updateSpellingUIWithGrammarString):
9614        * UIProcess/win/WebTextCheckerClient.h:
9615
96162011-04-10  Maciej Stachowiak  <mjs@apple.com>
9617
9618        Not reviewed.
9619
9620        Remove extra inadvertantly commiteed changes from last change.
9621
9622        * WebProcess/com.apple.WebProcess.sb:
9623
96242011-04-10  Maciej Stachowiak  <mjs@apple.com>
9625
9626        Reviewed by Dan Bernstein.
9627
9628        REGRESSION: WebProcess spews sandboxing violations for outbound network traffic
9629        https://bugs.webkit.org/show_bug.cgi?id=58215
9630        <rdar://problem/9251695>
9631        
9632        * WebProcess/com.apple.WebProcess.sb: Restore some previously removed rules.
9633
96342011-04-10  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
9635
9636        Reviewed by Eric Seidel.
9637
9638        Require no undefined symbols during compilation.
9639
9640        [Qt] [WK2] WebKitTestRunner, QtWebProcess and WTRInjectBundle should fail to compile when there's undefined symbols
9641        https://bugs.webkit.org/show_bug.cgi?id=54896
9642        
9643        Add -Wl,--no-undefined to catch missing symbols early.
9644
9645        * WebProcess.pro:
9646
96472011-04-09  Geoffrey Garen  <ggaren@apple.com>
9648
9649        Not reviewed.
9650        
9651        Try recommitting some things svn left out of my last commit.
9652
9653        * WebProcess/Plugins/Netscape/NPJSObject.h:
9654
96552011-04-09  Geoffrey Garen  <ggaren@apple.com>
9656
9657        Not reviewed.
9658        
9659        Try recommitting some things svn left out of my last commit.
9660
9661        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
9662        (WebKit::NPRuntimeObjectMap::evaluate):
9663
96642011-04-08  Alexey Proskuryakov  <ap@apple.com>
9665
9666        Reviewed by Darin Adler.
9667
9668        WebKit2: Safari doesn't respect cmd-arrows (and variations) as custom keyboard shortcuts
9669        https://bugs.webkit.org/show_bug.cgi?id=58175
9670        <rdar://problem/9060555>
9671
9672        The problem is that command handling should be different for events that come as keyDown:
9673        and those that come as performKeyEquivalent:. WebKit1 only tries custom "key bindings"
9674        when handling a keyDown:, letting a performKeyEquivalent: run through the whole responder
9675        chain first.
9676
9677        This would be very difficult to implement in WebKit2 because of how it re-sends the same
9678        event after web process handling. Luckily, we can both fix the bug and make the behavior
9679        more robust by not hardcoding key combinations.
9680
9681        * WebProcess/WebPage/WebPage.h: Edit performNonEditingBehaviorForSelector.
9682        * WebProcess/WebPage/mac/WebPageMac.mm:
9683        (WebKit::WebPage::executeKeypressCommandsInternal): When executing commands, also try
9684        executing editor commands in their non-editing meaning, which is usually scrolling.
9685        (WebKit::WebPage::performNonEditingBehaviorForSelector): Naive implementation with a chain
9686        of ifs, which is hopefully ok performance-wise for a dozen check.
9687        (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Only kept two commands here that I
9688        couldn't easily move.
9689
96902011-04-08  Jessie Berlin  <jberlin@apple.com>
9691
9692        Reviewed by Anders Carlsson.
9693
9694        WebKit2: Show the substitutions panel on Mac and make sure the menu items titles are
9695        updated correctly.
9696        https://bugs.webkit.org/show_bug.cgi?id=58179
9697
9698        * UIProcess/API/mac/WKView.mm:
9699        (-[WKView validateUserInterfaceItem:]):
9700        The title of the context menu item should be opposite of whether or not the spelling panel
9701        is visible.
9702
9703        * UIProcess/WebPageProxy.cpp:
9704        (WebKit::WebPageProxy::contextMenuItemSelected):
9705        If the "Show/Hide" Substitutions item is selected, call toggleSubstitutionsPanelIsShowing.
9706        (WebKit::WebPageProxy::substitutionsPanelIsShowing):
9707        Ask the TextChecker.
9708        * UIProcess/WebPageProxy.h:
9709        * UIProcess/WebPageProxy.messages.in:
9710
9711        * UIProcess/TextChecker.h:
9712        * UIProcess/mac/TextCheckerMac.mm:
9713        (WebKit::TextChecker::substitutionsPanelIsShowing):
9714        As the shared NSSpellChecker if the substitutionsPanel is visible.
9715        (WebKit::TextChecker::toggleSubstitutionsPanelIsShowing):
9716        Order the substitutionsPanel out or front (copied from WKView.mm).
9717
9718        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
9719        (WebKit::WebEditorClient::substitutionsPanelIsShowing):
9720        Send a sync message to the UI process to find out.
9721        It needs to be sync because the editor code relies on the value returned.
9722
97232011-04-08  Dan Bernstein  <mitz@apple.com>
9724
9725        Reviewed by Adele Peterson.
9726
9727        Fixed a bug where right-to-left frames incorrectly reported that they were pinned to the left
9728        when they were actually not.
9729
9730        * WebProcess/WebPage/WebPage.cpp:
9731        (WebKit::WebPage::didChangeScrollOffsetForMainFrame): Do not assume that the minimum scroll offset
9732        is zero, because it is not.
9733
97342011-04-08  Anders Carlsson  <andersca@apple.com>
9735
9736        Fix the Windows build.
9737
9738        * UIProcess/win/WebView.cpp:
9739        (WebKit::WebView::Drop):
9740
97412011-04-08  Jessie Berlin  <jberlin@apple.com>
9742
9743        Reviewed by Anders Carlsson.
9744
9745        WebKit2: Implement TextChecker on Windows
9746        https://bugs.webkit.org/show_bug.cgi?id=57862
9747
9748        Part 5: Implement the code show and hide the Spelling UI via the context menu item (both
9749        Windows and Mac).
9750
9751        * UIProcess/API/C/win/WKTextChecker.h:
9752        Add the new WKTextCheckerClient funtions.
9753
9754        * UIProcess/API/mac/WKView.mm:
9755        (-[WKView validateUserInterfaceItem:]):
9756        The title of the context menu item should be opposite of whether or not the spelling panel
9757        is visible.
9758
9759        * UIProcess/WebPageProxy.cpp:
9760        (WebKit::WebPageProxy::contextMenuItemSelected):
9761        If the "Show/Hide Spelling and Grammar" item is selected, call toggleSpellingUIIsShowing.
9762        (WebKit::WebPageProxy::spellingUIIsShowing):
9763        Call through to TextChecker.
9764        * UIProcess/WebPageProxy.h:
9765        * UIProcess/WebPageProxy.messages.in:
9766
9767        * UIProcess/TextChecker.h:
9768       * UIProcess/win/TextCheckerWin.cpp:
9769        (WebKit::TextChecker::spellingUIIsShowing):
9770        Call the TextCheckerClient.
9771        (WebKit::TextChecker::toggleSpellingUIIsShowing):
9772        Ditto.
9773        * UIProcess/mac/TextCheckerMac.mm:
9774        (WebKit::TextChecker::spellingUIIsShowing):
9775        Ask the shared NSSpellChecker if the spellingPanel is visible.
9776        (WebKit::TextChecker::toggleSpellingUIIsShowing):
9777        Order the spellingPanel out or front (copied from WKView.mm).
9778        * UIProcess/qt/TextCheckerQt.cpp:
9779        (WebKit::TextChecker::spellingUIIsShowing):
9780        Call notImplemented.
9781        (WebKit::TextChecker::toggleSpellingUIIsShowing):
9782        Ditto.
9783        * UIProcess/gtk/TextCheckerGtk.cpp:
9784        (WebKit::TextChecker::spellingUIIsShowing):
9785        Ditto.
9786        (WebKit::TextChecker::toggleSpellingUIIsShowing):
9787        Ditto.
9788 
9789        * UIProcess/win/WebTextCheckerClient.cpp:
9790        (WebKit::WebTextCheckerClient::spellingUIIsShowing):
9791        Call the client.
9792        (WebKit::WebTextCheckerClient::toggleSpellingUIIsShowing):
9793        Ditto.
9794        * UIProcess/win/WebTextCheckerClient.h:
9795
9796        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
9797        (WebKit::WebEditorClient::spellingUIIsShowing):
9798        Send a sync message to the UI process to find out.
9799        It needs to be sync because the Editor code relies on the value returned.
9800
98012011-04-08  Anders Carlsson  <andersca@apple.com>
9802
9803        Reviewed by Dan Bernstein.
9804
9805        Sandboxing doesn't work if a local file is dropped on the content area
9806        https://bugs.webkit.org/show_bug.cgi?id=58177
9807        <rdar://problem/9019253>
9808
9809        When performing a drag and the dragging pasteboard contains a local file, create a
9810        sandbox extension and pass it along. If we end up loading the file, the sandbox extension
9811        tracker will consume the extension.
9812
9813        * UIProcess/API/mac/WKView.mm:
9814        (maybeCreateSandboxExtensionFromPasteboard):
9815        Add helper function.
9816
9817        (-[WKView performDragOperation:]):
9818        Create a sandbox extension handle and pass it to performDrag.
9819
9820        * UIProcess/WebPageProxy.cpp:
9821        (WebKit::WebPageProxy::dragEntered):
9822        (WebKit::WebPageProxy::dragUpdated):
9823        (WebKit::WebPageProxy::dragExited):
9824        Pass an empty sandbox extension handle to performDragControllerAction.
9825
9826        (WebKit::WebPageProxy::performDrag):
9827        Pass the sandbox extension handle along to performDragControllerAction.
9828
9829        (WebKit::WebPageProxy::performDragControllerAction):
9830        Send along the sandbox extension handle.
9831
9832        * WebProcess/WebCoreSupport/WebDragClient.cpp:
9833        (WebKit::WebDragClient::willPerformDragDestinationAction):
9834        If the destination action is a load action, call WebPage::willPerformLoadDragDestinationAction.
9835
9836        * WebProcess/WebPage/WebPage.cpp:
9837        (WebKit::WebPage::performDragControllerAction):
9838        Create a sandbox extension.
9839
9840        (WebKit::WebPage::willPerformLoadDragDestinationAction):
9841        If we have a sandbox extension, pass it along to the sandbox extension tracker.
9842
9843        (WebKit::WebPage::SandboxExtensionTracker::willPerformLoadDragDestinationAction):
9844        Call setPendingProvisionalSandboxExtension.
9845
9846        (WebKit::WebPage::SandboxExtensionTracker::beginLoad):
9847        Call setPendingProvisionalSandboxExtension.
9848
9849        (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
9850        Factor code from beginLoad out into a separate function.
9851
9852        * WebProcess/WebPage/WebPage.messages.in:
9853        PerformDragControllerAction now takes a sandbox extension handle.
9854
98552011-04-08  Alice Liu  <alice.liu@apple.com>
9856
9857        Reviewed by Adam Roben.
9858
9859        https://bugs.webkit.org/show_bug.cgi?id=58151
9860        Crash after closing a Webview, in WebKit!WebCore::WindowMessageBroadcaster::SubclassedWndProc
9861
9862        * UIProcess/win/WebView.cpp:
9863        (WebKit::WebView::close):
9864        Resolve a difference between old WebKit WebView and WebKit2 WebView by destroying and clearing
9865        out WebKit2 WebView's HWND when closing. Not doing so was causing the WebView to remain in the
9866        list of WindowMessageBroadcaster listeners, and after closing the WebView, WindowMessageBroadcaster
9867        would message a dead WebView and crash.
9868
98692011-04-08  Anders Carlsson  <andersca@apple.com>
9870
9871        Reviewed by Adam Roben.
9872
9873        Make the drag operations be different functions
9874        https://bugs.webkit.org/show_bug.cgi?id=58169
9875
9876        Since we want performDrag to take a sandbox extension, separate the four
9877        drag operations out into different functions. No functionality change.
9878
9879        * UIProcess/API/mac/WKView.mm:
9880        (-[WKView draggingEntered:]):
9881        (-[WKView draggingUpdated:]):
9882        (-[WKView draggingExited:]):
9883        (-[WKView performDragOperation:]):
9884        * UIProcess/WebPageProxy.cpp:
9885        (WebKit::WebPageProxy::dragEntered):
9886        (WebKit::WebPageProxy::dragUpdated):
9887        (WebKit::WebPageProxy::dragExited):
9888        (WebKit::WebPageProxy::performDrag):
9889        * UIProcess/WebPageProxy.h:
9890        * UIProcess/win/WebView.cpp:
9891        (WebKit::WebView::DragEnter):
9892        (WebKit::WebView::DragOver):
9893        (WebKit::WebView::DragLeave):
9894        (WebKit::WebView::Drop):
9895
98962011-04-08  Anders Carlsson  <andersca@apple.com>
9897
9898        Reviewed by Adam Roben.
9899
9900        Parse 'DispatchOnConnectionQueue' in messages.in files
9901        https://bugs.webkit.org/show_bug.cgi?id=58168
9902
9903        Handle parsing multiple, space-separated attributes in .messages.in files. Keep track of
9904        'DispatchOnConnectionQueue' and rename 'delayed' to 'Delayed'.
9905
9906        * Scripts/webkit2/messages.py:
9907        * Scripts/webkit2/messages_unittest.py:
9908
99092011-04-08  Alpha Lam  <hclam@chromium.org>
9910
9911        Unreviewed, rolling out r83335.
9912        http://trac.webkit.org/changeset/83335
9913        https://bugs.webkit.org/show_bug.cgi?id=53556
9914
9915        GTK and QT bots are broken
9916
9917        * Configurations/FeatureDefines.xcconfig:
9918
99192011-04-07  Anna Cavender  <annacc@chromium.org>
9920
9921        Reviewed by Eric Carlson.
9922
9923        Setup ENABLE(TRACK) feature define
9924        https://bugs.webkit.org/show_bug.cgi?id=53556
9925
9926        * Configurations/FeatureDefines.xcconfig:
9927
99282011-04-07  Alexey Proskuryakov  <ap@apple.com>
9929
9930        Reviewed by Darin Alder.
9931
9932        REGRESSION (WebKit2): AppKit thinks that web views don't support DocumentAccess
9933        https://bugs.webkit.org/show_bug.cgi?id=58102
9934        <rdar://problem/9223246>
9935
9936        * UIProcess/API/mac/WKView.h:
9937        * UIProcess/API/mac/WKView.mm:
9938        (-[WKView doCommandBySelector:]):
9939        (-[WKView insertText:replacementRange:]):
9940        (-[WKView validAttributesForMarkedText]):
9941        (-[WKView setMarkedText:selectedRange:replacementRange:]):
9942        (-[WKView attributedSubstringForProposedRange:actualRange:]):
9943        (-[WKView firstRectForCharacterRange:actualRange:]):
9944        Switch to NSTextInputClient, opting out of optimizations and optional features for now.
9945
99462011-04-08  Siddharth Mathur  <siddharth.mathur@nokia.com>
9947
9948        Reviewed by Martin Robinson.
9949
9950        [Qt][WK2][Symbian] Remove use of stack arrays with variable size
9951        https://bugs.webkit.org/show_bug.cgi?id=57877
9952
9953        For better compiler portability, use new/delete for arrays when size
9954        isn't known at compile time. Also fix one compiler warning about bitshift
9955        operations on signed integer
9956        * Platform/CoreIPC/unix/ConnectionUnix.cpp:
9957        (CoreIPC::Connection::readyReadHandler):
9958        (CoreIPC::Connection::sendOutgoingMessage):
9959
99602011-04-08  Martin Robinson  <mrobinson@igalia.com>
9961
9962        Reviewed by Xan Lopez.
9963
9964        [GTK] Fix the WebKit2 build for older versions of GTK+
9965        https://bugs.webkit.org/show_bug.cgi?id=58095
9966
9967        * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Include the GtkVersioning.h header.
9968
99692011-04-07  Balazs Kelemen  <kbalazs@webkit.org>
9970
9971        Reviewed by Kenneth Rohde Christiansen.
9972
9973        [WK2][Qt][GTK] Introduce common use flag for the shared UNIX domain socket IPC implementation
9974        https://bugs.webkit.org/show_bug.cgi?id=58030
9975
9976        Replace "PLATFORM(QT) || PLATFORM(GTK)" conditions in IPC code with
9977        USE(UNIX_DOMAIN_SOCKETS).
9978
9979        * Platform/CoreIPC/Attachment.h:
9980        * Platform/CoreIPC/Connection.h:
9981        * Platform/SharedMemory.h:
9982
99832011-04-07  Anders Carlsson  <andersca@apple.com>
9984
9985        Reviewed by Simon Fraser.
9986
9987        Clicks not recognized on http://www.nibblestutorials.net/ which uses Silverlight
9988        https://bugs.webkit.org/show_bug.cgi?id=58108
9989        <rdar://problem/9167611>
9990
9991        Change platformHandleMouseEvent to return true, which means that the plug-in has handled the
9992        event. Some plug-ins (like Silverlight) will return false from NPP_HandleEvent even though the
9993        event has been handled. In this case it lead to a very subtle bug where the plug-in element would
9994        lose focus right after a mouse down even had been sent.
9995
9996        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
9997        (WebKit::NetscapePlugin::platformHandleMouseEvent):
9998
99992011-04-07  Adam Roben  <aroben@apple.com>
10000
10001        Pass NPP_SetWindow a null window handle during plugin destruction on non-Mac platforms
10002
10003        This matches WebKit1.
10004
10005        Fixes <http://webkit.org/b/47009> WebKit2 needs to call NPP_SetWindow when destroying a
10006        plugin
10007
10008        Reviewed by Anders Carlsson.
10009
10010        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
10011        (WebKit::NetscapePlugin::destroy): Null out our NPWindow's window handle and pass it to
10012        NPP_SetWindow (unless we're on Mac).
10013
100142011-04-08  Jamie Cooley  <james.cooley@nokia.com>
10015
10016        Reviewed by Benjamin Poulain.
10017
10018        [Qt][WK2] Make sure qwkhistory.h is copied into includes/WebKit2
10019        https://bugs.webkit.org/show_bug.cgi?id=57945
10020
10021        * UIProcess/API/qt/WKView.h:
10022        * UIProcess/API/qt/qwkhistory.h:
10023
100242011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
10025
10026        Reviewed by Martin Robinson.
10027
10028        [GTK] Do not destroy WorkQueue event sources unless they have been cancelled
10029        https://bugs.webkit.org/show_bug.cgi?id=57611
10030
10031        * Platform/WorkQueue.h:
10032        * Platform/gtk/WorkQueueGtk.cpp:
10033        (WorkQueue::EventSource::EventSource): Remove unused member
10034        m_dispatchSource.
10035        (WorkQueue::EventSource::executeEventSource): Make it return void
10036        instead of boolean since we are always ignoring the return value.
10037        (WorkQueue::EventSource::performWork): Return FALSE from the
10038        callback only when the source has been cancelled (condition = 0)
10039        to make sure it's destroyed when the even source handler is
10040        unregistered.
10041        (WorkQueue::registerEventSourceHandler): Use GRefPtr for the
10042        source, to avoid leaking it.
10043        (WorkQueue::scheduleWorkOnSource): Receive the source callback as
10044        parameter so that it can be used by scheduleWorkOnTermination() too.
10045        (WorkQueue::scheduleWork):
10046        (WorkQueue::scheduleWorkAfterDelay):
10047        (WorkQueue::scheduleWorkOnTermination): Use
10048        scheduleWorkOnSource().
10049
100502011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
10051
10052        Reviewed by Martin Robinson.
10053
10054        [GTK] Close connection when web process finishes
10055        https://bugs.webkit.org/show_bug.cgi?id=57540
10056
10057        * Platform/CoreIPC/Connection.h:
10058        * Platform/CoreIPC/unix/ConnectionUnix.cpp:
10059        * Platform/PlatformProcessIdentifier.h: Use GPid as process
10060        identifier.
10061        * Platform/WorkQueue.h:
10062        * Platform/gtk/WorkQueueGtk.cpp:
10063        (WorkQueue::EventSource::EventSource): Add cancellable parameter.
10064        (WorkQueue::EventSource::cancel): New method to cancel the source.
10065        (WorkQueue::EventSource::performWorkOnTermination): New method to
10066        execute a work item called when child process has finished.
10067        (WorkQueue::registerEventSourceHandler): Create a GCancellable for
10068        the socket source.
10069        (WorkQueue::unregisterEventSourceHandler): Cancel the source
10070        instead of destroying it, this will cause the source to trigger
10071        with condition = 0, which makes the callback return FALSE and the
10072        source is destroyed.
10073        (WorkQueue::scheduleWorkOnSource): Pass NULL as cancellable for
10074        idle and timeout sources.
10075        (WorkQueue::scheduleWorkOnTermination): Create a child watch
10076        source to monitor the child process.
10077        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
10078        (WebKit::ProcessLauncher::launchProcess): Use GPid instead of int
10079        as process identifier.
10080        * UIProcess/WebProcessProxy.cpp:
10081        (WebKit::WebProcessProxy::didFinishLaunching): Call
10082        WorkQueue::scheduleWorkOnTermination() for GTK platform too when
10083        web process has been launched.
10084
100852011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
10086
10087        Reviewed by Martin Robinson.
10088
10089        [GTK] Implement scheduleWorkAfterDelay() in WorkQueueGtk
10090        https://bugs.webkit.org/show_bug.cgi?id=57434
10091
10092        * Platform/WorkQueue.h:
10093        * Platform/gtk/WorkQueueGtk.cpp:
10094        (WorkQueue::EventSource::executeEventSource): This new method
10095        contains the common code to execute a work item.
10096        (WorkQueue::EventSource::performWorkOnce): Use
10097        executeEventSource() to execute the work item.
10098        (WorkQueue::EventSource::performWork): Use executeEventSource() to
10099        execute the work item.
10100        (WorkQueue::registerEventSourceHandler): Use a GSocket instead of
10101        a GIOChannel since the API is newer and allows us to pass a
10102        cancellable object to be able to cancel the source.
10103        (WorkQueue::scheduleWorkOnSource): This new method contains the
10104        common code to attach a source to a context. It doesn't use a lock
10105        anymore, since g_source_attach() uses its own mutex internally.
10106        (WorkQueue::scheduleWork): Use an idle source instead of a timeout
10107        one, changing the priority to G_PRIORITY_DEFAULT.
10108        (WorkQueue::scheduleWorkAfterDelay): Implement it using a timeout
10109        source with the given delay.
10110
101112011-04-08  Carlos Garcia Campos  <cgarcia@igalia.com>
10112
10113        Reviewed by Martin Robinson.
10114
10115        [GTK] Use glib API instead of fork + execl in ProcessLauncherGtk
10116        https://bugs.webkit.org/show_bug.cgi?id=57234
10117
10118        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
10119        (WebKit::childSetupFunction): close the socket and use prctl()
10120        when platform is Linux to kill the child process when the parent
10121        finishes.
10122        (WebKit::ProcessLauncher::launchProcess): Use g_spawn_async() to
10123        launch the web process.
10124
101252011-04-07  Geoffrey Garen  <ggaren@apple.com>
10126
10127        Some Handle<T> cleanup
10128        https://bugs.webkit.org/show_bug.cgi?id=58109
10129
10130        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
10131        (WebKit::NPJSObject::NPJSObject): Updated for new null constructor.
10132
101332011-04-07  Jessie Berlin  <jberlin@apple.com>
10134
10135        Max build fix.
10136
10137        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
10138        (WebKit::WebEditorClient::checkSpellingOfString):
10139        Do not risk an overflow.
10140        (WebKit::WebEditorClient::checkGrammarOfString):
10141        Ditto.
10142
101432011-04-07  Jessie Berlin  <jberlin@apple.com>
10144
10145        Reviewed by Brian Weinstein.
10146
10147        WebKit2: Implement TextChecker on Windows
10148        https://bugs.webkit.org/show_bug.cgi?id=57862
10149
10150        Part 4: Implement checkGrammarOfString.
10151
10152        * Scripts/webkit2/messages.py:
10153        The generated files should include TextCheckerClient.h for WebCore::GrammarDetail.
10154
10155        * Shared/API/c/win/WKBaseWin.h:
10156        * Shared/APIObject.h:
10157        * UIProcess/API/C/win/WKAPICastWin.h:
10158
10159        * UIProcess/API/C/win/WKGrammarDetail.cpp: Added.
10160        (WKGrammarDetailGetTypeID):
10161        (WKGrammarDetailCreate):
10162        * UIProcess/API/C/win/WKGrammarDetail.h: Added.
10163
10164        * UIProcess/API/C/win/WKTextChecker.h:
10165        Add the checkGrammarOfString WKTextCheckerClient function.
10166
10167        * UIProcess/WebPageProxy.cpp:
10168        (WebKit::WebPageProxy::checkGrammarOfString):
10169        * UIProcess/WebPageProxy.h:
10170        * UIProcess/WebPageProxy.messages.in:
10171
10172        * UIProcess/TextChecker.h:
10173        * UIProcess/win/TextCheckerWin.cpp:
10174        (WebKit::TextChecker::checkGrammarOfString):
10175        Call the TextCheckerClient.
10176        * UIProcess/mac/TextCheckerMac.mm:
10177        (WebKit::TextChecker::checkSpellingOfString):
10178        Add a comment about this not being used on Mac.
10179        (WebKit::TextChecker::checkGrammarOfString):
10180        Ditto, and call notImplemented.
10181        * UIProcess/gtk/TextCheckerGtk.cpp:
10182        (WebKit::TextChecker::checkGrammarOfString):
10183        Call notImplemented.
10184        * UIProcess/qt/TextCheckerQt.cpp:
10185        (WebKit::TextChecker::checkGrammarOfString):
10186        Ditto.
10187
10188        * UIProcess/win/WebGrammarDetail.cpp: Added.
10189        (WebKit::WebGrammarDetail::create):
10190        (WebKit::WebGrammarDetail::WebGrammarDetail):
10191        Initialize the underlying WebCore::GrammarDetail.
10192        * UIProcess/win/WebGrammarDetail.h: Added.
10193        (WebKit::WebGrammarDetail::grammarDetail):
10194        (WebKit::WebGrammarDetail::type):
10195
10196        * UIProcess/win/WebTextCheckerClient.cpp:
10197        (WebKit::WebTextCheckerClient::checkGrammarOfString):
10198        Populate the Vector of WebCore::GrammarDetails with the WebGrammarDetails.
10199        * UIProcess/win/WebTextCheckerClient.h:
10200
10201        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
10202        (WebKit::WebEditorClient::checkSpellingOfString):
10203        Use WTF::notFound as the initial value for resultLocation.
10204        (WebKit::WebEditorClient::checkGrammarOfString):
10205        Send a sync message to the UI Process (similar to checkSpellingOfString and checkTextOfParagraph).
10206
10207        * win/WebKit2.vcproj:
10208        Add WKGrammarDetail.h/.cpp and WebGrammarDetail.h/.cpp.
10209        * win/WebKit2Generated.make:
10210        Copy over WKGrammarDetail.h.
10211
102122011-04-07  Enrica Casucci  <enrica@apple.com>
10213
10214        Reviewed by Oliver Hunt.
10215
10216        REGRESSION(WebKit2): execCommand('undo') doesn't work (Windows).
10217        https://bugs.webkit.org/show_bug.cgi?id=58056
10218        <rdar://problem/8862023>
10219        
10220        Adding support for execCommand('undo') and execCommand('redo')
10221        in WebKit2 for Windows.
10222
10223        * UIProcess/API/C/win/WKView.h:
10224        * UIProcess/win/WebUndoClient.cpp:
10225        (WebKit::WebUndoClient::canUndoRedo):
10226        (WebKit::WebUndoClient::executeUndoRedo):
10227        * UIProcess/win/WebUndoClient.h:
10228        * UIProcess/win/WebView.cpp:
10229        (WebKit::WebView::canUndoRedo):
10230        (WebKit::WebView::executeUndoRedo):
10231
102322011-04-07  Andrew Scherkus  <scherkus@chromium.org>
10233
10234        Revert ENABLE_TRACK patch due to compile failures.
10235
10236        * Configurations/FeatureDefines.xcconfig:
10237
102382011-04-07  Martin Robinson  <mrobinson@igalia.com>
10239
10240        Fix the WebKit2 GTK+ build for older versions of GTK+.
10241
10242        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Include the GtkVersioning.h header.
10243
102442011-04-07   Amruth Raj  <amruthraj@motorola.com> and Martin Robinson  <mrobinson@igalia.com>
10245
10246        Reviewed by Kenneth Rohde Christiansen.
10247
10248        [GTK] Implement SharedMemory for WebKit2
10249        https://bugs.webkit.org/show_bug.cgi?id=49791
10250
10251        Share the SharedMemory, Attachment and Connection implementations with the Qt port.
10252        Both implementation are, in fact, general Unix implementations using standard Unix
10253        domain sockets and sendmsg / recvmsg. This should reduce the amount of duplicated code
10254        greatly and lay the groundwork for GTK+/Qt implementations for other operating systems.
10255
10256        * GNUmakefile.am: Replaced GTK+ versions of files with the Unix ones.
10257        * Platform/CoreIPC/ArgumentDecoder.cpp: Extended Qt #ifdefs to include GTK.
10258        (CoreIPC::ArgumentDecoder::~ArgumentDecoder):
10259        * Platform/CoreIPC/ArgumentEncoder.cpp: Ditto.
10260        (CoreIPC::ArgumentEncoder::~ArgumentEncoder):
10261        * Platform/CoreIPC/Attachment.h: Ditto.
10262        * Platform/CoreIPC/Connection.h: Combined the GTK+ and Qt sections.
10263        * Platform/CoreIPC/unix/AttachmentUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/qt/AttachmentQt.cpp.
10264        * Platform/CoreIPC/unix/ConnectionUnix.cpp: Renamed from Source/WebKit2/Platform/CoreIPC/qt/ConnectionQt.cpp.
10265        * Platform/unix/SharedMemoryUnix.cpp: Renamed from Source/WebKit2/Platform/qt/SharedMemoryQt.cpp.
10266        * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
10267        (WebKit::ProcessLauncher::launchProcess): Use SOCK_DGRAM instead of SOCK_STREAM to match Qt.
10268        * WebKit2.pro: Updated source list to reflect file renaming.
10269
102702011-04-07  Alexey Proskuryakov  <ap@apple.com>
10271
10272        Reviewed by Brian Weinstein.
10273
10274        REGRESSION (r83081): Use of deallocated memory in WebEditorClient::respondToChangedSelection()
10275        https://bugs.webkit.org/show_bug.cgi?id=58082
10276
10277        * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection):
10278        Now that the Range is used outside the full expression where it's created, it needs to be
10279        protected with RefPtr.
10280
102812011-04-07  Mark Rowe  <mrowe@apple.com>
10282
10283        Reviewed by Dan Bernstein.
10284
10285        <rdar://problem/9251566> WebBackForwardList::createCFDictionaryRepresentation's current item index
10286        doesn't account for items removed by filter callback.
10287
10288        * UIProcess/cf/WebBackForwardListCF.cpp:
10289        (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Update the current item index
10290        when we omit an item due to the filter callback.
10291
102922011-04-07  Alexey Proskuryakov  <ap@apple.com>
10293
10294        Reviewed by Anders Carlsson.
10295
10296        REGRESSION (WebKit2): Reverse conversion doesn't work in Kotoeri
10297        https://bugs.webkit.org/show_bug.cgi?id=58066
10298        <rdar://problem/8965302>
10299
10300        * Scripts/webkit2/messages.py:
10301        * Shared/mac/AttributedString.h: Added.
10302        * Shared/mac/AttributedString.mm: Added.
10303        (WebKit::AttributedString::encode):
10304        (WebKit::AttributedString::decode):
10305        Added an class that wraps NSAttributedString. As far as I can tell, one can't pass a CF
10306        or NS object to another process without wrapping it in a C++ one.
10307        
10308        * Shared/mac/ArgumentCodersMac.h: Added.
10309        * Shared/mac/ArgumentCodersMac.mm: Added.
10310        Added coders for Foundation objects, similar to ArgumentCodersCF. There are two reasons why
10311        these are needed:
10312        1) Even though most Foundation objects are toll free bridged with CF, CFGetTypeID() doesn't
10313        work properly for them (I've been just getting 1).
10314        2) NSColor isn't toll free bridged to CF.
10315        This adds just the types necessary for editing NSAttributedString (and I don't yet know what
10316        happens with attachments).
10317
10318        * UIProcess/API/mac/WKView.mm: (-[WKView attributedSubstringFromRange:]):
10319        * UIProcess/WebPageProxy.h:
10320        * UIProcess/mac/WebPageProxyMac.mm:
10321        (WebKit::WebPageProxy::getAttributedSubstringFromRange):
10322        * WebKit2.xcodeproj/project.pbxproj:
10323        * WebProcess/WebPage/WebPage.h:
10324        * WebProcess/WebPage/WebPage.messages.in:
10325        Boilerplate code for making a sync call to web process.
10326
10327        * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getAttributedSubstringFromRange):
10328        Ported from WebHTMLView.
10329
103302011-04-07  Jeff Miller  <jeffm@apple.com>
10331
10332        Mac build fix.
10333
10334        * Shared/WebString.h:
10335        (WebKit::WebString::getCharacters): Add explict cast when using std::min().
10336
103372011-04-07  Jeff Miller  <jeffm@apple.com>
10338
10339        Reviewed by Adam Roben.
10340
10341        Replace WKStringGetCharactersPtr() with WKStringGetCharacters()
10342        https://bugs.webkit.org/show_bug.cgi?id=58058
10343        
10344        WKStringGetCharactersPtr() exposes the internal implementation of WKString, so change this to WKStringGetCharacters(), which makes a UTF-16 copy.
10345
10346        * Shared/API/c/WKString.cpp:
10347        (WKStringGetCharacters): Added, replaces WKStringGetCharactersPtr().
10348        * Shared/API/c/WKString.h: Replaced WKStringGetCharactersPtr() with WKStringGetCharacters().
10349        * Shared/WebString.h:
10350        (WebKit::WebString::getCharacters): Added.
10351
103522011-04-07  Brian Weinstein  <bweinstein@apple.com>
10353
10354        Reviewed by Adam Roben.
10355
10356        WebKit2: Support window bounce when panning.
10357        https://bugs.webkit.org/show_bug.cgi?id=58065
10358        <rdar://problem/9244367>
10359        
10360        Make gestureDidScroll synchronous, as once we scroll, we need to know
10361        whether or not we are at the beginning or end of the scrollable document.
10362        
10363        If we are at either end of the scrollable document, we call the Windows 7
10364        API to bounce the window to give an indication that you are past an end
10365        of the document.
10366
10367        * UIProcess/WebPageProxy.cpp:
10368        (WebKit::WebPageProxy::gestureDidScroll): Pass a boolean for the reply, and return it.
10369        * UIProcess/WebPageProxy.h:
10370        * UIProcess/win/WebView.cpp:
10371        (WebKit::WebView::WebView): Inititalize a new variable.
10372        (WebKit::WebView::onGesture): Once we send the message to scroll, check if have gone to
10373            an end of the document, and if we have, bounce the window.
10374        * UIProcess/win/WebView.h:
10375        * WebProcess/WebPage/WebPage.h:
10376        * WebProcess/WebPage/WebPage.messages.in: GestureDidScroll is now sync.
10377        * WebProcess/WebPage/win/WebPageWin.cpp:
10378        (WebKit::WebPage::gestureDidScroll): When we are done scrolling, check if we have a vertical
10379            scrollbar and if we are at the beginning or the end of the scrollable document.
10380
103812011-04-07  Chang Shu  <cshu@webkit.org>
10382
10383        Reviewed by Darin Adler.
10384
10385        WebKitTestRunner needs layoutTestController.isPageBoxVisible
10386        https://bugs.webkit.org/show_bug.cgi?id=42695
10387
10388        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
10389        (WKBundleIsPageBoxVisible):
10390        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
10391        * WebProcess/InjectedBundle/InjectedBundle.cpp:
10392        (WebKit::InjectedBundle::isPageBoxVisible):
10393        * WebProcess/InjectedBundle/InjectedBundle.h:
10394
103952011-04-07  Enrica Casucci  <enrica@apple.com>
10396
10397        Reviewed by Oliver Hunt.
10398
10399        REGRESSION(WebKit2): execCommand('undo') doesn't work (Mac).
10400        https://bugs.webkit.org/show_bug.cgi?id=58055
10401        <rdar://problem/8862023>
10402        
10403        Adding support for execCommand('undo') and execCommand('redo')
10404        in WebKit2 for Mac.
10405
10406        * UIProcess/API/mac/PageClientImpl.h:
10407        * UIProcess/API/mac/PageClientImpl.mm:
10408        (WebKit::PageClientImpl::canUndoRedo): Added interaction with undomanager.
10409        (WebKit::PageClientImpl::executeUndoRedo): Added interaction with undomanager.
10410        
10411        Added new empty PageClient methods for other platforms.
10412        * UIProcess/API/qt/qwkpage.cpp:
10413        (QWKPagePrivate::canUndoRedo):
10414        (QWKPagePrivate::executeUndoRedo):
10415        * UIProcess/API/qt/qwkpage_p.h:
10416        * UIProcess/PageClient.h:
10417        * UIProcess/gtk/WebView.cpp:
10418        (WebKit::WebView::canUndoRedo):
10419        (WebKit::WebView::executeUndoRedo):
10420        * UIProcess/gtk/WebView.h:
10421        * UIProcess/win/WebView.cpp:
10422        (WebKit::WebView::canUndoRedo):
10423        (WebKit::WebView::executeUndoRedo):
10424        * UIProcess/win/WebView.h:
10425
10426        * UIProcess/WebEditCommandProxy.cpp:
10427        (WebKit::WebEditCommandProxy::unapply): Added flag to allow dispatching
10428        of asychronous messages while waiting for a sync message reply.
10429        (WebKit::WebEditCommandProxy::reapply): Same as above.
10430        * UIProcess/WebPageProxy.cpp:
10431        (WebKit::WebPageProxy::canUndoRedo):
10432        (WebKit::WebPageProxy::executeUndoRedo):
10433        * UIProcess/WebPageProxy.h:
10434        * UIProcess/WebPageProxy.messages.in:
10435        * WebProcess/WebCoreSupport/WebEditorClient.cpp: Added missing implementation.
10436        (WebKit::WebEditorClient::canUndo):
10437        (WebKit::WebEditorClient::canRedo):
10438        (WebKit::WebEditorClient::undo):
10439        (WebKit::WebEditorClient::redo):
10440
104412011-04-07  Brady Eidson  <beidson@apple.com>
10442
10443        Reviewed by Maciej Stachowiak.
10444
10445        <rdar://problem/9250368> and https://bugs.webkit.org/show_bug.cgi?id=58062
10446
10447        * UIProcess/API/C/WKIconDatabase.cpp:
10448        (WKIconDatabaseClose):
10449        * UIProcess/API/C/WKIconDatabase.h:
10450        
10451        * UIProcess/WebIconDatabase.cpp:
10452        (WebKit::WebIconDatabase::close):
10453        * UIProcess/WebIconDatabase.h:
10454
104552011-04-07  Jessie Berlin  <jberlin@apple.com>
10456
10457        Reviewed by Adam Roben.
10458
10459        WebKit2: Implement TextChecker on Windows
10460        https://bugs.webkit.org/show_bug.cgi?id=57862
10461 
10462        Part 3: Implement checkSpellingOfString
10463
10464        In WebCore, checkTextOfParagraph is only defined and used on platforms where
10465        WTF_USE_UNIFIED_TEXT_CHECKING is defined (which right now is only non-Leopard and non-Tiger
10466        Mac builds).
10467 
10468        On other platforms, checkSpellingOfString and checkGrammarOfString (coming in a separate
10469        patch in an attempt to keep things easier to review) are used.
10470
10471        * UIProcess/API/C/win/WKTextChecker.h:
10472        * UIProcess/TextChecker.h:
10473        Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
10474        checkSpellingOfString.
10475
10476        * UIProcess/WebPageProxy.cpp:
10477        (WebKit::WebPageProxy::checkTextOfParagraph):
10478        Surround this by #if USE(UNIFIED_TEXT_CHECKING).
10479        (WebKit::WebPageProxy::checkSpellingOfString):
10480        Call through to the client.
10481        * UIProcess/WebPageProxy.h:
10482        * UIProcess/WebPageProxy.messages.in:
10483        Surround checkTextOfParagraph by #if USE(UNIFIED_TEXT_CHECKING) and add
10484        checkSpellingOfString.
10485
10486        * UIProcess/win/TextCheckerWin.cpp:
10487        (WebKit::TextChecker::checkSpellingOfString):
10488        Call through to the WebTextCheckerClient.
10489        * UIProcess/mac/TextCheckerMac.mm:
10490        (WebKit::TextChecker::checkTextOfParagraph):
10491        Surround this by #if USE(UNIFIED_TEXT_CHECKING) for clarity.
10492        (WebKit::TextChecker::checkSpellingOfString):
10493        Add a call to notImplemented.
10494        * UIProcess/qt/TextCheckerQt.cpp:
10495        (WebKit::TextChecker::checkSpellingOfString):
10496        Ditto, and remove the implementation for checkTextOfParagraph.
10497        * UIProcess/gtk/TextCheckerGtk.cpp:
10498        (WebKit::TextChecker::checkSpellingOfString):
10499        Ditto.
10500
10501        * UIProcess/win/WebTextCheckerClient.cpp:
10502        (WebKit::WebTextCheckerClient::checkSpellingOfString):
10503        * UIProcess/win/WebTextCheckerClient.h:
10504
10505        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
10506        (WebKit::WebEditorClient::checkSpellingOfString):
10507        Send a sync message to the UI Process (similar to the sync message used for
10508        checkTextOfParagraph).
10509
105102011-04-07  Siddharth Mathur  <siddharth.mathur@nokia.com>
10511
10512        Reviewed by Laszlo Gombos.
10513
10514        [Qt][WK2][Symbian] Temporary build fix until native Symbian IPC is done. Implement fake socketpair() as it's not available. 
10515        https://bugs.webkit.org/show_bug.cgi?id=57877
10516
10517        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
10518        (WebKit::socketpair): socketpair() which returns -1
10519
105202011-04-07  Michael Saboff  <msaboff@apple.com>
10521
10522        Reviewed by Maciej Stachowiak.
10523
10524        WebKit2: Memory leak in decodeResourceError
10525        https://bugs.webkit.org/show_bug.cgi?id=58004
10526
10527        Release the local NSError after it is used to create a ResourceError
10528        object assigned to the reference argument.
10529
10530        * Shared/mac/WebCoreArgumentCodersMac.mm:
10531        (CoreIPC::decodeResourceError):
10532
105332011-04-07  Maciej Stachowiak  <mjs@apple.com>
10534
10535        Reviewed by Adam Barth.
10536
10537        Remove temporary WebProcess sandbox rules that are unnecessary now that plugins are in their own process
10538        https://bugs.webkit.org/show_bug.cgi?id=58023
10539
10540        * WebProcess/com.apple.WebProcess.sb:
10541
105422011-04-07  Maciej Stachowiak  <mjs@apple.com>
10543
10544        Reviewed by Dan Bernstein.
10545
10546        Remove some no longer needed WebProcess sandbox allowances
10547        https://bugs.webkit.org/show_bug.cgi?id=58015
10548        <rdar://problem/9232592>
10549
10550        * WebProcess/com.apple.WebProcess.sb: Remove no-longer needed extra network
10551        and launching privileges, since the bugs that required them are fixed.
10552
105532011-04-06  Chang Shu  <cshu@webkit.org>
10554
10555        Reviewed by Darin Adler.
10556
10557        WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
10558        https://bugs.webkit.org/show_bug.cgi?id=57984
10559
10560        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
10561        (WKBundlePageSizeAndMarginsInPixels):
10562        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
10563        * WebProcess/InjectedBundle/InjectedBundle.cpp:
10564        (WebKit::InjectedBundle::pageSizeAndMarginsInPixels):
10565        * WebProcess/InjectedBundle/InjectedBundle.h:
10566
105672011-04-06  Siddharth Mathur  <siddharth.mathur@nokia.com>
10568
10569        Reviewed by Benjamin Poulain.
10570
10571        [Qt][WK2][Symbian] Remove use of stack arrays with variable size
10572        https://bugs.webkit.org/show_bug.cgi?id=57877
10573        
10574        For better compiler portability, use new/delete for arrays when size
10575        isn't known at compile time. Also fix one compiler warning about bitshift
10576        operations on signed integers. 
10577        * Platform/CoreIPC/qt/ConnectionQt.cpp: 
10578        (CoreIPC::Connection::readyReadHandler): 
10579        (CoreIPC::Connection::sendOutgoingMessage):
10580
105812011-04-06  Brian Weinstein  <bweinstein@apple.com>
10582
10583        Reviewed by Adam Roben.
10584
10585        WebKit2: Support Windows 7 Gestures
10586        https://bugs.webkit.org/show_bug.cgi?id=49824
10587        <rdar://problem/8689728>
10588        
10589        Port code from WebKit1 -> WebKit2 to handle Windows 7 gestures.
10590        
10591        The UIProcess gets a WM_GESTURENOTIFY message, it sends a sync message to the WebProcess to ask
10592        if we should allow panning. The WebProcess checks if we're in a scrollable area, and the mouse
10593        isn't over a scrollbar.
10594
10595        The UIProcess then gets a WM_GESTURE message, and if it is a pan gesture, it sends a message to
10596        the WebProcess to scroll by the amount fingers have moved since the last WM_GESTURE messeage. The
10597        X and Y are reversed because panning up -> moving the page down, and vice versa.
10598
10599        * UIProcess/WebPageProxy.cpp:
10600        (WebKit::WebPageProxy::gestureWillBegin): Send a sync message to the WebProcess
10601            to initialize the gesture. The WebProcess returns whether or not we can start a pan
10602            gesture from where we are.
10603        (WebKit::WebPageProxy::gestureDidScroll): Send a message to the WebProcess to scroll by
10604            pan gesture.
10605        (WebKit::WebPageProxy::gestureDidEnd): Send a message to the WebProcess that the gesture has ended.
10606        * UIProcess/WebPageProxy.h:
10607        * UIProcess/win/WebView.cpp:
10608        (WebKit::WebView::wndProc): Add WM_GESTURE and WM_GESTURENOTIFY handlers.
10609        (WebKit::WebView::WebView): Initialize two new variables.
10610        (WebKit::WebView::onGestureNotify): Figure out which gestures we should support based on where
10611            the gesture is beginning.
10612        (WebKit::WebView::onGesture): Support starting a gesture, ending a gesture, and panning.
10613        * UIProcess/win/WebView.h:
10614        * WebProcess/WebPage/WebPage.h:
10615        * WebProcess/WebPage/WebPage.messages.in: Add messages needed for gestures.
10616        * WebProcess/WebPage/win/WebPageWin.cpp:
10617        (WebKit::WebPage::gestureWillBegin): Set the node that the gesture started on (so we 
10618            know which layer to scroll if the user pans), and determine whether or not we should allow
10619            panning. If the page can't scroll, or the user is on a scrollbar, disallow panning.
10620        (WebKit::WebPage::gestureDidScroll): Scroll the enclosing layer of the element the gesture
10621            started on.
10622        (WebKit::WebPage::gestureDidEnd): Clear the node the gesture started on.
10623
106242011-04-06  Jeff Miller  <jeffm@apple.com>
10625
10626        Reviewed by Adam Roben.
10627
10628        Add WKStringGetCharactersPtr() and WKStringGetLength() to WebKit2 C API
10629        https://bugs.webkit.org/show_bug.cgi?id=57989
10630        
10631        Note that WKChar, which is returned by WKStringGetCharactersPtr(), is defined the same way we define JSChar in JSStringRef.h.
10632
10633        * Shared/API/c/WKString.cpp:
10634        (WKStringGetLength): Added.
10635        (WKStringGetCharactersPtr): Added.
10636        * Shared/API/c/WKString.h: Define WKChar and added WKStringGetLength() and WKStringGetCharactersPtr().
10637        * Shared/WebString.h:
10638        (WebKit::WebString::length): Added.
10639        (WebKit::WebString::characters): Added.
10640
106412011-04-06  Anders Carlsson  <andersca@apple.com>
10642
10643        Reviewed by Oliver Hunt.
10644
10645        Dock stays in front of Hulu.com full screen video output
10646        https://bugs.webkit.org/show_bug.cgi?id=57988
10647        <rdar://problem/9216260>
10648
10649        Instead of using -[NSMenu setMenuBarVisible:] to toggle full screen, use
10650        -[NSApp setPresentationOptions:]. Also, make the UI process the front most app before
10651        setting the presentation options when exiting full screen, otherwise the dock won't
10652        be restored correctly.
10653
10654        * PluginProcess/mac/PluginProcessShim.mm:
10655        Remove some shim functions that aren't needed.
10656
10657        * UIProcess/Plugins/PluginProcessProxy.cpp:
10658        (WebKit::PluginProcessProxy::PluginProcessProxy):
10659        Initialize m_preFullscreenAppPresentationOptions.
10660
10661        * UIProcess/Plugins/PluginProcessProxy.h:
10662        Add m_preFullscreenAppPresentationOptions.
10663
10664        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
10665        (WebKit::PluginProcessProxy::enterFullscreen):
10666        Change the presentation options for the app.
10667
10668        (WebKit::PluginProcessProxy::exitFullscreen):
10669        Restore the presentation options.
10670
106712011-04-06  Mark Rowe  <mrowe@apple.com>
10672
10673        Reviewed by Darin Adler.
10674
10675        Expose the original URL of a WKBackForwardListItem.
10676
10677        Needed for <rdar://problem/9074651>.
10678
10679        * UIProcess/API/C/WKBackForwardListItem.cpp:
10680        (WKBackForwardListItemCopyOriginalURL):
10681        * UIProcess/API/C/WKBackForwardListItem.h:
10682
106832011-04-06  Brady Eidson  <beidson@apple.com>
10684
10685        Reviewed by Anders Carlsson.
10686
10687        https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
10688        WK2 icon database should be able to get a CGImage of a specific size
10689
10690        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
10691        (WKIconDatabaseTryGetCGImageForURL): Change this API to take a requested size, and find the first matching
10692          CGImage in the icon.
10693        * UIProcess/API/C/cg/WKIconDatabaseCG.h:
10694
106952011-04-06  Jessie Berlin  <jberlin@apple.com>
10696
10697        Reviewed by Anders Carlsson.
10698
10699        WebKit2: Implement TextChecker on Windows
10700        https://bugs.webkit.org/show_bug.cgi?id=57862
10701
10702        Part 2: Implement uniqueSpellDocumentTag and closeSpellDocumentWithTag.
10703
10704        * UIProcess/API/C/win/WKTextChecker.h:
10705        * UIProcess/win/TextCheckerWin.cpp:
10706        (WebKit::TextChecker::uniqueSpellDocumentTag):
10707        (WebKit::TextChecker::closeSpellDocumentWithTag):
10708        * UIProcess/win/WebTextCheckerClient.cpp:
10709        (WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
10710        (WebKit::WebTextCheckerClient::closeSpellDocumentWithTag):
10711        * UIProcess/win/WebTextCheckerClient.h:
10712
107132011-04-06  Robert Sesek  <rsesek@chromium.org>
10714
10715        Reviewed by Alexey Proskuryakov.
10716
10717        Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
10718        https://bugs.webkit.org/show_bug.cgi?id=54969
10719
10720        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
10721        (WebKit::WebEditorClient::respondToChangedSelection): Moved duplicated code to WebCore
10722        * WebProcess/WebPage/mac/WebPageMac.mm: Moved duplicated code to WebCore
10723        (WebKit::WebPage::getMarkedRange):
10724        (WebKit::WebPage::getSelectedRange):
10725        (WebKit::WebPage::characterIndexForPoint):
10726        (WebKit::WebPage::performDictionaryLookupAtLocation):
10727
107282011-04-06  Chang Shu  <cshu@webkit.org>
10729
10730        Reviewed by Darin Adler.
10731
10732        WebKitTestRunner needs layoutTestController.pageNumberForElementById
10733        https://bugs.webkit.org/show_bug.cgi?id=42329
10734
10735        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
10736        (WKBundlePageNumberForElementById):
10737        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
10738        * WebProcess/InjectedBundle/InjectedBundle.cpp:
10739        (WebKit::InjectedBundle::pageNumberForElementById):
10740        * WebProcess/InjectedBundle/InjectedBundle.h:
10741
107422011-04-05  Enrica Casucci  <enrica@apple.com>
10743
10744        Reviewed by Darin Adler.
10745
10746        REGRESSION: Drag & Drop Gmail Attachments doesn't work.
10747        https://bugs.webkit.org/show_bug.cgi?id=57909
10748        <rdar://problem/9103220>
10749
10750        Added _hitTest method to support drag and drop when the drag types cannot be matched.
10751        This is the case for elements that do not place content
10752        in the drag pasteboard automatically when the drag start (i.e. dragging a DIV element).
10753               
10754        * UIProcess/API/mac/WKView.mm:
10755        (-[WKView _hitTest:dragTypes:]): Added.
10756
107572011-04-06  Csaba Osztrogonác  <ossy@webkit.org>
10758
10759        Reviewed by Darin Adler.
10760
10761        Fix using UNUSED_PARAM introduced in r82907
10762        https://bugs.webkit.org/show_bug.cgi?id=57940
10763
10764        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
10765        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
10766
107672011-04-06  Jessie Berlin  <jberlin@apple.com>
10768
10769        Reviewed by Anders Carlsson.
10770
10771        WebKit2: Implement TextChecker on Windows
10772        https://bugs.webkit.org/show_bug.cgi?id=57862
10773
10774        Part 1: Get and set the state.
10775
10776        * Shared/API/c/win/WKBaseWin.h:
10777        * Shared/APIObject.h:
10778        * UIProcess/API/C/win/WKAPICastWin.h:
10779 
10780        * UIProcess/API/C/win/WKTextChecker.cpp: Added.
10781        (WKTextCheckerSetClient):
10782        (WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
10783        (WKTextCheckerGrammarCheckingEnabledStateChanged):
10784        * UIProcess/API/C/win/WKTextChecker.h: Added.
10785 
10786        * UIProcess/TextChecker.h:
10787        * UIProcess/win/TextCheckerWin.cpp:
10788        (WebKit::TextChecker::state):
10789        Do the initalization for the state only once so that it is not necessary to call the client
10790        every time the state is requested.
10791        (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
10792        Call the client.
10793        (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
10794        Update the state and tell the client.
10795        (WebKit::TextChecker::setGrammarCheckingEnabled):
10796        Ditto.
10797        (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
10798        Update the state.
10799        (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
10800        Update the state.
10801
10802        * UIProcess/win/WebTextChecker.cpp: Added.
10803        (WebKit::WebTextChecker::shared):
10804        Make the WebTextChecker available globally.
10805        (WebKit::WebTextChecker::WebTextChecker):
10806        (WebKit::WebTextChecker::setClient):
10807        (WebKit::updateStateForAllWebProcesses):
10808        (WebKit::WebTextChecker::continuousSpellCheckingEnabledStateChanged):
10809        Tell the TextChecker that the state has changed, and then tell the
10810        WebProcessProxies to send the new state to the WebProcesses.
10811        (WebKit::WebTextChecker::grammarCheckingEnabledStateChanged):
10812        Ditto.
10813        * UIProcess/win/WebTextChecker.h: Added.
10814        (WebKit::WebTextChecker::client):
10815        (WebKit::WebTextChecker::type):
10816
10817        * UIProcess/win/WebTextCheckerClient.cpp: Added.
10818        (WebKit::WebTextCheckerClient::continuousSpellCheckingAllowed):
10819        (WebKit::WebTextCheckerClient::continuousSpellCheckingEnabled):
10820        (WebKit::WebTextCheckerClient::setContinuousSpellCheckingEnabled):
10821        (WebKit::WebTextCheckerClient::grammarCheckingEnabled):
10822        (WebKit::WebTextCheckerClient::setGrammarCheckingEnabled):
10823        * UIProcess/win/WebTextCheckerClient.h: Added.
10824 
10825        * win/WebKit2.vcproj:
10826        Add WKTextChecker.h/.cpp, WebTextChecker.h/.cpp, and WebTextCheckerClient.h/.cpp.
10827        * win/WebKit2Generated.make:
10828        Copy over WKTextChecker.h.
10829
108302011-04-05  Chang Shu  <cshu@webkit.org>
10831
10832        Reviewed by Darin Adler.
10833
10834        WebKitTestRunner needs layoutTestController.numberOfPages
10835        https://bugs.webkit.org/show_bug.cgi?id=42694
10836
10837        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
10838        (WKBundleNumberOfPages):
10839        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
10840        * WebProcess/InjectedBundle/InjectedBundle.cpp:
10841        (WebKit::InjectedBundle::numberOfPages):
10842        * WebProcess/InjectedBundle/InjectedBundle.h:
10843
108442011-04-05  Darin Adler  <darin@apple.com>
10845
10846        Reviewed by Alexey Proskuryakov.
10847
10848        [Mac] WebKit2: Escape key does not stop page loads when focus is on the web page
10849        https://bugs.webkit.org/show_bug.cgi?id=57893
10850        <rdar://problem/9130486>
10851
10852        * UIProcess/API/mac/PageClientImpl.h: Added executeSavedCommandBySelector.
10853        * UIProcess/API/mac/PageClientImpl.mm: Renamed internal Objective-C classes to use
10854        the WebKit2 Objective-C class prefix, WK, rather than the WebKit1 Objective-C class
10855        prefix, Web. Removed some unneeded explicit WebKit namespace prefixes.
10856        (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Removed unneeded WebKit
10857        namespace prefix.
10858        (-[WKEditCommandObjC command]): Ditto.
10859        (-[WKEditorUndoTargetObjC undoEditing:]): Updated for new class name.
10860        (-[WKEditorUndoTargetObjC redoEditing:]): Ditto.
10861        (WebKit::PageClientImpl::PageClientImpl): Ditto.
10862        (WebKit::PageClientImpl::registerEditCommand): Ditto.
10863        (WebKit::PageClientImpl::executeSavedCommandBySelector): Added.
10864
10865        * UIProcess/API/mac/WKView.mm: Renamed internal Objective-C categories to use the
10866        WebKit2 Objective-C prefix, WK, rather than the WebKit1 Objective-C prefix, Web,
10867        or no prefix at all. Tweaked use of extern "C" a little.
10868        (-[WKView doCommandBySelector:]): Tweaked the comment.
10869        (-[WKView _executeSavedCommandBySelector:]): Added. For use when command is not handled
10870        by WebCore.
10871        (-[WKResponderChainSink initWithResponderChain:]): Added. Based on the
10872        WebResponderChainSink class in WebKit1.
10873        (-[WKResponderChainSink detach]): Added.
10874        (-[WKResponderChainSink didReceiveUnhandledCommand]): Added.
10875        (-[WKResponderChainSink noResponderFor:]): Added.
10876        (-[WKResponderChainSink doCommandBySelector:]): Added.
10877        (-[WKResponderChainSink tryToPerform:with:]): Added.
10878
10879        * UIProcess/API/mac/WKViewInternal.h: Added declaration of _executeSavedCommandBySelector:
10880        method. Also removed unneeded includes.
10881
10882        * UIProcess/PageClient.h: Added executeSavedCommandBySelector.
10883        * UIProcess/WebPageProxy.h: Added executeSavedCommandBySelector.
10884        * UIProcess/WebPageProxy.messages.in: Added ExecuteSavedCommandBySelector.
10885
10886        * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Updated includes.
10887
10888        * UIProcess/mac/WebPageProxyMac.mm:
10889        (WebKit::WebPageProxy::executeSavedCommandBySelector): Added.
10890
10891        * WebProcess/WebPage/mac/WebPageMac.mm:
10892        (WebKit::WebPage::executeKeypressCommandsInternal): Send the synchronous
10893        ExecuteSavedCommandBySelector message when a command is not handled by WebCore.
10894
108952011-04-05  Anders Carlsson  <andersca@apple.com>
10896
10897        Reviewed by Alexey Proskuryakov.
10898
10899        Some plug-in content is displayed upside down in Unity plug-in
10900        https://bugs.webkit.org/show_bug.cgi?id=57895
10901        <rdar://problem/9212003>
10902
10903        Create the flipped geometry layer in the web process instead of the plug-in process,
10904        which matches what we do in WebKit1.
10905
10906        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
10907        (WebKit::NetscapePlugin::platformPostInitialize):
10908        * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
10909        (WebKit::PluginProxy::pluginLayer):
10910
109112011-04-05  Anders Carlsson  <andersca@apple.com>
10912
10913        Reviewed by Darin Adler.
10914
10915        Assertion failure when navigating quickly between file URLs
10916        https://bugs.webkit.org/show_bug.cgi?id=57884
10917        <rdar://problem/9080559>
10918
10919        Remove bogus assertion. The pending provisional sandbox extension can be
10920        non-null if the current provisional load fails because we're about to load a new
10921        page that also has a sandbox extension.
10922
10923        * WebProcess/WebPage/WebPage.cpp:
10924        (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
10925
109262011-04-05  Anders Carlsson  <andersca@apple.com>
10927
10928        Reviewed by Adam Roben.
10929
10930        Grant the web process access to ~/Library/Preferences/com.apple.universalaccess.plist
10931        https://bugs.webkit.org/show_bug.cgi?id=57879
10932
10933        The web process needs access to the unviersal access preferences to determine if full keyboard
10934        access is enabled. I've filed <rdar://problem/9237619> which tracks reading this preference in the UI
10935        process and sending it over to the web process whenever it changes.
10936
10937        * WebProcess/com.apple.WebProcess.sb:
10938
109392011-04-05  Dean Jackson  <dino@apple.com>
10940
10941        Reviewed by Simon Fraser.
10942
10943        Add parentheses around && within || to avoid clang warning.
10944
10945        * WebProcess/WebPage/DrawingAreaImpl.cpp:
10946        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
10947
109482011-04-05  Anders Carlsson  <andersca@apple.com>
10949
10950        Reviewed by Adam Roben.
10951
10952        Add two more entries to the sandbox profile
10953        https://bugs.webkit.org/show_bug.cgi?id=57875
10954
10955        Allow read-access to /Library/Dictionaries since WebCore::nextBreakablePosition
10956        ends up calling into ICU which accesses the dictionary.
10957
10958        Allow Mach access to com.apple.networkd since it's used by CFNetwork.
10959
10960        * WebProcess/com.apple.WebProcess.sb:
10961
109622011-04-05  Anders Carlsson  <andersca@apple.com>
10963
10964        Reviewed by Oliver Hunt.
10965
10966        Invalidate callbacks if the WebPageProxy is no longer valid
10967        https://bugs.webkit.org/show_bug.cgi?id=57873
10968        <rdar://problem/9059717>
10969
10970        Audit all function calls that take callbacks and make sure to invalidate the callbacks
10971        if the web page is no longer valid.
10972
10973        * UIProcess/WebPageProxy.cpp:
10974        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
10975        (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
10976        (WebKit::WebPageProxy::getSourceForFrame):
10977        (WebKit::WebPageProxy::getContentsAsString):
10978        (WebKit::WebPageProxy::getSelectionOrContentsAsString):
10979        (WebKit::WebPageProxy::getMainResourceDataOfFrame):
10980        (WebKit::WebPageProxy::getResourceDataFromFrame):
10981        (WebKit::WebPageProxy::getWebArchiveOfFrame):
10982        (WebKit::WebPageProxy::forceRepaint):
10983        (WebKit::WebPageProxy::computePagesForPrinting):
10984        (WebKit::WebPageProxy::drawRectToPDF):
10985        (WebKit::WebPageProxy::drawPagesToPDF):
10986
109872011-04-05  Adam Roben  <aroben@apple.com>
10988
10989        Disable accelerated compositing on Windows machines that don't support it
10990
10991        This includes machines without the necessary graphics hardware, and machines without
10992        WebKitQuartzCoreAdditions (like the Windows 7 Release (WebKit2 Tests) bots).
10993
10994        Fixes <http://webkit.org/b/57870> REGRESSION (r82960): Lots of tests crashing in
10995        DrawingAreaImpl::enterAcceleratedCompositingMode on Windows 7 Release (WebKit2 Tests)
10996
10997        Reviewed by Anders Carlsson.
10998
10999        * WebProcess/WebPage/LayerTreeHost.h:
11000        (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. On platforms other than
11001        Windows, this always returns true.
11002
11003        * WebProcess/WebPage/WebPage.cpp:
11004        (WebKit::WebPage::updatePreferences): Only enable accelerated compositing-related
11005        preferences if the machine supports accelerated compositing.
11006
11007        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
11008        (WebKit::LayerTreeHostCAWin::supportsAcceleratedCompositing): Added. Creates a view, asks it
11009        if it can draw, and returns the result.
11010
11011        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added supportsAcceleratedCompositing.
11012
11013        * WebProcess/WebPage/win/LayerTreeHostWin.cpp: Added.
11014        (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. Calls through to
11015        LayerTreeHostCAWin in configurations that support that class. Otherwise just returns false.
11016
11017        * win/WebKit2.vcproj: Added LayerTreeHostWin.cpp. Let VS reorder some other files.
11018
110192011-04-05  Adam Roben  <aroben@apple.com>
11020
11021        Make accelerated compositing work in WebKit2 on Windows
11022
11023        LayerTreeHostCAWin uses WKCACFView to render each frame to an image, then has
11024        DrawingAreaImpl send that image over to the UI process (just like it does for
11025        non-accelerated rendering). It's unfortunate that this requires reading every frame back
11026        from the GPU into system memory. More efficient solutions can be explored in the future.
11027
11028        Fixes <http://webkit.org/b/45567>.
11029
11030        Reviewed by Anders Carlsson.
11031
11032        * DerivedSources.make: Added $(WebKit2) to the VPATH so that DerivedSources.make can be
11033        found when used as a target dependency. Added rules to generate a HeaderDetection.h file on
11034        Windows. If we can find WebKitQuartzCoreAdditions headers, we define HAVE_WKQCA in
11035        HeaderDetection.h.
11036
11037        * WebProcess/WebPage/DrawingAreaImpl.cpp:
11038        (WebKit::DrawingAreaImpl::setLayerHostNeedsDisplay):
11039        * WebProcess/WebPage/DrawingAreaImpl.h:
11040        Added setLayerHostNeedsDisplay. Lets the layer host tell the DrawingAreaImpl that it has a
11041        new frame to render. This should only be called by layer hosts that participate in
11042        DrawingAreaImpl's display mechanism.
11043
11044        * WebProcess/WebPage/LayerTreeHost.cpp:
11045        (WebKit::LayerTreeHost::create): Only try to instantiate LayerTreeHostCAWin if we have
11046        WebKitQuartzCoreAdditions, since it depends on that library.
11047
11048        * WebProcess/WebPage/WebPage.cpp:
11049        (WebKit::WebPage::updatePreferences): Removed code that forced accelerated compositing to be
11050        disabled on Windows.
11051
11052        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
11053        (WebKit::registerDummyWindowClass): Registers the window class we use for the dummy window.
11054        (WebKit::createDummyWindow): Creates the dummy window we pass to WKCACFView so that D3D can
11055        determine the display mode, etc. (The window is never shown on screen.)
11056        (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Initialize new members.
11057        (WebKit::LayerTreeHostCAWin::platformInitialize): Create our dummy window and view and
11058        associate the two. We set ourselves as the view's context's user data so that
11059        PlatformCALayer can get our AbstractCACFLayerTreeHost pointer as needed.
11060        (WebKit::LayerTreeHostCAWin::invalidate): Cancel any pending flushes, tear down our view,
11061        and destroy the dummy window if no other layer host is using it.
11062        (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Ask LayerChangesFlusher to call us back
11063        soon to perform the flush.
11064        (WebKit::LayerTreeHostCAWin::participatesInDisplay): Added. Returns true, since we render
11065        each frame to an image.
11066        (WebKit::LayerTreeHostCAWin::needsDisplay): Added. Returns true if it's now time to
11067        displayReturns true if it's now time to display.
11068        (WebKit::LayerTreeHostCAWin::timeUntilNextDisplay): Added. Returns how many seconds remain
11069        before we need to display again.
11070        (WebKit::size): Added. Helper function to get the size of a WKCACFImage.
11071        (WebKit::toShareableBitmap): Added. Helper function to convert a WKCACFImage to a
11072        ShareableBitmap.
11073        (WebKit::LayerTreeHostCAWin::display): Added. Renders the next frame to an image and stuffs
11074        the image into the UpdateInfo struct.
11075        (WebKit::LayerTreeHostCAWin::sizeDidChange): Added. Tells the view about the new size.
11076        (WebKit::LayerTreeHostCAWin::forceRepaint): Added. Flushes any pending changes to the view.
11077        (WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Added. WKCACFView calls this
11078        whenever any changes made to the view or its layer tree have been flushed. Just calls
11079        through to contextDidChange.
11080        (WebKit::LayerTreeHostCAWin::contextDidChange): Added. Tells layers that they've started
11081        animating, and tells the DrawingAreaImpl that we need to display again.
11082        (WebKit::LayerTreeHostCAWin::rootLayer): Added. Gets the root layer's PlatformCALayer.
11083        (WebKit::LayerTreeHostCAWin::addPendingAnimatedLayer): Added. Stores the layer so that we
11084        can tell it animations have started the next time we get a contextDidChange callback.
11085        (WebKit::LayerTreeHostCAWin::layerTreeDidChange): Added. Schedules a flush, unless we're
11086        already in the process of flushing. This code came from WebCore::WKCACFViewLayerTreeHost.
11087        (WebKit::LayerTreeHostCAWin::flushPendingLayerChangesNow): Added. Performs the flush. This
11088        code was adapted from WebCore::WKCACFViewLayerTreeHost.
11089
11090        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Wrapped this whole header in HAVE(WKQCA),
11091        since this class only works when WebKitQuartzCoreAdditions is available. Added a bunch of
11092        new members.
11093
110942011-04-04  Adam Roben  <aroben@apple.com>
11095
11096        Add a way for LayerTreeHost to participate in DrawingAreaImpl's normal display mechanism
11097
11098        When LayerTreeHost participates in display, it renders each frame into a bitmap.
11099        DrawingAreaImpl sends the bitmap to the UI process in an Update message, just like in
11100        non-accelerated compositing mode. The UI process never knows that accelerated compositing is
11101        going on. (When LayerTreeHost does not participate in display, as on Mac, it is responsible
11102        for getting bits from the web process to the UI process.)
11103
11104        No LayerTreeHost uses this mechanism (yet). This patch should cause no change in behavior.
11105
11106        Fixes <http://webkit.org/b/57792> LayerTreeHost needs a way to render frames to a bitmap
11107
11108        Reviewed by Anders Carlsson.
11109
11110        * WebProcess/WebPage/DrawingAreaImpl.cpp:
11111        (WebKit::DrawingAreaImpl::forceRepaint): If the layer tree host participates in display,
11112        perform a display (like in the non-accelerated case).
11113        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): Don't send an
11114        EnterAcceleratedCompositing message to the UI process if the layer tree host participates in
11115        display. In that case, the UI process doesn't even need to know we're using accelerated
11116        compositing in the web process.
11117        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Go through the normal display
11118        mechanism if we have a layer tree host that participates in display.
11119        (WebKit::DrawingAreaImpl::didUpdate): Don't ignore DidUpdate messages when we have a layer
11120        tree host that participates in display.
11121        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): If the new layer tree host
11122        participates in display, let the display timer continue to run and continue to expect
11123        DidUpdate messages so that we don't interrupt the normal display mechanism. We still clear
11124        out m_dirtyRegion, m_scrollRect, and m_scrollOffset, though, because the layer tree host is
11125        still responsible for keeping track of those things even when it participates in display.
11126        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): If the outgoing layer tree host
11127        was participating in display, just send another Update message instead of an
11128        ExitAcceleratedCompositing message, since the UI process never even knew we were using
11129        accelerated compositing.
11130        (WebKit::DrawingAreaImpl::displayTimerFired): If we have a layer tree host that's
11131        participating in display, ask it when it next needs to display when scheduling our timer.
11132
11133        (WebKit::DrawingAreaImpl::scheduleDisplay):
11134        (WebKit::DrawingAreaImpl::display):
11135        If we have a layer tree host that's participating in display, it will keep track of its own
11136        dirty region, so ask it if it needs display rather than checking our own dirty region.
11137
11138        (WebKit::DrawingAreaImpl::display): If we have a layer tree host that's participating in
11139        display, don't bail out. Instead, tell it to display rather than asking the page to paint.
11140        Moved the setting of updateInfo.viewSize earlier so that it will be set even when the layer
11141        tree host is displaying. Other changes are just due to indentation.
11142
11143        * WebProcess/WebPage/LayerTreeHost.h:
11144        (WebKit::LayerTreeHost::participatesInDisplay):
11145        (WebKit::LayerTreeHost::needsDisplay):
11146        (WebKit::LayerTreeHost::timeUntilNextDisplay):
11147        (WebKit::LayerTreeHost::display):
11148        Stubbed out these functions. Derived classes can override them to participate in display.
11149
111502011-04-04  MORITA Hajime  <morrita@google.com>
11151
11152        Reviewed by Ryosuke Niwa.
11153
11154        [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
11155        https://bugs.webkit.org/show_bug.cgi?id=56085
11156        
11157        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
11158        (WebKit::WebEditorClient::requestCheckingOfString):
11159        * WebProcess/WebCoreSupport/WebEditorClient.h:
11160        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
11161        (WebKit::WebEditorClient::checkTextOfParagraph):
11162
111632011-04-05  Alejandro G. Castro  <alex@igalia.com>
11164
11165        Another compilation fix after r82929 horrible patch merge.
11166
11167        * UIProcess/WebPageProxy.messages.in:
11168
111692011-04-05  Alejandro G. Castro  <alex@igalia.com>
11170
11171        Fix compilation error after r82929.
11172
11173        * WebProcess/WebPage/WebPage.h:
11174
111752011-04-05  Amruth Raj  <amruthraj@motorola.com>, Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
11176
11177        Reviewed by Martin Robinson.
11178
11179        [GTK] Implement WebPage class for WebKit2
11180        https://bugs.webkit.org/show_bug.cgi?id=54230
11181
11182        Added functions to handle the generation of commands from the
11183        keycodes.
11184
11185        * GNUmakefile.am:
11186        * Scripts/webkit2/messages.py:
11187        * UIProcess/PageClient.h:
11188        * UIProcess/WebPageProxy.h:
11189        * UIProcess/WebPageProxy.messages.in:
11190        * UIProcess/gtk/WebPageProxyGtk.cpp:
11191        (WebKit::WebPageProxy::getEditorCommandsForKeyEvent):
11192        * UIProcess/gtk/WebView.cpp:
11193        (WebKit::backspaceCallback):
11194        (WebKit::selectAllCallback):
11195        (WebKit::cutClipboardCallback):
11196        (WebKit::copyClipboardCallback):
11197        (WebKit::pasteClipboardCallback):
11198        (WebKit::toggleOverwriteCallback):
11199        (WebKit::popupMenuCallback):
11200        (WebKit::showHelpCallback):
11201        (WebKit::deleteFromCursorCallback):
11202        (WebKit::moveCursorCallback):
11203        (WebKit::WebView::WebView):
11204        (WebKit::WebView::getEditorCommandsForKeyEvent):
11205        * UIProcess/gtk/WebView.h:
11206        (WebKit::WebView::addPendingEditorCommand):
11207        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
11208        * WebProcess/WebCoreSupport/WebEditorClient.h:
11209        * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Added.
11210        (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
11211        (WebKit::WebEditorClient::executePendingEditorCommands):
11212        (WebKit::WebEditorClient::handleKeyboardEvent):
11213        (WebKit::WebEditorClient::handleInputMethodKeydown):
11214        * WebProcess/WebPage/WebPage.cpp:
11215        * WebProcess/WebPage/WebPage.h:
11216        * WebProcess/WebPage/gtk/WebPageGtk.cpp: Added.
11217        (WebKit::WebPage::platformInitialize):
11218        (WebKit::WebPage::platformPreferencesDidChange):
11219        (WebKit::scroll):
11220        (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
11221        (WebKit::WebPage::platformHasLocalDataForURL):
11222        (WebKit::WebPage::cachedResponseMIMETypeForURL):
11223        (WebKit::WebPage::platformCanHandleRequest):
11224
112252011-04-05  Csaba Osztrogonác  <ossy@webkit.org>
11226
11227        Remove duplicate API from WKContext
11228        <rdar://problem/8727879>
11229        https://bugs.webkit.org/show_bug.cgi?id=57815
11230
11231        Unreviewed buildfix after r82906.
11232
11233        Add UNUSED_PARAM to resourceCachesToClear, because
11234        it is only used within #if USE(CFURLCACHE) guard.
11235
11236        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
11237        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
11238
112392011-04-04  Sam Weinig  <sam@webkit.org>
11240
11241        Reviewed by Brian Weinstein.
11242
11243        Remove duplicate API from WKContext
11244        <rdar://problem/8727879>
11245        https://bugs.webkit.org/show_bug.cgi?id=57815
11246
11247        - Remove WKContextClearResourceCaches and WKContextClearApplicationCache in favor
11248          of their more modern counterparts WKResourceCacheManagerClearCacheForAllOrigins
11249          and WKApplicationCacheManagerDeleteAllEntries.
11250
11251        - Expand clearing functionality of WKResourceCacheManager by adding type of resources
11252          to clear.
11253
11254        * Shared/WebProcessCreationParameters.cpp:
11255        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
11256        (WebKit::WebProcessCreationParameters::encode):
11257        (WebKit::WebProcessCreationParameters::decode):
11258        * Shared/WebProcessCreationParameters.h:
11259        Remove clearing bools.
11260
11261        * UIProcess/API/C/WKAPICast.h:
11262        (WebKit::toResourceCachesToClear):
11263        Update for new name of enum.
11264
11265        * UIProcess/API/C/WKContext.cpp:
11266        * UIProcess/API/C/WKContext.h:
11267        Remove WKContextClearResourceCaches and WKContextClearApplicationCache.
11268
11269        * UIProcess/API/C/WKResourceCacheManager.cpp:
11270        (WKResourceCacheManagerClearCacheForOrigin):
11271        (WKResourceCacheManagerClearCacheForAllOrigins):
11272        * UIProcess/API/C/WKResourceCacheManager.h:
11273        Add WKResourceCachesToClear enum and use it in the clearing functions.
11274
11275        * UIProcess/WebContext.cpp:
11276        (WebKit::WebContext::WebContext):
11277        (WebKit::WebContext::ensureWebProcess):
11278        * UIProcess/WebContext.h:
11279        * WebProcess/WebProcess.messages.in:
11280        Remove clearing functions and setting of bools for clear on launch.
11281
11282        * UIProcess/WebFullScreenManagerProxy.cpp:
11283        Remove unnecessary #include.
11284
11285        * UIProcess/WebResourceCacheManagerProxy.cpp:
11286        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
11287        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
11288        * UIProcess/WebResourceCacheManagerProxy.h:
11289        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
11290        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
11291        (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
11292        * WebProcess/ResourceCache/WebResourceCacheManager.h:
11293        * WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
11294        Add enum parameter describing what type of caches to clear.
11295
11296        * WebProcess/WebProcess.cpp:
11297        (WebKit::WebProcess::initializeWebProcess):
11298        (WebKit::WebProcess::clearResourceCaches):
11299        * WebProcess/WebProcess.h:
11300        No longer need to use opaque type now that it is not a message receiver.
11301
113022011-04-04  David Kilzer  <ddkilzer@apple.com>
11303
11304        <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
11305
11306        Reviewed by Alexey Proskuryakov.
11307
11308        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
11309        (InitWebCoreSystemInterface): Added initialization for
11310        wkSetHTTPPipeliningMaximumPriority().
11311
113122011-04-04  Anders Carlsson  <andersca@apple.com>
11313
11314        Reviewed by Darin Adler.
11315
11316        Send NPCocoaEventFlagsChanged events
11317        https://bugs.webkit.org/show_bug.cgi?id=57811
11318        <rdar://problem/9215600>
11319
11320        * Shared/WebEvent.h:
11321        (WebKit::WebEvent::capsLockKey):
11322        Add CapsLock modifier and getter.
11323
11324        * Shared/mac/WebEventFactory.mm:
11325        (WebKit::modifiersForEvent):
11326        Check for NSAlphaShiftKeyMask and set the CapsLockKey modifier.
11327
11328        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
11329        (WebKit::modifierFlags):
11330        Check for CapsLockKey and set NSAlphaShiftKeyMask.
11331
11332        (WebKit::isFlagsChangedEvent):
11333        Return whether a given event is a Cocoa flags changed event.
11334
11335        (WebKit::initializeKeyboardEvent):
11336        If this is a flags changed event, set the event type to NPCocoaEventFlagsChanged.
11337
113382011-04-04  Anders Carlsson  <andersca@apple.com>
11339
11340        Reviewed by Darin Adler.
11341
11342        Don't discard the backing stores of WKViews in the key window
11343        https://bugs.webkit.org/show_bug.cgi?id=57808
11344        <rdar://problem/9110793>
11345        <rdar://problem/9194284>
11346        <rdar://problem/9222216>
11347
11348        * UIProcess/DrawingAreaProxy.h:
11349        (WebKit::DrawingAreaProxy::setBackingStoreIsDiscardable):
11350        Add empty stub.
11351
11352        * UIProcess/DrawingAreaProxyImpl.cpp:
11353        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
11354        Initialize m_isBackingStoreDiscardable to true.
11355
11356        (WebKit::DrawingAreaProxyImpl::setBackingStoreIsDiscardable):
11357        Set m_isBackingStoreDiscardable and schedule or stop the discard backing store timer.
11358
11359        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
11360        Don't start the timer if m_isBackingStoreDiscardable is false.
11361
11362        * UIProcess/DrawingAreaProxyImpl.h:
11363        Add m_isBackingStoreDiscardable.
11364
11365        * UIProcess/WebPageProxy.cpp:
11366        (WebKit::WebPageProxy::viewStateDidChange):
11367        Mark the backing store as discardable if the view is hidden or if the containing window
11368        is not active.
11369
113702011-04-04  Jade Han  <jade.han@nokia.com>
11371
11372        Reviewed by Csaba Osztrogonác.
11373
11374        Symbian build fix.
11375        https://bugs.webkit.org/show_bug.cgi?id=54977
11376
11377        * config.h:
11378
113792011-04-04  Brady Eidson  <beidson@apple.com>
11380
11381        Rubberstamped by Adam Roben.
11382
11383        Add WKIconDatabase* headers to the WebKit2 export for Windows:
11384        * win/WebKit2Generated.make:
11385
113862011-04-04  Anders Carlsson  <andersca@apple.com>
11387
11388        Reviewed by Dan Bernstein.
11389
11390        Get rid of WebContext::process() in more places
11391        https://bugs.webkit.org/show_bug.cgi?id=57787
11392
11393        Migrate calls to WebContext::process() over to sendToAllProcesses and
11394        sendToAllProcessesRelaunchingThemIfNecessary.
11395
11396        Add FIXMEs for things that need to be fixed in order to support multiple web processes.
11397                
11398        * UIProcess/Downloads/DownloadProxy.cpp:
11399        (WebKit::DownloadProxy::cancel):
11400        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
11401        (WebKit::WebPluginSiteDataManager::getSitesWithData):
11402        (WebKit::WebPluginSiteDataManager::clearSiteData):
11403        * UIProcess/VisitedLinkProvider.cpp:
11404        (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
11405        * UIProcess/WebApplicationCacheManagerProxy.cpp:
11406        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
11407        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
11408        (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
11409        * UIProcess/WebCookieManagerProxy.cpp:
11410        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
11411        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
11412        * UIProcess/WebDatabaseManagerProxy.cpp:
11413        (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
11414        (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
11415        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
11416        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
11417        (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
11418        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
11419        * UIProcess/WebGeolocationManagerProxy.cpp:
11420        (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
11421        (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
11422        * UIProcess/WebIconDatabase.cpp:
11423        (WebKit::WebIconDatabase::getLoadDecisionForIconURL):
11424        (WebKit::WebIconDatabase::didFinishURLImport):
11425        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
11426        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
11427        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
11428        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
11429        * UIProcess/WebMediaCacheManagerProxy.cpp:
11430        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
11431        (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
11432        (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
11433        * UIProcess/WebResourceCacheManagerProxy.cpp:
11434        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
11435        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
11436        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
11437
114382011-04-04  Alexey Proskuryakov  <ap@apple.com>
11439
11440        Reviewed by Dan Bernstein.
11441
11442        REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
11443        https://bugs.webkit.org/show_bug.cgi?id=51230
11444        <rdar://problem/8780989>
11445
11446        <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
11447
11448        * UIProcess/API/mac/WKView.mm:
11449        (-[WKView flagsChanged:]): Ported from WebHTMLView.
11450        (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
11451        AppKit isn't happy about attempts to interpret NSFlagsChanged, but WK2 lacked the check.
11452
114532011-04-04  Steve Falkenburg  <sfalken@apple.com>
11454
11455        Reviewed by Adam Roben.
11456
11457        Remove unused AnalyzeWithLargeStack code from Windows build files
11458        https://bugs.webkit.org/show_bug.cgi?id=57771
11459        
11460        This was used for us to build with prefast automatically,
11461        but it is out-of-date and hasn't been used for some time.
11462        Removing completely for now.
11463
11464        * win/WebKitPreBuild.cmd:
11465
114662011-04-04  Anders Carlsson  <andersca@apple.com>
11467
11468        Attempt to fix the Windows build.
11469
11470        * UIProcess/win/WebContextWin.cpp:
11471        (WebKit::WebContext::setShouldPaintNativeControls):
11472
114732011-04-04  Anders Carlsson  <andersca@apple.com>
11474
11475        Reviewed by Adam Roben.
11476
11477        Make it easier to send a message to all processes in a context
11478        https://bugs.webkit.org/show_bug.cgi?id=57776
11479
11480        Add WebContext::sendToAllProcesses and WebContext::sendToAllProcessesRelaunchingThemIfNecessary
11481        as a first step towards getting rid of WebContext::process() and getting rid of a class of crashers
11482        where WebContext::process() is null.
11483
11484        * UIProcess/WebContext.cpp:
11485        (WebKit::WebContext::initializeHistoryClient):
11486        (WebKit::WebContext::languageChanged):
11487        (WebKit::WebContext::setAlwaysUsesComplexTextCodePath):
11488        (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
11489        (WebKit::WebContext::registerURLSchemeAsSecure):
11490        (WebKit::WebContext::setDomainRelaxationForbiddenForURLScheme):
11491        (WebKit::WebContext::setCacheModel):
11492        (WebKit::WebContext::setDefaultRequestTimeoutInterval):
11493        (WebKit::WebContext::clearResourceCaches):
11494        (WebKit::WebContext::clearApplicationCache):
11495        (WebKit::WebContext::setEnhancedAccessibility):
11496        (WebKit::WebContext::startMemorySampler):
11497        Use sendToAllProcesses.
11498
11499        (WebKit::WebContext::stopMemorySampler):
11500        Use sendToAllProcesses. This is a slight policy change where we now create a sandbox extension even
11501        if there's no process around. Since this is a debugging tool it seems OK to do this.
11502
11503        * UIProcess/WebContext.h:
11504        Get rid of hasValidProcess.
11505
11506        (WebKit::WebContext::sendToAllProcesses):
11507        If we have a process and we can send messages to it, then do so.
11508
11509        (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
11510        Relaunch the web process and send the message.
11511
11512        * UIProcess/WebCookieManagerProxy.cpp:
11513        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
11514        (WebKit::WebCookieManagerProxy::deleteAllCookies):
11515        (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
11516        (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
11517        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
11518        Use sendToAllProcesses and sendToAllProcessesRelaunchingThemIfNecessary.
11519
115202011-04-04  Adam Roben  <aroben@apple.com>
11521
11522        Move a teensy bit of non-Mac-specific code up to LayerTreeHostCA
11523
11524        Fixes <http://webkit.org/b/57774> LayerTreeHostCA should know how to flip the root layer
11525
11526        Reviewed by Anders Carlsson.
11527
11528        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
11529        (WebKit::LayerTreeHostCA::initialize): Cross-platformized and moved some code here...
11530
11531        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
11532        (WebKit::LayerTreeHostCAMac::platformInitialize): ...from here.
11533
115342011-04-01  Enrica Casucci  <enrica@apple.com>
11535
11536        Reviewed by Darin Adler.
11537
11538        WK2: Reproducible crash when dragging out of or over Safari window.
11539        https://bugs.webkit.org/show_bug.cgi?id=57654
11540        <rdar://problem/9139755>
11541        
11542        AppKit does not retain the owner given to the pasteboard, therefore we
11543        need to give the ownership of the retained pointer to NSPasteboard.
11544        Also, dragImage will release the NSFilePromiseDragSource object, therefore
11545        we retain it before calling dragImage to be able to control its lifetime.
11546        
11547        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
11548        (WebKit::WebDragClient::declareAndWriteDragImage): Passing ownership
11549        of the pointer to AppKit when providing the owner pointer to the NSPasteboard
11550        object.
11551        * WebProcess/WebPage/mac/WebPageMac.mm:
11552        (WebKit::WebPage::platformDragEnded): Retaining the NSFilePromiseDragSource
11553        since dragImage will release it.
11554
115552011-03-30  Jer Noble  <jer.noble@apple.com>
11556
11557        Reviewed by Dan Bernstein.
11558
11559        WebKit2: No "open in preview" contextual menu item for PDFs
11560        https://bugs.webkit.org/show_bug.cgi?id=57527
11561
11562        Add support for opening a PDF in the associated application from the
11563        context menu.
11564
11565        * UIProcess/API/mac/PDFViewController.mm:
11566        (_applicationInfoForMIMEType): Added, copied from WebKit/WebPDFView.mm
11567        (-[WKPDFView _openWithFinder:]): Added.
11568        (-[WKPDFView hitTest:]): Added, copied from WebKit/WebPDFView.mm.
11569        (-[WKPDFView menuForEvent:]): Added, adapted from WebKit/WebPDFVie.mm.
11570        (-[WKPDFView validateUserInterfaceItem:]): Added.
11571
115722011-04-04  Chang Shu  <cshu@webkit.org>
11573
11574        Reviewed by Darin Adler.
11575
11576        WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
11577        https://bugs.webkit.org/show_bug.cgi?id=57572
11578
11579        * Shared/WebPreferencesStore.cpp:
11580        (WebKit::WebPreferencesStore::decode):
11581        (WebKit::WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner):
11582        * Shared/WebPreferencesStore.h:
11583        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
11584        (WKBundleSetAllowFileAccessFromFileURLs):
11585        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
11586        * WebProcess/InjectedBundle/InjectedBundle.cpp:
11587        (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
11588        * WebProcess/InjectedBundle/InjectedBundle.h:
11589
115902011-04-04  Brady Eidson  <beidson@apple.com>
11591
11592        Reviewed by Darin Adler.
11593
11594        https://bugs.webkit.org/show_bug.cgi?id=57683
11595        Flesh out WK2 Icon Database API
11596
11597        For now the new API will add a client interface where the WK1 version used NSNotifications.
11598
11599        If we decide we'd like the granularity of specific callback functions later, 
11600        they can easily be added on.
11601
11602        Project file nonsense:
11603        * GNUmakefile.am:
11604        * WebKit2.pro:
11605        * WebKit2.xcodeproj/project.pbxproj:
11606        * win/WebKit2.vcproj:
11607
11608        Add a WKIconDatabaseClient and some new API:
11609        * UIProcess/API/C/WKIconDatabase.cpp:
11610        (WKIconDatabaseSetIconDatabaseClient):
11611        (WKIconDatabaseRemoveAllIcons):
11612        (WKIconDatabaseCheckIntegrityBeforeOpening):
11613        * UIProcess/API/C/WKIconDatabase.h:
11614        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
11615        (WKIconDatabaseTryGetCGImageForURL): Renamed to "try" for subtle clarification.
11616        * UIProcess/API/C/cg/WKIconDatabaseCG.h:
11617
11618        Implementations for the new APIs:
11619        * UIProcess/WebIconDatabase.cpp:
11620        (WebKit::WebIconDatabase::retainIconForPageURL): Remove excessive logging.
11621        (WebKit::WebIconDatabase::releaseIconForPageURL): Ditto.
11622        (WebKit::WebIconDatabase::imageForPageURL):
11623        (WebKit::WebIconDatabase::removeAllIcons):
11624        (WebKit::WebIconDatabase::checkIntegrityBeforeOpening):
11625        (WebKit::WebIconDatabase::initializeIconDatabaseClient):
11626        (WebKit::WebIconDatabase::didImportIconURLForPageURL): Dispatch a client callback,
11627          much like the WK1 API uses notifications.
11628        (WebKit::WebIconDatabase::didImportIconDataForPageURL): Ditto.
11629        (WebKit::WebIconDatabase::didChangeIconForPageURL): Ditto.
11630        (WebKit::WebIconDatabase::didRemoveAllIcons): Ditto.
11631        * UIProcess/WebIconDatabase.h:
11632        * UIProcess/WebIconDatabaseClient.cpp: Added.
11633        (WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
11634        (WebKit::WebIconDatabaseClient::didRemoveAllIcons):
11635        * UIProcess/WebIconDatabaseClient.h: Added.
11636
116372011-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
11638
11639        Reviewed by Martin Robinson.
11640
11641        [GTK] Main loop sources are leaked in RunLoopGtk
11642        https://bugs.webkit.org/show_bug.cgi?id=57618
11643
11644        * Platform/RunLoop.h:
11645        (RunLoop::TimerBase::isRepeating):
11646        * Platform/gtk/RunLoopGtk.cpp:
11647        (RunLoop::~RunLoop): Make sure main loop is currently running
11648        before calling g_main_loop_quit(), RunLoop::stop() might have been
11649        called.
11650        (RunLoop::wakeUp): Use an idle source with default priority
11651        instead of a timeout one with a 0 interval.
11652        (RunLoop::TimerBase::clearTimerSource): New method to clear the
11653        timer.
11654        (RunLoop::TimerBase::destroyNotifyCallback): Destroy notify
11655        callback called when the source is destroyed to clear the timer.
11656        (RunLoop::TimerBase::timerFiredCallback): Use the same callback for
11657        repeating and no repeating timers.
11658        (RunLoop::TimerBase::start): g_source_attach() increments the
11659        source reference counter, so use GRefPtr to make sure the source
11660        is freed.
11661        (RunLoop::TimerBase::stop): Use clearTimerSource().
11662
116632011-04-03  Dan Bernstein  <mitz@apple.com>
11664
11665        Build fix.
11666
11667        * Shared/DictionaryPopupInfo.cpp:
11668        (WebKit::DictionaryPopupInfo::encode):
11669        (WebKit::DictionaryPopupInfo::decode):
11670        * Shared/DictionaryPopupInfo.h:
11671
116722011-04-03  Dan Bernstein  <mitz@apple.com>
11673
11674        Reviewed by Maciej Stachowiak.
11675
11676        <rdar://problem/9227839> REGRESSION: Reproducible crash in Snow Leopard when trying to show the Dictionary panel or application
11677        https://bugs.webkit.org/show_bug.cgi?id=57739
11678
11679        * Shared/DictionaryPopupInfo.cpp:
11680        (WebKit::DictionaryPopupInfo::encode): Do not encode the options dictionary on Snow Leopard.
11681        (WebKit::DictionaryPopupInfo::decode): Do not decode the options dictionary on Snow Leopard.
11682        * Shared/DictionaryPopupInfo.h: Removed the options member variable on Snow Leopard.
11683        * Shared/Plugins/PluginQuirks.h:
11684        * WebProcess/WebPage/mac/WebPageMac.mm:
11685        (WebKit::WebPage::performDictionaryLookupForRange): Do not set the options member variable on
11686        Snow Leopard.
11687
116882011-04-02  Sam Weinig  <sam@webkit.org>
11689
11690        Reviewed by Beth Dakin.
11691
11692        https://bugs.webkit.org/show_bug.cgi?id=57605
11693        Frame::pageScaleFactor() should not affect getBoundingClientRect() or 
11694        getClientRects()
11695        -and corresponding-
11696        <rdar://problem/9194541>
11697
11698        Add DRT support for the scaleWebView SPI.
11699        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
11700        (WKBundlePageSetScaleAtOrigin):
11701        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
11702
117032011-04-02  Sam Weinig  <sam@webkit.org>
11704
11705        Reviewed by Oliver Hunt.
11706
11707        "Search in Spotlight" broken in WebKit2
11708        https://bugs.webkit.org/show_bug.cgi?id=57712
11709
11710        Proxy spotlight searching to the UIProcess.
11711
11712        * UIProcess/WebPageProxy.messages.in:
11713        Add new message. Re-organize messages to put all mac specific ones together.
11714
11715        * UIProcess/WebPageProxy.h:
11716        * UIProcess/mac/WebPageProxyMac.mm:
11717        (WebKit::WebPageProxy::speak):
11718        (WebKit::WebPageProxy::searchWithSpotlight):
11719        Moved code to trigger spotlight here. Use WTF::String -> NSString conversion function
11720        instead of relying on the built in conversion since it doesn't always work in the UIProcess.
11721
11722        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
11723        (WebKit::WebContextMenuClient::searchWithSpotlight):
11724        Post message to the UIProcess to do the searching.
11725
117262011-04-02  Jeff Miller  <jeffm@apple.com>
11727
11728        Reviewed by Dan Bernstein.
11729
11730        WebKit2: Specify the certificate store in WKBundleSetClientCertificate()
11731        https://bugs.webkit.org/show_bug.cgi?id=57707
11732
11733        Include the name of the system certificate store that the client certificate came from in WKBundleSetClientCertificate().
11734
11735        The PCCERT_CONTEXT for the client certificate we create from the message from the UI process doesn't contain enough information to actually use it in a request, we need to get the real certificate from the certificate store (which is typically the "MY" store).
11736
11737        * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp:
11738        (WKBundleSetClientCertificate): Add certificateSystemStoreName to parameters.
11739        * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Add certificateSystemStoreName to WKBundleSetClientCertificate() parameters.
11740        * WebProcess/InjectedBundle/InjectedBundle.h: Add certificateSystemStoreName to setClientCertificate() parameters.
11741        * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
11742        (WebKit::InjectedBundle::setClientCertificate): Read the real certificate from the certificate store.
11743
117442011-04-02  Sam Weinig  <sam@webkit.org>
11745
11746        Reviewed by Dan Bernstein.
11747
11748        Implement WKBundleFrameHasHorizontalScrollbar/WKBundleFrameHasVerticalScrollbar
11749        <rdar://problem/9225772>
11750        https://bugs.webkit.org/show_bug.cgi?id=57709
11751
11752        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
11753        (WKBundleFrameHasHorizontalScrollbar):
11754        (WKBundleFrameHasVerticalScrollbar):
11755        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
11756        * WebProcess/WebPage/WebFrame.cpp:
11757        (WebKit::WebFrame::hasHorizontalScrollbar):
11758        (WebKit::WebFrame::hasVerticalScrollbar):
11759        * WebProcess/WebPage/WebFrame.h:
11760
117612011-04-01  Jon Lee  <jonlee@apple.com>
11762
11763        Reviewed by Darin Adler.
11764
11765        WebKit2: Type-to-select doesn't work in open <select> menu (53023)
11766        https://bugs.webkit.org/show_bug.cgi?id=53023
11767        <rdar://problem/8907678>
11768
11769        * UIProcess/WebPageProxy.h:
11770        * UIProcess/WebPageProxy.messages.in: adding new setPopupMenuSelectedIndex message for windows platform
11771        * UIProcess/win/WebPageProxyWin.cpp:
11772        (WebKit::WebPageProxy::setPopupMenuSelectedIndex):
11773        * UIProcess/win/WebPopupMenuProxyWin.h: moving setFocusedIndex() into public method
11774        * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
11775        (WebKit::WebPopupMenu::updateFromElement): send message back to UIProcess to update the selected element
11776
117772011-04-01  Alexey Proskuryakov  <ap@apple.com>
11778
11779        Reviewed by Darin Adler.
11780
11781        REGRESSION: Assertion failure when executing a complex custom key binding
11782        https://bugs.webkit.org/show_bug.cgi?id=57681
11783
11784        Also completes a fix for
11785        <rdar://problem/9063782> WebKit2: Text fields in Safari don't honor custom key bindings
11786
11787        * UIProcess/API/mac/WKView.mm: (-[WKView hasMarkedText]): There is no need to execute saved
11788        commands when they can't possibly change the result.
11789
117902011-04-01  Brian Weinstein  <bweinstein@apple.com>
11791
11792        Reviewed by Anders Carlsson.
11793
11794        Crash when calling WebPageProxy::setMemoryCacheClientCallsEnabled with an invalid Web Process
11795        https://bugs.webkit.org/show_bug.cgi?id=57680
11796        <rdar://problem/9202909>
11797
11798        * UIProcess/WebPageProxy.cpp:
11799        (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Add an isValid check before sending
11800            the message.
11801
118022011-03-31  Jer Noble  <jer.noble@apple.com>
11803
11804        Reviewed by Dan Bernstein.
11805
11806        WebKit2: Save as PDF in Safari provides Untitled as default file name
11807        https://bugs.webkit.org/show_bug.cgi?id=57529
11808
11809        Set the NSPrintOperation's jobTitle to the printing frame's title.
11810
11811        * UIProcess/API/mac/WKView.mm:
11812        (-[WKView printOperationWithPrintInfo:forFrame:]):
11813
118142011-04-01  Jer Noble  <jer.noble@apple.com>
11815
11816        Reviewed by Darin Adler.
11817
11818        WebKit2: Link from PDF opens in a new tab instead of in the same tab
11819        https://bugs.webkit.org/show_bug.cgi?id=57528
11820
11821        Notify the WebProcess that a link has been clicked so that the normal policy
11822        lookup can occur.
11823
11824        * Shared/WebEvent.cpp:
11825        (WebKit::WebEvent::WebEvent): Initialize ivars in the default constructor.
11826        * Shared/WebEvent.h: Add WebEvent::NoType to Type enum.
11827        * Shared/WebMouseEvent.cpp: 
11828        (WebKit::WebMouseEvent::WebMouseEvent): Ditto.
11829        * UIProcess/API/mac/PDFViewController.mm:
11830        (-[WKPDFView PDFViewWillClickOnLink:withURL:]): Handle the delegate
11831            function and override the PDFView default behavior.
11832        * UIProcess/WebPageProxy.cpp:
11833        (WebKit::WebPageProxy::didReceiveEvent): Handle the new WebEvent::NoType enum.
11834        (WebKit::WebPageProxy::linkClicked): Added.  Send event through to WebPage.
11835        * UIProcess/WebPageProxy.h:
11836        * WebProcess/WebPage/WebPage.cpp:
11837        (WebKit::WebPage::linkClicked): Added.  Call loadFrameRequest().
11838        * WebProcess/WebPage/WebPage.h:
11839        * WebProcess/WebPage/WebPage.messages.in: Added LinkClicked.
11840
118412011-04-01  Sam Weinig  <sam@webkit.org>
11842
11843        Reviewed by Adam "Keyword Slasher" Roben.
11844
11845        Remove unnecessary static keyword.
11846
11847        * UIProcess/API/cpp/WKRetainPtr.h:
11848        (WebKit::adoptWK):
11849
118502011-04-01  Sam Weinig  <sam@webkit.org>
11851
11852        Reviewed by Adam Roben.
11853
11854        Add adoptWK to WKRetainPtr.h
11855        https://bugs.webkit.org/show_bug.cgi?id=57670
11856
11857        * UIProcess/API/cpp/WKRetainPtr.h:
11858        (WebKit::adoptWK):
11859        Add shared implementation of adoptWK. Previously both WebKitTestRunner
11860        and TestWebKitAPI had separate versions of it.
11861
118622011-04-01  Anders Carlsson  <andersca@apple.com>
11863
11864        Reviewed by Sam Weinig.
11865
11866        Shockwave plug-in doesn't accept mouse events
11867        https://bugs.webkit.org/show_bug.cgi?id=57653
11868        <rdar://problem/8483273>
11869
11870        Add a missing break.
11871
11872        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
11873        (WebKit::NetscapePlugin::convertPoint):
11874
118752011-04-01  Sam Weinig  <sam@webkit.org>
11876
11877        Reviewed by Anders Carlsson.
11878
11879        WebKitTestRunner needs layoutTestController.shadowRoot
11880        https://bugs.webkit.org/show_bug.cgi?id=57661
11881
11882        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
11883        (WKBundleNodeHandleGetRenderRect):
11884        (WKBundleNodeHandleGetElementBounds):
11885        (WKBundleNodeHandleCopyElementShadowRoot):
11886        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
11887        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
11888        (WebKit::InjectedBundleNodeHandle::elementShadowRoot):
11889        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
11890        Add accessor for the shadowRoot of an element in the bundle.
11891
118922011-04-01  Alexey Proskuryakov  <ap@apple.com>
11893
11894        Reviewed by Darin Adler.
11895
11896        Make WebKit2 text input handling more like WebKit1
11897        https://bugs.webkit.org/show_bug.cgi?id=57649
11898
11899        We now send more sync messages from UI process to Web process for NSTextInput protocol
11900        methods. Some of the exchanges are avoided by pre-calculating the responses before asking
11901        UI process to interpret key events, and also with each sync message sent during
11902        interpretation, and which could change the state.
11903
11904        * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a missing
11905        specialization for a function with 6 arguments and 2 returned values.
11906
11907        * Scripts/webkit2/messages.py: Added TextInputState to struct list.
11908
11909        * Shared/WebCoreArgumentCoders.h: Fixed a bug in CompositionUnderline encoding, which only
11910        encoded a part of Color field, and didn't match decoder.
11911
11912        * Shared/mac/TextInputState.h: Added. This is state that's needed for IM machinery and that
11913        we don't want to send sync messages for. This is similar to SelectionState, but the latter
11914        is only updated asynchronously, and is thus less reliable.
11915
11916        * UIProcess/API/mac/PageClientImpl.h: We don't "intercept", we "interpret".
11917
11918        * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::interpretKeyEvent): Pass
11919        current text input state, and don't expect anything input method related in return, as input
11920        methods are now sync.
11921
11922        * UIProcess/API/mac/WKView.mm:
11923        (-[WKView doCommandBySelector:]):
11924        (-[WKView insertText:]):
11925        (-[WKView keyDown:]):
11926        (-[WKView _executeSavedKeypressCommands]):
11927        (-[WKView inputContext]):
11928        (-[WKView selectedRange]):
11929        (-[WKView hasMarkedText]):
11930        (-[WKView unmarkText]):
11931        (-[WKView setMarkedText:selectedRange:]):
11932        (-[WKView markedRange]):
11933        (-[WKView attributedSubstringFromRange:]):
11934        (-[WKView characterIndexForPoint:]):
11935        (-[WKView firstRectForCharacterRange:]):
11936        (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
11937        * UIProcess/API/mac/WKViewInternal.h:
11938        * UIProcess/PageClient.h:
11939        * UIProcess/WebPageProxy.h:
11940        * UIProcess/WebPageProxy.messages.in:
11941        * UIProcess/mac/WebPageProxyMac.mm:
11942        (WebKit::WebPageProxy::setComposition):
11943        (WebKit::WebPageProxy::confirmComposition):
11944        (WebKit::WebPageProxy::insertText):
11945        (WebKit::WebPageProxy::getSelectedRange):
11946        (WebKit::WebPageProxy::executeKeypressCommands):
11947        (WebKit::WebPageProxy::interpretQueuedKeyEvent):
11948        * WebKit2.xcodeproj/project.pbxproj:
11949        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
11950        (WebKit::WebEditorClient::handleKeyboardEvent):
11951        (WebKit::WebEditorClient::handleInputMethodKeydown):
11952        * WebProcess/WebPage/WebPage.cpp:
11953        (WebKit::WebPage::WebPage):
11954        * WebProcess/WebPage/WebPage.h:
11955        (WebKit::WebPage::viewFrameInWindowCoordinates):
11956        * WebProcess/WebPage/WebPage.messages.in:
11957        * WebProcess/WebPage/mac/WebPageMac.mm:
11958        (WebKit::createSelectorExceptionMap):
11959        (WebKit::commandNameForSelectorName):
11960        (WebKit::currentTextInputState):
11961        (WebKit::frameForEvent):
11962        (WebKit::WebPage::executeKeypressCommandsInternal):
11963        (WebKit::WebPage::handleEditingKeyboardEvent):
11964        (WebKit::WebPage::setComposition):
11965        (WebKit::WebPage::confirmComposition):
11966        (WebKit::WebPage::insertText):
11967        (WebKit::WebPage::getSelectedRange):
11968        (WebKit::convertToRange):
11969        (WebKit::WebPage::executeKeypressCommands):
11970        (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
11971        Rewrote to be more like WebKit1.
11972
119732011-04-01  Chang Shu  <cshu@webkit.org>
11974
11975        Reviewed by Darin Adler.
11976
11977        WebKitTestRunner needs layoutTestController.setDatabaseQuota
11978        https://bugs.webkit.org/show_bug.cgi?id=57568
11979
11980        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
11981        (WKBundleSetDatabaseQuota):
11982        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
11983        * WebProcess/InjectedBundle/InjectedBundle.cpp:
11984        (WebKit::InjectedBundle::setDatabaseQuota):
11985        * WebProcess/InjectedBundle/InjectedBundle.h:
11986        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
11987
119882011-04-01  Timothy Hatcher  <timothy@apple.com>
11989
11990        Make momentum scroll event latching work in WebKit2 on Mac.
11991
11992        <rdar://problem/8751861>
11993
11994        Reviewed by Darin Adler.
11995
11996        * Shared/mac/WebEventFactory.mm:
11997        (WebKit::momentumPhaseForEvent): Return a phase on older Mac system by using WKGetNSEventMomentumPhase.
11998        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
11999        (InitWebCoreSystemInterface): Remove IsLatchingWheelEvent, add GetNSEventMomentumPhase.
12000
120012011-04-01  Alexey Proskuryakov  <ap@apple.com>
12002
12003        Reviewed by Anders Carlsson.
12004
12005        Assertion failure (type == event.type()) after a web process crash
12006        https://bugs.webkit.org/show_bug.cgi?id=56228
12007        <rdar://problem/8806106>
12008
12009        This partially un-confuses the UI process about key processing state after a web process
12010        crash. It may not be pefect yet - sending a KeyUp to a new process that never saw a KeyDown
12011        seems weird.
12012
12013        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash):
12014
120152011-04-01  Adam Roben  <aroben@apple.com>
12016
12017        Cairo build fix
12018
12019        * WebProcess/WebPage/LayerTreeHost.cpp: Only pull in the LayerTreeHostCA derived classes for
12020        PLATFORM(CA) ports.
12021
120222011-03-31  Adam Roben  <aroben@apple.com>
12023
12024        Split LayerTreeHostCA into a base class and derived Mac and Win classes
12025
12026        This will make it easier to customize the Mac and Windows implementations without adding too
12027        many #ifdefs.
12028
12029        Fixes <http://webkit.org/b/57606> Windows and Mac should use separate LayerTreeHost classes
12030
12031        Reviewed by Anders Carlsson.
12032
12033        * WebKit2.xcodeproj/project.pbxproj: Added LayerTreeHostCAMac.h.
12034
12035        * WebProcess/WebPage/LayerTreeHost.cpp:
12036        (WebKit::LayerTreeHost::create): Create a LayerTreeHostCAMac on Mac, and LayerTreeHostCAWin
12037        on Windows.
12038
12039        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
12040        (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some code from here...
12041        (WebKit::LayerTreeHostCA::initialize): ...to here. This function will be called after the
12042        constructor returns, and thus can safely call functions that are pure virtual in this class
12043        and its base class. We now pass our LayerTreeContext to platformInitialize so that our
12044        derived classes can initialize it.
12045        (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Removed Mac-specific code.
12046
12047        (WebKit::LayerTreeHostCA::invalidate):
12048        (WebKit::LayerTreeHostCA::sizeDidChange):
12049        (WebKit::LayerTreeHostCA::forceRepaint):
12050        (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush):
12051        Removed platform* calls. Derived classes can just override these functions to do what they
12052        need.
12053
12054        * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed Mac-specific pieces. Made some functions
12055        virtual so that derived classes can override them.
12056
12057        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Added.
12058
12059        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
12060        (WebKit::LayerTreeHostCAMac::create): Create and initialize a host.
12061        (WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Simple constructor.
12062        (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac): Moved code here from LayerTreeHostCA
12063        destructor.
12064        (WebKit::LayerTreeHostCAMac::platformInitialize): Removed direct uses of LayerTreeHostCA
12065        data members.
12066
12067        (WebKit::LayerTreeHostCAMac::invalidate):
12068        (WebKit::LayerTreeHostCAMac::sizeDidChange):
12069        (WebKit::LayerTreeHostCAMac::forceRepaint):
12070        (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
12071        Renamed from platform*. Now call up to the base class.
12072
12073        (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Updated type.
12074
12075        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
12076        (WebKit::LayerTreeHostCAWin::create): Create and initialize a host.
12077
12078        (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin):
12079        (WebKit::LayerTreeHostCAWin::~LayerTreeHostCAWin):
12080        (WebKit::LayerTreeHostCAWin::platformInitialize):
12081        (WebKit::LayerTreeHostCAWin::scheduleLayerFlush):
12082        Stubbed out.
12083
12084        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added.
12085
12086        * win/WebKit2.vcproj: Added LayerTreeHostCAWin.h
12087
12088        * win/WebKit2Apple.vsprops: Added WebProcess/WebPage/ca/win to the include path.
12089
120902011-03-31  Brent Fulgham  <bfulgham@webkit.org>
12091
12092        Unreviewed WinCairo build fix after r82632.
12093
12094        * UIProcess/DrawingAreaProxyImpl.cpp:
12095        (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
12096
120972011-03-31  Adam Roben  <aroben@apple.com>
12098
12099        Add SharedMemory::adopt, which can take ownership of an existing file mapping object
12100
12101        Fixes <http://webkit.org/b/57599> Need a way to wrap an existing file mapping object in a
12102        SharedMemory
12103
12104        Reviewed by Anders Carlsson.
12105
12106        * Platform/SharedMemory.h: Added adopt.
12107
12108        * Platform/win/SharedMemoryWin.cpp:
12109        (WebKit::SharedMemory::create): Moved code to adopt the HANDLE from here...
12110        (WebKit::SharedMemory::adopt): ...to here.
12111
121122011-03-31  Chang Shu  <cshu@webkit.org>
12113
12114        Reviewed by Darin Adler.
12115
12116        WebKitTestRunner needs layoutTestController.clearAllDatabases
12117        https://bugs.webkit.org/show_bug.cgi?id=42540
12118
12119        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
12120        (WKBundleClearAllDatabases):
12121        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
12122        * WebProcess/InjectedBundle/InjectedBundle.cpp:
12123        (WebKit::InjectedBundle::clearAllDatabases):
12124        * WebProcess/InjectedBundle/InjectedBundle.h:
12125        * WebProcess/WebCoreSupport/WebDatabaseManager.h:
12126
121272011-03-31  Anders Carlsson  <andersca@apple.com>
12128
12129        Reviewed by Sam Weinig.
12130
12131        Add some more media related things to the sandbox profile.
12132
12133        * WebProcess/com.apple.WebProcess.sb:
12134
121352011-03-31  Anders Carlsson  <andersca@apple.com>
12136
12137        Reviewed by Dan Bernstein.
12138
12139        Tabbed pages redraw unnecessarily when activated
12140        https://bugs.webkit.org/show_bug.cgi?id=57589
12141        <rdar://problem/9218258>
12142
12143        * UIProcess/DrawingAreaProxyImpl.cpp:
12144        (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
12145        If we become visible and have no backing store, make sure to call backingStoreStateDidChange
12146        so that the next time we're asked to paint we'll wait for something to paint.
12147
12148        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
12149        Remove now redundant call to backingStoreStateDidChange.
12150
121512011-03-31  Sam Weinig  <sam@webkit.org>
12152
12153        Reviewed by Anders Carlsson.
12154
12155        Sandbox violations when playing back HTML5 video on YouTube
12156        <rdar://problem/8950692>
12157
12158        * WebProcess/com.apple.WebProcess.sb:
12159
121602011-03-31  Darin Adler  <darin@apple.com>
12161
12162        Reviewed by Sam Weinig.
12163
12164        Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
12165        https://bugs.webkit.org/show_bug.cgi?id=57573
12166
12167        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
12168        (WKBundlePageSimulateMouseDown): Added.
12169        (WKBundlePageSimulateMouseUp): Added.
12170        (WKBundlePageSimulateMouseMotion): Added.
12171        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added above functions.
12172        * WebProcess/WebPage/WebPage.cpp:
12173        (WebKit::WebPage::simulateMouseDown): Added.
12174        (WebKit::WebPage::simulateMouseUp): Added.
12175        (WebKit::WebPage::simulateMouseMotion): Added.
12176        * WebProcess/WebPage/WebPage.h: Added above functions.
12177
121782011-03-31  Sam Weinig  <sam@webkit.org>
12179
12180        Reviewed by Anders Carlsson.
12181
12182        Rename WebCore's UI_STRING to WEB_UI_STRING to not overlap with WebKit API
12183        https://bugs.webkit.org/show_bug.cgi?id=57582
12184
12185        * PluginProcess/mac/PluginProcessMac.mm:
12186        (WebKit::PluginProcess::platformInitialize):
12187        * UIProcess/mac/WebInspectorProxyMac.mm:
12188        (WebKit::WebInspectorProxy::platformInspectedURLChanged):
12189        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
12190        * WebProcess/mac/WebProcessMac.mm:
12191        (WebKit::WebProcess::platformInitializeWebProcess):
12192
121932011-03-31  Adam Roben  <aroben@apple.com>
12194
12195        Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object
12196
12197        When passed to ::MapViewOfFile, FILE_MAP_WRITE implies FILE_MAP_READ, but other file mapping
12198        APIs don't work that way. This bug wasn't causing any problems in practice, but it would
12199        have prevented us from creating a DIB that wraps a SharedMemory object (which I noticed
12200        while working on another bug).
12201
12202        Fixes <http://webkit.org/b/57576> File mappings used by read-write SharedMemory objects
12203        aren't correctly marked as read-write after being sent over a CoreIPC::Connection
12204
12205        Reviewed by Brian Weinstein.
12206
12207        * Platform/win/SharedMemoryWin.cpp:
12208        (WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
12209        SharedMemory.
12210
122112011-03-31  Adam Roben  <aroben@apple.com>
12212
12213        Quote the executable path we pass to ::CreateProcessW
12214
12215        This will ensure that spaces in the path will be interpreted correctly.
12216
12217        Fixes <http://webkit.org/b/57569> Web process sometimes fails to launch when there are
12218        spaces in its path
12219
12220        Reviewed by Steve Falkenburg.
12221
12222        * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
12223        (WebKit::ProcessLauncher::launchProcess): Surround the executable path in quotes.
12224
122252011-03-31  Alexey Proskuryakov  <ap@apple.com>
12226
12227        Patch by John Harvey, reviewed and tweaked by me.
12228
12229        <rdar://problem/8644403> Should notify TSM that plug-ins would show a bottom input window for marked text.
12230
12231        * UIProcess/API/mac/WKTextInputWindowController.mm:
12232        (-[WKTextInputPanel _interpretKeyEvent:string:]):
12233
122342011-03-31  Anders Carlsson  <andersca@apple.com>
12235
12236        Reviewed by John Sullivan, Darin Adler, Dan Bernstein and Sam Weinig.
12237
12238        If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
12239        https://bugs.webkit.org/show_bug.cgi?id=57561
12240        <rdar://problem/9127411>
12241
12242        Ensure that any readwrite sandbox directories actually exist before entering the sandbox.
12243
12244        * WebProcess/mac/WebProcessMac.mm:
12245        (WebKit::appendReadwriteSandboxDirectory):
12246
122472011-03-31  John Sullivan  <sullivan@apple.com>
12248
12249        Reviewed by Darin Adler and Adam Roben.
12250
12251        <rdar://problem/9214824> Find client not told when WKPageCountStringMatches exceeds maximum
12252        https://bugs.webkit.org/show_bug.cgi?id=57552
12253
12254        * WebProcess/WebPage/FindController.cpp:
12255        (WebKit::FindController::countStringMatches):
12256        Use the same technique as findString() to report kWKMoreThanMaximumMatchCount when appropriate.
12257        (WebKit::FindController::findString):
12258        Convert numeric_limits::max() to max() - 1 to avoid overflow case.
12259
122602011-03-31  Evan Martin  <evan@chromium.org>
12261
12262        Reviewed by Eric Seidel.
12263
12264        <title> should support dir attribute
12265        https://bugs.webkit.org/show_bug.cgi?id=50961
12266
12267        Update to new FrameLoaderClient interface.
12268
12269        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
12270        (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
12271        (WebKit::WebFrameLoaderClient::setTitle):
12272        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
12273
122742011-03-31  Balazs Kelemen  <kbalazs@webkit.org>
12275
12276        Reviewed by Csaba Osztrogonác.
12277
12278        [WK2] Introduce an option for no NPAPI support
12279        https://bugs.webkit.org/show_bug.cgi?id=55828
12280
12281        Stub out NPAPI support for platform and OS combinations that are
12282        not supported yet. Ancestor patch was made by Laszlo Gombos.
12283
12284        * GNUmakefile.am: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
12285        to the build system.
12286
12287        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
12288        Remove the sanity check because from now all combinations that
12289        don't have an explicitly set plugin architecture fall into
12290        the PLUGIN_ARCHITECTURE(UNSUPPORTED) category and has a stubbed
12291        implementation.
12292
12293        * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: Added.
12294        Stubbed implementation.
12295        (WebKit::NetscapePluginModule::getPluginInfo):
12296        (WebKit::NetscapePluginModule::determineQuirks):
12297
12298        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Guard with
12299        PLUGIN_ARCHITECTURE(X11).
12300
12301        * WebKit2.pro: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
12302        to the build system.
12303
12304        * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: Added.
12305        Stubbed implementation
12306        (WebKit::NetscapePlugin::platformPostInitialize):
12307        (WebKit::NetscapePlugin::platformDestroy):
12308        (WebKit::NetscapePlugin::platformInvalidate):
12309        (WebKit::NetscapePlugin::platformGeometryDidChange):
12310        (WebKit::NetscapePlugin::platformPaint):
12311        (WebKit::NetscapePlugin::platformHandleMouseEvent):
12312        (WebKit::NetscapePlugin::platformHandleWheelEvent):
12313        (WebKit::NetscapePlugin::platformSetFocus):
12314        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
12315        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
12316        (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
12317
12318        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Guard with
12319        PLUGIN_ARCHITECTURE(X11)
12320
12321        * config.h: Introduce PLUGIN_ARCHITECTURE(UNSUPPORTED) as another
12322        option. Make platform and OS combinations that are not supported
12323        yet fall into this. Don't use Q_WS_X11 to test the window system
12324        for Qt because it is not defined without including <QtGlobal>.
12325        No clue about how could it work so far.
12326
123272011-03-31  Vamshikrishna.Yellenki  <vamshi@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
12328
12329        Reviewed by Martin Robinson.
12330
12331        Implement MiniBrowser for Gtk port.
12332        https://bugs.webkit.org/show_bug.cgi?id=48512
12333
12334        * Shared/API/c/gtk/WKBaseGtk.h: Add the stdbool.h include.
12335
123362011-03-30  Dan Bernstein  <mitz@apple.com>
12337
12338        Reviewed by Maciej Stachowiak.
12339
12340        <rdar://problem/9005982> Flash of white when a WKView with composited content moves on-screen
12341        https://bugs.webkit.org/show_bug.cgi?id=57522
12342
12343        * UIProcess/DrawingAreaProxyImpl.cpp:
12344        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Invalidate the current
12345        backing store state, so that we get an update as soon as the page enters compositing mode
12346        next.
12347        * WebProcess/WebPage/DrawingAreaImpl.cpp:
12348        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Added a call to
12349        LayerTreeHost::forceRepaint() in order to flush and synchronize the layers
12350        before sending the update message to the UI process.
12351
123522011-03-30  Sam Weinig  <sam@webkit.org>
12353
12354        Reviewed by Anders Carlsson.
12355
12356        Sandbox violations if you navigate a file URL via something other than a click
12357        <rdar://problem/9016086>
12358        https://bugs.webkit.org/show_bug.cgi?id=57519
12359
12360        * WebProcess/WebPage/WebPage.cpp:
12361        (WebKit::shouldReuseCommittedSandboxExtension):
12362        Remove unnecessary restriction on extension reuse. Any type of file to file navigation
12363        should be allowed.
12364
123652011-03-30  Anders Carlsson  <andersca@apple.com>
12366
12367        Reviewed by Sam Weinig.
12368
12369        Clean up the sandbox parameter code
12370        https://bugs.webkit.org/show_bug.cgi?id=57518
12371
12372        * Shared/WebProcessCreationParameters.h:
12373        Make nsURLCachePath and uiProcessBundleResourcePath Strings to match the other paths we send over.
12374
12375        * UIProcess/mac/WebContextMac.mm:
12376        (WebKit::WebContext::platformInitializeWebProcess):
12377        nsURLCachePath and uiProcessBundleResourcePath are now Strings.
12378
12379        * WebProcess/mac/WebProcessMac.mm:
12380        (WebKit::appendSandboxParameterPathInternal):
12381        (WebKit::appendReadwriteConfDirectory):
12382        (WebKit::appendReadonlySandboxDirectory):
12383        (WebKit::appendReadwriteSandboxDirectory):
12384        (WebKit::initializeSandbox):
12385        Make it more clear whether the directories we're adding are readonly or readwrite. No functionality change.
12386        
12387        (WebKit::WebProcess::platformInitializeWebProcess):
12388        nsURLCachePath is now a string.
12389
123902011-03-30  Anders Carlsson  <andersca@apple.com>
12391
12392        Reviewed by Sam Weinig.
12393
12394        Downloading a file fails due to a sandbox violation if the destination path is a symlink
12395        https://bugs.webkit.org/show_bug.cgi?id=57517
12396        <rdar://problem/8943865>
12397
12398        Make sure to resolve any symlinks in the given path when creating a sandbox extension handle.
12399        Note that we can't use realpath or -[NSString stringByResolvingSymlinksInPath], because those calls
12400        will fail if the pointed to file doesn't exist.
12401
12402        * Shared/mac/SandboxExtensionMac.mm:
12403        (WebKit::resolveSymlinksInPath):
12404        New function that resolves all the symlinks in the given path.
12405
12406        (WebKit::SandboxExtension::createHandle):
12407        Call resolveSymlinksInPath on the resulting path.
12408
124092011-03-30  Steve Falkenburg  <sfalken@apple.com>
12410
12411        Reviewed by Adam Roben.
12412
12413        Share most vsprops between Release and Production builds in releaseproduction.vsprops
12414        https://bugs.webkit.org/show_bug.cgi?id=57508
12415
12416        * win/WebKit2Production.vsprops:
12417        * win/WebKit2Release.vsprops:
12418        * win/WebKit2ReleaseCairoCFLite.vsprops:
12419        * win/WebKit2WebProcessProduction.vsprops:
12420        * win/WebKit2WebProcessRelease.vsprops:
12421        * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
12422
124232011-03-30  Ivan Krstić  <ike@apple.com>
12424
12425        Reviewed by Oliver Hunt.
12426
12427        Ensure consistent, readable working directory for WebProcess before entering sandbox
12428        <rdar://problem/8951176>
12429
12430        * WebProcess/mac/WebProcessMac.mm:
12431        (WebKit::WebProcess::platformInitializeWebProcess):
12432
124332011-03-30  Sam Weinig  <sam@webkit.org>
12434
12435        Reviewed by Brady Eidson.
12436
12437        WebKit2: Attempting to view css file from url causes it to download
12438        <rdar://problem/9102611>
12439        https://bugs.webkit.org/show_bug.cgi?id=57501
12440
12441        * UIProcess/WebPageProxy.cpp:
12442        (WebKit::WebPageProxy::canShowMIMEType):
12443        Match WebKit1 by allowing any MIME type that starts with "text/"
12444        except the ones we explicitly blacklist.
12445
124462011-03-30  Steve Falkenburg  <sfalken@apple.com>
12447
12448        Reviewed by Adam Roben.
12449
12450        Update Windows production build logic for new production configurations
12451        https://bugs.webkit.org/show_bug.cgi?id=57494
12452
12453        * win/WebKit2.make:
12454        * win/WebKit2Production.vsprops:
12455        * win/WebKit2WebProcessProduction.vsprops:
12456
124572011-03-30  Steve Falkenburg  <sfalken@apple.com>
12458
12459        Reviewed by Adam Roben.
12460
12461        Rename Windows configuration Release_LTCG to Production for clarity
12462        https://bugs.webkit.org/show_bug.cgi?id=57465
12463
12464        * win/WebKit2.submit.sln:
12465        * win/WebKit2.vcproj:
12466        * win/WebKit2Generated.vcproj:
12467        * win/WebKit2Production.vsprops: Copied from Source/WebKit2/win/WebKit2ReleaseLTCG.vsprops.
12468        * win/WebKit2ReleaseLTCG.vsprops: Removed.
12469        * win/WebKit2WebProcess.vcproj:
12470        * win/WebKit2WebProcessProduction.vsprops: Copied from Source/WebKit2/win/WebKit2WebProcessReleaseLTCG.vsprops.
12471        * win/WebKit2WebProcessReleaseLTCG.vsprops: Removed.
12472
124732011-03-30  Jer Noble  <jer.noble@apple.com>
12474
12475        Reviewed by Dan Bernstein.
12476
12477        WebKit2: WebProcess is using 89%, while viewing a PDF
12478        https://bugs.webkit.org/show_bug.cgi?id=57471
12479
12480        Break a never ending display/update cycle between the UIProcess and the WebProcess
12481        by clearing the dirty region when a page has a custom representation (like a PDF).
12482        Also, avoid the issue where possible by not setting the dirty region in the same case.
12483
12484        * WebProcess/WebPage/DrawingAreaImpl.cpp:
12485        (WebKit::DrawingAreaImpl::setNeedsDisplay): Bail early if mainFrameHasCustomRepresentation().
12486        (WebKit::DrawingAreaImpl::scroll): Ditto.
12487        (WebKit::DrawingAreaImpl::display): Both bail early and clear m_dirtyRegion if 
12488            mainFrameHasCustomRepresentation().
12489
124902011-03-30  Sam Weinig  <sam@webkit.org>
12491
12492        Fix Snow Leopard build.
12493
12494        * UIProcess/mac/WebContextMenuProxyMac.mm:
12495        (WebKit::WebContextMenuProxyMac::showContextMenu):
12496
124972011-03-30  Sam Weinig  <sam@webkit.org>
12498
12499        Reviewed by Anders Carlsson.
12500
12501        WebKit2 contextual menu looks different than the rest of the OS
12502        <rdar://problem/9172935>
12503        https://bugs.webkit.org/show_bug.cgi?id=57475
12504
12505        * UIProcess/mac/WebContextMenuProxyMac.mm:
12506        (WebKit::WebContextMenuProxyMac::showContextMenu):
12507        Use correct SPI for showing a context menu. The dummy view is also
12508        not necessary, so remove it.
12509
125102011-03-30  Anders Carlsson  <andersca@apple.com>
12511
12512        Reviewed by Sam Weinig.
12513
12514        Crash when NPN_Evaluate removes the plug-in frame
12515        https://bugs.webkit.org/show_bug.cgi?id=57474
12516        <rdar://problem/9191396>
12517
12518        Get a reference to the frame since it can be nulled out if running the JavaScript code
12519        causes the plug-in's containing frame to be removed from the frame tree.
12520
12521        * WebProcess/Plugins/PluginView.cpp:
12522        (WebKit::PluginView::evaluate):
12523
125242011-03-30  Sam Weinig  <sam@webkit.org>
12525
12526        Reviewed by Anders Carlsson.
12527
12528        Add default localization strategy that can be shared by WebKit1 and WebKit2
12529        https://bugs.webkit.org/show_bug.cgi?id=57406
12530
12531        * Shared/WebLocalizableStrings.h: Removed.
12532        Removed in favor of using WebCore/LocalizedStrings.h directly.
12533
12534        * PluginProcess/mac/PluginProcessMac.mm:
12535        * UIProcess/API/mac/WKView.mm:
12536        * UIProcess/mac/WebInspectorProxyMac.mm:
12537        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
12538        * WebProcess/mac/WebProcessMac.mm:
12539        Use WebCore/LocalizedStrings.h directly.
12540
12541        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
12542        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
12543        Remove localization strategy override in favor of using new default implementation.
12544
12545        * GNUmakefile.am:
12546        * WebKit2.pro:
12547        * WebKit2.xcodeproj/project.pbxproj:
12548        * win/WebKit2.vcproj:
12549        Remove WebLocalizableStrings.h
12550
125512011-03-30  Anders Carlsson  <andersca@apple.com>
12552
12553        Reviewed by Adam Roben.
12554
12555        Assertion failure in plug-in process when calling WKPluginSiteDataManagerGetSitesWithData
12556        https://bugs.webkit.org/show_bug.cgi?id=57468
12557        <rdar://problem/9199089>
12558
12559        Call decrementLoadCount from removeWebProcessConnection instead of startShutdownTimerIfNecessary,
12560        otherwise we'll get a load count underflow when a connection is never created.
12561
12562        * PluginProcess/PluginProcess.cpp:
12563        (WebKit::PluginProcess::removeWebProcessConnection):
12564        (WebKit::PluginProcess::createWebProcessConnection):
12565        (WebKit::PluginProcess::startShutdownTimerIfNecessary):
12566
125672011-03-30  Jessie Berlin  <jberlin@apple.com>
12568
12569        Reviewed by Anders Carlsson.
12570
12571        WebKit2: Make sure to try to terminate the Web Process when any work that might require the
12572        Web Process to be relaunched is done
12573        https://bugs.webkit.org/show_bug.cgi?id=57462
12574
12575        For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are
12576        no more callbacks waiting to be invoked.
12577
12578        For the the Managers in the WebProcess, call WebProcess::shared().terminateIfPossible() when
12579        any work called for by a ManagerProxy function that called relaunchProcessIfNecessary is
12580        finished.
12581
12582        * UIProcess/WebContext.cpp:
12583        (WebKit::WebContext::shouldTerminate):
12584        Check with each of the ManagerProxies.
12585
12586        * UIProcess/WebApplicationCacheManagerProxy.cpp:
12587        (WebKit::WebApplicationCacheManagerProxy::shouldTerminate):
12588        * UIProcess/WebApplicationCacheManagerProxy.h:
12589        * UIProcess/WebCookieManagerProxy.cpp:
12590        (WebKit::WebCookieManagerProxy::shouldTerminate):
12591        * UIProcess/WebCookieManagerProxy.h:
12592        * UIProcess/WebDatabaseManagerProxy.cpp:
12593        (WebKit::WebDatabaseManagerProxy::shouldTerminate):
12594        * UIProcess/WebDatabaseManagerProxy.h:
12595        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
12596        (WebKit::WebKeyValueStorageManagerProxy::shouldTerminate):
12597        * UIProcess/WebKeyValueStorageManagerProxy.h:
12598        * UIProcess/WebMediaCacheManagerProxy.cpp:
12599        (WebKit::WebMediaCacheManagerProxy::shouldTerminate):
12600        * UIProcess/WebMediaCacheManagerProxy.h:
12601        * UIProcess/WebResourceCacheManagerProxy.cpp:
12602        (WebKit::WebResourceCacheManagerProxy::shouldTerminate):
12603        * UIProcess/WebResourceCacheManagerProxy.h:
12604
12605        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
12606        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
12607        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
12608        (WebKit::WebApplicationCacheManager::deleteAllEntries):
12609        * WebProcess/Cookies/WebCookieManager.cpp:
12610        (WebKit::WebCookieManager::getHostnamesWithCookies):
12611        (WebKit::WebCookieManager::deleteCookiesForHostname):
12612        (WebKit::WebCookieManager::deleteAllCookies):
12613        (WebKit::WebCookieManager::startObservingCookieChanges):
12614        (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
12615        (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
12616        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
12617        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
12618        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
12619        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
12620        * WebProcess/MediaCache/WebMediaCacheManager.cpp:
12621        (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
12622        (WebKit::WebMediaCacheManager::clearCacheForHostname):
12623        (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
12624        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
12625        (WebKit::WebResourceCacheManager::getCacheOrigins):
12626        (WebKit::WebResourceCacheManager::clearCacheForOrigin):
12627        (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
12628        * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
12629        (WebKit::WebDatabaseManager::getDatabasesByOrigin):
12630        (WebKit::WebDatabaseManager::getDatabaseOrigins):
12631        (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
12632        (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
12633        (WebKit::WebDatabaseManager::deleteAllDatabases):
12634        (WebKit::WebDatabaseManager::setQuotaForOrigin):
12635
126362011-03-30  Adam Roben  <aroben@apple.com>
12637
12638        Mac build fix after r82442
12639
12640        * WebProcess/Plugins/PluginProxy.cpp:
12641        (WebKit::PluginProxy::geometryDidChange): Added a missing argument.
12642
126432011-03-29  Adam Roben  <aroben@apple.com>
12644
12645        Add a way to specify that a ShareableBitmap has no alpha channel
12646
12647        Before this patch, all ShareableBitmaps had an alpha channel. With this patch, all
12648        ShareableBitmaps *still* have an alpha channel. But now there's a way to specify you don't
12649        want one (which will be used in the future)!
12650
12651        Fixes <http://webkit.org/b/57388> Need a way to specify that a ShareableBitmap has no alpha
12652        channel
12653
12654        Reviewed by Anders Carlsson.
12655
12656        * Shared/ShareableBitmap.cpp:
12657        (WebKit::ShareableBitmap::Handle::Handle): Moved here from the header file, and added
12658        initialization of m_flags.
12659
12660        (WebKit::ShareableBitmap::Handle::encode):
12661        (WebKit::ShareableBitmap::Handle::decode):
12662        Encode/decode m_flags.
12663
12664        (WebKit::ShareableBitmap::create):
12665        (WebKit::ShareableBitmap::createShareable):
12666        Pass along the new Flags argument.
12667
12668        (WebKit::ShareableBitmap::createHandle): Store our Flags on the Handle.
12669        (WebKit::ShareableBitmap::ShareableBitmap): Store the Flags in m_flags.
12670
12671        * Shared/ShareableBitmap.h: Added Flag, Flags, and m_flags, and added a Flags argument to
12672        some create functions.
12673
12674        * Shared/WebCoreArgumentCoders.cpp:
12675        (CoreIPC::encodeImage):
12676        * Shared/WebImage.cpp:
12677        (WebKit::WebImage::create):
12678        Specify that we want a bitmap that supports alpha to maintain current behavior.
12679
12680        * Shared/cg/ShareableBitmapCG.cpp:
12681        (WebKit::bitmapInfo): New helper function. Includes an alpha channel only if specified in
12682        the flags.
12683
12684        (WebKit::ShareableBitmap::createGraphicsContext):
12685        (WebKit::ShareableBitmap::makeCGImage):
12686        Use the new helper function.
12687
12688        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
12689        (WebKit::NetscapePlugin::snapshot):
12690        * WebProcess/Plugins/PluginProxy.cpp:
12691        (WebKit::PluginProxy::geometryDidChange):
12692        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
12693        (WebKit::convertImageToBitmap):
12694        * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
12695        (WebKit::WebPopupMenu::setUpPlatformData):
12696        * WebProcess/WebPage/DrawingAreaImpl.cpp:
12697        (WebKit::DrawingAreaImpl::display):
12698        * WebProcess/WebPage/FindController.cpp:
12699        (WebKit::FindController::updateFindIndicator):
12700        Specify that we want a bitmap that supports alpha to maintain current behavior.
12701
127022011-03-29  Adam Roben  <aroben@apple.com>
12703
12704        Add ShareableBitmap::Handle
12705
12706        This object is used for encoding/decoding a ShareableBitmap via CoreIPC. It currently just
12707        encapsulates a SharedMemory::Handle (which is what we were using previously) and the image's
12708        size (which means callers no longer need to deal with the size explicitly), but in the
12709        future could be used to store more information about the bitmap.
12710
12711        This should cause no behavior changes.
12712
12713        Fixes <http://webkit.org/b/57397> ShareableBitmap needs its own Handle type
12714
12715        Reviewed by Anders Carlsson.
12716
12717        * PluginProcess/PluginControllerProxy.cpp:
12718        (WebKit::PluginControllerProxy::geometryDidChange): No longer need to pass a size to create,
12719        since the Handle records the size.
12720        (WebKit::PluginControllerProxy::snapshot): No longer need the bufferSize argument, since the
12721        Handle records the size.
12722
12723        * PluginProcess/PluginControllerProxy.h:
12724        * PluginProcess/PluginControllerProxy.messages.in:
12725        Updated Handle types and removed unnecessary size argument to Snapshot.
12726
12727        * Shared/PlatformPopupMenuData.cpp:
12728        (WebKit::PlatformPopupMenuData::encode):
12729        (WebKit::PlatformPopupMenuData::decode):
12730        * Shared/PlatformPopupMenuData.h:
12731        Changed to use ShareableBitmap::Handle and removed m_backingStoreSize, which is now stored
12732        in the Handles.
12733
12734        * Shared/ShareableBitmap.cpp:
12735        (WebKit::ShareableBitmap::Handle::encode):
12736        (WebKit::ShareableBitmap::Handle::decode):
12737        Simple encode/decode functions.
12738
12739        (WebKit::ShareableBitmap::create): Get the size from the Handle instead of as a separate
12740        argument.
12741        (WebKit::ShareableBitmap::createHandle): Store our size in the Handle.
12742
12743        * Shared/ShareableBitmap.h: Added ShareableBitmap::Handle and made some functions use it.
12744
12745        * Shared/UpdateInfo.h: Changed to use ShareableBitmap::Handle.
12746
12747        * Shared/UserMessageCoders.h:
12748        (WebKit::UserMessageEncoder::baseEncode):
12749        (WebKit::UserMessageDecoder::baseDecode):
12750        * Shared/WebCoreArgumentCoders.cpp:
12751        (CoreIPC::encodeImage):
12752        (CoreIPC::decodeImage):
12753        Use the size stored in the Handle instead of encoding/decoding one separately.
12754
12755        * UIProcess/API/mac/PageClientImpl.h:
12756        * UIProcess/API/mac/PageClientImpl.mm:
12757        (WebKit::PageClientImpl::setDragImage):
12758        Removed the unnecessary imageSize argument. We can get it from the image itself.
12759
12760        * UIProcess/BackingStore.cpp:
12761        (WebKit::BackingStore::incorporateUpdate):
12762        * UIProcess/FindIndicator.cpp:
12763        (WebKit::FindIndicator::create):
12764        No longer need to pass a size when creating a ShareableBitmap from a Handle.
12765
12766        * UIProcess/FindIndicator.h: Changed to use ShareableBitmap::Handle.
12767
12768        * UIProcess/PageClient.h: Removed unnecessary imageSize argument from setDragImage.
12769
12770        * UIProcess/WebPageProxy.cpp:
12771        (WebKit::WebPageProxy::setFindIndicator):
12772        * UIProcess/WebPageProxy.h:
12773        * UIProcess/WebPageProxy.messages.in:
12774        * UIProcess/mac/WebPageProxyMac.mm:
12775        (WebKit::WebPageProxy::setDragImage):
12776        * WebProcess/Plugins/PluginProxy.cpp:
12777        (WebKit::PluginProxy::snapshot):
12778        (WebKit::PluginProxy::geometryDidChange):
12779        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
12780        (WebKit::WebDragClient::startDrag):
12781        Changed to use ShareableBitmap::Handle and removed now-unnecessary size arguments (since we
12782        can get the size from the Handle).
12783
12784        * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
12785        (WebKit::WebPopupMenu::setUpPlatformData): Don't need to store the backing store size in the
12786        data anymore; the Handles will make sure it reaches the other process.
12787
12788        * WebProcess/WebPage/FindController.cpp:
12789        (WebKit::FindController::updateFindIndicator):
12790        (WebKit::FindController::hideFindIndicator):
12791        Changed to use ShareableBitmap::Handle.
12792
127932011-03-30  Alejandro G. Castro  <alex@igalia.com>
12794
12795        Fix GTK build after r81980.
12796
12797        * GNUmakefile.am:
12798
127992011-03-29  Beth Dakin  <bdakin@apple.com>
12800
12801        Reviewed by Maciej Stachowiak.
12802
12803        Fix for https://bugs.webkit.org/show_bug.cgi?id=57408 
12804        webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard 
12805        -and corresponding-
12806        <rdar://problem/8665411>
12807
12808        * Shared/WebPageCreationParameters.cpp:
12809        (WebKit::WebPageCreationParameters::encode):
12810        (WebKit::WebPageCreationParameters::decode):
12811        * Shared/WebPageCreationParameters.h:
12812        * UIProcess/API/mac/PageClientImpl.h:
12813        * UIProcess/API/mac/PageClientImpl.mm:
12814        (WebKit::PageClientImpl::userSpaceScaleFactor):
12815        * UIProcess/API/qt/qwkpage_p.h:
12816        (QWKPagePrivate::userSpaceScaleFactor):
12817        * UIProcess/PageClient.h:
12818        * UIProcess/WebPageProxy.cpp:
12819        (WebKit::WebPageProxy::creationParameters):
12820        * UIProcess/gtk/WebView.h:
12821        (WebKit::WebView::userSpaceScaleFactor):
12822        * UIProcess/win/WebView.h:
12823        (WebKit::WebView::userSpaceScaleFactor):
12824        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
12825        (WebKit::WebChromeClient::scaleFactor):
12826        * WebProcess/WebPage/WebPage.cpp:
12827        (WebKit::WebPage::WebPage):
12828        * WebProcess/WebPage/WebPage.h:
12829        (WebKit::WebPage::userSpaceScaleFactor):
12830
128312011-03-29  Brent Fulgham  <bfulgham@webkit.org>
12832
12833        Unreviewed WinCairo build fix.
12834
12835        Bring DownloadCurl implementation stubs in line with current
12836        CFNetwork API.
12837
12838        * WebProcess/Downloads/curl/DownloadCurl.cpp:
12839        (WebKit::Download::receivedCredential):
12840        (WebKit::Download::receivedRequestToContinueWithoutCredential):
12841        (WebKit::Download::receivedCancellation):
12842
128432011-03-29  Chris Fleizach  <cfleizach@apple.com>
12844
12845        Reviewed by Darin Adler.
12846
12847        AX: WK2: When creating the window remote token, use what's returned from accessibility
12848        https://bugs.webkit.org/show_bug.cgi?id=57398
12849
12850        This will allow a specific WKView to override what's used for the window attribute of the
12851        HTML elements.
12852
12853        * UIProcess/API/mac/WKView.mm:
12854        (-[WKView viewDidMoveToWindow]):
12855
128562011-03-29  Jeff Miller  <jeffm@apple.com>
12857
12858        Reviewed by Sam Weinig.
12859
12860        Make Windows-only InjectedBundle functions platform-specific
12861        https://bugs.webkit.org/show_bug.cgi?id=57385
12862        
12863        Added files for Windows-specific WKBundle functions.
12864        Removed stub wrappers for InjectedBundle::setHostAllowsAnyHTTPSCertificate() and InjectedBundle::setClientCertificate() from non-Windows platforms.
12865
12866        * WebProcess/InjectedBundle/API/c/WKBundle.cpp: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.cpp.
12867        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.h.
12868        * WebProcess/InjectedBundle/API/c/win: Added.
12869        * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp: Added.
12870        (WKBundleSetHostAllowsAnyHTTPSCertificate): Moved from WKBundle.cpp.
12871        (WKBundleSetClientCertificate): Moved from WKBundle.cpp.
12872        * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Added.
12873        * WebProcess/InjectedBundle/InjectedBundle.h: setHostAllowsAnyHTTPSCertificate() and setClientCertificate() are Windows-only.
12874        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
12875        * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
12876        * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
12877        * win/WebKit2.vcproj: Added WKBundlePrivateWin.cpp and WKBundlePrivateWin.h.
12878        * win/WebKit2Generated.make: Copy WKBundlePrivateWin.h.
12879
128802011-03-29  Anders Carlsson  <andersca@apple.com>
12881
12882        Fix Windows build.
12883
12884        * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
12885        (WebKit::Download::receivedCredential):
12886        (WebKit::Download::receivedRequestToContinueWithoutCredential):
12887        (WebKit::Download::receivedCancellation):
12888
128892011-03-29  Anders Carlsson  <andersca@apple.com>
12890
12891        Reviewed by Sam Weinig.
12892
12893        Downloads: Authentication support
12894        https://bugs.webkit.org/show_bug.cgi?id=57403
12895        <rdar://problem/8691166>
12896
12897        * UIProcess/API/C/WKContext.h:
12898        Add didReceiveAuthenticationChallenge callback.
12899
12900        * UIProcess/Downloads/DownloadProxy.cpp:
12901        (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
12902        Call the download client.
12903
12904        * UIProcess/Downloads/DownloadProxy.messages.in:
12905        Add DidReceiveAuthenticationChallenge message.
12906
12907        * UIProcess/WebDownloadClient.cpp:
12908        (WebKit::WebDownloadClient::didReceiveAuthenticationChallenge):
12909        Call the client callback function.
12910
12911        * UIProcess/WebDownloadClient.h:
12912        * WebProcess/Authentication/AuthenticationManager.cpp:
12913        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
12914        Send the DidReceiveAuthenticationChallenge message to the download proxy.
12915
12916        (WebKit::AuthenticationManager::useCredentialForChallenge):
12917        (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
12918        (WebKit::AuthenticationManager::cancelChallenge):
12919        If the authentication client is null, call the static download member functions.
12920
12921        * WebProcess/Authentication/AuthenticationManager.h:
12922        * WebProcess/Downloads/Download.cpp:
12923        (WebKit::Download::didReceiveAuthenticationChallenge):
12924        Call the authentication manager.
12925
12926        * WebProcess/Downloads/Download.h:
12927        * WebProcess/Downloads/mac/DownloadMac.mm:
12928        (WebKit::Download::receivedCredential):
12929        (WebKit::Download::receivedRequestToContinueWithoutCredential):
12930        (WebKit::Download::receivedCancellation):
12931        Call the right sender methods.
12932
12933        (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
12934        (-[WKDownloadAsDelegate downloadShouldUseCredentialStorage:]):
12935        Call the right Download member functions.
12936
12937        * WebProcess/Downloads/qt/DownloadQt.cpp:
12938        (WebKit::Download::receivedCredential):
12939        (WebKit::Download::receivedRequestToContinueWithoutCredential):
12940        (WebKit::Download::receivedCancellation):
12941        * WebProcess/Downloads/soup/DownloadSoup.cpp:
12942        (WebKit::Download::receivedCredential):
12943        (WebKit::Download::receivedRequestToContinueWithoutCredential):
12944        (WebKit::Download::receivedCancellation):
12945        Add stubs.
12946
129472011-03-29  Anders Carlsson  <andersca@apple.com>
12948
12949        Reviewed by Sam Weinig.
12950
12951        AuthenticationChallengeProxy objects should be associated with processes, not pages
12952        https://bugs.webkit.org/show_bug.cgi?id=57401
12953
12954        * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
12955        (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
12956        (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
12957        (WebKit::AuthenticationChallengeProxy::useCredential):
12958        (WebKit::AuthenticationChallengeProxy::cancel):
12959        * UIProcess/Authentication/AuthenticationChallengeProxy.h:
12960        (WebKit::AuthenticationChallengeProxy::create):
12961        * UIProcess/WebPageProxy.cpp:
12962        (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
12963
129642011-03-29  Sam Weinig  <sam@webkit.org>
12965
12966        Reviewed by Anders Carlsson.
12967
12968        Use LocalizedStrings.h as a bottleneck for localized strings instead of
12969        using UI_STRING.
12970
12971        * UIProcess/API/mac/WKView.mm:
12972        (-[WKView validateUserInterfaceItem:]):
12973        Call existing localization functions instead of using UI_STRING.
12974
12975        (-[WKView _getTextInputState:selectionEnd:underlines:]):
12976        Remove unnecessary WebCore:: prefix.
12977
129782011-03-29  Chang Shu  <cshu@webkit.org>
12979
12980        Reviewed by Kenneth Rohde Christiansen.
12981
12982        WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs
12983        https://bugs.webkit.org/show_bug.cgi?id=42692
12984
12985        * Shared/WebPreferencesStore.cpp:
12986        (WebKit::WebPreferencesStore::decode):
12987        (WebKit::WebPreferencesStore::overrideAllowUniversalAccessFromFileURLsForTestRunner):
12988        * Shared/WebPreferencesStore.h:
12989        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
12990        (WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner):
12991        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
12992        * WebProcess/InjectedBundle/InjectedBundle.cpp:
12993        (WebKit::InjectedBundle::overrideAllowUniversalAccessFromFileURLsForTestRunner):
12994        * WebProcess/InjectedBundle/InjectedBundle.h:
12995
129962011-03-29  Timothy Hatcher  <timothy@apple.com>
12997
12998        Update the order of the context menu to better match AppKit on Mac.
12999
13000        <rdar://problem/9054893>
13001
13002        Reviewed by John Sullivan.
13003
13004        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
13005        (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
13006        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
13007
130082011-03-29  Jeff Miller  <jeffm@apple.com>
13009
13010        Fix formatting of WebKit2.vcproj after r82283.
13011
13012        * win/WebKit2.vcproj:
13013
130142011-03-29  Martin Robinson  <mrobinson@igalia.com>
13015
13016        [GTK] Build failed with ‘GDK_KEY_KP_Space’ was not declared in this scope
13017        https://bugs.webkit.org/show_bug.cgi?id=55314
13018
13019        Build fix for older versions of GTK+. Use the deprecated names for GDK key
13020        defines and include GtkVersioning.h to allow building on newer versions
13021        of GTK+.
13022
13023        * Shared/gtk/WebEventFactory.cpp:
13024        (WebKit::isGdkKeyCodeFromKeyPad): Update key defines.
13025
130262011-03-29  Steve Falkenburg  <sfalken@apple.com>
13027
13028        Reviewed by Darin Adler.
13029
13030        Use per-configuration vsprops in WebKit to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
13031        https://bugs.webkit.org/show_bug.cgi?id=57383
13032
13033        Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
13034        InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
13035        the IDE. To avoid this, add a separate vsprops file for each project configuration that
13036        contains the required inherited property sheets.
13037
13038        * win/WebKit2.vcproj:
13039        * win/WebKit2Debug.vsprops: Added.
13040        * win/WebKit2DebugAll.vsprops: Added.
13041        * win/WebKit2DebugCairoCFLite.vsprops: Added.
13042        * win/WebKit2Release.vsprops: Added.
13043        * win/WebKit2ReleaseCairoCFLite.vsprops: Added.
13044        * win/WebKit2ReleaseLTCG.vsprops: Added.
13045        * win/WebKit2WebProcess.vcproj:
13046        * win/WebKit2WebProcessDebug.vsprops: Added.
13047        * win/WebKit2WebProcessDebugAll.vsprops: Added.
13048        * win/WebKit2WebProcessDebugCairoCFLite.vsprops: Added.
13049        * win/WebKit2WebProcessRelease.vsprops: Added.
13050        * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: Added.
13051        * win/WebKit2WebProcessReleaseLTCG.vsprops: Added.
13052
130532011-03-29  Jessie Berlin  <jberlin@apple.com>
13054
13055        Reviewed by Anders Carlsson.
13056
13057        WebKit2: The WebProcess should be relaunched if necessary when WebKit2 is asked for
13058        information about Cookies, Databases, Local Storage, etc.
13059        https://bugs.webkit.org/show_bug.cgi?id=57374
13060
13061        Instead of bailing when the WebProcess is not valid, call relaunchProcessIfNecessary().
13062
13063        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
13064        (WebKit::WebPluginSiteDataManager::getSitesWithData):
13065        (WebKit::WebPluginSiteDataManager::clearSiteData):
13066        * UIProcess/WebApplicationCacheManagerProxy.cpp:
13067        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
13068        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
13069        (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
13070        * UIProcess/WebCookieManagerProxy.cpp:
13071        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
13072        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
13073        (WebKit::WebCookieManagerProxy::deleteAllCookies):
13074        (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
13075        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
13076        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
13077        * UIProcess/WebDatabaseManagerProxy.cpp:
13078        (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
13079        (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
13080        (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
13081        (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
13082        (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
13083        (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
13084        * UIProcess/WebKeyValueStorageManagerProxy.cpp:
13085        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
13086        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
13087        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
13088        * UIProcess/WebMediaCacheManagerProxy.cpp:
13089        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
13090        (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
13091        (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
13092        * UIProcess/WebResourceCacheManagerProxy.cpp:
13093        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
13094        (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
13095        (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
13096
130972011-03-29  Jeff Miller  <jeffm@apple.com>
13098
13099        Reviewed by Darin Adler.
13100
13101        WebKit2: Support setting the client certificate on Windows
13102        https://bugs.webkit.org/show_bug.cgi?id=57368
13103        
13104        Allow setting the client certificate for a host via the injected bundle.
13105        This requires the ability for Webkit2 Windows clients to create a WKCertificateInfo from a PCCERT_CONTEXT so they can send it to the web process.
13106
13107        * Shared/API/c/win/WKCertificateInfoWin.cpp:
13108        (WKCertificateInfoCreateWithCertificate): Added.
13109        * Shared/API/c/win/WKCertificateInfoWin.h: Added WKCertificateInfoCreateWithCertificate().
13110        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
13111        (WKBundleSetClientCertificate): Added.
13112        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetClientCertificate().
13113        * WebProcess/InjectedBundle/InjectedBundle.h: Added setClientCertificate().
13114        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
13115        (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
13116        * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
13117        (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
13118        * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
13119        (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
13120        * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
13121        (WebKit::InjectedBundle::setClientCertificate): Added.
13122
131232011-03-29  Timothy Hatcher  <timothy@apple.com>
13124
13125        Make WebKit2 work with update-webkit-localizable-strings.
13126
13127        https://webkit.org/b/57354
13128
13129        Reviewed by Sam Weinig.
13130
13131        * PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
13132        * Shared/WebLocalizableStrings.h: Added.
13133        * UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
13134        * UIProcess/mac/WebInspectorProxyMac.mm:
13135        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME.
13136        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros.
13137        Use WebLocalizableStrings.h.
13138        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
13139        (registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h.
13140        * WebProcess/mac/WebProcessMac.mm:
13141        (WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME.
13142
13143        * GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
13144        * WebKit2.pro: Ditto.
13145        * WebKit2.xcodeproj/project.pbxproj: Ditto.
13146        * win/WebKit2.vcproj: Ditto.
13147
131482011-03-29  Jeff Miller  <jeffm@apple.com>
13149
13150        Reviewed by Darin Adler.
13151
13152        CoreIPC::decodeResourceError() leaks a CFDataRef
13153        https://bugs.webkit.org/show_bug.cgi?id=57366
13154
13155        * Shared/win/WebCoreArgumentCodersWin.cpp:
13156        (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.
13157
131582011-03-29  Anders Carlsson  <andersca@apple.com>
13159
13160        Reviewed by Sam Weinig.
13161
13162        Allow the AppleConnect plug-in to use the QuickDraw drawing model
13163        https://bugs.webkit.org/show_bug.cgi?id=57365
13164        <rdar://problem/8712320>
13165
13166        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
13167        (WebKit::NetscapePluginModule::determineQuirks):
13168        * Shared/Plugins/PluginQuirks.h:
13169        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
13170        (WebKit::NetscapePlugin::platformPostInitialize):
13171
131722011-03-29  Darin Adler  <darin@apple.com>
13173
13174        Reviewed by Adam Roben.
13175
13176        WebKit2 bundle page needs to offer generated file hooks
13177        https://bugs.webkit.org/show_bug.cgi?id=57279
13178
13179        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added shouldGenerateFileForUpload and
13180        generateFileForUpload callback pointers.
13181
13182        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
13183        (WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Added.
13184        (WebKit::InjectedBundlePageUIClient::generateFileForUpload): Added.
13185        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added functions above.
13186
13187        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
13188        (WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Implemented by
13189        calling the functions above.
13190        (WebKit::WebChromeClient::generateReplacementFile): Ditto.
13191
131922011-03-29  Anders Carlsson  <andersca@apple.com>
13193
13194        Reviewed by Darin Adler.
13195
13196        Assertion failure in plug-in process with clang-built 32/64-bit WebKit2
13197        https://bugs.webkit.org/show_bug.cgi?id=57359
13198
13199        Don't use __alignof when encoding and decoding scalar types.
13200        
13201        Darwin 32-bit, double and unsigned long long are 4-byte aligned but on 64-bit they're
13202        8-byte aligned which causes problems when doing IPC between 32-bit and 64-bit processes.
13203        GCC is buggy and returns 8, but clang is correct and returns 4. Use sizeof instead which we know
13204        is equal to or greater than the alignment.
13205
13206        * Platform/CoreIPC/ArgumentDecoder.cpp:
13207        (CoreIPC::ArgumentDecoder::decodeBool):
13208        (CoreIPC::ArgumentDecoder::decodeUInt32):
13209        (CoreIPC::ArgumentDecoder::decodeUInt64):
13210        (CoreIPC::ArgumentDecoder::decodeInt32):
13211        (CoreIPC::ArgumentDecoder::decodeInt64):
13212        (CoreIPC::ArgumentDecoder::decodeFloat):
13213        (CoreIPC::ArgumentDecoder::decodeDouble):
13214        * Platform/CoreIPC/ArgumentEncoder.cpp:
13215        (CoreIPC::ArgumentEncoder::encodeBool):
13216        (CoreIPC::ArgumentEncoder::encodeUInt32):
13217        (CoreIPC::ArgumentEncoder::encodeUInt64):
13218        (CoreIPC::ArgumentEncoder::encodeInt32):
13219        (CoreIPC::ArgumentEncoder::encodeInt64):
13220        (CoreIPC::ArgumentEncoder::encodeFloat):
13221        (CoreIPC::ArgumentEncoder::encodeDouble):
13222
132232011-03-29  Brent Fulgham  <bfulgham@webkit.org>
13224
13225        Unreviewed build fix after r81928.
13226
13227        * win/WebKit2.vcproj: Don't build CG-specific icon routines
13228        for WinCairo port.
13229
132302011-03-29  Sam Weinig  <sam@webkit.org>
13231
13232        Reviewed by Anders Carlsson.
13233
13234        Reproducible crash running under libgmalloc, in -[WKView(Internal) removeTrackingRect:] --&gt; objc_assign_ivar_non_gc
13235        <rdar://problem/9193352>
13236        https://bugs.webkit.org/show_bug.cgi?id=57358
13237
13238        -[WKView removeTrackingRect] can be called from below -[WKView dealloc] after we have
13239        destroyed _data. So, nil out _data after releasing it and nil check it appropriately.
13240        
13241        * UIProcess/API/mac/WKView.mm:
13242        (-[WKView dealloc]):
13243        Nil out _data after releasing it.
13244
13245        (-[WKView removeTrackingRect:]):
13246        Add early return for nil _data.
13247
132482011-03-29  Jeff Miller  <jeffm@apple.com>
13249
13250        Reviewed by Jon Honeycutt.
13251
13252        Add WebCore::copyCertificateToData() on Windows
13253        https://bugs.webkit.org/show_bug.cgi?id=57296
13254        
13255        Remove duplicate code that implemented this functionality in WebCoreArgumentCodersWin.cpp and use WebCore::copyCertificateToData() instead. 
13256
13257        * Shared/win/WebCoreArgumentCodersWin.cpp:
13258        (CoreIPC::decodeResourceError): Use WebCore::copyCertificateToData().
13259
132602011-03-29  Balazs Kelemen  <kbalazs@webkit.org>
13261
13262        Unreviewed build fix (64 bit gcc).
13263
13264        GCC does not accept uint64_t formatted as %lli.
13265
13266        * UIProcess/WebIconDatabase.cpp:
13267        (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Add explicit cast to long long.
13268
132692011-03-28  Maciej Stachowiak  <mjs@apple.com>
13270
13271        Reviewed by Dan Bernstein.
13272
13273        WKPageGetSourceForFrame and WKPageGetContentsAsString should throw an error in case of a race with page loading
13274        https://bugs.webkit.org/show_bug.cgi?id=57305
13275        <rdar://problem/8738060>, <rdar://problem/8780168>
13276
13277        * UIProcess/WebPageProxy.cpp:
13278        (WebKit::WebPageProxy::close): Clear m_loadDependentStringCallbackIDs
13279        (WebKit::WebPageProxy::getSourceForFrame): track the callback as load dependent
13280        (WebKit::WebPageProxy::getContentsAsString): ditto
13281        (WebKit::WebPageProxy::clearLoadDependentCallbacks): Invalidate all load dependent callbacks
13282        (WebKit::WebPageProxy::didCommitLoadForFrame): Call clearLoadDependentCallbacks
13283        (WebKit::WebPageProxy::didFailLoadForFrame): ditto
13284        (WebKit::WebPageProxy::stringCallback): Remove callback from load dependent set if appropriate
13285        (WebKit::WebPageProxy::processDidCrash): Clear m_loadDependentStringCallbackIDs
13286        * UIProcess/WebPageProxy.h: Add m_loadDependentStringCallbackIDs hash set.
13287
132882011-03-28  Patrick Gansterer  <paroga@webkit.org>
13289
13290        Reviewed by Darin Adler.
13291
13292        Use String instead of CString as return value of openTemporaryFile
13293        https://bugs.webkit.org/show_bug.cgi?id=55332
13294
13295        * Shared/WebMemorySampler.cpp:
13296        (WebKit::WebMemorySampler::initializeTempLogFile):
13297        * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
13298        (WebKit::NetscapePluginStream::stop):
13299        * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
13300
133012011-03-28  Brian Weinstein  <bweinstein@apple.com>
13302
13303        Reviewed by Jon Honeycutt.
13304
13305        WebKit2: Downloads started with DownloadCFNet::start never start
13306        https://bugs.webkit.org/show_bug.cgi?id=57268
13307
13308        * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
13309        (WebKit::Download::start): Call CFURLDownloadStart on the download we create.
13310
133112011-03-28  Anders Carlsson  <andersca@apple.com>
13312
13313        Fix Windows build.
13314
13315        * Shared/ShareableBitmap.h:
13316
133172011-03-28  Anders Carlsson  <andersca@apple.com>
13318
13319        Reviewed by Sam Weinig.
13320
13321        Beep when pressing a menu key equivalent when a plug-in has focus
13322        https://bugs.webkit.org/show_bug.cgi?id=57264
13323        <rdar://problem/8935597>
13324
13325        We don't want the WKTextInputWindowController inputContext to be involved in interpretKeyEvents.
13326
13327        * UIProcess/API/mac/WKView.mm:
13328        (-[WKView inputContext]):
13329
133302011-03-28  Anders Carlsson  <andersca@apple.com>
13331
13332        Reviewed by Sam Weinig.
13333
13334        CGImageRefs must hold a strong reference to underlying data
13335        https://bugs.webkit.org/show_bug.cgi?id=57263
13336        <rdar://problem/9146179>
13337
13338        Make paintBitmapContext use CGBitmapContextCreateImage, which creates a copy-on-write copy
13339        of the bitmap data. Also, add ShareableBitmap::makeCGImageCopy which does the same thing, and
13340        ShareableBitmap::makeCGImage in the cases where we know that the ShareableBitmap data will never change.
13341
13342        * Platform/cg/CGUtilities.cpp:
13343        (WebKit::paintImage):
13344        Factor image painting code out into a separate function.
13345
13346        (WebKit::paintBitmapContext):
13347        Call paintImage.
13348
13349        * Shared/API/c/cg/WKImageCG.cpp:
13350        (WKImagemakeCGImage):
13351        Use ShareableBitmap::makeCGImageCopy.
13352
13353        * Shared/ShareableBitmap.h:
13354        * Shared/cg/ShareableBitmapCG.cpp:
13355        (WebKit::ShareableBitmap::createGraphicsContext):
13356        (WebKit::ShareableBitmap::paint):
13357        (WebKit::ShareableBitmap::makeCGImageCopy):
13358        (WebKit::ShareableBitmap::makeCGImage):
13359        (WebKit::ShareableBitmap::releaseBitmapContextData):
13360        (WebKit::ShareableBitmap::releaseDataProviderData):
13361        Add makeCGImage and makeCGImageCopy.
13362
13363        * Shared/cg/WebCoreArgumentCodersCG.cpp:
13364        (CoreIPC::createImage):
13365        Use ShareableBitmap::makeCGImage.
13366        
13367        * UIProcess/API/mac/PageClientImpl.mm:
13368        (WebKit::PageClientImpl::setDragImage):
13369        Use ShareableBitmap::makeCGImage and plug a CGImageRef leak.
13370
133712011-03-28  Alexey Proskuryakov  <ap@apple.com>
13372
13373        Build fix.
13374
13375        * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): It's not "event" in this function, it's
13376        "theEvent".
13377
133782011-03-28  Alexey Proskuryakov  <ap@apple.com>
13379
13380        Reviewed by Darin Adler.
13381
13382        https://bugs.webkit.org/show_bug.cgi?id=57260
13383        Clean up text input code a little
13384
13385        * UIProcess/API/mac/WKView.mm:
13386        (-[WKView doCommandBySelector:]): This NSTextInput protocol method lacked a LOG() call.
13387        (-[WKView keyDown:]): Added (possibly useless) event protection to match performKeyEquivalent:
13388        and also WebKit1.
13389
13390        * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment.
13391
133922011-03-28  Jeff Miller  <jeffm@apple.com>
13393
13394        Reviewed by Adam Roben.
13395
13396        ResourceError::certificate() should return a PCCERT_CONTEXT
13397        https://bugs.webkit.org/show_bug.cgi?id=57262
13398
13399        * Shared/win/PlatformCertificateInfo.cpp:
13400        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Don't assert if no PCCERT_CONTEXT is specified.
13401        * Shared/win/WebCoreArgumentCodersWin.cpp:
13402        (CoreIPC::encodeResourceError): Removed unneeded code now that ResourceError::certificate() returns a PCCERT_CONTEXT.
13403
134042011-03-28  Jeff Miller  <jeffm@apple.com>
13405
13406        Rubber-stamped by Adam Roben.
13407
13408        Remove unused CFErrorRef.
13409
13410        * Shared/win/WebCoreArgumentCodersWin.cpp:
13411        (CoreIPC::encodeResourceError): Remove unused CFErrorRef.
13412
134132011-03-28  Jeff Miller  <jeffm@apple.com>
13414
13415        Reviewed by Adam Roben.
13416
13417        Include certificate when sending a WebCore::ResourceError to UI process on Windows
13418        https://bugs.webkit.org/show_bug.cgi?id=57195
13419        
13420        Add support for sending the certificate with the WebCore::ResourceError.
13421
13422        * Shared/win/WebCoreArgumentCodersWin.cpp:
13423        (CoreIPC::encodeResourceError): Encode certificate data.
13424        (CoreIPC::deallocCertContext): Added.
13425        (CoreIPC::createCertContextDeallocator): Added.
13426        (CoreIPC::copyCert): Added.
13427        (CoreIPC::decodeResourceError): Decode certificate data.
13428
134292011-03-27  Andy Estes  <aestes@apple.com>
13430
13431        Reviewed by Maciej Stachowiak.
13432
13433        Correctly get a plug-in's MIME type when it uses WebPluginMIMETypesFilename
13434        https://bugs.webkit.org/show_bug.cgi?id=57205
13435        
13436        If the plug-in's Info.plist uses WebPluginMIMETypesFilename to specify
13437        plug-in MIME types, WebKit has to check for a property list file in
13438        ~/Library/Preferences for the MIME type dictionary.
13439
13440        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
13441        (WebKit::getMIMETypesFromPluginBundle): If the bundle's Info dictionary
13442        has the key WebPluginMIMETypesFilename, open the property list
13443        specified by that key's value and return the MIME type dictionary from
13444        there. Otherwise, return the MIME type dictionary specified by the key
13445        WebPluginMIMETypes.
13446        (WebKit::getPluginInfoFromPropertyLists): Call
13447        getMIMETypesFromPluginBundle().
13448
134492011-03-27  Jer Noble  <jer.noble@apple.com>
13450
13451        Reviewed by Maciej Stachowiak.
13452
13453        Full Screen: disable keyboard access by default
13454        https://bugs.webkit.org/show_bug.cgi?id=56684
13455
13456        Take into account whether keyboard access was requested when deciding whether full
13457        screen mode is supported.
13458
13459        * UIProcess/WebFullScreenManagerProxy.cpp:
13460        (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
13461        * UIProcess/WebFullScreenManagerProxy.h:
13462        * UIProcess/WebFullScreenManagerProxy.messages.in:
13463        * WebProcess/FullScreen/WebFullScreenManager.cpp:
13464        (WebKit::WebFullScreenManager::supportsFullScreen):
13465        * WebProcess/FullScreen/WebFullScreenManager.h:
13466        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
13467        (WebKit::WebChromeClient::supportsFullScreenForElement):
13468        * WebProcess/WebCoreSupport/WebChromeClient.h:
13469
134702011-03-27  Anders Carlsson  <andersca@apple.com>
13471
13472        Reviewed by Sam Weinig.
13473
13474        Dock doesn't come back after leaving fullscreen on Hulu
13475        https://bugs.webkit.org/show_bug.cgi?id=57189
13476        <rdar://problem/9192413>
13477
13478        Port some code over from the old WebKit1 plug-in host.
13479
13480        * PluginProcess/mac/PluginProcessShim.mm:
13481        (WebKit::shimShowMenuBar):
13482        (WebKit::shimHideMenuBar):
13483        (WebKit::shimIsMenuBarVisible):
13484
134852011-03-27  Anders Carlsson  <andersca@apple.com>
13486
13487        Reviewed by Sam Weinig.
13488
13489        Keep a strong reference to the connection to avoid crashes.
13490
13491        * Platform/CoreIPC/Connection.cpp:
13492
134932011-03-26  Jeff Miller  <jeffm@apple.com>
13494
13495        Reviewed by Sam Weinig.
13496
13497        WKErrorCopyCFError() doesn't actually return a copy of the CFErrorRef
13498        https://bugs.webkit.org/show_bug.cgi?id=57172
13499
13500        * Shared/API/c/cf/WKErrorCF.cpp:
13501        (WKErrorCopyCFError): Use RetainPtr<> and leakRef() to return a real copy.
13502
135032011-03-26  Maciej Stachowiak  <mjs@apple.com>
13504
13505        Revert inadvertently committed changes.
13506
13507        * WebProcess/com.apple.WebProcess.sb:
13508
135092011-03-26  Jer Noble  <jer.noble@apple.com>
13510
13511        Reviewed by Eric Carlson.
13512
13513        Enable the Full Screen API by default in WebKit/mac and WebKit2
13514        https://bugs.webkit.org/show_bug.cgi?id=56956
13515
13516        * Shared/WebPreferencesStore.h: Default the fullScreenEnabled preference to true.
13517
135182011-03-26  Jeff Miller  <jeffm@apple.com>
13519
13520        Reviewed by Steve Falkenburg.
13521
13522        Add PlatformCertificateInfo::PlatformCertificateInfo(PCCERT_CONTEXT) constructor on Windows
13523        https://bugs.webkit.org/show_bug.cgi?id=57152
13524        
13525        We're going to need to create a PlatformCertificateInfo with a single certificate on Windows to support client certificates.
13526        Also, stop relying on the fact that the Win32 API CertDuplicateCertificateContext() currently returns the same PCCERT_CONTEXT that you pass to it, since that may change in the future.
13527
13528        * Shared/win/PlatformCertificateInfo.cpp:
13529        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor. Use return value from CertDuplicateCertificateContext().
13530        (WebKit::PlatformCertificateInfo::operator=): Use return value from CertDuplicateCertificateContext().
13531        * Shared/win/PlatformCertificateInfo.h: Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor.
13532
135332011-03-26  Anders Carlsson  <andersca@apple.com>
13534
13535        Reviewed by Sam Weinig.
13536
13537        Graphic corruption appeared with Silverlight contents while resizing window
13538        https://bugs.webkit.org/show_bug.cgi?id=57167
13539        <rdar://problem/9094052>
13540
13541        Pass DispatchMessageEvenWhenWaitingForSyncReply when sending GeometryDidChange messages since that will guarantee
13542        that those messages will be handled before PaintEntirePlugin messages which prevents the PaintEntirePlugin handler from
13543        painting into the wrong backing store.
13544
13545        * WebProcess/Plugins/PluginProxy.cpp:
13546        (WebKit::PluginProxy::geometryDidChange):
13547
135482011-03-26  Sam Weinig  <sam@webkit.org>
13549
13550        Reviewed by Anders Carlsson.
13551
13552        Web process considered unresponsive (SPOD shown) when displaying a JavaScript alert() as a result of a click
13553        <rdar://problem/9067557>
13554        https://bugs.webkit.org/show_bug.cgi?id=57166
13555
13556        * UIProcess/WebPageProxy.cpp:
13557        (WebKit::WebPageProxy::runJavaScriptAlert):
13558        (WebKit::WebPageProxy::runJavaScriptConfirm):
13559        (WebKit::WebPageProxy::runJavaScriptPrompt):
13560        Invalidate the responsiveness timer before calling out to the client.
13561
135622011-03-26  Anders Carlsson  <andersca@apple.com>
13563
13564        Reviewed by Sam Weinig.
13565
13566        ASSERTION FAILED: m_operationInProgress == NoOperation loading nytimes.com
13567        https://bugs.webkit.org/show_bug.cgi?id=57165
13568        <rdar://problem/9024311>
13569
13570        The assertion fired because during GC, the web process sends a synchronous NPObjectMessageReceiver::Deallocate
13571        message to the plug-in process. Since this is a synchronous message, the web process needs to process incoming synchronous
13572        messages. While waiting, we get an incoming PluginProxy::Evaluate message from the plug-in. This causes JavaScript to run
13573        during GC which is very bad.
13574
13575        The fix for this is to add a flag on the connection that will cause synchronous messages sent by the connection (in this case the
13576        plug-in process) to not be processed while the other side (the web process) is waiting for a synchronous reply _unless_ the connection
13577        is actually processing a synchronous message. (The last part is to avoid deadlocks).
13578
13579        Since the call to NPN_Evaluate by the plug-in (that ends up sending the PluginProxy::Evaluate message) comes from a run loop timer firing,
13580        it's OK to wait for it to be processed by the web process when it returns to the run loop.
13581
13582        * Platform/CoreIPC/Connection.cpp:
13583        (CoreIPC::Connection::Connection):
13584        Initialize m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage and m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount.
13585
13586        (CoreIPC::Connection::setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage):
13587        Set m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage.
13588
13589        (CoreIPC::Connection::sendMessage):
13590        Don't add the MessageID::DispatchMessageWhenWaitingForSyncReply flag when the right flags has been set on the connection, and it's not processing a synchronous message.
13591
13592        (CoreIPC::Connection::dispatchMessage):
13593        Increment and decrement m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount accordingly.
13594
13595        * PluginProcess/WebProcessConnection.cpp:
13596        (WebKit::WebProcessConnection::WebProcessConnection):
13597        Call setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the connection.
13598
135992011-03-26  Sam Weinig  <sam@webkit.org>
13600
13601        Rollout r82042 (If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations))
13602
13603        -[NSString stringByResolvingSymlinksInPath] does not do what we needed for paths within /private.
13604        This caused all SSL sites to stop working.
13605
13606        * WebProcess/mac/WebProcessMac.mm:
13607        (WebKit::appendSandboxParameterPath):
13608        (WebKit::initializeSandbox):
13609
136102011-03-26  Sam Weinig  <sam@webkit.org>
13611
13612        Reviewed by Anders Carlsson.
13613
13614        If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
13615        <rdar://problem/9127411>
13616        https://bugs.webkit.org/show_bug.cgi?id=57164
13617
13618        * WebProcess/mac/WebProcessMac.mm:
13619        (WebKit::appendSandboxParameterPath):
13620        (WebKit::initializeSandbox):
13621        Use -[NSString stringByResolvingSymlinksInPath] instead of realpath to ensure we can resolve
13622        symlinks even if the file/directory doesn't exist yet.
13623
136242011-03-26  Anders Carlsson  <andersca@apple.com>
13625
13626        Reviewed by Sam Weinig.
13627
13628        Factor processing of incoming sync replies out into processIncomingSyncReply
13629        https://bugs.webkit.org/show_bug.cgi?id=57161
13630
13631        * Platform/CoreIPC/Connection.cpp:
13632        (CoreIPC::Connection::sendSyncMessage):
13633        Pass DispatchMessageEvenWhenWaitingForSyncReply to sendMessage.
13634
13635        (CoreIPC::Connection::processIncomingSyncReply):
13636        Move code from processIncomingMessage to here.
13637
13638        (CoreIPC::Connection::processIncomingMessage):
13639        Call processIncomingSyncReply.
13640
136412011-03-26  Sam Weinig  <sam@webkit.org>
13642
13643        Reviewed by Anders Carlsson.
13644
13645        WebKit2: Assert in CoreIPC::typeFromCFTypeRef() when loading a site with an invalid certificate
13646        <rdar://problem/9188041>
13647        https://bugs.webkit.org/show_bug.cgi?id=57159
13648
13649        * Shared/cf/ArgumentCodersCF.cpp:
13650        (CoreIPC::typeFromCFTypeRef):
13651        (CoreIPC::encode):
13652        (CoreIPC::decode):
13653        * Shared/cf/ArgumentCodersCF.h:
13654        Add encoding/decoding for SecCertificateRef type.
13655
13656        * Shared/mac/PlatformCertificateInfo.mm:
13657        (WebKit::PlatformCertificateInfo::encode):
13658        (WebKit::PlatformCertificateInfo::decode):
13659        Use ArgumentCodersCF now that it knows how to encode/decode SecCertificateRefs.
13660
136612011-03-26  Anders Carlsson  <andersca@apple.com>
13662
13663        Reviewed by Sam Weinig.
13664
13665        Handle synchronous replies coming in out of order
13666        https://bugs.webkit.org/show_bug.cgi?id=57158
13667
13668        When processing an incoming reply, don't assume that it belongs to the last sent synchronous request.
13669        Instead, iterate over the m_pendingSyncReplies vector backwards looking for the corresponding request.
13670
13671        * Platform/CoreIPC/Connection.cpp:
13672        (CoreIPC::Connection::processIncomingMessage):
13673
136742011-03-26  Anders Carlsson  <andersca@apple.com>
13675
13676        Reviewed by Sam Weinig.
13677
13678        Fix a possible deadlock when two synchronous messages are sent at the same time
13679        https://bugs.webkit.org/show_bug.cgi?id=57155
13680
13681        Simplify code and fix a possible (although highly improbable) dead lock.
13682
13683        * Platform/CoreIPC/Connection.cpp:
13684        Make SyncMessageState atomically ref counted since it can be ref()'ed from the connection queue.
13685        Get rid of m_waitForSyncReplyCount and add m_didScheduleDispatchMessagesWork.
13686
13687        (CoreIPC::Connection::SyncMessageState::SyncMessageState):
13688        Initialize m_didScheduleDispatchMessagesWork to false.
13689
13690        (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
13691        if m_didScheduleDispatchMessagesWork is false, schedule a call to dispatchMessageAndResetDidScheduleDispatchMessagesWork
13692        on the client run loop.
13693
13694        (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork):
13695        Dispatch messages and set m_didScheduleDispatchMessagesWork back to false.
13696
13697        (CoreIPC::Connection::sendSyncMessage):
13698        Remove calls to beginWaitForSyncReply and endWaitForSyncReply.
13699
137002011-03-25  Sam Weinig  <sam@webkit.org>
13701
13702        Reviewed by Adele Peterson.
13703
13704        WKPageLoadAlternateHTMLString doesn't re-spawn a dead WebProcess, but should
13705        <rdar://problem/9191493>
13706        https://bugs.webkit.org/show_bug.cgi?id=57134
13707
13708        Make all load functions respawn a dead WebProcess for consistency.
13709
13710        * UIProcess/WebPageProxy.cpp:
13711        (WebKit::WebPageProxy::loadHTMLString):
13712        Respawn a dead WebProcess.
13713
13714        (WebKit::WebPageProxy::loadAlternateHTMLString):
13715        Respawn a dead WebProcess.
13716
13717        (WebKit::WebPageProxy::loadPlainTextString):
13718        Respawn a dead WebProcess.
13719
13720        (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
13721        * UIProcess/WebPageProxy.h:
13722        * UIProcess/WebPageProxy.messages.in:
13723        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
13724        (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
13725        * WebProcess/WebPage/WebPage.cpp:
13726        (WebKit::WebPage::loadAlternateHTMLString):
13727        Since we may no longer always have a main frame when calling WKPageLoadAlternateHTMLString,
13728        set the unreachable URL, if there is one, on provisional load.
13729
137302011-03-25  Anders Carlsson  <andersca@apple.com>
13731
13732        Reviewed by Sam Weinig.
13733
13734        PluginView's call to invalidateContentsAndWindow() in invalidateRect() is wrong for plug-ins which paint into compositing layers
13735        https://bugs.webkit.org/show_bug.cgi?id=57133
13736        <rdar://problem/9029442>
13737
13738        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
13739        (WebKit::NetscapePlugin::platformInvalidate):
13740        Return true under the Core Animation drawing model, since that prevents the plug-in from calling PluginController::invalidate.
13741
13742        * WebProcess/Plugins/PluginView.cpp:
13743        (WebKit::PluginView::invalidateRect):
13744        Don't call invalidateContentsAndWindow() if the plug-in has a Core Animation layer.
13745
137462011-03-25  Brady Eidson  <beidson@apple.com>
13747
13748        Reviewed by Sam Weinig.
13749
13750        <rdar://problem/8648311> and https://bugs.webkit.org/show_bug.cgi?id=56425
13751        WebKit2 IconDatabase and API
13752
13753        This gets a basic, usable API in place.
13754        Enhancements can come in other bugs as they're needed.
13755
13756        * UIProcess/API/C/WKIconDatabase.cpp:
13757        (WKIconDatabaseRetainIconForURL):
13758        (WKIconDatabaseReleaseIconForURL):
13759        (WKIconDatabaseEnableDatabaseCleanup):
13760        * UIProcess/API/C/WKIconDatabase.h:
13761        
13762        The first actual accessor for an "icon for a URL" is for a CGImageRef:
13763        * UIProcess/API/C/cg: Added.
13764        * UIProcess/API/C/cg/WKIconDatabaseCG.cpp: Added.
13765        (WKIconDatabaseGetCGImageForURL):
13766        * UIProcess/API/C/cg/WKIconDatabaseCG.h: Added.
13767        
13768        Expose relevant methods to support the above API:
13769        * UIProcess/WebIconDatabase.cpp:
13770        (WebKit::WebIconDatabase::WebIconDatabase): New IconDatabases will have cleanup disabled from the start,
13771          and require a single call to "enableDatabaseCleanup" to allow cleanup.
13772        (WebKit::WebIconDatabase::setDatabasePath):
13773        (WebKit::WebIconDatabase::enableDatabaseCleanup):
13774        (WebKit::WebIconDatabase::imageForPageURL):
13775        * UIProcess/WebIconDatabase.h:
13776        
13777        Project file stuff:
13778        * WebKit2.xcodeproj/project.pbxproj:
13779        * win/WebKit2.vcproj:
13780
137812011-03-25  Jeff Miller  <jeffm@apple.com>
13782
13783        Reviewed by Darin Adler.
13784
13785        Add CoreIPC::encodeResourceError() and CoreIPC::decodeResourceError() for all platforms
13786        https://bugs.webkit.org/show_bug.cgi?id=57125
13787        
13788        Currently, these are only implemented on the Mac, but we're going to need them for Windows as well, so we might as well make them always platform-specific.
13789        In this patch, just replicate the existing common non-Mac implementation in WebCoreArgumentCoders.h to platform-specific files.
13790
13791        * Shared/WebCoreArgumentCoders.h: Move non-Mac implementations of encodeResourceError() and decodeResourceError() to common files.
13792        * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
13793        (CoreIPC::encodeResourceError): Added.
13794        (CoreIPC::decodeResourceError): Added.
13795        * Shared/qt/WebCoreArgumentCodersQt.cpp:
13796        (CoreIPC::encodeResourceError): Added.
13797        (CoreIPC::decodeResourceError): Added.
13798        * Shared/win/WebCoreArgumentCodersWin.cpp:
13799        (CoreIPC::encodeResourceError): Added.
13800        (CoreIPC::decodeResourceError): Added.
13801
138022011-03-25  Andy Estes  <aestes@apple.com>
13803
13804        Reviewed by Adele Peterson.
13805
13806        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
13807        https://bugs.webkit.org/show_bug.cgi?id=49016
13808
13809        Update objectContentType() implementation to handle the
13810        shouldPreferPlugInsForImages flag.
13811
13812        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
13813        (WebKit::WebFrameLoaderClient::objectContentType):
13814        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
13815
138162011-03-25  Brent Fulgham  <bfulgham@webkit.org>
13817
13818        Unreviewed build correction.
13819
13820        Add stubs for WK2 cookie handling with cURL.
13821
13822        * WebProcess/Cookies/curl: Added.
13823        * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added.
13824        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
13825        (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
13826        * win/WebKit2.vcproj:
13827
138282011-03-25  Steve Falkenburg  <sfalken@apple.com>
13829
13830        Reviewed by Brian Weinstein.
13831
13832        Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
13833        https://bugs.webkit.org/show_bug.cgi?id=57119
13834        <rdar://problem/9054148>
13835
13836        This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
13837        not available in WebKit. The plug-in is fairly widespread, since it was included in
13838        a Windows Update push at one point.
13839
13840        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
13841        (WebKit::PluginInfoStore::shouldUsePlugin): Blacklist npwpf.dll.
13842
138432011-03-25  Jessie Berlin  <jberlin@apple.com>
13844
13845        Reviewed by Anders Carlsson.
13846
13847        WebKit2: Need to be able to set and get the Cookie Storage Policy.
13848        https://bugs.webkit.org/show_bug.cgi?id=50780
13849
13850        Part 2: Make it possible to set the initial policy on Windows.
13851
13852        In WebKit1, we read the initial policy on Windows from WebPreferences at startup.
13853        Since that is not possible in WebKit2, make it possible to specify the initial policy
13854        as a creation parameter to the WebProcess.
13855
13856        * Shared/WebProcessCreationParameters.cpp:
13857        (WebKit::WebProcessCreationParameters::encode):
13858        Encode initialHTTPCookieAcceptPolicy on Windows.
13859        (WebKit::WebProcessCreationParameters::decode):
13860        Decode initialHTTPCookieAcceptPolicy on Windows.
13861        * Shared/WebProcessCreationParameters.h:
13862
13863        * UIProcess/API/C/win/WKContextPrivateWin.h:
13864        * UIProcess/API/C/win/WKContextWin.cpp:
13865        (WKContextSetInitialHTTPCookieAcceptPolicy):
13866        Call through to WebContext.
13867
13868        * UIProcess/WebContext.cpp:
13869        (WebKit::WebContext::WebContext):
13870        Give the initial policy a default of "Always".
13871        * UIProcess/WebContext.h:
13872        (WebKit::WebContext::setInitialHTTPCookieAcceptPolicy):
13873        * UIProcess/win/WebContextWin.cpp:
13874        (WebKit::WebContext::platformInitializeWebProcess):
13875        Set the initial policy on Windows.
13876
13877        * WebProcess/Cookies/WebCookieManager.h:
13878        Make setHTTPCookieAcceptPolicy public so that it can be called from WebProcessWin.
13879
13880        * WebProcess/win/WebProcessWin.cpp:
13881        (WebKit::WebProcess::platformInitializeWebProcess):
13882        Tell the WebCookieManager about the initial policy.
13883
138842011-03-25  Jessie Berlin  <jberlin@apple.com>
13885
13886        Reviewed by Sam Weinig.
13887
13888        WebKit2: Need to be able to set and get the Cookie Storage Policy.
13889        https://bugs.webkit.org/show_bug.cgi?id=50780
13890
13891        * Shared/HTTPCookieAcceptPolicy.h: Added.
13892
13893        * UIProcess/API/C/WKAPICast.h:
13894        (WebKit::toHTTPCookieAcceptPolicy):
13895        (WebKit::toAPI):
13896
13897        * UIProcess/API/C/WKCookieManager.cpp:
13898        (WKCookieManagerSetHTTPCookieAcceptPolicy):
13899        Call through to WebCookieManagerProxy.
13900        (WKCookieManagerGetHTTPCookieAcceptPolicy):
13901        Ditto.
13902        * UIProcess/API/C/WKCookieManager.h:
13903
13904        * UIProcess/WebCookieManagerProxy.cpp:
13905        (WebKit::WebCookieManagerProxy::invalidate):
13906        Invalidate the get http cookie accept policy callbacks.
13907        (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
13908        Send a message to the Web Process with the new value.
13909        (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
13910        Keep track of the callback and send a message to the Web Process.
13911        (WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
13912        Invoke the callback.
13913        * UIProcess/mac/WebCookieManagerProxyMac.mm: Added.
13914        (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
13915        On Mac, also set the policy in the UI Process because the sandboxed Web Process cannot
13916        persist the policy.
13917        * UIProcess/WebCookieManagerProxy.h:
13918        * UIProcess/WebCookieManagerProxy.messages.in:
13919
13920        * WebKit2.pri:
13921        * WebKit2.pro:
13922        * WebKit2.xcodeproj/project.pbxproj:
13923        * win/WebKit2.vcproj:
13924        * win/WebKit2Common.vsprops:
13925
13926        * WebProcess/Cookies/WebCookieManager.cpp:
13927        (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
13928        Call platformSetHTTPCookieAcceptPolicy.
13929        (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
13930        Send the result of platformGetHTTPCookieAcceptPolicy to the UI Process.
13931        * WebProcess/Cookies/WebCookieManager.h:
13932        * WebProcess/Cookies/WebCookieManager.messages.in:
13933
13934        * WebProcess/Cookies/cf: Added.
13935        * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Added.
13936        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
13937        Set the policy on both the default cookie storage and any Private Browsing cookie storage.
13938        (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
13939        * WebProcess/Cookies/mac: Added.
13940        * WebProcess/Cookies/mac/WebCookieManagerMac.mm: Added.
13941        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
13942        Set the policy on the default cookie storage and add a FIXME to set it on any Private
13943        Browsing cookie storage.
13944        (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
13945
13946        * WebProcess/Cookies/gtk: Added.
13947        * WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Added.
13948        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
13949        (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
13950        * WebProcess/Cookies/qt: Added.
13951        * WebProcess/Cookies/qt/WebCookieManagerQt.cpp: Added.
13952        (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
13953        (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
13954
139552011-03-25  Brian Weinstein  <bweinstein@apple.com>
13956
13957        Reviewed by Alexey Proskuryakov.
13958
13959        REGRESSION(r79227): CFURLCache not initialized correctly in WebKit2
13960        https://bugs.webkit.org/show_bug.cgi?id=57109
13961        <rdar://problem/9184590>
13962        
13963        Check for a trailing Windows path separator, not a Unix path separator.
13964
13965        * UIProcess/win/WebContextWin.cpp:
13966        (WebKit::WebContext::platformInitializeWebProcess):
13967
139682011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
13969
13970        Reviewed by Andreas Kling.
13971
13972        [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
13973        https://bugs.webkit.org/show_bug.cgi?id=57087
13974
13975        Use explicit conversion for string to avoid depending on the default codec
13976        installed by the user code.
13977
13978        * Platform/qt/SharedMemoryQt.cpp:
13979        (WebKit::SharedMemory::create):
13980        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
13981        (WebKit::initializeGTK):
13982        * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
13983        (tst_QGraphicsWKView::loadEmptyPage):
13984        (tst_QGraphicsWKView::loadEmptyUrl):
13985        * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp:
13986        (tst_QWKPage::loadEmptyUrl):
13987        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
13988        (WebKit::ProcessLauncher::launchProcess):
13989        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
13990        (WebKit::getPluginDisplay):
13991        * WebProcess/qt/WebProcessMainQt.cpp:
13992        (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
13993        (WebKit::WebProcessMainQt):
13994
139952011-03-25  Brent Fulgham  <bfulgham@webkit.org>
13996
13997        Correct project file missing $(WebKitVSPropsRedirectionDir)s
13998        after r81924.
13999
14000        * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir)
14001
140022011-03-25  Alejandro G. Castro  <alex@igalia.com>
14003
14004        Reviewed by Martin Robinson.
14005
14006        [WK2] Consider .c files in the generate-forwarding-headers script
14007        https://bugs.webkit.org/show_bug.cgi?id=56680
14008
14009        * Scripts/generate-forwarding-headers.pl:
14010
140112011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
14012
14013        Unreviewed, rolling out r81916 and r81917.
14014        http://trac.webkit.org/changeset/81916
14015        http://trac.webkit.org/changeset/81917
14016        https://bugs.webkit.org/show_bug.cgi?id=57071
14017
14018        broke a test on platforms that do not have QuickTime installed
14019        (Requested by estes on #webkit).
14020
14021        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
14022        (WebKit::WebFrameLoaderClient::objectContentType):
14023        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
14024
140252011-03-24  Brady Eidson  <beidson@apple.com>
14026
14027        Reviewed by Darin Adler.
14028
14029        https://bugs.webkit.org/show_bug.cgi?id=57069
14030        Add WKIconDatabase api to the project files, and expose accessor on WKContext.
14031
14032        Project file stuffs:
14033        * GNUmakefile.am:
14034        * WebKit2.xcodeproj/project.pbxproj:
14035        * win/WebKit2.vcproj:
14036
14037        * Shared/API/c/WKBase.h:
14038        * UIProcess/API/C/WKAPICast.h:
14039
14040        * UIProcess/API/C/WKContext.cpp:
14041        (WKContextGetIconDatabase):
14042        * UIProcess/API/C/WKContext.h:
14043
14044        * UIProcess/API/C/WKIconDatabase.cpp: Added.
14045        (WKIconDatabaseGetTypeID):
14046        * UIProcess/API/C/WKIconDatabase.h: Added.
14047
14048        * UIProcess/WebContext.h:
14049        (WebKit::WebContext::iconDatabase):
14050
140512011-03-24  Brent Fulgham  <bfulgham@webkit.org>
14052
14053        Build correction.
14054
14055        Disable the CA Layer stuff when building with Cairo.
14056
14057        * win/WebKit2.vcproj:
14058
140592011-03-24  Brady Eidson  <beidson@apple.com>
14060
14061        Reviewed by Sam Weinig.
14062
14063        https://bugs.webkit.org/show_bug.cgi?id=57058
14064        Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
14065
14066        * UIProcess/WebIconDatabase.cpp:
14067        (WebKit::WebIconDatabase::WebIconDatabase):
14068        (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path.
14069        (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl.
14070        (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl.
14071        (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl.
14072        (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl.
14073        (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with.
14074        (WebKit::WebIconDatabase::performImport):
14075        (WebKit::WebIconDatabase::didImportIconURLForPageURL):
14076        (WebKit::WebIconDatabase::didImportIconDataForPageURL):
14077        (WebKit::WebIconDatabase::didChangeIconForPageURL):
14078        (WebKit::WebIconDatabase::didRemoveAllIcons):
14079        (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions
14080          are now that they're available.
14081        * UIProcess/WebIconDatabase.h:
14082
14083        Add an IconDatabase logging channel:
14084        * Platform/Logging.cpp:
14085        (WebKit::initializeLogChannelsIfNecessary):
14086        * Platform/Logging.h:
14087
14088        * UIProcess/WebContext.cpp:
14089        (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
14090          opening it.
14091        * UIProcess/WebContext.h:
14092
140932011-03-24  Andy Estes  <aestes@apple.com>
14094
14095        Reviewed by Darin Adler.
14096
14097        REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
14098        https://bugs.webkit.org/show_bug.cgi?id=49016
14099
14100        Update objectContentType() implementation to handle the
14101        shouldPreferPlugInsForImages flag.
14102
14103        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
14104        (WebKit::WebFrameLoaderClient::objectContentType):
14105        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
14106
141072011-03-24  Adam Roben  <aroben@apple.com>
14108
14109        Start compiling LayerTreeHostCA on Windows
14110
14111        Fixes <http://webkit.org/b/57060> WebKit2.vcproj should compile LayerTreeHostCA
14112
14113        Reviewed by Anders Carlsson.
14114
14115        * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: Added.
14116        (WebKit::LayerTreeHostCA::platformInitialize):
14117        (WebKit::LayerTreeHostCA::scheduleLayerFlush):
14118        (WebKit::LayerTreeHostCA::platformInvalidate):
14119        (WebKit::LayerTreeHostCA::platformSizeDidChange):
14120        (WebKit::LayerTreeHostCA::platformForceRepaint):
14121        (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
14122        Stubbed out.
14123
14124        * win/WebKit2.vcproj: Added new files. Let VS reorder existing files.
14125
14126        * win/WebKit2Apple.vsprops: Added WebProcess\WebPage\ca to the include path.
14127
141282011-03-24  Jer Noble  <jer.noble@apple.com>
14129
14130        Unreviewed build fix.
14131
14132        Remove reference to LayerTreeHostMac.h from WebFullScreenManagerMac.mm.
14133
14134        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
14135
141362011-03-24  Adam Roben  <aroben@apple.com>
14137
14138        Split Mac-specific parts of LayerTreeHostCA into LayerTreeHostCAMac.mm
14139
14140        Fixes <http://webkit.org/b/57046> LayerTreeHostMac's code should be shareable with Windows
14141
14142        Reviewed by Anders Carlsson.
14143
14144        * WebKit2.xcodeproj/project.pbxproj:
14145
14146        * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/ca/LayerTreeHostCA.mm.
14147        (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some Mac-specific code to
14148        LayerTreeHostCAMac.mm.
14149        (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Wrapped some Mac-specific code in
14150        PLATFORM(MAC).
14151
14152        (WebKit::LayerTreeHostCA::invalidate):
14153        (WebKit::LayerTreeHostCA::sizeDidChange):
14154        (WebKit::LayerTreeHostCA::forceRepaint):
14155        Moved some Mac-specific code to LayerTreeHostCAMac.mm.
14156
14157        (WebKit::LayerTreeHostCA::performScheduledLayerFlush): Renamed from
14158        flushPendingLayerChangesRunLoopObserverCallback. Moved some code from here...
14159        (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush): ...to here. Moved some
14160        Mac-specific code to LayerTreeHostCAMac.mm.
14161
14162        * WebProcess/WebPage/ca/LayerTreeHostCA.h: Added new functions, wrapped some Mac-specific
14163        declarations in PLATFORM(MAC).
14164
14165        * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: Added.
14166        (WebKit::LayerTreeHostCA::platformInitialize):
14167        (WebKit::LayerTreeHostCA::scheduleLayerFlush):
14168        (WebKit::LayerTreeHostCA::platformInvalidate):
14169        (WebKit::LayerTreeHostCA::platformSizeDidChange):
14170        (WebKit::LayerTreeHostCA::platformForceRepaint):
14171        (WebKit::LayerTreeHostCA::flushPendingLayerChangesRunLoopObserverCallback):
14172        (WebKit::LayerTreeHostCA::platformDidPerformScheduledLayerFlush):
14173        Code was extracted from LayerTreeHostCA.cpp.
14174
141752011-03-24  Adam Roben  <aroben@apple.com>
14176
14177        Rename LayerTreeHostMac to LayerTreeHostCA
14178
14179        This is the first step toward sharing code with Windows.
14180
14181        Fixes <http://webkit.org/b/57051>.
14182
14183        Reviewed by Anders Carlsson.
14184
14185        * WebKit2.xcodeproj/project.pbxproj:
14186        * WebProcess/WebPage/LayerTreeHost.cpp:
14187        (WebKit::LayerTreeHost::create):
14188        Updated for rename.
14189
14190        * WebProcess/WebPage/ca/LayerTreeHostCA.h: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.h.
14191        * WebProcess/WebPage/ca/LayerTreeHostCA.mm: Renamed from Source/WebKit2/WebProcess/WebPage/mac/LayerTreeHostMac.mm.
14192
141932011-03-17  Jer Noble  <jer.noble@apple.com>
14194
14195        Reviewed by Maciej Stachowiak.
14196
14197        WebKit2: Cancelling full screen early leaves full screen window up.
14198        https://bugs.webkit.org/show_bug.cgi?id=56589
14199
14200        No new tests, as WebKitTestRunner does not currently support the new Full Screen API.
14201
14202        Notify the UIProcess when it needs to tear down its layer hosting view, turn off
14203        the background layer when not in accelerated rendering mode and don't swap out 
14204        the web view unnecessarily 
14205
14206        * UIProcess/mac/WKFullScreenWindowController.mm:
14207        (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Check before swapping _webView.
14208        (-[WKFullScreenWindowController enterAcceleratedCompositingMode:]): Add the _layerHostingView
14209            to the full screen window's animationView, not its contentsView.
14210        (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Hide the background layer.
14211        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
14212        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): If given a null rootLayer, tell
14213            the client to exit accelerated mode.
14214
142152011-03-24  Enrica Casucci  <enrica@apple.com>
14216
14217        Reviewed by Alexey Proskuryakov.
14218
14219        WebKit2:Services menu item to convert selected Simplified/Traditional Chinese Text is not working.
14220        https://bugs.webkit.org/show_bug.cgi?id=56975
14221        <rdar://problem/8915066>
14222        
14223        Adding missing entry point to support Mac OS X services in WebKit2.
14224
14225        * UIProcess/API/mac/WKView.mm:
14226        (-[WKView readSelectionFromPasteboard:]): Added.
14227        * UIProcess/WebPageProxy.h:
14228        * UIProcess/mac/WebPageProxyMac.mm:
14229        (WebKit::WebPageProxy::readSelectionFromPasteboard): Added.
14230        * WebProcess/WebPage/WebPage.h:
14231        * WebProcess/WebPage/WebPage.messages.in: Added synchronous
14232        message.
14233        * WebProcess/WebPage/mac/WebPageMac.mm:
14234        (WebKit::WebPage::readSelectionFromPasteboard): Added.
14235
142362011-03-24  Jia Pu  <jpu@apple.com>
14237
14238        Reviewed by Darin Adler.
14239
14240        Dismissed reversion suggestion is incorrectly learned.
14241        https://bugs.webkit.org/show_bug.cgi?id=57039
14242
14243        CorrectionPanel should always use [NSSpellChecker dismissCorrectionBubbleForView].
14244        [NSSpellChecker cancelCorrectionBubbleForView] is reserved for situation where correction panel
14245        is dismissed explicitly by ESC key or clicking the dimiss button. Misusing these causes
14246        incorrect automatic learning.
14247
14248        * UIProcess/mac/CorrectionPanel.mm:
14249        (WebKit::CorrectionPanel::dismissInternal):
14250
142512011-03-24  Brian Weinstein  <bweinstein@apple.com>
14252
14253        Reviewed by Adam Roben.
14254
14255        WebKit2: Add Trackpoint driver hack to support IBM trackpads
14256        https://bugs.webkit.org/show_bug.cgi?id=49830
14257        <rdar://problem/8705951>
14258
14259        Copy code from WebKit1 to WebKit2 to handle initializing fake scrollbars so 
14260        IBM machines with a trackpad send us WM_VSCROLL and WM_HSCROLL messages.
14261
14262        Listen for the WM_VSCROLL and WM_HSCROLL messages, and turn the values into
14263        ScrollDirection and ScrollGranularity, and send a scroll command to the
14264        WebProcess.
14265
14266        * UIProcess/WebPageProxy.cpp:
14267        (WebKit::WebPageProxy::scrollBy): Send a message to the WebProcess.
14268        * UIProcess/WebPageProxy.h:
14269        * UIProcess/win/WebView.cpp:
14270        (WebKit::WebView::wndProc): Add WM_VSCROLL and WM_HSCROLL message handling.
14271        (WebKit::WebView::initialize): Call shouldInitializeTrackPointHack.
14272        (WebKit::WebView::onHorizontalScroll): Turn wParam into a ScrollDirection and ScrollGranularity. 
14273        (WebKit::WebView::onVerticalScroll): Ditto.
14274        (WebKit::WebView::shouldInitializeTrackPointHack): Check the registry for keys that indicate
14275            the machine has a IBM Trackpoint driver.
14276        * UIProcess/win/WebView.h:
14277        * WebProcess/WebPage/WebPage.cpp:
14278        (WebKit::WebPage::scrollBy): Call scroll method.
14279        (WebKit::WebPage::scroll): Moved from WebPageMac and WebPageWin.
14280        (WebKit::WebPage::logicalScroll): Ditto.
14281        * WebProcess/WebPage/WebPage.h:
14282        * WebProcess/WebPage/WebPage.messages.in: Add a new scrollBy message. 
14283        * WebProcess/WebPage/mac/WebPageMac.mm: Remove scroll and logicalScroll, they are now in WebPage.cpp.
14284        * WebProcess/WebPage/win/WebPageWin.cpp: Ditto.
14285
142862011-03-24  Sam Weinig  <sam@webkit.org>
14287
14288        Reviewed by Darin Adler.
14289
14290        Dictionary text extraction is not correctly detecting word boundaries on bing.com
14291        <rdar://problem/9078569>
14292        https://bugs.webkit.org/show_bug.cgi?id=56995
14293
14294        * Shared/DictionaryPopupInfo.cpp:
14295        (WebKit::DictionaryPopupInfo::encode):
14296        (WebKit::DictionaryPopupInfo::decode):
14297        * Shared/DictionaryPopupInfo.h:
14298        Add options dictionary.
14299
14300        * UIProcess/API/mac/PageClientImpl.mm:
14301        (WebKit::PageClientImpl::didPerformDictionaryLookup):
14302        Add path that can pass options through.
14303
14304        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
14305        (WebKit::WebContextMenuClient::lookUpInDictionary):
14306        Use the new performDictionaryLookupForSelection which can extract context
14307        if supported.
14308
14309        * WebProcess/WebPage/WebPage.h:
14310        * WebProcess/WebPage/mac/WebPageMac.mm:
14311        (WebKit::characterRangeAtPositionForPoint):
14312        (WebKit::characterRangeAtPoint):
14313        Split functionality out of characterRangeAtPoint and into 
14314        characterRangeAtPositionForPoint to avoid doing duplicate work 
14315        if you already have the position.
14316
14317        (WebKit::isPositionInRange):
14318        (WebKit::shouldUseSelection):
14319        Add predicate to determine if we should use the selection instead
14320        of expanding to find the word we are over.
14321
14322        (WebKit::WebPage::performDictionaryLookupAtLocation):
14323        If available, use the surrounding paragraph as context to get better extraction
14324        and to get lexicographical information about the word. Also, clean up and use 
14325        editing APIs to make the code more concise and understandable.
14326
14327        (WebKit::WebPage::performDictionaryLookupForSelection):
14328        Use similar logic as in performDictionaryLookupAtLocation to extract additional
14329        details from a selection for use in the dictionary popup.
14330
14331        (WebKit::WebPage::performDictionaryLookupForRange):
14332        Pass options to WebProcess if available.
14333
143342011-03-24  Jon Lee  <jonlee@apple.com>
14335
14336        Reviewed by Darin Adler.
14337
14338        WebKit2: Tabbing from the last focused field to a non-webpage element leaves the selection in a weird state
14339        <rdar://problem/8553962>
14340
14341        * WebProcess/WebPage/WebPage.cpp:
14342        (WebKit::WebPage::setFocused): When the page loses focus, clear out any selection in the frame
14343
143442011-03-24  Brian Weinstein  <bweinstein@apple.com>
14345
14346        Rubber-stamped by Sam Weinig.
14347
14348        Fix a typo in the VK_LEFT case of performDefaultBehaviorForKeyEvent.
14349
14350        * WebProcess/WebPage/mac/WebPageMac.mm:
14351        (WebKit::WebPage::performDefaultBehaviorForKeyEvent): It should be a logical or,
14352            not a bitwise or.
14353
143542011-03-24  Jeff Miller  <jeffm@apple.com>
14355
14356        Fix typo - USE(CF_NETWORK) should be USE(CFNETWORK).
14357
14358        * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
14359        (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): USE(CF_NETWORK) should be USE(CFNETWORK)
14360
143612011-03-23  Jia Pu  <jpu@apple.com>
14362
14363        Reviewed by Darin Adler.
14364
14365        Hook up new AppKit autocorrection UI with WK2.
14366        https://bugs.webkit.org/show_bug.cgi?id=56055
14367        <rdar://problem/8947463>
14368
14369        Please see WebCore/ChangeLog for detail.
14370
14371        The calls to AppKit are implemented in PageClientImpl. Other changes are necessary for the
14372        plumbing work.
14373
14374        * UIProcess/API/mac/PageClientImpl.h:
14375        * UIProcess/API/mac/PageClientImpl.mm:
14376        (WebKit::PageClientImpl::showCorrectionPanel):
14377        (WebKit::PageClientImpl::dismissCorrectionPanel):
14378        (WebKit::PageClientImpl::dismissCorrectionPanelSoon):
14379        (WebKit::PageClientImpl::recordAutocorrectionResponse):
14380        * UIProcess/API/mac/WKView.mm:
14381        (-[WKView spellCheckerDocumentTag]):
14382        (-[WKView handleCorrectionPanelResult:]):
14383        * UIProcess/API/mac/WKViewPrivate.h:
14384        * UIProcess/PageClient.h:
14385        * UIProcess/WebPageProxy.cpp:
14386        (WebKit::WebPageProxy::didCommitLoadForFrame):
14387        (WebKit::WebPageProxy::showCorrectionPanel):
14388        (WebKit::WebPageProxy::dismissCorrectionPanel):
14389        (WebKit::WebPageProxy::dismissCorrectionPanelSoon):
14390        (WebKit::WebPageProxy::recordAutocorrectionResponse):
14391        (WebKit::WebPageProxy::handleCorrectionPanelResult):
14392        * UIProcess/WebPageProxy.h:
14393        * UIProcess/WebPageProxy.messages.in:
14394        * UIProcess/mac/CorrectionPanel.h: Added.
14395        (WebKit::CorrectionPanel::isShowing):
14396        * UIProcess/mac/CorrectionPanel.mm: Added.
14397        (correctionBubbleType):
14398        (WebKit::CorrectionPanel::CorrectionPanel):
14399        (WebKit::CorrectionPanel::~CorrectionPanel):
14400        (WebKit::CorrectionPanel::show):
14401        (WebKit::CorrectionPanel::dismiss):
14402        (WebKit::CorrectionPanel::dismissSoon):
14403        (WebKit::CorrectionPanel::dismissInternal):
14404        (WebKit::CorrectionPanel::recordAutocorrectionResponse):
14405        * WebKit2.xcodeproj/project.pbxproj:
14406        * WebProcess/WebCoreSupport/WebEditorClient.h:
14407        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
14408        (WebKit::WebEditorClient::showCorrectionPanel):
14409        (WebKit::WebEditorClient::dismissCorrectionPanel):
14410        (WebKit::WebEditorClient::dismissCorrectionPanelSoon):
14411        (WebKit::WebEditorClient::recordAutocorrectionResponse):
14412        * WebProcess/WebPage/WebPage.cpp:
14413        (WebKit::WebPage::handleCorrectionPanelResult):
14414        * WebProcess/WebPage/WebPage.h:
14415        * WebProcess/WebPage/WebPage.messages.in:
14416
144172011-03-23  Brian Weinstein  <bweinstein@apple.com>
14418
14419        Reviewed by Maciej Stachowiak.
14420
14421        WebKit2: Need API to manage the Media Cache
14422        https://bugs.webkit.org/show_bug.cgi?id=56878
14423        <rdar://problem/9082503>
14424
14425        Call through to HTMLMediaElement functions to manage the WebCore media cache.
14426
14427        * WebProcess/MediaCache/WebMediaCacheManager.cpp:
14428        (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
14429        (WebKit::WebMediaCacheManager::clearCacheForHostname):
14430        (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
14431
144322011-03-23  Jeff Miller  <jeffm@apple.com>
14433
14434        Reviewed by Darin Adler.
14435
14436        Add WKBundleSetHostAllowsAnyHTTPSCertificate() for Windows
14437        https://bugs.webkit.org/show_bug.cgi?id=56972
14438        
14439        This is the WebKit2 equivalent to the WebKit1 API IWebMutableURLRequest::setAllowsAnyHTTPSCertificate().
14440
14441        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
14442        (WKBundleSetHostAllowsAnyHTTPSCertificate): Added.
14443        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetHostAllowsAnyHTTPSCertificate().
14444        * WebProcess/InjectedBundle/InjectedBundle.h: Added setHostAllowsAnyHTTPSCertificate().
14445        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
14446        (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
14447        * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
14448        (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
14449        * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
14450        (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added, should never be called.
14451        * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
14452        (WebKit::InjectedBundle::setHostAllowsAnyHTTPSCertificate): Added.
14453
144542011-03-23  Sam Weinig  <sam@webkit.org>
14455
14456        Reviewed by Anders Carlsson.
14457
14458        Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
14459
14460        This API is not necessary.
14461
14462        * Shared/WebPageCreationParameters.cpp:
14463        (WebKit::WebPageCreationParameters::encode):
14464        (WebKit::WebPageCreationParameters::decode):
14465        * Shared/WebPageCreationParameters.h:
14466        * UIProcess/API/mac/WKView.h:
14467        * UIProcess/API/mac/WKView.mm:
14468        (-[WKView initWithFrame:]):
14469        (-[WKView initWithFrame:contextRef:]):
14470        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
14471        * UIProcess/WebPageProxy.cpp:
14472        (WebKit::WebPageProxy::creationParameters):
14473        * UIProcess/WebPageProxy.h:
14474        * WebProcess/WebPage/WebFrame.cpp:
14475        (WebKit::WebFrame::createMainFrame):
14476        * WebProcess/WebPage/WebFrame.h:
14477        * WebProcess/WebPage/WebPage.cpp:
14478        (WebKit::WebPage::WebPage):
14479
144802011-03-23  Balazs Kelemen  <kbalazs@webkit.org>
14481
14482        Reviewed by Andreas Kling.
14483
14484        [WK2] Handle keyboard and mouse events on X11
14485        https://bugs.webkit.org/show_bug.cgi?id=56103
14486
14487        Propagate keyboard and mouse events to the plugin
14488        as XEvent's.
14489
14490        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
14491        (WebKit::initializeXEvent):
14492        (WebKit::xTimeStamp):
14493        (WebKit::xKeyModifiers):
14494        (WebKit::setCommonMouseEventFields):
14495        (WebKit::setXMotionEventFields):
14496        (WebKit::setXButtonEventFields):
14497        (WebKit::setXCrossingEventFields):
14498        (WebKit::NetscapePlugin::platformHandleMouseEvent):
14499        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
14500        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
14501        (WebKit::setXKeyEventFields):
14502        (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
14503
145042011-03-23  Anders Carlsson  <andersca@apple.com>
14505
14506        Reviewed by Sam Weinig.
14507
14508        Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not
14509        https://bugs.webkit.org/show_bug.cgi?id=56954
14510
14511        This is so we'll eventually be able to send sync messages that aren't processed immediately if the 
14512        destination is waiting for a reply to another synchronous message.
14513
14514        * Platform/CoreIPC/Connection.cpp:
14515        (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
14516        Only check for the DispatchMessageWhenWaitingForSyncReply flag.
14517
14518        (CoreIPC::Connection::sendSyncMessage):
14519        Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID.
14520
14521        * Platform/CoreIPC/Connection.h:
14522        (CoreIPC::Connection::sendSync):        
14523        (CoreIPC::Connection::deprecatedSendSync):
14524        No need to add SyncMessage here anymore.
14525
145262011-03-23  Brian Weinstein  <bweinstein@apple.com>
14527
14528        Qt Build Fix.
14529
14530        * DerivedSources.pro:
14531
145322011-03-22  Brian Weinstein  <bweinstein@apple.com>
14533
14534        Reviewed by Darin Adler.
14535
14536        WebKit2: Need API to manage the Media Cache
14537        https://bugs.webkit.org/show_bug.cgi?id=56878
14538        <rdar://problem/9082503>
14539
14540        Project File Fun:
14541        * GNUmakefile.am:
14542        * WebKit2.pri:
14543        * WebKit2.pro:
14544        * WebKit2.xcodeproj/project.pbxproj:
14545        * win/WebKit2.vcproj:
14546        * win/WebKit2Common.vsprops:
14547        * win/WebKit2Generated.make:
14548        
14549        Derived Sources and API fun:
14550        * DerivedSources.make:
14551        * DerivedSources.pro:
14552        * Platform/CoreIPC/MessageID.h:
14553        * Shared/API/c/WKBase.h:
14554        * Shared/APIObject.h:
14555        * UIProcess/API/C/WKAPICast.h:
14556        
14557        * UIProcess/WebProcessProxy.cpp:
14558        (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages.
14559        * WebProcess/WebProcess.cpp:
14560        (WebKit::WebProcess::didReceiveMessage): Ditto.
14561        
14562        * UIProcess/WebContext.cpp:
14563        (WebKit::WebContext::WebContext): Initialize the WebMediaCacheManagerProxy member variable.
14564        (WebKit::WebContext::~WebContext): Invalidate the WebMediaCacheManagerProxy.
14565        (WebKit::WebContext::disconnectProcess): Ditto.
14566        (WebKit::WebContext::didReceiveMessage): Add a case for MediaCache messages.
14567        * UIProcess/WebContext.h:
14568        (WebKit::WebContext::mediaCacheManagerProxy):
14569
14570        * UIProcess/API/C/WKContext.cpp:
14571        (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager.
14572        * UIProcess/API/C/WKContext.h:
14573
14574        * UIProcess/API/C/WKMediaCacheManager.cpp: Added.
14575        (WKMediaCacheManagerGetTypeID): Returns the WebMediaCacheManagerProxy type.
14576        (WKMediaCacheManagerGetHostnamesWithMediaCache): Calls down to the WebMediaCacheManagerProxy.
14577        (WKMediaCacheManagerClearCacheForHostname): Ditto.
14578        (WKMediaCacheManagerClearCacheForAllHostnames): Ditto.
14579        * UIProcess/API/C/WKMediaCacheManager.h: Added.
14580
14581        * UIProcess/WebMediaCacheManagerProxy.cpp: Added.
14582        (WebKit::WebMediaCacheManagerProxy::create):
14583        (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
14584        (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy):
14585        (WebKit::WebMediaCacheManagerProxy::invalidate):
14586        (WebKit::WebMediaCacheManagerProxy::didReceiveMessage):
14587        (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Call through to the WebProcess.
14588        (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Process the WebProcess response,
14589            and call the callback.
14590        (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Call through to the WebProcess.
14591        (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Call through to the WebProcess.
14592        * UIProcess/WebMediaCacheManagerProxy.h: Added.
14593        (WebKit::WebMediaCacheManagerProxy::clearContext):
14594        (WebKit::WebMediaCacheManagerProxy::type):
14595        * UIProcess/WebMediaCacheManagerProxy.messages.in: Added.
14596
14597        * WebProcess/MediaCache: Added.
14598        * WebProcess/MediaCache/WebMediaCacheManager.cpp: Added.
14599        (WebKit::WebMediaCacheManager::shared):
14600        (WebKit::WebMediaCacheManager::WebMediaCacheManager):
14601        (WebKit::WebMediaCacheManager::didReceiveMessage):
14602        (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Added a FIXME to call through to WebCore.
14603        (WebKit::WebMediaCacheManager::clearCacheForHostname): Ditto.
14604        (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Ditto.
14605        * WebProcess/MediaCache/WebMediaCacheManager.h: Added.
14606        * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Added.
14607
146082011-03-22  Brady Eidson  <beidson@apple.com>
14609
14610        Reviewed by Sam Weinig.
14611
14612        Add asynchronous load decision call to WebKit2 IconDatabase
14613        https://bugs.webkit.org/show_bug.cgi?id=56887
14614
14615        * UIProcess/WebIconDatabase.cpp:
14616        (WebKit::WebIconDatabase::getLoadDecisionForIconURL): In the future, get the actual load decision from the database.
14617          For now, always message "IconLoadNo" back to the WebProcess.
14618        * UIProcess/WebIconDatabase.h:
14619        * UIProcess/WebIconDatabase.messages.in:
14620        
14621        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
14622        (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Message the UIProcess for the load decision.
14623        (WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Callback into WebCore with the received load decision.
14624        * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
14625        * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
14626
146272011-03-23  Chris Fleizach  <cfleizach@apple.com>
14628
14629        Reviewed by Darin Adler.
14630
14631        REGRESSION: WK2: AX: PDF in Safari no longer accessible.
14632        https://bugs.webkit.org/show_bug.cgi?id=56849
14633
14634        The WKView needs to know when to return the WKPDFView and when to return
14635        the remote web process connection.
14636
14637        * UIProcess/API/mac/PDFViewController.h:
14638        (WebKit::PDFViewController::pdfView):
14639        * UIProcess/API/mac/WKView.mm:
14640        (-[WKView accessibilityFocusedUIElement]):
14641        (-[WKView accessibilityHitTest:]):
14642        (-[WKView accessibilityAttributeValue:]):
14643
146442011-03-21  Stephanie Lewis  <slewis@apple.com>
14645
14646        Reviewed by Simon Fraser.
14647
14648        https://bugs.webkit.org/show_bug.cgi?id=56798
14649        Wrap autorelease pools around calls that can have pathological memory growth on Membuster.  
14650        Only wrap the main runloop because some background threads are not expected to call into 
14651        objc and an autorelease pool could mask bugs.
14652
14653        * Platform/mac/RunLoopMac.mm:
14654        (RunLoop::performWork):
14655        (RunLoop::TimerBase::timerFired):
14656        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
14657        (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
14658
146592011-03-22  Anders Carlsson  <andersca@apple.com>
14660
14661        Reviewed by Sam Weinig.
14662
14663        OBJECT element with DivX source is always downloaded
14664        https://bugs.webkit.org/show_bug.cgi?id=56879
14665
14666        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
14667        (WebKit::getPluginInfoFromPropertyLists):
14668        Always try to split every element in the "WebPluginExtensions" array, since the DivX plug-in
14669        specifies multiple file extensions in a single element.
14670        
14671        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
14672        (WebKit::pluginSupportsExtension):
14673        Add a new helper function.
14674
14675        (WebKit::WebFrameLoaderClient::objectContentType):
14676        If we can't find the MIME for an extension, explicitly check if there's a plugin that claims to
14677        handle the given extension.
14678
146792011-03-22  Brady Eidson  <beidson@apple.com>
14680
14681        Reviewed by Sam Weinig.
14682
14683        Rename the synchronous icon database messages to be prefixed with "synchronous"
14684
14685        * UIProcess/WebIconDatabase.cpp:
14686        (WebKit::WebIconDatabase::synchronousIconDataForPageURL):
14687        (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
14688        (WebKit::WebIconDatabase::synchronousIconDataKnownForIconURL):
14689        (WebKit::WebIconDatabase::synchronousLoadDecisionForIconURL):
14690        * UIProcess/WebIconDatabase.h:
14691        * UIProcess/WebIconDatabase.messages.in:
14692
14693        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
14694        (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
14695
146962011-03-22  Sam Weinig  <sam@webkit.org>
14697
14698        Rubber-stamped by Anders Carlsson.
14699
14700        Loading a new tab does not dismiss Lookup
14701        <rdar://problem/9138391> 
14702
14703        * UIProcess/API/mac/WKView.mm:
14704        (-[WKView viewDidMoveToWindow]):
14705        Hide the dictionary popup when moving the WKView out of a window.
14706
147072011-03-22  Anders Carlsson  <andersca@apple.com>
14708
14709        Reviewed by Sam Weinig.
14710
14711        Microsoft Silverlight playback shows artifacts
14712        https://bugs.webkit.org/show_bug.cgi?id=56863
14713        <rdar://problem/9103136>
14714
14715        * PluginProcess/PluginControllerProxy.cpp:
14716        (WebKit::PluginControllerProxy::paint):
14717        If the plug-in is transparent, clear the dirty rect before painting.
14718
14719        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
14720        (WebKit::NetscapePluginModule::determineQuirks):
14721        Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins.
14722
14723        * Shared/Plugins/PluginQuirks.h:
14724        Add MakeTransparentIfBackgroundAttributeExists quirk.
14725
14726        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
14727        (WebKit::NPN_SetValue):
14728        Handle NPPVpluginTransparentBool.
14729
14730        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
14731        (WebKit::NetscapePlugin::NetscapePlugin):
14732        Initialize m_isTransparent to false.
14733
14734        (WebKit::NetscapePlugin::setIsTransparent):
14735        Set m_isTransparent.
14736
14737        (WebKit::NetscapePlugin::initialize):
14738        If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent
14739        if there's a 'background' attribute.
14740
14741        (WebKit::NetscapePlugin::isTransparent):
14742        Add getter.
14743
14744        * WebProcess/Plugins/Plugin.h:
14745        Add isTransparent().
14746
14747        * WebProcess/Plugins/PluginProxy.cpp:
14748        (WebKit::PluginProxy::paint):
14749        Always copy the plug-in backing store to the plug-in proxy backing store.
14750
14751        (WebKit::PluginProxy::isTransparent):
14752        Add getter that should never be called.
14753
14754        (WebKit::PluginProxy::update):
14755        Always copy the plug-in backing store to the plug-in proxy backing store.
14756
147572011-03-22  Anders Carlsson  <andersca@apple.com>
14758
14759        Reviewed by Sam Weinig.
14760
14761        Crash when calling PluginProxy::evaluate on a destroyed plug-in
14762        https://bugs.webkit.org/show_bug.cgi?id=56848
14763        <rdar://problem/9168975>
14764
14765        Return early if the NPObject doesn't exist anymore.
14766
14767        * WebProcess/Plugins/PluginProxy.cpp:
14768        (WebKit::PluginProxy::evaluate):
14769
147702011-03-22  Sam Weinig  <sam@webkit.org>
14771
14772        Reviewed by Adam Roben.
14773
14774        WebKit2: Cannot make a selection past the end of the visible page (no autoscrolling)
14775        <rdar://problem/8823874>
14776        https://bugs.webkit.org/show_bug.cgi?id=56847
14777
14778        * Shared/mac/WebEventFactory.mm:
14779        (WebKit::currentMouseButton):
14780        (WebKit::mouseButtonForEvent):
14781        Add mouse button for mouseEnter/Exit events. [NSEvent buttonNumber] doesn't seem to give the right result
14782        for these events, but getting the currentMouseButton does work.
14783
147842011-03-21  Brady Eidson  <beidson@apple.com>
14785
14786        Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783
14787
14788        * Platform/mac/Logging.mac.mm:
14789
147902011-03-21  Brady Eidson  <beidson@apple.com>
14791
14792        Reviewed by Brian Weinstein.
14793
14794        https://bugs.webkit.org/show_bug.cgi?id=56783
14795        Actually hook up WebKit2 logging on Mac.
14796
14797        * Platform/Logging.cpp:
14798        (WebKit::initializeLogChannel):
14799        * Platform/Logging.h:
14800        * Platform/mac/Logging.mac.mm: Added.
14801        (WebKit::initializeLogChannel):
14802 
14803       * UIProcess/WebContext.cpp:
14804        (WebKit::WebContext::WebContext): Initialize logging if necessary.
14805
14806        * WebKit2.xcodeproj/project.pbxproj:
14807
148082011-03-21  Alexey Proskuryakov  <ap@apple.com>
14809
14810        Reviewed by Darin Adler.
14811
14812        REGRESSION (r81269): WebKit2 gets into an infinite recursion after an unhandled command key
14813        https://bugs.webkit.org/show_bug.cgi?id=56782
14814        <rdar://problem/9151993>
14815
14816        * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
14817        Factored out code for resending an event and moved it to WKView.
14818
14819        * UIProcess/API/mac/WKView.mm:
14820        (-[WKView performKeyEquivalent:]): Don't zero out _keyDownEventBeingResent, it's easier
14821        to just do that in _resendKeyDownEvent:.
14822        (-[WKView keyDown:]): Ditto.
14823        (-[WKView _resendKeyDownEvent:]): Moved from PageClientImpl.mm. Added an assertion that we
14824        are not already resending an event - it would be too confusing if we ever had to do that,
14825        but looks like this never happens.
14826
14827        * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent.
14828
148292011-03-21  Anders Carlsson  <andersca@apple.com>
14830
14831        Reviewed by Sam Weinig.
14832
14833        QT plug-in fails to load contextual menu
14834        https://bugs.webkit.org/show_bug.cgi?id=56777
14835        <rdar://problem/8979033>
14836
14837        Open a Carbon resource map and make it the current map when calling NP_Initialize.
14838
14839        * Platform/Module.cpp:
14840        (WebKit::Module::Module):
14841        Initialize m_bundleResourceMap to -1.
14842
14843        * Platform/Module.h:
14844        Add m_bundleResourceMap.
14845
14846        * Platform/mac/ModuleMac.mm:
14847        (WebKit::Module::unload):
14848        Close the resource map.
14849
14850        (WebKit::Module::bundleResourceMap):
14851        Open a resource map if necessary.
14852
14853        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
14854        (WebKit::NetscapePluginModule::tryLoad):
14855        Get the resource map and make it current before calling NP_Initialize.
14856
148572011-03-21  Anders Carlsson  <andersca@apple.com>
14858
14859        Reviewed by Sam Weinig.
14860
14861        Plug-in process crashes if it fails to load a plug-in module
14862        https://bugs.webkit.org/show_bug.cgi?id=56775
14863
14864        * PluginProcess/PluginControllerProxy.cpp:
14865        (WebKit::PluginControllerProxy::initialize):
14866        If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in.
14867
14868        * PluginProcess/WebProcessConnection.cpp:
14869        (WebKit::WebProcessConnection::removePluginControllerProxy):
14870        Remove an incorrect assertion. Don't invalidate the remote object map if the plug-in is null.
14871
148722011-03-21  Anders Carlsson  <andersca@apple.com>
14873
14874        Reviewed by Sam Weinig.
14875
14876        QT plug-in loads controller at top of movie not bottom
14877        https://bugs.webkit.org/show_bug.cgi?id=56764
14878        <rdar://problem/8979037>
14879
14880        Create a layer with geometryFlipped set and add the plug-in layer as a sublayer,
14881        matching WebKit1.
14882
14883        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
14884        (WebKit::NetscapePlugin::platformPostInitialize):
14885
148862011-03-21  Sam Weinig  <sam@webkit.org>
14887
14888        Reviewed by Anders Carlsson.
14889
14890        WebKit2 needs preferences to change security knobs
14891        https://bugs.webkit.org/show_bug.cgi?id=56762
14892
14893        Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed
14894        and FileAccessFromFileURLsAllowed.
14895
14896        * Shared/WebPreferencesStore.h:
14897        * UIProcess/API/C/WKPreferences.cpp:
14898        (WKPreferencesSetWebSecurityEnabled):
14899        (WKPreferencesGetWebSecurityEnabled):
14900        (WKPreferencesSetUniversalAccessFromFileURLsAllowed):
14901        (WKPreferencesGetUniversalAccessFromFileURLsAllowed):
14902        (WKPreferencesSetFileAccessFromFileURLsAllowed):
14903        (WKPreferencesGetFileAccessFromFileURLsAllowed):
14904        * UIProcess/API/C/WKPreferencesPrivate.h:
14905        * WebProcess/WebPage/WebPage.cpp:
14906        (WebKit::WebPage::updatePreferences):
14907
149082011-03-21  Sam Weinig  <sam@webkit.org>
14909
14910        Reviewed by Anders Carlsson.
14911
14912        Remove old DrawingArea and LayerHostingView code from WKView.
14913
14914        * UIProcess/API/mac/WKView.mm:
14915        (-[WKView drawRect:]):
14916        (-[WKView hitTest:]):
14917        (-[WKView WebKit::]):
14918
149192011-03-21  Sam Weinig  <sam@webkit.org>
14920
14921        Reviewed by Anders Carlsson.
14922
14923        Need WebKit2 API for creating a page with a specific main frame name
14924        https://bugs.webkit.org/show_bug.cgi?id=56759
14925
14926        * Shared/WebPageCreationParameters.cpp:
14927        (WebKit::WebPageCreationParameters::encode):
14928        (WebKit::WebPageCreationParameters::decode):
14929        * Shared/WebPageCreationParameters.h:
14930        Add mainFrameName to creation parameters.
14931
14932        * UIProcess/API/mac/WKView.h:
14933        * UIProcess/API/mac/WKView.mm:
14934        (-[WKView initWithFrame:]):
14935        (-[WKView initWithFrame:contextRef:]):
14936        (-[WKView initWithFrame:contextRef:pageGroupRef:]):
14937        (-[WKView initWithFrame:contextRef:pageGroupRef:mainFrameName:]):
14938        Add new initializer which takes a main frame name.
14939
14940        * UIProcess/WebPageProxy.cpp:
14941        (WebKit::WebPageProxy::setMainFrameName):
14942        (WebKit::WebPageProxy::creationParameters):
14943        * UIProcess/WebPageProxy.h:
14944        Store the main frame name for initialization/re-initialization.
14945
14946        * WebProcess/WebPage/WebFrame.cpp:
14947        (WebKit::WebFrame::createMainFrame):
14948        * WebProcess/WebPage/WebFrame.h:
14949        * WebProcess/WebPage/WebPage.cpp:
14950        (WebKit::WebPage::WebPage):
14951        Pass the name to main frame creation.
14952
149532011-03-20  Bill Budge  <bbudge@chromium.org>
14954
14955        Reviewed by Adam Barth.
14956
14957        Rename ThreadSafeShared to ThreadSafeRefCounted
14958        https://bugs.webkit.org/show_bug.cgi?id=56714
14959
14960        No new tests. Exposes no new functionality.
14961
14962        * Platform/CoreIPC/Connection.h:
14963        * Platform/WorkQueue.h:
14964        * Platform/win/WorkQueueWin.cpp:
14965        * UIProcess/Launcher/ProcessLauncher.h:
14966        * UIProcess/Launcher/ThreadLauncher.h:
14967
149682011-03-19  Anton D'Auria  <adauria@apple.com>
14969
14970        Reviewed by Alexey Proskuryakov.
14971
14972        ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
14973        https://bugs.webkit.org/show_bug.cgi?id=56415
14974
14975        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin
14976        instead of ApplicationCacheStorage::deleteEntriesForOrigin.
14977        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
14978
149792011-03-18  Sam Weinig  <sam@webkit.org>
14980
14981        Attempt to fix the WinCairo build.
14982
14983        * win/WebKit2.vcproj:
14984
149852011-03-18  Anders Carlsson  <andersca@apple.com>
14986
14987        Reviewed by Dan Bernstein.
14988
14989        Empty gray page after going back from a PDF
14990        https://bugs.webkit.org/show_bug.cgi?id=56694
14991        <rdar://problem/8811854>
14992
14993        Update m_frameHasCustomRepresentation when loading a page that's in the page cache.
14994
14995        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
14996        (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
14997
149982011-03-18  Anders Carlsson  <andersca@apple.com>
14999
15000        Reviewed by Sam Weinig.
15001
15002        Crash when sending a sync message ends up invalidating the connection
15003        https://bugs.webkit.org/show_bug.cgi?id=56686
15004        <rdar://problem/9048781>
15005
15006        Guard against a null client.
15007
15008        * Platform/CoreIPC/Connection.cpp:
15009        (CoreIPC::Connection::sendSyncMessage):
15010
150112011-03-18  Balazs Kelemen  <kbalazs@webkit.org>
15012
15013        Reviewed by Benjamin Poulain.
15014
15015        [Qt][WK2] Need a way to debug the web process after the UI process dies
15016        https://bugs.webkit.org/show_bug.cgi?id=56116
15017
15018        Allow the web process to outlive it's parent process
15019        in debug builds if the QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS
15020        environment variable is set.
15021
15022        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
15023        (WebKit::QtWebProcess::setupChildProcess): Used getenv
15024        since the prctl call is already in a Linux-only block
15025        and the implementation in this file is a candidate
15026        for sharing across ports in the future.
15027
150282011-03-18  Darin Adler  <darin@apple.com>
15029
15030        Reviewed by Anders Carlsson.
15031
15032        Command-period does not stop load when page has focus in WebKit2
15033        https://bugs.webkit.org/show_bug.cgi?id=56601
15034
15035        * UIProcess/API/mac/WKView.mm:
15036        (-[WKView doCommandBySelector:]): If called outside interpretKeyEvents,
15037        call through to super.
15038        (-[WKView insertText:]): Assert that we are inside interpretKeyEvents.
15039        (-[WKView unmarkText]): Ditto.
15040        (-[WKView setMarkedText:selectedRange:]): Ditto.
15041        (-[WKView _interceptKeyEvent:]): Set a flag to indicate we are inside
15042        interpretKeyEvents for use by the above.
15043
150442011-03-18  Brady Eidson  <beidson@apple.com>
15045
15046        Reviewed by Sam Weinig.
15047
15048        https://bugs.webkit.org/show_bug.cgi?id=56425
15049        More groundwork for WebKit2 IconDatabase
15050
15051        -Update the synchronous method names to be prefixed with "synchronous."
15052        -Add empty implementations for the asynchronous accessors.
15053
15054        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
15055        (WebKit::WebIconDatabaseProxy::setEnabled):
15056        (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
15057        (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
15058        (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
15059        (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
15060        (WebKit::WebIconDatabaseProxy::supportsAsynchronousMode):
15061        (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
15062        (WebKit::WebIconDatabaseProxy::iconDataForIconURL):
15063        * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
15064
150652011-03-18  Alejandro G. Castro  <alex@igalia.com>
15066
15067        Reviewed by Martin Robinson.
15068
15069        Fixed compilation after r80925.
15070
15071        * GNUmakefile.am:
15072        * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: Added.
15073        (WebKit::WebFullScreenManagerProxy::enterFullScreen):
15074        (WebKit::WebFullScreenManagerProxy::exitFullScreen):
15075        (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
15076        (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
15077        (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
15078        (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
15079        (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
15080        (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
15081        (WebKit::WebFullScreenManagerProxy::getFullScreenRect):
15082        * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Added.
15083        (WebKit::WebFullScreenManagerGtk::WebFullScreenManagerGtk):
15084        (WebKit::WebFullScreenManager::create):
15085        (WebKit::WebFullScreenManagerGtk::setRootFullScreenLayer):
15086        (WebKit::WebFullScreenManagerGtk::beginEnterFullScreenAnimation):
15087        (WebKit::WebFullScreenManagerGtk::beginExitFullScreenAnimation):
15088        * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Added.
15089
150902011-03-18  Alejandro G. Castro  <alex@igalia.com>
15091
15092        Unreviewed, fixed compilation after r81208.
15093
15094        * GNUmakefile.am:
15095
150962011-03-18  John Sullivan  <sullivan@apple.com>
15097
15098        Reviewed by Dan Bernstein.
15099
15100        https://bugs.webkit.org/show_bug.cgi?id=56645
15101        Assertion fires when hidden Find-on-Page matches are encountered in WebKit2
15102
15103        * WebProcess/WebPage/FindController.cpp:
15104        (WebKit::FindController::updateFindIndicator):
15105        Bail out if the selection rect is empty, before trying to generate an appropriately-sized
15106        bitmap. (Previously it was bailing out afterwards, but encountering an assertion in debug
15107        builds along the way.)
15108
151092011-03-18  Mark Rowe  <mrowe@apple.com>
15110
15111        Rubber-stamped by Jon Honeycutt.
15112
15113        <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only
15114
15115        Fix a bogus change from r81392 that made PluginProcessShim.xcconfig import DebugRelease.xcconfig.
15116        As its name suggests, DebugRelease.xcconfig is only applicable for the debug and release configurations.
15117        It overrides the valid build architectures and also restricts the build to only the active architecture.
15118        
15119        * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what
15120        each target-specific .xcconfig file should import.
15121
151222011-03-17  Mark Rowe  <mrowe@apple.com>
15123
15124        Fix the build.
15125
15126        * WebKit2.xcodeproj/project.pbxproj:
15127
151282011-03-17  Anders Carlsson  <andersca@apple.com>
15129
15130        Reviewed by Sam Weinig.
15131
15132        Implement PluginProcessProxy::setFullscreenWindowIsShowing
15133        https://bugs.webkit.org/show_bug.cgi?id=56618
15134
15135        * UIProcess/Plugins/PluginProcessProxy.cpp:
15136        (WebKit::PluginProcessProxy::PluginProcessProxy):
15137        Initialize m_fullscreenWindowIsShowing.
15138
15139        (WebKit::PluginProcessProxy::didClose):
15140        if m_fullscreenWindowIsShowing is true, call exitFullscreen.
15141
15142        * UIProcess/Plugins/PluginProcessProxy.h:
15143        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
15144        (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
15145        Add helper function for getting a PSN for the plug-in process.
15146
15147        (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
15148        Make the plug-in process the front process.
15149
15150        (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
15151        Make the current process (the UI process) the front process.
15152
15153        (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
15154        Call enterFullscreen or exitFullscreen.
15155
15156        (WebKit::PluginProcessProxy::enterFullscreen):
15157        Make the plug-in process the front process and hide the menu bar.
15158
15159        (WebKit::PluginProcessProxy::exitFullscreen):
15160        Show the menu bar and if necessary make the UI process the front process.
15161
15162        (WebKit::PluginProcessProxy::endModal):
15163        call makeUIProcessTheFrontProcess.
15164
15165        (WebKit::PluginProcessProxy::applicationDidBecomeActive):
15166        Call makePluginProcessTheFrontProcess.
15167
151682011-03-17  Adam Roben  <aroben@apple.com>
15169
15170        Make bidi text in <select> menus in WebKit2 on Windows match WebKit1
15171
15172        Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release
15173        (WebKit2 Tests)
15174
15175        Reviewed by Sam Weinig.
15176
15177        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
15178        (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
15179        (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
15180        On Windows, return the same values we return in WebKit1.
15181
151822011-03-17  Anders Carlsson  <andersca@apple.com>
15183
15184        Reviewed by Sam Weinig.
15185
15186        Implement PluginProcessProxy::setModalWindowIsShowing
15187        https://bugs.webkit.org/show_bug.cgi?id=56615
15188
15189        * UIProcess/Plugins/PluginProcessProxy.cpp:
15190        (WebKit::PluginProcessProxy::PluginProcessProxy):
15191        Initialize m_modalWindowIsShowing.
15192
15193        (WebKit::PluginProcessProxy::didClose):
15194        If m_modalWindowIsShowing is true, we must call endModal.
15195
15196        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
15197        (-[WKPlaceholderModalWindow _wantsUserAttention]):
15198        Add a WKPlaceholderModalWindow.
15199
15200        (WebKit::PluginProcessProxy::setModalWindowIsShowing):
15201        Call beginModal or endModal depending on whether we're showing a modal window or not.
15202
15203        (WebKit::PluginProcessProxy::beginModal):
15204        Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications.
15205
15206        (WebKit::PluginProcessProxy::endModal):
15207        Tear down the window and the run loop.
15208
15209        (WebKit::PluginProcessProxy::applicationDidBecomeActive):
15210        Make sure that the plug-in process is frontmost.
15211
152122011-03-17  Jeff Miller  <jeffm@apple.com>
15213
15214        Reviewed by Adam Roben.
15215
15216        Web page shouldn't swallow alt-key combinations on Windows
15217        https://bugs.webkit.org/show_bug.cgi?id=56612
15218        
15219        Make Alt+Left Arrow and Alt+Right Arrow go back and forward, but make
15220        sure any alt-key combinations bubble up to the client.
15221
15222        * WebProcess/WebPage/win/WebPageWin.cpp:
15223        (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Make Alt+Left Arrow and Alt+Right Arrow go back and forward, ignore any other alt-key combinations.
15224
152252011-03-17  Anders Carlsson  <andersca@apple.com>
15226
15227        Reviewed by Sam Weinig.
15228
15229        Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process
15230        https://bugs.webkit.org/show_bug.cgi?id=56610
15231
15232        * PluginProcess/mac/PluginProcessMac.mm:
15233        (WebKit::FullscreenWindowTracker::FullscreenWindowTracker):
15234        Add fullscreen window tracker class.
15235
15236        (WebKit::rectCoversAnyScreen):
15237        Return whether the given rect covers any screen.
15238
15239        (WebKit::windowCoversAnyScreen):
15240        Return whether the given window covers any screen.
15241
15242        (WebKit::FullscreenWindowTracker::windowShown):
15243        If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
15244
15245        (WebKit::FullscreenWindowTracker::windowHidden):
15246        If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
15247
15248        (WebKit::cocoaWindowShown):
15249        (WebKit::cocoaWindowHidden):
15250        (WebKit::carbonWindowShown):
15251        (WebKit::carbonWindowHidden):
15252        Call the window tracking functions.
15253
15254        (WebKit::setModal):
15255        Call PluginProcess::setModalWindowIsShowing.
15256
15257        (WebKit::PluginProcess::setModalWindowIsShowing):
15258        (WebKit::PluginProcess::setFullscreenWindowIsShowing):
15259        Send CoreIPC messages.
15260
15261        * UIProcess/Plugins/PluginProcessProxy.h:
15262        * UIProcess/Plugins/PluginProcessProxy.messages.in:
15263        Add new messages.
15264
15265        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
15266        (WebKit::PluginProcessProxy::setModalWindowIsShowing):
15267        (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
15268        Add stubs.
15269
152702011-03-17  Sam Weinig  <sam@webkit.org>
15271
15272        Reviewed by Brady Eidson.
15273
15274        Allow passing a certificate chain as a user message
15275        <rdar://problem/8951709>
15276        https://bugs.webkit.org/show_bug.cgi?id=56605
15277
15278        * Shared/API/c/mac/WKCertificateInfoMac.h:
15279        * Shared/API/c/mac/WKCertificateInfoMac.mm:
15280        (WKCertificateInfoCreateWithCertficateChain):
15281        Added. Creates a WKCertificate from a certificate chain.
15282
15283        * Shared/UserMessageCoders.h:
15284        (WebKit::UserMessageEncoder::baseEncode):
15285        (WebKit::UserMessageDecoder::baseDecode):
15286        Add encoding/decoding of WebCertificateInfo.
15287
152882011-03-17  Anders Carlsson  <andersca@apple.com>
15289
15290        Reviewed by Sam Weinig.
15291
15292        Add PluginProcessShim hooks for when windows are shown and hidden
15293        https://bugs.webkit.org/show_bug.cgi?id=56597
15294
15295        * Configurations/PluginProcessShim.xcconfig:
15296        Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h.
15297
15298        * PluginProcess/mac/PluginProcessMac.mm:
15299        (WebKit::cocoaWindowShown):
15300        (WebKit::cocoaWindowHidden):
15301        (WebKit::carbonWindowShown):
15302        (WebKit::carbonWindowHidden):
15303        (WebKit::setModal):
15304        (WebKit::PluginProcess::initializeShim):
15305        Add empty stubs.
15306
15307        * PluginProcess/mac/PluginProcessShim.h:
15308        * PluginProcess/mac/PluginProcessShim.mm:
15309        (WebKit::beginModal):
15310        (WebKit::endModal):
15311        Keep a modal count and call setModal accordingly.
15312
15313        (WebKit::shim_NSApplication_RunModalForWindow):
15314        (WebKit::shimModalDialog):
15315        (WebKit::shimAlert):
15316        Call beginModal/endModal.
15317
15318        (WebKit::shimShowWindow):
15319        (WebKit::shimHideWindow):
15320        Call the shim functions.
15321        
15322        (WebKit::WebKitPluginProcessShimInitialize):
15323        Listen for notifications and call the necessary shim functions.
15324
15325        * WebKit2.xcodeproj/project.pbxproj:
15326        Link the plug-in process shim with AppKit and QuartzCore and WKSI.
15327
153282011-03-17  Jeff Miller  <jeffm@apple.com>
15329
15330        Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
15331        
15332        *.mode*
15333        *.pbxuser
15334        *.perspective*
15335        project.xcworkspace
15336        xcuserdata
15337
15338        * WebKit2.xcodeproj: Modified property svn:ignore.
15339
153402011-03-17  Sam Weinig  <sam@webkit.org>
15341
15342        Reviewed by Anders Carlsson.
15343
15344        WKErrors need the PeerCertificateChain for certificate errors
15345        <rdar://problem/8951784>
15346        https://bugs.webkit.org/show_bug.cgi?id=56592
15347
15348        * Shared/WebCoreArgumentCoders.h:
15349        Special case encoding/decoding of ResourceErrors for the mac.
15350
15351        * Shared/mac/PlatformCertificateInfo.h:
15352        * Shared/mac/PlatformCertificateInfo.mm:
15353        (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
15354        Add constructor that take the PeerCertificateChain as CFArrayRef.
15355
15356        * Shared/mac/WebCoreArgumentCodersMac.mm:
15357        (CoreIPC::encodeResourceError):
15358        (CoreIPC::decodeResourceError):
15359        Add encode/decode for ResourceError using the underlying NSError
15360        and encoding/decoding as much of the userInfo as we know how to.
15361        Right now this includes all string values and the PeerCertificateChain.
15362
153632011-03-17  John Sullivan  <sullivan@apple.com>
15364
15365        Reviewed by Adam Roben.
15366
15367        https://bugs.webkit.org/show_bug.cgi?id=56574
15368        Dealloc'ing a WKView can leave a stale reference to it in NSWindow
15369
15370        * UIProcess/API/mac/WKView.mm:
15371        (-[WKView viewWillMoveToWindow:]):
15372        Clear the outgoing window's growBoxOwner if it is this view.
15373
153742011-03-17  Anders Carlsson  <andersca@apple.com>
15375
15376        Rubber-stamped by John Sullivan.
15377
15378        Rename PluginProcessShim.cpp to PluginProcessShim.mm.
15379
15380        * PluginProcess/mac/PluginProcessShim.cpp: Removed.
15381        * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp.
15382        * WebKit2.xcodeproj/project.pbxproj:
15383
153842011-03-17  Anders Carlsson  <andersca@apple.com>
15385
15386        Reviewed by Darin Adler.
15387
15388        Invalidate all NPObjects for a plug-in when that plug-in is destroyed
15389        https://bugs.webkit.org/show_bug.cgi?id=56511
15390        <rdar://problem/8993491>
15391
15392        Before this change, we would invalidate NPObjectProxy objects and delete NPObjectMessageReceiver
15393        objects when the last plug-in of a certain type was destroyed. Doing so caused us to hold on to memory
15394        which we don't need, and could also lead to crashes if the NPObjectMessageReceiver would get a message and
15395        tried to invoke it on a already deallocated NPObject.
15396
15397        * PluginProcess/PluginControllerProxy.cpp:
15398        (WebKit::PluginControllerProxy::initialize):
15399        If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so.
15400
15401        (WebKit::PluginControllerProxy::destroy):
15402        Pass the plug-in to removePluginControllerProxy.
15403
15404        * PluginProcess/WebProcessConnection.cpp:
15405        (WebKit::WebProcessConnection::removePluginControllerProxy):
15406        Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
15407
15408        (WebKit::WebProcessConnection::createPlugin):
15409        Don't call removePluginControllerProxy if the plug-in fails to initialize. PluginControllerProxy::initialize now
15410        takes care of doing this.
15411
15412        * Shared/Plugins/NPObjectMessageReceiver.cpp:
15413        (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
15414        (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
15415        * Shared/Plugins/NPObjectMessageReceiver.h:
15416        Remove m_shouldReleaseObjectWhenInvalidating, we now know that no NPObjects will have been deallocated
15417        by the time the NPObjectMessageReceiver is destroyed.
15418
15419        (WebKit::NPObjectMessageReceiver::plugin):
15420        Add getter.
15421        
15422        * Shared/Plugins/NPObjectProxy.h:
15423        (WebKit::NPObjectProxy::plugin):
15424        Add getter.
15425        
15426        * Shared/Plugins/NPRemoteObjectMap.cpp:
15427        (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
15428        Remove m_isInvalidating.
15429
15430        (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
15431        Simplify code.
15432
15433        (WebKit::NPRemoteObjectMap::pluginDestroyed):
15434        Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in.
15435
15436        * Shared/Plugins/NPRemoteObjectMap.h:
15437        Remove m_isInvalidating.
15438        
15439        * WebProcess/Plugins/PluginProcessConnection.cpp:
15440        (WebKit::PluginProcessConnection::removePluginProxy):
15441        Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
15442
154432011-03-17  Oleg Romashin  <oleg.romashin@nokia.com>
15444
15445        Reviewed by Anders Carlsson.
15446
15447        Teach WebKit2 messages.py generator to ifdef headers include
15448        which are related to ifdef-ed methods/types
15449        https://bugs.webkit.org/show_bug.cgi?id=55658
15450
15451        * Scripts/webkit2/messages.py:
15452        * Scripts/webkit2/messages_unittest.py:
15453
154542011-03-16  Joseph Pecoraro  <joepeck@webkit.org>
15455
15456        Reviewed by Kenneth Rohde Christiansen.
15457
15458        Viewport no longer allows an auto value for "user-scalable"
15459        https://bugs.webkit.org/show_bug.cgi?id=55416
15460
15461        Make the default value for userScalable be true.
15462
15463        * UIProcess/API/qt/qwkpage.cpp:
15464        (QWKPage::viewportAttributesForSize):
15465
154662011-03-16  Anders Carlsson  <andersca@apple.com>
15467
15468        Reviewed by Dan Bernstein.
15469
15470        NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object
15471        https://bugs.webkit.org/show_bug.cgi?id=56506
15472
15473        * PluginProcess/PluginControllerProxy.cpp:
15474        (WebKit::PluginControllerProxy::windowScriptNPObject):
15475        (WebKit::PluginControllerProxy::pluginElementNPObject):
15476        (WebKit::PluginControllerProxy::evaluate):
15477        (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
15478        * Shared/Plugins/NPObjectMessageReceiver.cpp:
15479        (WebKit::NPObjectMessageReceiver::create):
15480        (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
15481        (WebKit::NPObjectMessageReceiver::invoke):
15482        (WebKit::NPObjectMessageReceiver::invokeDefault):
15483        (WebKit::NPObjectMessageReceiver::getProperty):
15484        (WebKit::NPObjectMessageReceiver::setProperty):
15485        (WebKit::NPObjectMessageReceiver::construct):
15486        * Shared/Plugins/NPObjectMessageReceiver.h:
15487        * Shared/Plugins/NPObjectProxy.cpp:
15488        (WebKit::NPObjectProxy::create):
15489        (WebKit::NPObjectProxy::NPObjectProxy):
15490        (WebKit::NPObjectProxy::invalidate):
15491        (WebKit::NPObjectProxy::initialize):
15492        (WebKit::NPObjectProxy::invoke):
15493        (WebKit::NPObjectProxy::invokeDefault):
15494        (WebKit::NPObjectProxy::getProperty):
15495        (WebKit::NPObjectProxy::setProperty):
15496        (WebKit::NPObjectProxy::construct):
15497        * Shared/Plugins/NPObjectProxy.h:
15498        * Shared/Plugins/NPRemoteObjectMap.cpp:
15499        (WebKit::NPRemoteObjectMap::createNPObjectProxy):
15500        (WebKit::NPRemoteObjectMap::registerNPObject):
15501        (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
15502        (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
15503        * Shared/Plugins/NPRemoteObjectMap.h:
15504        * WebProcess/Plugins/PluginProxy.cpp:
15505        (WebKit::PluginProxy::pluginScriptableNPObject):
15506        (WebKit::PluginProxy::getWindowScriptNPObject):
15507        (WebKit::PluginProxy::getPluginElementNPObject):
15508        (WebKit::PluginProxy::evaluate):
15509
155102011-03-16  Beth Dakin  <bdakin@apple.com>
15511
15512        Reviewed by Darin Adler.
15513
15514        Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath 
15515        WebPageProxy::viewWillStartLiveResize when resizing window after web process 
15516        crashed
15517        -and corresponding-
15518        <rdar://problem/9037685>
15519
15520        Just need simple isValid() checks here. 
15521        * UIProcess/WebPageProxy.cpp:
15522        (WebKit::WebPageProxy::initializeUIClient):
15523        (WebKit::WebPageProxy::viewWillStartLiveResize):
15524        (WebKit::WebPageProxy::viewWillEndLiveResize):
15525
155262011-03-16  Damian Kaleta  <dkaleta@apple.com>
15527
15528        Reviewed by Kevin Decker.
15529
15530        Add a user default that will force all plugins to opt in to non-executable data
15531        https://bugs.webkit.org/show_bug.cgi?id=56487
15532        <rdar://problem/9109095>
15533
15534        * UIProcess/Plugins/PluginProcessProxy.cpp:
15535        (WebKit::PluginProcessProxy::PluginProcessProxy):
15536        * UIProcess/Plugins/PluginProcessProxy.h:
15537        * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
15538        (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
15539
155402011-03-16  Chris Fleizach  <cfleizach@apple.com>
15541
15542        Reviewed by Darin Adler.
15543
15544        WK2: Need to propagate enhanced accessibility flag from UI -> web process
15545        https://bugs.webkit.org/show_bug.cgi?id=56379
15546
15547        Support sending the enhanced accessibility flag between processes.
15548
15549        * UIProcess/WebContext.cpp:
15550        (WebKit::WebContext::~WebContext):
15551        (WebKit::WebContext::setEnhancedAccessibility):
15552        * UIProcess/WebContext.h:
15553        * UIProcess/gtk/WebContextGtk.cpp:
15554        (WebKit::WebContet::platformInvalidateContext):
15555        * UIProcess/mac/WebContextMac.mm:
15556        (WebKit::WebContext::platformInitializeWebProcess):
15557        (WebKit::WebContext::platformInvalidateContext):
15558        * UIProcess/qt/WebContextQt.cpp:
15559        (WebKit::WebContext::platformInvalidateContext):
15560        * UIProcess/win/WebContextWin.cpp:
15561        (WebKit::WebContext::platformInvalidateContext):
15562        * WebProcess/WebProcess.cpp:
15563        (WebKit::WebProcess::setEnhancedAccessibility):
15564        * WebProcess/WebProcess.h:
15565        * WebProcess/WebProcess.messages.in:
15566
155672011-03-15  Oliver Hunt  <oliver@apple.com>
15568
15569        Reviewed by Geoffrey Garen.
15570
15571        Make Structure creation require a JSGlobalData
15572        https://bugs.webkit.org/show_bug.cgi?id=56438
15573
15574        Mechanical change to make all Structure creation use a JSGlobalData&.
15575
15576        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
15577        (WebKit::JSNPMethod::JSNPMethod):
15578        * WebProcess/Plugins/Netscape/JSNPMethod.h:
15579        (WebKit::JSNPMethod::createStructure):
15580        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
15581        (WebKit::JSNPObject::JSNPObject):
15582        * WebProcess/Plugins/Netscape/JSNPObject.h:
15583        (WebKit::JSNPObject::createStructure):
15584
155852011-03-16  Alexey Proskuryakov  <ap@apple.com>
15586
15587        Reviewed by Dan Bernstein.
15588
15589        WebKit2: Sometimes Command-[ opens a new tab and loads the back page in it
15590        https://bugs.webkit.org/show_bug.cgi?id=56477
15591        <rdar://problem/8806664>
15592
15593        * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
15594        Set NSApplication current event when re-dispatching a key event that returned from the web
15595        process unhandled. That way, code that looks at current event modifiers won't be confused.
15596
155972011-03-16  Sam Weinig  <sam@webkit.org>
15598
15599        Reviewed by Adam Roben.
15600
15601        Add WebKit2 API to figure out if an input or textarea was edited
15602        https://bugs.webkit.org/show_bug.cgi?id=56474
15603
15604        Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and
15605        WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time,
15606        I will work on giving these functions longer names.
15607
15608        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
15609        (WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit):
15610        (WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit):
15611        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
15612        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
15613        (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
15614        (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
15615        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
15616
156172011-03-16  Brady Eidson  <beidson@apple.com>
15618
15619        Reviewed by Adam Roben.
15620
15621        https://bugs.webkit.org/show_bug.cgi?id=56467
15622        IconDatabase-related crash seen in WK2 tests
15623
15624        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
15625        (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case.
15626
156272011-03-16  Benjamin Poulain  <benjamin.poulain@nokia.com>
15628
15629        Reviewed by Kenneth Rohde Christiansen.
15630
15631        [Qt][WK2] Loading an empty URL crashes
15632        https://bugs.webkit.org/show_bug.cgi?id=55501
15633
15634        A null WKURLRef is created in the API of WebKit 2 when converting a null string. The code
15635        of WKPageLoadURL assume the WKPageRef is not null which causes crashes if it is.
15636
15637        This patch uses the converter toWTFString() to pass from WKPageRef to WTFString. This converter
15638        ensure the returned string is a valid null string.
15639
15640        Tested through the Qt API tests.
15641
15642        * UIProcess/API/C/WKPage.cpp:
15643        (WKPageLoadURL):
15644        * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
15645        (tst_QGraphicsWKView::loadEmptyUrl):
15646        * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Added.
15647        * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: Added.
15648        (tst_QWKPage::init):
15649        (tst_QWKPage::cleanup):
15650        (tst_QWKPage::loadEmptyUrl):
15651        * UIProcess/API/qt/tests/tests.pro:
15652
156532011-03-15  Brady Eidson  <beidson@apple.com>
15654
15655        Reviewed by Sam Weinig.
15656
15657        https://bugs.webkit.org/show_bug.cgi?id=56425
15658        WebKit2 icon database.
15659
15660        Project file paperwork:
15661        * DerivedSources.make:
15662        * DerivedSources.pro:
15663        * GNUmakefile.am:
15664        * WebKit2.pri:
15665        * WebKit2.pro:
15666        * WebKit2.xcodeproj/project.pbxproj:
15667        * win/WebKit2.vcproj:
15668        * win/WebKit2Common.vsprops:
15669        * Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased
15670          to "url" instead of "uRL".
15671
15672        Add messaging-related stuff:
15673        * Platform/CoreIPC/MessageID.h:
15674        * UIProcess/WebIconDatabase.messages.in: Added.
15675        * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added.
15676        * UIProcess/WebProcessProxy.cpp:
15677        (WebKit::WebProcessProxy::didReceiveMessage):
15678        (WebKit::WebProcessProxy::didReceiveSyncMessage):
15679
15680        Prep to make WebIconDatabase an API object:
15681        * Shared/APIObject.h:
15682
15683        Add an "icon DB is enabled" flag to WebProcessCreationParameters:
15684        * Shared/WebProcessCreationParameters.cpp:
15685        (WebKit::WebProcessCreationParameters::encode):
15686        (WebKit::WebProcessCreationParameters::decode):
15687        * Shared/WebProcessCreationParameters.h:
15688
15689        Add SPI for client apps to set the icon database path:
15690        * UIProcess/API/C/WKContext.cpp:
15691        (WKContextSetIconDatabasePath):
15692        * UIProcess/API/C/WKContextPrivate.h:
15693        * UIProcess/WebContext.h:
15694        (WebKit::WebContext::setIconDatabasePath):
15695
15696        Hook up initialization, clearing, and messaging for the icon database:
15697        * UIProcess/WebContext.cpp:
15698        (WebKit::WebContext::WebContext):
15699        (WebKit::WebContext::~WebContext):
15700        (WebKit::WebContext::ensureWebProcess):
15701        (WebKit::WebContext::didReceiveMessage):
15702        (WebKit::WebContext::didReceiveSyncMessage):
15703        (WebKit::WebContext::iconDatabasePath):
15704        * UIProcess/gtk/WebContextGtk.cpp:
15705        (WebKit::WebContext::platformDefaultIconDatabasePath):
15706        * UIProcess/mac/WebContextMac.mm:
15707        (WebKit::WebContext::platformDefaultIconDatabasePath):
15708        * UIProcess/qt/WebContextQt.cpp:
15709        (WebKit::WebContext::platformDefaultIconDatabasePath):
15710        * UIProcess/win/WebContextWin.cpp:
15711        (WebKit::WebContext::platformDefaultIconDatabasePath):
15712
15713        Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object:
15714        * UIProcess/WebIconDatabase.cpp: Added.
15715        (WebKit::WebIconDatabase::create):
15716        (WebKit::WebIconDatabase::~WebIconDatabase):
15717        (WebKit::WebIconDatabase::WebIconDatabase):
15718        (WebKit::WebIconDatabase::invalidate):
15719        (WebKit::WebIconDatabase::retainIconForPageURL):
15720        (WebKit::WebIconDatabase::releaseIconForPageURL):
15721        (WebKit::WebIconDatabase::setIconURLForPageURL):
15722        (WebKit::WebIconDatabase::setIconDataForIconURL):
15723        (WebKit::WebIconDatabase::iconDataForPageURL):
15724        (WebKit::WebIconDatabase::iconURLForPageURL):
15725        (WebKit::WebIconDatabase::iconDataKnownForIconURL):
15726        (WebKit::WebIconDatabase::loadDecisionForIconURL):
15727        (WebKit::WebIconDatabase::didReceiveMessage):
15728        (WebKit::WebIconDatabase::didReceiveSyncMessage):
15729        * UIProcess/WebIconDatabase.h: Added.
15730        (WebKit::WebIconDatabase::clearContext):
15731        (WebKit::WebIconDatabase::type):
15732
15733        Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging:
15734        * WebProcess/IconDatabase: Added.
15735        * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added.
15736        (WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy):
15737        (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
15738        (WebKit::WebIconDatabaseProxy::isEnabled):
15739        (WebKit::WebIconDatabaseProxy::setEnabled):
15740        (WebKit::WebIconDatabaseProxy::iconForPageURL):
15741        (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
15742        (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
15743        (WebKit::WebIconDatabaseProxy::iconURLForPageURL):
15744        (WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL):
15745        (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
15746        (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
15747        (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
15748        (WebKit::WebIconDatabaseProxy::urlImportFinished):
15749        (WebKit::WebIconDatabaseProxy::didReceiveMessage):
15750        * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added.
15751
15752        Hook up initialization and messaging for the icon database proxy:
15753        * WebProcess/WebProcess.cpp:
15754        (WebKit::WebProcess::WebProcess):
15755        (WebKit::WebProcess::initializeWebProcess):
15756        (WebKit::WebProcess::didReceiveMessage):
15757        * WebProcess/WebProcess.h:
15758
157592011-03-15  Sam Weinig  <sam@webkit.org>
15760
15761        Reviewed by Anders Carlsson.
15762
15763        WebKit2: False SPOD cursor when context menu is open
15764        <rdar://problem/9029154>
15765        https://bugs.webkit.org/show_bug.cgi?id=56433
15766
15767        * UIProcess/WebPageProxy.cpp:
15768        (WebKit::WebPageProxy::showContextMenu):
15769        Update to match showPopupMenu idiomatically, and stop the responsivenessTimer
15770        since the act of showing the context menu could spin a nested runloop.
15771
15772        * UIProcess/mac/WebContextMenuProxyMac.mm:
15773        (WebKit::WebContextMenuProxyMac::showContextMenu):
15774        * UIProcess/qt/WebContextMenuProxyQt.cpp:
15775        (WebKit::WebContextMenuProxyQt::showContextMenu):
15776        * UIProcess/win/WebContextMenuProxyWin.cpp:
15777        (WebKit::WebContextMenuProxyWin::showContextMenu):
15778        Move isEmpty() check to implementations, since we don't want to show
15779        this in any case, not just the one where we check it.
15780
157812011-03-15  Siddharth Mathur  <siddharth.mathur@nokia.com>
15782
15783        Reviewed by Laszlo Gombos.
15784
15785        [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol
15786        https://bugs.webkit.org/show_bug.cgi?id=56417
15787
15788        Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure
15789        the symbol is always exported/imported.
15790
15791        * WebProcess/qt/WebProcessMainQt.cpp:
15792        (WebKit::WebProcessMainQt):
15793        * qt/MainQt.cpp:
15794
157952011-03-15  Alexey Proskuryakov  <ap@apple.com>
15796
15797        Reviewed by Darin Adler.
15798
15799        REGRESSION (WebKit2): keygen element doesn't work
15800        https://bugs.webkit.org/show_bug.cgi?id=56402
15801        <rdar://problem/9006545>
15802
15803        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
15804        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
15805        Added strings used by keygen.
15806
15807        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
15808        a function used by keygen.
15809
158102011-03-15  Beth Dakin  <bdakin@apple.com>
15811
15812        Reviewed by Simon Fraser.
15813
15814        WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6%
15815
15816        New WebKitystemInterface function to force the scrollbars to flash
15817        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
15818        (InitWebCoreSystemInterface):
15819
158202011-03-15  Anders Carlsson  <andersca@apple.com>
15821
15822        Reviewed by Sam Weinig.
15823
15824        Make sure that NP_Shutdown is always the last NPP function called
15825        https://bugs.webkit.org/show_bug.cgi?id=56391
15826        <rdar://problem/8989902>
15827
15828        Make sure to always increment the load count whenever a web process connection
15829        is opened to a plug-in process, and decrement it when the last web process connection
15830        goes away.
15831
15832        * PluginProcess/PluginProcess.cpp:
15833        (WebKit::PluginProcess::createWebProcessConnection):
15834        (WebKit::PluginProcess::startShutdownTimerIfNecessary):
15835        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
15836        * Shared/Plugins/Netscape/NetscapePluginModule.h:
15837        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
15838        (WebKit::NetscapePlugin::NetscapePlugin):
15839        (WebKit::NetscapePlugin::~NetscapePlugin):
15840
158412011-03-15  Martin Robinson  <mrobinson@igalia.com>
15842
15843        Reviewed by Adam Barth.
15844
15845        [GTK] [WebKit2] The UIProcess never changes the mouse cursor
15846        https://bugs.webkit.org/show_bug.cgi?id=56333
15847
15848        Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
15849        the cursor to change as the user mouses around the page. There is currently
15850        no test infrastructure to track cursor changes.
15851
15852        * UIProcess/gtk/WebView.cpp:
15853        (WebKit::WebView::setCursor): Ported implementation from WebKit1.
15854
158552011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
15856
15857        Reviewed by Darin Adler.
15858
15859        Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
15860        info into the headers rather than in export symbol definition files, but disable it on 
15861        all platforms initially so we can deal with port build issues one port at a time.
15862        
15863        https://bugs.webkit.org/show_bug.cgi?id=27551
15864
15865        * config.h:
15866
158672011-03-14  Alexey Proskuryakov  <ap@apple.com>
15868
15869        Reviewed by Darin Adler.
15870
15871        REGRESSION: Print preview is blank when selecting multiple pages per sheet
15872        https://bugs.webkit.org/show_bug.cgi?id=56341
15873        <rdar://problem/8991382>
15874
15875        * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): Don't reset latest expected
15876        callback number after receiving a different one. We only update preview after receiving
15877        the latest expected page data (and the assumption is that AppKit will ask for pages in
15878        natural order for N-up).
15879
158802011-03-14  Adam Roben  <aroben@apple.com>
15881
15882        Make WKBundlePageCanHandleRequest return true for empty document URLs
15883
15884        Reviewed by Sam Weinig.
15885
15886        * WebProcess/WebPage/WebPage.cpp:
15887        (WebKit::WebPage::canHandleRequest): Return true for any URL schemes that are handled as
15888        empty documents, and defer to the platform for everything else.
15889
15890        * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest.
15891
15892        * WebProcess/WebPage/mac/WebPageMac.mm:
15893        (WebKit::WebPage::platformCanHandleRequest):
15894        * WebProcess/WebPage/qt/WebPageQt.cpp:
15895        (WebKit::WebPage::platformCanHandleRequest):
15896        * WebProcess/WebPage/win/WebPageWin.cpp:
15897        (WebKit::WebPage::platformCanHandleRequest):
15898        Renamed from canHandleRequest.
15899
159002011-03-14  Chris Fleizach  <cfleizach@apple.com>
15901
15902        Reviewed by Beth Dakin.
15903
15904        CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248
15905        https://bugs.webkit.org/show_bug.cgi?id=56336
15906
15907        Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view()
15908        pointers.
15909
15910        * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
15911        (-[AccessibilityWebPageObject accessibilityHitTest:]):
15912
159132011-03-14  Alice Liu  <alice.liu@apple.com>
15914
15915        Reviewed by Sam Weinig.
15916
15917        Provide API for creating WKImage from CGImageRef
15918        https://bugs.webkit.org/show_bug.cgi?id=56159
15919
15920        Add function for creating a WKImage from CGImage data.
15921        * Shared/API/c/cg/WKImageCG.cpp:
15922        (WKImageCreateFromCGImage): Added. Creates a graphics context for the bitmap-backed image and draws into it. 
15923        * Shared/API/c/cg/WKImageCG.h:
15924
159252011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
15926
15927        Reviewed by Adam Roben.
15928
15929        [Qt][WK2]Unbreak InjectedBundle on Qt
15930        https://bugs.webkit.org/show_bug.cgi?id=54109
15931
15932        Add API's to WKURL and WKString to satisfy
15933        WebKitTestRunner's needs.
15934
15935        * Shared/API/c/WKString.cpp:
15936        (WKStringIsEqualToUTF8CStringIgnoringCase):
15937        * Shared/API/c/WKString.h:
15938        * Shared/API/c/WKURL.cpp:
15939        (WKURLCopyHostName):
15940        (WKURLCopyScheme):
15941        * Shared/API/c/WKURL.h:
15942        * Shared/WebString.h:
15943        (WebKit::WebString::equalToUTF8StringIgnoringCase):
15944        * Shared/WebURL.h: Added OwnPtr<KURL> member to be able
15945        to lazily parse the URL and store the result.
15946        (WebKit::WebURL::host):
15947        (WebKit::WebURL::protocol):
15948        (WebKit::WebURL::parseURLIfNecessary):
15949        * win/WebKit2.def: Revert the symbol exports that were
15950        needed to use KURL in WebKitTestRunner.
15951
159522011-03-14  Jeff Miller  <jeffm@apple.com>
15953
15954        Reviewed by Adam Roben.
15955
15956        Add WKViewSetScrollOffsetOnNextResize() to C API on Windows
15957        https://bugs.webkit.org/show_bug.cgi?id=56340
15958
15959        * UIProcess/API/C/win/WKView.cpp:
15960        (WKViewSetScrollOffsetOnNextResize): Added.
15961        * UIProcess/API/C/win/WKView.h: Added WKViewSetScrollOffsetOnNextResize().
15962        * UIProcess/win/WebView.cpp:
15963        (WebKit::WebView::onSizeEvent): Apply any scroll offset when setting the drawing area size.
15964        (WebKit::WebView::setScrollOffsetOnNextResize): Added.
15965        * UIProcess/win/WebView.h: Added setScrollOffsetOnNextResize().
15966
159672011-03-14  Brian Weinstein  <bweinstein@apple.com>
15968
15969        Reviewed by Adam Roben and Gavin Barraclough.
15970
15971        FileSystemWin.cpp needs listDirectory() implementation
15972        https://bugs.webkit.org/show_bug.cgi?id=56331
15973        <rdar://problem/9126635>
15974        
15975        Move PathWalker down into WebCore, and call the PathWalker in WebCore
15976        (that now has a second argument, the pattern to take).
15977
15978        * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
15979        (WebKit::PluginInfoStore::pluginPathsInDirectory):
15980
159812011-03-14  Sam Weinig  <sam@webkit.org>
15982
15983        Reviewed by Darin Adler.
15984
15985        WebKit2: No icon shown for <input type=file>
15986        <rdar://problem/8988982>
15987        https://bugs.webkit.org/show_bug.cgi?id=54288
15988
15989        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
15990        (WebKit::WebChromeClient::chooseIconForFiles):
15991        Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles.
15992
159932011-03-14  Brady Eidson  <beidson@apple.com>
15994
15995        Reviewed by Dan Bernstein.
15996
15997        <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
15998        Need WK2 API to view/manage origins with LocalStorage
15999
16000        Hookup the existing API stubs to the WebCore implementations:
16001        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
16002        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
16003        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
16004        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
16005
160062011-03-13  Brady Eidson  <beidson@apple.com>
16007
16008        Reviewed by Sam Weinig.
16009
16010        <rdar://problem/9127270> and https://bugs.webkit.org/show_bug.cgi?id=56282
16011
16012        Pass the path along with creation parameters:
16013        * Shared/WebProcessCreationParameters.cpp:
16014        (WebKit::WebProcessCreationParameters::encode):
16015        (WebKit::WebProcessCreationParameters::decode):
16016        * Shared/WebProcessCreationParameters.h:
16017
16018        Add SPI to set the path:
16019        * UIProcess/API/C/WKContext.cpp:
16020        (WKContextSetLocalStorageDirectory):
16021        * UIProcess/API/C/WKContextPrivate.h:
16022
16023        Pass the path along in the process creation parameters:
16024        * UIProcess/WebContext.cpp:
16025        (WebKit::WebContext::ensureWebProcess):
16026        (WebKit::WebContext::localStorageDirectory):
16027        * UIProcess/WebContext.h:
16028        (WebKit::WebContext::setLocalStorageDirectory):
16029
16030        * UIProcess/gtk/WebContextGtk.cpp:
16031        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
16032        * UIProcess/mac/WebContextMac.mm:
16033        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
16034        * UIProcess/qt/WebContextQt.cpp:
16035        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
16036        * UIProcess/win/WebContextWin.cpp:
16037        (WebKit::WebContext::platformDefaultLocalStorageDirectory):
16038
16039        Include the path with settings updates, because WebCore needs it set on the Settings object:
16040        * WebProcess/WebPage/WebPage.cpp:
16041        (WebKit::WebPage::updatePreferences):
16042
16043        * WebProcess/WebProcess.cpp:
16044        (WebKit::WebProcess::initializeWebProcess):
16045        * WebProcess/WebProcess.h:
16046        (WebKit::WebProcess::localStorageDirectory):
16047
16048        Sandboxing stuff:
16049        * WebProcess/com.apple.WebProcess.sb:
16050        * WebProcess/mac/WebProcessMac.mm:
16051        (WebKit::initializeSandbox):
16052
160532011-03-12  Jer Noble  <jer.noble@apple.com>
16054
16055        Reviewed by Mark Rowe.
16056
16057        WebKit2: Build WKFullScreenWindowController cleanly in 32-bit.
16058        https://bugs.webkit.org/show_bug.cgi?id=56260
16059
16060        Include <Carbon/Carbon.h> instead of <HIToolbox/MacApplication.h>.
16061
16062        * UIProcess/mac/WKFullScreenWindowController.mm:
16063
160642011-03-13  Sam Weinig  <sam@webkit.org>
16065
16066        Reviewed by Anders Carlsson.
16067
16068        Add ability to create a WKErrorRef
16069        <rdar://problem/9115768>
16070        https://bugs.webkit.org/show_bug.cgi?id=56279
16071
16072        * Shared/API/c/cf/WKErrorCF.cpp: Added.
16073        (WKErrorCreateWithCFError):
16074        (WKErrorCopyCFError):
16075        * Shared/API/c/cf/WKErrorCF.h: Added.
16076        Add new API to create a WKErrorRef from a CFErrorRef
16077        and vice-versa.
16078
16079        * WebKit2.xcodeproj/project.pbxproj:
16080        * win/WebKit2.vcproj:
16081        * win/WebKit2Generated.make:
16082        Add new files.
16083
160842011-03-13  Pratik Solanki  <psolanki@apple.com>
16085
16086        Reviewed by Brady Eidson.
16087
16088        Make adjustMIMETypeIfNecessary use CFNetwork directly
16089        https://bugs.webkit.org/show_bug.cgi?id=55912
16090
16091        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
16092        (InitWebCoreSystemInterface): Support for new WKSI functions.
16093
160942011-03-13  Dan Bernstein  <mitz@apple.com>
16095
16096        Reviewed by Darin Adler.
16097
16098        WebPageProxy cleanup
16099        https://bugs.webkit.org/show_bug.cgi?id=56267
16100
16101        * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from
16102        here to WebPageProxyMac.mm.
16103        * UIProcess/WebPageProxy.h: Cleaned up #includes.
16104        * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations
16105        here.
16106        (WebKit::WebPageProxy::updateWindowIsVisible):
16107        (WebKit::WebPageProxy::windowAndViewFramesChanged):
16108        (WebKit::WebPageProxy::getMarkedRange):
16109        (WebKit::WebPageProxy::characterIndexForPoint):
16110        (WebKit::WebPageProxy::firstRectForCharacterRange):
16111        (WebKit::WebPageProxy::writeSelectionToPasteboard):
16112        (WebKit::WebPageProxy::setDragImage):
16113        (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
16114        (WebKit::WebPageProxy::interpretKeyEvent):
16115        (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
16116        (WebKit::WebPageProxy::uppercaseWord):
16117        (WebKit::WebPageProxy::lowercaseWord):
16118        (WebKit::WebPageProxy::capitalizeWord):
16119        (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
16120        (WebKit::WebPageProxy::didPerformDictionaryLookup):
16121        (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
16122        (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
16123        (WebKit::WebPageProxy::setComplexTextInputEnabled):
16124
161252011-03-13  Dan Bernstein  <mitz@apple.com>
16126
16127        Reviewed by Darin Adler.
16128
16129        <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down
16130        https://bugs.webkit.org/show_bug.cgi?id=56265
16131
16132        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
16133        (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than
16134        document coordinates.
16135
161362011-03-13  Dan Bernstein  <mitz@apple.com>
16137
16138        Reviewed by Mark Rowe.
16139
16140        Fix a crash when dragging.
16141
16142        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
16143        (WebKit::convertImageToBitmap): Retain the saved context.
16144
161452011-03-12  Darin Adler  <darin@apple.com>
16146
16147        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
16148        (WebKit::WebDragClient::startDrag): Fixed typo in a comment.
16149
161502011-03-11  Darin Adler  <darin@apple.com>
16151
16152        Reviewed by Sam Weinig.
16153
16154        Dragging image to desktop gives webloc instead of image file in WebKit2
16155        https://bugs.webkit.org/show_bug.cgi?id=56193
16156
16157        * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
16158        (WebKit::convertImageToBitmap): Added. Factored out from startDrag to
16159        make the startDrag code clearer.
16160        (WebKit::WebDragClient::startDrag): Streamlined code a bit.
16161        (WebKit::cachedImage): Added. Helper for function below.
16162        (WebKit::arrayForURLsWithTitles): Added. Helper for function below.
16163        (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file
16164        promises and removed a log of uneeded code.
16165        (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added.
16166        (promisedDataClient): Added.
16167        (-[WKPasteboardOwner clearImage]): Added.
16168        (-[WKPasteboardOwner initWithImage:]): Added.
16169        (-[WKPasteboardOwner dealloc]): Added.
16170        (-[WKPasteboardOwner finalize]): Added.
16171        (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added.
16172        (-[WKPasteboardOwner pasteboardChangedOwner:]): Added.
16173        (matchesExtensionOrEquivalent): Added.
16174        (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added.
16175        Much of the new code above came from the WebKit1 drag code.
16176
16177        * WebProcess/WebPage/WebPage.cpp:
16178        (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded.
16179        * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource.
16180        * WebProcess/WebPage/mac/WebPageMac.mm:
16181        (WebKit::WebPage::setDragSource): Added.
16182        (WebKit::WebPage::platformDragEnded): Added.
16183
161842011-03-12  Mark Rowe  <mrowe@apple.com>
16185
16186        Fix the 32-bit build.
16187
16188        This involves hacking around some HIToolbox headers that do things of dubious correctness,
16189        and fixing the usual CGRect vs NSRect issues.
16190        
16191        * UIProcess/mac/WKFullScreenWindowController.mm:
16192        (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect.
16193        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
16194        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
16195
161962011-03-12  Anders Carlsson  <andersca@apple.com>
16197
16198        Reviewed by Sam Weinig.
16199
16200        * WebProcess/WebPage/WebFrame.cpp:
16201        (WebKit::WebFrame::url):
16202        Get the URL from the loader, not from the document.
16203
16204        (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
16205        Return the correct suggested filename for the main resource.
16206
16207        (WebKit::WebFrame::mimeTypeForResourceWithURL):
16208        Return the correct mime type for the main resource.
16209
162102011-03-12  Anders Carlsson  <andersca@apple.com>
16211
16212        Reviewed by Sam Weinig.
16213
16214        Should be able to download a PDF to the Downloads folder
16215        https://bugs.webkit.org/show_bug.cgi?id=56256
16216
16217        * UIProcess/API/C/WKPage.h:
16218        Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client.
16219
16220        * UIProcess/API/mac/PDFViewController.h:
16221        * UIProcess/API/mac/PDFViewController.mm:
16222        (-[WKPDFView _applyPDFPreferences]):
16223        (-[WKPDFView _updatePreferences:]):
16224        Use new PDFViewController::page getter.
16225
16226        (-[WKPDFView PDFViewSavePDFToDownloadFolder:]):
16227        Call PDFViewController::savePDFToDownloadsFolder.
16228
16229        (WebKit::releaseCFData):
16230        (WebKit::PDFViewController::savePDFToDownloadsFolder):
16231        Create a WebData that wraps the CFData, then pass it along to
16232        WebPageProxy::saveDataToFileInDownloadsFolder.
16233
16234        * UIProcess/WebPageProxy.cpp:
16235        (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
16236        Call WebUIClient::saveDataToFileInDownloadsFolder.
16237
16238        (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
16239        * UIProcess/WebUIClient.h:
16240        Call the UI client callback function.
16241
162422011-03-12  Anders Carlsson  <andersca@apple.com>
16243
16244        Reviewed by Sam Weinig.
16245
16246        WebData should be able to wrap already existing data
16247        https://bugs.webkit.org/show_bug.cgi?id=56254
16248
16249        * Shared/WebData.h:
16250        (WebKit::WebData::createWithoutCopying):
16251        (WebKit::WebData::create):
16252        (WebKit::WebData::~WebData):
16253        (WebKit::WebData::bytes):
16254        (WebKit::WebData::size):
16255        (WebKit::WebData::WebData):
16256        (WebKit::WebData::fastFreeBytes):
16257
162582011-03-12  Jer Noble  <jer.noble@apple.com>
16259
16260        Reviewed by Eric Carlson.
16261
16262        WebKit2: Initialize the WebFullScreenManagerProxy with a WKView
16263        https://bugs.webkit.org/show_bug.cgi?id=56250
16264
16265        * UIProcess/API/mac/WKView.mm:
16266        (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self).
16267
162682011-03-11  Jer Noble  <jer.noble@apple.com>
16269
16270        Reviewed by Anders Carlsson.
16271
16272        Add full screen animation code to WebFullScreenManager.
16273        https://bugs.webkit.org/show_bug.cgi?id=56220
16274
16275        * WebProcess/FullScreen/WebFullScreenManager.cpp: .
16276        (WebKit::WebFullScreenManager::~WebFullScreenManager): Added.
16277        (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs.
16278        (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color.
16279        (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto.
16280        (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
16281        (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
16282        * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a 
16283            concrete subclass.
16284        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added.
16285        * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added.
16286        (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations.
16287        (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added.
16288        (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added.
16289        (-[WebFullScreenManagerAnimationListener invalidate]): Added.
16290        (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac.
16291        (WebKit::WebFullScreenManagerMac::create): Added.
16292        (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added.
16293        (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added.
16294        (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host.
16295        (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D
16296            which will animate the full screen renderer from its initial position to its final one.
16297        (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
16298
162992011-03-11  Jer Noble  <jer.noble@apple.com>
16300
16301        Reviewed by Anders Carlsson.
16302
16303        Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy
16304        https://bugs.webkit.org/show_bug.cgi?id=56218
16305
16306        * UIProcess/WebFullScreenManagerProxy.cpp:
16307        * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added.
16308        (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController.
16309        (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
16310        (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto.
16311        (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto.
16312        (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto.
16313        (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto.
16314        (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto.
16315        (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto.
16316        (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto.
16317        * UIProcess/API/mac/WKView.mm:
16318        (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController.
16319        * UIProcess/API/mac/WKViewInternal.h:
16320
163212011-03-11  Jer Noble  <jer.noble@apple.com>
16322
16323        Reviewed by Anders Carlsson.
16324
16325        Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController.
16326
16327        [WebKit2] Implement a full screen window controller
16328        https://bugs.webkit.org/show_bug.cgi?id=56210
16329
16330        * UIProcess/mac/WKFullScreenWindowController.h: Added.
16331        * UIProcess/mac/WKFullScreenWindowController.mm: Added.
16332        (-[WKFullScreenWindowController init]): Remove the _mediaEventListener.
16333        (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests.
16334        (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection.
16335        (-[WKFullScreenWindowController webView]): Type change.
16336        (-[WKFullScreenWindowController setWebView:]): Type change.
16337        (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes.
16338        (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes.
16339        (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code
16340            which will reappear in WebFullScreenManager.
16341        (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added.
16342        (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added.
16343        (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen.
16344        (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added.
16345        (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added.
16346        (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the
16347            layer tree host.
16348        (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same.
16349        (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added.
16350        (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes.
16351        (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto.
16352        (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto.
16353        (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto.
16354        (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto.
16355        (-[WKFullScreenWindowController _enableTickleTimer]): Ditto.
16356        (-[WKFullScreenWindowController _disableTickleTimer]): Ditto.
16357        (-[WKFullScreenWindowController _tickleTimerFired]): Ditto.
16358        (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar.
16359        (-[WKFullScreenWindowController _manager]): Added.
16360        (-[WKFullScreenWindowController _requestExit]): Case changes.
16361        (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto.
16362        (-[WKFullScreenWindowController _swapView:with:]): Added.
16363        (-[WKFullScreenWindowController _fullScreenWindow]): Case changes.
16364        (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no
16365            longer needs to be flipped.
16366        (-[WKFullScreenWindow cancelOperation:]): Case changes.
16367
163682011-03-11  Jer Noble  <jer.noble@apple.com>
16369
16370        Reviewed by Anders Carlsson.
16371
16372        Create new interface stubs to support full screen mode in WebKit2.
16373
16374        WebKit2: Plumb new full screen animation APIs through WebKit2.
16375        https://bugs.webkit.org/show_bug.cgi?id=55993
16376
16377        * UIProcess/WebFullScreenManagerProxy.cpp:
16378        (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added.
16379        (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView.
16380        (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView.
16381        (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added.
16382        (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added.
16383        (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
16384        (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
16385        (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
16386        (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
16387        (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
16388        (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
16389        (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
16390        * UIProcess/WebFullScreenManagerProxy.h:
16391        * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions.
16392        * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file.
16393        * UIProcess/WebPageProxy.h: Ditto.
16394        * WebProcess/FullScreen/WebFullScreenManager.cpp:
16395        (WebKit::WebFullScreenManager::element): Added.
16396        (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage.
16397        (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
16398        (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
16399        (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added..
16400        (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added.
16401        (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added.
16402        (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added.
16403        (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub.
16404        (WebKit::WebFullScreenManager::getFullScreenRect): Added.
16405        (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub.
16406        (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub.
16407        * WebProcess/FullScreen/WebFullScreenManager.h:
16408        * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions.
16409        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
16410        (WebKit::WebChromeClient::setRootFullScreenLayer): Added.
16411        * WebProcess/WebCoreSupport/WebChromeClient.h:
16412
164132011-03-11  Alice Liu  <alice.liu@apple.com>
16414
16415        Reviewed by Sam Weinig.
16416
16417        Support encoding /decoding WebData in usermessages
16418        https://bugs.webkit.org/show_bug.cgi?id=56158
16419
16420        Added encoding/decoding for APIObject::TypeData
16421        * Shared/UserMessageCoders.h:
16422        (WebKit::UserMessageEncoder::baseEncode):
16423        (WebKit::UserMessageDecoder::baseDecode):
16424
164252011-03-11  Alice Liu  <alice.liu@apple.com>
16426
16427        Reviewed by Sam Weinig.
16428
16429        Add api for "remove" to WKMutableDictionary
16430        https://bugs.webkit.org/show_bug.cgi?id=56157
16431
16432        * Shared/API/c/WKMutableDictionary.cpp:
16433        (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl.
16434        * Shared/API/c/WKMutableDictionary.h:
16435        * Shared/MutableDictionary.cpp:
16436        (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap.
16437        * Shared/MutableDictionary.h:
16438
164392011-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
16440
16441        Unreviewed, rolling out r80899 and r80912.
16442        http://trac.webkit.org/changeset/80899
16443        http://trac.webkit.org/changeset/80912
16444        https://bugs.webkit.org/show_bug.cgi?id=56236
16445
16446        Caused animation tests to crash on Snow Leopard WebKit2
16447        (Requested by rniwa on #webkit).
16448
16449        * Shared/ShareableBitmap.cpp:
16450        (WebKit::ShareableBitmap::create):
16451        (WebKit::ShareableBitmap::createShareable):
16452        (WebKit::ShareableBitmap::resize):
16453        * Shared/ShareableBitmap.h:
16454        (WebKit::ShareableBitmap::numBytesForSize):
16455        (WebKit::ShareableBitmap::sizeInBytes):
16456        * UIProcess/DrawingAreaProxyImpl.cpp:
16457        (WebKit::DrawingAreaProxyImpl::update):
16458        * WebKit2.xcodeproj/project.pbxproj:
16459        * WebProcess/WebPage/DrawingArea.h:
16460        (WebKit::DrawingArea::didUpdate):
16461        * WebProcess/WebPage/DrawingArea.messages.in:
16462        * WebProcess/WebPage/DrawingAreaImpl.cpp:
16463        (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
16464        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
16465        (WebKit::DrawingAreaImpl::didUpdate):
16466        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
16467        (WebKit::DrawingAreaImpl::display):
16468        * WebProcess/WebPage/DrawingAreaImpl.h:
16469        * WebProcess/WebPage/SharedMemoryCache.cpp: Removed.
16470        * WebProcess/WebPage/SharedMemoryCache.h: Removed.
16471        * win/WebKit2.vcproj:
16472
164732011-03-11  Brian Weinstein  <bweinstein@apple.com>
16474
16475        Windows build fix. Add SharedMemoryCache to the vcproj.
16476
16477        * win/WebKit2.vcproj:
16478
164792011-03-11  Alexey Proskuryakov  <ap@apple.com>
16480
16481        Reviewed by Sam Weinig.
16482
16483        https://bugs.webkit.org/show_bug.cgi?id=56222
16484        A window remains frozen if web process crashes during printing
16485
16486        * UIProcess/API/mac/PageClientImpl.h:
16487        * UIProcess/API/mac/PageClientImpl.mm:
16488        * UIProcess/PageClient.h:
16489        * UIProcess/WebPageProxy.cpp:
16490        (WebKit::WebPageProxy::setComplexTextInputEnabled):
16491        * UIProcess/WebPageProxy.h:
16492        Moved setAutodisplay code into WKPrintingView.
16493
16494        * UIProcess/API/mac/WKPrintingView.h:
16495        * UIProcess/API/mac/WKView.mm:
16496        (-[WKView printOperationWithPrintInfo:forFrame:]):
16497        Keep a reference to the actual WKView, so that we can manipulate how it displays, even if
16498        page goes away.
16499
16500        * UIProcess/API/mac/WKPrintingView.mm:
16501        (-[WKPrintingView initWithFrameProxy:WebKit::view:]):
16502        (-[WKPrintingView _setAutodisplay:]):
16503        (-[WKPrintingView _suspendAutodisplay]):
16504        (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
16505        Move setAutodisplay here.
16506
165072011-03-11  Anders Carlsson  <andersca@apple.com>
16508
16509        Reviewed by Sam Weinig.
16510
16511        Add a shared memory cache to the web process
16512        https://bugs.webkit.org/show_bug.cgi?id=56232
16513
16514        Add a very simple shared memory cache to the web process, so that we don't have to allocate and
16515        free memory over and over when painting.
16516
16517        * Shared/ShareableBitmap.cpp:
16518        (WebKit::ShareableBitmap::create):
16519        (WebKit::ShareableBitmap::createShareable):
16520        (WebKit::ShareableBitmap::resize):
16521        * Shared/ShareableBitmap.h:
16522        (WebKit::ShareableBitmap::numBytesNeededForBitmapSize):
16523        (WebKit::ShareableBitmap::sizeInBytes):
16524        Rename numBytesForSize to numBytesNeededForBitmapSize.
16525
16526        * UIProcess/DrawingAreaProxyImpl.cpp:
16527        (WebKit::DrawingAreaProxyImpl::update):
16528        Always send back a DidUpdate message, even if we didn't use the update info.
16529        This is needed so that the web process knows when the UI process is done with the shared memory inside
16530        the update info struct.
16531
16532        * WebKit2.xcodeproj/project.pbxproj:
16533        Add new files.
16534
16535        * WebProcess/WebPage/DrawingArea.h:
16536        (WebKit::DrawingArea::didUpdate):
16537        * WebProcess/WebPage/DrawingArea.messages.in:
16538        DidUpdate now takes a boolean.
16539
16540        * WebProcess/WebPage/DrawingAreaImpl.cpp:
16541        (WebKit::sharedMemoryCache):
16542        Add shared memory cache.
16543
16544        (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
16545        Return the shared memory to the cache.
16546
16547        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
16548        display now takes an extra boolean.
16549
16550        (WebKit::DrawingAreaImpl::didUpdate):
16551        Return the shared memory to the cache.
16552
16553        (WebKit::DrawingAreaImpl::display):
16554        If useSharedMemoryCache is true, get shared memory from the cache.
16555
16556        * WebProcess/WebPage/SharedMemoryCache.cpp: Added.
16557        (WebKit::SharedMemoryCache::acquireSharedMemory):
16558        If the memory we currently hold on to is big enough, return it.
16559
16560        (WebKit::SharedMemoryCache::releaseSharedMemory):
16561        If we're already holding on to shared memory, evict it if the returned
16562        shared memory object is bigger than the one we currently hold.
16563
16564        (WebKit::SharedMemoryCache::clearCacheTimerFired):
16565        Null out the shared memory object.
16566
165672011-03-11  Jessie Berlin  <jberlin@apple.com>
16568
16569        Reviewed by Adam Roben.
16570
16571        Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
16572        Process has finished launching.
16573        https://bugs.webkit.org/show_bug.cgi?id=56208
16574
16575        Only send the message if the Web Process is valid.
16576
16577        * UIProcess/WebContext.cpp:
16578        (WebKit::WebContext::clearResourceCaches):
16579
165802011-03-11  Anders Carlsson  <andersca@apple.com>
16581
16582        Reviewed by Dan Bernstein.
16583
16584        Don't paint more than 60 times per second
16585        https://bugs.webkit.org/show_bug.cgi?id=56206
16586        <rdar://problem/9085989>
16587
16588        * WebProcess/WebPage/DrawingAreaImpl.cpp:
16589        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
16590        Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired.
16591
16592        (WebKit::DrawingAreaImpl::didUpdate):
16593        Call displayTimerFired instead of display.
16594
16595        (WebKit::DrawingAreaImpl::displayTimerFired):
16596        If we're asked to paint again less than 1/60th of a second after we've already painted,
16597        defer painting.
16598
16599        (WebKit::DrawingAreaImpl::display):
16600        Update m_lastDisplayTime.
16601
166022011-03-11  Mark Rowe  <mrowe@apple.com>
16603
16604        Reviewed by Alice Liu.
16605
16606        <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL.
16607
16608        * UIProcess/cf/WebPageProxyCF.cpp:
16609        (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item
16610        as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will
16611        be done by our call to loadURL elsewhere in the function.
16612
166132011-03-10  Alexey Proskuryakov  <ap@apple.com>
16614
16615        Reviewed by Jon Honeycutt.
16616
16617        WebKit2 UI process crashes if web process crashes while computing page rects for printing
16618        https://bugs.webkit.org/show_bug.cgi?id=56160
16619        <rdar://problem/9027410>
16620
16621        * UIProcess/API/mac/WKPrintingView.mm:
16622        (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that
16623        we have when resuming autodisplay.
16624        (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME.
16625        (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing
16626        when there is a communication error, so results are all null).
16627        (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many
16628        pages it had.
16629        (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages
16630        nor knowing them, as it happens when the web process crashes.        
16631
166322011-03-10  Mark Rowe  <mrowe@apple.com>
16633
16634        Rubber-stamped by Sam Weinig.
16635
16636        Part of <rdar://problem/8728860> WebKit2 needs to be made localizable
16637
16638        The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents
16639        the default localization that we set during launch from being respected.
16640
16641        * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion.
16642        * WebProcess/Info.plist: Ditto.
16643
166442011-03-10  Martin Robinson  <mrobinson@igalia.com>
16645
16646        Build for WebKit2 GTK+ after r80714.
16647
16648        * GNUmakefile.am: Update source list.
16649        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 
16650        (WebKit::x11Display): Add missing semicolon.
16651
166522011-03-10  Chris Fleizach  <cfleizach@apple.com>
16653
16654        Reviewed by Darin Adler.
16655
16656        REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus
16657        https://bugs.webkit.org/show_bug.cgi?id=55959
16658
16659        NSApplication has to return the focused element within the app in order
16660        for NSAccessibilityHandleFocusChanged() to work. The default implementation
16661        relies on keyWindow. Consequently, in WK2, the WebProcess must override that method
16662        to return the appropriate focused element within the WebProcess, since
16663        there is no keyWindow.
16664
16665        * WebKit2.xcodeproj/project.pbxproj:
16666        * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
16667        (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
16668        * WebProcess/WebProcess.cpp:
16669        (WebKit::WebProcess::focusedWebPage):
16670        * WebProcess/WebProcess.h:
16671        * WebProcess/mac/NSApplicationOverride.mm: Added.
16672        (-[NSApplication accessibilityFocusedUIElement]):
16673
166742011-03-10  Oleg Romashin  <romaxa@gmail.com>
16675
16676        Reviewed by Andreas Kling.
16677
16678        Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3
16679        Solving conflict of Qt and Xlib includes
16680
16681        * Shared/Plugins/NPIdentifierData.cpp:
16682        * Shared/Plugins/NPIdentifierData.h:
16683        * Shared/Plugins/NPObjectProxy.cpp:
16684        * Shared/Plugins/NPVariantData.h:
16685
166862011-03-10  Sam Weinig  <sam@webkit.org>
16687
16688        Reviewed by Mark Rowe.
16689
16690        - Fix plugins in release and production builds.
16691
16692        * WebKit2.xcodeproj/project.pbxproj:
16693        Make sure to base the PluginProcess target on the correct xcconfig file
16694        in all configurations.
16695
166962011-03-09  Matthew Delaney  <mdelaney@apple.com>
16697
16698        Reviewed by Simon Fraser.
16699
16700        Plumb through settings for accelerated drawing for canvas
16701        https://bugs.webkit.org/show_bug.cgi?id=56039
16702
16703        * Shared/WebPreferencesStore.h:
16704        * UIProcess/API/C/WKPreferences.cpp:
16705        * UIProcess/API/C/WKPreferencesPrivate.h:
16706        * WebProcess/WebPage/WebPage.cpp:
16707
167082011-03-10  Jessie Berlin  <jberlin@apple.com>
16709
16710        Reviewed by Oliver Hunt and Brian Weinstein.
16711
16712        WebKit2: Need a way to clear only the in-memory resource caches
16713        https://bugs.webkit.org/show_bug.cgi?id=56022
16714
16715        Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches
16716        or just the memory caches.
16717
16718        * Shared/ResourceCachesToClear.h: Added.
16719        * UIProcess/API/C/WKAPICast.h:
16720        (WebKit::toResourceCachesToClear):
16721
16722        * UIProcess/API/C/WKContext.cpp:
16723        (WKContextClearResourceCaches):
16724        Add the new parameter.
16725        * UIProcess/API/C/WKContext.h:
16726        * UIProcess/WebContext.cpp:
16727        (WebKit::WebContext::clearResourceCaches):
16728        Ditto.
16729        * UIProcess/WebContext.h:
16730
16731        * WebProcess/WebProcess.cpp:
16732        (WebKit::WebProcess::clearResourceCaches):
16733        Pass the new parameter through to the platform-specific functions.
16734        * WebProcess/WebProcess.h:
16735        Add the new parameter and give it a default of AllResourceCaches.
16736        * WebProcess/WebProcess.messages.in:
16737        Ditto.
16738        * WebProcess/gtk/WebProcessGtk.cpp:
16739        (WebKit::WebProcess::platformClearResourceCaches):
16740        Ditto.
16741        * WebProcess/qt/WebProcessQt.cpp:
16742        (WebKit::WebProcess::platformClearResourceCaches):
16743        Ditto.
16744        * WebProcess/win/WebProcessWin.cpp:
16745        (WebKit::WebProcess::platformClearResourceCaches):
16746        When told to clear only the in-memory caches, return early so as not to clear the CFNetwork
16747        disk cache.
16748        * WebProcess/mac/WebProcessMac.mm:
16749        (WebKit::WebProcess::platformClearResourceCaches):
16750        Ditto.
16751
16752        * WebKit2.xcodeproj/project.pbxproj:
16753        Add ResourceCachesToClear.h
16754        * win/WebKit2.vcproj:
16755        Ditto.
16756
167572011-03-10  Jeff Miller  <jeffm@apple.com>
16758
16759        Reviewed by Adam Roben.
16760
16761        WKViewRegisterEditCommandCallback should use WKViewUndoType
16762        https://bugs.webkit.org/show_bug.cgi?id=56120
16763
16764        * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType.
16765
167662011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
16767
16768        Reviewed by Kenneth Rohde Christiansen.
16769
16770        Tiled backing store's delegated scroll request uses incorrect convention
16771        https://bugs.webkit.org/show_bug.cgi?id=56011
16772
16773        Adapt all of the internal API to match the delta to point
16774        conversion at the WebCore side.
16775
16776        * UIProcess/API/qt/qwkpage.cpp:
16777        (QWKPagePrivate::pageDidRequestScroll):
16778        * UIProcess/API/qt/qwkpage_p.h:
16779        * UIProcess/PageClient.h:
16780        * UIProcess/WebPageProxy.cpp:
16781        (WebKit::WebPageProxy::pageDidRequestScroll):
16782        * UIProcess/WebPageProxy.h:
16783        * UIProcess/WebPageProxy.messages.in:
16784        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
16785        (WebKit::WebChromeClient::delegatedScrollRequested):
16786        * WebProcess/WebCoreSupport/WebChromeClient.h:
16787        * WebProcess/WebPage/WebPage.cpp:
16788        (WebKit::WebPage::pageDidRequestScroll):
16789        * WebProcess/WebPage/WebPage.h:
16790
167912011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
16792
16793        Reviewed by Andreas Kling.
16794
16795        [WK2] Make non-transparent windowless plugins paint on X11
16796        https://bugs.webkit.org/show_bug.cgi?id=55660
16797
16798        Implement painting for non-transparent windowless X11 plugins.
16799        The essence of the logic has been adapted from WebCore.
16800        The implementation is stubbed for GTK and working only on Qt
16801        but it should be really easy to finish it for GTK.
16802
16803        * WebKit2.pro:
16804        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
16805        (WebKit::NPN_GetValue): Handle X11 specific values that are necessary.
16806        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
16807        (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific
16808        members that has been added.
16809        (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates
16810        of the NP_Window to 0 on X11 since we are using a backings store as the
16811        painting area for the plugin.
16812        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
16813        * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour
16814        of a common implementation for X11.
16815        * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto.
16816        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added.
16817        (WebKit::getPluginDisplay):
16818
16819        Platform specific static getters.
16820        (WebKit::x11Display):
16821        (WebKit::displayDepth):
16822        (WebKit::rootWindowID):
16823        (WebKit::x11Screen):
16824
16825        (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual
16826        settings and the colormap for the plugin.
16827        (WebKit::NetscapePlugin::platformDestroy):
16828        (WebKit::NetscapePlugin::platformInvalidate): Remained stub.
16829        (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new
16830        pixmap that fits the geometry.
16831        (WebKit::NetscapePlugin::platformPaint): Propagate a paint event
16832        to the plugin, sync with it if necessary and draw the pixmap to
16833        the screen.
16834        (WebKit::toNP): Remained stub.
16835        (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub.
16836        (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub.
16837        (WebKit::NetscapePlugin::platformSetFocus): Remained stub.
16838        (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub.
16839        (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub.
16840        (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub.
16841        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
16842        (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque
16843        key-value pair to the plugin parameters to force Flash to act in
16844        non-transparent windowless mode. Qt also doing this in WebCore.
16845
168462011-03-09  Peter Kasting  <pkasting@google.com>
16847
16848        Reviewed by Mihai Parparita.
16849
16850        Unify Windows version checks.
16851        https://bugs.webkit.org/show_bug.cgi?id=55979
16852
16853        * UIProcess/win/WebPageProxyWin.cpp:
16854        (WebKit::WebPageProxy::standardUserAgent):
16855
168562011-03-09  Adele Peterson  <adele@apple.com>
16857
16858        Reviewed by Anders Carlsson.
16859
16860        Fix for https://bugs.webkit.org/show_bug.cgi?id=56068
16861        <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items
16862
16863        * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected):
16864        Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, 
16865        and ContextMenuItemTagCheckGrammarWithSpelling
16866
168672011-03-09  Alexey Proskuryakov  <ap@apple.com>
16868
16869        Reviewed by Dan Bernstein.
16870
16871        Frequent crashes when printing in WebPageProxy::setAutodisplay
16872        https://bugs.webkit.org/show_bug.cgi?id=56057
16873        <rdar://problem/9053290>
16874
16875        * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
16876        Null check the page, there is no reason for it to still exist.
16877
168782011-03-09  Brent Fulgham  <bfulgham@webkit.org>
16879
16880        Unreviewed build correction.
16881
16882        * UIProcess/DrawingAreaProxy.messages.in: Exclude the other
16883          method using LayerTreeContext for non-accelerated composition case.
16884
168852011-03-09  Sam Weinig  <sam@webkit.org>
16886
16887        Reviewed by Anders Carlsson.
16888
16889        Change plugins to use their own executable on Mac OS X
16890        https://bugs.webkit.org/show_bug.cgi?id=55991
16891
16892        * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig.
16893        * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist.
16894        Add files necessary for adding PluginProcess.app.
16895
16896        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
16897        (WebKit::ProcessLauncher::launchProcess):
16898        Launch the PluginProcess.app when launching a plugin process.
16899
16900        * WebKit2.xcodeproj/project.pbxproj:
16901        Add new executable and new files, removes some unneeded copying
16902        and duplicate compiling of files.
16903
16904        * WebProcess/Info.plist:
16905        Sorted.
16906
169072011-03-09  Jessie Berlin  <jberlin@apple.com>
16908
16909        Reviewed by Adam Roben.
16910
16911        Use the Cookie Storage from the Private Browsing Storage Session directly
16912        https://bugs.webkit.org/show_bug.cgi?id=55986
16913
16914        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
16915        (InitWebCoreSystemInterface):
16916
169172011-03-09  Alejandro G. Castro  <alex@igalia.com>
16918
16919        Fix compilation after r80596, add soup Download stubs.
16920
16921        * GNUmakefile.am:
16922        * WebProcess/Downloads/soup/DownloadSoup.cpp: Added.
16923        (WebKit::Download::start):
16924        (WebKit::Download::startWithHandle):
16925        (WebKit::Download::cancel):
16926        (WebKit::Download::platformInvalidate):
16927        (WebKit::Download::didDecideDestination):
16928        (WebKit::Download::platformDidFinish):
16929
169302011-03-09  Alejandro G. Castro  <alex@igalia.com>
16931
16932        Fix GTK+ compilation after r80619. Add WebFullScreenManager.
16933
16934        * GNUmakefile.am:
16935
169362011-03-08  Jer Noble  <jer.noble@apple.com>
16937
16938        Reviewed by Sam Weinig.
16939
16940        WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
16941        https://bugs.webkit.org/show_bug.cgi?id=55273
16942
16943        The FULLSCREEN_API Chrome client calls need to be plumbed through from the 
16944        WebProcess to the UIProcess.  To do this, WebFullScreenManager (and Proxy)
16945        classes have been added to WebPage.
16946
16947        * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files.
16948        * DerivedSources.pro: Ditto.
16949        * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager.
16950        * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef.
16951        * Shared/APIObject.h: Added APIType for WebFullScreenManager.
16952        * UIProcess/WebFullScreenManagerProxy.cpp: Added.
16953        * UIProcess/WebFullScreenManagerProxy.h: Added.
16954        * UIProcess/WebFullScreenManagerProxy.messages.in: Added.
16955        * UIProcess/WebPageProxy.cpp:
16956        (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager.
16957        (WebKit::WebPageProxy::processDidCrash): Ditto.
16958        (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy.
16959        (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
16960        (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager.
16961        * UIProcess/WebPageProxy.h:
16962        * UIProcess/WebPageProxy.messages.in:
16963        * UIProcess/WebUIClient.cpp:
16964        * UIProcess/WebUIClient.h:
16965        * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file.
16966        * WebKit2.pro: Ditto.
16967        * win/WebKit2.vcproj: Ditto.
16968        * WebKit2.pri: Added new directories to include file path.
16969        * win/WebKit2Common.vsprops: Ditto.
16970        * WebProcess/FullScreen/WebFullScreenManager.cpp: Added.
16971        * WebProcess/FullScreen/WebFullScreenManager.h: Added.
16972        * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added.
16973        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
16974        (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager.
16975        (WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
16976        (WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
16977        * WebProcess/WebPage/WebPage.cpp:
16978        (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager.
16979        (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager.
16980        (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager.
16981        * WebProcess/WebPage/WebPage.h:
16982
169832011-03-08  Jer Noble  <jer.noble@apple.com>
16984
16985        Reviewed by Sam Weinig.
16986
16987        WebKit2: Plumb through the "supportsFullScreen" preference.
16988        https://bugs.webkit.org/show_bug.cgi?id=55261
16989
16990        The "supportsFullScreen" preference needs to be plumbed through from
16991        the UIProcess to the WebProcess.
16992
16993        * Shared/WebPreferencesStore.h: Add a new macro entry.
16994        * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter.
16995        (WKPreferencesSetFullScreenEnabled):
16996        (WKPreferencesGetFullScreenEnabled):
16997        * UIProcess/API/C/WKPreferences.h:
16998        * WebProcess/WebPage/WebPage.cpp:
16999        (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to
17000            the settings object.
17001
170022011-03-08  Jeff Miller  <jeffm@apple.com>
17003
17004        Reviewed by Adele Peterson.
17005
17006        WebKit2: Implement Windows glue for Undo/Redo
17007        https://bugs.webkit.org/show_bug.cgi?id=55961
17008        
17009        Expose Undo/Redo infrastructure through WKView on Windows by
17010        adding an undo client as well as APIs to reapply and unapply
17011        an edit command.
17012
17013        * UIProcess/API/C/win/WKView.cpp:
17014        (WKViewSetViewUndoClient): Added.
17015        (WKViewReapplyEditCommand): Added.
17016        (WKViewUnapplyEditCommand): Added.
17017        * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand().
17018        * UIProcess/WebPageProxy.cpp:
17019        (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API.
17020        * UIProcess/WebPageProxy.h: Added isValidEditCommand().
17021        * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. 
17022        (WebKit::WebUndoClient::registerEditCommand): Added.
17023        (WebKit::WebUndoClient::clearAllEditCommands): Added.
17024        * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient.
17025        * UIProcess/win/WebView.cpp:
17026        (WebKit::WebView::initializeUndoClient): Added.
17027        (WebKit::WebView::close): Clear out undo client.
17028        (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient.
17029        (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient.
17030        (WebKit::WebView::reapplyEditCommand): Added.
17031        (WebKit::WebView::unapplyEditCommand): Added.
17032        * UIProcess/win/WebView.h: Added undo client support.
17033        * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h.
17034
170352011-03-08  Jeff Miller  <jeffm@apple.com>
17036
17037        Reviewed by Sam Weinig.
17038
17039        WebKit2: Expose WebEditCommandProxy in the C API on Windows
17040        https://bugs.webkit.org/show_bug.cgi?id=55962
17041        
17042        Make WebEditCommandProxy a subclass of APIObject, and define
17043        WKEditCommandRef as the type that will be exposed through the C API.
17044
17045        * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef.
17046        * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy.
17047        * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef.
17048        * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject.
17049        (WebKit::WebEditCommandProxy::type): Added.
17050
170512011-03-08  Jeff Miller  <jeffm@apple.com>
17052
17053        Reviewed by Oliver Hunt.
17054
17055        WebKit2: Redo is broken
17056        https://bugs.webkit.org/show_bug.cgi?id=55978
17057        
17058        WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens.
17059        For example, when we unapply(), we should register a Redo command, not an Undo command.
17060
17061        * UIProcess/WebEditCommandProxy.cpp:
17062        (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command.
17063        (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command.
17064
170652011-03-08  Brent Fulgham  <bfulgham@webkit.org>
17066
17067        Reviewed by Adam Roben.
17068
17069        https://bugs.webkit.org/show_bug.cgi?id=55977
17070        Refine CF/CFNet distinctions for better code sharing.
17071        1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp
17072           since it does not use any CFNETWORK features.
17073        2. Create new cfnet directory.
17074        3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet
17075        4. Update project file.
17076
17077        * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed.
17078        * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed.
17079        * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp.
17080        * WebProcess/Downloads/cfnet: Added.
17081        * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp.
17082        * win/WebKit2.vcproj:
17083
170842011-03-08  Mark Rowe  <mrowe@apple.com>
17085
17086        Reviewed by Brady Eidson.
17087
17088        <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries.
17089
17090        * UIProcess/cf/WebPageProxyCF.cpp:
17091        (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state
17092        without navigating to the current item.
17093        * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item.
17094
170952011-03-08  Brent Fulgham  <bfulgham@webkit.org>
17096
17097        Reviewed by Anders Carlsson.
17098
17099        https://bugs.webkit.org/show_bug.cgi?id=55956
17100        WebKit2 Changes to correct WinCairo port build
17101
17102        * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated
17103          compositing case.
17104        * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build.
17105        * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for
17106          WinCairo build.
17107        (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
17108        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
17109        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
17110        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
17111        (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
17112        (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
17113        * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when
17114          accelerated compositing is enabled.
17115        (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
17116        * UIProcess/win/WebView.cpp: Protect CG-specific drawing code.
17117        (WebKit::WebView::setFindIndicator):
17118        * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag,
17119          as well as destination and bundle paths.
17120        * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation
17121          of file handling.  This will be moved to a common area in a future patch.)
17122        * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths.
17123        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
17124        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
17125        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
17126        * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code.
17127        (WebKit::WebPage::drawRectToPDF):
17128        (WebKit::WebPage::drawPagesToPDF):
17129        * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo
17130
171312011-03-08  Ivan Krstić  <ike@apple.com>
17132
17133        Reviewed by Sam Weinig.
17134
17135        Re-fix: can't paste from 3rd party text editor into WebKit2 window
17136        <rdar://problem/8978624>
17137
17138        * WebProcess/com.apple.WebProcess.sb:
17139
171402011-03-08  Martin Robinson  <mrobinson@igalia.com>
17141
17142        Fix the WebKit2 compilation after r80578.
17143
17144        * UIProcess/gtk/WebView.cpp:
17145        (WebKit::WebView::setFocus): Added.
17146        * UIProcess/gtk/WebView.h:
17147
171482011-03-08  Jessie Berlin  <jberlin@apple.com>
17149
17150        Reviewed by Anders Carlsson.
17151
17152        Crash in CFNetwork visiting google.com
17153        https://bugs.webkit.org/show_bug.cgi?id=55958
17154
17155        * Shared/API/c/cf/WKURLResponseCF.cpp:
17156        (WKURLResponseCopyCFURLResponse):
17157        If the response to copy is null, return 0;
17158
171592011-03-08  John Sullivan  <sullivan@apple.com>
17160
17161        Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940
17162        
17163        The patch was insufficient, and it wasn't useful for the intended client use either.
17164
17165        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
17166        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
17167        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
17168
171692011-03-08  Alejandro G. Castro  <alex@igalia.com>
17170
17171        Unreviewed, fixed GTK+ compilation after r80569.
17172
17173        * UIProcess/gtk/WebView.cpp:
17174        (WebKit::WebView::windowToScreen):
17175        * UIProcess/gtk/WebView.h:
17176
171772011-03-08  Chris Fleizach  <cfleizach@apple.com>
17178
17179        Reviewed by Sam Weinig.
17180
17181        WK2: Cannot set focus on an element when focus is outside of WKView
17182        https://bugs.webkit.org/show_bug.cgi?id=55281
17183
17184        * UIProcess/API/mac/PageClientImpl.h:
17185        * UIProcess/API/mac/PageClientImpl.mm:
17186        (WebKit::PageClientImpl::setFocus):
17187        * UIProcess/API/qt/qwkpage_p.h:
17188        (QWKPagePrivate::setFocus):
17189        * UIProcess/PageClient.h:
17190        * UIProcess/WebPageProxy.cpp:
17191        (WebKit::WebPageProxy::setFocus):
17192        * UIProcess/WebPageProxy.h:
17193        * UIProcess/WebPageProxy.messages.in:
17194        * UIProcess/win/WebView.h:
17195        (WebKit::WebView::setFocus):
17196        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
17197        (WebKit::WebChromeClient::focus):
17198        (WebKit::WebChromeClient::unfocus):
17199
172002011-03-08  Jeff Miller  <jeffm@apple.com>
17201
17202        Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
17203
17204        * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
17205
172062011-03-08  Jeff Miller  <jeffm@apple.com>
17207
17208        Reviewed by Darin Adler.
17209
17210        Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
17211        https://bugs.webkit.org/show_bug.cgi?id=55952
17212
17213        * UIProcess/API/C/win/WKBaseWin.h: Removed.
17214        * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
17215
172162011-03-08  Alejandro G. Castro  <alex@igalia.com>
17217
17218        Reviewed by Martin Robinson.
17219
17220        [GTK] Add new files to compilation after r77974
17221        https://bugs.webkit.org/show_bug.cgi?id=54076
17222
17223        The commit added new code to allow passing context to policy
17224        delegate methods, we also added dummy ResourceRequest and
17225        ResourceResponse decoders until we implement them.
17226
17227        * GNUmakefile.am:
17228        * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
17229        (CoreIPC::decodeResourceRequest):
17230        (CoreIPC::decodeResourceResponse):
17231
172322011-03-08  Chris Fleizach  <cfleizach@apple.com>
17233
17234        Reviewed by Darin Adler.
17235
17236        AX: Webkit2 not sending UAZoomFocusChanged notifications
17237        https://bugs.webkit.org/show_bug.cgi?id=55916
17238
17239        Needed to implement the windowToScreen() method so that the right frame
17240        could be calculated to send for zoom focus changes.
17241
17242        * UIProcess/API/mac/PageClientImpl.h:
17243        * UIProcess/API/mac/PageClientImpl.mm:
17244        (WebKit::PageClientImpl::windowToScreen):
17245        * UIProcess/API/qt/qwkpage.cpp:
17246        (QWKPagePrivate::windowToScreen):
17247        * UIProcess/API/qt/qwkpage_p.h:
17248        * UIProcess/PageClient.h:
17249        * UIProcess/WebPageProxy.cpp:
17250        (WebKit::WebPageProxy::windowToScreen):
17251        * UIProcess/WebPageProxy.h:
17252        * UIProcess/WebPageProxy.messages.in:
17253        * UIProcess/win/WebView.cpp:
17254        (WebKit::WebView::windowToScreen):
17255        * UIProcess/win/WebView.h:
17256        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
17257        (WebKit::WebChromeClient::windowToScreen):
17258        * WebProcess/WebPage/WebPage.cpp:
17259        (WebKit::WebPage::windowToScreen):
17260        * WebProcess/WebPage/WebPage.h:
17261
172622011-03-08  John Sullivan  <sullivan@apple.com>
17263
17264        Reviewed by Darin Adler.
17265
17266        https://bugs.webkit.org/show_bug.cgi?id=55940
17267        WebKit2 should support Ignore policy from injected bundle client
17268
17269        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
17270        Added WKBundlePagePolicyActionIgnore.
17271        
17272        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
17273        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
17274        If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
17275        to the loader's PolicyIgnore.
17276
172772011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
17278
17279        Reviewed by Kenneth Rohde Christiansen.
17280
17281        [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
17282        https://bugs.webkit.org/show_bug.cgi?id=55876
17283
17284        Make sure TESTS_SOURCE_DIR is set for Symbian the same way
17285        as it is for WK1.
17286
17287        * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
17288        (tst_QGraphicsWKView::loadEmptyPage):
17289        * UIProcess/API/qt/tests/tests.pri:
17290
172912011-03-07  Damian Kaleta  <dkaleta@apple.com>
17292
17293        Reviewed by Anders Carlsson.
17294
17295        QuickTime plugin should opt in to a 32-bit non-executable heap
17296        https://bugs.webkit.org/show_bug.cgi?id=55704
17297        <rdar://problem/8105706>
17298
17299        * UIProcess/Plugins/PluginProcessProxy.cpp:
17300        (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
17301        By default it should opt-out.
17302        (WebKit::PluginProcessProxy::PluginProcessProxy):
17303
173042011-03-07  Sam Weinig  <sam@webkit.org>
17305
17306        Reviewed by Anders Carlsson.
17307
17308        Add unableToImplementPolicy callback for WebKit2 policy client
17309        <rdar://problem/9071902>
17310        https://bugs.webkit.org/show_bug.cgi?id=55884
17311
17312        * UIProcess/API/C/WKPage.h:
17313        * UIProcess/WebPageProxy.cpp:
17314        (WebKit::WebPageProxy::unableToImplementPolicy):
17315        * UIProcess/WebPageProxy.h:
17316        * UIProcess/WebPageProxy.messages.in:
17317        * UIProcess/WebPolicyClient.cpp:
17318        (WebKit::WebPolicyClient::unableToImplementPolicy):
17319        * UIProcess/WebPolicyClient.h:
17320        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
17321        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
17322        (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
17323        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
17324        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
17325        (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
17326        Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
17327
173282011-03-07  Sam Weinig  <sam@webkit.org>
17329
17330        Reviewed by Anders Carlsson.
17331
17332        Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
17333        https://bugs.webkit.org/show_bug.cgi?id=55827
17334
17335        - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
17336          and pass the entire response, instead of just the MIMEType.
17337        - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
17338          MIMEType.
17339
17340        * UIProcess/API/C/WKPage.h:
17341        * UIProcess/WebPageProxy.cpp:
17342        (WebKit::WebPageProxy::decidePolicyForResponse):
17343        * UIProcess/WebPageProxy.h:
17344        * UIProcess/WebPageProxy.messages.in:
17345        * UIProcess/WebPolicyClient.cpp:
17346        (WebKit::WebPolicyClient::decidePolicyForResponse):
17347        * UIProcess/WebPolicyClient.h:
17348        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
17349        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
17350        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
17351        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
17352        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
17353        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
17354        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
17355
173562011-03-06  Jessie Berlin  <jberlin@apple.com>
17357
17358        Reviewed by Sam Weinig.
17359
17360        WebKit2: Use CFNetwork Sessions API.
17361        https://bugs.webkit.org/show_bug.cgi?id=55435.
17362
17363        When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
17364        Private Browsing Storage Session.
17365
17366        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
17367        (InitWebCoreSystemInterface):
17368        Add support for using the new WKSI functions in WebCore.
17369
173702011-03-06  Oleg Romashin  <romaxa@gmail.com>
17371
17372        Reviewed by Kenneth Rohde Christiansen.
17373
17374        [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
17375        Adding dummy Qt files for Plugin Process implementation,
17376        Adding missing sources into Qt pro files
17377        https://bugs.webkit.org/show_bug.cgi?id=55719
17378
17379        * DerivedSources.pro:
17380        * PluginProcess/qt: Added.
17381        * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
17382        (WebKit::PluginControllerProxy::platformInitialize):
17383        (WebKit::PluginControllerProxy::platformDestroy):
17384        (WebKit::PluginControllerProxy::platformGeometryDidChange):
17385        * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
17386        (WebKit::PluginProcessMain):
17387        * PluginProcess/qt/PluginProcessQt.cpp: Added.
17388        (WebKit::PluginProcess::platformInitialize):
17389        * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
17390        (WebKit::PluginProcessProxy::platformInitializePluginProcess):
17391        * WebKit2.pri:
17392        * WebKit2.pro:
17393        * WebKit2API.pri:
17394        * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
17395        (WebKit::PluginProxy::needsBackingStore):
17396
173972011-03-05  Sam Weinig  <sam@webkit.org>
17398
17399        Reviewed by Dan Bernstein.
17400
17401        Remove unneeded onPageClose function from DrawingArea
17402        https://bugs.webkit.org/show_bug.cgi?id=55836
17403
17404        * WebProcess/WebPage/DrawingArea.h:
17405        Remove empty function.
17406
17407        * WebProcess/WebPage/WebPage.cpp:
17408        (WebKit::WebPage::close):
17409        Remove only called
17410
174112011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
17412
17413        WK2 Mac build fix.
17414
17415        * UIProcess/API/C/WKPage.cpp:
17416        (WKPageComputePagesForPrinting):
17417        (WKPageBeginPrinting):
17418
17419        * UIProcess/API/C/WKPagePrivate.h:
17420
174212011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
17422
17423        WK2 Mac build fix.
17424
17425        * UIProcess/API/C/WKPagePrivate.h:
17426
174272011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
17428
17429        WK2 needs printing support on Windows
17430        https://bugs.webkit.org/show_bug.cgi?id=55800
17431        <rdar://problem/8903808>
17432
17433        Reviewed by Darin Adler.
17434
17435        * UIProcess/API/C/WKPage.cpp:
17436        (ComputedPagesContext::ComputedPagesContext):
17437        (computedPagesCallback):
17438        From the Vector of WebCore::IntRects, build up a Vector of WKRects.
17439        Call the callback, passing these rects and the scale factor.
17440        (printInfoFromWKPrintInfo):
17441        Return a PrintInfo structure from the WKPrintInfo.
17442        (WKPageComputePagesForPrinting):
17443        Call WebPageProxy::computePagesForPrinting(). Pass
17444        computedPagesCallback as the callback function, so that we can
17445        translate the WebCore rect type to WKRect before calling the caller's
17446        callback function.
17447        (WKPageBeginPrinting):
17448        Call WebPageProxy::beginPrinting().
17449        (WKPageDrawPagesToPDF):
17450        Call WebPageProxy::drawPagesToPDF().
17451
17452        * UIProcess/API/C/WKPagePrivate.h:
17453        Declare the WKPrintInfo type and new functions.
17454
17455        * UIProcess/WebPageProxy.cpp:
17456        Compile this code on Windows.
17457
17458        * UIProcess/WebPageProxy.h:
17459        Ditto.
17460
17461        * UIProcess/win/WebView.cpp:
17462        (WebKit::WebView::paint):
17463        We're painting the window; leave printing mode.
17464
17465        * WebProcess/WebPage/WebPage.cpp:
17466        Compile this code on Windows.
17467
17468        * WebProcess/WebPage/WebPage.h:
17469        Ditto.
17470
17471        * WebProcess/WebPage/WebPage.messages.in:
17472        Ditto.
17473
174742011-03-04  Steve Falkenburg  <sfalken@apple.com>
17475
17476        Reviewed by Darin Adler.
17477
17478        Adopt VersionStamper tool for Windows WebKit DLLs
17479        https://bugs.webkit.org/show_bug.cgi?id=55784
17480        <rdar://problem/9021320>
17481
17482        We now use a tool to stamp the version number onto the Apple WebKit DLLs
17483        during the post-build step.
17484
17485        Fetch the WebKit version from a string resource instead of the version resource.
17486
17487        * UIProcess/win/WebPageProxyWin.cpp:
17488        (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
17489        * win/WebKit2.rc: Removed version, added stringtable.
17490        * win/WebKit2WebProcess.rc: Removed.
17491        * win/WebKit2WebProcess.vcproj:
17492        * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
17493        * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
17494        * win/WebKitPostBuild.cmd: Stamp version.
17495
174962011-03-04  Jeff Miller  <jeffm@apple.com>
17497
17498        Reviewed by Darin Adler.
17499
17500        Add WKPageValidateCommand()
17501        https://bugs.webkit.org/show_bug.cgi?id=55793
17502        
17503        On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
17504        However, on Windows we need to do this in the client, so expose this functionality
17505        in the API via WKPageValidateCommand().
17506        
17507        Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
17508        to match this new API, so it no longer has to go through PageClient to get notified
17509        when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
17510        so I removed the stub implementations in qt and gtk as well.
17511
17512        * UIProcess/API/C/WKPage.cpp:
17513        (WKPageValidateCommand): Added.
17514        * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
17515        * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
17516        * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
17517        * UIProcess/API/mac/WKView.mm:
17518        (validateCommandCallback): Added.
17519        (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
17520        * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
17521        * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
17522        * UIProcess/PageClient.h: Removed setEditCommandState().
17523        * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
17524        (WebKit::WebPageProxy::validateCommand): This now takes a callback.
17525        (WebKit::WebPageProxy::validateCommandCallback): Added.
17526        (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
17527        * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
17528        (WebKit::ValidateCommandCallback::create): Added.
17529        (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
17530        (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
17531        (WebKit::ValidateCommandCallback::invalidate): Added.
17532        (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
17533        * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
17534        * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
17535        * UIProcess/gtk/WebView.h: Removed setEditCommandState().
17536        * UIProcess/win/WebView.cpp: Removed setEditCommandState().
17537        * UIProcess/win/WebView.h: Removed setEditCommandState().
17538        * WebProcess/WebPage/WebPage.cpp:
17539        (WebKit::WebPage::validateCommand): This now takes a callbackID.
17540        * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
17541        * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
17542
175432011-03-04  Brian Weinstein  <bweinstein@apple.com>
17544
17545        Reviewed by Darin Adler.
17546
17547        Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
17548        https://bugs.webkit.org/show_bug.cgi?id=53919
17549        <rdar://problem/8966020>
17550        
17551        Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
17552
17553        * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
17554        (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
17555
175562011-03-04  Darin Adler  <darin@apple.com>
17557
17558        Reviewed by Mark Rowe.
17559
17560        WebKit2 session state should include even loads too new to be in the back/forward list
17561        https://bugs.webkit.org/show_bug.cgi?id=55781
17562        part of <rdar://problem/8968847>
17563
17564        * UIProcess/cf/WebPageProxyCF.cpp:
17565        (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
17566        process to not be included in the back/forward list yet: The pending API request URL and
17567        the provisional URL.
17568        (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
17569        list is not restored and a URL is present. Later we can improve the way we handle the
17570        case where we have both a back/forward list and a URL.
17571
175722011-03-04  Jessie Berlin  <jberlin@apple.com>
17573
17574        Reviewed by Darin Adler.
17575
17576        WebKit2: Use CFNetwork Sessions API.
17577        https://bugs.webkit.org/show_bug.cgi?id=55435.
17578
17579        Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
17580        contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
17581
17582        * UIProcess/mac/WebContextMac.mm:
17583        (WebKit::WebContext::platformInitializeWebProcess):
17584        * UIProcess/win/WebContextWin.cpp:
17585        (WebKit::WebContext::platformInitializeWebProcess):
17586
175872011-03-04  Jessie Berlin  <jberlin@apple.com>
17588
17589        Reviewed by Maciej Stachowiak.
17590
17591        WebKit2: Use CFNetwork Sessions API.
17592        https://bugs.webkit.org/show_bug.cgi?id=55435.
17593
17594        When Private Browsing is enabled, get the cached url response from the cache associated with
17595        the Private Browsing Storage Session.
17596
17597        * WebProcess/WebPage/mac/WebPageMac.mm:
17598        (WebKit::WebPage::platformHasLocalDataForURL):
17599        If Private Browsing is enabled, call into WKSI to get the response.
17600        (WebKit::WebPage::cachedResponseMIMETypeForURL):
17601        Ditto.
17602        * WebProcess/WebPage/win/WebPageWin.cpp:
17603        (WebKit::WebPage::platformHasLocalDataForURL):
17604        If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
17605        (WebKit::WebPage::cachedResponseMIMETypeForURL):
17606        Ditto.
17607
176082011-03-04  Jeff Miller  <jeffm@apple.com>
17609
17610        Reviewed by Darin Adler.
17611
17612        Move WKViewExecuteCommand() to WKPageExecuteCommand()
17613        https://bugs.webkit.org/show_bug.cgi?id=55744
17614        
17615        Executing a command operates on a page, so it makes more sense for it to be in WKPage.
17616        This also makes it available on all platforms, not just Windows.
17617
17618        * UIProcess/API/C/WKPage.cpp:
17619        (WKPageExecuteCommand): Added.
17620        * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
17621        * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
17622        * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
17623
176242011-03-04  Dan Bernstein  <mitz@apple.com>
17625
17626        LLVM Compiler build fix.
17627
17628        * WebProcess/WebPage/WebPage.cpp:
17629        (WebKit::WebPage::runJavaScriptInMainFrame):
17630
176312011-03-03  Timothy Hatcher  <timothy@apple.com>
17632
17633        Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
17634
17635        https://webkit.org/b/55623
17636
17637        Reviewed by Darin Adler.
17638
17639        * UIProcess/API/C/WKPage.cpp:
17640        (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
17641        (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
17642        * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
17643        * UIProcess/WebPageProxy.cpp:
17644        (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
17645        (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
17646        (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
17647        from the DataReference before calling the callback.
17648        (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
17649        * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
17650        * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
17651        * WebProcess/WebPage/WebPage.cpp:
17652        (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
17653        And use ScriptValueCallback to send the message back.
17654
176552011-03-03  Brian Weinstein  <bweinstein@apple.com>
17656
17657        Reviewed by Adam Roben.
17658
17659        Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
17660        
17661        Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
17662        on all platforms, and stub the functions on platforms that don't implement them.
17663
17664        * WebProcess/Cookies/WebCookieManager.cpp:
17665        (WebKit::WebCookieManager::startObservingCookieChanges):
17666        (WebKit::WebCookieManager::stopObservingCookieChanges):
17667
176682011-03-03  Jeff Miller  <jeffm@apple.com>
17669
17670        Reviewed by Darin Adler.
17671
17672        Refactor classes in GenericCallback.h
17673        https://bugs.webkit.org/show_bug.cgi?id=55732
17674        
17675        Since we're going to need to add additional callback classes, make a CallbackBase class that manages
17676        the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
17677        ComputedPagesCallback) now all derive from CallbackBase.
17678        
17679        Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
17680        constructor instead (we forgot the leading ~).
17681 
17682        * UIProcess/GenericCallback.h:
17683        (WebKit::CallbackBase::~CallbackBase):
17684        (WebKit::CallbackBase::callbackID):
17685        (WebKit::CallbackBase::CallbackBase):
17686        (WebKit::CallbackBase::context):
17687        (WebKit::CallbackBase::generateCallbackID):
17688        (WebKit::VoidCallback::~VoidCallback):
17689        (WebKit::VoidCallback::performCallback):
17690        (WebKit::VoidCallback::invalidate):
17691        (WebKit::VoidCallback::VoidCallback):
17692        (WebKit::GenericCallback::create):
17693        (WebKit::GenericCallback::~GenericCallback):
17694        (WebKit::GenericCallback::performCallbackWithReturnValue):
17695        (WebKit::GenericCallback::invalidate):
17696        (WebKit::GenericCallback::GenericCallback):
17697        (WebKit::ComputedPagesCallback::create):
17698        (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
17699        (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
17700        (WebKit::ComputedPagesCallback::invalidate):
17701        (WebKit::ComputedPagesCallback::ComputedPagesCallback):
17702
177032011-03-03  Adam Roben  <aroben@apple.com>
17704
17705        Don't assume the web process has had a chance to paint before the view has to paint
17706
17707        Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
17708        BackingStore::paint
17709
17710        Reviewed by Anders Carlsson.
17711
17712        * UIProcess/DrawingAreaProxyImpl.cpp:
17713        (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
17714        yet.
17715
177162011-03-03  Adam Roben  <aroben@apple.com>
17717
17718        Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
17719
17720        The intent is to save memory for views that aren't painting.
17721
17722        Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
17723        backing store after not painting for a while
17724
17725        Reviewed by Anders Carlsson.
17726
17727        * UIProcess/DrawingAreaProxyImpl.cpp:
17728        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
17729        (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
17730        bail if we're in accelerated compositing mode); we might have thrown it away to save memory
17731        but now are being asked to paint by the view. The existing code in this function will handle
17732        getting a new backing store if possible by blocking for a little while to try to receive a
17733        DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
17734        don't have any outstanding UpdateBackingStoreState requests. After painting, call
17735        discardBackingStoreSoon to update our timer.
17736        (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
17737        future.
17738        (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
17739        the web process we'll need a full backing store update on the next paint.
17740
17741        * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
17742
177432011-03-03  Adam Roben  <aroben@apple.com>
17744
17745        Add a way to tell the web process to perform a full backing store update on its next paint
17746
17747        Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
17748        full backing store update should happen immediately or should be deferred until the next
17749        paint or compositing mode change occurs. The deferred update isn't used yet, but will be
17750        used when we start throwing away backing stores to save memory.
17751
17752        Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
17753        store needs a full update on the next paint
17754
17755        Reviewed by Anders Carlsson.
17756
17757        * UIProcess/DrawingAreaProxyImpl.cpp:
17758        (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
17759        request, tell the web process to perform the backing store update right away, in case we
17760        previously told it it could defer the update.
17761        (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
17762        store update.
17763        (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
17764        were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
17765        for the web process to decide to send us this message on its own (if we asked it to do a
17766        deferred backing store update and then it needed to paint some part of the page). Specify
17767        that we need an immediate backing store update if the web process hasn't updated to our
17768        latest state, as we're about to draw potentially out-of-date bits to the screen and want to
17769        get the right bits as soon as possible. Also added a FIXME about a potential optimization.
17770        (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
17771        parameter, which is just passed through to sendUpdateBackingStoreState.
17772        (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
17773        parameter that is used to specify to the web process whether to perform the full backing
17774        store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
17775        thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
17776        the web process for an immediate response; otherwise we could end up accidentally calling
17777        waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
17778        us such a message.
17779
17780        * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
17781
17782        * WebProcess/WebPage/DrawingArea.h:
17783        (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
17784
17785        * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
17786        UpdateBackingStoreState message.
17787
17788        * WebProcess/WebPage/DrawingAreaImpl.cpp:
17789        (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
17790        whether we should send a DidUpdateBackingStoreState message instead of an Update or
17791        compositing mode change message. This will be set to true when a deferred backing store
17792        update is pending.
17793        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
17794        DidUpdateBackingStoreState message instead of a compositing mode change message.
17795        (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
17796        we've already been told about this state ID (as can happen when the UI process decides it
17797        needs an immediate update to a state that it previously requested a deferred update to),
17798        don't bother updating the page's size, etc. In addition, if we've already sent a
17799        DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
17800        Moved code to send the DidUpdateBackingStoreState message from here...
17801        (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
17802        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
17803        even if painting is suspended or we're in the process of updating the backing store state.
17804        It causes no harm and simplifies the code. If a deferred update is pending, send a
17805        DidUpdateBackingStoreState message instead of a compositing mode change message. Also
17806        removed a redundant if.
17807        (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
17808        backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
17809        messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
17810        of an Update message.
17811
17812        * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
17813        class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
17814
178152011-03-03  Andy Estes  <aestes@apple.com>
17816
17817        Reviewed by Darin Adler.
17818
17819        When displaying the missing plug-in sheet, pass the 'pluginspage'
17820        attribute to the UI process.
17821        https://bugs.webkit.org/show_bug.cgi?id=55553
17822
17823        * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
17824        missingPluginButtonClicked.
17825        * UIProcess/WebPageProxy.cpp:
17826        (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
17827        * UIProcess/WebPageProxy.h: Ditto.
17828        * UIProcess/WebPageProxy.messages.in: Ditto.
17829        * UIProcess/WebUIClient.cpp:
17830        (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
17831        * UIProcess/WebUIClient.h: Ditto.
17832        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
17833        (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
17834        pluginspageAttr.
17835
178362011-03-03  Alexey Proskuryakov  <ap@apple.com>
17837
17838        Suggested by Dan Bernstein.
17839
17840        Move "const" around "NSString *", so that it suddenly begins to make sense.
17841
17842        * WebProcess/mac/FullKeyboardAccessWatcher.mm:
17843
178442011-03-03  Jeff Miller  <jeffm@apple.com>
17845
17846        Reviewed by Anders Carlsson.
17847
17848        WebKit2: Add WKViewRef API for executing edit commands
17849        https://bugs.webkit.org/show_bug.cgi?id=49829
17850
17851        Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
17852
17853        * UIProcess/API/C/win/WKView.cpp:
17854        (WKViewExecuteCommand): Added.
17855        * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
17856
178572011-03-03  Jessie Berlin  <jberlin@apple.com>
17858
17859        Reviewed by Adam Roben.
17860
17861        WebKit2: Use CFNetwork Sessions API.
17862        https://bugs.webkit.org/show_bug.cgi?id=55435
17863
17864        Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
17865
17866        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
17867        (InitWebCoreSystemInterface):
17868        Support using WKCopyRequestWithStorageSession in WebCore.
17869
178702011-03-03  Adam Roben  <aroben@apple.com>
17871
17872        Don't try to paint outside the page's bounds
17873
17874        When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
17875        size, even though we only needed to paint at the new, smaller size.
17876
17877        The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
17878        test if this fix gets broken in the future.
17879
17880        Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
17881        the page is resized smaller
17882
17883        Reviewed by Anders Carlsson.
17884
17885        * WebProcess/WebPage/DrawingAreaImpl.cpp:
17886        (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
17887        is suspended (but still refrain from updating it when in accelerated compositing mode).
17888        Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
17889        region with the page's new bounds. This prevents us from accumulating a dirty region that is
17890        larger than the page in the case where the page is being resized smaller.
17891        (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
17892        outside of the page's bounds.
17893
178942011-03-03  Maciej Stachowiak  <mjs@apple.com>
17895
17896        Reviewed by Brady Eidson.
17897
17898        WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
17899        https://bugs.webkit.org/show_bug.cgi?id=55701
17900        <rdar://problem/9074017>
17901
17902        * Shared/WebProcessCreationParameters.cpp:
17903        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
17904        flag parameters to false.
17905        (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
17906        (WebKit::WebProcessCreationParameters::decode): And deserialize.
17907
179082011-03-03  Alexey Proskuryakov  <ap@apple.com>
17909
17910        Reviewed by Darin Adler.
17911
17912        REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
17913        https://bugs.webkit.org/show_bug.cgi?id=55633
17914        <rdar://problem/8963023>
17915
17916        * WebKit2.xcodeproj/project.pbxproj:
17917        * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
17918        * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
17919        (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
17920        (-[FullKeyboardAccessWatcher init]):
17921        (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
17922        Get the current state of full keyboard access, listening for change notifications.
17923
17924        * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
17925
17926        * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
17927        WebKit1 also doesn't implement this on platforms other than Mac.
17928
17929        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
17930        Just ask FullKeyboardAccessWatcher.
17931
17932        * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
17933        * WebProcess/WebCoreSupport/WebChromeClient.h:
17934        Added keyboardUIMode(), removed tabsToLinks().
17935
17936        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
17937        * WebProcess/WebPage/WebPage.h:
17938        Generate keyboard UI mode from tabToLinks preference and current state of FKA.
17939
179402011-03-03  Sam Weinig  <sam@webkit.org>
17941
17942        Reviewed by Anders Carlsson.
17943
17944        Give the Bundle's policy client the option of deciding the policy
17945        https://bugs.webkit.org/show_bug.cgi?id=55699
17946
17947        * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
17948        Add WKBundlePagePolicyAction enum and make it the return value of
17949        the WKBundlePagePolicyClient functions.
17950
17951        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
17952        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
17953        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
17954        (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
17955        * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
17956        Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
17957
17958        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
17959        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
17960        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
17961        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
17962        Call the policy function early if the bundle handles it.
17963
179642011-03-02  Brian Weinstein  <bweinstein@apple.com>
17965
17966        Reviewed by Adam Roben.
17967
17968        Rest of WebKit2: Need a way to send notifications to client when cookies change
17969        https://bugs.webkit.org/show_bug.cgi?id=55427
17970        <rdar://problem/9056027>
17971        
17972        This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
17973        listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
17974        when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
17975        change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
17976
17977        * UIProcess/API/C/WKCookieManager.cpp:
17978        (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
17979        (WKCookieManagerStartObservingCookieChanges): Ditto.
17980        (WKCookieManagerStopObservingCookieChanges): Ditto.
17981
17982        * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
17983            which is responsible for cookiesDidChange.
17984
17985        * UIProcess/WebCookieManagerProxy.cpp:
17986        (WebKit::WebCookieManagerProxy::initializeClient):
17987        (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
17988        (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
17989        (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
17990            modified.
17991        * UIProcess/WebCookieManagerProxy.h:
17992        * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
17993
17994        * UIProcess/WebCookieManagerProxyClient.cpp: Added.
17995        (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
17996            cookies changed.
17997        * UIProcess/WebCookieManagerProxyClient.h: Added.
17998    
17999        * WebProcess/Cookies/WebCookieManager.cpp:
18000        (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
18001            (on platforms that support it).
18002        (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
18003        (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
18004        * WebProcess/Cookies/WebCookieManager.h:
18005        * WebProcess/Cookies/WebCookieManager.messages.in:
18006        
18007        Add new files.
18008        * WebKit2.pro:
18009        * WebKit2.xcodeproj/project.pbxproj:
18010        * GNUmakefile.am:
18011        * win/WebKit2.vcproj:
18012
180132011-03-03  Anders Carlsson  <andersca@apple.com>
18014
18015        Reviewed by Darin Adler.
18016
18017        Remove CanRunBeforeUnloadConfirmPanel sync message
18018        https://bugs.webkit.org/show_bug.cgi?id=55689
18019
18020        * Shared/WebPageCreationParameters.cpp:
18021        (WebKit::WebPageCreationParameters::encode):
18022        (WebKit::WebPageCreationParameters::decode):
18023        Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
18024        being encoded/decoded.
18025
18026        * Shared/WebPageCreationParameters.h:
18027        Add canRunBeforeUnloadConfirmPanel.
18028
18029        * UIProcess/WebPageProxy.cpp:
18030        (WebKit::WebPageProxy::initializeUIClient):
18031        Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
18032
18033        (WebKit::WebPageProxy::creationParameters):
18034        Initialize parameters.canRunBeforeUnloadConfirmPanel.
18035
18036        * UIProcess/WebPageProxy.messages.in:
18037        Remove CanRunBeforeUnloadConfirmPanel message.
18038
18039        * UIProcess/WebUIClient.cpp:
18040        (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
18041        * UIProcess/WebUIClient.h:
18042        Make canRunBeforeUnloadConfirmPanel const.
18043
18044        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
18045        (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
18046        Ask the web page instead of sending a synchronous message.
18047
18048        * WebProcess/WebPage/WebPage.cpp:
18049        (WebKit::WebPage::WebPage):
18050        Initialize m_canRunBeforeUnloadConfirmPanel.
18051
18052        * WebProcess/WebPage/WebPage.h:
18053        (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
18054        (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
18055        Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
18056
18057        (WebKit::WebPage::setCanRunModal):
18058        Add setter for m_canRunModal.
18059
18060        * WebProcess/WebPage/WebPage.messages.in:
18061        Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
18062
180632011-03-03  Adam Roben  <aroben@apple.com>
18064
18065        Create the CFBundleRef for WebKit.dll on Windows if needed
18066
18067        WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
18068        out or crash on Windows 7 Release (WebKit2 Tests)
18069
18070        Reviewed by Darin Adler.
18071
18072        * Shared/win/WebKitBundle.cpp: Added.
18073        (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
18074        and returns a new bundle.
18075        (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
18076
18077        * Shared/win/WebKitBundle.h: Added.
18078
18079        * UIProcess/win/WebInspectorProxyWin.cpp:
18080        (WebKit::WebInspectorProxy::inspectorPageURL):
18081        * WebProcess/WebPage/win/WebInspectorWin.cpp:
18082        (WebKit::WebInspector::localizedStringsURL):
18083        Changed to use webKitBundle() to ensure that the bundle has been created.
18084
18085        * win/WebKit2.vcproj: Added new files.
18086
180872011-03-03  Peter Kasting  <pkasting@google.com>
18088
18089        Reviewed by James Robinson.
18090
18091        Drop redundant "Windows; " from the Windows-specific User Agent string.
18092        https://bugs.webkit.org/show_bug.cgi?id=54567
18093
18094        * UIProcess/win/WebPageProxyWin.cpp:
18095        (WebKit::WebPageProxy::standardUserAgent):
18096
180972011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>
18098
18099        Unreviewed, rolling out r80188.
18100        http://trac.webkit.org/changeset/80188
18101        https://bugs.webkit.org/show_bug.cgi?id=55647
18102
18103        Broke the WebKit API tests. (Requested by xenon on #webkit).
18104
18105        * UIProcess/API/C/WKPage.cpp:
18106        (WKPageRunJavaScriptInMainFrame):
18107        (callRunJavaScriptBlockAndRelease):
18108        * UIProcess/API/C/WKPage.h:
18109        * UIProcess/WebPageProxy.cpp:
18110        (WebKit::WebPageProxy::close):
18111        (WebKit::WebPageProxy::runJavaScriptInMainFrame):
18112        (WebKit::WebPageProxy::processDidCrash):
18113        * UIProcess/WebPageProxy.h:
18114        * UIProcess/WebPageProxy.messages.in:
18115        * WebProcess/WebPage/WebPage.cpp:
18116        (WebKit::WebPage::runJavaScriptInMainFrame):
18117
181182011-03-02  Jeff Miller  <jeffm@apple.com>
18119
18120        Reviewed by Darin Adler.
18121
18122        Rename WebKit::WebPage::validateMenuItem() to validateCommand()
18123        https://bugs.webkit.org/show_bug.cgi?id=55636
18124        
18125        Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
18126
18127        * UIProcess/API/mac/WKView.mm:
18128        (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
18129        * UIProcess/WebPageProxy.cpp:
18130        (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
18131        (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
18132        * UIProcess/WebPageProxy.h:
18133        * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
18134        * WebProcess/WebPage/WebPage.cpp:
18135        (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
18136        * WebProcess/WebPage/WebPage.h:
18137        * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
18138
181392011-03-02  Anders Carlsson  <andersca@apple.com>
18140
18141        Reviewed by Sam Weinig.
18142
18143        WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
18144        https://bugs.webkit.org/show_bug.cgi?id=55635
18145
18146        * Shared/WebPageCreationParameters.cpp:
18147        (WebKit::WebPageCreationParameters::encode):
18148        (WebKit::WebPageCreationParameters::decode):
18149        Encode and decode areMemoryCacheClientCallsEnabled.
18150
18151        * Shared/WebPageCreationParameters.h:
18152        Add areMemoryCacheClientCallsEnabled member variable.
18153
18154        * UIProcess/WebPageProxy.cpp:
18155        (WebKit::WebPageProxy::WebPageProxy):
18156        Initialize m_areMemoryCacheClientCallsEnabled.
18157
18158        (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
18159        Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
18160
18161        (WebKit::WebPageProxy::creationParameters):
18162        Set areMemoryCacheClientCallsEnabled.
18163
18164        * WebProcess/WebPage/WebPage.cpp:
18165        (WebKit::WebPage::WebPage):
18166        Call WebPage::setMemoryCacheMessagesEnabled.
18167
181682011-03-02  Timothy Hatcher  <timothy@apple.com>
18169
18170        Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
18171
18172        https://webkit.org/b/55623
18173
18174        Reviewed by Darin Adler.
18175
18176        * UIProcess/API/C/WKPage.cpp:
18177        (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
18178        (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
18179        * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
18180        * UIProcess/WebPageProxy.cpp:
18181        (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
18182        (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
18183        (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
18184        from the DataReference before calling the callback.
18185        (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
18186        * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
18187        * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
18188        * WebProcess/WebPage/WebPage.cpp:
18189        (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
18190        And use ScriptValueCallback to send the message back.
18191
181922011-03-02  Jessie Berlin  <jberlin@apple.com>
18193
18194        Reviewed by Adam Roben.
18195
18196        WebKit2: Use CFNetwork Sessions API.
18197        https://bugs.webkit.org/show_bug.cgi?id=55435
18198
18199        Add the ability to create a Private Browsing Storage Session.
18200
18201        * Shared/WebProcessCreationParameters.cpp:
18202        (WebKit::WebProcessCreationParameters::encode):
18203        Encode the UI Process bundle identifier.
18204        (WebKit::WebProcessCreationParameters::decode):
18205        Decode the UI Process bundle identifier.
18206        * Shared/WebProcessCreationParameters.h:
18207
18208        * UIProcess/mac/WebContextMac.mm:
18209        (WebKit::WebContext::platformInitializeWebProcess):
18210        Grab the bundle identifier and use it to set the WebProcessCreationParameter.
18211        * UIProcess/win/WebContextWin.cpp:
18212        (WebKit::WebContext::platformInitializeWebProcess):
18213        Ditto.
18214
18215        * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
18216        (InitWebCoreSystemInterface):
18217        Support using the wkCreatePrivateStorageSession WKSI in WebCore.
18218
18219        * WebProcess/WebProcess.cpp:
18220        (WebKit::WebProcess::initializeWebProcess):
18221        Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
18222        from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
18223        same identifier as WebKit2.
18224
182252011-03-01  Brian Weinstein  <bweinstein@apple.com>
18226
18227        Reviewed by Adam Roben.
18228
18229        Part of WebKit2: Need a way to send notifications to client when cookies change
18230        https://bugs.webkit.org/show_bug.cgi?id=55427
18231        <rdar://problem/9056027>
18232
18233        * WebProcess/Cookies/WebCookieManager.cpp:
18234        (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
18235            message to the UI process.
18236
18237        * WebProcess/Cookies/WebCookieManager.h:
18238        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
18239        (WebKit::WebPlatformStrategies::createCookiesStrategy):
18240        (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
18241        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
18242
182432011-03-02  Andras Becsi  <abecsi@webkit.org>
18244
18245        Reviewed by Laszlo Gombos.
18246
18247        [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
18248        https://bugs.webkit.org/show_bug.cgi?id=55478
18249
18250        On case insensitive systems the generated forwarding headers cause build problems.
18251
18252        * Scripts/generate-forwarding-headers.pl: The generated header should
18253        also contain the framework name.
18254
182552011-03-01  Jeff Miller  <jeffm@apple.com>
18256
18257        Reviewed by Darin Adler.
18258
18259        Expose some selection state fields in WKPage
18260        https://bugs.webkit.org/show_bug.cgi?id=55541
18261        
18262        Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
18263        Edit menu items properly on Windows when using WebKit2.
18264
18265        * UIProcess/API/C/WKPage.cpp:
18266        (WKPageCanDelete): Added.
18267        (WKPageHasSelectedRange): Added.
18268        (WKPageIsContentEditable): Added.
18269        * UIProcess/API/C/WKPage.h: Added new functions.
18270        * UIProcess/WebPageProxy.h:
18271        (WebKit::WebPageProxy::canDelete): Added.
18272        (WebKit::WebPageProxy::hasSelectedRange): Added.
18273        (WebKit::WebPageProxy::isContentEditable): Added.
18274
182752011-03-01  Mark Rowe  <mrowe@apple.com>
18276
18277        Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
18278
18279        * Configurations/Base.xcconfig:
18280
182812011-03-01  Mark Rowe  <mrowe@apple.com>
18282
18283        Reviewed by Sam Weinig.
18284
18285        Add verification scripts to WebKit2 project and fix the issues they reveal.
18286
18287        * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
18288        library functions from being exported as weak externals.
18289        * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
18290        * Shared/WebContextMenuItem.cpp:
18291        (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
18292        * UIProcess/WebPageGroup.cpp:
18293        (WebKit::webPageGroupMap): Ditto.
18294        * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
18295        Run verification scripts at the appropriate times.
18296        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
18297        (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
18298        (WebKit::WebEditorClient::respondToChangedContents): Ditto.
18299        (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
18300        (WebKit::WebEditorClient::didEndEditing): Ditto.
18301        * WebProcess/WebPage/WebBackForwardListProxy.cpp:
18302        (WebKit::idToHistoryItemMap): Ditto.
18303        (WebKit::historyItemToIDMap): Ditto.
18304
183052011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
18306
18307        Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
18308
18309        * UIProcess/API/qt/qwkpage.cpp:
18310        (QWKPage::viewportAttributesForSize):
18311
183122011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
18313
18314        Unreviewed, missed updating a call to WebCore::computeViewportAttributes
18315        who's prototype changed.
18316
18317        Viewport Warning/Error Messages Are Now Inaccurate
18318        https://bugs.webkit.org/show_bug.cgi?id=53707
18319
18320        * UIProcess/API/qt/qwkpage.cpp:
18321        (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
18322
183232011-03-01  Anders Carlsson  <andersca@apple.com>
18324
18325        Reviewed by Sam Weinig.
18326
18327        WKPluginSiteDataManagerClearAllSiteData is not working
18328        https://bugs.webkit.org/show_bug.cgi?id=55528
18329        <rdar://problem/9071823>
18330
18331        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
18332        (WebKit::NetscapePluginModule::tryGetSitesWithData):
18333        Remove version checks, checking that the function pointer is not null is enough.
18334
18335        (WebKit::NetscapePluginModule::tryClearSiteData):
18336        Remove version checks, checking that the function pointer is not null is enough.
18337        Also, correctly convert a null String to a null CString.
18338
183392011-03-01  Adam Roben  <aroben@apple.com>
18340
18341        Incorporate a review comment I missed in r80051
18342
18343        * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
18344
183452011-03-01  Adam Roben  <aroben@apple.com>
18346
18347        Make the PLUGIN_ARCHITECTURE() macro work with MSVC
18348
18349        Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
18350        plugins tests crashing in NetscapePlugin::initialize on Windows
18351
18352        Reviewed by Anders Carlsson.
18353
18354        * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
18355        PLUGIN_ARCHITECTURE() is defined for some platform.
18356
18357        * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
18358        macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
18359        replaced the nonsense OS(WIN) with OS(WINDOWS).
18360
18361        * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
18362
183632011-03-01  Sam Weinig  <sam@webkit.org>
18364
18365        Reviewed by Timothy Hatcher.
18366
18367        WebKit2 needs to be made localizable
18368        https://bugs.webkit.org/show_bug.cgi?id=55483
18369
18370        * PluginProcess/mac/PluginProcessMainMac.mm:
18371        * WebProcess/mac/WebProcessMainMac.mm:
18372        Set the default localization from the passed in parameter.
18373
18374        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18375        Add the preferred localization as a parameter when launching processes
18376        so that they can set their localization to match the launching app.
18377
18378        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
18379        Use WebCore's localizedString function on the mac, to actually localize
18380        these strings.
18381
18382        (WebKit::WebPlatformStrategies::imageTitle):
18383        Switch to using replace, instead of concatenation, to give localizers a chance
18384        to rearrange the wording.
18385
183862011-03-01  Balazs Kelemen  <kbalazs@webkit.org>
18387
18388        Reviewed by Anders Carlsson.
18389
18390        [Qt][WK2] Plugin initialization
18391        https://bugs.webkit.org/show_bug.cgi?id=48127
18392
18393        Apply the quirks that are necessary for the flash plugin
18394        to not crash on X11.
18395
18396        * Platform/qt/ModuleQt.cpp:
18397        (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
18398        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
18399        (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
18400        if PLUGIN_ARCHITECTURE is X11.
18401        * Shared/Plugins/Netscape/NetscapePluginModule.h:
18402        * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
18403        (WebKit::initializeGTK):  The same hack that we do in WebCore.
18404        Call gtk_init because flash don't do it for itself.
18405        (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
18406        Do the hacks that we need to do before calling NP_Initialize on the
18407        flash plugin to save it form crashing.
18408        * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
18409        Added RequiresGTKToolKit quirk for X11.
18410        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
18411        (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
18412        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
18413        (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
18414        quirks to be available in NPN_GetValue.
18415
184162011-03-01  Adam Roben  <aroben@apple.com>
18417
18418        Convert seconds to milliseconds before calling ::SetTimer
18419
18420        Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
18421        early on Windows
18422
18423        Reviewed by Anders Carlsson.
18424
18425        * Platform/win/RunLoopWin.cpp:
18426        (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
18427        ::SetTimer expects.
18428
184292011-03-01  Andras Becsi  <abecsi@webkit.org>
18430
18431        Reviewed by Csaba Osztrogonác.
18432
18433        [Qt] Clean up the project files and move common options to WebKit.pri.
18434
18435        * WebKit2.pro: Deduplicate options.
18436
184372011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>
18438
18439        Reviewed by Andreas Kling.
18440
18441        [Qt] WebKit2 needs to support font size changing and getting default font size
18442        https://bugs.webkit.org/show_bug.cgi?id=53671
18443
18444        Added new enum for font size type and added methods to set and get default font sizes.
18445
18446        * UIProcess/API/qt/qwkpreferences.cpp:
18447        (QWKPreferences::setFontSize): Added.
18448        (QWKPreferences::fontSize): Added.
18449        * UIProcess/API/qt/qwkpreferences.h:
18450
184512011-02-28  Alice Liu  <alice.liu@apple.com>
18452
18453        Reviewed by Adam Roben and Gavin Barraclough.
18454
18455        https://bugs.webkit.org/show_bug.cgi?id=54898
18456        InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
18457
18458        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
18459        (WKBundleHitTestResultCopyNodeHandle): 
18460        Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
18461        * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
18462        Renamed from "get" to "copy", because it leaksRef.
18463
184642011-02-28  Alice Liu  <alice.liu@apple.com>
18465
18466        Reviewed by Gavin Barraclough.
18467
18468        https://bugs.webkit.org/show_bug.cgi?id=55442
18469        Webarchives don't contain subframe content
18470
18471        * WebProcess/WebPage/WebPage.cpp:
18472        (WebKit::WebPage::getWebArchiveOfFrame):
18473        Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
18474
184752011-02-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
18476
18477        Reviewed by Kenneth Rohde Christiansen.
18478
18479        [Qt][WK2] Add a way to test the WebKit 2 APIs
18480        https://bugs.webkit.org/show_bug.cgi?id=55408
18481
18482        Add an initial test for the WebKit 2 APIs of Qt.
18483
18484        * UIProcess/API/qt/tests/html/basic_page.html: Added.
18485        * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
18486        * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
18487        (View::View):
18488        (View::resizeEvent):
18489        (tst_QGraphicsWKView::init):
18490        (tst_QGraphicsWKView::cleanup):
18491        (tst_QGraphicsWKView::loadEmptyPage):
18492        * UIProcess/API/qt/tests/tests.pri: Added.
18493        * UIProcess/API/qt/tests/tests.pro: Added.
18494        * UIProcess/API/qt/tests/util.h: Added.
18495        (waitForSignal):
18496
184972011-02-28  Anders Carlsson  <andersca@apple.com>
18498
18499        Fix clang build.
18500
18501        * UIProcess/API/mac/FindIndicatorWindow.mm:
18502        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
18503        (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
18504        (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
18505        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
18506        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
18507        (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
18508        (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
18509        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
18510
185112011-02-28  Dan Bernstein  <mitz@apple.com>
18512
18513        Rubber-stamped by Anders Carlsson.
18514
18515        Do not copy config.h into WebKit2.
18516
18517        * WebKit2.xcodeproj/project.pbxproj:
18518
185192011-02-28  Dan Bernstein  <mitz@apple.com>
18520
18521        LLVM Compiler build fix.
18522
18523        * Scripts/webkit2/messages.py:
18524        * UIProcess/WebPageProxy.h:
18525
185262011-02-28  Anders Carlsson  <andersca@apple.com>
18527
18528        Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
18529
18530        Open PDF in Preview doesn't work
18531        https://bugs.webkit.org/show_bug.cgi?id=55400
18532        <rdar://problem/8750353>
18533
18534        * UIProcess/API/mac/PDFViewController.mm:
18535        (-[WKPDFView initWithFrame:PDFViewController:]):
18536        Set the WKPDFView as the delegate of itself.
18537
18538        (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
18539        Call PDFViewController::openPDFInFinder.
18540
18541        (WebKit::PDFViewController::PDFViewController):
18542        Initialize m_hasWrittenPDFToDisk to false.
18543
18544        (WebKit::PDFViewController::openPDFInFinder):
18545        Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
18546        
18547        (WebKit::temporaryPDFDirectoryPath):
18548        Create a directory to put PDFs in.
18549
18550        (WebKit::PDFViewController::pathToPDFOnDisk):
18551        Return a path to a (non-existent) file in the temporary PDF directory.
18552
185532011-02-28  Alexey Proskuryakov  <ap@apple.com>
18554
18555        Reviewed by Dan Bernstein.
18556
18557        Frequent crashes in CFURLCache code on Snow Leopard
18558        https://bugs.webkit.org/show_bug.cgi?id=55412
18559        <rdar://problem/9063922>
18560
18561        CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
18562        creates a string with maximum possible buffer size. A path with garbage at the end confused
18563        CFURLCache into corrupting its data structures.
18564
18565        * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
18566        This problem wouldn't have occured if we didn't use CString in the first place.
18567
18568        * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
18569        Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
18570        have liked trailing slash).
18571
18572        * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
18573        Made slash removal conditional for robustness.
18574
18575        * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
18576        Use actual string length, not CString::length().
18577
185782011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
18579
18580        Reviewed by Anders Carlsson.
18581
18582        [Qt][WK2] Plugin initialization
18583        https://bugs.webkit.org/show_bug.cgi?id=48127
18584
18585        Specialize the way of initializing the plugin for X11.
18586        Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
18587        across platforms.
18588
18589        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
18590        (WebKit::NetscapePluginModule::tryLoad):
18591        * config.h:
18592
185932011-02-28  Sam Weinig  <sam@webkit.org>
18594
18595        Reviewed by Brady Eidson.
18596
18597        WK2 Context Menus - Implement LookUpInDictionary
18598        https://bugs.webkit.org/show_bug.cgi?id=55405
18599
18600        * Shared/DictionaryPopupInfo.cpp:
18601        (WebKit::DictionaryPopupInfo::encode):
18602        (WebKit::DictionaryPopupInfo::decode):
18603        * Shared/DictionaryPopupInfo.h:
18604        Add type to differentiate between HotKey and ContextMenu triggered
18605        dictionary popups. This is necessary since HotKey triggered ones want
18606        to override the style to always be overlay.
18607
18608        * UIProcess/API/mac/PageClientImpl.mm:
18609        (WebKit::PageClientImpl::didPerformDictionaryLookup):
18610        Only force the overlay style for HotKey triggered dictionary lookups.
18611
18612        * WebProcess/WebPage/WebPage.h:
18613        * WebProcess/WebPage/mac/WebPageMac.mm:
18614        (WebKit::WebPage::performDictionaryLookupAtLocation):
18615        (WebKit::WebPage::performDictionaryLookupForRange):
18616        Factor out shared functionality into performDictionaryLookupForRange.
18617
18618        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
18619        (WebKit::WebContextMenuClient::lookUpInDictionary):
18620        Get selected range and call newly factored out performDictionaryLookupForRange.
18621
186222011-02-28  Anders Carlsson  <andersca@apple.com>
18623
18624        Reviewed by Dan Bernstein.
18625
18626        PDFViewController should hold a reference to the PDF data
18627        https://bugs.webkit.org/show_bug.cgi?id=55394
18628
18629        * UIProcess/API/mac/PDFViewController.h:
18630        * UIProcess/API/mac/PDFViewController.mm:
18631        (WebKit::PDFViewController::setPDFDocumentData):
18632
186332011-02-28  Sam Weinig  <sam@webkit.org>
18634
18635        Reviewed by Darin Adler.
18636
18637        Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
18638        https://bugs.webkit.org/show_bug.cgi?id=48234
18639
18640        * Shared/TextInfo.cpp: Removed.
18641        * Shared/TextInfo.h: Removed.
18642        Replace this with the more appropriately DictionaryPopupInfo.
18643
18644        * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
18645        (WebKit::DictionaryPopupInfo::encode):
18646        (WebKit::DictionaryPopupInfo::decode):
18647        * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
18648        (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
18649        Replace individual font related fields with FontInfo.
18650
18651        * Shared/FontInfo.cpp: Added.
18652        (WebKit::FontInfo::FontInfo):
18653        (WebKit::FontInfo::encode):
18654        (WebKit::FontInfo::decode):
18655        * Shared/FontInfo.h: Added.
18656        Add class to encapsulate passing a font description over the wire.
18657
18658        * Shared/PlatformPopupMenuData.cpp:
18659        (WebKit::PlatformPopupMenuData::encode):
18660        (WebKit::PlatformPopupMenuData::decode):
18661        * Shared/PlatformPopupMenuData.h:
18662        Add FontInfo as extra data for the Mac.
18663
18664        * UIProcess/API/mac/PageClientImpl.h:
18665        * UIProcess/API/mac/PageClientImpl.mm:
18666        (WebKit::PageClientImpl::didPerformDictionaryLookup):
18667        * UIProcess/PageClient.h:
18668        Add scaleFactor and use it to construct a font at the right size.
18669
18670        * UIProcess/WebPageProxy.cpp:
18671        (WebKit::WebPageProxy::showPopupMenu):
18672        (WebKit::WebPageProxy::didPerformDictionaryLookup):
18673        * UIProcess/WebPageProxy.h:
18674        * UIProcess/WebPageProxy.messages.in:
18675        * UIProcess/WebPopupMenuProxy.h:
18676        * UIProcess/mac/WebPopupMenuProxyMac.h:
18677        (WebKit::WebPopupMenuProxyMac::create):
18678        * UIProcess/mac/WebPopupMenuProxyMac.mm:
18679        (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
18680        (WebKit::WebPopupMenuProxyMac::populate):
18681        (WebKit::WebPopupMenuProxyMac::showPopupMenu):
18682        * UIProcess/qt/WebPopupMenuProxyQt.cpp:
18683        (WebKit::WebPopupMenuProxyQt::showPopupMenu):
18684        * UIProcess/qt/WebPopupMenuProxyQt.h:
18685        * UIProcess/win/WebPopupMenuProxyWin.cpp:
18686        (WebKit::WebPopupMenuProxyWin::showPopupMenu):
18687        * UIProcess/win/WebPopupMenuProxyWin.h:
18688        * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
18689        (WebKit::WebPopupMenu::setUpPlatformData):
18690        * WebProcess/WebPage/mac/WebPageMac.mm:
18691        (WebKit::WebPage::performDictionaryLookupAtLocation):
18692        Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
18693
18694        * WebKit2.pro:
18695        * WebKit2.xcodeproj/project.pbxproj:
18696        * win/WebKit2.vcproj:
18697        Add new files.
18698
186992011-02-28  Adam Roben  <aroben@apple.com>
18700
18701        One more rename as a followup to r79868
18702
18703        Rubber-stamped by Anders Carlsson.
18704
18705        * UIProcess/DrawingAreaProxyImpl.cpp:
18706        * UIProcess/DrawingAreaProxyImpl.h:
18707        Rename stateDidChange to backingStoreStateDidChange.
18708
187092011-02-28  Adam Roben  <aroben@apple.com>
18710
18711        Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
18712
18713        Rubber-stamped (and suggested) by Anders Carlsson.
18714
18715        * UIProcess/DrawingAreaProxy.h:
18716        * UIProcess/DrawingAreaProxy.messages.in:
18717        * UIProcess/DrawingAreaProxyImpl.cpp:
18718        * UIProcess/DrawingAreaProxyImpl.h:
18719        * WebProcess/WebPage/DrawingArea.h:
18720        * WebProcess/WebPage/DrawingArea.messages.in:
18721        * WebProcess/WebPage/DrawingAreaImpl.cpp:
18722        * WebProcess/WebPage/DrawingAreaImpl.h:
18723        Perform the rename.
18724
187252011-02-28  Adam Roben  <aroben@apple.com>
18726
18727        Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
18728
18729        The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
18730        DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
18731        store. (Currently, this is just when the size changes.) This function will sometimes (but
18732        not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
18733        to the web process. This means it's now possible for the state IDs sent in consecutive
18734        UpdateState messages to increase by more than one, but that's OK.
18735
18736        This should cause no change in behavior.
18737
18738        Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
18739        its state changes, not just when we send an UpdateState message
18740
18741        Reviewed by Anders Carlsson.
18742
18743        * UIProcess/DrawingAreaProxyImpl.cpp:
18744        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
18745        (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
18746        (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
18747        sendUpdateState whenever our state has changed for any reason since the last UpdateState
18748        message was sent.
18749        (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
18750        through to sendUpdateState.
18751        (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
18752        the state ID we send to the web process from here to stateDidChange, and added an assertion.
18753
18754        * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
18755        the comment explaining its meaning.
18756
187572011-02-28  Adam Roben  <aroben@apple.com>
18758
18759        Pass the right dirty rect to Plugin::paint
18760
18761        A typo in r79040 broke this. Much of this patch is just support for testing the fix.
18762
18763        Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
18764        Large portions of pages with plugins paint black
18765
18766        Reviewed by Anders Carlsson.
18767
18768        * WebProcess/Plugins/PluginView.cpp:
18769        (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
18770        rather than just passing along the dirty rect that was passed into this function. This is
18771        the bug fix.
18772
18773        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
18774        (WKBundlePageForceRepaint):
18775        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
18776        Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
18777
18778        * WebProcess/WebPage/WebPage.cpp:
18779        (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
18780        (WebKit::WebPage::forceRepaint): ...from here.
18781
18782        * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
18783
187842011-02-27  Sam Weinig  <sam@webkit.org>
18785
18786        Reviewed by Dan Bernstein.
18787
18788        Force dictionary popup to use overlay type
18789        <rdar://problem/9052483>
18790        https://bugs.webkit.org/show_bug.cgi?id=55337
18791
18792        * UIProcess/API/mac/PageClientImpl.mm:
18793        (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
18794        used for the hot key version of the dictionary popup, force the overlay
18795        style.
18796
187972011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
18798
18799        Reviewed by Kenneth Rohde Christiansen.
18800
18801        [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
18802        https://bugs.webkit.org/show_bug.cgi?id=55330
18803
18804        Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
18805        on its use.
18806
18807        * UIProcess/API/qt/qgraphicswkview.cpp:
18808        * UIProcess/API/qt/qgraphicswkview.h:
18809
188102011-02-27  Alejandro G. Castro  <alex@igalia.com>
18811
18812        Unreviewed, fixed GTK compilation after r79806.
18813
18814        * UIProcess/gtk/WebView.cpp:
18815        (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
18816        * UIProcess/gtk/WebView.h:
18817
188182011-02-26  Anders Carlsson  <andersca@apple.com>
18819
18820        Reviewed by Dan Bernstein.
18821
18822        Asynchronous response to FramePolicyListener is not finishing the load
18823        https://bugs.webkit.org/show_bug.cgi?id=55305
18824        <rdar://problem/9044356>
18825
18826        Always initialize the receivedPolicyAction reply parameter.
18827
18828        * UIProcess/WebPageProxy.cpp:
18829        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
18830        (WebKit::WebPageProxy::decidePolicyForMIMEType):
18831
188322011-02-26  Anders Carlsson  <andersca@apple.com>
18833
18834        Reviewed by Sam Weinig.
18835
18836        DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
18837        https://bugs.webkit.org/show_bug.cgi?id=55304
18838
18839        * UIProcess/API/mac/PDFViewController.h:
18840        * UIProcess/API/mac/PDFViewController.mm:
18841        (WebKit::PDFViewController::setPDFDocumentData):
18842        * UIProcess/API/mac/PageClientImpl.h:
18843        * UIProcess/API/mac/PageClientImpl.mm:
18844        (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
18845        * UIProcess/API/mac/WKView.mm:
18846        (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
18847        * UIProcess/API/mac/WKViewInternal.h:
18848        * UIProcess/API/qt/qwkpage.cpp:
18849        (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
18850        * UIProcess/API/qt/qwkpage_p.h:
18851        * UIProcess/PageClient.h:
18852        * UIProcess/WebPageProxy.cpp:
18853        (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
18854        * UIProcess/WebPageProxy.h:
18855        * UIProcess/WebPageProxy.messages.in:
18856        * UIProcess/win/WebView.cpp:
18857        (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
18858        * UIProcess/win/WebView.h:
18859        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
18860        (WebKit::WebFrameLoaderClient::finishedLoading):
18861
188622011-02-26  Anders Carlsson  <andersca@apple.com>
18863
18864        Reviewed by Oliver Hunt.
18865
18866        DrawingArea should not be reference counted
18867        https://bugs.webkit.org/show_bug.cgi?id=55284
18868
18869        * Shared/DrawingAreaInfo.h:
18870        * Shared/WebPageCreationParameters.cpp:
18871        (WebKit::WebPageCreationParameters::encode):
18872        (WebKit::WebPageCreationParameters::decode):
18873        * Shared/WebPageCreationParameters.h:
18874        * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
18875        (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
18876        (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
18877        (WebKit::ChunkedUpdateDrawingAreaProxy::update):
18878        (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
18879        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
18880        * UIProcess/DrawingAreaProxy.cpp:
18881        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
18882        * UIProcess/DrawingAreaProxy.h:
18883        (WebKit::DrawingAreaProxy::type):
18884        * UIProcess/DrawingAreaProxyImpl.cpp:
18885        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
18886        * UIProcess/DrawingAreaProxyImpl.h:
18887        * UIProcess/TiledDrawingAreaProxy.cpp:
18888        (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
18889        * UIProcess/TiledDrawingAreaProxy.h:
18890        * UIProcess/WebPageProxy.cpp:
18891        (WebKit::WebPageProxy::didReceiveSyncMessage):
18892        (WebKit::WebPageProxy::creationParameters):
18893        * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
18894        * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
18895        (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
18896        (WebKit::ChunkedUpdateDrawingArea::display):
18897        (WebKit::ChunkedUpdateDrawingArea::setSize):
18898        (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
18899        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
18900        * WebProcess/WebPage/DrawingArea.cpp:
18901        (WebKit::DrawingArea::create):
18902        (WebKit::DrawingArea::DrawingArea):
18903        * WebProcess/WebPage/DrawingArea.h:
18904        * WebProcess/WebPage/DrawingAreaImpl.cpp:
18905        (WebKit::DrawingAreaImpl::create):
18906        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
18907        * WebProcess/WebPage/DrawingAreaImpl.h:
18908        * WebProcess/WebPage/TiledDrawingArea.cpp:
18909        (WebKit::TiledDrawingArea::TiledDrawingArea):
18910        * WebProcess/WebPage/TiledDrawingArea.h:
18911        * WebProcess/WebPage/WebPage.cpp:
18912        (WebKit::WebPage::drawRect):
18913        * WebProcess/WebPage/WebPage.h:
18914
189152011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
18916
18917        Reviewed by Pavel Feldman.
18918
18919        DumpRenderTree should reset frame opener between tests.
18920        https://bugs.webkit.org/show_bug.cgi?id=54874
18921
18922        Added clearOpener method to WKBundleWebFramePrivate.
18923
18924        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
18925        (WKBundleFrameClearOpener):
18926        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
18927
189282011-02-26  Yael Aharon  <yael.aharon@nokia.com>
18929
18930        Reviewed by Andreas Kling.
18931
18932        [Qt] Fix the focus in MiniBrowser.
18933        https://bugs.webkit.org/show_bug.cgi?id=55288
18934
18935        Implement basic functionality for focus in QWKPagePrivate.
18936
18937        * UIProcess/API/qt/qwkpage.cpp:
18938        (QWKPagePrivate::isViewWindowActive):
18939        (QWKPagePrivate::isViewFocused):
18940        (QWKPagePrivate::isViewVisible):
18941
189422011-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
18943
18944        Unreviewed, rolling out r79764.
18945        http://trac.webkit.org/changeset/79764
18946        https://bugs.webkit.org/show_bug.cgi?id=55295
18947
18948        "broke Chromium builds" (Requested by rniwa on #webkit).
18949
18950        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
18951        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
18952
189532011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
18954
18955        Reviewed by Pavel Feldman.
18956
18957        DumpRenderTree should reset frame opener between tests.
18958        https://bugs.webkit.org/show_bug.cgi?id=54874
18959
18960        Added clearOpener method to WKBundleWebFramePrivate.
18961
18962        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
18963        (WKBundleFrameClearOpener):
18964        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
18965
189662011-02-25  Anders Carlsson  <andersca@apple.com>
18967
18968        Reviewed by Darin Adler.
18969
18970        Plug-in process crashes when using GuardMalloc
18971        https://bugs.webkit.org/show_bug.cgi?id=55279
18972        <rdar://problem/9044618>
18973
18974        Update m_environmentPointer after copying the environment variables.
18975        
18976        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18977        (WebKit::EnvironmentVariables::copyEnvironmentVariables):
18978
189792011-02-25  Darin Adler  <darin@apple.com>
18980
18981        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18982        (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.
18983
189842011-02-25  Darin Adler  <darin@apple.com>
18985
18986        Reviewed by Mark Rowe.
18987
18988        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18989        (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
18990        builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.
18991
189922011-02-25  Darin Adler  <darin@apple.com>
18993
18994        Reviewed by Anders Carlsson.
18995
18996        <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set
18997
18998        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
18999        (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
19000        the strings here because they are allocated with fastMalloc, not new.
19001        (WebKit::EnvironmentVariables::set): Use const more.
19002        (WebKit::EnvironmentVariables::get): Ditto.
19003        (WebKit::EnvironmentVariables::appendValue): Ditto.
19004        (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
19005        where this would match if the name matched only a prefix of the environment variable's
19006        name. We want to match the whole name, so we need to use memcmp, not strncmp.
19007        (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
19008        (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
19009        for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
19010        ensuring we can pick up other frameworks from the same directory in the web process.
19011        Use a const_cast instead of a C-style cast.
19012
190132011-02-25  Chris Fleizach  <cfleizach@apple.com>
19014
19015        Reviewed by Anders Carlsson.
19016
19017        AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
19018        https://bugs.webkit.org/show_bug.cgi?id=55277
19019
19020        * UIProcess/API/mac/WKView.mm:
19021        (-[WKView accessibilityFocusedUIElement]):
19022
190232011-02-25  Alexey Proskuryakov  <ap@apple.com>
19024
19025        Reviewed by Anders Carlsson.
19026
19027        https://bugs.webkit.org/show_bug.cgi?id=55276
19028        WebPage::close() accesses "this" after it is destroyed.
19029
19030        This was making many tests crash with GuardMalloc.
19031
19032        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
19033        destroyed, not after.
19034
190352011-02-25  Balazs Kelemen  <kbalazs@webkit.org>
19036
19037        Unreviewed.
19038        Add missing sources to WebKit2API.pri.
19039
19040        * WebKit2API.pri:
19041
190422011-02-25  Anders Carlsson  <andersca@apple.com>
19043
19044        Reviewed by Darin Adler.
19045
19046        A WKView without a window will cause CG errors in the console
19047        https://bugs.webkit.org/show_bug.cgi?id=55264
19048        <rdar://problem/9044281>
19049
19050        Check that the window has a valid window number before trying to get its graphics context.
19051
19052        * UIProcess/API/mac/PageClientImpl.mm:
19053        (WebKit::PageClientImpl::containingWindowGraphicsContext):
19054
190552011-02-25  Brian Weinstein  <bweinstein@apple.com>
19056
19057        Reviewed by Brady Eidson and looked over by Jessie Berlin.
19058
19059        WebKit2: Need a way to manage cookies from the web process
19060        https://bugs.webkit.org/show_bug.cgi?id=55086
19061        
19062        Call through to WebCore::CookieJar in our WebCookieManager functions.
19063
19064        * WebProcess/Cookies/WebCookieManager.cpp:
19065        (WebKit::WebCookieManager::getHostnamesWithCookies):
19066        (WebKit::WebCookieManager::deleteCookiesForHostname):
19067        (WebKit::WebCookieManager::deleteAllCookies):
19068
190692011-02-25  Anders Carlsson  <andersca@apple.com>
19070
19071        Reviewed by Sam Weinig.
19072
19073        Option-clicking on links doesn't download them due to sandbox violation
19074        https://bugs.webkit.org/show_bug.cgi?id=55250
19075        <rdar://problem/9018359>
19076
19077        The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
19078        decided policy was "Download". Fix this by passing along the download ID back to the web process.
19079
19080        * Platform/CoreIPC/HandleMessage.h:
19081        (CoreIPC::callMemberFunction):
19082        Add new overload.
19083
19084        * UIProcess/WebPageProxy.cpp:
19085        (WebKit::WebPageProxy::WebPageProxy):
19086        Initialize m_syncNavigationActionPolicyDownloadID.
19087
19088        (WebKit::WebPageProxy::receivedPolicyDecision):
19089        Set m_syncNavigationActionPolicyDownloadID to the download ID.
19090
19091        (WebKit::WebPageProxy::decidePolicyForNavigationAction):
19092        Return the m_syncNavigationActionPolicyDownloadID.
19093
19094        * UIProcess/WebPageProxy.h:
19095        * UIProcess/WebPageProxy.messages.in:
19096        Add a DownloadID reply parameter.
19097
19098        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
19099        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
19100        Don't pass a zero download ID to didReceivePolicyDecision.
19101
191022011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
19103
19104        Reviewed by Martin Robinson.
19105
19106        [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
19107        https://bugs.webkit.org/show_bug.cgi?id=48510
19108
19109        * GNUmakefile.am:
19110        * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
19111        and constructors, in our case we need it because we use a pointer
19112        and copy the event.
19113        (WebKit::NativeWebKeyboardEvent::nativeEvent):
19114        * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
19115        (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
19116        to copy the event in the constructor to avoid two references to
19117        the same event.
19118        * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
19119        functions to add const, we need it for the NativeWebKeyboardEvent
19120        constructor.
19121        (WebKit::modifiersForEvent):
19122        (WebKit::WebEventFactory::createWebKeyboardEvent):
19123        * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
19124        for GTK port. Yet to implement.
19125        (WebKit::WebContext::applicationCacheDirectory):
19126        (WebKit::WebContext::platformInitializeWebProcess):
19127        (WebKit::WebContext::platformDefaultDatabaseDirectory):
19128        * UIProcess/gtk/WebView.cpp:
19129        (WebKit::WebView::handleKeyboardEvent):
19130
191312011-02-25  Anders Carlsson  <andersca@apple.com>
19132
19133        Reviewed by Sam Weinig.
19134
19135        Get rid of more old accelerated compositing code
19136        https://bugs.webkit.org/show_bug.cgi?id=55235
19137
19138        * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
19139        * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
19140        * UIProcess/DrawingAreaProxy.h:
19141        * UIProcess/DrawingAreaProxyImpl.cpp:
19142        * UIProcess/DrawingAreaProxyImpl.h:
19143        * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
19144        * WebProcess/WebPage/DrawingArea.h:
19145        * WebProcess/WebPage/DrawingAreaImpl.cpp:
19146        * WebProcess/WebPage/DrawingAreaImpl.h:
19147
191482011-02-25  Andras Becsi  <abecsi@webkit.org>
19149
19150        Reviewed by Csaba Osztrogonác.
19151
19152        [Qt] Make the WebKit2 build system less confusing for non-Qt developers
19153        https://bugs.webkit.org/show_bug.cgi?id=55213
19154
19155        * WebKit2API.pri: Added.
19156
191572011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
19158
19159        Reviewed by Martin Robinson.
19160
19161        [GTK] Implement WebView and WebKitWebView classes for WebKit2
19162        https://bugs.webkit.org/show_bug.cgi?id=48509
19163
19164        * GNUmakefile.am:
19165        * UIProcess/API/C/gtk/WKView.cpp:
19166        * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
19167        constructor.
19168        * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
19169        for WebView. The GObject is the GtkWidget handle which is used by
19170        WebView class for GTK port.
19171        * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
19172        declarations for GtkWidget handle for GTK port.
19173        * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
19174        for GTK port which is associated with each WKViewRef.
19175        * UIProcess/gtk/WebView.h: Added. Class which implements the
19176        PageClient interface. It is a wrapper over the native GtkWidget
19177        handle associated with each WKViewRef for GTK port.
19178
191792011-02-25  Alejandro G. Castro  <alex@igalia.com>
19180
19181        Fix GTK compilation after r79654.
19182
19183        * GNUmakefile.am:
19184
191852011-02-24  Brian Weinstein  <bweinstein@apple.com>
19186
19187        Qt build fix.
19188
19189        * WebKit2.pri:
19190
191912011-02-24  Brady Eidson  <beidson@apple.com>
19192
19193        Reviewed by Sam Weinig and looked over by Brian Weinstein.
19194
19195        Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
19196        Need WebKit2 API to view/manage origins with LocalStorage.
19197
19198        Project file stuff:
19199        * GNUmakefile.am:
19200        * WebKit2.pri:
19201        * WebKit2.pro:
19202        * WebKit2.xcodeproj/project.pbxproj:
19203        * win/WebKit2.vcproj:
19204        * win/WebKit2Common.vsprops:
19205        * win/WebKit2Generated.make:
19206
19207        WK2 derived sources and API stuff:
19208        * DerivedSources.make:
19209        * DerivedSources.pro:
19210        * Platform/CoreIPC/MessageID.h:
19211        * Shared/API/c/WKBase.h:
19212        * Shared/APIObject.h:
19213        * UIProcess/API/C/WKAPICast.h:
19214
19215        Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
19216        * UIProcess/WebContext.cpp:
19217        (WebKit::WebContext::WebContext):
19218        (WebKit::WebContext::~WebContext):
19219        (WebKit::WebContext::disconnectProcess):
19220        (WebKit::WebContext::didReceiveMessage):
19221        * UIProcess/WebContext.h:
19222        (WebKit::WebContext::keyValueStorageManagerProxy):
19223
19224        Add API to get the KeyValueStorageManager for a context:
19225        * UIProcess/API/C/WKContext.cpp:
19226        (WKContextGetKeyValueStorageManager):
19227        * UIProcess/API/C/WKContext.h:
19228
19229        Route messages to the right place:
19230        * UIProcess/WebProcessProxy.cpp:
19231        (WebKit::WebProcessProxy::didReceiveMessage):
19232        * WebProcess/WebProcess.cpp:
19233        (WebKit::WebProcess::didReceiveMessage):
19234
19235        Add the API object, which wraps to WebKeyValueStorageManagerProxy:
19236        * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
19237        (WKKeyValueStorageManagerGetTypeID):
19238        (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
19239        (WKKeyValueStorageManagerDeleteEntriesForOrigin):
19240        (WKKeyValueStorageManagerDeleteAllEntries):
19241        * UIProcess/API/C/WKKeyValueStorageManager.h: Added.
19242
19243        The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
19244        * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
19245        (WebKit::WebKeyValueStorageManagerProxy::create):
19246        (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
19247        (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
19248        (WebKit::WebKeyValueStorageManagerProxy::invalidate):
19249        (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
19250        (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
19251        (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
19252        (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
19253        (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
19254        * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
19255        (WebKit::WebKeyValueStorageManagerProxy::clearContext):
19256        (WebKit::WebKeyValueStorageManagerProxy::type):
19257        * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.
19258
19259        The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
19260        * WebProcess/KeyValueStorage: Added.
19261        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
19262        (WebKit::WebKeyValueStorageManager::shared):
19263        (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
19264        (WebKit::WebKeyValueStorageManager::didReceiveMessage):
19265        (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
19266        (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
19267        (WebKit::WebKeyValueStorageManager::deleteAllEntries):
19268        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
19269        * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.
19270
192712011-02-24  Darin Adler  <darin@apple.com>
19272
19273        Reviewed by Anders Carlsson.
19274
19275        WebKit2: Image-based cursors do not work
19276        https://bugs.webkit.org/show_bug.cgi?id=55184
19277
19278        * Shared/ShareableBitmap.h: Added releaseData function
19279        declaration. This is only defined for CG, but we can declare
19280        it without defining it on non-CG platforms without causing problems.
19281
19282        * Shared/WebCoreArgumentCoders.cpp: Added.
19283        (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
19284        (CoreIPC::decodeImage): Ditto.
19285
19286        * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
19287        and decoder to handle image-based cursors, using the new encodeImage
19288        and decodeImage functions.
19289
19290        * Shared/cg/ShareableBitmapCG.cpp:
19291        (WebKit::ShareableBitmap::releaseData): Added.
19292        (WebKit::ShareableBitmap::createGraphicsContext): Use
19293        CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
19294        to guarantee we outlast the CGBitmapContext we create.
19295        (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.
19296
19297        * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
19298        (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.
19299
19300        * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
19301        and WebCoreArgumentCodersCG.cpp.
19302        * win/WebKit2.vcproj: Ditto.
19303
193042011-02-24  Anders Carlsson  <andersca@apple.com>
19305
19306        Reviewed by Dan Bernstein.
19307
19308        Crash when trying to send a sync message on an invalid connection
19309        https://bugs.webkit.org/show_bug.cgi?id=55190
19310        <rdar://problem/9035806>
19311
19312        * Platform/CoreIPC/Connection.cpp:
19313        (CoreIPC::Connection::sendSyncMessage):
19314        Don't try to call a client function if isValid() returns false since the client
19315        will be null in that case.
19316
193172011-02-24  Anders Carlsson  <andersca@apple.com>
19318
19319        Reviewed by Dan Bernstein.
19320
19321        Remove the layer backed drawing area
19322        https://bugs.webkit.org/show_bug.cgi?id=55174
19323
19324        * GNUmakefile.am:
19325        * Shared/DrawingAreaInfo.h:
19326        * UIProcess/API/mac/WKView.mm:
19327        * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
19328        * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
19329        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
19330        * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
19331        * UIProcess/win/WebView.cpp:
19332        * WebKit2.xcodeproj/project.pbxproj:
19333        * WebProcess/WebPage/DrawingArea.cpp:
19334        (WebKit::DrawingArea::create):
19335        * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
19336        * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
19337        * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
19338        * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
19339        * win/WebKit2.vcproj:
19340
193412011-02-24  Mike Thole  <mthole@apple.com>
19342
19343        Reviewed by Sam Weinig.
19344
19345        WK2: Add ability to get document node for a WKBundleNodeHandle
19346        https://bugs.webkit.org/post_bug.cgi
19347
19348        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
19349        (WKBundleNodeHandleCopyDocument):
19350        * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
19351        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
19352        (WebKit::InjectedBundleNodeHandle::document):
19353        * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
19354
193552011-02-24  Brady Eidson  <beidson@apple.com>
19356
19357        Reviewed by Adam Roben and looked at by Brian Weinstein.
19358
19359        https://bugs.webkit.org/show_bug.cgi?id=55165
19360        Can call CF API with a null CFArray in WebResourceCacheManager
19361
19362        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
19363        (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef, 
19364          so the call to CFArrayGetCount must be null checked.
19365
193662011-02-24  Anders Carlsson  <andersca@apple.com>
19367
19368        Reviewed by Simon Fraser.
19369
19370        ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
19371        https://bugs.webkit.org/show_bug.cgi?id=55162
19372        <rdar://problem/9048523>
19373
19374        * WebProcess/WebPage/DrawingAreaImpl.cpp:
19375        (WebKit::DrawingAreaImpl::updateState):
19376        Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
19377        EnterAcceleratedCompositingMode message.
19378
19379        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
19380        setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
19381
19382        * WebProcess/WebPage/LayerTreeHost.h:
19383        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
19384        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
19385        (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
19386        Make this take a boolean.
19387
193882011-02-24  Peter Kasting  <pkasting@google.com>
19389
19390        Reviewed by Eric Seidel.
19391
19392        Drop the "U; " encryption level from the User Agent string.
19393        https://bugs.webkit.org/show_bug.cgi?id=54566
19394
19395        * UIProcess/gtk/WebPageProxyGtk.cpp:
19396        (WebKit::WebPageProxy::standardUserAgent):
19397        * UIProcess/mac/WebPageProxyMac.mm:
19398        (WebKit::WebPageProxy::standardUserAgent):
19399        * UIProcess/qt/WebPageProxyQt.cpp:
19400        (WebKit::WebPageProxy::standardUserAgent):
19401        * UIProcess/win/WebPageProxyWin.cpp:
19402        (WebKit::WebPageProxy::standardUserAgent):
19403
194042011-02-24  Andrew Wilson  <atwilson@chromium.org>
19405
19406        Unreviewed, rolling out r79570.
19407        http://trac.webkit.org/changeset/79570
19408        https://bugs.webkit.org/show_bug.cgi?id=54874
19409
19410        Breaks chromium build because glue/mocks/mock_web_frame.h/cc
19411        was not updated
19412
19413        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
19414        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
19415
194162011-02-23  Brian Weinstein  <bweinstein@apple.com>
19417
19418        Reviewed by Adam Roben and looked over by Jessie Berlin.
19419
19420        Part of WebKit2: Need a way to manage cookies from the web process
19421        https://bugs.webkit.org/show_bug.cgi?id=55086
19422        
19423        This patch adds the plumbing and classes that are needed to manage cookies from the web process.
19424        The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
19425
19426        Project file changes.
19427        * DerivedSources.make:
19428        * DerivedSources.pro:
19429        * GNUmakefile.am:
19430        * WebKit2.pri:
19431        * WebKit2.pro:
19432        * WebKit2.xcodeproj/project.pbxproj:
19433        * win/WebKit2.vcproj:
19434        * win/WebKit2Common.vsprops:
19435        * win/WebKit2Generated.make:
19436
19437        Add some needed plumbing for WebCookieManager{Proxy}.
19438        * Platform/CoreIPC/MessageID.h:
19439        * Shared/API/c/WKBase.h:
19440        * Shared/APIObject.h:
19441        * UIProcess/API/C/WKAPICast.h:
19442
19443        * UIProcess/API/C/WKContext.cpp:
19444        (WKContextGetCookieManager): Gets the cookie manager proxy.
19445        * UIProcess/API/C/WKContext.h:
19446        * UIProcess/API/C/WKCookieManager.cpp: Added.
19447        (WKCookieManagerGetTypeID):
19448        (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
19449        (WKCookieManagerDeleteCookiesForHostname): Ditto.
19450        (WKCookieManagerDeleteAllCookies): Ditto.
19451        * UIProcess/API/C/WKCookieManager.h: Added.
19452
19453        * UIProcess/WebProcessProxy.cpp:
19454        (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
19455        * UIProcess/WebContext.cpp:
19456        (WebKit::WebContext::WebContext): Initialize the cookie manager.
19457        (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
19458        (WebKit::WebContext::disconnectProcess): Ditto.
19459        (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
19460        * UIProcess/WebContext.h:
19461        (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
19462        * WebProcess/WebProcess.cpp:
19463        (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
19464
19465        * UIProcess/WebCookieManagerProxy.cpp: Added.
19466        (WebKit::WebCookieManagerProxy::create):
19467        (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
19468        (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
19469        (WebKit::WebCookieManagerProxy::invalidate):
19470        (WebKit::WebCookieManagerProxy::didReceiveMessage): 
19471        (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
19472        (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
19473        (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
19474            for the origin.
19475        (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
19476        * UIProcess/WebCookieManagerProxy.h: Added.
19477        (WebKit::WebCookieManagerProxy::clearContext):
19478        (WebKit::WebCookieManagerProxy::type):
19479        * UIProcess/WebCookieManagerProxy.messages.in: Added.
19480
19481        * WebProcess/Cookies: Added.
19482        * WebProcess/Cookies/WebCookieManager.cpp: Added.
19483        (WebKit::WebCookieManager::shared):
19484        (WebKit::WebCookieManager::WebCookieManager):
19485        (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
19486        (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
19487            convert that HashSet to a Vector to send to the UI process.
19488        (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
19489        (WebKit::WebCookieManager::deleteAllCookies): Ditto.
19490        * WebProcess/Cookies/WebCookieManager.h: Added.
19491        * WebProcess/Cookies/WebCookieManager.messages.in: Added.
19492
194932011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
19494
19495        Reviewed by Martin Robinson.
19496
19497        [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
19498        https://bugs.webkit.org/show_bug.cgi?id=48510
19499
19500        * GNUmakefile.am:
19501        * Shared/gtk/WebEventFactory.cpp: Added. implementation for
19502        WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
19503        * Shared/gtk/WebEventFactory.h: Added.
19504        * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
19505        implementation for GTK port.
19506
195072011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>
19508
19509        Reviewed by Alexey Proskuryakov.
19510
19511        DumpRenderTree should reset frame opener between tests.
19512        https://bugs.webkit.org/show_bug.cgi?id=54874
19513
19514        Added clearOpener method to WKBundleWebFramePrivate.
19515
19516        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
19517        (WKBundleFrameClearOpener):
19518        * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
19519
195202011-02-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
19521
19522        Reviewed by Eric Seidel.
19523
19524        Support building WebKit with Python 3
19525        https://bugs.webkit.org/show_bug.cgi?id=55038
19526
19527        Update the generator scripts to support Python 3.
19528
19529        * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
19530        sys.stdout to be compatible with Python 2 and 3.
19531        * Scripts/generate-messages-header.py:
19532        * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
19533          to dict.items which is common to Python 2 and 3.
19534
195352011-02-24  Andras Becsi  <abecsi@webkit.org>
19536
19537        Reviewed by Laszlo Gombos.
19538
19539        [Qt] MinGW build fails to link
19540        https://bugs.webkit.org/show_bug.cgi?id=55050
19541
19542        Prepend the libraries of subcomponents instead of appending them
19543        to fix the library order according to the dependency of the libraries
19544
19545        * WebKit2.pri:
19546
195472011-02-24  Andras Becsi  <abecsi@webkit.org>
19548
19549        Reviewed by Csaba Osztrogonác.
19550
19551        [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
19552        https://bugs.webkit.org/show_bug.cgi?id=47589
19553
19554        In case of file name clashes only generate forwarding header for the current platform.
19555
19556        * Scripts/generate-forwarding-headers.pl:
19557
195582011-02-23  Anders Carlsson  <andersca@apple.com>
19559
19560        Reviewed by Sam Weinig.
19561
19562        Remove some of the old accelerated compositing code
19563        https://bugs.webkit.org/show_bug.cgi?id=55084
19564
19565        * UIProcess/API/mac/PageClientImpl.h:
19566        * UIProcess/API/mac/PageClientImpl.mm:
19567        (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
19568        * UIProcess/API/mac/WKView.mm:
19569        * UIProcess/API/mac/WKViewInternal.h:
19570        * UIProcess/API/qt/qwkpage_p.h:
19571        * UIProcess/PageClient.h:
19572        * UIProcess/WebPageProxy.cpp:
19573        (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
19574        * UIProcess/WebPageProxy.h:
19575        * UIProcess/WebPageProxy.messages.in:
19576        * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
19577        (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
19578        (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
19579        * UIProcess/win/WebView.cpp:
19580        * UIProcess/win/WebView.h:
19581        * WebProcess/WebPage/WebPage.cpp:
19582        (WebKit::WebPage::enterAcceleratedCompositingMode):
19583        (WebKit::WebPage::exitAcceleratedCompositingMode):
19584        * WebProcess/WebPage/WebPage.h:
19585
195862011-02-23  Enrica Casucci  <enrica@apple.com>
19587
19588        Reverting an unintentional change that was part of http://trac.webkit.org/changeset/79494.
19589        Unreviewed.
19590
19591        * WebProcess/WebPage/mac/WebPageMac.mm:
19592        (WebKit::WebPage::interceptEditingKeyboardEvent):
19593
195942011-02-18  Enrica Casucci  <enrica@apple.com>
19595
19596        Reviewed by Adam Roben.
19597
19598        Mac OS X Services are not available for selected text in WebKit2 windows.
19599        https://bugs.webkit.org/show_bug.cgi?id=54777
19600        <rdar://problem/8666428>
19601        
19602        This patch adds support for Mac OS X Services in WebKit2 windows.
19603        In WKView we now call registerServicesMenuSendTypes providing the
19604        pasteboard types supported by WebKit and we also implement the two
19605        protocol methods required to validate the send type and write the
19606        content to the pasteboard. Unfortunately, AppKit expects the content
19607        to be available in the pasteboard upon return from writeSelectionToPasteboard and
19608        this is the reason why the call to the WebProcess is synchronous.
19609
19610        * Shared/SelectionState.h:
19611        (WebKit::SelectionState::SelectionState): Extended to include
19612        isContentRichlyEditable
19613        * Shared/mac/PasteboardTypes.h:
19614        * Shared/mac/PasteboardTypes.mm:
19615        (WebKit::PasteboardTypes::forSelection): Added.
19616        * UIProcess/API/mac/WKView.mm:
19617        (-[WKView initWithFrame:contextRef:pageGroupRef:]): Added call
19618        to registerServicesMenuSendTypes.
19619        (-[WKView writeSelectionToPasteboard:types:]): Added.
19620        (-[WKView validRequestorForSendType:returnType:]): Added.
19621        * UIProcess/WebPageProxy.cpp:
19622        (WebKit::WebPageProxy::writeSelectionToPasteboard):
19623        * UIProcess/WebPageProxy.h:
19624        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
19625        (WebKit::WebEditorClient::respondToChangedSelection): Modified to
19626        support the new SelectionState value.
19627        * WebProcess/WebPage/WebPage.h:
19628        * WebProcess/WebPage/WebPage.messages.in:
19629        * WebProcess/WebPage/mac/WebPageMac.mm:
19630        (WebKit::WebPage::writeSelectionToPasteboard): Added synchronous
19631        message to write the selected content to the pasteboard.
19632
196332011-02-23  Anders Carlsson  <andersca@apple.com>
19634
19635        Reviewed by Sam Weinig.
19636
19637        Add a ShareableBitmap::create overload that takes an existing SharedMemory object
19638        https://bugs.webkit.org/show_bug.cgi?id=55081
19639
19640        * Shared/ShareableBitmap.cpp:
19641        (WebKit::ShareableBitmap::createShareable):
19642        (WebKit::ShareableBitmap::create):
19643        * Shared/ShareableBitmap.h:
19644
196452011-02-23  Anders Carlsson  <andersca@apple.com>
19646
19647        Reviewed by Dan Bernstein.
19648
19649        Web Inspector toolbar looks bad in WebKit2
19650        https://bugs.webkit.org/show_bug.cgi?id=55076
19651        <rdar://problem/8866258>
19652
19653        * UIProcess/API/mac/WKView.mm:
19654        (-[WKView mouseDownCanMoveWindow]):
19655        Return NO from mouseDownCanMoveWindow to prevent drags in the (now transparent) inspector WKView
19656        from dragging the window around.
19657
19658        * UIProcess/mac/WebInspectorProxyMac.mm:
19659        (WebKit::WebInspectorProxy::platformCreateInspectorPage):
19660        Call [WKView setDrawsBackground:NO].
19661
196622011-02-23  Sam Weinig  <sam@webkit.org>
19663
19664        Reviewed by Anders Carlsson.
19665
19666        Remove WKPageForceRepaintWithInvalidation and instead make WKPageForceRepaint
19667        always dirty the entire page.
19668
19669        * Shared/ForceRepaintFlags.h: Removed.
19670        * UIProcess/API/C/WKPage.cpp:
19671        (WKPageForceRepaint):
19672        * UIProcess/API/C/WKPage.h:
19673        * UIProcess/WebPageProxy.cpp:
19674        (WebKit::WebPageProxy::forceRepaint):
19675        * UIProcess/WebPageProxy.h:
19676        * WebKit2.pro:
19677        * WebKit2.xcodeproj/project.pbxproj:
19678        * WebProcess/WebPage/DrawingAreaImpl.cpp:
19679        (WebKit::DrawingAreaImpl::forceRepaint):
19680        * WebProcess/WebPage/WebPage.cpp:
19681        (WebKit::WebPage::forceRepaint):
19682        * WebProcess/WebPage/WebPage.h:
19683        * WebProcess/WebPage/WebPage.messages.in:
19684        * win/WebKit2.vcproj:
19685
196862011-02-23  Anders Carlsson  <andersca@apple.com>
19687
19688        Reviewed by Sam Weinig.
19689
19690        Race condition when creating and destroying pages quickly
19691        https://bugs.webkit.org/show_bug.cgi?id=55061
19692        <rdar://problem/8708435>
19693
19694        When the last page in a web process is closed, the web process would
19695        previously terminate, even if the UI process had created a new page
19696        (the CreateNewPage message just wouldn't have reached the web process yet).
19697
19698        Fix this by adding a ShouldTerminate message that the web process sends when it's
19699        about to terminate. If the UI process has any pending pages, downloads etc. it will
19700        prevent the web process from terminating. Otherwise, it will immmediately disconnect
19701        the WebPageProxy so that creating a page after that will launch a new web process.
19702
19703        * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
19704        (WebKit::WebPluginSiteDataManager::shouldTerminate):
19705        * UIProcess/Plugins/WebPluginSiteDataManager.h:
19706        * UIProcess/WebContext.cpp:
19707        (WebKit::WebContext::shouldTerminate):
19708        (WebKit::WebContext::disconnectProcess):
19709        * UIProcess/WebContext.h:
19710        * UIProcess/WebProcessProxy.cpp:
19711        (WebKit::WebProcessProxy::disconnect):
19712        (WebKit::WebProcessProxy::didReceiveSyncMessage):
19713        (WebKit::WebProcessProxy::didClose):
19714        (WebKit::WebProcessProxy::shouldTerminate):
19715        * UIProcess/WebProcessProxy.h:
19716        * UIProcess/WebProcessProxy.messages.in:
19717        * WebProcess/WebProcess.cpp:
19718        (WebKit::WebProcess::terminateIfPossible):
19719
197202011-02-23  Mike Thole  <mthole@apple.com>
19721
19722        Reviewed by Darin Adler.
19723
19724        WKBundleNavigationAction.h should be exposed as a public header
19725        https://bugs.webkit.org/show_bug.cgi?id=55059
19726
19727        * WebKit2.xcodeproj/project.pbxproj:
19728        Changed WKBundleNavigationAction.h from 'project' to 'public'.
19729
197302011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
19731
19732        Reviewed by Laszlo Gombos.
19733
19734        [Qt] Make sure Symbian binary UIDs are unique
19735
19736        * WebProcess.pro: Resolve the UID collision with QtTestBrowser.pro
19737        by changing the UID.
19738
197392011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
19740
19741        Reviewed by Laszlo Gombos.
19742
19743        [Qt] Fix the Symbian build after r79334
19744        https://bugs.webkit.org/show_bug.cgi?id=55044
19745
19746        * WebKit2.pri: Copy the rules from JavaScriptCore.pri for
19747        defineTest().
19748
19749        Remove addWebKit2LibWholeArchive as it is no longer needed.
19750
197512011-02-23  Alejandro G. Castro  <alex@igalia.com>
19752
19753        Unreviewed, fixed GTK WebKit2 compilation after r79366.
19754
19755        * GNUmakefile.am:
19756
197572011-02-23  Patrick Gansterer  <paroga@webkit.org>
19758
19759        Reviewed by Darin Adler.
19760
19761        Rename PLATFORM(CF) to USE(CF)
19762        https://bugs.webkit.org/show_bug.cgi?id=53540
19763
19764        * UIProcess/WebBackForwardList.h:
19765        * UIProcess/WebPageProxy.cpp:
19766        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
19767        (WebKit::formatLocalizedString):
19768
197692011-02-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
19770
19771        Reviewed by Andreas Kling.
19772
19773        [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
19774        https://bugs.webkit.org/show_bug.cgi?id=54996
19775
19776        Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
19777        is empty/contain only disabled elements.
19778
19779        * UIProcess/API/qt/qgraphicswkview.cpp:
19780        (QGraphicsWKView::showContextMenu):
19781        * UIProcess/qt/WebContextMenuProxyQt.cpp:
19782        (WebKit::WebContextMenuProxyQt::showContextMenu):
19783
197842011-02-22  Dan Bernstein  <mitz@apple.com>
19785
19786        LLVM Compiler build fix.
19787
19788        * Scripts/webkit2/messages.py:
19789        * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
19790
197912011-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
19792
19793        Reviewed by Alexey Proskuryakov.
19794
19795        Drop the language tag part from the User Agent string
19796        https://bugs.webkit.org/show_bug.cgi?id=54560
19797
19798        * UIProcess/gtk/WebPageProxyGtk.cpp:
19799        (WebKit::WebPageProxy::standardUserAgent):
19800
19801        * UIProcess/mac/WebPageProxyMac.mm:
19802        (WebKit::WebPageProxy::standardUserAgent):
19803
19804        * UIProcess/qt/WebPageProxyQt.cpp:
19805        (WebKit::WebPageProxy::standardUserAgent):
19806
19807        * UIProcess/win/WebPageProxyWin.cpp:
19808        (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
19809        part and fix style.
19810
198112011-02-22  Sam Weinig  <sam@webkit.org>
19812
19813        Reviewed by Anders Carlsson.
19814
19815        Add WebKit2 API to force a repaint with an invalidation
19816        https://bugs.webkit.org/show_bug.cgi?id=55015
19817
19818        * Shared/ForceRepaintFlags.h: Added.
19819        * UIProcess/API/C/WKPage.cpp:
19820        (WKPageForceRepaint):
19821        (WKPageForceRepaintWithInvalidation):
19822        * UIProcess/API/C/WKPage.h:
19823        Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
19824        but also calls setNeedsDisplay on the entire bounds of the page.
19825
19826        * UIProcess/WebPageProxy.cpp:
19827        (WebKit::WebPageProxy::forceRepaint):
19828        * UIProcess/WebPageProxy.h:
19829        * WebProcess/WebPage/WebPage.cpp:
19830        (WebKit::WebPage::forceRepaint):
19831        * WebProcess/WebPage/WebPage.h:
19832        * WebProcess/WebPage/WebPage.messages.in:
19833        Pipe the flag down to the WebProcess.
19834
19835        * WebKit2.pro:
19836        * WebKit2.xcodeproj/project.pbxproj:
19837        * win/WebKit2.vcproj:
19838        Add ForceRepaintFlags.h.
19839
198402011-02-22  Simon Fraser  <simon.fraser@apple.com>
19841
19842        Reviewed by Dan Bernstein.
19843
19844        <rdar://problem/9039670>
19845        
19846        Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
19847        non-composited content layer if the preference is set.
19848
19849        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
19850        (WebKit::LayerTreeHostMac::LayerTreeHostMac):
19851
198522011-02-22  Brady Eidson  <beidson@apple.com>
19853
19854        Fix it Windows-style.
19855
19856        * WebProcess/WebProcess.cpp:
19857        (WebKit::WebProcess::getSitesWithPluginData):
19858        (WebKit::WebProcess::clearPluginSiteData):
19859
198602011-02-22  Anders Carlsson  <andersca@apple.com>
19861
19862        Reviewed by Dan Bernstein.
19863
19864        Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
19865        https://bugs.webkit.org/show_bug.cgi?id=55008
19866
19867        * WebProcess/Downloads/DownloadManager.cpp:
19868        (WebKit::DownloadManager::downloadFinished):
19869        * WebProcess/WebProcess.cpp:
19870        (WebKit::WebProcess::removeWebPage):
19871        (WebKit::WebProcess::terminateIfPossible):
19872        (WebKit::WebProcess::getSitesWithPluginData):
19873        * WebProcess/WebProcess.h:
19874        * WebProcess/gtk/WebProcessGtk.cpp:
19875        (WebKit::WebProcess::platformTerminate):
19876        * WebProcess/mac/WebProcessMac.mm:
19877        (WebKit::WebProcess::platformTerminate):
19878        * WebProcess/qt/WebProcessQt.cpp:
19879        (WebKit::WebProcess::platformTerminate):
19880        * WebProcess/win/WebProcessWin.cpp:
19881        (WebKit::WebProcess::platformTerminate):
19882
198832011-02-22  Brady Eidson  <beidson@apple.com>
19884
19885        Windows build-fix attempt.
19886
19887        * win/WebKit2Generated.make:
19888
198892011-02-22  Csaba Osztrogonác  <ossy@webkit.org>
19890
19891        Unreviewed.
19892
19893        <rdar://problem/8762042> and  https://bugs.webkit.org/show_bug.cgi?id=54514
19894        API to view and delete Application Cache data by origin.
19895
19896        [Qt][WK2] Buildfix after r79364.
19897
19898        * DerivedSources.pro:
19899        * WebKit2.pri:
19900
199012011-02-22  Brady Eidson  <beidson@apple.com>
19902
19903        Reviewed by Anders Carlsson and looked over by Brian Weinstein.
19904
19905        <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
19906        API to view and delete Application Cache data by origin.
19907
19908        I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
19909        it's sorting was wrong due to a last minute name change.
19910
19911        Project file changes:
19912        * GNUmakefile.am:
19913        * win/WebKit2.vcproj:
19914        * win/WebKit2Common.vsprops:
19915        * win/WebKit2Generated.make:
19916        * WebKit2.pro:
19917        * WebKit2.xcodeproj/project.pbxproj:
19918
19919        WK2 build-system and API paperwork:
19920        * DerivedSources.make:
19921        * Platform/CoreIPC/MessageID.h:
19922        * Shared/API/c/WKBase.h:
19923        * Shared/APIObject.h:
19924        * UIProcess/API/C/WKAPICast.h:
19925
19926        Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
19927        * Shared/SecurityOriginData.cpp:
19928        (WebKit::performAPICallbackWithSecurityOriginDataVector):
19929        * Shared/SecurityOriginData.h:
19930        * UIProcess/WebResourceCacheManagerProxy.cpp:
19931        (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
19932
19933        Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
19934        * UIProcess/WebContext.cpp:
19935        (WebKit::WebContext::WebContext):
19936        (WebKit::WebContext::~WebContext):
19937        (WebKit::WebContext::processDidClose):
19938        (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
19939        * UIProcess/WebContext.h:
19940        (WebKit::WebContext::applicationCacheManagerProxy):
19941        (WebKit::WebContext::resourceCacheManagerProxy):
19942
19943        Add API to get the ApplicationCacheManager for a context:
19944        * UIProcess/API/C/WKContext.cpp:
19945        (WKContextGetApplicationCacheManager):
19946        (WKContextGetResourceCacheManager):
19947        * UIProcess/API/C/WKContext.h:
19948
19949        Route messages to the right place:
19950        * UIProcess/WebProcessProxy.cpp:
19951        (WebKit::WebProcessProxy::didReceiveMessage):
19952        * WebProcess/WebProcess.cpp:
19953        (WebKit::WebProcess::didReceiveMessage):
19954
19955        Add the API object, which wraps to WebApplicationCacheManagerProxy:
19956        * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
19957        (WKApplicationCacheManagerGetTypeID):
19958        (WKApplicationCacheManagerGetApplicationCacheOrigins):
19959        (WKApplicationCacheManagerDeleteEntriesForOrigin):
19960        (WKApplicationCacheManagerDeleteAllEntries):
19961        * UIProcess/API/C/WKApplicationCacheManager.h: Added.
19962
19963        The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
19964        * UIProcess/WebApplicationCacheManagerProxy.cpp: Added.
19965        (WebKit::WebApplicationCacheManagerProxy::create):
19966        (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
19967        (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy):
19968        (WebKit::WebApplicationCacheManagerProxy::invalidate):
19969        (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
19970        (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
19971        (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
19972        (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
19973        (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
19974        * UIProcess/WebApplicationCacheManagerProxy.h: Added.
19975        (WebKit::WebApplicationCacheManagerProxy::clearContext):
19976        (WebKit::WebApplicationCacheManagerProxy::type):
19977        * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added.
19978
19979        The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
19980        * WebProcess/ApplicationCache: Added.
19981        * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added.
19982        (WebKit::WebApplicationCacheManager::shared):
19983        (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
19984        (WebKit::WebApplicationCacheManager::didReceiveMessage):
19985        (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
19986        (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
19987        (WebKit::WebApplicationCacheManager::deleteAllEntries):
19988        * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added.
19989        * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added.
19990
199912011-02-22  Anders Carlsson  <andersca@apple.com>
19992
19993        Reviewed by Sam Weinig.
19994
19995        Get rid of WebProcessManager
19996        https://bugs.webkit.org/show_bug.cgi?id=55001
19997
19998        WebProcessManager had become a stupid map of WebContext > WebProcess relations,
19999        which isn't really useful since the WebContext already knows about its process.
20000
20001        * Shared/WebURLRequest.cpp:
20002        * UIProcess/API/mac/WKView.mm:
20003        * UIProcess/WebContext.cpp:
20004        (WebKit::WebContext::~WebContext):
20005        (WebKit::WebContext::ensureWebProcess):
20006        (WebKit::WebContext::processDidFinishLaunching):
20007        * UIProcess/WebProcessManager.cpp: Removed.
20008        * UIProcess/WebProcessManager.h: Removed.
20009        * UIProcess/WebProcessProxy.cpp:
20010        (WebKit::WebProcessProxy::didClose):
20011        * WebKit2.pro:
20012        * WebKit2.xcodeproj/project.pbxproj:
20013        * win/WebKit2.vcproj:
20014
200152011-02-22  Anders Carlsson  <andersca@apple.com>
20016
20017        Reviewed by Darin Adler.
20018
20019        Get rid of WebProcessManager::getAllWebProcessContexts
20020        https://bugs.webkit.org/show_bug.cgi?id=55000
20021
20022        * Shared/WebURLRequest.cpp:
20023        (WebKit::WebURLRequest::setDefaultTimeoutInterval):
20024        Call WebContext::allContexts instead.
20025
20026        * UIProcess/WebContext.cpp:
20027        * UIProcess/WebContext.h:
20028        Add a vector of WebContext objects. Update it when creating and destroying contexts.
20029
20030        * UIProcess/WebProcessManager.cpp:
20031        * UIProcess/WebProcessManager.h:
20032        Remove WebProcessManager::getAllWebProcessContexts.
20033
200342011-02-22  Sam Weinig  <sam@webkit.org>
20035
20036        Reviewed by Anders Carlsson.
20037
20038        Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents
20039        a crash running fast/loader/empty-embed-src-attribute.html. This matches a 
20040        bail out in the default policy delegate in WebKit1.
20041
20042        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20043        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
20044
200452011-02-22  Anders Carlsson  <andersca@apple.com>
20046
20047        Reviewed by Dan Bernstein.
20048
20049        Grammar correction from Spelling & Grammar window doesn't work
20050        https://bugs.webkit.org/show_bug.cgi?id=54982
20051        <rdar://problem/8940918>
20052
20053        * UIProcess/API/mac/WKView.mm:
20054        (-[WKView isGrammarCheckingEnabled]):
20055        (-[WKView setGrammarCheckingEnabled:]):
20056        Call down to the text checker.
20057
20058        * UIProcess/TextChecker.h:
20059        Add updateSpellingUIWithGrammarString.
20060
20061        * UIProcess/WebPageProxy.cpp:
20062        (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
20063        Call TextChecker::updateSpellingUIWithGrammarString.
20064
20065        * UIProcess/WebPageProxy.messages.in:
20066        Add UpdateSpellingUIWithGrammarString message.
20067
20068        * UIProcess/gtk/TextCheckerGtk.cpp:
20069        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
20070        * UIProcess/qt/TextCheckerQt.cpp:
20071        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
20072        * UIProcess/win/TextCheckerWin.cpp:
20073        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
20074        Add stubs.
20075
20076        * UIProcess/mac/TextCheckerMac.mm:
20077        (WebKit::TextChecker::updateSpellingUIWithGrammarString):
20078        Update the spelling panel.
20079
20080        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
20081        (WebKit::WebEditorClient::updateSpellingUIWithGrammarString):
20082        Send an UpdateSpellingUIWithGrammarString message to the UI process.
20083
200842011-02-22  Balazs Kelemen  <kbalazs@webkit.org>
20085
20086        Reviewed by Anders Carlsson.
20087
20088        notImplemented() should behave identical in WebCore and WebKit2
20089        https://bugs.webkit.org/show_bug.cgi?id=54449
20090
20091        Use NotImplemented.h from WebCore. Initialize logging channels.
20092        Remove the WebKit2 concept of notImplemented().
20093
20094        * Platform/gtk/SharedMemoryGtk.cpp:
20095        * Platform/gtk/WorkQueueGtk.cpp:
20096        * Platform/qt/WorkQueueQt.cpp:
20097        * Platform/win/WorkQueueWin.cpp:
20098        * Shared/NotImplemented.h: Removed.
20099        * Shared/Plugins/NPIdentifierData.cpp:
20100        * Shared/Plugins/NPRemoteObjectMap.cpp:
20101        * Shared/Plugins/NPVariantData.cpp:
20102        * Shared/cairo/ShareableBitmapCairo.cpp:
20103        * Shared/gtk/ShareableBitmapGtk.cpp:
20104        * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
20105        * Shared/qt/WebCoreArgumentCodersQt.cpp:
20106        * Shared/win/LayerTreeContextWin.cpp:
20107        * UIProcess/API/mac/PageClientImpl.mm:
20108        * UIProcess/API/qt/qwkpage.cpp:
20109        * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
20110        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
20111        * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
20112        * UIProcess/WebContext.cpp:
20113        (WebKit::WebContext::WebContext):
20114        * UIProcess/WebInspectorProxy.cpp:
20115        * UIProcess/gtk/TextCheckerGtk.cpp:
20116        * UIProcess/gtk/WebInspectorGtk.cpp:
20117        * UIProcess/gtk/WebPreferencesGtk.cpp:
20118        * UIProcess/qt/TextCheckerQt.cpp:
20119        * UIProcess/qt/WebInspectorProxyQt.cpp:
20120        * UIProcess/win/TextCheckerWin.cpp:
20121        * UIProcess/win/WebContextMenuProxyWin.cpp:
20122        * WebKit2.pro:
20123        * WebKit2.xcodeproj/project.pbxproj:
20124        * WebProcess/Downloads/cf/DownloadCFNet.cpp:
20125        * WebProcess/Downloads/curl/DownloadCurl.cpp:
20126        * WebProcess/Downloads/mac/DownloadMac.mm:
20127        * WebProcess/Downloads/qt/DownloadQt.cpp:
20128        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
20129        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
20130        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
20131        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
20132        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
20133        * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
20134        * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
20135        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
20136        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
20137        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
20138        * WebProcess/WebCoreSupport/WebDragClient.cpp:
20139        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
20140        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20141        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
20142        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
20143        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
20144        * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
20145        * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
20146        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
20147        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
20148        * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
20149        * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
20150        * WebProcess/WebPage/qt/WebInspectorQt.cpp:
20151        * WebProcess/WebProcess.cpp:
20152        (WebKit::WebProcess::WebProcess):
20153        * WebProcess/gtk/WebProcessGtk.cpp:
20154        * config.h:
20155        * win/WebKit2.vcproj:
20156
201572011-02-22  Brian Weinstein  <bweinstein@apple.com>
20158
20159        Rubber-stamped by Brady Eidson.
20160
20161        Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.
20162
20163        * UIProcess/WebContext.cpp:
20164        (WebKit::WebContext::processDidClose):
20165
201662011-02-21  Adam Roben  <aroben@apple.com>
20167
20168        Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process
20169
20170        This will be useful for sending repeated messages for the same state ID to the web process.
20171        We don't do this currently, but will need to if we're asked to paint after we've thrown away
20172        our backing store to save memory.
20173
20174        Fixes <http://webkit.org/b/54916> DrawingAreaProxyImpl should keep track of the state ID it
20175        last sent to the web process
20176
20177        Reviewed by Anders Carlsson.
20178
20179        * UIProcess/DrawingAreaProxyImpl.cpp:
20180        (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and
20181        reordered member initialization to match the new declaration order.
20182        (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got
20183        from the web process is no newer than the most recent one we requested.
20184        (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send
20185        m_requestedStateID instead of a new global stateID.
20186
20187        * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before
20188        other data members. Also beefed the comment explaining m_currentStateID.
20189
201902011-02-22  Andras Becsi  <abecsi@webkit.org>
20191
20192        Reviewed by Laszlo Gombos.
20193
20194        [Qt] Redesign the build system
20195        https://bugs.webkit.org/show_bug.cgi?id=51339
20196
20197        Part 2.
20198
20199        Build WebCore as a static library, compile the WebKit API and WebKit2 API
20200        in a final step and link to WebKit2, WebCore and JSC libraries to fix
20201        linking issues resulting from stripped away symbols.
20202
20203        * WebKit2.pri: Add include paths.
20204        * WebKit2.pro: Move include paths to WebKit2.pri and move
20205        the API source to WebKit/qt/QtWebKit.pro
20206
202072011-02-22  Benjamin Poulain  <benjamin.poulain@nokia.com>
20208
20209        Reviewed by Kenneth Rohde Christiansen.
20210
20211        [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2
20212        https://bugs.webkit.org/show_bug.cgi?id=54902
20213
20214        Refactor the context menu handling of Qt to make it simpler to manage memory.
20215
20216        WebContextMenuProxyQt uses smart pointer for all the references to menu so
20217        there is no need to delete it explicitely.
20218
20219        Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so
20220        the client can choose to handle the memory, but there is no leak if it does not.
20221
20222        * UIProcess/API/qt/qgraphicswkview.cpp:
20223        (QGraphicsWKView::QGraphicsWKView):
20224        (QGraphicsWKView::showContextMenu):
20225        * UIProcess/API/qt/qgraphicswkview.h:
20226        * UIProcess/API/qt/qwkpage.h:
20227        * UIProcess/qt/WebContextMenuProxyQt.cpp:
20228        (WebKit::WebContextMenuProxyQt::showContextMenu):
20229        (WebKit::WebContextMenuProxyQt::createContextMenu):
20230        * UIProcess/qt/WebContextMenuProxyQt.h:
20231
202322011-02-22  Philippe Normand  <pnormand@igalia.com>
20233
20234        Reviewed by Xan Lopez.
20235
20236        [GTK] make distcheck fails
20237        https://bugs.webkit.org/show_bug.cgi?id=54943
20238
20239        Removed reference to NotImplemented.h which was removed.
20240
20241        * GNUmakefile.am:
20242
202432011-02-22  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
20244
20245        Reviewed by Kenneth Rohde Christiansen.
20246
20247        [Qt] QtWebProcess should be installed with 'make install'
20248        https://bugs.webkit.org/show_bug.cgi?id=44100
20249
20250        Follow the standard in other project files and allow install
20251        location to be changed with INSTALL_BINS variable.
20252
20253        * WebProcess.pro: Install QtWebProcess.
20254
202552011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
20256
20257        Unreviewed, rolling out r79296.
20258        http://trac.webkit.org/changeset/79296
20259        https://bugs.webkit.org/show_bug.cgi?id=54941
20260
20261        Breaks compilation on SnowLeapard Intel Release (Requested by
20262        kbalazs_ on #webkit).
20263
20264        * Platform/gtk/SharedMemoryGtk.cpp:
20265        * Platform/gtk/WorkQueueGtk.cpp:
20266        * Platform/qt/WorkQueueQt.cpp:
20267        * Platform/win/WorkQueueWin.cpp:
20268        * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
20269        * Shared/Plugins/NPIdentifierData.cpp:
20270        * Shared/Plugins/NPRemoteObjectMap.cpp:
20271        * Shared/Plugins/NPVariantData.cpp:
20272        * Shared/cairo/ShareableBitmapCairo.cpp:
20273        * Shared/gtk/ShareableBitmapGtk.cpp:
20274        * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
20275        * Shared/qt/WebCoreArgumentCodersQt.cpp:
20276        * Shared/win/LayerTreeContextWin.cpp:
20277        * UIProcess/API/mac/PageClientImpl.mm:
20278        * UIProcess/API/qt/qwkpage.cpp:
20279        * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
20280        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
20281        * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
20282        * UIProcess/WebContext.cpp:
20283        (WebKit::WebContext::WebContext):
20284        * UIProcess/WebInspectorProxy.cpp:
20285        * UIProcess/gtk/TextCheckerGtk.cpp:
20286        * UIProcess/gtk/WebInspectorGtk.cpp:
20287        * UIProcess/gtk/WebPreferencesGtk.cpp:
20288        * UIProcess/qt/TextCheckerQt.cpp:
20289        * UIProcess/qt/WebInspectorProxyQt.cpp:
20290        * UIProcess/win/TextCheckerWin.cpp:
20291        * UIProcess/win/WebContextMenuProxyWin.cpp:
20292        * WebKit2.pro:
20293        * WebKit2.xcodeproj/project.pbxproj:
20294        * WebProcess/Downloads/cf/DownloadCFNet.cpp:
20295        * WebProcess/Downloads/curl/DownloadCurl.cpp:
20296        * WebProcess/Downloads/mac/DownloadMac.mm:
20297        * WebProcess/Downloads/qt/DownloadQt.cpp:
20298        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
20299        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
20300        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
20301        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
20302        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
20303        * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
20304        * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
20305        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
20306        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
20307        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
20308        * WebProcess/WebCoreSupport/WebDragClient.cpp:
20309        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
20310        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20311        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
20312        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
20313        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
20314        * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
20315        * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
20316        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
20317        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
20318        * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
20319        * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
20320        * WebProcess/WebPage/qt/WebInspectorQt.cpp:
20321        * WebProcess/WebProcess.cpp:
20322        (WebKit::WebProcess::WebProcess):
20323        * WebProcess/gtk/WebProcessGtk.cpp:
20324        * config.h:
20325        * win/WebKit2.vcproj:
20326
203272011-02-16  Balazs Kelemen  <kbalazs@webkit.org>
20328
20329        Reviewed by Anders Carlsson.
20330
20331        notImplemented() should behave identical in WebCore and WebKit2
20332        https://bugs.webkit.org/show_bug.cgi?id=54449
20333
20334        Use NotImplemented.h from WebCore. Initialize logging channels.
20335        Remove the WebKit2 concept of notImplemented().
20336
20337        * Platform/gtk/SharedMemoryGtk.cpp:
20338        * Platform/gtk/WorkQueueGtk.cpp:
20339        * Platform/qt/WorkQueueQt.cpp:
20340        * Platform/win/WorkQueueWin.cpp:
20341        * Shared/NotImplemented.h: Removed.
20342        * Shared/Plugins/NPIdentifierData.cpp:
20343        * Shared/Plugins/NPRemoteObjectMap.cpp:
20344        * Shared/Plugins/NPVariantData.cpp:
20345        * Shared/cairo/ShareableBitmapCairo.cpp:
20346        * Shared/gtk/ShareableBitmapGtk.cpp:
20347        * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
20348        * Shared/qt/WebCoreArgumentCodersQt.cpp:
20349        * Shared/win/LayerTreeContextWin.cpp:
20350        * UIProcess/API/qt/qwkpage.cpp:
20351        * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
20352        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
20353        * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
20354        * UIProcess/WebContext.cpp:
20355        (WebKit::WebContext::WebContext):
20356        * UIProcess/WebInspectorProxy.cpp:
20357        * UIProcess/gtk/TextCheckerGtk.cpp:
20358        * UIProcess/gtk/WebInspectorGtk.cpp:
20359        * UIProcess/gtk/WebPreferencesGtk.cpp:
20360        * UIProcess/qt/TextCheckerQt.cpp:
20361        * UIProcess/qt/WebInspectorProxyQt.cpp:
20362        * UIProcess/win/TextCheckerWin.cpp:
20363        * UIProcess/win/WebContextMenuProxyWin.cpp:
20364        * WebKit2.pro:
20365        * WebProcess/Downloads/cf/DownloadCFNet.cpp:
20366        * WebProcess/Downloads/curl/DownloadCurl.cpp:
20367        * WebProcess/Downloads/mac/DownloadMac.mm:
20368        * WebProcess/Downloads/qt/DownloadQt.cpp:
20369        * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
20370        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
20371        * WebProcess/Plugins/Netscape/NPJSObject.cpp:
20372        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
20373        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
20374        * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
20375        * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
20376        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
20377        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
20378        * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
20379        * WebProcess/WebCoreSupport/WebDragClient.cpp:
20380        * WebProcess/WebCoreSupport/WebEditorClient.cpp:
20381        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20382        * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
20383        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
20384        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
20385        * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
20386        * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
20387        * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
20388        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
20389        * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
20390        * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
20391        * WebProcess/WebPage/qt/WebInspectorQt.cpp:
20392        * WebProcess/WebProcess.cpp:
20393        (WebKit::WebProcess::WebProcess):
20394        * WebProcess/gtk/WebProcessGtk.cpp:
20395
203962011-02-21  Timothy Hatcher  <timothy@apple.com>
20397
20398        Set and update the window title for the Web Inspector in WebKit2.
20399
20400        https://webkit.org/b/50945
20401        rdar://problem/8762410
20402
20403        Reviewed by Adam Roben.
20404
20405        * UIProcess/WebInspectorProxy.cpp:
20406        (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged.
20407        * UIProcess/WebInspectorProxy.h:
20408        * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged.
20409        * UIProcess/mac/WebInspectorProxyMac.mm:
20410        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
20411        * UIProcess/win/WebInspectorProxyWin.cpp:
20412        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
20413        * UIProcess/gtk/WebInspectorGtk.cpp:
20414        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
20415        * UIProcess/qt/WebInspectorProxyQt.cpp:
20416        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
20417        * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
20418        (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged.
20419        * WebProcess/WebPage/WebInspector.cpp:
20420        (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message.
20421        * WebProcess/WebPage/WebInspector.h:
20422
204232011-02-21  Sam Weinig  <sam@webkit.org>
20424
20425        Reviewed by Anders Carlsson.
20426
20427        Can't paste from 3rd party text editor into WebKit2 window.
20428        <rdar://problem/8978624>
20429
20430        * WebProcess/com.apple.WebProcess.sb:
20431
204322011-02-21  Anders Carlsson  <andersca@apple.com>
20433
20434        Reviewed by Dan Bernstein.
20435
20436        Initialize DrawingAreaProxy::m_size
20437        https://bugs.webkit.org/show_bug.cgi?id=54913
20438
20439        This was removed in r76962 since it caused flashes when switching drawing areas due to
20440        entering and exiting composited mode, but since we no longer switch drawing areas we can
20441        put it back.
20442
20443        * UIProcess/DrawingAreaProxy.cpp:
20444        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
20445
204462011-02-21  Adam Roben  <aroben@apple.com>
20447
20448        Add some assertions about the state IDs we receive from the web process
20449
20450        Rubber-stamped by Anders Carlsson.
20451
20452        * UIProcess/DrawingAreaProxyImpl.cpp:
20453        (WebKit::DrawingAreaProxyImpl::update):
20454        (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
20455        (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
20456        Assert that the state ID the web process sent us is no newer than our own state ID.
20457
204582011-02-21  Adam Roben  <aroben@apple.com>
20459
20460        Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID".
20461
20462        As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes
20463        all operations performed before that state change to become invalid. Currently, this state
20464        consists of a single piece of data: the view's size. Eventually it will encompass more data
20465        (e.g., the backing store we're drawing into; when we start throwing away the backing store
20466        to save memory, our state will have changed, and any operations that were intended for the
20467        old backing store will have become invalid). r79251 effectively transformed
20468        DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl
20469        sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's
20470        size changes.
20471
20472        This patch is just a set of simple renames to reflect the transformation that r79251
20473        effected. It should not introduce any changes in behavior. The renames are:
20474          - Messages::DrawingArea::SetSize -> UpdateState
20475          - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState
20476          - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID
20477          - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState
20478          - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState
20479          - DrawingAreaImpl::m_inSetSize -> m_inUpdateState
20480          - generateSequenceNumber -> generateStateID
20481          - sequenceNumber -> stateID
20482
20483        Fixes <http://webkit.org/b/54911> DrawingArea[Proxy]Impl's "sequence number" concept should
20484        be renamed to "state ID"
20485
20486        Reviewed by Anders Carlsson.
20487
20488        * UIProcess/DrawingAreaProxy.h:
20489        * UIProcess/DrawingAreaProxy.messages.in:
20490        * UIProcess/DrawingAreaProxyImpl.cpp:
20491        * UIProcess/DrawingAreaProxyImpl.h:
20492        * WebProcess/WebPage/DrawingArea.h:
20493        * WebProcess/WebPage/DrawingArea.messages.in:
20494        * WebProcess/WebPage/DrawingAreaImpl.cpp:
20495        * WebProcess/WebPage/DrawingAreaImpl.h:
20496        Performed the renames described above.
20497
204982011-02-21  Alexey Proskuryakov  <ap@apple.com>
20499
20500        Reviewed by Adam Roben.
20501
20502        REGRESSION (WebKit2): HTTP requests time out after 60 seconds
20503        https://bugs.webkit.org/show_bug.cgi?id=54755
20504        <rdar://problem/9006592>
20505
20506        * Shared/API/c/WKURLRequest.cpp:
20507        (WKURLRequestSetDefaultTimeoutInterval):
20508        * Shared/API/c/WKURLRequest.h:
20509        Added an API to set a default timeout interval for requests created from URLs. The API
20510        affects both the UI process and requests created internally by the Web process. Requests
20511        created from NSURLRequest or CFURLRequest take timeout from those.
20512
20513        * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval):
20514        * Shared/WebURLRequest.h:
20515        Pipe the default timeout interval from WKURLRequest down to actual implementation. Since
20516        WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects
20517        NSURLRequest default timeout interval.
20518
20519        * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts):
20520        * UIProcess/WebProcessManager.h:
20521        Added a way to enumerate all contexts running in separate processes.
20522
20523        * Shared/WebProcessCreationParameters.cpp:
20524        (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
20525        (WebKit::WebProcessCreationParameters::encode):
20526        (WebKit::WebProcessCreationParameters::decode):
20527        * Shared/WebProcessCreationParameters.h:
20528        (WebKit::WebContext::ensureWebProcess):
20529        (WebKit::WebContext::setDefaultRequestTimeoutInterval):
20530        * UIProcess/WebContext.h:
20531        * WebProcess/WebProcess.cpp:
20532        (WebKit::WebProcess::initializeWebProcess):
20533        (WebKit::WebProcess::setDefaultRequestTimeoutInterval):
20534        * WebProcess/WebProcess.h:
20535        * WebProcess/WebProcess.messages.in:
20536        Use UI process default timeout interval in separate process contexts, too.
20537
205382011-02-18  Brian Weinstein  <bweinstein@apple.com>
20539
20540        Reviewed by Adam Roben.
20541
20542        WebResourceCacheManager should be responsible for managing the CFURLCache as well
20543        as the WebCore memory cache.
20544        https://bugs.webkit.org/show_bug.cgi?id=54886
20545        Part of <rdar://problem/8971738>
20546
20547        * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
20548        (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add
20549            create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache.
20550        (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for
20551            the origin's hostname.
20552        * WebProcess/ResourceCache/WebResourceCacheManager.h:
20553
20554        * WebProcess/ResourceCache/cf: Added.
20555        * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added.
20556        (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface.
20557        (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto.
20558
20559        * win/WebKit2.vcproj: Added new file.
20560        * WebKit2.xcodeproj/project.pbxproj: Ditto.
20561
205622011-02-21  Adam Roben  <aroben@apple.com>
20563
20564        Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl
20565
20566        DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed
20567        before that state change to become invalid. When painting, we need to have performed at
20568        least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits
20569        into the view.
20570
20571        Currently, this state consists of a single piece of data: the view's size. Whenever the
20572        state (i.e., size) changes, we tell the web process via the SetSize message, and the web
20573        process lets us know that it has updated to match the new state (i.e., size) via the
20574        DidSetSize message.
20575
20576        When it's time to paint, if we're waiting for the web process to update to match our current
20577        state (i.e., size), we block for a little while hoping to receive a DidSetSize message so
20578        that we can paint up-to-date bits into the window. This can cause us to receive messages
20579        out-of-order; the DidSetSize message will be processed immediately, and any messages that
20580        were sent before the DidSetSize message will be processed later. Since the messages from
20581        before the DidSetSize message correspond to an old state (i.e., size), they are no longer
20582        useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so
20583        we discard them.
20584
20585        The way we identify and discard these messages is by keeping track of a sequence number.
20586        Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to
20587        DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize
20588        message, it records the sequence number that came along with it. If we then later receive
20589        any messages that have a lower sequence number, we know they correspond to an old state
20590        (i.e., size) and can discard them.
20591
20592        This patch moves control of the sequence number to DrawingAreaProxyImpl.
20593        DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize
20594        message. DrawingAreaImpl records this sequence number when it receives the SetSize message,
20595        and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same
20596        as before.
20597
20598        This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a
20599        full backing store update (by incrementing the sequence number) at times other than when the
20600        view's size changes (e.g., after it has thrown away its backing store in order to save
20601        memory).
20602
20603        Fixes <http://webkit.org/b/54907> DrawingAreaProxyImpl should tell DrawingAreaImpl what
20604        sequence number to use
20605
20606        Reviewed by Anders Carlsson.
20607
20608        * UIProcess/DrawingAreaProxyImpl.cpp:
20609        (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp.
20610        (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the
20611        SetSize message.
20612        (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a
20613        potential improvement.
20614
20615        * WebProcess/WebPage/DrawingArea.h:
20616        (WebKit::DrawingArea::setSize): Updated to match the message's new parameters.
20617
20618        * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize.
20619
20620        * WebProcess/WebPage/DrawingAreaImpl.cpp:
20621        (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber.
20622        (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process.
20623
20624        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
20625        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
20626        (WebKit::DrawingAreaImpl::display):
20627        Send m_sequenceNumber, instead of a new sequence number, back to the UI process.
20628
20629        * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to
20630        match the base class.
20631
206322011-02-21  Gavin Barraclough  <barraclough@apple.com>
20633
20634        Reviewed by Sam Weinig.
20635
20636        Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
20637
20638        The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
20639        containing a pointer to its parent class. These links should reflect the inheritance
20640        hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
20641        entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
20642        since intervening C++ classes may not have ClassInfo - but would be a potential bug
20643        were ClassInfo were to be added.
20644
20645        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
20646
206472011-02-21  Balazs Kelemen  <kbalazs@webkit.org>
20648
20649        Reviewed by Kenneth Rohde Christiansen.
20650
20651        [Qt] Implement WorkQueue::sheduleWorkAfterDelay
20652        https://bugs.webkit.org/show_bug.cgi?id=54878
20653
20654        * Platform/qt/WorkQueueQt.cpp:
20655        (WorkQueue::scheduleWorkAfterDelay):
20656
206572011-02-20  Alejandro G. Castro  <alex@igalia.com>
20658
20659        Reviewed by Martin Robinson.
20660
20661        [GTK] Add WebResourceCacheDataManager to the compilation after r78848
20662        https://bugs.webkit.org/show_bug.cgi?id=54732
20663
20664        Added resource cache manager API to GTK+ compilation after r78848.
20665
20666        * GNUmakefile.am:
20667
206682011-02-20  Sam Weinig  <sam@webkit.org>
20669
20670        Reviewed by Dan Bernstein.
20671
20672        Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46
20673        <rdar://problem/8942726>
20674
20675        * WebProcess/WebPage/WebPage.cpp:
20676        (WebKit::WebPage::goForward):
20677        (WebKit::WebPage::goBack):
20678        (WebKit::WebPage::goToBackForwardItem):
20679        Defend agains null HistoryItems.
20680
206812011-02-20  Anders Carlsson  <andersca@apple.com>
20682
20683        Reviewed by Maciej Stachowiak.
20684
20685        Crash when a plug-in requests a javascript: url that destroys the plug-in
20686        https://bugs.webkit.org/show_bug.cgi?id=54837
20687        <rdar://problem/9005475>
20688
20689        * WebProcess/Plugins/PluginProxy.cpp:
20690        (WebKit::PluginProxy::destroy):
20691        Null out m_pluginController.
20692
20693        * WebProcess/Plugins/PluginView.cpp:
20694        (WebKit::PluginView::performJavaScriptURLRequest):
20695        Don't access the frame through m_pluginElement since it will be nulled out
20696        when the plug-in is destroyed.
20697
206982011-02-20  Anders Carlsson  <andersca@apple.com>
20699
20700        Reviewed by Sam Weinig.
20701
20702        Fix another crash when a plug-in is destroyed when evaluating JavaScript
20703        https://bugs.webkit.org/show_bug.cgi?id=54834
20704        <rdar://problem/9005475>
20705
20706        This contains three separate fixes:
20707
20708        - In unprotectPluginFromDestruction we can't just destroy the plug-in once
20709          the count reaches zero, because the plug-in might still have code executing
20710          on the stack. To fix this we use a zero-delay timer to defer destruction
20711          of the plug-in.
20712
20713        - Trying to get the NPObject for the window using NPN_GetValue would return
20714          NPERR_NO_ERROR, even if the returned NPObject was null. Fix this to return
20715          NPERR_GENERIC_ERROR instead.
20716
20717        - Protect the plug-in from destruction anytime an NPAPI call that sends a 
20718          synchronous IPC message is made.
20719
20720        * PluginProcess/PluginControllerProxy.cpp:
20721        (WebKit::PluginControllerProxy::PluginControllerProxy):
20722        (WebKit::PluginControllerProxy::destroy):
20723        (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
20724        * PluginProcess/PluginControllerProxy.h:
20725        * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
20726        (WebKit::PluginDestructionProtector::PluginDestructionProtector):
20727        (WebKit::NPN_GetValue):
20728        (WebKit::NPN_Evaluate):
20729        (WebKit::NPN_GetProperty):
20730        (WebKit::NPN_SetProperty):
20731        (WebKit::NPN_RemoveProperty):
20732        (WebKit::NPN_HasProperty):
20733        (WebKit::NPN_HasMethod):
20734        (WebKit::NPN_Enumerate):
20735        (WebKit::NPN_Construct):
20736        (WebKit::NPN_GetValueForURL):
20737        (WebKit::NPN_SetValueForURL):
20738
207392011-02-19  Sam Weinig  <sam@webkit.org>
20740
20741        Reviewed by Anders Carlsson.
20742
20743        Add phase in addition to momentumPhase to platform wheel events
20744        Part of <rdar://problem/8945362>
20745
20746        Rename existing phase to momentumPhase.
20747
20748        * Shared/WebEvent.h:
20749        (WebKit::WebWheelEvent::momentumPhase):
20750        * Shared/WebEventConversion.cpp:
20751        (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
20752        * Shared/WebWheelEvent.cpp:
20753        (WebKit::WebWheelEvent::WebWheelEvent):
20754        (WebKit::WebWheelEvent::encode):
20755        (WebKit::WebWheelEvent::decode):
20756        * Shared/mac/WebEventFactory.mm:
20757        (WebKit::phaseForEvent):
20758        (WebKit::momentumPhaseForEvent):
20759        (WebKit::WebEventFactory::createWebWheelEvent):
20760
207612011-02-19  Anders Carlsson  <andersca@apple.com>
20762
20763        Reviewed by Dan Bernstein.
20764
20765        Crash when trying to take a snapshot of an uninitialized plug-in
20766        https://bugs.webkit.org/show_bug.cgi?id=54812
20767
20768        * WebProcess/Plugins/PluginView.cpp:
20769        (WebKit::PluginView::notifyWidget):
20770        Don't try to create a snapshot of the plug-in if it hasn't been initialized.
20771
207722011-02-18  Gavin Barraclough  <barraclough@apple.com>
20773
20774        Reviewed by Sam Weinig.
20775
20776        Bug 54786 - Devirtualize JSCell::classInfo()
20777
20778        Instead of making a virtual function call, add a pointer to the ClassInfo
20779        onto Structure.
20780
20781        This removes a virtual function call, and paves the way towards removing all
20782        the createStructure methods, and StructureFlags/AnonymousSlotCount properties
20783        (these should be able to move onto ClassInfo).
20784
20785        Calls to Structure::create must now pass a pointer to the ClassInfo for the
20786        structure. All objects now have a ClassInfo pointer, non-object cell types
20787        still do not.
20788
20789        Changes are most mechanical, involving three steps:
20790            * Remove virtual classInfo() methods.
20791            * Add &s_info parameter to calls to Structure::create.
20792            * Rename ClassInfo static members on classes from 'info' to 's_info',
20793              for consistency.
20794
20795        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
20796        (WebKit::JSNPMethod::JSNPMethod):
20797        * WebProcess/Plugins/Netscape/JSNPMethod.h:
20798        (WebKit::JSNPMethod::createStructure):
20799        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
20800        (WebKit::JSNPObject::JSNPObject):
20801        * WebProcess/Plugins/Netscape/JSNPObject.h:
20802        (WebKit::JSNPObject::createStructure):
20803
208042011-02-19  Sam Weinig  <sam@webkit.org>
20805
20806        Reviewed by Anders Carlsson.
20807
20808        Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation
20809
20810        * UIProcess/API/mac/WKView.mm:
20811        (-[WKView performDictionaryLookupAtCurrentMouseLocation]):
20812        * UIProcess/API/mac/WKViewPrivate.h:
20813
208142011-02-19  Charlie Reis  <creis@chromium.org>
20815
20816        Reviewed by Mihai Parparita.
20817
20818        Ensure loading has stopped in HistoryController::goToItem
20819        https://bugs.webkit.org/show_bug.cgi?id=54517
20820
20821        Add a FrameLoaderClient callback for whether to stop loading before goToItem.
20822
20823        Test: http/tests/navigation/forward-to-fragment-fires-onload.html
20824
20825        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20826        (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
20827        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
20828
208292011-02-18  Sam Weinig  <sam@webkit.org>
20830
20831        Reviewed by Adele Peterson.
20832
20833        Real fix for <rdar://problem/9025723> CrashTracer: [USER] 
20834        1 crash in WebProcess at com.apple.WebKit2: 
20835        WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
20836
20837        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20838        (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
20839        Add null check for the FrameView. This function can be called when the
20840        FrameView is being torn down during a transition to a new FrameView.
20841
20842        * WebProcess/WebPage/WebPage.cpp:
20843        (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
20844        Revert last attempt.
20845
208462011-02-18  Anders Carlsson  <andersca@apple.com>
20847
20848        Reviewed by Sam Weinig.
20849
20850        Hang trying to load nytimes.com with Flash installed
20851        <rdar://problem/9018113> 
20852
20853        * Platform/CoreIPC/Connection.cpp:
20854        (CoreIPC::Connection::sendSyncMessage):
20855        Call beginWaitForSyncReply() before sending the message. Otherwise, in some cases we could
20856        have gotten back a synchronous request before calling beginWaitForSyncReply(), and then we wouldn't
20857        process it correctly. (Which would lead to the hang).
20858
208592011-02-18  Simon Fraser  <simon.fraser@apple.com>
20860
20861        Reviewed by Kevin Decker.
20862
20863        <rdar://problem/9021296> Some plug-ins are the wrong size after zooming
20864        
20865        Use the same frame/bounds adjustment that we use for NSView-based
20866        plugins in WebKit2, which allows plug-ins and their snapshots to
20867        render with the correct size after scaling.
20868
20869        * WebProcess/Plugins/PluginView.cpp:
20870        (WebKit::PluginView::setBoundsSize):
20871        (WebKit::PluginView::viewGeometryDidChange):
20872        (WebKit::PluginView::clipRectInWindowCoordinates):
20873        * WebProcess/Plugins/PluginView.h:
20874
208752011-02-18  Beth Dakin  <bdakin@apple.com>
20876
20877        Rubber-stamped by Adele Peterson.
20878
20879        Fix for <rdar://problem/9025723> CrashTracer: [USER] 
20880        1 crash in WebProcess at com.apple.WebKit2: 
20881        WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
20882
20883        Simple null-check.
20884        * WebProcess/WebPage/WebPage.cpp:
20885        (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
20886
208872011-02-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
20888
20889        Reviewed by Kenneth Rohde Christiansen.
20890
20891        Tiled backing store area is too big.
20892        Error in area calculcation causes size of backing store
20893        up to 8 times bigger than viewport with default multipliers.
20894        https://bugs.webkit.org/show_bug.cgi?id=54587
20895
20896        * UIProcess/TiledDrawingAreaProxy.cpp:
20897        (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
20898        (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
20899
209002011-02-18  John Sullivan  <sullivan@apple.com>
20901
20902        Reviewed by Maciej Stachowiak.
20903
20904        <rdar://problem/9026169>
20905        https://bugs.webkit.org/show_bug.cgi?id=54780
20906        pendingAPIRequestURL isn't updated for WKPageGoToBackForwardListItem
20907
20908        * UIProcess/WebPageProxy.cpp:
20909        (WebKit::WebPageProxy::goToBackForwardItem):
20910        Update the pending API URL.
20911
209122011-02-18  Anders Carlsson  <andersca@apple.com>
20913
20914        Reviewed by Sam Weinig.
20915
20916        Accelerated content fades in when using a layer backed WKView
20917        <rdar://problem/9021586>
20918
20919        * UIProcess/API/mac/WKView.mm:
20920        (-[WKView _enterAcceleratedCompositingMode:]):
20921        Make a new nested CATransaction and disable animations when adding the layer 
20922        hosting subview. This avoids an implicit fade animation that would otherwise occur.
20923
209242011-02-18  Simon Fraser  <simon.fraser@apple.com>
20925
20926        Reviewed by Dan Bernstein.
20927
20928        Plugin snapshot location is wrong for subframes
20929        https://bugs.webkit.org/show_bug.cgi?id=54776
20930        
20931        Only change the CTM to the way that the plugin expects it
20932        when painting the plugin, not when drawing the snapshot.
20933        This fixes the snapshot location when painting flattened
20934        frames.
20935
20936        * WebProcess/Plugins/PluginView.cpp:
20937        (WebKit::PluginView::paint):
20938
209392011-02-18  Anders Carlsson  <andersca@apple.com>
20940
20941        Reviewed by Simon Fraser.
20942
20943        Implement NetscapePlugin::pluginComplexTextInputIdentifier
20944        https://bugs.webkit.org/show_bug.cgi?id=54770
20945
20946        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
20947        (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
20948
209492011-02-18  Sam Weinig  <sam@webkit.org>
20950
20951        Reviewed by Maciej Stachowiak.
20952
20953        Add the ability to ask the WKPage if the main frame is pinned
20954        to the right or left hand side.
20955        Part of <rdar://problem/9017043>.
20956
20957        * UIProcess/API/C/WKPage.cpp:
20958        (WKPageIsPinnedToLeftSide):
20959        (WKPageIsPinnedToRightSide):
20960        * UIProcess/API/C/WKPage.h:
20961        Add new API calls.
20962
20963        * UIProcess/WebPageProxy.cpp:
20964        (WebKit::WebPageProxy::WebPageProxy):
20965        (WebKit::WebPageProxy::close):
20966        (WebKit::WebPageProxy::processDidCrash):
20967        (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
20968        * UIProcess/WebPageProxy.h:
20969        (WebKit::WebPageProxy::isPinnedToLeftSide):
20970        (WebKit::WebPageProxy::isPinnedToRightSide):
20971        Initialize, reset and update the pinned state.
20972
20973        * UIProcess/WebPageProxy.messages.in:
20974        Add message to update the pinned state.
20975
20976        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
20977        (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
20978        * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
20979        * WebProcess/WebPage/WebPage.cpp:
20980        (WebKit::WebPage::WebPage):
20981        (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
20982        * WebProcess/WebPage/WebPage.h:
20983        Cache the pinned state, and only update the UIProcess when it
20984        changes.
20985
209862011-02-18  Anders Carlsson  <andersca@apple.com>
20987
20988        Reviewed by Simon Fraser.
20989
20990        Fix assertion in SharedMemory::create when trying to snapshot 0x0 plug-in
20991        https://bugs.webkit.org/show_bug.cgi?id=54768
20992
20993        * PluginProcess/PluginControllerProxy.cpp:
20994        (WebKit::PluginControllerProxy::snapshot):
20995        Don't try to create a handle from a null ShareableBitmap.
20996
20997        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
20998        (WebKit::NetscapePlugin::snapshot):
20999        Check for a zero sized plug-in before trying to create a snapshot.
21000
210012011-02-18  Anders Carlsson  <andersca@apple.com>
21002
21003        Reviewed by Simon Fraser.
21004
21005        WKView flashes when entering/exiting compositing mode
21006        https://bugs.webkit.org/show_bug.cgi?id=54695
21007        <rdar://problem/9011554>
21008
21009        * UIProcess/API/mac/WKView.mm:
21010        (-[WKView _exitAcceleratedCompositingMode]):
21011        Remove the layer hosting view before clearing out its layer, otherwise we can get
21012        white flashes when exiting accelerated compositing mode.
21013
21014        * WebProcess/WebPage/DrawingAreaImpl.cpp:
21015        When entering accelerated compositing mode, we want to defer sending the message
21016        until we've actually committed the layer tree and pushed all changes over to the
21017        UI process.
21018
21019        (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
21020        Tell the layer tree host to force a repaint. This will ensure that all layer tree
21021        changes are pushed over to the UI process. When that is done, send the new layer tree
21022        context over to the UI process.
21023
21024        (WebKit::DrawingAreaImpl::setRootCompositingLayer):
21025        When exiting compositing mode in response to a didSetSize, we want to exit accelerated 
21026        compositing mode right away to avoid flashes. This is safe since we've laid out the page
21027        already so we won't end up reentering setRootCompositingLayer.
21028
21029        (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
21030        Tell the layer tree host to notify us when the next layer tree flush happened, so we can
21031        let the UI process know. If we're entering accelerated compositing mode in response to a
21032        SetSize message, the new layer tree context will be passed in the DidSetSize message.
21033
21034        * WebProcess/WebPage/DrawingAreaImpl.h:
21035        Add layerHostDidFlushLayers.
21036
21037        * WebProcess/WebPage/LayerTreeHost.h:
21038        Add setShouldNotifyAfterNextScheduledLayerFlush.
21039
21040        * WebProcess/WebPage/mac/LayerTreeHostMac.h:
21041        Add a m_notifyAfterScheduledLayerFlush flag.
21042
21043        * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
21044        (WebKit::LayerTreeHostMac::LayerTreeHostMac):
21045        Initialize m_notifyAfterScheduledLayerFlush to false.
21046
21047        (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
21048        Set m_notifyAfterScheduledLayerFlush to true.
21049
21050        (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
21051        If m_notifyAfterScheduledLayerFlush is true, call DrawingAreaImpl::layerHostDidFlushLayers.
21052
210532011-02-18  Alexey Proskuryakov  <ap@apple.com>
21054
21055        Reviewed by Adele Peterson.
21056
21057        REGRESSION (WebKit2): Wrong frame printed on tivofaq.com
21058        https://bugs.webkit.org/show_bug.cgi?id=54677
21059        <rdar://problem/8994133>
21060
21061        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
21062        (WebKit::area): Use visible frame bounds.
21063        (WebKit::findLargestFrameInFrameSet): Added a comment explaining what we're up to here.
21064        WebKit2 shouldn't be making policy decisions for the client, but it gets dangerously close
21065        to that. We used to expose the same as WK1 API though.
21066
210672011-02-18  Balazs Kelemen  <kbalazs@webkit.org>
21068
21069        Unreviwed.
21070
21071        Remove CleanupHandler since we do not use it anymore.
21072
21073        * Shared/qt/CleanupHandler.cpp: Removed.
21074        * Shared/qt/CleanupHandler.h: Removed.
21075
210762011-02-18  Alejandro G. Castro  <alex@igalia.com>
21077
21078        Fix GTK build by fixing signature of platformPaint(), required after r78956.
21079
21080        * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
21081        (WebKit::NetscapePlugin::platformPaint):
21082
210832011-02-17  Dan Bernstein  <mitz@apple.com>
21084
21085        LLVM Compiler build fix.
21086
21087        * UIProcess/WebResourceCacheManagerProxy.h:
21088        * WebProcess/ResourceCache/WebResourceCacheManager.h:
21089
210902011-02-17  Simon Fraser  <simon.fraser@apple.com>
21091
21092        Fix Windows and Qt builds by fixing signature of platformPaint().
21093
21094        * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
21095        (WebKit::NetscapePlugin::platformPaint):
21096        * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
21097        (WebKit::NetscapePlugin::platformPaint):
21098
210992011-02-17  Simon Fraser  <simon.fraser@apple.com>
21100
21101        Reviewed by Sam Weinig.
21102
21103        WebKit2 snapshots don't show plug-ins
21104        https://bugs.webkit.org/show_bug.cgi?id=54716
21105        
21106        Fix WebKit2 plug-ins to do a software paint for
21107        snapshotting.
21108
21109        * PluginProcess/PluginControllerProxy.h:
21110        * PluginProcess/PluginControllerProxy.cpp:
21111        (WebKit::PluginControllerProxy::snapshot): Respond to the snapshot
21112        message by getting a sharable bitmap from the plugin, and returning
21113        a handle to it in the reply.
21114
21115        * PluginProcess/PluginControllerProxy.messages.in: Add the snapshot
21116        message.
21117        
21118        * Shared/Plugins/PluginQuirks.h:
21119        * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
21120        (WebKit::NetscapePluginModule::determineQuirks): Add a quirk for the
21121        ability to be snapshotted, which we only set for Flash at the moment.
21122        
21123        * WebProcess/Plugins/Netscape/NetscapePlugin.h:
21124        * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
21125        (WebKit::NetscapePlugin::snapshot): Create a shareable bitmap, and
21126        paint into it.
21127        (WebKit::NetscapePlugin::supportsSnapshotting): Test the quirk.
21128
21129        * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
21130        (WebKit::NetscapePlugin::platformPaint): Allow the paint to happen
21131        if we're snapshotting, even when using the CoreAnimation drawing
21132        model.
21133        
21134        * WebProcess/Plugins/Plugin.h: New snapshot method.
21135        
21136        * WebProcess/Plugins/PluginProxy.h:
21137        * WebProcess/Plugins/PluginProxy.cpp:
21138        (WebKit::PluginProxy::snapshot): Send a sync message to the plugin process,
21139        asking for a snapshot in a shareble bitmap.
21140        
21141        * WebProcess/Plugins/PluginView.h:
21142        * WebProcess/Plugins/PluginView.cpp:
21143        (WebKit::PluginView::paint): Use the snapshot if we have one, to avoid
21144        calling into the plugin to draw, which may run script.
21145        
21146        (WebKit::PluginView::notifyWidget): Generate the snapshot before
21147        a flattening paint, and throw it away after.
21148
211492011-02-17  Jessie Berlin  <jberlin@apple.com>
21150
21151        Reviewed by Adam Roben.
21152
21153        WebKit2: The CFNetwork Cache should be shared between the UI Process and the Web Process on
21154        Windows.
21155        https://bugs.webkit.org/show_bug.cgi?id=54683
21156
21157        * Shared/WebProcessCreationParameters.cpp:
21158        (WebKit::WebProcessCreationParameters::encode):
21159        (WebKit::WebProcessCreationParameters::decode):
21160        * Shared/WebProcessCreationParameters.h:
21161 
21162        * UIProcess/win/WebContextWin.cpp:
21163        (WebKit::WebContext::platformInitializeWebProcess):
21164        Make sure to remove the ending slash, as CFNetwork does not recognize the directory with
21165        that slash.
21166
21167        * WebProcess/win/WebProcessWin.cpp:
21168        (WebKit::WebProcess::platformInitializeWebProcess):
21169        Create a cache using the path, disk capacity, and memory capacity and set it as default.
21170
211712011-02-17  Anders Carlsson  <andersca@apple.com>
21172
21173        Reviewed by Sam Weinig.
21174
21175        Web and/or plug-in process crashes when NPN_Evaluate destroys the plug-in
21176        https://bugs.webkit.org/show_bug.cgi?id=54686
21177        <rdar://problem/9013384>
21178
21179        This patch fixes two bugs with a plug-in calling NPN_Evaluate to destroy itself:
21180
21181        - The PluginProxy object would be destroyed in the middle of PluginProxy::evaluate.
21182          This would cause the web process to crash.
21183
21184        - The PluginControllerProxy would call NPP_Destroy while the plug-in was busy running
21185          code. This would cause the plug-in process to crash.
21186
21187        To fix this, we add protectPluginFromDestruction/unprotectPluginFromDestruction to
21188        PluginControllerProxy and use it to defer calling destroy() in the plug-in process,
21189        and defer actually destroying the plug-in in the web process.
21190
21191        https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding a test for this.
21192
21193        * PluginProcess/PluginControllerProxy.cpp:
21194        (WebKit::PluginControllerProxy::PluginControllerProxy):
21195        (WebKit::PluginControllerProxy::destroy):
21196        (WebKit::PluginControllerProxy::evaluate):
21197        (WebKit::PluginControllerProxy::protectPluginFromDestruction):
21198        (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
21199        * PluginProcess/PluginControllerProxy.h:
21200        (WebKit::PluginControllerProxy::asPluginController):
21201        * PluginProcess/WebProcessConnection.cpp:
21202        (WebKit::WebProcessConnection::destroyPluginControllerProxy):
21203        (WebKit::WebProcessConnection::didReceiveMessage):
21204        (WebKit::WebProcessConnection::didReceiveSyncMessage):
21205        * PluginProcess/WebProcessConnection.h:
21206        (WebKit::WebProcessConnection::connection):
21207        * WebProcess/Plugins/PluginController.h:
21208        (WebKit::PluginController::PluginDestructionProtector::PluginDestructionProtector):
21209        (WebKit::PluginController::PluginDestructionProtector::~PluginDestructionProtector):
21210        * WebProcess/Plugins/PluginProxy.cpp:
21211        (WebKit::PluginProxy::evaluate):
21212        * WebProcess/Plugins/PluginView.cpp:
21213        (WebKit::PluginView::protectPluginFromDestruction):
21214        (WebKit::PluginView::unprotectPluginFromDestruction):
21215        * WebProcess/Plugins/PluginView.h:
21216
212172011-02-17  Sam Weinig  <sam@webkit.org>
21218
21219        Build fix.
21220
21221        * WebProcess/WebPage/mac/WebPageMac.mm:
21222        (WebKit::WebPage::performDictionaryLookupAtLocation):
21223
212242011-02-17  Sam Weinig  <sam@webkit.org>
21225
21226        Reviewed by Maciej Stachowiak.
21227
21228        WebKit2: Support Dictionary popup
21229        <rdar://problem/7660670>
21230
21231        * Shared/TextInfo.cpp: Added.
21232        (WebKit::TextInfo::encode):
21233        (WebKit::TextInfo::decode):
21234        * Shared/TextInfo.h: Added.
21235        (WebKit::TextInfo::TextInfo):
21236        Add class to represent the location and style of a run of text.
21237
21238        * UIProcess/PageClient.h:
21239        * UIProcess/API/mac/PageClientImpl.h:
21240        * UIProcess/API/mac/PageClientImpl.mm:
21241        (WebKit::PageClientImpl::didPerformDictionaryLookup):
21242        Invoke the dictionary popup.
21243
21244        * UIProcess/API/mac/WKView.mm:
21245        (-[WKView performLookupAtCurrentMouseLocation]):
21246        Tell the WebProcess to get get the text under the mouse and cause
21247        the dictionary popup to appear.
21248
21249        * UIProcess/API/mac/WKViewPrivate.h:
21250        Add performLookupAtCurrentMouseLocation.
21251
21252        * UIProcess/WebPageProxy.cpp:
21253        (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
21254        (WebKit::WebPageProxy::didPerformDictionaryLookup):
21255        * UIProcess/WebPageProxy.h:
21256        * UIProcess/WebPageProxy.messages.in:
21257        * WebProcess/WebPage/WebPage.cpp:
21258        * WebProcess/WebPage/WebPage.h:
21259        * WebProcess/WebPage/WebPage.messages.in:
21260        Pipe messages through.
21261
21262        * WebProcess/WebPage/mac/WebPageMac.mm:
21263        (WebKit::characterRangeAtPoint): Fix to return PassRefPtr
21264        and not potentially stale pointers.
21265
21266        (WebKit::WebPage::characterIndexForPoint):
21267        Change to use a RefPtr.
21268
21269        (WebKit::WebPage::performDictionaryLookupAtLocation):
21270        Add simple heuristic to get the word at the current point (or the current selection
21271        if it is at that point) and grab the style of the word to send the UIProcess.
21272
21273        * WebKit2.pro:
21274        * WebKit2.xcodeproj/project.pbxproj:
21275        * win/WebKit2.vcproj:
21276        Add new files.
21277
212782011-02-17  Brian Weinstein  <bweinstein@apple.com>
21279
21280        Qt build fix.
21281
21282        * WebKit2.pro: Update after renaming of MemoryCache to ResourceCache.
21283
212842011-02-17  Brian Weinstein  <bweinstein@apple.com>
21285
21286        Mac build fix.
21287
21288        * WebKit2.xcodeproj/project.pbxproj: Use relative to group instead of absolute paths. Not everyone's home
21289            directory is /Users/brian_weinstein.
21290
212912011-02-16  Brian Weinstein  <bweinstein@apple.com>
21292
21293        Reviewed by Brady Eidson.
21294
21295        WebKit2: Need a way to manage the WebCore Cache
21296        https://bugs.webkit.org/show_bug.cgi?id=54501
21297        
21298        Implement a WebKit2 API to manage the WebCore memory cache. This API exposes three functions:
21299        
21300        1) A method to get a list of all security origins that have entries in the WebCore memory cache.
21301        2) A method to remove all entries in the WebCore memory cache from a SecurityOrigin.
21302        3) A method to remove all entries from the WebCore memory cache.
21303
21304        * Platform/CoreIPC/MessageID.h: Add two new MessageClasses.
21305        * Shared/API/c/WKBase.h:
21306        * Shared/APIObject.h: Add a CacheManager type.
21307        * Shared/WebSecurityOrigin.h: Typedef WKCacheManagerRef.
21308        (WebKit::WebSecurityOrigin::createFromString): Creates a WebCore::SecurityOrigin using 
21309            SecurityOrigin::createFromString.
21310        (WebKit::WebSecurityOrigin::toString): Calls through to SecurityOrigin::toString.
21311        * UIProcess/API/C/WKAPICast.h:
21312
21313        * UIProcess/API/C/WKCacheManager.cpp: Added.
21314        (WKCacheManagerGetTypeID): Returns the WebResourceCacheManagerProxy type.
21315        (WKCacheManagerGetCacheOrigins): Calls through to WebResourceCacheManagerProxy::getCacheOrigins.
21316        (callGetCacheOriginsBlockBlockAndDispose):
21317        (WKCacheManagerGetCacheOrigins_b):
21318        (WKCacheManagerDeleteCacheForOrigin): Calls through to WebResourceCacheManagerProxy::deleteCacheForOrigin.
21319        (WKCacheManagerDeleteAllCache): Calls through to WebResourceCacheManagerProxy::deleteAllCache.
21320        * UIProcess/API/C/WKCacheManager.h: Added.
21321
21322        * UIProcess/API/C/WKContext.cpp:
21323        (WKContextGetCacheManager): Calls to get the WebResourceCacheManagerProxy.
21324        * UIProcess/API/C/WKContext.h:
21325
21326        * UIProcess/WebResourceCacheManagerProxy.cpp: Added.
21327        (WebKit::WebResourceCacheManagerProxy::create): Calls through to the constructor.
21328        (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Initialize the m_webContext variable.
21329        (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy):
21330        (WebKit::WebResourceCacheManagerProxy::invalidate): Invalidate the callback map.
21331        (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Call through to the web process to get the cache
21332            origins.
21333        (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Call the callback.
21334        (WebKit::WebResourceCacheManagerProxy::deleteCacheForOrigin): Call through to the web process to delete cache
21335            for the given origin. 
21336        (WebKit::WebResourceCacheManagerProxy::deleteAllCache): Call through to the web process to delete all of the cache.
21337        * UIProcess/WebResourceCacheManagerProxy.h: Added.
21338        (WebKit::WebResourceCacheManagerProxy::clearContext):
21339        (WebKit::WebResourceCacheManagerProxy::type):
21340        * UIProcess/WebResourceCacheManagerProxy.messages.in: Added.
21341
21342        * UIProcess/WebContext.cpp:
21343        (WebKit::WebContext::WebContext): Initialize new member variable.
21344        (WebKit::WebContext::~WebContext):  Invalidates new member variable.
21345        (WebKit::WebContext::didReceiveMessage): Passes cache messages to the cache manager.
21346        * UIProcess/WebContext.h:
21347        (WebKit::WebContext::cacheManagerProxy):
21348        * UIProcess/WebProcessProxy.cpp:
21349        (WebKit::WebProcessProxy::didReceiveMessage): Add a new message class.
21350
21351        * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Added.
21352        (WebKit::WebResourceCacheManager::shared):
21353        (WebKit::WebResourceCacheManager::WebResourceCacheManager):
21354        (WebKit::WebResourceCacheManager::~WebResourceCacheManager):
21355        (WebKit::WebResourceCacheManager::didReceiveMessage): Calls through to didReceiveWebResourceCacheManagerMessage.
21356        (WebKit::WebResourceCacheManager::getCacheOrigins): Gets a list of origins with cache entries from the memory
21357            cache, and puts them into a vector to send to the UI process.
21358        (WebKit::WebResourceCacheManager::deleteCacheForOrigin): Calls through to ResourceCache to delete all cache entries
21359            from a given origin.
21360        (WebKit::WebResourceCacheManager::deleteAllCache):
21361        * WebProcess/ResourceCache/WebResourceCacheManager.h: Added.
21362        * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Added.
21363
21364        * WebProcess/WebProcess.cpp:
21365        (WebKit::WebProcess::didReceiveMessage):
21366        (WebKit::WebProcess::clearResourceCaches): Tell the memory cache to evict its resources. This was done on WebKit1, 
21367            but not WebKit2.
21368        * WebProcess/WebProcess.h:
21369        
21370        * WebKit2.xcodeproj/project.pbxproj: Added new files.
21371        * win/WebKit2.vcproj: Ditto.
21372        * win/WebKit2Common.vsprops: Added new include directory.
21373        * win/WebKit2Generated.make: Added new header.
21374
213752011-02-16  David Hyatt  <hyatt@apple.com>
21376
21377        Reviewed by Dan Bernstein.
21378
21379        https://bugs.webkit.org/show_bug.cgi?id=54244
21380        
21381        Convert the line box tree to floating point and eliminate font rounding hacks.  This patch removes all of the rounding
21382        hacks from the Font code and makes sure all Font APIs involving width measurement and width offsets use floats.
21383        
21384        The line box tree's x, y and logicalWidth members have all been converted to floats and all of the line box APIs have
21385        been changed as well.
21386        
21387        In terms of pixel adjustments, overflow is using an enclosing model (so it will be enclosingIntRect of a line box's x/y/width/height).
21388        
21389        Background and border painting is using a rounding model, so borders and backgrounds will round to the nearest pixel when painting.
21390        
21391        Replaced elements still snap to integer positions on lines, and they use a rounding model as well, although their underlying line boxes
21392        still have a precise floating point position.
21393
21394        Justification will now allow subpixel positioning to occur as well.  Platforms that don't support subpixel positioning should already
21395        be rounding justification spacing in their font code.
21396
21397        Many layout test results change on Mac, since rounding hacks were used there and are now gone.
21398
21399        * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
21400        (WebKit::WebPopupMenu::setUpPlatformData):
21401
214022011-02-10  Luiz Agostini  <luiz.agostini@openbossa.org>
21403
21404        Reviewed by Adam Roben.
21405
21406        HTML5 <details> and <summary>: localized text
21407        https://bugs.webkit.org/show_bug.cgi?id=54260
21408
21409        The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
21410        provide the default label to be used by a <details> tag that has no <summary> child.
21411
21412        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
21413        (WebKit::WebPlatformStrategies::defaultDetailsSummaryText):
21414        * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
21415
214162011-02-17  Adam Roben  <aroben@apple.com>
21417
21418        Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl
21419
21420        Fixes <http://webkit.org/b/54646> <rdar://problem/9016889> Assertion failure in
21421        FrameView::paintContents when calling WKPageForceRepaint on a page that uses accelerated
21422        compositing
21423
21424        Reviewed by Anders Carlsson.
21425
21426        * WebProcess/WebPage/DrawingAreaImpl.cpp:
21427        (WebKit::DrawingAreaImpl::forceRepaint): Lay out before we do anything else.
21428
214292011-02-17  Alejandro G. Castro  <alex@igalia.com>
21430
21431        Reviewed by Martin Robinson.
21432
21433        [GTK] Add WKPluginSiteDataManager.cpp compilation after r78647
21434        https://bugs.webkit.org/show_bug.cgi?id=54564
21435
21436        * GNUmakefile.am: Added files to compilation.
21437        * Shared/Plugins/Netscape/NetscapePluginModule.h: used
21438        npruntime_internal.h in the include to avoid problems with X
21439        types.
21440        * WebProcess/WebProcess.cpp:
21441        (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): fixed
21442        ambiguous reference to Font caused by the X headers required by
21443        the plugins.
21444
214452011-02-16  Matthew Delaney  <mdelaney@apple.com>
21446
21447        Reviewed by Simon Fraser.
21448
21449        Allow acceleratesDrawing for WebKit2
21450        https://bugs.webkit.org/show_bug.cgi?id=54511
21451
21452        Plumb through preference for accelerated drawing.
21453        
21454        If accelerated drawing is enabled, keep the DrawingAreaImpl in
21455        accelerated compositing mode.
21456
21457        * Shared/WebPreferencesStore.h:
21458        * UIProcess/API/C/WKPreferences.cpp:
21459        (WKPreferencesSetAcceleratedDrawingEnabled):
21460        (WKPreferencesGetAcceleratedDrawingEnabled):
21461        * UIProcess/API/C/WKPreferencesPrivate.h:
21462        * WebProcess/WebPage/DrawingAreaImpl.cpp:
21463        (WebKit::DrawingAreaImpl::DrawingAreaImpl):
21464        (WebKit::DrawingAreaImpl::setRootCompositingLayer):
21465        (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
21466        * WebProcess/WebPage/DrawingAreaImpl.h:
21467        * WebProcess/WebPage/WebPage.cpp:
21468        (WebKit::WebPage::updatePreferences):
21469
214702011-02-16  Yael Aharon  <yael.aharon@nokia.com>
21471
21472        Reviewed by Andreas Kling.
21473
21474        [Qt] White screen is displayed when tiled backing store is enabled in MiniBrowser.
21475        https://bugs.webkit.org/show_bug.cgi?id=54583
21476
21477        Make sure to invalidate all the tiles, including the last one.
21478
21479        * UIProcess/TiledDrawingAreaProxy.cpp:
21480        (WebKit::TiledDrawingAreaProxy::invalidate):
21481
214822011-02-16  Yael Aharon  <yael.aharon@nokia.com>
21483
21484        Reviewed by Andreas Kling.
21485
21486        [Qt] Tiles are not created for webkit2 after r77286.
21487        https://bugs.webkit.org/show_bug.cgi?id=54577
21488
21489        When using the default tile size of 1024x1024, only one tile is created.
21490        Make sure to create this tile by undoing what seems to be a typo in r77286.
21491
21492        * UIProcess/TiledDrawingAreaProxy.cpp:
21493        (WebKit::TiledDrawingAreaProxy::paint):
21494        (WebKit::TiledDrawingAreaProxy::createTiles):
21495
21496== Rolled over to ChangeLog-2011-02-16 ==
21497