[Windows WebKit2] Use cookies set in WebKit1
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-05-12  Jessie Berlin  <jberlin@apple.com>
2
3         Reviewed by Darin Adler.
4
5         [Windows WebKit2] Use cookies set in WebKit1
6         https://bugs.webkit.org/show_bug.cgi?id=60274
7
8         Properly handle the case where there is no serialized default storage session by not trying
9         to encode or decode 0, while still making sure to decode any valid storage session.
10
11         * Shared/WebProcessCreationParameters.cpp:
12         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
13         (WebKit::WebProcessCreationParameters::encode):
14         Only encode the storage session if there is one to encode.
15         (WebKit::WebProcessCreationParameters::decode):
16         Only decode the storage session there is one to decode.
17         * Shared/WebProcessCreationParameters.h:
18
19 2011-05-11  Brian Weinstein  <bweinstein@apple.com>
20
21         Reviewed by Anders Carlsson.
22
23         After relaunching an unresponsive web process, web page stops responding to mouse movement
24         https://bugs.webkit.org/show_bug.cgi?id=60669
25         <rdar://problem/9409934>
26
27         * UIProcess/WebPageProxy.cpp:
28         (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess
29             crashes.
30
31 2011-05-10  Tony Gentilcore  <tonyg@chromium.org>
32
33         Reviewed by Darin Adler.
34
35         Perform some forward declarations suggested by include-what-you-use
36         https://bugs.webkit.org/show_bug.cgi?id=60545
37
38         * WebProcess/WebPage/mac/WebPageMac.mm:
39
40 2011-05-12  Carlos Garcia Campos  <cgarcia@igalia.com>
41
42         Reviewed by Martin Robinson.
43
44         Fix the build with ENABLE_PLUGIN_PROCESS
45         https://bugs.webkit.org/show_bug.cgi?id=60628
46
47         * WebProcess/Plugins/PluginProxy.cpp:
48         (WebKit::PluginProxy::initialize): Move the call to
49         pluginController->isAcceleratedCompositingEnabled() to a #ifdef block.
50         * WebProcess/Plugins/PluginProxy.h: Add include for <WebCore/IntRect.h>.
51
52 2011-05-11  Damian Kaleta  <dkaleta@apple.com>
53
54         Reviewed by Brady Eidson.
55
56         Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history
57         https://bugs.webkit.org/show_bug.cgi?id=60674
58
59         * UIProcess/API/C/WKPage.cpp:
60         (WKPageTryRestoreScrollPosition):
61         * UIProcess/API/C/WKPage.h:
62         * UIProcess/WebPageProxy.cpp:
63         (WebKit::WebPageProxy::tryRestoreScrollPosition):
64         * UIProcess/WebPageProxy.h:
65         * WebProcess/WebPage/WebPage.cpp:
66         (WebKit::WebPage::tryRestoreScrollPosition):
67         * WebProcess/WebPage/WebPage.h:
68         * WebProcess/WebPage/WebPage.messages.in:
69
70 2011-05-11  Sam Weinig  <sam@webkit.org>
71
72         Reviewed by Gavin Barraclough.
73
74         WebKit2 doesn't build on Mac with strict PassOwnPtr
75         https://bugs.webkit.org/show_bug.cgi?id=60655
76
77         * Platform/CoreIPC/HandleMessage.h:
78         (CoreIPC::handleMessageDelayed):
79         Add explicit adoptPtr to indicate that the constructor is taking ownership.
80
81 2011-05-11  Jessie Berlin  <jberlin@apple.com>
82
83         Reviewed by Steve Falkenburg.
84
85         [Windows WebKit2] Use cookies set in WebKit1
86         https://bugs.webkit.org/show_bug.cgi?id=60274
87
88         Share the default storage session between the UI and Web Processes.
89
90         * Shared/WebProcessCreationParameters.cpp:
91         (WebKit::WebProcessCreationParameters::encode):
92         Only encode the session parameter if it is valid.
93         (WebKit::WebProcessCreationParameters::decode):
94         Don't try to decode a null session data. 
95         * Shared/WebProcessCreationParameters.h:
96         Add a parameter for a serialized default storage session, used only on Windows.
97
98         * Shared/win/WebCoreArgumentCodersWin.cpp:
99         (CoreIPC::decodeResourceRequest):
100         Make sure to set the current storage session on any requests used by the Web
101         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
102         doing anything with the Web Process's default storage session.
103
104         * UIProcess/win/WebContextWin.cpp:
105         (WebKit::WebContext::platformInitializeWebProcess):
106         Serialize the default storage session in the UI Process and add it to the
107         WebProcessCreationParameters.
108
109         * WebProcess/WebPage/win/WebPageWin.cpp:
110         (WebKit::cachedResponseForURL):
111         Use the cache associated with the current storage session and make sure the request has the
112         current storage session set on it before doing anything with it.
113
114         * WebProcess/win/WebProcessWin.cpp:
115         (WebKit::WebProcess::platformSetCacheModel):
116         Use the default storage session.
117         (WebKit::WebProcess::platformClearResourceCaches):
118         Ditto.
119         (WebKit::WebProcess::platformInitializeWebProcess):
120         Deserialize the default storage session passed in by the UI Process and hand it to the
121         ResourceHandle.
122
123 2011-05-11  Jia Pu  <jpu@apple.com>
124
125         Reviewed by Darin Adler.
126
127         CorrectionPanel sometimes hangs in dismissSoon().
128         https://bugs.webkit.org/show_bug.cgi?id=60599
129         <rdar://problem/9313628>
130
131         Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal
132         to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal,
133         for condition checking.
134
135         * UIProcess/mac/CorrectionPanel.h:
136         * UIProcess/mac/CorrectionPanel.mm:
137         (WebKit::CorrectionPanel::CorrectionPanel):
138         (WebKit::CorrectionPanel::show):
139         (WebKit::CorrectionPanel::dismissSoon):
140         (WebKit::CorrectionPanel::dismissInternal):
141         (WebKit::CorrectionPanel::handleAcceptedReplacement):
142
143 2011-05-11  Sheriff Bot  <webkit.review.bot@gmail.com>
144
145         Unreviewed, rolling out r86255.
146         http://trac.webkit.org/changeset/86255
147         https://bugs.webkit.org/show_bug.cgi?id=60660
148
149         REGRESSION (r86255): Lots of tests crashing in
150         CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release
151         (WebKit2 Tests) (Requested by aroben on #webkit).
152
153         * Shared/WebProcessCreationParameters.cpp:
154         (WebKit::WebProcessCreationParameters::encode):
155         (WebKit::WebProcessCreationParameters::decode):
156         * Shared/WebProcessCreationParameters.h:
157         * Shared/win/WebCoreArgumentCodersWin.cpp:
158         (CoreIPC::decodeResourceRequest):
159         * UIProcess/win/WebContextWin.cpp:
160         (WebKit::WebContext::platformInitializeWebProcess):
161         * WebProcess/WebPage/win/WebPageWin.cpp:
162         (WebKit::cachedResponseForURL):
163         * WebProcess/win/WebProcessWin.cpp:
164         (WebKit::WebProcess::platformSetCacheModel):
165         (WebKit::WebProcess::platformClearResourceCaches):
166         (WebKit::WebProcess::platformInitializeWebProcess):
167
168 2011-05-11  Adam Roben  <aroben@apple.com>
169
170         Don't notify the plugin when a targeted javascript: URL request completes
171
172         This matches Mozilla and WebKit1.
173
174         Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
175         plugin doesn't appear on a hanes.com page
176
177         Test: plugins/get-targeted-javascript-url.html
178
179         Reviewed by Anders Carlsson.
180
181         * WebProcess/Plugins/PluginView.cpp:
182         (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
183         request had a target.
184
185 2011-05-11  Jessie Berlin  <jberlin@apple.com>
186
187         Reviewed by Steve Falkenburg.
188
189         [Windows WebKit2] Use cookies set in WebKit1
190         https://bugs.webkit.org/show_bug.cgi?id=60274
191
192         Share the default storage session between the UI and Web Processes.
193
194         * Shared/WebProcessCreationParameters.cpp:
195         (WebKit::WebProcessCreationParameters::encode):
196         (WebKit::WebProcessCreationParameters::decode):
197         * Shared/WebProcessCreationParameters.h:
198         Add a parameter for a serialized default storage session, used only on Windows.
199
200         * Shared/win/WebCoreArgumentCodersWin.cpp:
201         (CoreIPC::decodeResourceRequest):
202         Make sure to set the current storage session on any requests used by the Web
203         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
204         doing anything with the Web Process's default storage session.
205
206         * UIProcess/win/WebContextWin.cpp:
207         (WebKit::WebContext::platformInitializeWebProcess):
208         Serialize the default storage session in the UI Process and add it to the
209         WebProcessCreationParameters.
210
211         * WebProcess/WebPage/win/WebPageWin.cpp:
212         (WebKit::cachedResponseForURL):
213         Use the cache associated with the current storage session and make sure the request has the
214         current storage session set on it before doing anything with it.
215
216         * WebProcess/win/WebProcessWin.cpp:
217         (WebKit::WebProcess::platformSetCacheModel):
218         Use the default storage session.
219         (WebKit::WebProcess::platformClearResourceCaches):
220         Ditto.
221         (WebKit::WebProcess::platformInitializeWebProcess):
222         Deserialize the default storage session passed in by the UI Process and hand it to the
223         ResourceHandle.
224
225 2011-05-11  Sam Weinig  <sam@webkit.org>
226
227         Reviewed by Adam Roben.
228
229         WebKit2 should tell app that is unresponsive in more cases
230         <rdar://problem/9110151>
231         https://bugs.webkit.org/show_bug.cgi?id=60608
232
233         * UIProcess/DrawingAreaProxyImpl.cpp:
234         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
235         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
236         Invoke the responsiveness time when forcing a backing store update
237         to catch the cases of activating tabs, resizing the window, etc.
238
239 2011-05-11  Martin Robinson  <mrobinson@igalia.com>
240
241         Try to fix the WinCairo build.
242
243         * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and
244         guard it with USE(CAIRO) instead of PLATFORM(CAIRO).
245
246 2011-05-11  John Sullivan  <sullivan@apple.com>
247
248         Reviewed by Darin Adler.
249
250         <https://bugs.webkit.org/show_bug.cgi?id=60631>
251         <rdar://problem/9420520>
252         
253         WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631]
254
255         * UIProcess/WebPageProxy.cpp:
256         (WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
257         Call clearPendingAPIRequestURL().
258
259 2011-05-11  Adam Roben  <aroben@apple.com>
260
261         Turn on strict PassOwnPtr on Windows
262
263         Fixes <http://webkit.org/b/60632> Windows should build with strict PassOwnPtr enabled
264
265         Reviewed by Adam Barth.
266
267         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
268         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0.
269
270 2011-05-11  Jessie Berlin  <jberlin@apple.com>
271
272         Reviewed by Darin Adler.
273
274         [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information
275         about the usage for both the origin overall and the database in question.
276         https://bugs.webkit.org/show_bug.cgi?id=60573
277
278         Add the currentOriginUsage parameter.
279
280         * Platform/CoreIPC/HandleMessage.h:
281         (CoreIPC::callMemberFunction):
282         * UIProcess/API/C/WKPage.h:
283         * UIProcess/WebPageProxy.cpp:
284         (WebKit::WebPageProxy::exceededDatabaseQuota):
285         * UIProcess/WebPageProxy.h:
286         * UIProcess/WebPageProxy.messages.in:
287         * UIProcess/WebUIClient.cpp:
288         (WebKit::WebUIClient::exceededDatabaseQuota):
289         * UIProcess/WebUIClient.h:
290         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
291         (WebKit::WebChromeClient::exceededDatabaseQuota):
292
293 2011-05-10  Oliver Hunt  <oliver@apple.com>
294
295         Reviewed by Geoffrey Garen.
296
297         Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page
298         https://bugs.webkit.org/show_bug.cgi?id=60580
299
300         The plugin object map was incorrect trying to implement a weak map itself using
301         destructors.  Switch to a WeakGCMap and the problem is fixed.
302
303         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
304         (WebKit::JSNPObject::~JSNPObject):
305         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
306         (WebKit::NPRuntimeObjectMap::getOrCreateJSObject):
307         (WebKit::NPRuntimeObjectMap::invalidate):
308         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h:
309
310 2011-05-10  Sam Weinig  <sam@webkit.org>
311
312         Reviewed by Dan Bernstein.
313
314         Yet more quarantine related sandbox denial when downloading files
315         <rdar://problem/9397494>
316
317         * WebProcess/com.apple.WebProcess.sb:
318
319 2011-05-10  Sam Weinig  <sam@webkit.org>
320
321         Reviewed by Anders Carlsson.
322
323         WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return
324         https://bugs.webkit.org/show_bug.cgi?id=60584
325
326         * UIProcess/WebPageProxy.cpp:
327         (WebKit::WebPageProxy::handleWheelEvent):
328         (WebKit::canCoalesce):
329         (WebKit::coalesce):
330         (WebKit::coalescedWheelEvent):
331         (WebKit::WebPageProxy::didReceiveEvent):
332         (WebKit::WebPageProxy::processDidCrash):
333         Reworks coalescing/merging code to happen on didReceiveEvent rather than in
334         handleWheelEvent. This means we now store the pending events in a queue, and
335         pull them out when we can.
336
337         * UIProcess/WebPageProxy.h:
338         Change single event containers to contain all pending/merged/coalesced events
339         and remove unused flag.
340
341 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
342
343         Reviewed by Darin Adler.
344
345         WebKit2: Cancelling full screen before animation completes leads to full screen window staying up.
346         https://bugs.webkit.org/show_bug.cgi?id=60531
347
348         Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and 
349         _isExitingFullScreen.  These will ensure each is only called once per full screen request, and
350         that if one exit/enter request interrupts another, that the required functions are called in 
351         order.
352
353         * UIProcess/mac/WKFullScreenWindowController.h:
354         * UIProcess/mac/WKFullScreenWindowController.mm:
355         (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating.
356         (-[WKFullScreenWindowController exitFullScreen]): Ditto.
357         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen
358             and call [self finishedExitFullScreenAnimation:] if necessary.
359         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen.
360         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen
361             and call [self finishedEnterFullScreenAnimation:] if necessary.
362         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen.
363
364 2011-05-10  Beth Dakin  <bdakin@apple.com>
365
366         Reviewed by Darin Adler.
367
368         https://bugs.webkit.org/show_bug.cgi?id=60582
369         Crash switching overlay/non-overlay scrollbar preference still possible
370         -and corresponding-
371         <rdar://problem/9323983>
372
373         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
374         (InitWebCoreSystemInterface):
375
376 2011-05-10  Jeff Miller  <jeffm@apple.com>
377
378         Reviewed by Anders Carlsson.
379
380         WebKit2: Windows clients need to know if the page overlay is installed
381         https://bugs.webkit.org/show_bug.cgi?id=60562
382         <rdar://problem/8940164>
383         
384         Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy),
385         WebKit clients need to know whether WebKit is drawing the page overlay or not.  Keep track of this in
386         the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information.
387
388         * UIProcess/API/C/win/WKView.cpp:
389         (WKViewIsPageOverlayInstalled): Added.
390         * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled().
391         
392         * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay().
393         * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay().
394         * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay.
395         * UIProcess/win/WebPageProxyWin.cpp:
396         (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added.
397         
398         * UIProcess/win/WebView.cpp:
399         (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled.
400         (WebKit::WebView::didInstallOrUninstallPageOverlay): Added.
401         * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled.
402         (WebKit::WebView::pageOverlayInstalled): Added.
403         
404         * WebProcess/WebPage/WebPage.cpp:
405         (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed.
406         (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled.
407
408 2011-05-10  Anders Carlsson  <andersca@apple.com>
409
410         Reviewed by Adam Roben.
411
412         Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply
413         https://bugs.webkit.org/show_bug.cgi?id=60567
414         <rdar://problem/9377845>
415
416         It is possible to receive an incoming sync reply that is for a request we don't know about.
417         This could happen if the sync message send timed out for example.
418
419         * Platform/CoreIPC/Connection.cpp:
420         (CoreIPC::Connection::processIncomingSyncReply):
421
422 2011-05-05  Brent Fulgham  <bfulgham@webkit.org> and Martin Robinson  <mrobinson@igalia.com>
423
424         Reviewed by Anders Carlsson.
425
426         [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo
427         https://bugs.webkit.org/show_bug.cgi?id=60293
428
429         * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo.
430         * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations.
431         * Shared/cairo/ShareableBitmapCairo.cpp:
432         (WebKit::ShareableBitmap::createGraphicsContext): Added.
433         (WebKit::ShareableBitmap::paint): Added.
434         (WebKit::ShareableBitmap::createCairoSurface): Added.
435         (WebKit::ShareableBitmap::releaseSurfaceData): Added.
436
437 2011-05-10  Anders Carlsson  <andersca@apple.com>
438
439         Reviewed by Sam Weinig.
440
441         Extra sign in required to view video on MobileMe Gallery album
442         https://bugs.webkit.org/show_bug.cgi?id=60560
443
444         Implement NPN_GetAuthenticationInfo.
445
446         * PluginProcess/PluginControllerProxy.cpp:
447         (WebKit::PluginControllerProxy::getAuthenticationInfo):
448         Send a GetAuthenticationInfo message to the web process.
449
450         * PluginProcess/PluginControllerProxy.h:
451         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
452         (WebKit::initializeProtectionSpace):
453         Initialize a WebCore::ProtectionSpace object from NPAPI parameters.
454
455         (WebKit::NPN_GetAuthenticationInfo):
456         Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo. 
457         Finally, copy the username/password and pass them back to the plug-in.
458
459         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
460         (WebKit::NetscapePlugin::getAuthenticationInfo):
461         Call the plug-in controller.
462
463         * WebProcess/Plugins/PluginController.h:
464         Add getAuthenticationInfo pure virtual member function.
465
466         * WebProcess/Plugins/PluginProxy.cpp:
467         (WebKit::PluginProxy::getAuthenticationInfo):
468         Call the real plug-in controller's getAuthenticationInfo member function.
469
470         * WebProcess/Plugins/PluginProxy.messages.in:
471         Add GetAuthenticationInfo message.
472
473         * WebProcess/Plugins/PluginView.cpp:
474         (WebKit::PluginView::getAuthenticationInfo):
475         Try to get the authentication info from the credential storage. Failing that,
476         get it from the persistent credential storage.
477
478 2011-05-10  Adam Roben  <aroben@apple.com>
479
480         Use FontSmoothingLevelWindows by default on Windows
481
482         Fixes <http://webkit.org/b/60557> REGRESSION (r86077): Web Inspector uses CG font rendering
483         in WebKit2 on Windows
484
485         Reviewed by Darin Adler.
486
487         * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL
488         macro to let Windows have a different default font smoothing level from other platforms.
489
490         * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font
491         smoothing level.
492
493 2011-05-06  Tony Gentilcore  <tonyg@chromium.org>
494
495         Reviewed by Darin Adler.
496
497         Fix some unnecessary includes in headers
498         https://bugs.webkit.org/show_bug.cgi?id=60388
499
500         * WebProcess/FullScreen/WebFullScreenManager.cpp:
501
502 2011-05-09  Jeremy Noble  <jer.noble@apple.com>
503
504         Reviewed by Darin Adler.
505
506         Command-~/Exposé to another window while <video> is in full screen, breaks Safari, eventually leading to crash
507         https://bugs.webkit.org/show_bug.cgi?id=60496
508
509         When animating into and out of full screen, order out and back in the original webView window,
510         disabling animations when necessary. The beganExitFullScreenAnimation method was targeting the wrong window,
511         as the webView is hosted in the full screen window when we ask for it's parent window.
512
513         * UIProcess/mac/WKFullScreenWindowController.mm:
514         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
515         (-[WKFullScreenWindowController beganExitFullScreenAnimation]):
516
517 2011-05-09  Dan Bernstein  <mitz@apple.com>
518
519         Reviewed by Darin Adler.
520
521         A WKView with plug-ins paints white when first moved into a window
522         https://bugs.webkit.org/show_bug.cgi?id=60511
523
524         The UI process’s wait for DidUpdateBackingStoreState would always time out because the Web process
525         was blocked on a synchronous message the UI process trying to get the connections for plug-ins in
526         the view. This is avoided by deferring the call to Page::setCanStartMedia().
527
528         * WebProcess/WebPage/WebPage.cpp:
529         (WebKit::WebPage::WebPage): Initialize the new m_setCanStartMediaTimer.
530         (WebKit::WebPage::setCanStartMediaTimerFired): Added. Calls setCanStartMedia(true) when the timer
531         fires.
532         (WebKit::WebPage::setIsInWindow): When going out of a window, stop the timer. When going into a
533         window, start it.
534         * WebProcess/WebPage/WebPage.h:
535
536 2011-05-09  Anders Carlsson  <andersca@apple.com>
537
538         Reviewed by Dan Bernstein.
539
540         Crash when sending a sync message to a crashed web process
541         https://bugs.webkit.org/show_bug.cgi?id=60514
542         <rdar://problem/9281270>
543
544         Change WebProcessProxy::sendSync to return false if there's no connection.
545
546         Audit all WebProcessProxy::sendSync call sites to initialize reply parameters.
547
548         * UIProcess/WebPageProxy.cpp:
549         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
550         (WebKit::WebPageProxy::getSelectedText):
551         (WebKit::WebPageProxy::gestureWillBegin):
552         * UIProcess/WebProcessProxy.h:
553         (WebKit::WebProcessProxy::sendSync):
554         * UIProcess/mac/WebPageProxyMac.mm:
555         (WebKit::WebPageProxy::insertText):
556         (WebKit::WebPageProxy::getMarkedRange):
557         (WebKit::WebPageProxy::getSelectedRange):
558         (WebKit::WebPageProxy::characterIndexForPoint):
559         (WebKit::WebPageProxy::executeKeypressCommands):
560         (WebKit::WebPageProxy::writeSelectionToPasteboard):
561         (WebKit::WebPageProxy::readSelectionFromPasteboard):
562
563 2011-05-09  Anders Carlsson  <andersca@apple.com>
564
565         Reviewed by Sam Weinig.
566
567         Create a plug-in's MIME types preferences plist if it doesn't exist.
568         https://bugs.webkit.org/show_bug.cgi?id=57204
569         <rdar://problem/9195048>
570
571         Spawn a plug-in process and let it create the plist. For now, we'll do this on the
572         main thread since it's a rare one-time computation and we have an API function,
573         WKFrameCanShowMIMEType, which would have to block anyway.
574
575         * PluginProcess/mac/PluginProcessMainMac.mm:
576         (WebKit::PluginProcessMain):
577         If -createPluginMIMETypesPreferences is one of the command line argument keys,
578         the plug-in path will be the argument value. Call NetscapePluginModule::createPluginMIMETypesPreferences
579         to create the preferences file and then exit.
580
581         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
582         (WebKit::contentsOfPropertyListAtURL):
583         Move code to read a property list out into a helper function.
584
585         (WebKit::getMIMETypesFromPluginBundle):
586         If there's no property list file, try to create one.
587
588         (WebKit::NetscapePluginModule::createPluginMIMETypesPreferences):
589         Load the plug-in, find the BP_CreatePluginMIMETypesPreferences and call it.
590
591         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
592         (WebKit::PluginProcessProxy::createPropertyListFile):
593         Spawn a plug-in process and pass the -createPluginMIMETypesPreferences flag to it and then wait
594         for it to exit.
595
596 2011-05-09  Anders Carlsson  <andersca@apple.com>
597
598         Reviewed by Sam Weinig.
599
600         Move EnvironmentVariables out into its own .cpp file
601         https://bugs.webkit.org/show_bug.cgi?id=60507
602
603         * UIProcess/Launcher/mac/EnvironmentVariables.cpp: Added.
604         (WebKit::EnvironmentVariables::EnvironmentVariables):
605         (WebKit::EnvironmentVariables::~EnvironmentVariables):
606         (WebKit::EnvironmentVariables::set):
607         (WebKit::EnvironmentVariables::get):
608         (WebKit::EnvironmentVariables::appendValue):
609         (WebKit::EnvironmentVariables::valueIfVariableHasName):
610         (WebKit::EnvironmentVariables::createStringForVariable):
611         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
612         * UIProcess/Launcher/mac/EnvironmentVariables.h: Added.
613         (WebKit::EnvironmentVariables::environmentPointer):
614         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
615         * WebKit2.xcodeproj/project.pbxproj:
616
617 2011-05-09  Adam Roben  <aroben@apple.com>
618
619         Always set the font rendering mode based on preference values
620
621         WebPage::platformInitialize and WebPage::platformPreferencesDidChange were fighting over the
622         font rendering mode. The platformInitialize code predates preference-based font rendering
623         mode support, and is now redundant and incorrect.
624
625         Fixes <http://webkit.org/b/60494> WebKit2 uses GDI text instead of CG text when
626         FontSmoothing preference is set to kWKFontSmoothingLevelNoSubpixelAntiAliasing in a .plist
627         on disk
628
629         Reviewed by Sam Weinig.
630
631         * WebProcess/WebPage/win/WebPageWin.cpp:
632         (WebKit::WebPage::platformInitialize): Removed code to set the font rendering mode.
633         platformPreferencesDidChange will take care of this for us.
634
635 2011-05-09  Anders Carlsson  <andersca@apple.com>
636
637         Reviewed by John Sullivan.
638
639         Clean up NetscapePluginModule::getPluginInfo
640         https://bugs.webkit.org/show_bug.cgi?id=60486
641
642         Make all 'get' functions take a PluginInfoStore::Plugin reference, since getPluginInfoFromPropertyLists
643         is going to need it to know the path and plug-in architecture.
644
645         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
646         (WebKit::getPluginArchitecture):
647         (WebKit::getPluginInfoFromPropertyLists):
648         (WebKit::getPluginInfoFromCarbonResources):
649         (WebKit::NetscapePluginModule::getPluginInfo):
650
651 2011-05-09  Dan Bernstein  <mitz@apple.com>
652
653         Reviewed by Darin Adler.
654
655         <rdar://problem/9005982> REGRESSION (r85780): Flash of white when a WKView with composited content moves on-screen
656         https://bugs.webkit.org/show_bug.cgi?id=60488
657
658         * WebProcess/WebPage/DrawingAreaImpl.cpp:
659         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Update m_compositingAccordingToProxyMessages,
660         since the DidUpdateBackingStoreState message also changes the compositing state in the proxy.
661
662 2011-05-09  Benjamin Poulain  <benjamin.poulain@nokia.com>
663
664         Reviewed by Andreas Kling.
665
666         Build fix for WebKit 2 on Qt
667
668         Qt treats warnings as errors so it does not build with unused variables. This patch removed two unused variable in WebKit 2.
669
670         * UIProcess/TiledDrawingAreaProxy.cpp:
671         (WebKit::TiledDrawingAreaProxy::createTiles):
672         * WebProcess/Plugins/PluginView.cpp:
673         (WebKit::PluginView::~PluginView):
674
675 2011-05-07  Dan Bernstein  <mitz@apple.com>
676
677         Reviewed by Timothy Hatcher.
678
679         <rdar://problem/9365358> REGRESSION (WebKit2): When clicking in the page, Find overlay fades out instead of disappearing immediately
680
681         * WebProcess/WebPage/FindController.cpp:
682         (WebKit::FindController::hideFindUI): Do not fade out the overlay.
683
684 2011-05-07  Dan Bernstein  <mitz@apple.com>
685
686         Avoid copying a header file into the WebKit2 framework wrapper.
687
688         * WebKit2.xcodeproj/project.pbxproj: Corrected the target membership of HTTPCookieAcceptPolicy.h.
689
690 2011-05-07  Sheriff Bot  <webkit.review.bot@gmail.com>
691
692         Unreviewed, rolling out r86016.
693         http://trac.webkit.org/changeset/86016
694         https://bugs.webkit.org/show_bug.cgi?id=60445
695
696         caused crashes on the WK2 Windows bots (Requested by
697         jessieberlin on #webkit).
698
699         * Shared/WebProcessCreationParameters.cpp:
700         (WebKit::WebProcessCreationParameters::encode):
701         (WebKit::WebProcessCreationParameters::decode):
702         * Shared/WebProcessCreationParameters.h:
703         * Shared/win/WebCoreArgumentCodersWin.cpp:
704         (CoreIPC::decodeResourceRequest):
705         * UIProcess/win/WebContextWin.cpp:
706         (WebKit::WebContext::platformInitializeWebProcess):
707         * WebProcess/WebPage/win/WebPageWin.cpp:
708         (WebKit::cachedResponseForURL):
709         * WebProcess/win/WebProcessWin.cpp:
710         (WebKit::WebProcess::platformSetCacheModel):
711         (WebKit::WebProcess::platformClearResourceCaches):
712         (WebKit::WebProcess::platformInitializeWebProcess):
713
714 2011-05-07  Jessie Berlin  <jberlin@apple.com>
715
716         Reviewed by Steve Falkenburg.
717
718         [Windows WebKit2] Use cookies set in WebKit1
719         https://bugs.webkit.org/show_bug.cgi?id=60274
720
721         Share the default storage session between the UI and Web Processes.
722
723         * Shared/WebProcessCreationParameters.cpp:
724         (WebKit::WebProcessCreationParameters::encode):
725         (WebKit::WebProcessCreationParameters::decode):
726         * Shared/WebProcessCreationParameters.h:
727         Add a parameter for a serialized default storage session, used only on Windows.
728
729         * Shared/win/WebCoreArgumentCodersWin.cpp:
730         (CoreIPC::decodeResourceRequest):
731         Make sure to set the current storage session on any requests used by the Web
732         Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid
733         doing anything with the Web Process's default storage session.
734
735         * UIProcess/win/WebContextWin.cpp:
736         (WebKit::WebContext::platformInitializeWebProcess):
737         Serialize the default storage session in the UI Process and add it to the
738         WebProcessCreationParameters.
739
740         * WebProcess/WebPage/win/WebPageWin.cpp:
741         (WebKit::cachedResponseForURL):
742         Use the cache associated with the current storage session and make sure the request has the
743         current storage session set on it before doing anything with it.
744
745         * WebProcess/win/WebProcessWin.cpp:
746         (WebKit::WebProcess::platformSetCacheModel):
747         Use the default storage session.
748         (WebKit::WebProcess::platformClearResourceCaches):
749         Ditto.
750         (WebKit::WebProcess::platformInitializeWebProcess):
751         Deserialize the default storage session passed in by the UI Process and hand it to the
752         ResourceHandle.
753
754 2011-05-07  Keith Kyzivat  <keith.kyzivat@nokia.com>
755
756         Reviewed by Adam Roben.
757
758         [Qt] Webkit2 PLUGIN_ARCHITECTURE(UNSUPPORTED) configuration broken by r85961
759         https://bugs.webkit.org/show_bug.cgi?id=60420
760
761         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp:
762         (WebKit::NetscapePlugin::platformVisibilityDidChange):
763
764 2011-05-06  Martin Robinson  <mrobinson@igalia.com>
765
766         Reviewed by Xan Lopez.
767
768         [GTK] [WebKit2] WebView::windowToScreen needs an implementation
769         https://bugs.webkit.org/show_bug.cgi?id=55960
770
771         Add an implementation of PageClient::windowToScreen for GTK+ WebKit2 using
772         the newly abstracted widget to screen coordinate translation code in WebCore.
773
774         * UIProcess/API/gtk/PageClientImpl.cpp:
775         (WebKit::PageClientImpl::windowToScreen): Added implementation.
776
777 2011-05-06  Anders Carlsson  <andersca@apple.com>
778
779         Reviewed by Dan Bernstein.
780
781         Simplify the PluginInfoStore interface
782         https://bugs.webkit.org/show_bug.cgi?id=60406
783
784         Just expose a single API for getting a list of plug-ins from the info store,
785         PluginInfoStore::plugins and remove PluginInfoStore::getPlugins and PluginInfoStore::getPluginPaths.
786
787         Also, change the WebContext::pluginInfoStore() getter to return a reference.
788
789         * UIProcess/Plugins/PluginInfoStore.cpp:
790         (WebKit::PluginInfoStore::plugins):
791         * UIProcess/Plugins/PluginInfoStore.h:
792         * UIProcess/Plugins/PluginProcessManager.cpp:
793         (WebKit::PluginProcessManager::getPluginProcessConnection):
794         * UIProcess/Plugins/PluginProcessManager.h:
795         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
796         (WebKit::WebPluginSiteDataManager::GetSitesWithDataState::GetSitesWithDataState):
797         (WebKit::WebPluginSiteDataManager::ClearSiteDataState::ClearSiteDataState):
798         (WebKit::WebPluginSiteDataManager::getSitesWithData):
799         (WebKit::WebPluginSiteDataManager::clearSiteData):
800         * UIProcess/WebContext.cpp:
801         (WebKit::WebContext::getPlugins):
802         (WebKit::WebContext::getPluginPath):
803         * UIProcess/WebContext.h:
804         (WebKit::WebContext::pluginInfoStore):
805         * UIProcess/WebPageProxy.cpp:
806         (WebKit::WebPageProxy::canShowMIMEType):
807
808 2011-05-06  Anders Carlsson  <andersca@apple.com>
809
810         Windows build fix.
811
812         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
813         (WebKit::PluginInfoStore::shouldUsePlugin):
814
815 2011-05-06  Anders Carlsson  <andersca@apple.com>
816
817         Reviewed by Dan Bernstein.
818
819         Make more PluginInfoStore member functions static
820         https://bugs.webkit.org/show_bug.cgi?id=60401
821
822         This is a first step towards making PluginInfoStore thread safe.
823
824         * UIProcess/Plugins/PluginInfoStore.cpp:
825         (WebKit::PluginInfoStore::loadPluginsIfNecessary):
826         (WebKit::PluginInfoStore::loadPlugin):
827         * UIProcess/Plugins/PluginInfoStore.h:
828         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
829         (WebKit::PluginInfoStore::shouldUsePlugin):
830         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
831         (WebKit::PluginInfoStore::shouldUsePlugin):
832         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
833         (WebKit::PluginInfoStore::shouldUsePlugin):
834
835 2011-05-06  Adam Roben  <aroben@apple.com>
836
837         Mac build fix
838
839         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Added a
840         missing #import.
841
842 2011-05-06  Adam Roben  <aroben@apple.com>
843
844         Show/hide windowed plugins according to the plugin element's visibility CSS property
845
846         Fixes <http://webkit.org/b/60285> <rdar://problem/9152400> REGRESSION (WebKit2): A white
847         rectangle covers up important UI elements when composing a new message at mail.yahoo.com
848         with BrowserPlus! plug-in installed
849
850         Reviewed by Anders Carlsson.
851
852         * PluginProcess/PluginControllerProxy.cpp:
853         (WebKit::PluginControllerProxy::isPluginVisible):
854         * PluginProcess/PluginControllerProxy.h:
855         Stubbed out.
856
857         * Shared/win/WindowGeometry.cpp:
858         (WebKit::WindowGeometry::WindowGeometry):
859         (WebKit::WindowGeometry::encode):
860         (WebKit::WindowGeometry::decode):
861         * Shared/win/WindowGeometry.h:
862         Added visible member.
863
864         * UIProcess/win/WebView.cpp:
865         (WebKit::WebView::updateChildWindowGeometries): Show or hide the window as specified in the
866         geometry.
867
868         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
869         (WebKit::NetscapePlugin::visibilityDidChange):
870         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
871         Added. Calls through to platform-specific code.
872
873         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
874         (WebKit::NetscapePlugin::platformVisibilityDidChange):
875         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
876         (WebKit::NetscapePlugin::platformVisibilityDidChange):
877         Stubbed out.
878
879         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
880         (WebKit::NetscapePlugin::platformGeometryDidChange): Moved most logic from here to
881         scheduleWindowedGeometryUpdate.
882         (WebKit::NetscapePlugin::platformVisibilityDidChange): Added. Calls through to
883         scheduleWindowedGeometryUpdate.
884         (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): Added. Code came from
885         platformGeometryDidChange. Now also records whether the plugin element is visible.
886
887         * WebProcess/Plugins/Plugin.h: Added visibilityDidChange.
888
889         * WebProcess/Plugins/PluginController.h: Added isPluginVisible.
890
891         * WebProcess/Plugins/PluginProxy.cpp:
892         (WebKit::PluginProxy::visibilityDidChange):
893         * WebProcess/Plugins/PluginProxy.h:
894         Stubbed out.
895
896         * WebProcess/Plugins/PluginView.cpp:
897         (WebKit::PluginView::show):
898         (WebKit::PluginView::hide):
899         Added. These Widget overrides were based on WebCore's PluginView class.
900
901         (WebKit::PluginView::viewVisibilityDidChange): Added. Similar to viewGeometryDidChange.
902         Calls down to the plugin if it's been initialized.
903         (WebKit::PluginView::isPluginVisible): Added. Just calls up to the Widget base class.
904
905         * WebProcess/Plugins/PluginView.h: Updated for PluginController changes.
906
907 2011-05-06  Adam Roben  <aroben@apple.com>
908
909         Add a WindowGeometry struct for use in the ScheduleChildWindowGeometryUpdate message
910
911         This will make it easier to add more info to this message in the future (like whether the
912         window is visible).
913
914         Fixes <http://webkit.org/b/60374> Adding parameters to ScheduleChildWindowGeometryUpdate
915         message is tedious
916
917         Reviewed by Anders Carlsson.
918
919         * Scripts/webkit2/messages.py:
920         (struct_or_class): Added WindowGeometry to the list of structs.
921
922         * Shared/win/WindowGeometry.cpp: Added.
923         * Shared/win/WindowGeometry.h: Added.
924
925         * win/WebKit2.vcproj: Added new files.
926
927         * UIProcess/PageClient.h:
928         * UIProcess/WebPageProxy.h:
929         * UIProcess/WebPageProxy.messages.in:
930         * UIProcess/win/WebPageProxyWin.cpp:
931         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
932         * UIProcess/win/WebView.cpp:
933         (WebKit::WebView::scheduleChildWindowGeometryUpdate):
934         (WebKit::WebView::updateChildWindowGeometries):
935         * UIProcess/win/WebView.h:
936         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
937         (WebKit::NetscapePlugin::platformGeometryDidChange):
938         * WebProcess/Plugins/PluginController.h:
939         * WebProcess/Plugins/PluginView.cpp:
940         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
941         * WebProcess/Plugins/PluginView.h:
942         * WebProcess/WebPage/WebPage.h:
943         * WebProcess/WebPage/win/WebPageWin.cpp:
944         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
945         Changed to use WindowGeometry.
946
947 2011-05-06  David Kilzer  <ddkilzer@apple.com>
948
949         Remove unused GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings
950
951         Reviewed by Jon Honeycutt.
952
953         This fixes an Xcode 4 warning about using obsolete settings.
954
955         * WebKit2.xcodeproj/project.pbxproj: Removed
956         GCC_ENABLE_FIX_AND_CONTINUE and ZERO_LINK settings.
957
958 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
959
960         Reviewed by Martin Robinson.
961
962         [GTK] Implement NetscapePlugin::platformPaint for GTK platform
963         https://bugs.webkit.org/show_bug.cgi?id=60368
964
965         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
966         (WebKit::NetscapePlugin::platformPaint):
967
968 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
969
970         Reviewed by Martin Robinson.
971
972         Share PluginInfoStore implementation between Qt and GTK ports
973         https://bugs.webkit.org/show_bug.cgi?id=60366
974
975         * GNUmakefile.am:
976         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp: Removed.
977         * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Renamed from Source/WebKit2/UIProcess/Plugins/qt/PluginInfoStoreQt.cpp.
978         (WebKit::PluginInfoStore::pluginsDirectories):
979         (WebKit::PluginInfoStore::pluginPathsInDirectory):
980         (WebKit::PluginInfoStore::individualPluginPaths):
981         (WebKit::PluginInfoStore::getPluginInfo):
982         (WebKit::PluginInfoStore::shouldUsePlugin):
983         * WebKit2.pro:
984
985 2011-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
986
987         Unreviewed. Fix WebKit2 GTK build after r85860.
988
989         * UIProcess/API/gtk/PageClientImpl.h: Fix typo.
990
991 2011-05-05  Philippe Normand  <pnormand@igalia.com>
992
993         Reviewed by Dimitri Glazkov.
994
995         Implement LayoutTestController::pseudoShadowId()
996         https://bugs.webkit.org/show_bug.cgi?id=60034
997
998         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
999         (WKBundleNodeHandleShadowPseudoId):
1000         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1001         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1002         (WebKit::InjectedBundleNodeHandle::elementRemoveShadowRoot):
1003         (WebKit::InjectedBundleNodeHandle::elementShadowPseudoId):
1004         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1005
1006 2011-05-05  Sam Weinig  <sam@webkit.org>
1007
1008         Reviewed by Anders Carlsson.
1009
1010         REGRESSION (r85689): Unresponsive timer firing when closing background tabs
1011         <rdar://problem/9385988>
1012         https://bugs.webkit.org/show_bug.cgi?id=60325
1013
1014         When calling WKPageTryClose(), if the page close succeeded, the notification to stop
1015         the responsiveness timer would be dropped because the page was closed by the time it
1016         got to the UIProcess.
1017
1018         * UIProcess/WebPageProxy.cpp:
1019         (WebKit::WebPageProxy::closePage):
1020         * UIProcess/WebPageProxy.h:
1021         * UIProcess/WebPageProxy.messages.in:
1022         Add parameter to closePage stipulating whether or not to stop the responsiveness timer.
1023
1024         * WebProcess/WebPage/WebPage.cpp:
1025         (WebKit::WebPage::tryClose):
1026         (WebKit::WebPage::sendClose):
1027         Instead of sending a StopResponsivenessTimer message after sending the ClosePage message,
1028         add a bit to the ClosePage message.
1029
1030 2011-05-05  Dan Bernstein  <mitz@apple.com>
1031
1032         Reviewed by Simon Fraser.
1033
1034         WebKit2 part of <rdar://problem/9155590> Broken animation in iAd producer
1035
1036         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1037         (InitWebCoreSystemInterface): Initialize wkExecutableWasLinkedOnOrBeforeSnowLeopard.
1038
1039 2011-05-05  Keith Kyzivat  <keith.kyzivat@nokia.com>
1040
1041         Reviewed by Laszlo Gombos.
1042
1043         [Qt] [WK2] Add method to disable plugins under WK2
1044         https://bugs.webkit.org/show_bug.cgi?id=57796
1045
1046         * config.h: Allow PLUGIN_ARCHITECTURE_UNSUPPORTED to be defined on build command line
1047
1048 2011-05-05  Anders Carlsson  <andersca@apple.com>
1049
1050         Reviewed by Sam Weinig.
1051
1052         When an underlay surface is active, paint normal web contents in a transparency layer
1053         https://bugs.webkit.org/show_bug.cgi?id=60296
1054
1055         In order for the page contents to correctly blend with the underlay, the page contents
1056         needs to be painted in a transparency layer.
1057
1058         * WebProcess/WebPage/WebPage.cpp:
1059         (WebKit::WebPage::drawRect):
1060
1061 2011-05-05  Brian Weinstein  <bweinstein@apple.com>
1062
1063         Reviewed by Timothy Hatcher.
1064
1065         WebKit2: Docking Web Inspector doesn't respect maximum inspector size
1066         https://bugs.webkit.org/show_bug.cgi?id=60294
1067         <rdar://problem/9388518>
1068         
1069         Before we place the inspector and the inspected views, make sure that we have constrained the height
1070         of the docked inspector. Putting the code here covers both when the inspector is initially attached 
1071         and when a window with the docked inspector is resized.
1072
1073         * UIProcess/mac/WebInspectorProxyMac.mm:
1074         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Constrain the height before laying out the views.
1075         * UIProcess/win/WebInspectorProxyWin.cpp:
1076         (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Ditto.
1077
1078 2011-05-05  Chang Shu  <cshu@webkit.org>
1079
1080         Reviewed by Andreas Kling.
1081
1082         [Qt][WK2] Support PageGroup in QGraphicsWKView/QWKPage constructors
1083         https://bugs.webkit.org/show_bug.cgi?id=59638
1084
1085         Added private constructors for class QGraphicsWKView and QWKPage to support
1086         WKPageGroupRef.
1087
1088         * UIProcess/API/qt/qgraphicswkview.cpp:
1089         (QGraphicsWKView::QGraphicsWKView):
1090         (QGraphicsWKView::~QGraphicsWKView):
1091         (QGraphicsWKView::init):
1092         * UIProcess/API/qt/qgraphicswkview.h:
1093         * UIProcess/API/qt/qwkpage.cpp:
1094         (QWKPagePrivate::QWKPagePrivate):
1095         (QWKPage::QWKPage):
1096         (QWKPage::~QWKPage):
1097         (QWKPage::init):
1098         * UIProcess/API/qt/qwkpage.h:
1099         * UIProcess/API/qt/qwkpage_p.h:
1100
1101 2011-05-05  Brent Fulgham  <bfulgham@webkit.org>
1102
1103         [WinCairo] Unreviewed build fix.
1104
1105         * WebProcess/WebPage/win/WebPageWin.cpp:
1106         (WebKit::WebPage::cachedResponseDataForURL): Stub out
1107         implementation for cURL networking case.
1108
1109 2011-05-05  Jeff Miller  <jeffm@apple.com>
1110
1111         Reviewed by Darin Adler.
1112
1113         Add didNotHandleWheelEvent callback to WKPageUIClient
1114         https://bugs.webkit.org/show_bug.cgi?id=60203
1115         
1116         Remove Windows-specific WebPageProxy::wheelEventNotHandled() member function and use
1117         didNotHandleWheelEvent callback in WKPageUIClient instead.  It turns out that just
1118         resending the wheel event to the parent window doesn't provide the client with enough context
1119         to know that WebKit has already attempted to handle the event.
1120
1121         * UIProcess/API/C/WKPage.h: Added WKPageDidNotHandleWheelEventCallback typedef and didNotHandleWheelEvent to WKPageUIClient.
1122
1123         * UIProcess/API/gtk/PageClientImpl.cpp:
1124         (WebKit::PageClientImpl::didNotHandleWheelEvent): Added, but not implemented.
1125         * UIProcess/API/gtk/PageClientImpl.h: Added didNotHandleWheelEvent().
1126         * UIProcess/API/qt/qwkpage.cpp:
1127         (QWKPage::QWKPage):Stubbed out didNotHandleWheelEvent callback.
1128
1129         * UIProcess/WebPageProxy.cpp:
1130         (WebKit::WebPageProxy::didReceiveEvent): Call didNotHandleWheelEvent in WKPageUIClient if wheel event is not handled.
1131         * UIProcess/WebPageProxy.h: Removed wheelEventNotHandled().
1132         
1133         * UIProcess/WebUIClient.cpp:
1134         (WebKit::WebUIClient::implementsDidNotHandleWheelEvent): Added.
1135         (WebKit::WebUIClient::didNotHandleWheelEvent): Added.
1136         * UIProcess/WebUIClient.h: Added implementsDidNotHandleWheelEvent() and didNotHandleWheelEvent().
1137
1138         * UIProcess/win/WebPageProxyWin.cpp: Removed wheelEventNotHandled().
1139
1140 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1141
1142         Reviewed by Martin Robinson.
1143
1144         [GTK] Return correct GTK version for NPNVToolkit
1145         https://bugs.webkit.org/show_bug.cgi?id=60275
1146
1147         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1148         (WebKit::NPN_GetValue): Return always 2 for NPNVToolkit in GTK
1149         platform.
1150
1151 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1152
1153         Reviewed by Martin Robinson.
1154
1155         [GTK] Make native events code more consistent
1156         https://bugs.webkit.org/show_bug.cgi?id=60258
1157
1158         Make all other native events code follow the current keyboard
1159         events approach: use a GOwnPtr for the native event, and use
1160         const GdkEvent* in the API. We need to implement the copy
1161         constructors for native events to copy the gdk events with
1162         gdk_event_copy().
1163
1164         * Shared/NativeWebMouseEvent.h:
1165         (WebKit::NativeWebMouseEvent::nativeEvent):
1166         * Shared/NativeWebWheelEvent.h:
1167         (WebKit::NativeWebWheelEvent::nativeEvent):
1168         * Shared/gtk/NativeWebKeyboardEventGtk.cpp:
1169         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
1170         * Shared/gtk/NativeWebMouseEventGtk.cpp:
1171         (WebKit::NativeWebMouseEvent::NativeWebMouseEvent):
1172         * Shared/gtk/NativeWebWheelEventGtk.cpp:
1173         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):
1174         * Shared/gtk/WebEventFactory.cpp:
1175         (WebKit::buttonForEvent):
1176         (WebKit::WebEventFactory::createWebMouseEvent):
1177         (WebKit::WebEventFactory::createWebWheelEvent):
1178         (WebKit::WebEventFactory::createWebKeyboardEvent):
1179         * Shared/gtk/WebEventFactory.h:
1180         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1181         (webkitWebViewBaseScrollEvent):
1182
1183 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1184
1185         Reviewed by Martin Robinson.
1186
1187         [GTK] Module::load() should return true when g_module_open() returns a valid pointer
1188         https://bugs.webkit.org/show_bug.cgi?id=60261
1189
1190         * Platform/gtk/ModuleGtk.cpp:
1191         (WebKit::Module::load):
1192
1193 2011-05-05  Carlos Garcia Campos  <cgarcia@igalia.com>
1194
1195         Unreviewed. Fix WebKit2 GTK build after r85808.
1196
1197         * Shared/NativeWebWheelEvent.h:
1198         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
1199         (webkitWebViewBaseScrollEvent):
1200
1201 2011-05-04  Cris Neckar  <cdn@chromium.org>
1202
1203         Reviewed by Adam Barth.
1204
1205         Expose WebView directly through ChromeClient.
1206         https://bugs.webkit.org/show_bug.cgi?id=49902
1207
1208         * WebProcess/WebCoreSupport/WebChromeClient.h:
1209         (WebKit::WebChromeClient::webView):
1210
1211 2011-05-04  Jeff Miller  <jeffm@apple.com>
1212
1213         Reviewed by Darin Adler.
1214
1215         Send unhandled wheel events to parent window on Windows
1216         https://bugs.webkit.org/show_bug.cgi?id=60220
1217
1218         Keep track of wheel events using NativeWebWheelEvent instead of WebWheelEvent in WebPageProxy
1219         so we can send the native event to the parent window if WebKit doesn't handle it.
1220
1221         * UIProcess/API/mac/WKView.mm: Use NativeWebWheelEvent instead of WebWheelEvent.
1222
1223         * UIProcess/API/qt/qwkpage.cpp:
1224         (QWKPagePrivate::wheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
1225
1226         * UIProcess/WebPageProxy.cpp:
1227         (WebKit::WebPageProxy::WebPageProxy): Removed initialization of obsolete m_processingWheelEvent member variable.
1228         (WebKit::coalesceWheelEvents): Use NativeWebWheelEvent instead of WebWheelEvent and add a note that this won't work if we ever enable MERGE_WHEEL_EVENTS. 
1229         (WebKit::WebPageProxy::handleWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent, keep track of the current event in m_currentlyProcessedWheelEvent.
1230         (WebKit::WebPageProxy::didReceiveEvent): Call wheelEventNotHandled() on Windows if wheel event is not handled.
1231         (WebKit::WebPageProxy::processDidCrash): Clear out m_currentlyProcessedWheelEvent.
1232         * UIProcess/WebPageProxy.h: Change handleWheelEvent() to take a NativeWebWheelEvent, added wheelEventNotHandled() on Windows, remove m_processingWheelEvent, add m_currentlyProcessedWheelEvent.
1233
1234         * UIProcess/win/WebPageProxyWin.cpp:
1235         (WebKit::WebPageProxy::wheelEventNotHandled): Added.
1236         
1237         * UIProcess/win/WebView.cpp:
1238         (WebKit::WebView::onWheelEvent): Use NativeWebWheelEvent instead of WebWheelEvent.
1239
1240 2011-05-04  Anders Carlsson  <andersca@apple.com>
1241
1242         Reviewed by Darin Adler.
1243
1244         Add bundle API for making a page paint as the background of another page
1245         https://bugs.webkit.org/show_bug.cgi?id=60227
1246
1247         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1248         (WKBundlePageSetUnderlayPage):
1249         Call WebPage::setUnderlayPage.
1250
1251         * WebProcess/WebPage/WebPage.cpp:
1252         (WebKit::WebPage::close):
1253         Null out the underlay page.
1254
1255         (WebKit::WebPage::layoutIfNeeded):
1256         Layout the underlay page if necessary.
1257
1258         (WebKit::WebPage::drawRect):
1259         Draw the underlay page.
1260
1261 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
1262
1263         Reviewed by Laszlo Gombos.
1264
1265         [Qt][Wk2][Symbian] Capabilities for Qt MiniBrowser and QtWebProcess on Symbian
1266         https://bugs.webkit.org/show_bug.cgi?id=59462
1267
1268         * WebProcess.pro: Add Symbian OS capabilities to web process executable. Also enable
1269         data paging flag and prevent application's icon from showing up in the application grid. 
1270
1271 2011-05-04  Adam Roben  <aroben@apple.com>
1272
1273         Clip and reposition windowed plugins when the UI process paints
1274
1275         This ensures that their geometry updates in sync with the rest of the page.
1276
1277         Most of this patch is just plumbing the scheduleWindowedPluginGeometryUpdate and
1278         scheduleChildWindowGeometryUpdate calls through from NetscapePlugin all the way over to
1279         WebView. I've tried to call out the other parts below.
1280
1281         Fixes <http://webkit.org/b/60210> <rdar://problem/8483441> REGRESSION (WebKit2): Windowed
1282         plugins don't scroll at the same speed as the rest of the page
1283
1284         Reviewed by Darin Adler and Anders Carlsson.
1285
1286         * UIProcess/PageClient.h:
1287         * UIProcess/WebPageProxy.h:
1288         * UIProcess/WebPageProxy.messages.in:
1289         * UIProcess/win/WebPageProxyWin.cpp:
1290         (WebKit::WebPageProxy::scheduleChildWindowGeometryUpdate):
1291         Added plumbing.
1292
1293         * UIProcess/win/WebView.cpp:
1294         (WebKit::WebView::onPaintEvent): Update child windows before painting so that they will stay
1295         in sync with the rest of the page.
1296         (WebKit::WebView::scheduleChildWindowGeometryUpdate): Add this update information to the
1297         set of geometries to update on the next paint.
1298         (WebKit::setWindowRegion): Moved this helper function here from NetscapePluginWin.cpp.
1299         (WebKit::WebView::updateChildWindowGeometries): Update the size, position, and clip rects of
1300         all the child windows with scheduled geometry updates.
1301
1302         * UIProcess/win/WebView.h: Added new members to track and update child window geometries.
1303
1304         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1305         (WebKit::NetscapePlugin::platformPostInitialize): Don't show the window immediately. Let the
1306         UI process take care of it.
1307         (WebKit::NetscapePlugin::platformGeometryDidChange): Don't update the window's position or
1308         clip rect. Let the UI process take care of it.
1309
1310         * WebProcess/Plugins/PluginController.h:
1311         * WebProcess/Plugins/PluginView.cpp:
1312         (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate):
1313         * WebProcess/Plugins/PluginView.h:
1314         * WebProcess/WebPage/WebPage.h:
1315         * WebProcess/WebPage/win/WebPageWin.cpp:
1316         (WebKit::WebPage::scheduleChildWindowGeometryUpdate):
1317         Added plumbing.
1318
1319 2011-05-04  Anders Carlsson  <andersca@apple.com>
1320
1321         Reviewed by Adam Roben.
1322
1323         WKView on Windows has no equivalent of Mac's -[WKView setDraws[Transparent]Background:]
1324         https://bugs.webkit.org/show_bug.cgi?id=52009
1325         <rdar://problem/8829746>
1326
1327         Add and implement WKViewSetDrawsTransparentBackground on windows.
1328
1329         * UIProcess/API/C/win/WKView.cpp:
1330         (WKViewSetDrawsTransparentBackground):
1331         (WKViewDrawsTransparentBackground):
1332         Call through to the WebPageProxy object.
1333
1334         * UIProcess/API/C/win/WKView.h:
1335         * UIProcess/win/WebView.cpp:
1336         (WebKit::drawPageBackground):
1337         Don't fill the rect with white if WebPageProxy::drawsBackground() or 
1338         WebPageProxy::drawsTransparentBackground() returns false. Because of limitations in Win32,
1339         both drawsBackground and drawsTransparentBackground are pretty much equivalent.
1340
1341         (WebKit::WebView::paint):
1342         Pass the WebPageProxy object to drawPageBackground.
1343
1344 2011-05-04  Tao Bai  <michaelbai@chromium.org>
1345
1346         Reviewed by David Kilzer.
1347
1348         Populate touch-icon url to FrameLoaderClient
1349         https://bugs.webkit.org/show_bug.cgi?id=59143
1350
1351         Respected the change of FrameLoaderClient.
1352         Added WebIconURL and WebIconType responding the new IconURL and IconType.
1353         Supported to get the multiple icon urls.
1354
1355         * Configurations/FeatureDefines.xcconfig:
1356         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1357         (WebKit::WebFrameLoaderClient::dispatchDidChangeIcons):
1358         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1359
1360 2011-05-04  Anders Carlsson  <andersca@apple.com>
1361
1362         Reviewed by Dan Bernstein.
1363
1364         Can't save a link from "Save Linked File to Download" popup menu
1365         https://bugs.webkit.org/show_bug.cgi?id=60190
1366         <rdar://problem/9367927>
1367
1368         Make sure that suggestedFilenameForResourceWithURL and resourceDataForFrame both look
1369         in the cache if the resource can't be found in the current web page. This matches WebKit1.
1370
1371         * WebProcess/WebPage/WebFrame.cpp:
1372         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
1373         Call WebPage::cachedSuggestedFilenameForURL if we can't find a resource in the page.
1374
1375         * WebProcess/WebPage/WebPage.cpp:
1376         (WebKit::resourceDataForFrame):
1377         Move code out from getResourceDataFromFrame.
1378
1379         (WebKit::WebPage::getResourceDataFromFrame):
1380         Call resourceDataForFrame first and then cachedResponseDataForURL.
1381
1382         * WebProcess/WebPage/WebPage.h:
1383         * WebProcess/WebPage/gtk/WebPageGtk.cpp:
1384         (WebKit::WebPage::platformHasLocalDataForURL):
1385         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1386         (WebKit::WebPage::platformCanHandleRequest):
1387         (WebKit::WebPage::cachedSuggestedFilenameForURL):
1388         (WebKit::WebPage::cachedResponseDataForURL):
1389         Add stubs.
1390
1391         * WebProcess/WebPage/mac/WebPageMac.mm:
1392         (WebKit::cachedResponseForURL):
1393         Add helper function.
1394
1395         (WebKit::WebPage::cachedSuggestedFilenameForURL):
1396         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1397         (WebKit::WebPage::cachedResponseDataForURL):
1398         Call helper function.
1399
1400         * WebProcess/WebPage/qt/WebPageQt.cpp:
1401         (WebKit::WebPage::platformHasLocalDataForURL):
1402         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1403         (WebKit::WebPage::platformCanHandleRequest):
1404         (WebKit::WebPage::cachedSuggestedFilenameForURL):
1405         (WebKit::WebPage::cachedResponseDataForURL):
1406         Add stubs.
1407         
1408         * WebProcess/WebPage/win/WebPageWin.cpp:
1409         (WebKit::cachedResponseForURL):
1410         Add helper function.
1411
1412         (WebKit::WebPage::platformHasLocalDataForURL):
1413         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1414         (WebKit::WebPage::cachedSuggestedFilenameForURL):
1415         (WebKit::WebPage::cachedResponseDataForURL):
1416         Call helper function.
1417
1418 2011-05-04  Simon Fraser  <simon.fraser@apple.com>
1419
1420         Reviewed by Anders Carlsson.
1421
1422         WebKit2 flashes if entering and exiting compositing rapidly
1423         https://bugs.webkit.org/show_bug.cgi?id=60198
1424         
1425         If a page enters then immediately leaves compositing mode, the
1426         DrawingAreaImpl would send a message to the UI process that it
1427         had entered compositing even after all the layers had been torn
1428         down. Fix this by never sending the 'enter' message if we're
1429         waiting for the 'exit' timer to fire.
1430         
1431         Also fix an assertion in the UI process caused by sending mismatched
1432         'enter' and 'leave' messages by keeping track of which messages
1433         we've sent.
1434
1435         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1436         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1437         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
1438         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1439         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon):
1440         * WebProcess/WebPage/DrawingAreaImpl.h:
1441         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModePending):
1442
1443 2011-05-04  Jeff Miller  <jeffm@apple.com>
1444
1445         Fix typo in svn property in r85756.
1446
1447         * Shared/mac/NativeWebWheelEventMac.mm: Added property svn:eol-style. Removed property snv:eol-style.
1448
1449 2011-05-04  Jeff Miller  <jeffm@apple.com>
1450
1451         Reviewed by Darin Adler.
1452
1453         Add NativeWebWheelEvent class
1454         https://bugs.webkit.org/show_bug.cgi?id=60182
1455         
1456         This will be needed soon when we start notifying the UI process that a mouse wheel event wasn't handled by WebKit.
1457
1458         * GNUmakefile.am: Added NativeWebWheelEventGtk.cpp and NativeWebWheelEvent.h.
1459         * Shared/NativeWebWheelEvent.h: Added.
1460         (WebKit::NativeWebWheelEvent::nativeEvent): Added.
1461         * Shared/gtk/NativeWebWheelEventGtk.cpp: Added.
1462         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
1463         * Shared/mac/NativeWebWheelEventMac.mm: Added.
1464         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
1465         * Shared/qt/NativeWebWheelEventQt.cpp: Added.
1466         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): Added.
1467         * Shared/win/NativeWebWheelEventWin.cpp: Added.
1468         (WebKit::NativeWebWheelEvent::NativeWebWheelEvent):Added.
1469         * WebKit2.pro: Added NativeWebWheelEventQt.cpp and NativeWebWheelEvent.h.
1470         * WebKit2.xcodeproj/project.pbxproj: Added NativeWebWheelEventMac.mm and NativeWebWheelEvent.h.
1471         * win/WebKit2.vcproj: Added NativeWebWheelEventWin.cpp and NativeWebWheelEvent.h.
1472
1473 2011-05-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
1474
1475         Reviewed by Anders Carlsson.
1476
1477         ArgumentDecoder should use aligned memory for its internal copy of data
1478         https://bugs.webkit.org/show_bug.cgi?id=59960 
1479
1480         Since we check for memory alignment when unpacking primitive types from the buffer,
1481         insure alignment of the base address.
1482         As uint64_t is the largest type we use in Argument encoder/decoder, use 8 byte alignment. 
1483
1484         * Platform/CoreIPC/ArgumentDecoder.cpp:
1485         (CoreIPC::ArgumentDecoder::~ArgumentDecoder): free m_alignedBase
1486         (CoreIPC::roundUpToAlignment): move this up in the source file
1487         (CoreIPC::ArgumentDecoder::initialize): m_buffer is now guaranteed sizeof(uint64_t) aligned
1488         * Platform/CoreIPC/ArgumentDecoder.h: add m_alignedBase member which needs to be freed in d'tor
1489
1490 2011-05-04  Adam Roben  <aroben@apple.com>
1491
1492         Make ShareableBitmap::makeCGImageCopy use a copy-on-write copy on Windows when possible
1493
1494         Fixes <http://webkit.org/b/57269> <rdar://problem/9198788> REGRESSION (r82151): Every WKView
1495         paint now makes an extra copy of the painted bits
1496
1497         Reviewed by Anders Carlsson.
1498
1499         * Platform/SharedMemory.h:
1500         * Platform/win/SharedMemoryWin.cpp:
1501         (WebKit::SharedMemory::createCopyOnWriteCopy):
1502         Added this new function. Creates a copy-on-write copy of the first |size| bytes of the
1503         original SharedMemory.
1504
1505         * Shared/ShareableBitmap.h: Added createCGImage helper function.
1506
1507         * Shared/cg/ShareableBitmapCG.cpp:
1508         (WebKit::ShareableBitmap::makeCGImageCopy): Don't compile this version of this function on
1509         Windows; we'll provide our own implementation since CGBitmapContextCreateImage isn't smart
1510         enough to make a copy-on-write copy on Windows.
1511         (WebKit::ShareableBitmap::makeCGImage): Moved some code from here...
1512         (WebKit::ShareableBitmap::createCGImage): ...to this new function.
1513
1514         * Shared/cg/win/ShareableBitmapCGWin.cpp: Added.
1515         (WebKit::derefSharedMemory): This function is called when the CGDataProvider is finalized.
1516         All we have to do is deref the SharedMemory that was backing the CGDataProvider.
1517         (WebKit::ShareableBitmap::makeCGImageCopy): Create a copy-on-write copy of the image data
1518         when possible. We use the copy-on-write copy to back this ShareableBitmap from here on out,
1519         and use the original SharedMemory to back the CGImage. This should prevent future
1520         modifications to the ShareableBitmap from affecting the CGImage. If we can't make a
1521         copy-on-write copy, we fall back to just copying the data normally.
1522
1523         * win/WebKit2.vcproj: Added ShareableBitmapCGWin.cpp.
1524
1525 2011-05-04  Adam Roben  <aroben@apple.com>
1526
1527         Let transparent windowless plugins draw into a graphics context with an alpha channel
1528
1529         Fixes <http://webkit.org/b/57647> <rdar://problem/9168462> Flash plugins with
1530         wmode=transparent have black (instead of transparent) background in WebKit2 on Windows
1531
1532         I had trouble writing a test case for this, so I split that task out into
1533         <http://webkit.org/b/60169>.
1534
1535         Reviewed by Sam Weinig.
1536
1537         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1538         (WebKit::NetscapePlugin::platformPaint): Give the graphics context an alpha channel if this
1539         is a transparent windowless plugin.
1540
1541 2011-05-03  Adam Roben  <aroben@apple.com>
1542
1543         Remove WebPageProxy::setDrawingArea
1544
1545         It is unused. It also does a useless equality comparison between OwnPtrs; if they are equal,
1546         we've already lost.
1547
1548         Reviewed by Anders Carlsson and Antti Koivisto.
1549
1550         * UIProcess/WebPageProxy.cpp:
1551         * UIProcess/WebPageProxy.h:
1552         Removed setDrawingArea.
1553
1554         (WebKit::WebPageProxy::drawingArea):
1555         (WebKit::WebPageProxy::backForwardList):
1556         Made these functions const while I was at it.
1557
1558 2011-05-03  Pratik Solanki  <psolanki@apple.com>
1559
1560         Reviewed by Antti Koivisto.
1561
1562         Part of WebCore should use CFNetwork-based loader on Mac
1563         https://bugs.webkit.org/show_bug.cgi?id=51836
1564
1565         Merge the conflicting definitions of WebCore::privateBrowsingCookieStorage() into one.
1566
1567         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp:
1568         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
1569
1570 2011-05-02  Jer Noble  <jer.noble@apple.com>
1571
1572         Reviewed by Adam Roben.
1573
1574         Implement FULLSCREEN_API on Windows, Part 3: WebKit2
1575         https://bugs.webkit.org/show_bug.cgi?id=59845
1576
1577         Implement a similar full screen mode to WebKit; Re-use the same
1578         full screen window class used in WebKit in the new WebFullScreenController.
1579         No animations (yet), so many of the stubs remain unimplemented.
1580
1581         * UIProcess/win/WebView.cpp:
1582         (WebKit::WebView::onKeyEvent): Handle VK_ESCAPE and cancel full screen
1583             mode if caught.
1584         (WebKit::WebView::fullScreenController): Lazily instantiate m_fullScreenController.
1585         (WebKit::WebView::fullScreenClientWindow): Added accessor.
1586         (WebKit::WebView::fullScreenClientParentWindow): Ditto.
1587         (WebKit::WebView::fullScreenClientSetParentWindow): Ditto.
1588         (WebKit::WebView::fullScreenClientWillEnterFullScreen): Pass through to WebFullScreenManagerProxy.
1589         (WebKit::WebView::fullScreenClientDidEnterFullScreen): Ditto.
1590         (WebKit::WebView::fullScreenClientWillExitFullScreen): Ditto.
1591         (WebKit::WebView::fullScreenClientDidExitFullScreen): Ditto.
1592         * UIProcess/win/WebView.h:
1593         * UIProcess/win/WebFullScreenManagerProxyWin.cpp:
1594         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Pass through to 
1595             WebFullScreenController.
1596         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
1597         * UIProcess/win/WebView.cpp:
1598         (WebKit::WebView::WebView):
1599         (WebKit::WebView::onKeyEvent): Handle the escape key and exit
1600            full screen mode when detected.
1601         (WebKit::WebView::fullScreenWindowController): Added.
1602         * UIProcess/win/WebView.h:
1603         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp:
1604         (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin):
1605         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Host the root
1606             full screen layer if it gets detached.
1607         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h:
1608         * win/WebKit2.vcproj:
1609
1610 2011-05-03  Brady Eidson  <beidson@apple.com>
1611
1612         Reviewed by Sam Weinig.
1613
1614         https://bugs.webkit.org/show_bug.cgi?id=60087 and <rdar://problem/9373182>
1615         WK2 Icon Database should provide access to all image representations in the icon.
1616
1617         Expose a CFArrayRef of CGImageRefs as API for CG platforms:
1618         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
1619         (WKIconDatabaseTryCopyCGImageArrayForURL):
1620         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
1621
1622 2011-05-03  Sam Weinig  <sam@webkit.org>
1623
1624         Reviewed by Dan Bernstein.
1625
1626         WebKit2 should treat API calls that start/stop loads as user gestures for responsiveness timer
1627         https://bugs.webkit.org/show_bug.cgi?id=60083
1628
1629         * UIProcess/WebPageProxy.cpp:
1630         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
1631         (WebKit::WebPageProxy::tryClose):
1632         (WebKit::WebPageProxy::loadURL):
1633         (WebKit::WebPageProxy::loadURLRequest):
1634         (WebKit::WebPageProxy::loadHTMLString):
1635         (WebKit::WebPageProxy::loadAlternateHTMLString):
1636         (WebKit::WebPageProxy::loadPlainTextString):
1637         (WebKit::WebPageProxy::stopLoading):
1638         (WebKit::WebPageProxy::reload):
1639         (WebKit::WebPageProxy::goForward):
1640         (WebKit::WebPageProxy::goBack):
1641         (WebKit::WebPageProxy::goToBackForwardItem):
1642         Start responsiveness timer for load start/stop and close.
1643
1644         * WebProcess/WebPage/WebPage.cpp:
1645         (WebKit::SendStopResponsivenessTimer::SendStopResponsivenessTimer):
1646         (WebKit::SendStopResponsivenessTimer::~SendStopResponsivenessTimer):
1647         Add simple RAII class to ensure the StopResponsivenessTimer is called.
1648
1649         (WebKit::WebPage::tryClose):
1650         (WebKit::WebPage::loadURLRequest):
1651         (WebKit::WebPage::loadData):
1652         (WebKit::WebPage::stopLoading):
1653         (WebKit::WebPage::reload):
1654         (WebKit::WebPage::goForward):
1655         (WebKit::WebPage::goBack):
1656         (WebKit::WebPage::goToBackForwardItem):
1657         Sends a message back to the UIProcess to indicate the WebProcess
1658         is still responsive.
1659
1660 2011-05-03  Darin Adler  <darin@apple.com>
1661
1662         Reviewed by Sam Weinig.
1663
1664         <rdar://problem/9250444> Enter key doesn't work in a web text field (but Return key does)
1665
1666         No test at this time because the WebKit2 eventSender doesn't use this code path.
1667
1668         * Shared/mac/WebEventFactory.mm:
1669         (WebKit::WebEventFactory::createWebKeyboardEvent): Copied the code to special-case certain
1670         keys from the corresponding Mac WebKit1 code path.
1671
1672 2011-05-03  Jeff Miller  <jeffm@apple.com>
1673
1674         Reviewed by Darin Adler.
1675
1676         Unreachable URL is lost when canceling load of a new page
1677         https://bugs.webkit.org/show_bug.cgi?id=60057
1678         <rdar://problem/9049135>
1679         
1680         When setting the unreachable URL in the WebFrameProxy, keep track of any previous unreachable URL
1681         so we can restore it if the page load fails.
1682
1683         * UIProcess/WebFrameProxy.cpp:
1684         (WebKit::WebFrameProxy::didFailProvisionalLoad): Restore m_unreachableURL to previous value.
1685         (WebKit::WebFrameProxy::setUnreachableURL): Keep track of previous unreachable URL in m_lastUnreachableURL.
1686         * UIProcess/WebFrameProxy.h: Moved setUnreachableURL() implementation to .cpp file, added m_lastUnreachableURL.
1687
1688 2011-05-03  Adam Roben  <aroben@apple.com>
1689
1690         Fix most strict PassOwnPtr violations on Windows
1691
1692         Fixes <http://webkit.org/b/60025> Windows should (almost) build with strict PassOwnPtr
1693         enabled
1694
1695         Reviewed by Anders Carlsson.
1696
1697         * Platform/CoreIPC/win/ConnectionWin.cpp:
1698         (CoreIPC::Connection::writeEventHandler): Use nullptr.
1699
1700 2011-05-03  Julien Chaffraix  <jchaffraix@codeaurora.org>
1701
1702         Reviewed by Dimitri Glazkov.
1703
1704         Element:shadowRoot & Element::ensureShadowRoot should return ShadowRoot*
1705         https://bugs.webkit.org/show_bug.cgi?id=58703
1706
1707         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: Added #include for ShadowRoot.h.
1708
1709 2011-05-03  Sam Weinig  <sam@webkit.org>
1710
1711         Reviewed by Anders Carlsson.
1712
1713         More quarantine related sandbox denial when downloading files
1714         <rdar://problem/9362626>
1715
1716         * WebProcess/com.apple.WebProcess.sb:
1717
1718 2011-05-02  Adam Roben  <aroben@apple.com>
1719
1720         Take advantage of implicit conversion from nullptr_t to PassOwnPtr
1721
1722         Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
1723         doesn't work, but should
1724
1725         Reviewed by Adam Barth.
1726
1727         * Platform/CoreIPC/Connection.cpp:
1728         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1729         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1730         * WebProcess/WebPage/DrawingArea.cpp:
1731
1732 2011-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1733
1734         Reviewed by Eric Seidel.
1735
1736         [GTK] Build webkit1 even when webkit2 is enabled
1737         https://bugs.webkit.org/show_bug.cgi?id=59695
1738
1739         * GNUmakefile.am:
1740
1741 2011-05-02  Yael Aharon  <yael.aharon@nokia.com>
1742
1743         Reviewed by Andreas Kling.
1744
1745         [Qt] White screen displays when using MiniBrowser with DrawingAreaImpl
1746         https://bugs.webkit.org/show_bug.cgi?id=60003
1747
1748         When using DrawingAreaImpl, we need to properly pass the viewSize to the WebPage.
1749         Otherwise, the dirty rect will always be empty and we will not draw.
1750
1751         * UIProcess/API/qt/qwkpage.cpp:
1752         (QWKPagePrivate::viewSize):
1753
1754 2011-05-02  Anders Carlsson  <andersca@apple.com>
1755
1756         Fix crash that was introduced in r85515.
1757
1758         * Platform/CoreIPC/Connection.cpp:
1759         (CoreIPC::Connection::dispatchSyncMessage):
1760         If didReceiveSyncMessage returns ManualReply, the client took ownership of the reply
1761         encoder so we must leak it to avoid a double-free.
1762
1763 2011-05-02  Anders Carlsson  <andersca@apple.com>
1764
1765         Reviewed by Sam Weinig.
1766
1767         The web process locks up when the plug-in process crashes
1768         https://bugs.webkit.org/show_bug.cgi?id=59999
1769         <rdar://problem/8889303>
1770
1771         Add a hash map from plug-in paths to CoreIPC connections to PluginProcessConnectionManager.
1772         Add PluginProcessConnectionManager::pluginProcessCrashed and make it look up the corresponding
1773         CoreIPC connection and call postConnectionDidCloseOnConnectionWorkQueue on it.
1774
1775         * Platform/CoreIPC/Connection.cpp:
1776         (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
1777         * Platform/CoreIPC/Connection.h:
1778         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1779         (WebKit::PluginProcessConnectionManager::getPluginProcessConnection):
1780         (WebKit::PluginProcessConnectionManager::removePluginProcessConnection):
1781         (WebKit::PluginProcessConnectionManager::pluginProcessCrashed):
1782         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1783         * WebProcess/WebProcess.cpp:
1784         (WebKit::WebProcess::pluginProcessCrashed):
1785
1786 2011-05-02  Anders Carlsson  <andersca@apple.com>
1787
1788         Try to fix Windows build.
1789
1790         * Scripts/webkit2/messages.py:
1791         * Scripts/webkit2/messages_unittest.py:
1792
1793 2011-05-02  Anders Carlsson  <andersca@apple.com>
1794
1795         Reviewed by Oliver Hunt.
1796
1797         Dispatch the PluginProcessCrashed on the connection work queue
1798         https://bugs.webkit.org/show_bug.cgi?id=59996
1799
1800         * WebProcess/WebProcess.cpp:
1801         (WebKit::WebProcess::initialize):
1802         Add the web process as a queue client.
1803
1804         (WebKit::WebProcess::terminate):
1805         Remove the web process as a queue client.
1806
1807         (WebKit::WebProcess::willProcessMessageOnClientRunLoop):
1808         Try calling willProcessWebProcessMessageOnClientRunLoop.
1809
1810         * WebProcess/WebProcess.messages.in:
1811         Add the DispatchOnConnectionQueue attribute to PluginProcessCrashed.
1812
1813 2011-05-02  Anders Carlsson  <andersca@apple.com>
1814
1815         Reviewed by Sam Weinig.
1816
1817         Send a PluginProcessCrashed message to all web processes when a plug-in crashes
1818         https://bugs.webkit.org/show_bug.cgi?id=59994
1819
1820         * UIProcess/Plugins/PluginProcessProxy.cpp:
1821         (WebKit::PluginProcessProxy::didClose):
1822         Iterate over all contexts and send PluginProcessCrashed to all web processes in each context.
1823
1824         (WebKit::PluginProcessProxy::didFinishLaunching):
1825         Call setShouldCloseConnectionOnMachExceptions on the CoreIPC connection.
1826
1827         * WebProcess/WebProcess.cpp:
1828         (WebKit::WebProcess::pluginProcessCrashed):
1829         Add empty stub.
1830
1831         * WebProcess/WebProcess.messages.in:
1832         Add message.
1833
1834 2011-05-02  Anders Carlsson  <andersca@apple.com>
1835
1836         Reviewed by Simon Fraser.
1837
1838         Plug-in not completely repainted after a crash
1839         https://bugs.webkit.org/show_bug.cgi?id=59991
1840
1841         Call Widget::invalidate().
1842
1843         * WebProcess/Plugins/PluginView.cpp:
1844         (WebKit::PluginView::pluginProcessCrashed):
1845
1846 2011-05-02  Anders Carlsson  <andersca@apple.com>
1847
1848         Reviewed by Dan Bernstein.
1849
1850         Make PluginProcessConnectionManager a member of WebProcess
1851         https://bugs.webkit.org/show_bug.cgi?id=59989
1852
1853         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
1854         * WebProcess/Plugins/PluginProcessConnectionManager.h:
1855         * WebProcess/Plugins/PluginProxy.cpp:
1856         (WebKit::PluginProxy::initialize):
1857         * WebProcess/WebProcess.h:
1858         (WebKit::WebProcess::pluginProcessConnectionManager):
1859
1860 2011-05-02  Mark Rowe  <mrowe@apple.com>
1861
1862         Reviewed by Brady Eidson.
1863
1864         <rdar://problem/9371289> WebKit2 can persist an invalid current back/forward item index when URLs are filtered from back/forward list
1865
1866         * UIProcess/cf/WebBackForwardListCF.cpp:
1867         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): We need to update the current index to account for filtered items
1868         for all items before the current item in the array.
1869
1870 2011-05-02  Anders Carlsson  <andersca@apple.com>
1871
1872         Reviewed by Adam Roben.
1873
1874         Handle DispatchOnConnectionQueue for asynchronous messages
1875         https://bugs.webkit.org/show_bug.cgi?id=59959
1876
1877         If any asynchronous messages have the DispatchOnConnectionQueue attribute, 
1878         create a new willProcess{Receiver}MessageOnClientRunLoop.
1879
1880         * Scripts/webkit2/messages.py:
1881         - Fix a regex bug where we would only parse attributes on synchronous messages.
1882         - Collect messages with the dispatch_on_connection_queue flag set. We only handle
1883           asynchronous messages currently; sync message support will be added when/if the
1884           need arises.
1885
1886         * Scripts/webkit2/messages_unittest.py:
1887         Update test.
1888
1889 2011-05-02  Adam Barth  <abarth@webkit.org>
1890
1891         Reviewed by David Levin.
1892
1893         PLATFORM(MAC) should (almost!) build with strict PassOwnPtr
1894         https://bugs.webkit.org/show_bug.cgi?id=59924
1895
1896         * Platform/CoreIPC/Connection.cpp:
1897         (CoreIPC::Connection::sendSyncMessage):
1898         (CoreIPC::Connection::waitForSyncReply):
1899         (CoreIPC::Connection::dispatchSyncMessage):
1900         * Platform/CoreIPC/Connection.h:
1901         (CoreIPC::Connection::Message::releaseArguments):
1902             - The memory management for this class is very strange.  I wrote a
1903               large comment.  Hopefully a kind soul will come by and fix it.
1904         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1905         (WebKit::NetscapePluginModule::unload):
1906         * UIProcess/API/mac/WKView.mm:
1907         (-[WKView _setFindIndicator:fadeOut:]):
1908         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1909         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer):
1910         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1911         (WebKit::toStringVector):
1912         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
1913         (WebKit::NetscapePluginStream::stop):
1914         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
1915         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
1916         * WebProcess/WebPage/DrawingArea.cpp:
1917         (WebKit::DrawingArea::create):
1918
1919 2011-04-29  Chris Marrin  <cmarrin@apple.com>
1920
1921         Reviewed by Simon Fraser.
1922
1923         Pages with accelerated compositing do not redraw unless scrolled
1924         https://bugs.webkit.org/show_bug.cgi?id=59851
1925
1926         Added a setNeedDisplay on the non-composited content layer after
1927         the size is changed so it paints the full size of the layer. Called
1928         only for the areas newly exposed, if any.
1929
1930         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1931         (WebKit::LayerTreeHostCA::sizeDidChange):
1932
1933 2011-05-02  Anders Carlsson  <andersca@apple.com>
1934
1935         Reviewed by Adam Roben.
1936
1937         Need a way to handle CoreIPC messages on the connection work queue
1938         https://bugs.webkit.org/show_bug.cgi?id=59954
1939
1940         Add a Connection::QueueClient abstract class. This class has a single pure virtual
1941         member function, willProcessMessageOnClientRunLoop which should return true if the message 
1942         should be forwarded to the next Connection::QueueClient in the list or Connection::Client's 
1943         run loop for processing and false otherwise. Users of Connection can use addQueueClient to
1944         add clients and all messages will be dispatched  to the queue clients first.
1945
1946         * Platform/CoreIPC/Connection.cpp:
1947         (CoreIPC::Connection::addQueueClient):
1948         (CoreIPC::Connection::removeQueueClient):
1949         (CoreIPC::Connection::processIncomingMessage):
1950         * Platform/CoreIPC/Connection.h:
1951         (CoreIPC::Connection::QueueClient::~QueueClient):
1952
1953 2011-05-02  Jeff Miller  <jeffm@apple.com>
1954
1955         Reviewed by Adam Roben.
1956
1957         WebKit2 thinks the web process is unresponsive when a plugin displays a context menu
1958         https://bugs.webkit.org/show_bug.cgi?id=59124
1959         <rdar://problem/9318600>
1960         
1961         This is the Windows version of <https://bugs.webkit.org/show_bug.cgi?id=58943>.
1962
1963         Since we have no control over how long a plugin will take to handle an event, we need
1964         to tell the UI process to stop its responsive timer when we're about to send an event
1965         to the plugin. The downside of doing this is that if the plugin does become unresponsive,
1966         the user won't know this immediately until they click on the web page again.  At that point,
1967         if the web process is unresponsive because of a hung plugin, the responsiveness timer will fire.
1968         
1969         We're only doing this on Windows currently when running plugins in the web process (Anders fixed
1970         bug 58943 in a different way when running plugins in a separate plugin process on the Mac).
1971
1972         * PluginProcess/PluginControllerProxy.cpp:
1973         (WebKit::PluginControllerProxy::willSendEventToPlugin): Added, not used when running plugins in a separate process.
1974         * PluginProcess/PluginControllerProxy.h: Added willSendEventToPlugin().
1975
1976         * UIProcess/WebPageProxy.cpp:
1977         (WebKit::WebPageProxy::stopResponsivenessTimer): Added.
1978         * UIProcess/WebPageProxy.h: Added stopResponsivenessTimer().
1979         * UIProcess/WebPageProxy.messages.in: Added StopResponsivenessTimer message.
1980
1981         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1982         (WebKit::NetscapePlugin::platformPaint): Tell our controller when we're about to send an event to the plugin.
1983         (WebKit::NetscapePlugin::platformHandleMouseEvent): Ditto.
1984         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Ditto.
1985         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Ditto.
1986
1987         * WebProcess/Plugins/PluginController.h: Added willSendEventToPlugin().
1988         * WebProcess/Plugins/PluginView.cpp:
1989         (WebKit::PluginView::willSendEventToPlugin): Added, tell the UI process to stop its responsiveness timer.
1990         * WebProcess/Plugins/PluginView.h: Added willSendEventToPlugin().
1991
1992 2011-04-29  Steve Falkenburg  <sfalken@apple.com>
1993
1994         Reviewed by Maciej Stachowiak.
1995
1996         Plug-in failed to initialize message should be called when Java fails to initialize
1997         https://bugs.webkit.org/show_bug.cgi?id=59856
1998         
1999         To match the WebKit1 behavior, WebKit2 should dispatch the plug-in failed
2000         to initialize message when we can't instantiate the Java plug-in.
2001
2002         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2003         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
2004
2005 2011-05-02  Sam Weinig  <sam@webkit.org>
2006
2007         Reviewed by Adam Barth.
2008
2009         Prune some #includes from DOMWindow.h
2010         https://bugs.webkit.org/show_bug.cgi?id=59907
2011
2012         * WebProcess/WebPage/WebFrame.cpp:
2013         Add now missing SecurityOrigin.h #include.
2014
2015 2011-04-29  Brian Weinstein  <bweinstein@apple.com>
2016
2017         Reviewed by Dan Bernstein.
2018
2019         WebKit2: Crash closing tab with docked Web Inspector
2020         https://bugs.webkit.org/show_bug.cgi?id=59914
2021         <rdar://problem/9359672>
2022         
2023         When a tab is closed with a docked inspector, invalidate called platformClose, which
2024         didn't do the tear down that is needed, but is called when we close the web inspector explcitly.
2025         One part of tear down we weren't doing is removing ourselves as a WindowMessageBrodcaster listener
2026         on the inspected web view, and this can cause crashes.
2027         
2028         This patch also renames platformClose to platformDidClose, to be clearer about when the function
2029         is called.
2030
2031         * UIProcess/WebInspectorProxy.cpp:
2032         (WebKit::WebInspectorProxy::invalidate): Call didClose instead of platformClose.
2033         (WebKit::WebInspectorProxy::didClose): Call platformDidClose instead of platformClose.
2034         * UIProcess/WebInspectorProxy.h:
2035         * UIProcess/mac/WebInspectorProxyMac.mm:
2036         (WebKit::WebInspectorProxy::platformDidClose): Renamed from platformClose.
2037         * UIProcess/win/WebInspectorProxyWin.cpp:
2038         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2039         * UIProcess/gtk/WebInspectorGtk.cpp:
2040         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2041         * UIProcess/qt/WebInspectorProxyQt.cpp:
2042         (WebKit::WebInspectorProxy::platformDidClose): Ditto.
2043
2044 2011-05-01  Sam Weinig  <sam@webkit.org>
2045
2046         Reviewed by Anders Carlsson.
2047
2048         Prune some unnecessary #includes
2049         https://bugs.webkit.org/show_bug.cgi?id=59895
2050
2051         Start getting rid of unnecessary #includes and forward declares.
2052
2053         * WebProcess/Plugins/PluginView.cpp:
2054         * WebProcess/WebPage/WebPage.cpp:
2055
2056 2011-05-01  Patrick Gansterer  <paroga@webkit.org>
2057
2058         [WIN] Unreviewed buildfix after r85434.
2059
2060         * UIProcess/WebPageProxy.cpp:
2061         (WebKit::WebPageProxy::startDragDrop):
2062         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2063         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore):
2064         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
2065         * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp:
2066         (WebKit::WebDragClient::startDrag):
2067         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
2068         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
2069
2070 2011-05-01  Anders Carlsson  <andersca@apple.com>
2071
2072         Reviewed by Sam Weinig.
2073
2074         Can't open document from skydrive.com in Microsoft Word
2075         https://bugs.webkit.org/show_bug.cgi?id=59891
2076         <rdar://problem/9354285>
2077
2078         Add the AllowHalfBakedQuickDrawSupport quirk for the SharePoint plug-in.
2079
2080         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2081         (WebKit::NetscapePluginModule::determineQuirks):
2082
2083 2011-05-01  Anders Carlsson  <andersca@apple.com>
2084
2085         Reviewed by Sam Weinig.
2086
2087         Don't try to create a backing store for a 0x0 plug-in
2088         https://bugs.webkit.org/show_bug.cgi?id=59887
2089
2090         * WebProcess/Plugins/PluginProxy.cpp:
2091         (WebKit::PluginProxy::geometryDidChange):
2092
2093 2011-05-01  Anders Carlsson  <andersca@apple.com>
2094
2095         Reviewed by Kevin Decker.
2096
2097         Sandbox violation by WebProcess for DownloadAssessment.plist
2098         https://bugs.webkit.org/show_bug.cgi?id=59879
2099         <rdar://problem/9326041>
2100
2101         * WebProcess/com.apple.WebProcess.sb:
2102         Allow reading ~/Library/Preferences/com.apple.DownloadAssessment.plist
2103
2104 2011-05-01  Ivan Krstić  <ike@apple.com>
2105
2106         Reviewed by Maciej Stachowiak.
2107
2108         Remove unnecessary keychain and CoreAudio debris from WebProcess sandbox
2109         https://bugs.webkit.org/show_bug.cgi?id=59873
2110
2111         These rules have been obsoleted by <rdar://problem/9301520> and
2112         <rdar://problem/9181468>.
2113
2114         * WebProcess/com.apple.WebProcess.sb:
2115
2116 2011-05-01  Ivan Krstić  <ike@apple.com>
2117
2118         Reviewed by Maciej Stachowiak.
2119
2120         Simplify WebProcess sandbox with homedir-relative path filters.
2121         https://bugs.webkit.org/show_bug.cgi?id=59872
2122
2123         * WebProcess/com.apple.WebProcess.sb:
2124
2125 2011-05-01  Ivan Krstić  <ike@apple.com>
2126
2127         Reviewed by Maciej Stachowiak.
2128
2129         On-demand VPN support for sandboxed WebProcess.
2130         <rdar://problem/8994181>
2131
2132         * WebProcess/com.apple.WebProcess.sb:
2133
2134 2011-04-30  Ivan Krstić  <ike@apple.com>
2135
2136         Reviewed by Sam Weinig.
2137
2138         Reindent WebProcess sandbox to standard scheme style
2139         https://bugs.webkit.org/show_bug.cgi?id=59870
2140
2141         * WebProcess/com.apple.WebProcess.sb:
2142
2143 2011-04-28  Jer Noble  <jer.noble@apple.com>
2144
2145         Reviewed by Jon Honeycutt.
2146
2147         Implement FULLSCREEN_API on Windows, Part 1: Stubs
2148         https://bugs.webkit.org/show_bug.cgi?id=59778
2149
2150         Add Windows specific stubs for WebKit2 full screen APIs.
2151
2152         * UIProcess/win/WebFullScreenManagerProxyWin.cpp: Added.
2153         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Added stub.
2154         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Added stub.
2155         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
2156         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
2157         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
2158         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
2159         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
2160         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
2161         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
2162         * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Added.
2163         (WebKit::WebFullScreenManager::create): Added. Returns a WebFullScreenManagerWin.
2164         (WebKit::WebFullScreenManagerWin::create): Added.
2165         (WebKit::WebFullScreenManagerWin::WebFullScreenManagerWin): Added.
2166         (WebKit::WebFullScreenManagerWin::~WebFullScreenManagerWin): Added.
2167         (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Added stub.
2168         (WebKit::WebFullScreenManagerWin::beginEnterFullScreenAnimation): Added stub.
2169         (WebKit::WebFullScreenManagerWin::beginExitFullScreenAnimation): Added stub.
2170         * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Added.
2171         * win/WebKit2.vcproj: Added new classes.
2172
2173 2011-04-29  Alexey Proskuryakov  <ap@apple.com>
2174
2175         Reviewed by Simon Fraser and Dan Bernstein.
2176
2177         WebKit2: WebPluginTypeEnabled key is ignored when enumerating plug-ins
2178         https://bugs.webkit.org/show_bug.cgi?id=59852
2179         <rdar://problem/9314011>
2180
2181         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2182         (WebKit::getPluginInfoFromPropertyLists): Do what WebKit1 does (but in CF dialect). And yes,
2183         I've seen plists with both numbers and booleans used .
2184
2185 2011-04-29  Beth Dakin  <bdakin@apple.com>
2186
2187         Reviewed by Simon Fraser.
2188
2189         https://bugs.webkit.org/show_bug.cgi?id=59846
2190         Scrolling causes rounded bottom window corners to become square
2191         <rdar://problem/9234239>
2192
2193         Keep track of the m_windowBottomCornerIntersectionRect in WKView. 
2194         Invalidate the rect before scrolling. And if the rect is non-zero during a 
2195         display, mask the corners, then set the rect to zero so that only displays that 
2196         happen right after a scroll bother to do this.
2197         * UIProcess/API/mac/PageClientImpl.mm:
2198         (WebKit::PageClientImpl::scrollView):
2199         * UIProcess/API/mac/WKView.mm:
2200         (-[WKView displayIfNeeded]):
2201         (-[WKView _cacheWindowBottomCornerRect]):
2202         * UIProcess/API/mac/WKViewInternal.h:
2203
2204 2011-04-29  Jia Pu  <jpu@apple.com>
2205
2206         Reviewed by Sam Weinig.
2207
2208         [Mac] Scrolling WK2 window should dismiss autocorrection panel.
2209         https://bugs.webkit.org/show_bug.cgi?id=59809
2210         <rdar://problem/9317410>
2211
2212         * UIProcess/WebPageProxy.cpp:
2213         (WebKit::WebPageProxy::pageDidScroll): Dimiss autocorrection panel in this function.
2214
2215 2011-04-29  Alexey Proskuryakov  <ap@apple.com>
2216
2217         Reviewed by Dan Bernstein.
2218
2219         WebKit2: Typing with Input methods still enters Roman characters in Safari search field frequently
2220         https://bugs.webkit.org/show_bug.cgi?id=59829
2221         <rdar://problem/9336907>
2222
2223         This patch regresses behavior somewhat in that inline input isn't discarded when something
2224         happens in an inactive window. This doesn't work well in shipping Safari either.
2225
2226         * UIProcess/API/mac/WKView.mm:
2227         (-[WKView _notifyInputContextAboutDiscardedComposition]): Added a method that calls
2228         -discardMarkedText with a safety check.
2229         (-[WKView setMarkedText:selectedRange:replacementRange:]): Use it.
2230         (-[WKView _updateTextInputStateIncludingSecureInputState:]): Use it.
2231         (-[WKView _resetTextInputState]): Use it.
2232
2233 2011-04-29  Chris Fleizach  <cfleizach@apple.com>
2234
2235         Reviewed by Beth Dakin.
2236
2237         AX: Remote accessibility should build on snow leopard
2238         https://bugs.webkit.org/show_bug.cgi?id=59767
2239
2240         * UIProcess/API/mac/WKView.mm:
2241         (-[WKView _updateRemoteAccessibilityRegistration:]):
2242         (-[WKView viewDidMoveToWindow]):
2243         (-[WKView _setAccessibilityWebProcessToken:]):
2244         * WebProcess/WebPage/mac/WebPageMac.mm:
2245         (WebKit::WebPage::platformInitialize):
2246         (WebKit::WebPage::registerUIProcessAccessibilityTokens):
2247         * WebProcess/mac/WebProcessMainMac.mm:
2248         (WebKit::WebProcessMain):
2249
2250 2011-04-29  Sam Weinig  <sam@webkit.org>
2251
2252         Reviewed by Dan Bernstein.
2253
2254         Add protection for shared memory failing to allocate
2255         <rdar://problem/9125287>
2256         https://bugs.webkit.org/show_bug.cgi?id=59842
2257
2258         * Platform/mac/SharedMemoryMac.cpp:
2259         (WebKit::SharedMemory::create):
2260         Add logging in shared memory failure cases.
2261
2262         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2263         (WebKit::DrawingAreaImpl::display):
2264         Guard against ShareableBitmap failing to create a shared memory
2265         backing.
2266
2267 2011-04-28  Stephanie Lewis  <slewis@apple.com>
2268
2269         Reviewed by Darin Adler.
2270
2271         https://bugs.webkit.org/show_bug.cgi?id=59776
2272         <rdar://problem/9287113> REGRESSION: Safari cold/warm launch time 15% to 2x regression
2273         On the first draw the WebProcess is just going to send us blank bits anyway so don't 
2274         pause waiting for the update.  Continue drawing a blank window until the WebProcess
2275         sends us the update.
2276
2277         * UIProcess/DrawingAreaProxyImpl.cpp:
2278         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2279         (WebKit::DrawingAreaProxyImpl::paint):
2280         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2281         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2282         * UIProcess/DrawingAreaProxyImpl.h:
2283
2284 2011-04-29  Jon Lee  <jonlee@apple.com>
2285
2286         Reviewed by mitzpettel.
2287
2288         REGRESSION (WebKit2): (Mac) Selection is gone after switching tabs (59721)
2289         <rdar://problem/9327332>
2290         https://bugs.webkit.org/show_bug.cgi?id=59721
2291
2292         When resigning first responder status, check to see if we need to maintain an inactive
2293         selection in the web view. If we don't, we clear the selection.
2294
2295         This also reverts the change made in 83814, since that was a different attempt to solve this same issue.
2296
2297         * UIProcess/API/C/WKPage.cpp:
2298         (WKPageSetMaintainsInactiveSelection): Export setMaintainsInactiveSelection()
2299         * UIProcess/API/C/WKPage.h:
2300         * UIProcess/API/mac/WKView.mm:
2301         (-[WKView resignFirstResponder]): Check and see if we need to maintain the selection in the view prior to resigning.
2302         If not, we clear the selection
2303         * UIProcess/WebPageProxy.cpp:
2304         (WebKit::WebPageProxy::clearSelection): Send message across process boundary
2305         (WebKit::WebPageProxy::setMaintainsInactiveSelection): Sets variable
2306         * UIProcess/WebPageProxy.h: New member variable to keep track of whether we need to maintain the current selection
2307         (WebKit::WebPageProxy::maintainsInactiveSelection): Returns variable
2308         * WebProcess/WebPage/WebPage.cpp:
2309         (WebKit::WebPage::setFocused): Reverting code to just set the focused bit instead of also clearing the selection
2310         (WebKit::WebPage::clearSelection):
2311         * WebProcess/WebPage/WebPage.h:
2312         * WebProcess/WebPage/WebPage.messages.in: add new ClearSelection() message
2313
2314 2011-04-29  Anders Carlsson  <andersca@apple.com>
2315
2316         Reviewed by Darin Adler.
2317
2318         Application cache doesn't work due to a sandbox violation
2319         https://bugs.webkit.org/show_bug.cgi?id=59818
2320         <rdar://problem/9346971>
2321
2322         Add a sandbox extension for the application cache directory.
2323
2324         * Shared/WebProcessCreationParameters.cpp:
2325         (WebKit::WebProcessCreationParameters::encode):
2326         (WebKit::WebProcessCreationParameters::decode):
2327         Encode and decode the sandbox extension handle.
2328
2329         * Shared/WebProcessCreationParameters.h:
2330         Add a applicationCacheDirectoryExtensionHandle member.
2331
2332         * UIProcess/WebContext.cpp:
2333         (WebKit::WebContext::ensureWebProcess):
2334         If we have a non-empty application cache directory, create a sandbox extension
2335         and pass it to the creation parameters.
2336
2337         * WebProcess/WebProcess.cpp:
2338         (WebKit::WebProcess::initializeWebProcess):
2339         Create and consume a sandbox extension.
2340
2341         * WebProcess/WebProcess.h:
2342         Add an m_applicationCachePathExtension member variable.
2343
2344 2011-04-29  Dean Jackson  <dino@apple.com>
2345
2346         Reviewed by Simon Fraser.
2347
2348         Add ENABLE macro for WebKitAnimation
2349         https://bugs.webkit.org/show_bug.cgi?id=59729
2350
2351         Add new feature to toggle WebKit Animation API.
2352
2353         * Configurations/FeatureDefines.xcconfig:
2354
2355 2011-04-29  Anders Carlsson  <andersca@apple.com>
2356
2357         Reviewed by Brian Weinstein.
2358
2359         Crash when closing a tab that is unresponsive
2360         https://bugs.webkit.org/show_bug.cgi?id=59810
2361         <rdar://problem/9329133>
2362
2363         Back out r84643 - there was no rationale for this change, and it's causing crashes.
2364
2365         * UIProcess/WebPageProxy.cpp:
2366         (WebKit::WebPageProxy::close):
2367         (WebKit::WebPageProxy::processDidCrash):
2368
2369 2011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2370
2371         Reviewed by Martin Robinson.
2372
2373         [GTK] Rename page as pageProxy in WebKitWebViewBase
2374         https://bugs.webkit.org/show_bug.cgi?id=59790
2375
2376         To avoid consufion between page client and page proxy. Also rename
2377         some methods to webkitWebViewBase* for consistency.
2378
2379         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2380         (webkitWebViewBaseFinalize):
2381         (webkitWebViewBaseExpose):
2382         (webkitWebViewBaseDraw):
2383         (webkitWebViewBaseSizeAllocate):
2384         (webkitWebViewBaseFocusInEvent):
2385         (webkitWebViewBaseFocusOutEvent):
2386         (webkitWebViewBaseKeyPressEvent):
2387         (webkitWebViewBaseKeyReleaseEvent):
2388         (webkitWebViewBaseButtonPressEvent):
2389         (webkitWebViewBaseButtonReleaseEvent):
2390         (webkitWebViewBaseScrollEvent):
2391         (webkitWebViewBaseMotionNotifyEvent):
2392         (webkit_web_view_base_class_init):
2393         (webkitWebViewBaseCreate):
2394         (webkitWebViewBaseGetPage):
2395
2396 2011-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
2397
2398         Unreviewed. Fix a crash after r85214.
2399
2400         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2401         (webkit_web_view_base_init): Add line to create the page client
2402         instance, removed by mistake in r85214.
2403
2404 2011-04-28  David Levin  <levin@chromium.org>
2405
2406         Reviewed by Adam Barth.
2407
2408         Remove IMAGE_RESIZER related code.
2409         https://bugs.webkit.org/show_bug.cgi?id=59735
2410
2411         * Configurations/FeatureDefines.xcconfig:
2412
2413 2011-04-28  Sam Weinig  <sam@webkit.org>
2414
2415         Reviewed by Gavin Barraclough.
2416
2417         Original patch by Austin Jennings.
2418
2419         <rdar://problem/9350288>
2420         Update sandbox profile for extension changes
2421
2422         * WebProcess/com.apple.WebProcess.sb:
2423
2424 2011-04-28  Anders Carlsson  <andersca@apple.com>
2425
2426         Reviewed by Darin Adler.
2427
2428         Right-clicking on a Flash movie in an iframe shows the browser context menu
2429         https://bugs.webkit.org/show_bug.cgi?id=59760
2430         <rdar://problem/9340541>
2431
2432         Move context menu event handling out into a separate function. Make sure to call
2433         EventHandler::sendContextMenuEvent on the event handler belonging to the frame of the
2434         node that was clicked, and not the main frame.
2435
2436         * WebProcess/WebPage/WebPage.cpp:
2437         (WebKit::handleContextMenuEvent):
2438         (WebKit::handleMouseEvent):
2439
2440 2011-04-28  Adam Barth  <abarth@webkit.org>
2441
2442         Reviewed by Eric Seidel.
2443
2444         Remove WML
2445         https://bugs.webkit.org/show_bug.cgi?id=59678
2446
2447         Remove WML-related code in WebKit2.
2448
2449         * Configurations/FeatureDefines.xcconfig:
2450         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2451         * WebProcess/WebPage/WebBackForwardListProxy.h:
2452
2453 2011-04-28  Alexey Proskuryakov  <ap@apple.com>
2454
2455         Reviewed by Anders Carlsson.
2456
2457         WebKit2: Frequent crashes in acceptsFirstMouse
2458         https://bugs.webkit.org/show_bug.cgi?id=59746
2459         <rdar://problem/9281270>
2460
2461         The crash occurred when connection was null (and it can become null at any time).
2462
2463         Added checks for the proxy being valid in all sync calls that lacked such.
2464         WebPageProxy::isValid() is not the same as WebProcessProxy::isValid(), but existing checks
2465         looked at the former, so I used that.
2466
2467         * UIProcess/WebPageProxy.cpp:
2468         (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange):
2469         (WebKit::WebPageProxy::getSelectedText):
2470         (WebKit::WebPageProxy::gestureWillBegin):
2471         (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
2472         * UIProcess/mac/WebPageProxyMac.mm:
2473         (WebKit::WebPageProxy::setComposition):
2474         (WebKit::WebPageProxy::confirmComposition):
2475         (WebKit::WebPageProxy::confirmCompositionWithoutDisturbingSelection):
2476         (WebKit::WebPageProxy::insertText):
2477         (WebKit::WebPageProxy::getMarkedRange):
2478         (WebKit::WebPageProxy::getSelectedRange):
2479         (WebKit::WebPageProxy::getAttributedSubstringFromRange):
2480         (WebKit::WebPageProxy::characterIndexForPoint):
2481         (WebKit::WebPageProxy::firstRectForCharacterRange):
2482         (WebKit::WebPageProxy::executeKeypressCommands):
2483         (WebKit::WebPageProxy::writeSelectionToPasteboard):
2484         (WebKit::WebPageProxy::readSelectionFromPasteboard):
2485         (WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
2486         (WebKit::WebPageProxy::acceptsFirstMouse):
2487
2488 2011-04-27  Brian Weinstein  <bweinstein@apple.com>
2489
2490         Reviewed by Timothy Hatcher.
2491
2492         Mac side of: WebKit2: Support docked mode for Web Inspector
2493         https://bugs.webkit.org/show_bug.cgi?id=59134
2494         <rdar://problem/8739005>
2495
2496         Implement docking of the Web Inspector on Mac. This matches the Windows (WK1 and WK2) closely,
2497         where the inspector and the inspected view are siblings.
2498
2499         * UIProcess/API/C/mac: Added.
2500         * UIProcess/API/C/mac/WKInspectorMac.h: Added.
2501         * UIProcess/API/mac/PageClientImpl.h:
2502         (WebKit::PageClientImpl::wkView): Returns the WKView.
2503         * UIProcess/PageClient.h:
2504         * UIProcess/WebInspectorProxy.h: The inspected view is now a WebInspectorWKView, so we can override tag.
2505         * UIProcess/WebPageProxy.h: Added a getter for the WKView.
2506
2507         * UIProcess/mac/WebInspectorProxyMac.mm:
2508         (-[WebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Calls through to WebInspectorProxy::inspectedViewFrameDidChange.
2509         (-[WebInspectorWKView tag]): Returns a constant defined in WKInspectorMac.h.
2510         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create a WebInspectorWKView instead of a WKView.
2511         (WebKit::WebInspectorProxy::platformClose): Removed a FIXME that isn't needed anymore (we always detach before closing).
2512         (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Place our inspector and the inspected view next to each other, assuming the
2513             bottom of the inspector is at the Y origin.
2514         (WebKit::WebInspectorProxy::platformAttach): Listen for changes to the inspected view's frame, and move the inspectorView from the
2515             detached inspector window to the superview of the inspected view (to make the inspector and inspected view siblings).
2516         (WebKit::WebInspectorProxy::platformDetach): Stop listening for changes to the inspected view's frame, and move the inspectorView
2517             back to the detached inspector window. We also resize the inspected view to take up the space the inspector took up before
2518             (assuming the bottom of the inspector was at the Y origin).
2519         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Resize the inspector's view, and call inspectedViewFrameDidChange (which
2520             syncs the inspector and the inspected view), and call setNeedsDisplay on both views.
2521         * UIProcess/mac/WebPageProxyMac.mm:
2522         (WebKit::WebPageProxy::wkView):
2523         
2524         * WebKit2.xcodeproj/project.pbxproj: Add a new file.
2525
2526 2011-04-28  Jessie Berlin  <jberlin@apple.com>
2527
2528         Reviewed by Darin Adler.
2529
2530         Crash under WKPageCreateSnapshotOfVisibleContent if there is no response from the Web Process
2531         in the allotted time.
2532         https://bugs.webkit.org/show_bug.cgi?id=59738
2533
2534         If the handle is null, don't try to create a ShareableBitmap and then a WebImage out of it.
2535
2536         * UIProcess/WebPageProxy.cpp:
2537         (WebKit::WebPageProxy::createSnapshotOfVisibleContent):
2538
2539 2011-04-28  Xan Lopez  <xlopez@igalia.com>
2540
2541         Reviewed by Martin Robinson.
2542
2543         [Gtk] Split JSC and WebCore builds
2544         https://bugs.webkit.org/show_bug.cgi?id=19428
2545
2546         Build JavaScriptCore as a libtool shared library instead of a
2547         private convenience library.
2548
2549         * GNUmakefile.am: adapt to new name for javascriptcore target.
2550
2551 2011-04-28  Brady Eidson  <beidson@apple.com>
2552
2553         Reviewed by Sam Weinig.
2554
2555         <rdar://problem/8773946> and https://bugs.webkit.org/show_bug.cgi?id=59614
2556         Client certificate authentication in WebKit2
2557
2558         Project-file stuff:
2559         * WebKit2.xcodeproj/project.pbxproj:
2560
2561         Allow WKCredentials to store certificates:
2562         * UIProcess/Authentication/WebCredential.cpp:
2563         (WebKit::WebCredential::WebCredential):
2564         (WebKit::WebCredential::certificateInfo):
2565         * UIProcess/Authentication/WebCredential.h:
2566         (WebKit::WebCredential::create):
2567         * UIProcess/API/C/WKCredential.cpp:
2568         (WKCredentialCreateWithCertificateInfo):
2569         * UIProcess/API/C/WKCredential.h:
2570
2571         Pass the certificate info over the wire to the WebProcess:
2572         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2573         (WebKit::AuthenticationChallengeProxy::useCredential): 
2574
2575         Change the WebProcess to prefer certificate info over basic credentials when responding to a challenge:
2576         * WebProcess/Authentication/AuthenticationManager.cpp:
2577         (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Stub for platforms other than Mac,
2578           as only Mac can currently respond to challenges with certificates.
2579         (WebKit::AuthenticationManager::useCredentialForChallenge):
2580         * WebProcess/Authentication/AuthenticationManager.h:
2581         * WebProcess/Authentication/AuthenticationManager.messages.in:
2582         * WebProcess/Authentication/mac: Added.
2583         * WebProcess/Authentication/mac/AuthenticationManager.mac.mm: Added.
2584         (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Recreate the identity and certificate
2585           chain and respond to the challenge with it.
2586
2587         Add a newly required #include:
2588         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
2589         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
2590
2591 2011-04-28  Martin Robinson  <mrobinson@igalia.com>
2592
2593         Reviewed by Xan Lopez.
2594
2595         [GTK] Click counting logic should be shared between WebKit1 and WebKit2
2596         https://bugs.webkit.org/show_bug.cgi?id=59715
2597
2598         Use the GtkClickCounter instead of doing click counting manually. This means that
2599         the code will now be shared between WebKit1 and WebKit2.
2600
2601         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2602         (webkit_web_view_base_init): Remove private member initialization.
2603         (webViewButtonPressEvent): Call into GtkClickCounter.
2604
2605 2011-04-28  Martin Robinson  <mrobinson@igalia.com>
2606
2607         Build fix after r85197.
2608
2609         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2610         (webViewExpose): Use cr.get() here.
2611         (webViewDraw): Small clean up.
2612
2613 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2614
2615         Reviewed by Sam Weinig.
2616
2617         [GTK] Remove WKURLCreateWithURL()
2618         https://bugs.webkit.org/show_bug.cgi?id=59691
2619
2620         The name is a bit confusing and there's already
2621         WKURLCreateWithUTF8CString() in the C API.
2622
2623         * UIProcess/API/C/gtk/WKView.cpp:
2624         * UIProcess/API/C/gtk/WKView.h:
2625
2626 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2627
2628         Reviewed by Martin Robinson.
2629
2630         [GTK] Make WebKitWebViewBase public in the API
2631         https://bugs.webkit.org/show_bug.cgi?id=59689
2632
2633         Add WebKitWebViewBasePrivate.h and move WebKitWebViewBase inernal
2634         methods to it. Rename get_type() method, since it's part of the
2635         public API and should follow gtk coding style.
2636
2637         * GNUmakefile.am: Add WebKitWebViewBasePrivate.h.
2638         * UIProcess/API/C/gtk/WKView.cpp: Use WebKitWebViewBasePrivate.h.
2639         * UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
2640         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2641         (webkitWebViewBaseFinalize):
2642         (webkit_web_view_base_init):
2643         (webViewSizeAllocate):
2644         (webViewFocusInEvent):
2645         (webViewFocusOutEvent):
2646         (webViewKeyPressEvent):
2647         (webViewKeyReleaseEvent):
2648         (webkit_web_view_base_class_init):
2649         * UIProcess/API/gtk/WebKitWebViewBase.h:
2650         * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Copied from Source/WebKit2/UIProcess/API/C/gtk/WKView.cpp.
2651         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Use WebKitWebViewBasePrivate.h.
2652
2653 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2654
2655         Reviewed by Martin Robinson.
2656
2657         [GTK] Move WebView to UIProcess/API/gtk
2658         https://bugs.webkit.org/show_bug.cgi?id=59686
2659
2660         And rename it as PageClientImpl, since it's a page client
2661         implementation, not a web view.
2662
2663         * GNUmakefile.am:
2664         * UIProcess/API/C/gtk/WKView.cpp:
2665         * UIProcess/API/gtk/PageClientImpl.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebView.cpp.
2666         (WebKit::backspaceCallback):
2667         (WebKit::selectAllCallback):
2668         (WebKit::cutClipboardCallback):
2669         (WebKit::copyClipboardCallback):
2670         (WebKit::pasteClipboardCallback):
2671         (WebKit::toggleOverwriteCallback):
2672         (WebKit::popupMenuCallback):
2673         (WebKit::showHelpCallback):
2674         (WebKit::deleteFromCursorCallback):
2675         (WebKit::moveCursorCallback):
2676         (WebKit::PageClientImpl::PageClientImpl):
2677         (WebKit::PageClientImpl::~PageClientImpl):
2678         (WebKit::PageClientImpl::getEditorCommandsForKeyEvent):
2679         (WebKit::PageClientImpl::createDrawingAreaProxy):
2680         (WebKit::PageClientImpl::setViewNeedsDisplay):
2681         (WebKit::PageClientImpl::displayView):
2682         (WebKit::PageClientImpl::scrollView):
2683         (WebKit::PageClientImpl::viewSize):
2684         (WebKit::PageClientImpl::isViewWindowActive):
2685         (WebKit::PageClientImpl::isViewFocused):
2686         (WebKit::PageClientImpl::isViewVisible):
2687         (WebKit::PageClientImpl::isViewInWindow):
2688         (WebKit::PageClientImpl::PageClientImpl::processDidCrash):
2689         (WebKit::PageClientImpl::didRelaunchProcess):
2690         (WebKit::PageClientImpl::takeFocus):
2691         (WebKit::PageClientImpl::toolTipChanged):
2692         (WebKit::PageClientImpl::setCursor):
2693         (WebKit::PageClientImpl::setViewportArguments):
2694         (WebKit::PageClientImpl::registerEditCommand):
2695         (WebKit::PageClientImpl::clearAllEditCommands):
2696         (WebKit::PageClientImpl::canUndoRedo):
2697         (WebKit::PageClientImpl::executeUndoRedo):
2698         (WebKit::PageClientImpl::convertToDeviceSpace):
2699         (WebKit::PageClientImpl::convertToUserSpace):
2700         (WebKit::PageClientImpl::windowToScreen):
2701         (WebKit::PageClientImpl::doneWithKeyEvent):
2702         (WebKit::PageClientImpl::didNotHandleKeyEvent):
2703         (WebKit::PageClientImpl::createPopupMenuProxy):
2704         (WebKit::PageClientImpl::createContextMenuProxy):
2705         (WebKit::PageClientImpl::setFindIndicator):
2706         (WebKit::PageClientImpl::pageDidEnterAcceleratedCompositing):
2707         (WebKit::PageClientImpl::pageDidLeaveAcceleratedCompositing):
2708         (WebKit::PageClientImpl::didCommitLoadForMainFrame):
2709         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2710         (WebKit::PageClientImpl::customRepresentationZoomFactor):
2711         (WebKit::PageClientImpl::setCustomRepresentationZoomFactor):
2712         (WebKit::PageClientImpl::pageClosed):
2713         (WebKit::PageClientImpl::didChangeScrollbarsForMainFrame):
2714         (WebKit::PageClientImpl::flashBackingStoreUpdates):
2715         (WebKit::PageClientImpl::findStringInCustomRepresentation):
2716         (WebKit::PageClientImpl::countStringMatchesInCustomRepresentation):
2717         * UIProcess/API/gtk/PageClientImpl.h: Renamed from Source/WebKit2/UIProcess/gtk/WebView.h.
2718         (WebKit::PageClientImpl::create):
2719         (WebKit::PageClientImpl::addPendingEditorCommand):
2720         (WebKit::PageClientImpl::userSpaceScaleFactor):
2721         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2722         (webkitWebViewBaseInit):
2723         (webkitWebViewBaseCreate):
2724         * UIProcess/API/gtk/WebKitWebViewBase.h:
2725         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
2726
2727 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2728
2729         Reviewed by Martin Robinson.
2730
2731         [GTK] Use the WebPage object in WebKitWebViewBase
2732         https://bugs.webkit.org/show_bug.cgi?id=59683
2733
2734         It simplifies the implementation of the event callbacks. Remove
2735         also all the methods from the page client that are no longer
2736         needed.
2737
2738         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2739         (webkitWebViewBaseInit):
2740         (webViewExpose):
2741         (webViewDraw):
2742         (webViewSizeAllocate):
2743         (webViewFocusInEvent):
2744         (webViewFocusOutEvent):
2745         (webViewKeyPressEvent):
2746         (webViewKeyReleaseEvent):
2747         (webViewButtonPressEvent):
2748         (webViewButtonReleaseEvent):
2749         (webViewScrollEvent):
2750         (webViewMotionNotifyEvent):
2751         * UIProcess/API/gtk/WebKitWebViewBase.h:
2752         * UIProcess/gtk/WebView.cpp:
2753         (WebKit::WebView::WebView):
2754         (WebKit::WebView::createDrawingAreaProxy):
2755         * UIProcess/gtk/WebView.h:
2756
2757 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2758
2759         Reviewed by Martin Robinson.
2760
2761         [GTK] Create the page client in the view widget
2762         https://bugs.webkit.org/show_bug.cgi?id=59679
2763
2764         * UIProcess/API/C/gtk/WKView.cpp:
2765         (WKViewCreate): Simply create a new view widget and return it.
2766         (WKViewGetPage): Use webkitWebViewBaseGetPage().
2767         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2768         (webkitWebViewBaseFinalize): Use finalize instead of dispose to
2769         make sure it's called only once, and release the private struct too.
2770         (webkitWebViewBaseInit): Create the page client.
2771         (webkitWebViewBaseClassInit): Don't use GObject private data structure.
2772         (webkitWebViewBaseCreate): New method to create a
2773         WebKitWebViewBase for a given context and page group.
2774         (webkitWebViewBaseGetWebViewInstance):
2775         (webkitWebViewBaseGetPage):
2776         * UIProcess/API/gtk/WebKitWebViewBase.h:
2777         * UIProcess/gtk/WebView.cpp:
2778         (WebKit::WebView::page): Get the page from the view widget.
2779         (WebKit::WebView::handleFocusInEvent): Ditto.
2780         (WebKit::WebView::handleFocusOutEvent): Ditto.
2781         (WebKit::WebView::WebView): Page client is now created with a view widget.
2782         (WebKit::WebView::paint): Get the page from the view widget.
2783         (WebKit::WebView::setSize): Ditto.
2784         (WebKit::WebView::handleKeyboardEvent): Ditto.
2785         (WebKit::WebView::handleMouseEvent): Ditto.
2786         (WebKit::WebView::handleWheelEvent): Ditto.
2787         (WebKit::WebView::close): Ditto.
2788         (WebKit::WebView::createDrawingAreaProxy): Ditto.
2789         * UIProcess/gtk/WebView.h:
2790         (WebKit::WebView::create): The page client will be created as
2791         private by the view widget, so it doesn't need to be ref counted,
2792         use PassOwnPtr instead of PassRefPtr.
2793
2794 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2795
2796         Reviewed by Martin Robinson.
2797
2798         [GTK] PlatformWebView should be the view widget
2799         https://bugs.webkit.org/show_bug.cgi?id=59676
2800
2801         * UIProcess/API/gtk/WebKitWebViewBase.cpp:
2802         (webkitWebViewBaseGetPage): Return the page of the view.
2803         * UIProcess/API/gtk/WebKitWebViewBase.h:
2804         * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Map PlatformWebView
2805         to WebKitWebViewBase instead of the page client.
2806         * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp:
2807         (WebKit::ChunkedUpdateDrawingAreaProxy::page): Use the view widget
2808         directly.
2809         (WebKit::ChunkedUpdateDrawingAreaProxy::ensureBackingStore): Ditto.
2810         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore): Ditto.
2811         * UIProcess/gtk/WebView.cpp:
2812         (WebKit::WebView::createDrawingAreaProxy): Pass the view widget to
2813         the DrawingAreaProxy constructor instead of the page client.
2814         * UIProcess/gtk/WebView.h: Remove getWebViewWindow() which is no
2815         longer needed.
2816
2817 2011-04-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2818
2819         Reviewed by Martin Robinson.
2820
2821         [GTK] WKView should be a GtkWidget
2822         https://bugs.webkit.org/show_bug.cgi?id=59603
2823
2824         * UIProcess/API/C/gtk/WKAPICastGtk.h: Map WKViewRef to
2825         WebKitWebViewBase instead of WebView.
2826         * UIProcess/API/C/gtk/WKView.h: Remove WKViewGetWindow().
2827         * UIProcess/API/C/gtk/WKView.cpp:
2828         (WKViewCreate): Return the view instead of the page client.
2829         (WKViewGetPage): Use WebKitWebViewBase API to get the page client
2830         containing the page.
2831
2832 2011-04-27  Sam Weinig  <sam@webkit.org>
2833
2834         Reviewed by Adam Roben.
2835
2836         WebKit2 needs to notify the client when a plugin fails to initialize
2837         https://bugs.webkit.org/show_bug.cgi?id=59657
2838
2839         Add didFailToInitializePlugin client function and call it when a plugin
2840         fails to initialize.
2841
2842         * UIProcess/API/C/WKPage.h:
2843         * UIProcess/API/qt/qwkpage.cpp:
2844         (QWKPage::QWKPage):
2845         * UIProcess/WebLoaderClient.cpp:
2846         (WebKit::WebLoaderClient::didFailToInitializePlugin):
2847         * UIProcess/WebLoaderClient.h:
2848         * UIProcess/WebPageProxy.cpp:
2849         (WebKit::WebPageProxy::didFailToInitializePlugin):
2850         * UIProcess/WebPageProxy.h:
2851         * UIProcess/WebPageProxy.messages.in:
2852         * WebProcess/Plugins/PluginView.cpp:
2853         (WebKit::PluginView::initializePlugin):
2854
2855 2011-04-27  Pratik Solanki  <psolanki@apple.com>
2856
2857         Reviewed by Antti Koivisto.
2858
2859         Part of WebCore should use CFNetwork-based loader on Mac
2860         https://bugs.webkit.org/show_bug.cgi?id=51836
2861
2862         Add PLATFORM(WIN) ifdef around shouldCacheResponse.
2863
2864         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2865         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2866
2867 2011-04-27  Anders Carlsson  <andersca@apple.com>
2868
2869         Reviewed by Dan Bernstein.
2870
2871         Hang if a sync message handler invalidates the connection
2872         https://bugs.webkit.org/show_bug.cgi?id=59627
2873
2874         If dispatching incoming messages while waiting for the sync reply caused the connection to be invalidated,
2875         we need to return early or we'll wait forever.
2876
2877         * Platform/CoreIPC/Connection.cpp:
2878         (CoreIPC::Connection::waitForSyncReply):
2879
2880 2011-04-27  Carlos Garcia Campos  <cgarcia@igalia.com>
2881
2882         Reviewed by Martin Robinson.
2883
2884         [GTK] Move WebViewWidget to UIProcess/API/gtk
2885         https://bugs.webkit.org/show_bug.cgi?id=59594
2886
2887         API files should be under the API directory. This view widget will
2888         be used by both C and gtk high level API, so it has been renamed
2889         to WebKitWebViewBase.
2890
2891         * GNUmakefile.am:
2892         * UIProcess/API/gtk/WebKitWebViewBase.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.cpp.
2893         (webkitWebViewBaseRealize):
2894         (webkitWebViewBaseContainerAdd):
2895         (webkitWebViewBaseDispose):
2896         (webkitWebViewBaseInit):
2897         (webViewExpose):
2898         (webViewDraw):
2899         (webViewSizeAllocate):
2900         (webViewFocusInEvent):
2901         (webViewFocusOutEvent):
2902         (webViewKeyPressEvent):
2903         (webViewKeyReleaseEvent):
2904         (getEventTime):
2905         (webViewButtonPressEvent):
2906         (webViewButtonReleaseEvent):
2907         (webViewScrollEvent):
2908         (webViewMotionNotifyEvent):
2909         (webkitWebViewBaseClassInit):
2910         (webkitWebViewBaseGetType):
2911         (webkitWebViewBaseGetWebViewInstance):
2912         (webkitWebViewBaseSetWebViewInstance):
2913         (webkitWebViewBaseGetIMContext):
2914         * UIProcess/API/gtk/WebKitWebViewBase.h: Renamed from Source/WebKit2/UIProcess/gtk/WebViewWidget.h.
2915         * UIProcess/gtk/WebView.cpp:
2916         (WebKit::WebView::WebView):
2917
2918 2011-04-26  Chang Shu  <cshu@webkit.org>
2919
2920         Reviewed by Laszlo Gombos.
2921
2922         WebKitTestRunner needs layoutTestController.addOriginAccessWhitelistEntry
2923         https://bugs.webkit.org/show_bug.cgi?id=42544
2924
2925         Also implemented removeOriginAccessWhitelistEntry and resetOriginAccessWhitelists.
2926
2927         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2928         (WKBundleAddOriginAccessWhitelistEntry):
2929         (WKBundleRemoveOriginAccessWhitelistEntry):
2930         (WKBundleResetOriginAccessWhitelists):
2931         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2932         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2933         (WebKit::InjectedBundle::addOriginAccessWhitelistEntry):
2934         (WebKit::InjectedBundle::removeOriginAccessWhitelistEntry):
2935         (WebKit::InjectedBundle::resetOriginAccessWhitelists):
2936         * WebProcess/InjectedBundle/InjectedBundle.h:
2937
2938 2011-04-26  Dan Bernstein  <mitz@apple.com>
2939
2940         Build fix.
2941
2942         * Configurations/CompilerVersion.xcconfig:
2943
2944 2011-04-26  Anders Carlsson  <andersca@apple.com>
2945
2946         Fix 32-bit clang build.
2947
2948         * PluginProcess/mac/PluginProcessMac.mm:
2949         (WebKit::windowCoversAnyScreen):
2950         * UIProcess/API/mac/WKTextInputWindowController.mm:
2951         (-[WKTextInputPanel init]):
2952         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
2953         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation):
2954         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2955         (WebKit::flipScreenYCoordinate):
2956         (WebKit::computeFakeWindowBoundsRect):
2957         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2958         (-[AccessibilityWebPageObject accessibilityHitTest:]):
2959
2960 2011-04-26  Sam Weinig  <sam@webkit.org>
2961
2962         Reviewed by David Hyatt.
2963
2964         Remove Datagrid from the tree
2965         https://bugs.webkit.org/show_bug.cgi?id=59543
2966
2967         * Configurations/FeatureDefines.xcconfig:
2968         Remove feature.
2969
2970 2011-04-26  Chang Shu  <cshu@webkit.org>
2971
2972         Reviewed by Laszlo Gombos.
2973
2974         WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
2975         https://bugs.webkit.org/show_bug.cgi?id=57572
2976
2977         Remove the unnecessary code that updates preference.
2978
2979         * Shared/WebPreferencesStore.cpp:
2980         (WebKit::WebPreferencesStore::decode):
2981         * Shared/WebPreferencesStore.h:
2982         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2983         (WKBundleSetAllowUniversalAccessFromFileURLs):
2984         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2985         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2986         (WebKit::InjectedBundle::setAllowUniversalAccessFromFileURLs):
2987         (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
2988         * WebProcess/InjectedBundle/InjectedBundle.h:
2989
2990 2011-04-26  Brian Weinstein  <bweinstein@apple.com>
2991
2992         Reviewed by Steve Falkenburg.
2993
2994         WebKit2: Docked Inspector doesn't behave well if inspected web view isn't at 0,0
2995         https://bugs.webkit.org/show_bug.cgi?id=59554
2996         <rdar://problem/9341188>
2997         
2998         Use GetWindowRect and ScreenToClient to properly place our inspector and inspected
2999         web views instead of using GetClientRect. We need to correctly handle the case where
3000         the inspected web view isn't at 0, 0.
3001
3002         * UIProcess/win/WebInspectorProxyWin.cpp:
3003         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
3004
3005 2011-04-26  Dan Bernstein  <mitz@apple.com>
3006
3007         Reviewed by Mark Rowe.
3008
3009         Choose the compiler based on the Xcode version for Snow Leopard debug builds.
3010
3011         * Configurations/Base.xcconfig:
3012         * Configurations/CompilerVersion.xcconfig: Added.
3013
3014 2011-04-26  Balazs Kelemen  <kbalazs@webkit.org>
3015
3016         Unreviewed build fix.
3017
3018         * Platform/Region.cpp: Need to include stdio.h for printf
3019         (at least in my Qt-Linux environment).
3020
3021 2011-04-26  Mihai Parparita  <mihaip@chromium.org>
3022
3023         Reviewed by Adam Barth.
3024
3025         Turn off make built-in implicit rules for derived sources makefile
3026         https://bugs.webkit.org/show_bug.cgi?id=59418
3027
3028         We don't use any of make's built-in implicit rules, turning them off
3029         speeds up parsing of the makefile.
3030
3031         * WebKit2.xcodeproj/project.pbxproj:
3032
3033 2011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3034
3035         Unreviewed. Fix WebKit2 GTK build after r84785.
3036
3037         * UIProcess/gtk/WebInspectorGtk.cpp:
3038         (WebKit::WebInspectorProxy::platformAttach):
3039         (WebKit::WebInspectorProxy::platformDetach):
3040         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight):
3041
3042 2011-04-26  Carlos Garcia Campos  <cgarcia@igalia.com>
3043
3044         Unreviewed. Fix WebKit2 GTK build after r84886
3045
3046         * Platform/gtk/RunLoopGtk.cpp: Include WorkItem.h
3047
3048 2011-04-25  Adam Barth  <abarth@webkit.org>
3049
3050         Reviewed by David Levin.
3051
3052         WebKit2 should play nice with strict OwnPtrs
3053         https://bugs.webkit.org/show_bug.cgi?id=59426
3054
3055         * Platform/CoreIPC/Connection.cpp:
3056         (CoreIPC::Connection::waitForMessage):
3057             - Lack of OwnPtr in HashMap is sad face.  This code becomes very
3058               pretty if we could use OwnPtr in HashMap...
3059         * Platform/RunLoop.cpp:
3060         (RunLoop::performWork):
3061         (RunLoop::scheduleWork):
3062         * Platform/RunLoop.h:
3063         * Platform/mac/WorkQueueMac.cpp:
3064         (WorkQueue::executeWorkItem):
3065         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
3066         (WebKit::NetscapePluginStream::deliverData):
3067
3068 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3069
3070         Reviewed by Adam Roben.
3071
3072         WebKit2: Should be able to inspect Web Inspector in Debug Builds
3073         https://bugs.webkit.org/show_bug.cgi?id=59378
3074
3075         * UIProcess/WebInspectorProxy.cpp:
3076         (WebKit::createInspectorPageGroup): Creates an inspector page group and enables
3077             developer extras in a debug build.
3078         (WebKit::WebInspectorProxy::inspectorPageGroup): Calls createInspectorPageGroup.
3079
3080 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3081
3082         Reviewed by Timothy Hatcher.
3083
3084         WebKit2: Web Inspector's style sidebar fails to display when inspecting element
3085         https://bugs.webkit.org/show_bug.cgi?id=58071
3086         <rdar://problem/9243093>
3087         
3088         When creating our WebKit2 inspector views, we were creating them on both Mac and Windows
3089         with the empty rect for their initial size. Before we sized them correctly, the inspector
3090         was calling window.innerWidth on them, which returned 0, making the sidebar take up 0 pixels.
3091
3092         * UIProcess/mac/WebInspectorProxyMac.mm:
3093         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Create the window with the initial window width
3094             and height.
3095         * UIProcess/win/WebInspectorProxyWin.cpp:
3096         (WebKit::WebInspectorProxy::platformCreateInspectorPage): Ditto.
3097
3098 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3099
3100         Reviewed by Adam Roben.
3101
3102         Windows part of - WebKit2: Support docked mode for Web Inspector
3103         https://bugs.webkit.org/show_bug.cgi?id=59134
3104         <rdar://problem/8739005>
3105         
3106         Implement attaching and detaching of the Web Inspector on Windows,
3107         and also support setAttachedWindowHeight when the user changes the height
3108         of the docked inspector.
3109         
3110         This patch doesn't remember whether the user prefers attached or detached, and
3111         doesn't remember the user's preferred docked height, but that will be a separate
3112         bug.
3113         
3114         * UIProcess/WebInspectorProxy.cpp:
3115         (WebKit::WebInspectorProxy::attach): Set the attached flag and call platform-specific code.
3116         (WebKit::WebInspectorProxy::detach): Ditto.
3117         (WebKit::WebInspectorProxy::setAttachedWindowHeight): Call platform-specific code.
3118         (WebKit::WebInspectorProxy::didClose): Set m_isVisible before calling platformClose. platformClose
3119             calls detach if the inspector was docked, and detach needs to know whether or not the window is
3120             visible.
3121         * UIProcess/WebInspectorProxy.h:
3122         * UIProcess/WebInspectorProxy.messages.in: Add new messages.
3123         * UIProcess/WebPageProxy.h:
3124         (WebKit::WebPageProxy::pageClient): Add a getter for the page client.
3125         * UIProcess/win/WebInspectorProxyWin.cpp:
3126         (WebKit::WebInspectorProxy::windowReceivedMessage): Relay WM_WINDOWPOSCHANGING messages from the inspected
3127             web view to the WebInspectorProxy.
3128         (WebKit::WebInspectorProxy::onWebViewWindowPosChangingEvent): Resize the inspected web view to behave well
3129             with the docked inspector.
3130         (WebKit::WebInspectorProxy::platformClose): If we are attached, detach before destroying.
3131         (WebKit::WebInspectorProxy::platformAttach): Set the inspector's host window to be the inspected web view's parent
3132             window, so the inspected web view and the inspector are siblings.
3133         (WebKit::WebInspectorProxy::platformDetach): Set the inspector's host window to be the standalone inspector window.
3134         (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Size the views.
3135         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3136         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3137         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3138         (WebKit::WebInspectorFrontendClient::attachWindow): Call WebInspector::attach.
3139         (WebKit::WebInspectorFrontendClient::closeWindow): Add a call to the InspectorController to disconnect the inspector frontend
3140             from the inspector backend. Without this line, when we close the attached inspector, it won't re-open, because the
3141             inspector controller still thinks there is a frontend. This matches WebKit1's behavior, although it seems like this is
3142             something WebCore should handle.
3143         (WebKit::WebInspectorFrontendClient::detachWindow): Call WebInspector::detach.
3144         (WebKit::WebInspectorFrontendClient::setAttachedWindowHeight): Call WebInspector::setAttachedWindowHeight.
3145         * UIProcess/DrawingAreaProxyImpl.cpp:
3146         (WebKit::DrawingAreaImpl::sendUpdateBackingStoreState): Add an early return if the WebPageProxy's viewSize is empty. 
3147             This can be needed if the inspector takes up the whole view, and it is useful to prevent a possible synchronous message
3148             from the UIProcess -> WebProcess to update a backing store that isn't visible in the first place.
3149         * WebProcess/WebPage/WebInspector.cpp:
3150         (WebKit::WebInspector::attach): Send a message to the UIProcess.
3151         (WebKit::WebInspector::detach): Ditto.
3152         (WebKit::WebInspector::setAttachedWindowHeight): Ditto.
3153         * WebProcess/WebPage/WebInspector.h: Remove some dead code.
3154
3155 2011-04-25  Brian Weinstein  <bweinstein@apple.com>
3156
3157         Reviewed by Alice Liu.
3158
3159         WebKit2: Web Inspector: Support highlighting page elements
3160         https://bugs.webkit.org/show_bug.cgi?id=59263
3161         <rdar://problem/8767659>
3162
3163         Support highlighting of page elements for the inspector in WebKit2 by
3164         having the WebInspectorClient be a PageOverlay Client and be responsible
3165         for calling InspectorController::drawNodeHighlight.
3166
3167         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3168         (WebKit::WebInspectorClient::highlight): Create our overlay if it hasn't been created,
3169             or call setNeedsDisplay if it has.
3170         (WebKit::WebInspectorClient::hideHighlight): Uninstall the page overlay if it exists.
3171         (WebKit::WebInspectorClient::pageOverlayDestroyed):
3172         (WebKit::WebInspectorClient::willMoveToWebPage): If it's being destroyed (moving to a null
3173             WebPage), clear the member variable.
3174         (WebKit::WebInspectorClient::didMoveToWebPage):
3175         (WebKit::WebInspectorClient::drawRect): Call InspectorController::drawNodeHighlight.
3176         (WebKit::WebInspectorClient::mouseEvent):
3177         * WebProcess/WebCoreSupport/WebInspectorClient.h:
3178         (WebKit::WebInspectorClient::WebInspectorClient): Add a new member variable.
3179
3180 2011-04-25  Jon Lee  <jonlee@apple.com>
3181
3182         Reviewed by Maciej Stachowiak.
3183
3184         Overlay scroller hard to see on pages with dark background (59183)
3185         https://bugs.webkit.org/show_bug.cgi?id=59183
3186         <rdar://problem/8975367>
3187
3188         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3189         (InitWebCoreSystemInterface): adding method to allow changing style
3190         * WebProcess/WebPage/WebFrame.cpp:
3191         (WebKit::WebFrame::getDocumentBackgroundColor): refactoring to use common code for retrieving background color
3192
3193 2011-04-24  Dan Bernstein  <mitz@apple.com>
3194
3195         Reviewed by Maciej Stachowiak.
3196
3197         <rdar://problem/9329741> Reproducible crash in WebChromeClient::invalidateContentsAndWindow() on simonscat.com
3198         https://bugs.webkit.org/show_bug.cgi?id=59299
3199
3200         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3201         (WebKit::WebChromeClient::invalidateContentsAndWindow): Null-check the document.
3202         (WebKit::WebChromeClient::invalidateContentsForSlowScroll): Ditto.
3203
3204 2011-04-23  Sheriff Bot  <webkit.review.bot@gmail.com>
3205
3206         Unreviewed, rolling out r84740.
3207         http://trac.webkit.org/changeset/84740
3208         https://bugs.webkit.org/show_bug.cgi?id=59290
3209
3210         change breaks apple internal builds and is incorrect
3211         (Requested by smfr on #webkit).
3212
3213         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3214         (InitWebCoreSystemInterface):
3215
3216 2011-04-22  Jon Lee  <jonlee@apple.com>
3217
3218         Reviewed by Beth Dakin.
3219
3220         Overlay scroller hard to see on pages with dark background (59183)
3221         https://bugs.webkit.org/show_bug.cgi?id=59183
3222         <rdar://problem/8975367>
3223         
3224         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3225         (InitWebCoreSystemInterface): adding method to allow changing style
3226
3227 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
3228
3229         Reviewed by Sam Weinig.
3230
3231         WebKit2: Stop responsiveness timer before calling runOpenPanel
3232         https://bugs.webkit.org/show_bug.cgi?id=59268
3233         <rdar://problem/9327944>
3234
3235         * UIProcess/WebPageProxy.cpp:
3236         (WebKit::WebPageProxy::runOpenPanel): Stop the timer before calling WebUIClient::runOpenPanel,
3237             because runOpenPanel can spin a nested run loop.
3238
3239 2011-04-22  Chang Shu  <cshu@webkit.org>
3240
3241         Reviewed by Kenneth Rohde Christiansen.
3242
3243         WebKitTestRunner needs layoutTestController.setFrameFlatteningEnabled
3244         https://bugs.webkit.org/show_bug.cgi?id=42536
3245
3246         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
3247         (WKBundleSetFrameFlatteningEnabled):
3248         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
3249         * WebProcess/InjectedBundle/InjectedBundle.cpp:
3250         (WebKit::InjectedBundle::setFrameFlatteningEnabled):
3251         * WebProcess/InjectedBundle/InjectedBundle.h:
3252
3253 2011-04-22  Alejandro G. Castro  <alex@igalia.com> and Martin Robinson  <mrobinson@igalia.com>
3254
3255         Reviewed by Xan Lopez.
3256
3257         [GTK] Use the libWebCore.a convenience library when compiling WebKit2
3258         https://bugs.webkit.org/show_bug.cgi?id=59258
3259
3260         * GNUmakefile.am: Remove the libWebKit2 convenience library and use the
3261         libWebCore convenience library when compiling WebKit2. Not only does this
3262         maintain the CPPFLAGS isolation, it prevents double-compilation of WebCore
3263         in some cases.
3264
3265 2011-04-19  Jer Noble  <jer.noble@apple.com>
3266
3267         Reviewed by Daniel Bates.
3268
3269         Full Screen from within an <iframe> does not cause <iframe> to resize.
3270         https://bugs.webkit.org/show_bug.cgi?id=58638
3271
3272         Tests: fullscreen/full-screen-frameset-allowed.html
3273                fullscreen/full-screen-frameset-not-allowed.html
3274
3275         * UIProcess/mac/WKFullScreenWindowController.mm:
3276         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Cancel the background animation
3277             if the full screen animation finishes first.
3278         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
3279         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): m_fullScreenRootLayer was uninitialized.
3280
3281 2011-04-22  Sam Weinig  <sam@webkit.org>
3282
3283         Reviewed by Brian Weinstein.
3284
3285         WebKit2: Implement JavaScript unresponsiveness callback
3286         https://bugs.webkit.org/show_bug.cgi?id=59248
3287
3288         Add support for suspending JavaScript in response to a callback.
3289
3290         * UIProcess/API/C/WKPage.h:
3291         * UIProcess/API/qt/qwkpage.cpp:
3292         (QWKPage::QWKPage):
3293         * UIProcess/WebPageProxy.cpp:
3294         (WebKit::WebPageProxy::shouldInterruptJavaScript):
3295         * UIProcess/WebPageProxy.h:
3296         * UIProcess/WebPageProxy.messages.in:
3297         * UIProcess/WebUIClient.cpp:
3298         (WebKit::WebUIClient::shouldInterruptJavaScript):
3299         * UIProcess/WebUIClient.h:
3300         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3301         (WebKit::WebChromeClient::shouldInterruptJavaScript):
3302
3303 2011-04-22  Dan Bernstein  <mitz@apple.com>
3304
3305         Reviewed by Sam Weinig.
3306
3307         Paint the bounding rect of the dirty region instead of individual rectangles when the region
3308         covers at least 3/4 of its bounds.
3309
3310         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3311         (WebKit::shouldPaintBoundsRect): Use floating point math so that the logic that was supposed to
3312         achieve this actually works.
3313
3314 2011-04-22  Jer Noble  <jer.noble@apple.com>
3315
3316         Reviewed by Maciej Stachowiak.
3317
3318         Crash at WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation + 79
3319         https://bugs.webkit.org/show_bug.cgi?id=59225
3320
3321         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
3322         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Guard against 
3323             m_fullScreenRootLayer being NULL.
3324         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
3325
3326 2011-04-22  Jer Noble  <jer.noble@apple.com>
3327
3328         Reviewed by Maciej Stachowiak.
3329
3330         Allow MediaPlayerPrivateAVFoundation to be disabled via a preference.
3331         https://bugs.webkit.org/show_bug.cgi?id=59179
3332
3333         Add API to allow the WebCore Settings preference to be called from the UIProcess.
3334
3335         * Shared/WebPreferencesStore.h: Added new preference definition macro.
3336         * UIProcess/API/C/WKPreferences.cpp:
3337         (WKPreferencesSetAVFoundationEnabled): Added.
3338         (WKPreferencesGetAVFoundationEnabled): Added.
3339         * UIProcess/API/C/WKPreferences.h:
3340         * WebProcess/WebPage/WebPage.cpp:
3341         (WebKit::WebPage::updatePreferences): Pass new preference along to WebCore
3342             Settings.
3343
3344 2011-04-22  Brian Weinstein  <bweinstein@apple.com>
3345
3346         Reviewed by Sam Weinig.
3347
3348         WebKit2: Stop Responsiveness Timer when WebPageProxy closes or WebProcess crashes
3349         https://bugs.webkit.org/show_bug.cgi?id=59210
3350
3351         * UIProcess/WebPageProxy.cpp:
3352         (WebKit::WebPageProxy::close): Stop the responsiveness timer.
3353         (WebKit::WebPageProxy::processDidCrash): Ditto.
3354
3355 2011-04-21  Adam Roben  <aroben@apple.com>
3356
3357         Give windowless plugins' context menus an owner window in the same thread as the plugin
3358
3359         In some cases, plugins pass the WKView's HWND to the ::TrackPopupMenu API. ::TrackPopupMenu
3360         fails in this case because the WKView's HWND is owned by another process/thread. We work
3361         around this by hooking the ::TrackPopupMenu API and providing our own window that's in the
3362         same thread as the plugin instead.
3363
3364         I couldn't figure out how to write a test for this. :-(
3365
3366         Fixes <http://webkit.org/b/51063> <rdar://problem/8769281> REGRESSION (WebKit2): No context
3367         menu appears when right-clicking on windowless Flash plugin
3368
3369         Reviewed by Brian Weinstein, and looked at suspiciously by Jeff Miller.
3370
3371         * Platform/Module.h: Added installIATHook on Windows.
3372
3373         * Platform/win/ModuleWin.cpp:
3374         (WebKit::overwriteReadOnlyMemory): New helper function. Basically a wrapper around memcpy,
3375         but uses ::VirtualProtect to allow writing to otherwise-read-only memory.
3376         (WebKit::findFunctionPointerAddress): New helper function. The first overload iterates over
3377         the imported modules and functions looking for the given one. If found, returns the address
3378         of the function pointer that is used when calling that function. The second overload calls
3379         the first, first passing it an enumerator for the image's imported modules, then passing it
3380         an iterator for the image's delay-loaded modules.
3381         (WebKit::Module::installIATHook): Added. Finds the address of the function pointer that's
3382         used when code in this module calls the given function, then overwrites the function pointer
3383         with the passed-in one. Future calls to the given function made by code in this module
3384         should then end up calling to the passed-in function instead of the original one.
3385
3386         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3387         (WebKit::NetscapePluginModule::module): Added this simple getter.
3388
3389         * WebProcess/Plugins/Netscape/NetscapePlugin.h: Added some new Windows-only members.
3390
3391         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3392         (WebKit::CurrentPluginSetter::CurrentPluginSetter):
3393         (WebKit::CurrentPluginSetter::~CurrentPluginSetter):
3394         This RAII class sets/unsets the currentPlugin global.
3395
3396         (WebKit::registerPluginView): Changed to use instanceHandle() instead of the mysterious
3397         gInstance.
3398         (WebKit::NetscapePlugin::platformPostInitialize): For windowless plugins, hook the
3399         ::TrackPopupMenu API and create a window to be used as the owner for context menus created
3400         by this plugin. (Also changed the ::CreateWindowExW call for windowed plugins to pass an
3401         instance handle so that the window will be associated with WebKit.dll instead of
3402         WebKit2WebProcess.exe. This should have no visible effect, but is more correct.)
3403         (WebKit::NetscapePlugin::platformDestroy): For windowless plugins, destroy the context menu
3404         owner window we created above.
3405
3406         (WebKit::NetscapePlugin::platformPaint):
3407         (WebKit::NetscapePlugin::platformHandleMouseEvent):
3408         (WebKit::NetscapePlugin::platformHandleWheelEvent):
3409         (WebKit::NetscapePlugin::platformSetFocus):
3410         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
3411         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
3412         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
3413         Set ourselves as the current plugin.
3414
3415         (WebKit::NetscapePlugin::hookedTrackPopupMenu): Added. This is the function that actually
3416         gets called when windowless plugins call ::TrackPopupMenu. If the passed-in owner window is
3417         owned by the current thread, we have nothing to do; ::TrackPopupMenu should work just fine.
3418         Otherwise, we use the current plugin's context menu owner window as the context menu's
3419         owner. We also set focus to the new owner window because otherwise weird behavior results
3420         (e.g., it's possible to scroll the WKView while the context menu is up).
3421
3422 2011-04-21  Adam Roben  <aroben@apple.com>
3423
3424         Use WebCore's do-nothing window class instead of creating our own
3425
3426         Fixes <http://webkit.org/b/59102> WebKit has too many dummy window classes
3427
3428         Reviewed by Anders Carlsson.
3429
3430         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
3431         (WebKit::createDummyWindow): Less code!
3432
3433 2011-04-22  Balazs Kelemen  <kbalazs@webkit.org>
3434
3435         Reviewed by Kenneth Rohde Christiansen.
3436
3437         [Qt][WK2] Cannot play flash with NSPluginWrapper
3438         https://bugs.webkit.org/show_bug.cgi?id=59125
3439
3440         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3441         (WebKit::NPN_GetValue): Handle the case when we have been
3442         called with a null plugin instance.
3443
3444 2011-04-22  Andreas Kling  <andreas.kling@nokia.com>
3445
3446         Reviewed by Sam Weinig.
3447
3448         [Qt][WK2] Implement DrawingAreaImpl for Qt.
3449         https://bugs.webkit.org/show_bug.cgi?id=59171
3450
3451         * WebKit2.pro: Build files necessary for DrawingAreaImpl.
3452         * DerivedSources.pro: Build message receivers for DrawingArea and DrawingAreaProxy.
3453
3454         * Shared/qt/LayerTreeContextQt.cpp:
3455         (WebKit::LayerTreeContext::LayerTreeContext): Stub.
3456         (WebKit::LayerTreeContext::~LayerTreeContext): Stub.
3457         (WebKit::LayerTreeContext::encode): Stub.
3458         (WebKit::LayerTreeContext::decode): Stub.
3459         (WebKit::LayerTreeContext::isEmpty): Stub.
3460         (WebKit::operator==): Stub.
3461
3462         * Shared/qt/ShareableBitmapQt.cpp:
3463         (WebKit::ShareableBitmap::paint): Don't translate the painter to accomodate the
3464         source rect. The rect is already adjusted at the call site.
3465
3466         * UIProcess/API/qt/qgraphicswkview.h: Add "Impl" to QGraphicsWKView::BackingStoreType.
3467
3468         * UIProcess/API/qt/qwkpage.cpp:
3469         (QWKPagePrivate::createDrawingAreaProxy): Create DrawingAreaProxyImpl if requested.
3470         (QWKPagePrivate::paint): Call the correct paint() method for DrawingAreaProxyImpl,
3471         since this drawing area will simple ASSERT_NOT_REACHED() in the "normal" paint().
3472
3473         * WebProcess/WebPage/DrawingArea.cpp:
3474         (WebKit::DrawingArea::create): Allow creation of DrawingAreaImpl for Qt.
3475
3476         * UIProcess/BackingStore.h: Add Qt-specific types and backing store.
3477
3478         * UIProcess/qt/BackingStoreQt.cpp:
3479         (WebKit::BackingStore::paint): Implemented.
3480         (WebKit::BackingStore::incorporateUpdate): Implemented.
3481         (WebKit::BackingStore::scroll): Implemented using QPixmap::scroll().
3482
3483         * UIProcess/DrawingAreaProxy.h: Enable drawing area message receivers for Qt.
3484         * UIProcess/WebPageProxy.cpp:
3485         (WebKit::WebPageProxy::didReceiveMessage): Ditto.
3486         * WebProcess/WebPage/DrawingArea.h: Ditto.
3487         * WebProcess/WebPage/WebPage.cpp:
3488         (WebKit::WebPage::didReceiveMessage): Ditto.
3489
3490 2011-04-22  Jon Honeycutt  <jhoneycutt@apple.com>
3491
3492         WinCairo build fix. Unreviewed.
3493