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