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