Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-03-23  Sam Weinig  <sam@webkit.org>
2
3         Reviewed by Anders Carlsson.
4
5         Roll out r81593 Need WebKit2 API for creating a page with a specific main frame name
6
7         This API is not necessary.
8
9         * Shared/WebPageCreationParameters.cpp:
10         (WebKit::WebPageCreationParameters::encode):
11         (WebKit::WebPageCreationParameters::decode):
12         * Shared/WebPageCreationParameters.h:
13         * UIProcess/API/mac/WKView.h:
14         * UIProcess/API/mac/WKView.mm:
15         (-[WKView initWithFrame:]):
16         (-[WKView initWithFrame:contextRef:]):
17         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
18         * UIProcess/WebPageProxy.cpp:
19         (WebKit::WebPageProxy::creationParameters):
20         * UIProcess/WebPageProxy.h:
21         * WebProcess/WebPage/WebFrame.cpp:
22         (WebKit::WebFrame::createMainFrame):
23         * WebProcess/WebPage/WebFrame.h:
24         * WebProcess/WebPage/WebPage.cpp:
25         (WebKit::WebPage::WebPage):
26
27 2011-03-23  Balazs Kelemen  <kbalazs@webkit.org>
28
29         Reviewed by Andreas Kling.
30
31         [WK2] Handle keyboard and mouse events on X11
32         https://bugs.webkit.org/show_bug.cgi?id=56103
33
34         Propagate keyboard and mouse events to the plugin
35         as XEvent's.
36
37         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
38         (WebKit::initializeXEvent):
39         (WebKit::xTimeStamp):
40         (WebKit::xKeyModifiers):
41         (WebKit::setCommonMouseEventFields):
42         (WebKit::setXMotionEventFields):
43         (WebKit::setXButtonEventFields):
44         (WebKit::setXCrossingEventFields):
45         (WebKit::NetscapePlugin::platformHandleMouseEvent):
46         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
47         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
48         (WebKit::setXKeyEventFields):
49         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
50
51 2011-03-23  Anders Carlsson  <andersca@apple.com>
52
53         Reviewed by Sam Weinig.
54
55         Connection::SyncMessageState::processIncomingMessage should ignore whether the message is sync or not
56         https://bugs.webkit.org/show_bug.cgi?id=56954
57
58         This is so we'll eventually be able to send sync messages that aren't processed immediately if the 
59         destination is waiting for a reply to another synchronous message.
60
61         * Platform/CoreIPC/Connection.cpp:
62         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
63         Only check for the DispatchMessageWhenWaitingForSyncReply flag.
64
65         (CoreIPC::Connection::sendSyncMessage):
66         Add both DispatchMessageWhenWaitingForSyncReply and SyncMessage to the message ID.
67
68         * Platform/CoreIPC/Connection.h:
69         (CoreIPC::Connection::sendSync):        
70         (CoreIPC::Connection::deprecatedSendSync):
71         No need to add SyncMessage here anymore.
72
73 2011-03-23  Brian Weinstein  <bweinstein@apple.com>
74
75         Qt Build Fix.
76
77         * DerivedSources.pro:
78
79 2011-03-22  Brian Weinstein  <bweinstein@apple.com>
80
81         Reviewed by Darin Adler.
82
83         WebKit2: Need API to manage the Media Cache
84         https://bugs.webkit.org/show_bug.cgi?id=56878
85         <rdar://problem/9082503>
86
87         Project File Fun:
88         * GNUmakefile.am:
89         * WebKit2.pri:
90         * WebKit2.pro:
91         * WebKit2.xcodeproj/project.pbxproj:
92         * win/WebKit2.vcproj:
93         * win/WebKit2Common.vsprops:
94         * win/WebKit2Generated.make:
95         
96         Derived Sources and API fun:
97         * DerivedSources.make:
98         * DerivedSources.pro:
99         * Platform/CoreIPC/MessageID.h:
100         * Shared/API/c/WKBase.h:
101         * Shared/APIObject.h:
102         * UIProcess/API/C/WKAPICast.h:
103         
104         * UIProcess/WebProcessProxy.cpp:
105         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for MediaCache messages.
106         * WebProcess/WebProcess.cpp:
107         (WebKit::WebProcess::didReceiveMessage): Ditto.
108         
109         * UIProcess/WebContext.cpp:
110         (WebKit::WebContext::WebContext): Initialize the WebMediaCacheManagerProxy member variable.
111         (WebKit::WebContext::~WebContext): Invalidate the WebMediaCacheManagerProxy.
112         (WebKit::WebContext::disconnectProcess): Ditto.
113         (WebKit::WebContext::didReceiveMessage): Add a case for MediaCache messages.
114         * UIProcess/WebContext.h:
115         (WebKit::WebContext::mediaCacheManagerProxy):
116
117         * UIProcess/API/C/WKContext.cpp:
118         (WKContextGetMediaCacheManager): Returns the context's WebMediaCacheManager.
119         * UIProcess/API/C/WKContext.h:
120
121         * UIProcess/API/C/WKMediaCacheManager.cpp: Added.
122         (WKMediaCacheManagerGetTypeID): Returns the WebMediaCacheManagerProxy type.
123         (WKMediaCacheManagerGetHostnamesWithMediaCache): Calls down to the WebMediaCacheManagerProxy.
124         (WKMediaCacheManagerClearCacheForHostname): Ditto.
125         (WKMediaCacheManagerClearCacheForAllHostnames): Ditto.
126         * UIProcess/API/C/WKMediaCacheManager.h: Added.
127
128         * UIProcess/WebMediaCacheManagerProxy.cpp: Added.
129         (WebKit::WebMediaCacheManagerProxy::create):
130         (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy):
131         (WebKit::WebMediaCacheManagerProxy::~WebMediaCacheManagerProxy):
132         (WebKit::WebMediaCacheManagerProxy::invalidate):
133         (WebKit::WebMediaCacheManagerProxy::didReceiveMessage):
134         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): Call through to the WebProcess.
135         (WebKit::WebMediaCacheManagerProxy::didGetHostnamesWithMediaCache): Process the WebProcess response,
136             and call the callback.
137         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): Call through to the WebProcess.
138         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): Call through to the WebProcess.
139         * UIProcess/WebMediaCacheManagerProxy.h: Added.
140         (WebKit::WebMediaCacheManagerProxy::clearContext):
141         (WebKit::WebMediaCacheManagerProxy::type):
142         * UIProcess/WebMediaCacheManagerProxy.messages.in: Added.
143
144         * WebProcess/MediaCache: Added.
145         * WebProcess/MediaCache/WebMediaCacheManager.cpp: Added.
146         (WebKit::WebMediaCacheManager::shared):
147         (WebKit::WebMediaCacheManager::WebMediaCacheManager):
148         (WebKit::WebMediaCacheManager::didReceiveMessage):
149         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): Added a FIXME to call through to WebCore.
150         (WebKit::WebMediaCacheManager::clearCacheForHostname): Ditto.
151         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): Ditto.
152         * WebProcess/MediaCache/WebMediaCacheManager.h: Added.
153         * WebProcess/MediaCache/WebMediaCacheManager.messages.in: Added.
154
155 2011-03-22  Brady Eidson  <beidson@apple.com>
156
157         Reviewed by Sam Weinig.
158
159         Add asynchronous load decision call to WebKit2 IconDatabase
160         https://bugs.webkit.org/show_bug.cgi?id=56887
161
162         * UIProcess/WebIconDatabase.cpp:
163         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): In the future, get the actual load decision from the database.
164           For now, always message "IconLoadNo" back to the WebProcess.
165         * UIProcess/WebIconDatabase.h:
166         * UIProcess/WebIconDatabase.messages.in:
167         
168         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
169         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL): Message the UIProcess for the load decision.
170         (WebKit::WebIconDatabaseProxy::receivedIconLoadDecision): Callback into WebCore with the received load decision.
171         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
172         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in:
173
174 2011-03-23  Chris Fleizach  <cfleizach@apple.com>
175
176         Reviewed by Darin Adler.
177
178         REGRESSION: WK2: AX: PDF in Safari no longer accessible.
179         https://bugs.webkit.org/show_bug.cgi?id=56849
180
181         The WKView needs to know when to return the WKPDFView and when to return
182         the remote web process connection.
183
184         * UIProcess/API/mac/PDFViewController.h:
185         (WebKit::PDFViewController::pdfView):
186         * UIProcess/API/mac/WKView.mm:
187         (-[WKView accessibilityFocusedUIElement]):
188         (-[WKView accessibilityHitTest:]):
189         (-[WKView accessibilityAttributeValue:]):
190
191 2011-03-21  Stephanie Lewis  <slewis@apple.com>
192
193         Reviewed by Simon Fraser.
194
195         https://bugs.webkit.org/show_bug.cgi?id=56798
196         Wrap autorelease pools around calls that can have pathological memory growth on Membuster.  
197         Only wrap the main runloop because some background threads are not expected to call into 
198         objc and an autorelease pool could mask bugs.
199
200         * Platform/mac/RunLoopMac.mm:
201         (RunLoop::performWork):
202         (RunLoop::TimerBase::timerFired):
203         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
204         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
205
206 2011-03-22  Anders Carlsson  <andersca@apple.com>
207
208         Reviewed by Sam Weinig.
209
210         OBJECT element with DivX source is always downloaded
211         https://bugs.webkit.org/show_bug.cgi?id=56879
212
213         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
214         (WebKit::getPluginInfoFromPropertyLists):
215         Always try to split every element in the "WebPluginExtensions" array, since the DivX plug-in
216         specifies multiple file extensions in a single element.
217         
218         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
219         (WebKit::pluginSupportsExtension):
220         Add a new helper function.
221
222         (WebKit::WebFrameLoaderClient::objectContentType):
223         If we can't find the MIME for an extension, explicitly check if there's a plugin that claims to
224         handle the given extension.
225
226 2011-03-22  Brady Eidson  <beidson@apple.com>
227
228         Reviewed by Sam Weinig.
229
230         Rename the synchronous icon database messages to be prefixed with "synchronous"
231
232         * UIProcess/WebIconDatabase.cpp:
233         (WebKit::WebIconDatabase::synchronousIconDataForPageURL):
234         (WebKit::WebIconDatabase::synchronousIconURLForPageURL):
235         (WebKit::WebIconDatabase::synchronousIconDataKnownForIconURL):
236         (WebKit::WebIconDatabase::synchronousLoadDecisionForIconURL):
237         * UIProcess/WebIconDatabase.h:
238         * UIProcess/WebIconDatabase.messages.in:
239
240         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
241         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
242
243 2011-03-22  Sam Weinig  <sam@webkit.org>
244
245         Rubber-stamped by Anders Carlsson.
246
247         Loading a new tab does not dismiss Lookup
248         <rdar://problem/9138391> 
249
250         * UIProcess/API/mac/WKView.mm:
251         (-[WKView viewDidMoveToWindow]):
252         Hide the dictionary popup when moving the WKView out of a window.
253
254 2011-03-22  Anders Carlsson  <andersca@apple.com>
255
256         Reviewed by Sam Weinig.
257
258         Microsoft Silverlight playback shows artifacts
259         https://bugs.webkit.org/show_bug.cgi?id=56863
260         <rdar://problem/9103136>
261
262         * PluginProcess/PluginControllerProxy.cpp:
263         (WebKit::PluginControllerProxy::paint):
264         If the plug-in is transparent, clear the dirty rect before painting.
265
266         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
267         (WebKit::NetscapePluginModule::determineQuirks):
268         Add the MakeTransparentIfBackgroundAttributeExists quirk for Silverlight plug-ins.
269
270         * Shared/Plugins/PluginQuirks.h:
271         Add MakeTransparentIfBackgroundAttributeExists quirk.
272
273         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
274         (WebKit::NPN_SetValue):
275         Handle NPPVpluginTransparentBool.
276
277         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
278         (WebKit::NetscapePlugin::NetscapePlugin):
279         Initialize m_isTransparent to false.
280
281         (WebKit::NetscapePlugin::setIsTransparent):
282         Set m_isTransparent.
283
284         (WebKit::NetscapePlugin::initialize):
285         If the plug-in has the MakeTransparentIfBackgroundAttributeExists quirk, make it transparent
286         if there's a 'background' attribute.
287
288         (WebKit::NetscapePlugin::isTransparent):
289         Add getter.
290
291         * WebProcess/Plugins/Plugin.h:
292         Add isTransparent().
293
294         * WebProcess/Plugins/PluginProxy.cpp:
295         (WebKit::PluginProxy::paint):
296         Always copy the plug-in backing store to the plug-in proxy backing store.
297
298         (WebKit::PluginProxy::isTransparent):
299         Add getter that should never be called.
300
301         (WebKit::PluginProxy::update):
302         Always copy the plug-in backing store to the plug-in proxy backing store.
303
304 2011-03-22  Anders Carlsson  <andersca@apple.com>
305
306         Reviewed by Sam Weinig.
307
308         Crash when calling PluginProxy::evaluate on a destroyed plug-in
309         https://bugs.webkit.org/show_bug.cgi?id=56848
310         <rdar://problem/9168975>
311
312         Return early if the NPObject doesn't exist anymore.
313
314         * WebProcess/Plugins/PluginProxy.cpp:
315         (WebKit::PluginProxy::evaluate):
316
317 2011-03-22  Sam Weinig  <sam@webkit.org>
318
319         Reviewed by Adam Roben.
320
321         WebKit2: Cannot make a selection past the end of the visible page (no autoscrolling)
322         <rdar://problem/8823874>
323         https://bugs.webkit.org/show_bug.cgi?id=56847
324
325         * Shared/mac/WebEventFactory.mm:
326         (WebKit::currentMouseButton):
327         (WebKit::mouseButtonForEvent):
328         Add mouse button for mouseEnter/Exit events. [NSEvent buttonNumber] doesn't seem to give the right result
329         for these events, but getting the currentMouseButton does work.
330
331 2011-03-21  Brady Eidson  <beidson@apple.com>
332
333         Fix Mac release builds after https://bugs.webkit.org/show_bug.cgi?id=56783
334
335         * Platform/mac/Logging.mac.mm:
336
337 2011-03-21  Brady Eidson  <beidson@apple.com>
338
339         Reviewed by Brian Weinstein.
340
341         https://bugs.webkit.org/show_bug.cgi?id=56783
342         Actually hook up WebKit2 logging on Mac.
343
344         * Platform/Logging.cpp:
345         (WebKit::initializeLogChannel):
346         * Platform/Logging.h:
347         * Platform/mac/Logging.mac.mm: Added.
348         (WebKit::initializeLogChannel):
349  
350        * UIProcess/WebContext.cpp:
351         (WebKit::WebContext::WebContext): Initialize logging if necessary.
352
353         * WebKit2.xcodeproj/project.pbxproj:
354
355 2011-03-21  Alexey Proskuryakov  <ap@apple.com>
356
357         Reviewed by Darin Adler.
358
359         REGRESSION (r81269): WebKit2 gets into an infinite recursion after an unhandled command key
360         https://bugs.webkit.org/show_bug.cgi?id=56782
361         <rdar://problem/9151993>
362
363         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
364         Factored out code for resending an event and moved it to WKView.
365
366         * UIProcess/API/mac/WKView.mm:
367         (-[WKView performKeyEquivalent:]): Don't zero out _keyDownEventBeingResent, it's easier
368         to just do that in _resendKeyDownEvent:.
369         (-[WKView keyDown:]): Ditto.
370         (-[WKView _resendKeyDownEvent:]): Moved from PageClientImpl.mm. Added an assertion that we
371         are not already resending an event - it would be too confusing if we ever had to do that,
372         but looks like this never happens.
373
374         * UIProcess/API/mac/WKViewInternal.h: Exposed _resendKeyDownEvent.
375
376 2011-03-21  Anders Carlsson  <andersca@apple.com>
377
378         Reviewed by Sam Weinig.
379
380         QT plug-in fails to load contextual menu
381         https://bugs.webkit.org/show_bug.cgi?id=56777
382         <rdar://problem/8979033>
383
384         Open a Carbon resource map and make it the current map when calling NP_Initialize.
385
386         * Platform/Module.cpp:
387         (WebKit::Module::Module):
388         Initialize m_bundleResourceMap to -1.
389
390         * Platform/Module.h:
391         Add m_bundleResourceMap.
392
393         * Platform/mac/ModuleMac.mm:
394         (WebKit::Module::unload):
395         Close the resource map.
396
397         (WebKit::Module::bundleResourceMap):
398         Open a resource map if necessary.
399
400         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
401         (WebKit::NetscapePluginModule::tryLoad):
402         Get the resource map and make it current before calling NP_Initialize.
403
404 2011-03-21  Anders Carlsson  <andersca@apple.com>
405
406         Reviewed by Sam Weinig.
407
408         Plug-in process crashes if it fails to load a plug-in module
409         https://bugs.webkit.org/show_bug.cgi?id=56775
410
411         * PluginProcess/PluginControllerProxy.cpp:
412         (WebKit::PluginControllerProxy::initialize):
413         If NetscapePlugin::create returns null, call removePluginControllerProxy with a null plug-in.
414
415         * PluginProcess/WebProcessConnection.cpp:
416         (WebKit::WebProcessConnection::removePluginControllerProxy):
417         Remove an incorrect assertion. Don't invalidate the remote object map if the plug-in is null.
418
419 2011-03-21  Anders Carlsson  <andersca@apple.com>
420
421         Reviewed by Sam Weinig.
422
423         QT plug-in loads controller at top of movie not bottom
424         https://bugs.webkit.org/show_bug.cgi?id=56764
425         <rdar://problem/8979037>
426
427         Create a layer with geometryFlipped set and add the plug-in layer as a sublayer,
428         matching WebKit1.
429
430         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
431         (WebKit::NetscapePlugin::platformPostInitialize):
432
433 2011-03-21  Sam Weinig  <sam@webkit.org>
434
435         Reviewed by Anders Carlsson.
436
437         WebKit2 needs preferences to change security knobs
438         https://bugs.webkit.org/show_bug.cgi?id=56762
439
440         Add preferences for WebSecurityEnabled, UniversalAccessFromFileURLsAllowed
441         and FileAccessFromFileURLsAllowed.
442
443         * Shared/WebPreferencesStore.h:
444         * UIProcess/API/C/WKPreferences.cpp:
445         (WKPreferencesSetWebSecurityEnabled):
446         (WKPreferencesGetWebSecurityEnabled):
447         (WKPreferencesSetUniversalAccessFromFileURLsAllowed):
448         (WKPreferencesGetUniversalAccessFromFileURLsAllowed):
449         (WKPreferencesSetFileAccessFromFileURLsAllowed):
450         (WKPreferencesGetFileAccessFromFileURLsAllowed):
451         * UIProcess/API/C/WKPreferencesPrivate.h:
452         * WebProcess/WebPage/WebPage.cpp:
453         (WebKit::WebPage::updatePreferences):
454
455 2011-03-21  Sam Weinig  <sam@webkit.org>
456
457         Reviewed by Anders Carlsson.
458
459         Remove old DrawingArea and LayerHostingView code from WKView.
460
461         * UIProcess/API/mac/WKView.mm:
462         (-[WKView drawRect:]):
463         (-[WKView hitTest:]):
464         (-[WKView WebKit::]):
465
466 2011-03-21  Sam Weinig  <sam@webkit.org>
467
468         Reviewed by Anders Carlsson.
469
470         Need WebKit2 API for creating a page with a specific main frame name
471         https://bugs.webkit.org/show_bug.cgi?id=56759
472
473         * Shared/WebPageCreationParameters.cpp:
474         (WebKit::WebPageCreationParameters::encode):
475         (WebKit::WebPageCreationParameters::decode):
476         * Shared/WebPageCreationParameters.h:
477         Add mainFrameName to creation parameters.
478
479         * UIProcess/API/mac/WKView.h:
480         * UIProcess/API/mac/WKView.mm:
481         (-[WKView initWithFrame:]):
482         (-[WKView initWithFrame:contextRef:]):
483         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
484         (-[WKView initWithFrame:contextRef:pageGroupRef:mainFrameName:]):
485         Add new initializer which takes a main frame name.
486
487         * UIProcess/WebPageProxy.cpp:
488         (WebKit::WebPageProxy::setMainFrameName):
489         (WebKit::WebPageProxy::creationParameters):
490         * UIProcess/WebPageProxy.h:
491         Store the main frame name for initialization/re-initialization.
492
493         * WebProcess/WebPage/WebFrame.cpp:
494         (WebKit::WebFrame::createMainFrame):
495         * WebProcess/WebPage/WebFrame.h:
496         * WebProcess/WebPage/WebPage.cpp:
497         (WebKit::WebPage::WebPage):
498         Pass the name to main frame creation.
499
500 2011-03-20  Bill Budge  <bbudge@chromium.org>
501
502         Reviewed by Adam Barth.
503
504         Rename ThreadSafeShared to ThreadSafeRefCounted
505         https://bugs.webkit.org/show_bug.cgi?id=56714
506
507         No new tests. Exposes no new functionality.
508
509         * Platform/CoreIPC/Connection.h:
510         * Platform/WorkQueue.h:
511         * Platform/win/WorkQueueWin.cpp:
512         * UIProcess/Launcher/ProcessLauncher.h:
513         * UIProcess/Launcher/ThreadLauncher.h:
514
515 2011-03-19  Anton D'Auria  <adauria@apple.com>
516
517         Reviewed by Alexey Proskuryakov.
518
519         ApplicationCacheGroup is not obsolete after being deleted via ApplicationCacheStorage::deleteEntriesForOrigin
520         https://bugs.webkit.org/show_bug.cgi?id=56415
521
522         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: calling ApplicationCacheGroup::deleteCacheGroupsForOrigin
523         instead of ApplicationCacheStorage::deleteEntriesForOrigin.
524         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
525
526 2011-03-18  Sam Weinig  <sam@webkit.org>
527
528         Attempt to fix the WinCairo build.
529
530         * win/WebKit2.vcproj:
531
532 2011-03-18  Anders Carlsson  <andersca@apple.com>
533
534         Reviewed by Dan Bernstein.
535
536         Empty gray page after going back from a PDF
537         https://bugs.webkit.org/show_bug.cgi?id=56694
538         <rdar://problem/8811854>
539
540         Update m_frameHasCustomRepresentation when loading a page that's in the page cache.
541
542         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
543         (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
544
545 2011-03-18  Anders Carlsson  <andersca@apple.com>
546
547         Reviewed by Sam Weinig.
548
549         Crash when sending a sync message ends up invalidating the connection
550         https://bugs.webkit.org/show_bug.cgi?id=56686
551         <rdar://problem/9048781>
552
553         Guard against a null client.
554
555         * Platform/CoreIPC/Connection.cpp:
556         (CoreIPC::Connection::sendSyncMessage):
557
558 2011-03-18  Balazs Kelemen  <kbalazs@webkit.org>
559
560         Reviewed by Benjamin Poulain.
561
562         [Qt][WK2] Need a way to debug the web process after the UI process dies
563         https://bugs.webkit.org/show_bug.cgi?id=56116
564
565         Allow the web process to outlive it's parent process
566         in debug builds if the QT_WEBKIT_KEEP_ALIVE_WEB_PROCESS
567         environment variable is set.
568
569         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
570         (WebKit::QtWebProcess::setupChildProcess): Used getenv
571         since the prctl call is already in a Linux-only block
572         and the implementation in this file is a candidate
573         for sharing across ports in the future.
574
575 2011-03-18  Darin Adler  <darin@apple.com>
576
577         Reviewed by Anders Carlsson.
578
579         Command-period does not stop load when page has focus in WebKit2
580         https://bugs.webkit.org/show_bug.cgi?id=56601
581
582         * UIProcess/API/mac/WKView.mm:
583         (-[WKView doCommandBySelector:]): If called outside interpretKeyEvents,
584         call through to super.
585         (-[WKView insertText:]): Assert that we are inside interpretKeyEvents.
586         (-[WKView unmarkText]): Ditto.
587         (-[WKView setMarkedText:selectedRange:]): Ditto.
588         (-[WKView _interceptKeyEvent:]): Set a flag to indicate we are inside
589         interpretKeyEvents for use by the above.
590
591 2011-03-18  Brady Eidson  <beidson@apple.com>
592
593         Reviewed by Sam Weinig.
594
595         https://bugs.webkit.org/show_bug.cgi?id=56425
596         More groundwork for WebKit2 IconDatabase
597
598         -Update the synchronous method names to be prefixed with "synchronous."
599         -Add empty implementations for the asynchronous accessors.
600
601         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
602         (WebKit::WebIconDatabaseProxy::setEnabled):
603         (WebKit::WebIconDatabaseProxy::synchronousIconForPageURL):
604         (WebKit::WebIconDatabaseProxy::synchronousIconURLForPageURL):
605         (WebKit::WebIconDatabaseProxy::synchronousIconDataKnownForIconURL):
606         (WebKit::WebIconDatabaseProxy::synchronousLoadDecisionForIconURL):
607         (WebKit::WebIconDatabaseProxy::supportsAsynchronousMode):
608         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
609         (WebKit::WebIconDatabaseProxy::iconDataForIconURL):
610         * WebProcess/IconDatabase/WebIconDatabaseProxy.h:
611
612 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
613
614         Reviewed by Martin Robinson.
615
616         Fixed compilation after r80925.
617
618         * GNUmakefile.am:
619         * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: Added.
620         (WebKit::WebFullScreenManagerProxy::enterFullScreen):
621         (WebKit::WebFullScreenManagerProxy::exitFullScreen):
622         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation):
623         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation):
624         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation):
625         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation):
626         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode):
627         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode):
628         (WebKit::WebFullScreenManagerProxy::getFullScreenRect):
629         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Added.
630         (WebKit::WebFullScreenManagerGtk::WebFullScreenManagerGtk):
631         (WebKit::WebFullScreenManager::create):
632         (WebKit::WebFullScreenManagerGtk::setRootFullScreenLayer):
633         (WebKit::WebFullScreenManagerGtk::beginEnterFullScreenAnimation):
634         (WebKit::WebFullScreenManagerGtk::beginExitFullScreenAnimation):
635         * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Added.
636
637 2011-03-18  Alejandro G. Castro  <alex@igalia.com>
638
639         Unreviewed, fixed compilation after r81208.
640
641         * GNUmakefile.am:
642
643 2011-03-18  John Sullivan  <sullivan@apple.com>
644
645         Reviewed by Dan Bernstein.
646
647         https://bugs.webkit.org/show_bug.cgi?id=56645
648         Assertion fires when hidden Find-on-Page matches are encountered in WebKit2
649
650         * WebProcess/WebPage/FindController.cpp:
651         (WebKit::FindController::updateFindIndicator):
652         Bail out if the selection rect is empty, before trying to generate an appropriately-sized
653         bitmap. (Previously it was bailing out afterwards, but encountering an assertion in debug
654         builds along the way.)
655
656 2011-03-18  Mark Rowe  <mrowe@apple.com>
657
658         Rubber-stamped by Jon Honeycutt.
659
660         <rdar://problem/9153929> PluginProcess fails to launch due to PluginProcessShim.dylib building for 64-bit only
661
662         Fix a bogus change from r81392 that made PluginProcessShim.xcconfig import DebugRelease.xcconfig.
663         As its name suggests, DebugRelease.xcconfig is only applicable for the debug and release configurations.
664         It overrides the valid build architectures and also restricts the build to only the active architecture.
665         
666         * Configurations/PluginProcessShim.xcconfig: Import BaseTarget.xcconfig instead. This is what
667         each target-specific .xcconfig file should import.
668
669 2011-03-17  Mark Rowe  <mrowe@apple.com>
670
671         Fix the build.
672
673         * WebKit2.xcodeproj/project.pbxproj:
674
675 2011-03-17  Anders Carlsson  <andersca@apple.com>
676
677         Reviewed by Sam Weinig.
678
679         Implement PluginProcessProxy::setFullscreenWindowIsShowing
680         https://bugs.webkit.org/show_bug.cgi?id=56618
681
682         * UIProcess/Plugins/PluginProcessProxy.cpp:
683         (WebKit::PluginProcessProxy::PluginProcessProxy):
684         Initialize m_fullscreenWindowIsShowing.
685
686         (WebKit::PluginProcessProxy::didClose):
687         if m_fullscreenWindowIsShowing is true, call exitFullscreen.
688
689         * UIProcess/Plugins/PluginProcessProxy.h:
690         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
691         (WebKit::PluginProcessProxy::getPluginProcessSerialNumber):
692         Add helper function for getting a PSN for the plug-in process.
693
694         (WebKit::PluginProcessProxy::makePluginProcessTheFrontProcess):
695         Make the plug-in process the front process.
696
697         (WebKit::PluginProcessProxy::makeUIProcessTheFrontProcess):
698         Make the current process (the UI process) the front process.
699
700         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
701         Call enterFullscreen or exitFullscreen.
702
703         (WebKit::PluginProcessProxy::enterFullscreen):
704         Make the plug-in process the front process and hide the menu bar.
705
706         (WebKit::PluginProcessProxy::exitFullscreen):
707         Show the menu bar and if necessary make the UI process the front process.
708
709         (WebKit::PluginProcessProxy::endModal):
710         call makeUIProcessTheFrontProcess.
711
712         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
713         Call makePluginProcessTheFrontProcess.
714
715 2011-03-17  Adam Roben  <aroben@apple.com>
716
717         Make bidi text in <select> menus in WebKit2 on Windows match WebKit1
718
719         Fixes <http://webkit.org/b/56614> 3 <select> bidi tests failing on Windows 7 Release
720         (WebKit2 Tests)
721
722         Reviewed by Sam Weinig.
723
724         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
725         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
726         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection):
727         On Windows, return the same values we return in WebKit1.
728
729 2011-03-17  Anders Carlsson  <andersca@apple.com>
730
731         Reviewed by Sam Weinig.
732
733         Implement PluginProcessProxy::setModalWindowIsShowing
734         https://bugs.webkit.org/show_bug.cgi?id=56615
735
736         * UIProcess/Plugins/PluginProcessProxy.cpp:
737         (WebKit::PluginProcessProxy::PluginProcessProxy):
738         Initialize m_modalWindowIsShowing.
739
740         (WebKit::PluginProcessProxy::didClose):
741         If m_modalWindowIsShowing is true, we must call endModal.
742
743         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
744         (-[WKPlaceholderModalWindow _wantsUserAttention]):
745         Add a WKPlaceholderModalWindow.
746
747         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
748         Call beginModal or endModal depending on whether we're showing a modal window or not.
749
750         (WebKit::PluginProcessProxy::beginModal):
751         Create a fake window and start a nested run loop. Listen for NSApplicationWillBecomeActiveNotification notifications.
752
753         (WebKit::PluginProcessProxy::endModal):
754         Tear down the window and the run loop.
755
756         (WebKit::PluginProcessProxy::applicationDidBecomeActive):
757         Make sure that the plug-in process is frontmost.
758
759 2011-03-17  Jeff Miller  <jeffm@apple.com>
760
761         Reviewed by Adam Roben.
762
763         Web page shouldn't swallow alt-key combinations on Windows
764         https://bugs.webkit.org/show_bug.cgi?id=56612
765         
766         Make Alt+Left Arrow and Alt+Right Arrow go back and forward, but make
767         sure any alt-key combinations bubble up to the client.
768
769         * WebProcess/WebPage/win/WebPageWin.cpp:
770         (WebKit::WebPage::performDefaultBehaviorForKeyEvent): Make Alt+Left Arrow and Alt+Right Arrow go back and forward, ignore any other alt-key combinations.
771
772 2011-03-17  Anders Carlsson  <andersca@apple.com>
773
774         Reviewed by Sam Weinig.
775
776         Send SetModalWindowIsShowing and SetFullscreenWindowIsShowing messages to the UI process
777         https://bugs.webkit.org/show_bug.cgi?id=56610
778
779         * PluginProcess/mac/PluginProcessMac.mm:
780         (WebKit::FullscreenWindowTracker::FullscreenWindowTracker):
781         Add fullscreen window tracker class.
782
783         (WebKit::rectCoversAnyScreen):
784         Return whether the given rect covers any screen.
785
786         (WebKit::windowCoversAnyScreen):
787         Return whether the given window covers any screen.
788
789         (WebKit::FullscreenWindowTracker::windowShown):
790         If we're showing a fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
791
792         (WebKit::FullscreenWindowTracker::windowHidden):
793         If we're hiding the last fullscreen window, call PluginProcess::setFullscreenWindowIsShowing.
794
795         (WebKit::cocoaWindowShown):
796         (WebKit::cocoaWindowHidden):
797         (WebKit::carbonWindowShown):
798         (WebKit::carbonWindowHidden):
799         Call the window tracking functions.
800
801         (WebKit::setModal):
802         Call PluginProcess::setModalWindowIsShowing.
803
804         (WebKit::PluginProcess::setModalWindowIsShowing):
805         (WebKit::PluginProcess::setFullscreenWindowIsShowing):
806         Send CoreIPC messages.
807
808         * UIProcess/Plugins/PluginProcessProxy.h:
809         * UIProcess/Plugins/PluginProcessProxy.messages.in:
810         Add new messages.
811
812         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
813         (WebKit::PluginProcessProxy::setModalWindowIsShowing):
814         (WebKit::PluginProcessProxy::setFullscreenWindowIsShowing):
815         Add stubs.
816
817 2011-03-17  Sam Weinig  <sam@webkit.org>
818
819         Reviewed by Brady Eidson.
820
821         Allow passing a certificate chain as a user message
822         <rdar://problem/8951709>
823         https://bugs.webkit.org/show_bug.cgi?id=56605
824
825         * Shared/API/c/mac/WKCertificateInfoMac.h:
826         * Shared/API/c/mac/WKCertificateInfoMac.mm:
827         (WKCertificateInfoCreateWithCertficateChain):
828         Added. Creates a WKCertificate from a certificate chain.
829
830         * Shared/UserMessageCoders.h:
831         (WebKit::UserMessageEncoder::baseEncode):
832         (WebKit::UserMessageDecoder::baseDecode):
833         Add encoding/decoding of WebCertificateInfo.
834
835 2011-03-17  Anders Carlsson  <andersca@apple.com>
836
837         Reviewed by Sam Weinig.
838
839         Add PluginProcessShim hooks for when windows are shown and hidden
840         https://bugs.webkit.org/show_bug.cgi?id=56597
841
842         * Configurations/PluginProcessShim.xcconfig:
843         Add HEADER_SEARCH_PATHS so we can find WebKitSystemInterface.h.
844
845         * PluginProcess/mac/PluginProcessMac.mm:
846         (WebKit::cocoaWindowShown):
847         (WebKit::cocoaWindowHidden):
848         (WebKit::carbonWindowShown):
849         (WebKit::carbonWindowHidden):
850         (WebKit::setModal):
851         (WebKit::PluginProcess::initializeShim):
852         Add empty stubs.
853
854         * PluginProcess/mac/PluginProcessShim.h:
855         * PluginProcess/mac/PluginProcessShim.mm:
856         (WebKit::beginModal):
857         (WebKit::endModal):
858         Keep a modal count and call setModal accordingly.
859
860         (WebKit::shim_NSApplication_RunModalForWindow):
861         (WebKit::shimModalDialog):
862         (WebKit::shimAlert):
863         Call beginModal/endModal.
864
865         (WebKit::shimShowWindow):
866         (WebKit::shimHideWindow):
867         Call the shim functions.
868         
869         (WebKit::WebKitPluginProcessShimInitialize):
870         Listen for notifications and call the necessary shim functions.
871
872         * WebKit2.xcodeproj/project.pbxproj:
873         Link the plug-in process shim with AppKit and QuartzCore and WKSI.
874
875 2011-03-17  Jeff Miller  <jeffm@apple.com>
876
877         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
878         
879         *.mode*
880         *.pbxuser
881         *.perspective*
882         project.xcworkspace
883         xcuserdata
884
885         * WebKit2.xcodeproj: Modified property svn:ignore.
886
887 2011-03-17  Sam Weinig  <sam@webkit.org>
888
889         Reviewed by Anders Carlsson.
890
891         WKErrors need the PeerCertificateChain for certificate errors
892         <rdar://problem/8951784>
893         https://bugs.webkit.org/show_bug.cgi?id=56592
894
895         * Shared/WebCoreArgumentCoders.h:
896         Special case encoding/decoding of ResourceErrors for the mac.
897
898         * Shared/mac/PlatformCertificateInfo.h:
899         * Shared/mac/PlatformCertificateInfo.mm:
900         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
901         Add constructor that take the PeerCertificateChain as CFArrayRef.
902
903         * Shared/mac/WebCoreArgumentCodersMac.mm:
904         (CoreIPC::encodeResourceError):
905         (CoreIPC::decodeResourceError):
906         Add encode/decode for ResourceError using the underlying NSError
907         and encoding/decoding as much of the userInfo as we know how to.
908         Right now this includes all string values and the PeerCertificateChain.
909
910 2011-03-17  John Sullivan  <sullivan@apple.com>
911
912         Reviewed by Adam Roben.
913
914         https://bugs.webkit.org/show_bug.cgi?id=56574
915         Dealloc'ing a WKView can leave a stale reference to it in NSWindow
916
917         * UIProcess/API/mac/WKView.mm:
918         (-[WKView viewWillMoveToWindow:]):
919         Clear the outgoing window's growBoxOwner if it is this view.
920
921 2011-03-17  Anders Carlsson  <andersca@apple.com>
922
923         Rubber-stamped by John Sullivan.
924
925         Rename PluginProcessShim.cpp to PluginProcessShim.mm.
926
927         * PluginProcess/mac/PluginProcessShim.cpp: Removed.
928         * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp.
929         * WebKit2.xcodeproj/project.pbxproj:
930
931 2011-03-17  Anders Carlsson  <andersca@apple.com>
932
933         Reviewed by Darin Adler.
934
935         Invalidate all NPObjects for a plug-in when that plug-in is destroyed
936         https://bugs.webkit.org/show_bug.cgi?id=56511
937         <rdar://problem/8993491>
938
939         Before this change, we would invalidate NPObjectProxy objects and delete NPObjectMessageReceiver
940         objects when the last plug-in of a certain type was destroyed. Doing so caused us to hold on to memory
941         which we don't need, and could also lead to crashes if the NPObjectMessageReceiver would get a message and
942         tried to invoke it on a already deallocated NPObject.
943
944         * PluginProcess/PluginControllerProxy.cpp:
945         (WebKit::PluginControllerProxy::initialize):
946         If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so.
947
948         (WebKit::PluginControllerProxy::destroy):
949         Pass the plug-in to removePluginControllerProxy.
950
951         * PluginProcess/WebProcessConnection.cpp:
952         (WebKit::WebProcessConnection::removePluginControllerProxy):
953         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
954
955         (WebKit::WebProcessConnection::createPlugin):
956         Don't call removePluginControllerProxy if the plug-in fails to initialize. PluginControllerProxy::initialize now
957         takes care of doing this.
958
959         * Shared/Plugins/NPObjectMessageReceiver.cpp:
960         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
961         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
962         * Shared/Plugins/NPObjectMessageReceiver.h:
963         Remove m_shouldReleaseObjectWhenInvalidating, we now know that no NPObjects will have been deallocated
964         by the time the NPObjectMessageReceiver is destroyed.
965
966         (WebKit::NPObjectMessageReceiver::plugin):
967         Add getter.
968         
969         * Shared/Plugins/NPObjectProxy.h:
970         (WebKit::NPObjectProxy::plugin):
971         Add getter.
972         
973         * Shared/Plugins/NPRemoteObjectMap.cpp:
974         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
975         Remove m_isInvalidating.
976
977         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
978         Simplify code.
979
980         (WebKit::NPRemoteObjectMap::pluginDestroyed):
981         Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in.
982
983         * Shared/Plugins/NPRemoteObjectMap.h:
984         Remove m_isInvalidating.
985         
986         * WebProcess/Plugins/PluginProcessConnection.cpp:
987         (WebKit::PluginProcessConnection::removePluginProxy):
988         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
989
990 2011-03-17  Oleg Romashin  <oleg.romashin@nokia.com>
991
992         Reviewed by Anders Carlsson.
993
994         Teach WebKit2 messages.py generator to ifdef headers include
995         which are related to ifdef-ed methods/types
996         https://bugs.webkit.org/show_bug.cgi?id=55658
997
998         * Scripts/webkit2/messages.py:
999         * Scripts/webkit2/messages_unittest.py:
1000
1001 2011-03-16  Joseph Pecoraro  <joepeck@webkit.org>
1002
1003         Reviewed by Kenneth Rohde Christiansen.
1004
1005         Viewport no longer allows an auto value for "user-scalable"
1006         https://bugs.webkit.org/show_bug.cgi?id=55416
1007
1008         Make the default value for userScalable be true.
1009
1010         * UIProcess/API/qt/qwkpage.cpp:
1011         (QWKPage::viewportAttributesForSize):
1012
1013 2011-03-16  Anders Carlsson  <andersca@apple.com>
1014
1015         Reviewed by Dan Bernstein.
1016
1017         NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object
1018         https://bugs.webkit.org/show_bug.cgi?id=56506
1019
1020         * PluginProcess/PluginControllerProxy.cpp:
1021         (WebKit::PluginControllerProxy::windowScriptNPObject):
1022         (WebKit::PluginControllerProxy::pluginElementNPObject):
1023         (WebKit::PluginControllerProxy::evaluate):
1024         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
1025         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1026         (WebKit::NPObjectMessageReceiver::create):
1027         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
1028         (WebKit::NPObjectMessageReceiver::invoke):
1029         (WebKit::NPObjectMessageReceiver::invokeDefault):
1030         (WebKit::NPObjectMessageReceiver::getProperty):
1031         (WebKit::NPObjectMessageReceiver::setProperty):
1032         (WebKit::NPObjectMessageReceiver::construct):
1033         * Shared/Plugins/NPObjectMessageReceiver.h:
1034         * Shared/Plugins/NPObjectProxy.cpp:
1035         (WebKit::NPObjectProxy::create):
1036         (WebKit::NPObjectProxy::NPObjectProxy):
1037         (WebKit::NPObjectProxy::invalidate):
1038         (WebKit::NPObjectProxy::initialize):
1039         (WebKit::NPObjectProxy::invoke):
1040         (WebKit::NPObjectProxy::invokeDefault):
1041         (WebKit::NPObjectProxy::getProperty):
1042         (WebKit::NPObjectProxy::setProperty):
1043         (WebKit::NPObjectProxy::construct):
1044         * Shared/Plugins/NPObjectProxy.h:
1045         * Shared/Plugins/NPRemoteObjectMap.cpp:
1046         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
1047         (WebKit::NPRemoteObjectMap::registerNPObject):
1048         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
1049         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
1050         * Shared/Plugins/NPRemoteObjectMap.h:
1051         * WebProcess/Plugins/PluginProxy.cpp:
1052         (WebKit::PluginProxy::pluginScriptableNPObject):
1053         (WebKit::PluginProxy::getWindowScriptNPObject):
1054         (WebKit::PluginProxy::getPluginElementNPObject):
1055         (WebKit::PluginProxy::evaluate):
1056
1057 2011-03-16  Beth Dakin  <bdakin@apple.com>
1058
1059         Reviewed by Darin Adler.
1060
1061         Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath 
1062         WebPageProxy::viewWillStartLiveResize when resizing window after web process 
1063         crashed
1064         -and corresponding-
1065         <rdar://problem/9037685>
1066
1067         Just need simple isValid() checks here. 
1068         * UIProcess/WebPageProxy.cpp:
1069         (WebKit::WebPageProxy::initializeUIClient):
1070         (WebKit::WebPageProxy::viewWillStartLiveResize):
1071         (WebKit::WebPageProxy::viewWillEndLiveResize):
1072
1073 2011-03-16  Damian Kaleta  <dkaleta@apple.com>
1074
1075         Reviewed by Kevin Decker.
1076
1077         Add a user default that will force all plugins to opt in to non-executable data
1078         https://bugs.webkit.org/show_bug.cgi?id=56487
1079         <rdar://problem/9109095>
1080
1081         * UIProcess/Plugins/PluginProcessProxy.cpp:
1082         (WebKit::PluginProcessProxy::PluginProcessProxy):
1083         * UIProcess/Plugins/PluginProcessProxy.h:
1084         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
1085         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
1086
1087 2011-03-16  Chris Fleizach  <cfleizach@apple.com>
1088
1089         Reviewed by Darin Adler.
1090
1091         WK2: Need to propagate enhanced accessibility flag from UI -> web process
1092         https://bugs.webkit.org/show_bug.cgi?id=56379
1093
1094         Support sending the enhanced accessibility flag between processes.
1095
1096         * UIProcess/WebContext.cpp:
1097         (WebKit::WebContext::~WebContext):
1098         (WebKit::WebContext::setEnhancedAccessibility):
1099         * UIProcess/WebContext.h:
1100         * UIProcess/gtk/WebContextGtk.cpp:
1101         (WebKit::WebContet::platformInvalidateContext):
1102         * UIProcess/mac/WebContextMac.mm:
1103         (WebKit::WebContext::platformInitializeWebProcess):
1104         (WebKit::WebContext::platformInvalidateContext):
1105         * UIProcess/qt/WebContextQt.cpp:
1106         (WebKit::WebContext::platformInvalidateContext):
1107         * UIProcess/win/WebContextWin.cpp:
1108         (WebKit::WebContext::platformInvalidateContext):
1109         * WebProcess/WebProcess.cpp:
1110         (WebKit::WebProcess::setEnhancedAccessibility):
1111         * WebProcess/WebProcess.h:
1112         * WebProcess/WebProcess.messages.in:
1113
1114 2011-03-15  Oliver Hunt  <oliver@apple.com>
1115
1116         Reviewed by Geoffrey Garen.
1117
1118         Make Structure creation require a JSGlobalData
1119         https://bugs.webkit.org/show_bug.cgi?id=56438
1120
1121         Mechanical change to make all Structure creation use a JSGlobalData&.
1122
1123         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1124         (WebKit::JSNPMethod::JSNPMethod):
1125         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1126         (WebKit::JSNPMethod::createStructure):
1127         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1128         (WebKit::JSNPObject::JSNPObject):
1129         * WebProcess/Plugins/Netscape/JSNPObject.h:
1130         (WebKit::JSNPObject::createStructure):
1131
1132 2011-03-16  Alexey Proskuryakov  <ap@apple.com>
1133
1134         Reviewed by Dan Bernstein.
1135
1136         WebKit2: Sometimes Command-[ opens a new tab and loads the back page in it
1137         https://bugs.webkit.org/show_bug.cgi?id=56477
1138         <rdar://problem/8806664>
1139
1140         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
1141         Set NSApplication current event when re-dispatching a key event that returned from the web
1142         process unhandled. That way, code that looks at current event modifiers won't be confused.
1143
1144 2011-03-16  Sam Weinig  <sam@webkit.org>
1145
1146         Reviewed by Adam Roben.
1147
1148         Add WebKit2 API to figure out if an input or textarea was edited
1149         https://bugs.webkit.org/show_bug.cgi?id=56474
1150
1151         Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and
1152         WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time,
1153         I will work on giving these functions longer names.
1154
1155         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1156         (WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit):
1157         (WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit):
1158         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1159         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1160         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
1161         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
1162         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1163
1164 2011-03-16  Brady Eidson  <beidson@apple.com>
1165
1166         Reviewed by Adam Roben.
1167
1168         https://bugs.webkit.org/show_bug.cgi?id=56467
1169         IconDatabase-related crash seen in WK2 tests
1170
1171         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
1172         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case.
1173
1174 2011-03-16  Benjamin Poulain  <benjamin.poulain@nokia.com>
1175
1176         Reviewed by Kenneth Rohde Christiansen.
1177
1178         [Qt][WK2] Loading an empty URL crashes
1179         https://bugs.webkit.org/show_bug.cgi?id=55501
1180
1181         A null WKURLRef is created in the API of WebKit 2 when converting a null string. The code
1182         of WKPageLoadURL assume the WKPageRef is not null which causes crashes if it is.
1183
1184         This patch uses the converter toWTFString() to pass from WKPageRef to WTFString. This converter
1185         ensure the returned string is a valid null string.
1186
1187         Tested through the Qt API tests.
1188
1189         * UIProcess/API/C/WKPage.cpp:
1190         (WKPageLoadURL):
1191         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
1192         (tst_QGraphicsWKView::loadEmptyUrl):
1193         * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Added.
1194         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: Added.
1195         (tst_QWKPage::init):
1196         (tst_QWKPage::cleanup):
1197         (tst_QWKPage::loadEmptyUrl):
1198         * UIProcess/API/qt/tests/tests.pro:
1199
1200 2011-03-15  Brady Eidson  <beidson@apple.com>
1201
1202         Reviewed by Sam Weinig.
1203
1204         https://bugs.webkit.org/show_bug.cgi?id=56425
1205         WebKit2 icon database.
1206
1207         Project file paperwork:
1208         * DerivedSources.make:
1209         * DerivedSources.pro:
1210         * GNUmakefile.am:
1211         * WebKit2.pri:
1212         * WebKit2.pro:
1213         * WebKit2.xcodeproj/project.pbxproj:
1214         * win/WebKit2.vcproj:
1215         * win/WebKit2Common.vsprops:
1216         * Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased
1217           to "url" instead of "uRL".
1218
1219         Add messaging-related stuff:
1220         * Platform/CoreIPC/MessageID.h:
1221         * UIProcess/WebIconDatabase.messages.in: Added.
1222         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added.
1223         * UIProcess/WebProcessProxy.cpp:
1224         (WebKit::WebProcessProxy::didReceiveMessage):
1225         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1226
1227         Prep to make WebIconDatabase an API object:
1228         * Shared/APIObject.h:
1229
1230         Add an "icon DB is enabled" flag to WebProcessCreationParameters:
1231         * Shared/WebProcessCreationParameters.cpp:
1232         (WebKit::WebProcessCreationParameters::encode):
1233         (WebKit::WebProcessCreationParameters::decode):
1234         * Shared/WebProcessCreationParameters.h:
1235
1236         Add SPI for client apps to set the icon database path:
1237         * UIProcess/API/C/WKContext.cpp:
1238         (WKContextSetIconDatabasePath):
1239         * UIProcess/API/C/WKContextPrivate.h:
1240         * UIProcess/WebContext.h:
1241         (WebKit::WebContext::setIconDatabasePath):
1242
1243         Hook up initialization, clearing, and messaging for the icon database:
1244         * UIProcess/WebContext.cpp:
1245         (WebKit::WebContext::WebContext):
1246         (WebKit::WebContext::~WebContext):
1247         (WebKit::WebContext::ensureWebProcess):
1248         (WebKit::WebContext::didReceiveMessage):
1249         (WebKit::WebContext::didReceiveSyncMessage):
1250         (WebKit::WebContext::iconDatabasePath):
1251         * UIProcess/gtk/WebContextGtk.cpp:
1252         (WebKit::WebContext::platformDefaultIconDatabasePath):
1253         * UIProcess/mac/WebContextMac.mm:
1254         (WebKit::WebContext::platformDefaultIconDatabasePath):
1255         * UIProcess/qt/WebContextQt.cpp:
1256         (WebKit::WebContext::platformDefaultIconDatabasePath):
1257         * UIProcess/win/WebContextWin.cpp:
1258         (WebKit::WebContext::platformDefaultIconDatabasePath):
1259
1260         Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object:
1261         * UIProcess/WebIconDatabase.cpp: Added.
1262         (WebKit::WebIconDatabase::create):
1263         (WebKit::WebIconDatabase::~WebIconDatabase):
1264         (WebKit::WebIconDatabase::WebIconDatabase):
1265         (WebKit::WebIconDatabase::invalidate):
1266         (WebKit::WebIconDatabase::retainIconForPageURL):
1267         (WebKit::WebIconDatabase::releaseIconForPageURL):
1268         (WebKit::WebIconDatabase::setIconURLForPageURL):
1269         (WebKit::WebIconDatabase::setIconDataForIconURL):
1270         (WebKit::WebIconDatabase::iconDataForPageURL):
1271         (WebKit::WebIconDatabase::iconURLForPageURL):
1272         (WebKit::WebIconDatabase::iconDataKnownForIconURL):
1273         (WebKit::WebIconDatabase::loadDecisionForIconURL):
1274         (WebKit::WebIconDatabase::didReceiveMessage):
1275         (WebKit::WebIconDatabase::didReceiveSyncMessage):
1276         * UIProcess/WebIconDatabase.h: Added.
1277         (WebKit::WebIconDatabase::clearContext):
1278         (WebKit::WebIconDatabase::type):
1279
1280         Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging:
1281         * WebProcess/IconDatabase: Added.
1282         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added.
1283         (WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy):
1284         (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
1285         (WebKit::WebIconDatabaseProxy::isEnabled):
1286         (WebKit::WebIconDatabaseProxy::setEnabled):
1287         (WebKit::WebIconDatabaseProxy::iconForPageURL):
1288         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
1289         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
1290         (WebKit::WebIconDatabaseProxy::iconURLForPageURL):
1291         (WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL):
1292         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
1293         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
1294         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
1295         (WebKit::WebIconDatabaseProxy::urlImportFinished):
1296         (WebKit::WebIconDatabaseProxy::didReceiveMessage):
1297         * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added.
1298
1299         Hook up initialization and messaging for the icon database proxy:
1300         * WebProcess/WebProcess.cpp:
1301         (WebKit::WebProcess::WebProcess):
1302         (WebKit::WebProcess::initializeWebProcess):
1303         (WebKit::WebProcess::didReceiveMessage):
1304         * WebProcess/WebProcess.h:
1305
1306 2011-03-15  Sam Weinig  <sam@webkit.org>
1307
1308         Reviewed by Anders Carlsson.
1309
1310         WebKit2: False SPOD cursor when context menu is open
1311         <rdar://problem/9029154>
1312         https://bugs.webkit.org/show_bug.cgi?id=56433
1313
1314         * UIProcess/WebPageProxy.cpp:
1315         (WebKit::WebPageProxy::showContextMenu):
1316         Update to match showPopupMenu idiomatically, and stop the responsivenessTimer
1317         since the act of showing the context menu could spin a nested runloop.
1318
1319         * UIProcess/mac/WebContextMenuProxyMac.mm:
1320         (WebKit::WebContextMenuProxyMac::showContextMenu):
1321         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1322         (WebKit::WebContextMenuProxyQt::showContextMenu):
1323         * UIProcess/win/WebContextMenuProxyWin.cpp:
1324         (WebKit::WebContextMenuProxyWin::showContextMenu):
1325         Move isEmpty() check to implementations, since we don't want to show
1326         this in any case, not just the one where we check it.
1327
1328 2011-03-15  Siddharth Mathur  <siddharth.mathur@nokia.com>
1329
1330         Reviewed by Laszlo Gombos.
1331
1332         [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol
1333         https://bugs.webkit.org/show_bug.cgi?id=56417
1334
1335         Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure
1336         the symbol is always exported/imported.
1337
1338         * WebProcess/qt/WebProcessMainQt.cpp:
1339         (WebKit::WebProcessMainQt):
1340         * qt/MainQt.cpp:
1341
1342 2011-03-15  Alexey Proskuryakov  <ap@apple.com>
1343
1344         Reviewed by Darin Adler.
1345
1346         REGRESSION (WebKit2): keygen element doesn't work
1347         https://bugs.webkit.org/show_bug.cgi?id=56402
1348         <rdar://problem/9006545>
1349
1350         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1351         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1352         Added strings used by keygen.
1353
1354         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
1355         a function used by keygen.
1356
1357 2011-03-15  Beth Dakin  <bdakin@apple.com>
1358
1359         Reviewed by Simon Fraser.
1360
1361         WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6%
1362
1363         New WebKitystemInterface function to force the scrollbars to flash
1364         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1365         (InitWebCoreSystemInterface):
1366
1367 2011-03-15  Anders Carlsson  <andersca@apple.com>
1368
1369         Reviewed by Sam Weinig.
1370
1371         Make sure that NP_Shutdown is always the last NPP function called
1372         https://bugs.webkit.org/show_bug.cgi?id=56391
1373         <rdar://problem/8989902>
1374
1375         Make sure to always increment the load count whenever a web process connection
1376         is opened to a plug-in process, and decrement it when the last web process connection
1377         goes away.
1378
1379         * PluginProcess/PluginProcess.cpp:
1380         (WebKit::PluginProcess::createWebProcessConnection):
1381         (WebKit::PluginProcess::startShutdownTimerIfNecessary):
1382         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1383         * Shared/Plugins/Netscape/NetscapePluginModule.h:
1384         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1385         (WebKit::NetscapePlugin::NetscapePlugin):
1386         (WebKit::NetscapePlugin::~NetscapePlugin):
1387
1388 2011-03-15  Martin Robinson  <mrobinson@igalia.com>
1389
1390         Reviewed by Adam Barth.
1391
1392         [GTK] [WebKit2] The UIProcess never changes the mouse cursor
1393         https://bugs.webkit.org/show_bug.cgi?id=56333
1394
1395         Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
1396         the cursor to change as the user mouses around the page. There is currently
1397         no test infrastructure to track cursor changes.
1398
1399         * UIProcess/gtk/WebView.cpp:
1400         (WebKit::WebView::setCursor): Ported implementation from WebKit1.
1401
1402 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
1403
1404         Reviewed by Darin Adler.
1405
1406         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
1407         info into the headers rather than in export symbol definition files, but disable it on 
1408         all platforms initially so we can deal with port build issues one port at a time.
1409         
1410         https://bugs.webkit.org/show_bug.cgi?id=27551
1411
1412         * config.h:
1413
1414 2011-03-14  Alexey Proskuryakov  <ap@apple.com>
1415
1416         Reviewed by Darin Adler.
1417
1418         REGRESSION: Print preview is blank when selecting multiple pages per sheet
1419         https://bugs.webkit.org/show_bug.cgi?id=56341
1420         <rdar://problem/8991382>
1421
1422         * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): Don't reset latest expected
1423         callback number after receiving a different one. We only update preview after receiving
1424         the latest expected page data (and the assumption is that AppKit will ask for pages in
1425         natural order for N-up).
1426
1427 2011-03-14  Adam Roben  <aroben@apple.com>
1428
1429         Make WKBundlePageCanHandleRequest return true for empty document URLs
1430
1431         Reviewed by Sam Weinig.
1432
1433         * WebProcess/WebPage/WebPage.cpp:
1434         (WebKit::WebPage::canHandleRequest): Return true for any URL schemes that are handled as
1435         empty documents, and defer to the platform for everything else.
1436
1437         * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest.
1438
1439         * WebProcess/WebPage/mac/WebPageMac.mm:
1440         (WebKit::WebPage::platformCanHandleRequest):
1441         * WebProcess/WebPage/qt/WebPageQt.cpp:
1442         (WebKit::WebPage::platformCanHandleRequest):
1443         * WebProcess/WebPage/win/WebPageWin.cpp:
1444         (WebKit::WebPage::platformCanHandleRequest):
1445         Renamed from canHandleRequest.
1446
1447 2011-03-14  Chris Fleizach  <cfleizach@apple.com>
1448
1449         Reviewed by Beth Dakin.
1450
1451         CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248
1452         https://bugs.webkit.org/show_bug.cgi?id=56336
1453
1454         Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view()
1455         pointers.
1456
1457         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
1458         (-[AccessibilityWebPageObject accessibilityHitTest:]):
1459
1460 2011-03-14  Alice Liu  <alice.liu@apple.com>
1461
1462         Reviewed by Sam Weinig.
1463
1464         Provide API for creating WKImage from CGImageRef
1465         https://bugs.webkit.org/show_bug.cgi?id=56159
1466
1467         Add function for creating a WKImage from CGImage data.
1468         * Shared/API/c/cg/WKImageCG.cpp:
1469         (WKImageCreateFromCGImage): Added. Creates a graphics context for the bitmap-backed image and draws into it. 
1470         * Shared/API/c/cg/WKImageCG.h:
1471
1472 2011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
1473
1474         Reviewed by Adam Roben.
1475
1476         [Qt][WK2]Unbreak InjectedBundle on Qt
1477         https://bugs.webkit.org/show_bug.cgi?id=54109
1478
1479         Add API's to WKURL and WKString to satisfy
1480         WebKitTestRunner's needs.
1481
1482         * Shared/API/c/WKString.cpp:
1483         (WKStringIsEqualToUTF8CStringIgnoringCase):
1484         * Shared/API/c/WKString.h:
1485         * Shared/API/c/WKURL.cpp:
1486         (WKURLCopyHostName):
1487         (WKURLCopyScheme):
1488         * Shared/API/c/WKURL.h:
1489         * Shared/WebString.h:
1490         (WebKit::WebString::equalToUTF8StringIgnoringCase):
1491         * Shared/WebURL.h: Added OwnPtr<KURL> member to be able
1492         to lazily parse the URL and store the result.
1493         (WebKit::WebURL::host):
1494         (WebKit::WebURL::protocol):
1495         (WebKit::WebURL::parseURLIfNecessary):
1496         * win/WebKit2.def: Revert the symbol exports that were
1497         needed to use KURL in WebKitTestRunner.
1498
1499 2011-03-14  Jeff Miller  <jeffm@apple.com>
1500
1501         Reviewed by Adam Roben.
1502
1503         Add WKViewSetScrollOffsetOnNextResize() to C API on Windows
1504         https://bugs.webkit.org/show_bug.cgi?id=56340
1505
1506         * UIProcess/API/C/win/WKView.cpp:
1507         (WKViewSetScrollOffsetOnNextResize): Added.
1508         * UIProcess/API/C/win/WKView.h: Added WKViewSetScrollOffsetOnNextResize().
1509         * UIProcess/win/WebView.cpp:
1510         (WebKit::WebView::onSizeEvent): Apply any scroll offset when setting the drawing area size.
1511         (WebKit::WebView::setScrollOffsetOnNextResize): Added.
1512         * UIProcess/win/WebView.h: Added setScrollOffsetOnNextResize().
1513
1514 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
1515
1516         Reviewed by Adam Roben and Gavin Barraclough.
1517
1518         FileSystemWin.cpp needs listDirectory() implementation
1519         https://bugs.webkit.org/show_bug.cgi?id=56331
1520         <rdar://problem/9126635>
1521         
1522         Move PathWalker down into WebCore, and call the PathWalker in WebCore
1523         (that now has a second argument, the pattern to take).
1524
1525         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
1526         (WebKit::PluginInfoStore::pluginPathsInDirectory):
1527
1528 2011-03-14  Sam Weinig  <sam@webkit.org>
1529
1530         Reviewed by Darin Adler.
1531
1532         WebKit2: No icon shown for <input type=file>
1533         <rdar://problem/8988982>
1534         https://bugs.webkit.org/show_bug.cgi?id=54288
1535
1536         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1537         (WebKit::WebChromeClient::chooseIconForFiles):
1538         Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles.
1539
1540 2011-03-14  Brady Eidson  <beidson@apple.com>
1541
1542         Reviewed by Dan Bernstein.
1543
1544         <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
1545         Need WK2 API to view/manage origins with LocalStorage
1546
1547         Hookup the existing API stubs to the WebCore implementations:
1548         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
1549         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1550         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1551         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1552
1553 2011-03-13  Brady Eidson  <beidson@apple.com>
1554
1555         Reviewed by Sam Weinig.
1556
1557         <rdar://problem/9127270> and https://bugs.webkit.org/show_bug.cgi?id=56282
1558
1559         Pass the path along with creation parameters:
1560         * Shared/WebProcessCreationParameters.cpp:
1561         (WebKit::WebProcessCreationParameters::encode):
1562         (WebKit::WebProcessCreationParameters::decode):
1563         * Shared/WebProcessCreationParameters.h:
1564
1565         Add SPI to set the path:
1566         * UIProcess/API/C/WKContext.cpp:
1567         (WKContextSetLocalStorageDirectory):
1568         * UIProcess/API/C/WKContextPrivate.h:
1569
1570         Pass the path along in the process creation parameters:
1571         * UIProcess/WebContext.cpp:
1572         (WebKit::WebContext::ensureWebProcess):
1573         (WebKit::WebContext::localStorageDirectory):
1574         * UIProcess/WebContext.h:
1575         (WebKit::WebContext::setLocalStorageDirectory):
1576
1577         * UIProcess/gtk/WebContextGtk.cpp:
1578         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1579         * UIProcess/mac/WebContextMac.mm:
1580         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1581         * UIProcess/qt/WebContextQt.cpp:
1582         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1583         * UIProcess/win/WebContextWin.cpp:
1584         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
1585
1586         Include the path with settings updates, because WebCore needs it set on the Settings object:
1587         * WebProcess/WebPage/WebPage.cpp:
1588         (WebKit::WebPage::updatePreferences):
1589
1590         * WebProcess/WebProcess.cpp:
1591         (WebKit::WebProcess::initializeWebProcess):
1592         * WebProcess/WebProcess.h:
1593         (WebKit::WebProcess::localStorageDirectory):
1594
1595         Sandboxing stuff:
1596         * WebProcess/com.apple.WebProcess.sb:
1597         * WebProcess/mac/WebProcessMac.mm:
1598         (WebKit::initializeSandbox):
1599
1600 2011-03-12  Jer Noble  <jer.noble@apple.com>
1601
1602         Reviewed by Mark Rowe.
1603
1604         WebKit2: Build WKFullScreenWindowController cleanly in 32-bit.
1605         https://bugs.webkit.org/show_bug.cgi?id=56260
1606
1607         Include <Carbon/Carbon.h> instead of <HIToolbox/MacApplication.h>.
1608
1609         * UIProcess/mac/WKFullScreenWindowController.mm:
1610
1611 2011-03-13  Sam Weinig  <sam@webkit.org>
1612
1613         Reviewed by Anders Carlsson.
1614
1615         Add ability to create a WKErrorRef
1616         <rdar://problem/9115768>
1617         https://bugs.webkit.org/show_bug.cgi?id=56279
1618
1619         * Shared/API/c/cf/WKErrorCF.cpp: Added.
1620         (WKErrorCreateWithCFError):
1621         (WKErrorCopyCFError):
1622         * Shared/API/c/cf/WKErrorCF.h: Added.
1623         Add new API to create a WKErrorRef from a CFErrorRef
1624         and vice-versa.
1625
1626         * WebKit2.xcodeproj/project.pbxproj:
1627         * win/WebKit2.vcproj:
1628         * win/WebKit2Generated.make:
1629         Add new files.
1630
1631 2011-03-13  Pratik Solanki  <psolanki@apple.com>
1632
1633         Reviewed by Brady Eidson.
1634
1635         Make adjustMIMETypeIfNecessary use CFNetwork directly
1636         https://bugs.webkit.org/show_bug.cgi?id=55912
1637
1638         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1639         (InitWebCoreSystemInterface): Support for new WKSI functions.
1640
1641 2011-03-13  Dan Bernstein  <mitz@apple.com>
1642
1643         Reviewed by Darin Adler.
1644
1645         WebPageProxy cleanup
1646         https://bugs.webkit.org/show_bug.cgi?id=56267
1647
1648         * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from
1649         here to WebPageProxyMac.mm.
1650         * UIProcess/WebPageProxy.h: Cleaned up #includes.
1651         * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations
1652         here.
1653         (WebKit::WebPageProxy::updateWindowIsVisible):
1654         (WebKit::WebPageProxy::windowAndViewFramesChanged):
1655         (WebKit::WebPageProxy::getMarkedRange):
1656         (WebKit::WebPageProxy::characterIndexForPoint):
1657         (WebKit::WebPageProxy::firstRectForCharacterRange):
1658         (WebKit::WebPageProxy::writeSelectionToPasteboard):
1659         (WebKit::WebPageProxy::setDragImage):
1660         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
1661         (WebKit::WebPageProxy::interpretKeyEvent):
1662         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
1663         (WebKit::WebPageProxy::uppercaseWord):
1664         (WebKit::WebPageProxy::lowercaseWord):
1665         (WebKit::WebPageProxy::capitalizeWord):
1666         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
1667         (WebKit::WebPageProxy::didPerformDictionaryLookup):
1668         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
1669         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
1670         (WebKit::WebPageProxy::setComplexTextInputEnabled):
1671
1672 2011-03-13  Dan Bernstein  <mitz@apple.com>
1673
1674         Reviewed by Darin Adler.
1675
1676         <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down
1677         https://bugs.webkit.org/show_bug.cgi?id=56265
1678
1679         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1680         (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than
1681         document coordinates.
1682
1683 2011-03-13  Dan Bernstein  <mitz@apple.com>
1684
1685         Reviewed by Mark Rowe.
1686
1687         Fix a crash when dragging.
1688
1689         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1690         (WebKit::convertImageToBitmap): Retain the saved context.
1691
1692 2011-03-12  Darin Adler  <darin@apple.com>
1693
1694         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1695         (WebKit::WebDragClient::startDrag): Fixed typo in a comment.
1696
1697 2011-03-11  Darin Adler  <darin@apple.com>
1698
1699         Reviewed by Sam Weinig.
1700
1701         Dragging image to desktop gives webloc instead of image file in WebKit2
1702         https://bugs.webkit.org/show_bug.cgi?id=56193
1703
1704         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1705         (WebKit::convertImageToBitmap): Added. Factored out from startDrag to
1706         make the startDrag code clearer.
1707         (WebKit::WebDragClient::startDrag): Streamlined code a bit.
1708         (WebKit::cachedImage): Added. Helper for function below.
1709         (WebKit::arrayForURLsWithTitles): Added. Helper for function below.
1710         (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file
1711         promises and removed a log of uneeded code.
1712         (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added.
1713         (promisedDataClient): Added.
1714         (-[WKPasteboardOwner clearImage]): Added.
1715         (-[WKPasteboardOwner initWithImage:]): Added.
1716         (-[WKPasteboardOwner dealloc]): Added.
1717         (-[WKPasteboardOwner finalize]): Added.
1718         (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added.
1719         (-[WKPasteboardOwner pasteboardChangedOwner:]): Added.
1720         (matchesExtensionOrEquivalent): Added.
1721         (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added.
1722         Much of the new code above came from the WebKit1 drag code.
1723
1724         * WebProcess/WebPage/WebPage.cpp:
1725         (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded.
1726         * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource.
1727         * WebProcess/WebPage/mac/WebPageMac.mm:
1728         (WebKit::WebPage::setDragSource): Added.
1729         (WebKit::WebPage::platformDragEnded): Added.
1730
1731 2011-03-12  Mark Rowe  <mrowe@apple.com>
1732
1733         Fix the 32-bit build.
1734
1735         This involves hacking around some HIToolbox headers that do things of dubious correctness,
1736         and fixing the usual CGRect vs NSRect issues.
1737         
1738         * UIProcess/mac/WKFullScreenWindowController.mm:
1739         (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect.
1740         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
1741         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
1742
1743 2011-03-12  Anders Carlsson  <andersca@apple.com>
1744
1745         Reviewed by Sam Weinig.
1746
1747         * WebProcess/WebPage/WebFrame.cpp:
1748         (WebKit::WebFrame::url):
1749         Get the URL from the loader, not from the document.
1750
1751         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
1752         Return the correct suggested filename for the main resource.
1753
1754         (WebKit::WebFrame::mimeTypeForResourceWithURL):
1755         Return the correct mime type for the main resource.
1756
1757 2011-03-12  Anders Carlsson  <andersca@apple.com>
1758
1759         Reviewed by Sam Weinig.
1760
1761         Should be able to download a PDF to the Downloads folder
1762         https://bugs.webkit.org/show_bug.cgi?id=56256
1763
1764         * UIProcess/API/C/WKPage.h:
1765         Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client.
1766
1767         * UIProcess/API/mac/PDFViewController.h:
1768         * UIProcess/API/mac/PDFViewController.mm:
1769         (-[WKPDFView _applyPDFPreferences]):
1770         (-[WKPDFView _updatePreferences:]):
1771         Use new PDFViewController::page getter.
1772
1773         (-[WKPDFView PDFViewSavePDFToDownloadFolder:]):
1774         Call PDFViewController::savePDFToDownloadsFolder.
1775
1776         (WebKit::releaseCFData):
1777         (WebKit::PDFViewController::savePDFToDownloadsFolder):
1778         Create a WebData that wraps the CFData, then pass it along to
1779         WebPageProxy::saveDataToFileInDownloadsFolder.
1780
1781         * UIProcess/WebPageProxy.cpp:
1782         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
1783         Call WebUIClient::saveDataToFileInDownloadsFolder.
1784
1785         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
1786         * UIProcess/WebUIClient.h:
1787         Call the UI client callback function.
1788
1789 2011-03-12  Anders Carlsson  <andersca@apple.com>
1790
1791         Reviewed by Sam Weinig.
1792
1793         WebData should be able to wrap already existing data
1794         https://bugs.webkit.org/show_bug.cgi?id=56254
1795
1796         * Shared/WebData.h:
1797         (WebKit::WebData::createWithoutCopying):
1798         (WebKit::WebData::create):
1799         (WebKit::WebData::~WebData):
1800         (WebKit::WebData::bytes):
1801         (WebKit::WebData::size):
1802         (WebKit::WebData::WebData):
1803         (WebKit::WebData::fastFreeBytes):
1804
1805 2011-03-12  Jer Noble  <jer.noble@apple.com>
1806
1807         Reviewed by Eric Carlson.
1808
1809         WebKit2: Initialize the WebFullScreenManagerProxy with a WKView
1810         https://bugs.webkit.org/show_bug.cgi?id=56250
1811
1812         * UIProcess/API/mac/WKView.mm:
1813         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self).
1814
1815 2011-03-11  Jer Noble  <jer.noble@apple.com>
1816
1817         Reviewed by Anders Carlsson.
1818
1819         Add full screen animation code to WebFullScreenManager.
1820         https://bugs.webkit.org/show_bug.cgi?id=56220
1821
1822         * WebProcess/FullScreen/WebFullScreenManager.cpp: .
1823         (WebKit::WebFullScreenManager::~WebFullScreenManager): Added.
1824         (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs.
1825         (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color.
1826         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto.
1827         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
1828         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
1829         * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a 
1830             concrete subclass.
1831         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added.
1832         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added.
1833         (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations.
1834         (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added.
1835         (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added.
1836         (-[WebFullScreenManagerAnimationListener invalidate]): Added.
1837         (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac.
1838         (WebKit::WebFullScreenManagerMac::create): Added.
1839         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added.
1840         (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added.
1841         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host.
1842         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D
1843             which will animate the full screen renderer from its initial position to its final one.
1844         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
1845
1846 2011-03-11  Jer Noble  <jer.noble@apple.com>
1847
1848         Reviewed by Anders Carlsson.
1849
1850         Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy
1851         https://bugs.webkit.org/show_bug.cgi?id=56218
1852
1853         * UIProcess/WebFullScreenManagerProxy.cpp:
1854         * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added.
1855         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController.
1856         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
1857         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto.
1858         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto.
1859         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto.
1860         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto.
1861         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto.
1862         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto.
1863         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto.
1864         * UIProcess/API/mac/WKView.mm:
1865         (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController.
1866         * UIProcess/API/mac/WKViewInternal.h:
1867
1868 2011-03-11  Jer Noble  <jer.noble@apple.com>
1869
1870         Reviewed by Anders Carlsson.
1871
1872         Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController.
1873
1874         [WebKit2] Implement a full screen window controller
1875         https://bugs.webkit.org/show_bug.cgi?id=56210
1876
1877         * UIProcess/mac/WKFullScreenWindowController.h: Added.
1878         * UIProcess/mac/WKFullScreenWindowController.mm: Added.
1879         (-[WKFullScreenWindowController init]): Remove the _mediaEventListener.
1880         (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests.
1881         (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection.
1882         (-[WKFullScreenWindowController webView]): Type change.
1883         (-[WKFullScreenWindowController setWebView:]): Type change.
1884         (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes.
1885         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes.
1886         (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code
1887             which will reappear in WebFullScreenManager.
1888         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added.
1889         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added.
1890         (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen.
1891         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added.
1892         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added.
1893         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the
1894             layer tree host.
1895         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same.
1896         (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added.
1897         (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes.
1898         (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto.
1899         (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto.
1900         (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto.
1901         (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto.
1902         (-[WKFullScreenWindowController _enableTickleTimer]): Ditto.
1903         (-[WKFullScreenWindowController _disableTickleTimer]): Ditto.
1904         (-[WKFullScreenWindowController _tickleTimerFired]): Ditto.
1905         (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar.
1906         (-[WKFullScreenWindowController _manager]): Added.
1907         (-[WKFullScreenWindowController _requestExit]): Case changes.
1908         (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto.
1909         (-[WKFullScreenWindowController _swapView:with:]): Added.
1910         (-[WKFullScreenWindowController _fullScreenWindow]): Case changes.
1911         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no
1912             longer needs to be flipped.
1913         (-[WKFullScreenWindow cancelOperation:]): Case changes.
1914
1915 2011-03-11  Jer Noble  <jer.noble@apple.com>
1916
1917         Reviewed by Anders Carlsson.
1918
1919         Create new interface stubs to support full screen mode in WebKit2.
1920
1921         WebKit2: Plumb new full screen animation APIs through WebKit2.
1922         https://bugs.webkit.org/show_bug.cgi?id=55993
1923
1924         * UIProcess/WebFullScreenManagerProxy.cpp:
1925         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added.
1926         (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView.
1927         (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView.
1928         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added.
1929         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added.
1930         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
1931         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
1932         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
1933         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
1934         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
1935         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
1936         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
1937         * UIProcess/WebFullScreenManagerProxy.h:
1938         * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions.
1939         * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file.
1940         * UIProcess/WebPageProxy.h: Ditto.
1941         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1942         (WebKit::WebFullScreenManager::element): Added.
1943         (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage.
1944         (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
1945         (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
1946         (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added..
1947         (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added.
1948         (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added.
1949         (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added.
1950         (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub.
1951         (WebKit::WebFullScreenManager::getFullScreenRect): Added.
1952         (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub.
1953         (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub.
1954         * WebProcess/FullScreen/WebFullScreenManager.h:
1955         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions.
1956         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1957         (WebKit::WebChromeClient::setRootFullScreenLayer): Added.
1958         * WebProcess/WebCoreSupport/WebChromeClient.h:
1959
1960 2011-03-11  Alice Liu  <alice.liu@apple.com>
1961
1962         Reviewed by Sam Weinig.
1963
1964         Support encoding /decoding WebData in usermessages
1965         https://bugs.webkit.org/show_bug.cgi?id=56158
1966
1967         Added encoding/decoding for APIObject::TypeData
1968         * Shared/UserMessageCoders.h:
1969         (WebKit::UserMessageEncoder::baseEncode):
1970         (WebKit::UserMessageDecoder::baseDecode):
1971
1972 2011-03-11  Alice Liu  <alice.liu@apple.com>
1973
1974         Reviewed by Sam Weinig.
1975
1976         Add api for "remove" to WKMutableDictionary
1977         https://bugs.webkit.org/show_bug.cgi?id=56157
1978
1979         * Shared/API/c/WKMutableDictionary.cpp:
1980         (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl.
1981         * Shared/API/c/WKMutableDictionary.h:
1982         * Shared/MutableDictionary.cpp:
1983         (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap.
1984         * Shared/MutableDictionary.h:
1985
1986 2011-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1987
1988         Unreviewed, rolling out r80899 and r80912.
1989         http://trac.webkit.org/changeset/80899
1990         http://trac.webkit.org/changeset/80912
1991         https://bugs.webkit.org/show_bug.cgi?id=56236
1992
1993         Caused animation tests to crash on Snow Leopard WebKit2
1994         (Requested by rniwa on #webkit).
1995
1996         * Shared/ShareableBitmap.cpp:
1997         (WebKit::ShareableBitmap::create):
1998         (WebKit::ShareableBitmap::createShareable):
1999         (WebKit::ShareableBitmap::resize):
2000         * Shared/ShareableBitmap.h:
2001         (WebKit::ShareableBitmap::numBytesForSize):
2002         (WebKit::ShareableBitmap::sizeInBytes):
2003         * UIProcess/DrawingAreaProxyImpl.cpp:
2004         (WebKit::DrawingAreaProxyImpl::update):
2005         * WebKit2.xcodeproj/project.pbxproj:
2006         * WebProcess/WebPage/DrawingArea.h:
2007         (WebKit::DrawingArea::didUpdate):
2008         * WebProcess/WebPage/DrawingArea.messages.in:
2009         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2010         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
2011         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
2012         (WebKit::DrawingAreaImpl::didUpdate):
2013         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2014         (WebKit::DrawingAreaImpl::display):
2015         * WebProcess/WebPage/DrawingAreaImpl.h:
2016         * WebProcess/WebPage/SharedMemoryCache.cpp: Removed.
2017         * WebProcess/WebPage/SharedMemoryCache.h: Removed.
2018         * win/WebKit2.vcproj:
2019
2020 2011-03-11  Brian Weinstein  <bweinstein@apple.com>
2021
2022         Windows build fix. Add SharedMemoryCache to the vcproj.
2023
2024         * win/WebKit2.vcproj:
2025
2026 2011-03-11  Alexey Proskuryakov  <ap@apple.com>
2027
2028         Reviewed by Sam Weinig.
2029
2030         https://bugs.webkit.org/show_bug.cgi?id=56222
2031         A window remains frozen if web process crashes during printing
2032
2033         * UIProcess/API/mac/PageClientImpl.h:
2034         * UIProcess/API/mac/PageClientImpl.mm:
2035         * UIProcess/PageClient.h:
2036         * UIProcess/WebPageProxy.cpp:
2037         (WebKit::WebPageProxy::setComplexTextInputEnabled):
2038         * UIProcess/WebPageProxy.h:
2039         Moved setAutodisplay code into WKPrintingView.
2040
2041         * UIProcess/API/mac/WKPrintingView.h:
2042         * UIProcess/API/mac/WKView.mm:
2043         (-[WKView printOperationWithPrintInfo:forFrame:]):
2044         Keep a reference to the actual WKView, so that we can manipulate how it displays, even if
2045         page goes away.
2046
2047         * UIProcess/API/mac/WKPrintingView.mm:
2048         (-[WKPrintingView initWithFrameProxy:WebKit::view:]):
2049         (-[WKPrintingView _setAutodisplay:]):
2050         (-[WKPrintingView _suspendAutodisplay]):
2051         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
2052         Move setAutodisplay here.
2053
2054 2011-03-11  Anders Carlsson  <andersca@apple.com>
2055
2056         Reviewed by Sam Weinig.
2057
2058         Add a shared memory cache to the web process
2059         https://bugs.webkit.org/show_bug.cgi?id=56232
2060
2061         Add a very simple shared memory cache to the web process, so that we don't have to allocate and
2062         free memory over and over when painting.
2063
2064         * Shared/ShareableBitmap.cpp:
2065         (WebKit::ShareableBitmap::create):
2066         (WebKit::ShareableBitmap::createShareable):
2067         (WebKit::ShareableBitmap::resize):
2068         * Shared/ShareableBitmap.h:
2069         (WebKit::ShareableBitmap::numBytesNeededForBitmapSize):
2070         (WebKit::ShareableBitmap::sizeInBytes):
2071         Rename numBytesForSize to numBytesNeededForBitmapSize.
2072
2073         * UIProcess/DrawingAreaProxyImpl.cpp:
2074         (WebKit::DrawingAreaProxyImpl::update):
2075         Always send back a DidUpdate message, even if we didn't use the update info.
2076         This is needed so that the web process knows when the UI process is done with the shared memory inside
2077         the update info struct.
2078
2079         * WebKit2.xcodeproj/project.pbxproj:
2080         Add new files.
2081
2082         * WebProcess/WebPage/DrawingArea.h:
2083         (WebKit::DrawingArea::didUpdate):
2084         * WebProcess/WebPage/DrawingArea.messages.in:
2085         DidUpdate now takes a boolean.
2086
2087         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2088         (WebKit::sharedMemoryCache):
2089         Add shared memory cache.
2090
2091         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
2092         Return the shared memory to the cache.
2093
2094         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
2095         display now takes an extra boolean.
2096
2097         (WebKit::DrawingAreaImpl::didUpdate):
2098         Return the shared memory to the cache.
2099
2100         (WebKit::DrawingAreaImpl::display):
2101         If useSharedMemoryCache is true, get shared memory from the cache.
2102
2103         * WebProcess/WebPage/SharedMemoryCache.cpp: Added.
2104         (WebKit::SharedMemoryCache::acquireSharedMemory):
2105         If the memory we currently hold on to is big enough, return it.
2106
2107         (WebKit::SharedMemoryCache::releaseSharedMemory):
2108         If we're already holding on to shared memory, evict it if the returned
2109         shared memory object is bigger than the one we currently hold.
2110
2111         (WebKit::SharedMemoryCache::clearCacheTimerFired):
2112         Null out the shared memory object.
2113
2114 2011-03-11  Jessie Berlin  <jberlin@apple.com>
2115
2116         Reviewed by Adam Roben.
2117
2118         Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
2119         Process has finished launching.
2120         https://bugs.webkit.org/show_bug.cgi?id=56208
2121
2122         Only send the message if the Web Process is valid.
2123
2124         * UIProcess/WebContext.cpp:
2125         (WebKit::WebContext::clearResourceCaches):
2126
2127 2011-03-11  Anders Carlsson  <andersca@apple.com>
2128
2129         Reviewed by Dan Bernstein.
2130
2131         Don't paint more than 60 times per second
2132         https://bugs.webkit.org/show_bug.cgi?id=56206
2133         <rdar://problem/9085989>
2134
2135         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2136         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2137         Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired.
2138
2139         (WebKit::DrawingAreaImpl::didUpdate):
2140         Call displayTimerFired instead of display.
2141
2142         (WebKit::DrawingAreaImpl::displayTimerFired):
2143         If we're asked to paint again less than 1/60th of a second after we've already painted,
2144         defer painting.
2145
2146         (WebKit::DrawingAreaImpl::display):
2147         Update m_lastDisplayTime.
2148
2149 2011-03-11  Mark Rowe  <mrowe@apple.com>
2150
2151         Reviewed by Alice Liu.
2152
2153         <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL.
2154
2155         * UIProcess/cf/WebPageProxyCF.cpp:
2156         (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item
2157         as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will
2158         be done by our call to loadURL elsewhere in the function.
2159
2160 2011-03-10  Alexey Proskuryakov  <ap@apple.com>
2161
2162         Reviewed by Jon Honeycutt.
2163
2164         WebKit2 UI process crashes if web process crashes while computing page rects for printing
2165         https://bugs.webkit.org/show_bug.cgi?id=56160
2166         <rdar://problem/9027410>
2167
2168         * UIProcess/API/mac/WKPrintingView.mm:
2169         (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that
2170         we have when resuming autodisplay.
2171         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME.
2172         (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing
2173         when there is a communication error, so results are all null).
2174         (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many
2175         pages it had.
2176         (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages
2177         nor knowing them, as it happens when the web process crashes.        
2178
2179 2011-03-10  Mark Rowe  <mrowe@apple.com>
2180
2181         Rubber-stamped by Sam Weinig.
2182
2183         Part of <rdar://problem/8728860> WebKit2 needs to be made localizable
2184
2185         The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents
2186         the default localization that we set during launch from being respected.
2187
2188         * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion.
2189         * WebProcess/Info.plist: Ditto.
2190
2191 2011-03-10  Martin Robinson  <mrobinson@igalia.com>
2192
2193         Build for WebKit2 GTK+ after r80714.
2194
2195         * GNUmakefile.am: Update source list.
2196         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 
2197         (WebKit::x11Display): Add missing semicolon.
2198
2199 2011-03-10  Chris Fleizach  <cfleizach@apple.com>
2200
2201         Reviewed by Darin Adler.
2202
2203         REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus
2204         https://bugs.webkit.org/show_bug.cgi?id=55959
2205
2206         NSApplication has to return the focused element within the app in order
2207         for NSAccessibilityHandleFocusChanged() to work. The default implementation
2208         relies on keyWindow. Consequently, in WK2, the WebProcess must override that method
2209         to return the appropriate focused element within the WebProcess, since
2210         there is no keyWindow.
2211
2212         * WebKit2.xcodeproj/project.pbxproj:
2213         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2214         (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
2215         * WebProcess/WebProcess.cpp:
2216         (WebKit::WebProcess::focusedWebPage):
2217         * WebProcess/WebProcess.h:
2218         * WebProcess/mac/NSApplicationOverride.mm: Added.
2219         (-[NSApplication accessibilityFocusedUIElement]):
2220
2221 2011-03-10  Oleg Romashin  <romaxa@gmail.com>
2222
2223         Reviewed by Andreas Kling.
2224
2225         Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3
2226         Solving conflict of Qt and Xlib includes
2227
2228         * Shared/Plugins/NPIdentifierData.cpp:
2229         * Shared/Plugins/NPIdentifierData.h:
2230         * Shared/Plugins/NPObjectProxy.cpp:
2231         * Shared/Plugins/NPVariantData.h:
2232
2233 2011-03-10  Sam Weinig  <sam@webkit.org>
2234
2235         Reviewed by Mark Rowe.
2236
2237         - Fix plugins in release and production builds.
2238
2239         * WebKit2.xcodeproj/project.pbxproj:
2240         Make sure to base the PluginProcess target on the correct xcconfig file
2241         in all configurations.
2242
2243 2011-03-09  Matthew Delaney  <mdelaney@apple.com>
2244
2245         Reviewed by Simon Fraser.
2246
2247         Plumb through settings for accelerated drawing for canvas
2248         https://bugs.webkit.org/show_bug.cgi?id=56039
2249
2250         * Shared/WebPreferencesStore.h:
2251         * UIProcess/API/C/WKPreferences.cpp:
2252         * UIProcess/API/C/WKPreferencesPrivate.h:
2253         * WebProcess/WebPage/WebPage.cpp:
2254
2255 2011-03-10  Jessie Berlin  <jberlin@apple.com>
2256
2257         Reviewed by Oliver Hunt and Brian Weinstein.
2258
2259         WebKit2: Need a way to clear only the in-memory resource caches
2260         https://bugs.webkit.org/show_bug.cgi?id=56022
2261
2262         Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches
2263         or just the memory caches.
2264
2265         * Shared/ResourceCachesToClear.h: Added.
2266         * UIProcess/API/C/WKAPICast.h:
2267         (WebKit::toResourceCachesToClear):
2268
2269         * UIProcess/API/C/WKContext.cpp:
2270         (WKContextClearResourceCaches):
2271         Add the new parameter.
2272         * UIProcess/API/C/WKContext.h:
2273         * UIProcess/WebContext.cpp:
2274         (WebKit::WebContext::clearResourceCaches):
2275         Ditto.
2276         * UIProcess/WebContext.h:
2277
2278         * WebProcess/WebProcess.cpp:
2279         (WebKit::WebProcess::clearResourceCaches):
2280         Pass the new parameter through to the platform-specific functions.
2281         * WebProcess/WebProcess.h:
2282         Add the new parameter and give it a default of AllResourceCaches.
2283         * WebProcess/WebProcess.messages.in:
2284         Ditto.
2285         * WebProcess/gtk/WebProcessGtk.cpp:
2286         (WebKit::WebProcess::platformClearResourceCaches):
2287         Ditto.
2288         * WebProcess/qt/WebProcessQt.cpp:
2289         (WebKit::WebProcess::platformClearResourceCaches):
2290         Ditto.
2291         * WebProcess/win/WebProcessWin.cpp:
2292         (WebKit::WebProcess::platformClearResourceCaches):
2293         When told to clear only the in-memory caches, return early so as not to clear the CFNetwork
2294         disk cache.
2295         * WebProcess/mac/WebProcessMac.mm:
2296         (WebKit::WebProcess::platformClearResourceCaches):
2297         Ditto.
2298
2299         * WebKit2.xcodeproj/project.pbxproj:
2300         Add ResourceCachesToClear.h
2301         * win/WebKit2.vcproj:
2302         Ditto.
2303
2304 2011-03-10  Jeff Miller  <jeffm@apple.com>
2305
2306         Reviewed by Adam Roben.
2307
2308         WKViewRegisterEditCommandCallback should use WKViewUndoType
2309         https://bugs.webkit.org/show_bug.cgi?id=56120
2310
2311         * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType.
2312
2313 2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2314
2315         Reviewed by Kenneth Rohde Christiansen.
2316
2317         Tiled backing store's delegated scroll request uses incorrect convention
2318         https://bugs.webkit.org/show_bug.cgi?id=56011
2319
2320         Adapt all of the internal API to match the delta to point
2321         conversion at the WebCore side.
2322
2323         * UIProcess/API/qt/qwkpage.cpp:
2324         (QWKPagePrivate::pageDidRequestScroll):
2325         * UIProcess/API/qt/qwkpage_p.h:
2326         * UIProcess/PageClient.h:
2327         * UIProcess/WebPageProxy.cpp:
2328         (WebKit::WebPageProxy::pageDidRequestScroll):
2329         * UIProcess/WebPageProxy.h:
2330         * UIProcess/WebPageProxy.messages.in:
2331         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2332         (WebKit::WebChromeClient::delegatedScrollRequested):
2333         * WebProcess/WebCoreSupport/WebChromeClient.h:
2334         * WebProcess/WebPage/WebPage.cpp:
2335         (WebKit::WebPage::pageDidRequestScroll):
2336         * WebProcess/WebPage/WebPage.h:
2337
2338 2011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
2339
2340         Reviewed by Andreas Kling.
2341
2342         [WK2] Make non-transparent windowless plugins paint on X11
2343         https://bugs.webkit.org/show_bug.cgi?id=55660
2344
2345         Implement painting for non-transparent windowless X11 plugins.
2346         The essence of the logic has been adapted from WebCore.
2347         The implementation is stubbed for GTK and working only on Qt
2348         but it should be really easy to finish it for GTK.
2349
2350         * WebKit2.pro:
2351         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2352         (WebKit::NPN_GetValue): Handle X11 specific values that are necessary.
2353         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2354         (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific
2355         members that has been added.
2356         (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates
2357         of the NP_Window to 0 on X11 since we are using a backings store as the
2358         painting area for the plugin.
2359         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2360         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour
2361         of a common implementation for X11.
2362         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto.
2363         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added.
2364         (WebKit::getPluginDisplay):
2365
2366         Platform specific static getters.
2367         (WebKit::x11Display):
2368         (WebKit::displayDepth):
2369         (WebKit::rootWindowID):
2370         (WebKit::x11Screen):
2371
2372         (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual
2373         settings and the colormap for the plugin.
2374         (WebKit::NetscapePlugin::platformDestroy):
2375         (WebKit::NetscapePlugin::platformInvalidate): Remained stub.
2376         (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new
2377         pixmap that fits the geometry.
2378         (WebKit::NetscapePlugin::platformPaint): Propagate a paint event
2379         to the plugin, sync with it if necessary and draw the pixmap to
2380         the screen.
2381         (WebKit::toNP): Remained stub.
2382         (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub.
2383         (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub.
2384         (WebKit::NetscapePlugin::platformSetFocus): Remained stub.
2385         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub.
2386         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub.
2387         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub.
2388         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2389         (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque
2390         key-value pair to the plugin parameters to force Flash to act in
2391         non-transparent windowless mode. Qt also doing this in WebCore.
2392
2393 2011-03-09  Peter Kasting  <pkasting@google.com>
2394
2395         Reviewed by Mihai Parparita.
2396
2397         Unify Windows version checks.
2398         https://bugs.webkit.org/show_bug.cgi?id=55979
2399
2400         * UIProcess/win/WebPageProxyWin.cpp:
2401         (WebKit::WebPageProxy::standardUserAgent):
2402
2403 2011-03-09  Adele Peterson  <adele@apple.com>
2404
2405         Reviewed by Anders Carlsson.
2406
2407         Fix for https://bugs.webkit.org/show_bug.cgi?id=56068
2408         <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items
2409
2410         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected):
2411         Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, 
2412         and ContextMenuItemTagCheckGrammarWithSpelling
2413
2414 2011-03-09  Alexey Proskuryakov  <ap@apple.com>
2415
2416         Reviewed by Dan Bernstein.
2417
2418         Frequent crashes when printing in WebPageProxy::setAutodisplay
2419         https://bugs.webkit.org/show_bug.cgi?id=56057
2420         <rdar://problem/9053290>
2421
2422         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
2423         Null check the page, there is no reason for it to still exist.
2424
2425 2011-03-09  Brent Fulgham  <bfulgham@webkit.org>
2426
2427         Unreviewed build correction.
2428
2429         * UIProcess/DrawingAreaProxy.messages.in: Exclude the other
2430           method using LayerTreeContext for non-accelerated composition case.
2431
2432 2011-03-09  Sam Weinig  <sam@webkit.org>
2433
2434         Reviewed by Anders Carlsson.
2435
2436         Change plugins to use their own executable on Mac OS X
2437         https://bugs.webkit.org/show_bug.cgi?id=55991
2438
2439         * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig.
2440         * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist.
2441         Add files necessary for adding PluginProcess.app.
2442
2443         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2444         (WebKit::ProcessLauncher::launchProcess):
2445         Launch the PluginProcess.app when launching a plugin process.
2446
2447         * WebKit2.xcodeproj/project.pbxproj:
2448         Add new executable and new files, removes some unneeded copying
2449         and duplicate compiling of files.
2450
2451         * WebProcess/Info.plist:
2452         Sorted.
2453
2454 2011-03-09  Jessie Berlin  <jberlin@apple.com>
2455
2456         Reviewed by Adam Roben.
2457
2458         Use the Cookie Storage from the Private Browsing Storage Session directly
2459         https://bugs.webkit.org/show_bug.cgi?id=55986
2460
2461         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2462         (InitWebCoreSystemInterface):
2463
2464 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
2465
2466         Fix compilation after r80596, add soup Download stubs.
2467
2468         * GNUmakefile.am:
2469         * WebProcess/Downloads/soup/DownloadSoup.cpp: Added.
2470         (WebKit::Download::start):
2471         (WebKit::Download::startWithHandle):
2472         (WebKit::Download::cancel):
2473         (WebKit::Download::platformInvalidate):
2474         (WebKit::Download::didDecideDestination):
2475         (WebKit::Download::platformDidFinish):
2476
2477 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
2478
2479         Fix GTK+ compilation after r80619. Add WebFullScreenManager.
2480
2481         * GNUmakefile.am:
2482
2483 2011-03-08  Jer Noble  <jer.noble@apple.com>
2484
2485         Reviewed by Sam Weinig.
2486
2487         WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
2488         https://bugs.webkit.org/show_bug.cgi?id=55273
2489
2490         The FULLSCREEN_API Chrome client calls need to be plumbed through from the 
2491         WebProcess to the UIProcess.  To do this, WebFullScreenManager (and Proxy)
2492         classes have been added to WebPage.
2493
2494         * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files.
2495         * DerivedSources.pro: Ditto.
2496         * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager.
2497         * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef.
2498         * Shared/APIObject.h: Added APIType for WebFullScreenManager.
2499         * UIProcess/WebFullScreenManagerProxy.cpp: Added.
2500         * UIProcess/WebFullScreenManagerProxy.h: Added.
2501         * UIProcess/WebFullScreenManagerProxy.messages.in: Added.
2502         * UIProcess/WebPageProxy.cpp:
2503         (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager.
2504         (WebKit::WebPageProxy::processDidCrash): Ditto.
2505         (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy.
2506         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
2507         (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager.
2508         * UIProcess/WebPageProxy.h:
2509         * UIProcess/WebPageProxy.messages.in:
2510         * UIProcess/WebUIClient.cpp:
2511         * UIProcess/WebUIClient.h:
2512         * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file.
2513         * WebKit2.pro: Ditto.
2514         * win/WebKit2.vcproj: Ditto.
2515         * WebKit2.pri: Added new directories to include file path.
2516         * win/WebKit2Common.vsprops: Ditto.
2517         * WebProcess/FullScreen/WebFullScreenManager.cpp: Added.
2518         * WebProcess/FullScreen/WebFullScreenManager.h: Added.
2519         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added.
2520         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2521         (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager.
2522         (WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
2523         (WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
2524         * WebProcess/WebPage/WebPage.cpp:
2525         (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager.
2526         (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager.
2527         (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager.
2528         * WebProcess/WebPage/WebPage.h:
2529
2530 2011-03-08  Jer Noble  <jer.noble@apple.com>
2531
2532         Reviewed by Sam Weinig.
2533
2534         WebKit2: Plumb through the "supportsFullScreen" preference.
2535         https://bugs.webkit.org/show_bug.cgi?id=55261
2536
2537         The "supportsFullScreen" preference needs to be plumbed through from
2538         the UIProcess to the WebProcess.
2539
2540         * Shared/WebPreferencesStore.h: Add a new macro entry.
2541         * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter.
2542         (WKPreferencesSetFullScreenEnabled):
2543         (WKPreferencesGetFullScreenEnabled):
2544         * UIProcess/API/C/WKPreferences.h:
2545         * WebProcess/WebPage/WebPage.cpp:
2546         (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to
2547             the settings object.
2548
2549 2011-03-08  Jeff Miller  <jeffm@apple.com>
2550
2551         Reviewed by Adele Peterson.
2552
2553         WebKit2: Implement Windows glue for Undo/Redo
2554         https://bugs.webkit.org/show_bug.cgi?id=55961
2555         
2556         Expose Undo/Redo infrastructure through WKView on Windows by
2557         adding an undo client as well as APIs to reapply and unapply
2558         an edit command.
2559
2560         * UIProcess/API/C/win/WKView.cpp:
2561         (WKViewSetViewUndoClient): Added.
2562         (WKViewReapplyEditCommand): Added.
2563         (WKViewUnapplyEditCommand): Added.
2564         * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand().
2565         * UIProcess/WebPageProxy.cpp:
2566         (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API.
2567         * UIProcess/WebPageProxy.h: Added isValidEditCommand().
2568         * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. 
2569         (WebKit::WebUndoClient::registerEditCommand): Added.
2570         (WebKit::WebUndoClient::clearAllEditCommands): Added.
2571         * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient.
2572         * UIProcess/win/WebView.cpp:
2573         (WebKit::WebView::initializeUndoClient): Added.
2574         (WebKit::WebView::close): Clear out undo client.
2575         (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient.
2576         (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient.
2577         (WebKit::WebView::reapplyEditCommand): Added.
2578         (WebKit::WebView::unapplyEditCommand): Added.
2579         * UIProcess/win/WebView.h: Added undo client support.
2580         * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h.
2581
2582 2011-03-08  Jeff Miller  <jeffm@apple.com>
2583
2584         Reviewed by Sam Weinig.
2585
2586         WebKit2: Expose WebEditCommandProxy in the C API on Windows
2587         https://bugs.webkit.org/show_bug.cgi?id=55962
2588         
2589         Make WebEditCommandProxy a subclass of APIObject, and define
2590         WKEditCommandRef as the type that will be exposed through the C API.
2591
2592         * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef.
2593         * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy.
2594         * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef.
2595         * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject.
2596         (WebKit::WebEditCommandProxy::type): Added.
2597
2598 2011-03-08  Jeff Miller  <jeffm@apple.com>
2599
2600         Reviewed by Oliver Hunt.
2601
2602         WebKit2: Redo is broken
2603         https://bugs.webkit.org/show_bug.cgi?id=55978
2604         
2605         WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens.
2606         For example, when we unapply(), we should register a Redo command, not an Undo command.
2607
2608         * UIProcess/WebEditCommandProxy.cpp:
2609         (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command.
2610         (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command.
2611
2612 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
2613
2614         Reviewed by Adam Roben.
2615
2616         https://bugs.webkit.org/show_bug.cgi?id=55977
2617         Refine CF/CFNet distinctions for better code sharing.
2618         1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp
2619            since it does not use any CFNETWORK features.
2620         2. Create new cfnet directory.
2621         3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet
2622         4. Update project file.
2623
2624         * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed.
2625         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed.
2626         * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp.
2627         * WebProcess/Downloads/cfnet: Added.
2628         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp.
2629         * win/WebKit2.vcproj:
2630
2631 2011-03-08  Mark Rowe  <mrowe@apple.com>
2632
2633         Reviewed by Brady Eidson.
2634
2635         <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries.
2636
2637         * UIProcess/cf/WebPageProxyCF.cpp:
2638         (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state
2639         without navigating to the current item.
2640         * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item.
2641
2642 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
2643
2644         Reviewed by Anders Carlsson.
2645
2646         https://bugs.webkit.org/show_bug.cgi?id=55956
2647         WebKit2 Changes to correct WinCairo port build
2648
2649         * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated
2650           compositing case.
2651         * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build.
2652         * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for
2653           WinCairo build.
2654         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
2655         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
2656         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2657         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2658         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
2659         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
2660         * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when
2661           accelerated compositing is enabled.
2662         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
2663         * UIProcess/win/WebView.cpp: Protect CG-specific drawing code.
2664         (WebKit::WebView::setFindIndicator):
2665         * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag,
2666           as well as destination and bundle paths.
2667         * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation
2668           of file handling.  This will be moved to a common area in a future patch.)
2669         * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths.
2670         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
2671         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
2672         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2673         * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code.
2674         (WebKit::WebPage::drawRectToPDF):
2675         (WebKit::WebPage::drawPagesToPDF):
2676         * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo
2677
2678 2011-03-08  Ivan Krstić  <ike@apple.com>
2679
2680         Reviewed by Sam Weinig.
2681
2682         Re-fix: can't paste from 3rd party text editor into WebKit2 window
2683         <rdar://problem/8978624>
2684
2685         * WebProcess/com.apple.WebProcess.sb:
2686
2687 2011-03-08  Martin Robinson  <mrobinson@igalia.com>
2688
2689         Fix the WebKit2 compilation after r80578.
2690
2691         * UIProcess/gtk/WebView.cpp:
2692         (WebKit::WebView::setFocus): Added.
2693         * UIProcess/gtk/WebView.h:
2694
2695 2011-03-08  Jessie Berlin  <jberlin@apple.com>
2696
2697         Reviewed by Anders Carlsson.
2698
2699         Crash in CFNetwork visiting google.com
2700         https://bugs.webkit.org/show_bug.cgi?id=55958
2701
2702         * Shared/API/c/cf/WKURLResponseCF.cpp:
2703         (WKURLResponseCopyCFURLResponse):
2704         If the response to copy is null, return 0;
2705
2706 2011-03-08  John Sullivan  <sullivan@apple.com>
2707
2708         Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940
2709         
2710         The patch was insufficient, and it wasn't useful for the intended client use either.
2711
2712         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2713         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2714         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2715
2716 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
2717
2718         Unreviewed, fixed GTK+ compilation after r80569.
2719
2720         * UIProcess/gtk/WebView.cpp:
2721         (WebKit::WebView::windowToScreen):
2722         * UIProcess/gtk/WebView.h:
2723
2724 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
2725
2726         Reviewed by Sam Weinig.
2727
2728         WK2: Cannot set focus on an element when focus is outside of WKView
2729         https://bugs.webkit.org/show_bug.cgi?id=55281
2730
2731         * UIProcess/API/mac/PageClientImpl.h:
2732         * UIProcess/API/mac/PageClientImpl.mm:
2733         (WebKit::PageClientImpl::setFocus):
2734         * UIProcess/API/qt/qwkpage_p.h:
2735         (QWKPagePrivate::setFocus):
2736         * UIProcess/PageClient.h:
2737         * UIProcess/WebPageProxy.cpp:
2738         (WebKit::WebPageProxy::setFocus):
2739         * UIProcess/WebPageProxy.h:
2740         * UIProcess/WebPageProxy.messages.in:
2741         * UIProcess/win/WebView.h:
2742         (WebKit::WebView::setFocus):
2743         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2744         (WebKit::WebChromeClient::focus):
2745         (WebKit::WebChromeClient::unfocus):
2746
2747 2011-03-08  Jeff Miller  <jeffm@apple.com>
2748
2749         Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
2750
2751         * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
2752
2753 2011-03-08  Jeff Miller  <jeffm@apple.com>
2754
2755         Reviewed by Darin Adler.
2756
2757         Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
2758         https://bugs.webkit.org/show_bug.cgi?id=55952
2759
2760         * UIProcess/API/C/win/WKBaseWin.h: Removed.
2761         * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
2762
2763 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
2764
2765         Reviewed by Martin Robinson.
2766
2767         [GTK] Add new files to compilation after r77974
2768         https://bugs.webkit.org/show_bug.cgi?id=54076
2769
2770         The commit added new code to allow passing context to policy
2771         delegate methods, we also added dummy ResourceRequest and
2772         ResourceResponse decoders until we implement them.
2773
2774         * GNUmakefile.am:
2775         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2776         (CoreIPC::decodeResourceRequest):
2777         (CoreIPC::decodeResourceResponse):
2778
2779 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
2780
2781         Reviewed by Darin Adler.
2782
2783         AX: Webkit2 not sending UAZoomFocusChanged notifications
2784         https://bugs.webkit.org/show_bug.cgi?id=55916
2785
2786         Needed to implement the windowToScreen() method so that the right frame
2787         could be calculated to send for zoom focus changes.
2788
2789         * UIProcess/API/mac/PageClientImpl.h:
2790         * UIProcess/API/mac/PageClientImpl.mm:
2791         (WebKit::PageClientImpl::windowToScreen):
2792         * UIProcess/API/qt/qwkpage.cpp:
2793         (QWKPagePrivate::windowToScreen):
2794         * UIProcess/API/qt/qwkpage_p.h:
2795         * UIProcess/PageClient.h:
2796         * UIProcess/WebPageProxy.cpp:
2797         (WebKit::WebPageProxy::windowToScreen):
2798         * UIProcess/WebPageProxy.h:
2799         * UIProcess/WebPageProxy.messages.in:
2800         * UIProcess/win/WebView.cpp:
2801         (WebKit::WebView::windowToScreen):
2802         * UIProcess/win/WebView.h:
2803         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2804         (WebKit::WebChromeClient::windowToScreen):
2805         * WebProcess/WebPage/WebPage.cpp:
2806         (WebKit::WebPage::windowToScreen):
2807         * WebProcess/WebPage/WebPage.h:
2808
2809 2011-03-08  John Sullivan  <sullivan@apple.com>
2810
2811         Reviewed by Darin Adler.
2812
2813         https://bugs.webkit.org/show_bug.cgi?id=55940
2814         WebKit2 should support Ignore policy from injected bundle client
2815
2816         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2817         Added WKBundlePagePolicyActionIgnore.
2818         
2819         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2820         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2821         If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
2822         to the loader's PolicyIgnore.
2823
2824 2011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2825
2826         Reviewed by Kenneth Rohde Christiansen.
2827
2828         [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
2829         https://bugs.webkit.org/show_bug.cgi?id=55876
2830
2831         Make sure TESTS_SOURCE_DIR is set for Symbian the same way
2832         as it is for WK1.
2833
2834         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
2835         (tst_QGraphicsWKView::loadEmptyPage):
2836         * UIProcess/API/qt/tests/tests.pri:
2837
2838 2011-03-07  Damian Kaleta  <dkaleta@apple.com>
2839
2840         Reviewed by Anders Carlsson.
2841
2842         QuickTime plugin should opt in to a 32-bit non-executable heap
2843         https://bugs.webkit.org/show_bug.cgi?id=55704
2844         <rdar://problem/8105706>
2845
2846         * UIProcess/Plugins/PluginProcessProxy.cpp:
2847         (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
2848         By default it should opt-out.
2849         (WebKit::PluginProcessProxy::PluginProcessProxy):
2850
2851 2011-03-07  Sam Weinig  <sam@webkit.org>
2852
2853         Reviewed by Anders Carlsson.
2854
2855         Add unableToImplementPolicy callback for WebKit2 policy client
2856         <rdar://problem/9071902>
2857         https://bugs.webkit.org/show_bug.cgi?id=55884
2858
2859         * UIProcess/API/C/WKPage.h:
2860         * UIProcess/WebPageProxy.cpp:
2861         (WebKit::WebPageProxy::unableToImplementPolicy):
2862         * UIProcess/WebPageProxy.h:
2863         * UIProcess/WebPageProxy.messages.in:
2864         * UIProcess/WebPolicyClient.cpp:
2865         (WebKit::WebPolicyClient::unableToImplementPolicy):
2866         * UIProcess/WebPolicyClient.h:
2867         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2868         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
2869         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
2870         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
2871         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2872         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
2873         Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
2874
2875 2011-03-07  Sam Weinig  <sam@webkit.org>
2876
2877         Reviewed by Anders Carlsson.
2878
2879         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
2880         https://bugs.webkit.org/show_bug.cgi?id=55827
2881
2882         - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
2883           and pass the entire response, instead of just the MIMEType.
2884         - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
2885           MIMEType.
2886
2887         * UIProcess/API/C/WKPage.h:
2888         * UIProcess/WebPageProxy.cpp:
2889         (WebKit::WebPageProxy::decidePolicyForResponse):
2890         * UIProcess/WebPageProxy.h:
2891         * UIProcess/WebPageProxy.messages.in:
2892         * UIProcess/WebPolicyClient.cpp:
2893         (WebKit::WebPolicyClient::decidePolicyForResponse):
2894         * UIProcess/WebPolicyClient.h:
2895         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2896         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
2897         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
2898         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
2899         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2900         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2901         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2902
2903 2011-03-06  Jessie Berlin  <jberlin@apple.com>
2904
2905         Reviewed by Sam Weinig.
2906
2907         WebKit2: Use CFNetwork Sessions API.
2908         https://bugs.webkit.org/show_bug.cgi?id=55435.
2909
2910         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
2911         Private Browsing Storage Session.
2912
2913         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2914         (InitWebCoreSystemInterface):
2915         Add support for using the new WKSI functions in WebCore.
2916
2917 2011-03-06  Oleg Romashin  <romaxa@gmail.com>
2918
2919         Reviewed by Kenneth Rohde Christiansen.
2920
2921         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
2922         Adding dummy Qt files for Plugin Process implementation,
2923         Adding missing sources into Qt pro files
2924         https://bugs.webkit.org/show_bug.cgi?id=55719
2925
2926         * DerivedSources.pro:
2927         * PluginProcess/qt: Added.
2928         * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
2929         (WebKit::PluginControllerProxy::platformInitialize):
2930         (WebKit::PluginControllerProxy::platformDestroy):
2931         (WebKit::PluginControllerProxy::platformGeometryDidChange):
2932         * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
2933         (WebKit::PluginProcessMain):
2934         * PluginProcess/qt/PluginProcessQt.cpp: Added.
2935         (WebKit::PluginProcess::platformInitialize):
2936         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
2937         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2938         * WebKit2.pri:
2939         * WebKit2.pro:
2940         * WebKit2API.pri:
2941         * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
2942         (WebKit::PluginProxy::needsBackingStore):
2943
2944 2011-03-05  Sam Weinig  <sam@webkit.org>
2945
2946         Reviewed by Dan Bernstein.
2947
2948         Remove unneeded onPageClose function from DrawingArea
2949         https://bugs.webkit.org/show_bug.cgi?id=55836
2950
2951         * WebProcess/WebPage/DrawingArea.h:
2952         Remove empty function.
2953
2954         * WebProcess/WebPage/WebPage.cpp:
2955         (WebKit::WebPage::close):
2956         Remove only called
2957
2958 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2959
2960         WK2 Mac build fix.
2961
2962         * UIProcess/API/C/WKPage.cpp:
2963         (WKPageComputePagesForPrinting):
2964         (WKPageBeginPrinting):
2965
2966         * UIProcess/API/C/WKPagePrivate.h:
2967
2968 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2969
2970         WK2 Mac build fix.
2971
2972         * UIProcess/API/C/WKPagePrivate.h:
2973
2974 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2975
2976         WK2 needs printing support on Windows
2977         https://bugs.webkit.org/show_bug.cgi?id=55800
2978         <rdar://problem/8903808>
2979
2980         Reviewed by Darin Adler.
2981
2982         * UIProcess/API/C/WKPage.cpp:
2983         (ComputedPagesContext::ComputedPagesContext):
2984         (computedPagesCallback):
2985         From the Vector of WebCore::IntRects, build up a Vector of WKRects.
2986         Call the callback, passing these rects and the scale factor.
2987         (printInfoFromWKPrintInfo):
2988         Return a PrintInfo structure from the WKPrintInfo.
2989         (WKPageComputePagesForPrinting):
2990         Call WebPageProxy::computePagesForPrinting(). Pass
2991         computedPagesCallback as the callback function, so that we can
2992         translate the WebCore rect type to WKRect before calling the caller's
2993         callback function.
2994         (WKPageBeginPrinting):
2995         Call WebPageProxy::beginPrinting().
2996         (WKPageDrawPagesToPDF):
2997         Call WebPageProxy::drawPagesToPDF().
2998
2999         * UIProcess/API/C/WKPagePrivate.h:
3000         Declare the WKPrintInfo type and new functions.
3001
3002         * UIProcess/WebPageProxy.cpp:
3003         Compile this code on Windows.
3004
3005         * UIProcess/WebPageProxy.h:
3006         Ditto.
3007
3008         * UIProcess/win/WebView.cpp:
3009         (WebKit::WebView::paint):
3010         We're painting the window; leave printing mode.
3011
3012         * WebProcess/WebPage/WebPage.cpp:
3013         Compile this code on Windows.
3014
3015         * WebProcess/WebPage/WebPage.h:
3016         Ditto.
3017
3018         * WebProcess/WebPage/WebPage.messages.in:
3019         Ditto.
3020
3021 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
3022
3023         Reviewed by Darin Adler.
3024
3025         Adopt VersionStamper tool for Windows WebKit DLLs
3026         https://bugs.webkit.org/show_bug.cgi?id=55784
3027         <rdar://problem/9021320>
3028
3029         We now use a tool to stamp the version number onto the Apple WebKit DLLs
3030         during the post-build step.
3031
3032         Fetch the WebKit version from a string resource instead of the version resource.
3033
3034         * UIProcess/win/WebPageProxyWin.cpp:
3035         (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
3036         * win/WebKit2.rc: Removed version, added stringtable.
3037         * win/WebKit2WebProcess.rc: Removed.
3038         * win/WebKit2WebProcess.vcproj:
3039         * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
3040         * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
3041         * win/WebKitPostBuild.cmd: Stamp version.
3042
3043 2011-03-04  Jeff Miller  <jeffm@apple.com>
3044
3045         Reviewed by Darin Adler.
3046
3047         Add WKPageValidateCommand()
3048         https://bugs.webkit.org/show_bug.cgi?id=55793
3049         
3050         On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
3051         However, on Windows we need to do this in the client, so expose this functionality
3052         in the API via WKPageValidateCommand().
3053         
3054         Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
3055         to match this new API, so it no longer has to go through PageClient to get notified
3056         when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
3057         so I removed the stub implementations in qt and gtk as well.
3058
3059         * UIProcess/API/C/WKPage.cpp:
3060         (WKPageValidateCommand): Added.
3061         * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
3062         * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
3063         * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
3064         * UIProcess/API/mac/WKView.mm:
3065         (validateCommandCallback): Added.
3066         (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
3067         * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
3068         * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
3069         * UIProcess/PageClient.h: Removed setEditCommandState().
3070         * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
3071         (WebKit::WebPageProxy::validateCommand): This now takes a callback.
3072         (WebKit::WebPageProxy::validateCommandCallback): Added.
3073         (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
3074         * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
3075         (WebKit::ValidateCommandCallback::create): Added.
3076         (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
3077         (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
3078         (WebKit::ValidateCommandCallback::invalidate): Added.
3079         (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
3080         * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
3081         * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
3082         * UIProcess/gtk/WebView.h: Removed setEditCommandState().
3083         * UIProcess/win/WebView.cpp: Removed setEditCommandState().
3084         * UIProcess/win/WebView.h: Removed setEditCommandState().
3085         * WebProcess/WebPage/WebPage.cpp:
3086         (WebKit::WebPage::validateCommand): This now takes a callbackID.
3087         * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
3088         * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
3089
3090 2011-03-04  Brian Weinstein  <bweinstein@apple.com>
3091
3092         Reviewed by Darin Adler.
3093
3094         Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
3095         https://bugs.webkit.org/show_bug.cgi?id=53919
3096         <rdar://problem/8966020>
3097         
3098         Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
3099
3100         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
3101         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
3102
3103 2011-03-04  Darin Adler  <darin@apple.com>
3104
3105         Reviewed by Mark Rowe.
3106
3107         WebKit2 session state should include even loads too new to be in the back/forward list
3108         https://bugs.webkit.org/show_bug.cgi?id=55781
3109         part of <rdar://problem/8968847>
3110
3111         * UIProcess/cf/WebPageProxyCF.cpp:
3112         (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
3113         process to not be included in the back/forward list yet: The pending API request URL and
3114         the provisional URL.
3115         (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
3116         list is not restored and a URL is present. Later we can improve the way we handle the
3117         case where we have both a back/forward list and a URL.
3118
3119 2011-03-04  Jessie Berlin  <jberlin@apple.com>
3120
3121         Reviewed by Darin Adler.
3122
3123         WebKit2: Use CFNetwork Sessions API.
3124         https://bugs.webkit.org/show_bug.cgi?id=55435.
3125
3126         Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
3127         contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
3128
3129         * UIProcess/mac/WebContextMac.mm:
3130         (WebKit::WebContext::platformInitializeWebProcess):
3131         * UIProcess/win/WebContextWin.cpp:
3132         (WebKit::WebContext::platformInitializeWebProcess):
3133
3134 2011-03-04  Jessie Berlin  <jberlin@apple.com>
3135
3136         Reviewed by Maciej Stachowiak.
3137
3138         WebKit2: Use CFNetwork Sessions API.
3139         https://bugs.webkit.org/show_bug.cgi?id=55435.
3140
3141         When Private Browsing is enabled, get the cached url response from the cache associated with
3142         the Private Browsing Storage Session.
3143
3144         * WebProcess/WebPage/mac/WebPageMac.mm:
3145         (WebKit::WebPage::platformHasLocalDataForURL):
3146         If Private Browsing is enabled, call into WKSI to get the response.
3147         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3148         Ditto.
3149         * WebProcess/WebPage/win/WebPageWin.cpp:
3150         (WebKit::WebPage::platformHasLocalDataForURL):
3151         If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
3152         (WebKit::WebPage::cachedResponseMIMETypeForURL):
3153         Ditto.
3154
3155 2011-03-04  Jeff Miller  <jeffm@apple.com>
3156
3157         Reviewed by Darin Adler.
3158
3159         Move WKViewExecuteCommand() to WKPageExecuteCommand()
3160         https://bugs.webkit.org/show_bug.cgi?id=55744
3161         
3162         Executing a command operates on a page, so it makes more sense for it to be in WKPage.
3163         This also makes it available on all platforms, not just Windows.
3164
3165         * UIProcess/API/C/WKPage.cpp:
3166         (WKPageExecuteCommand): Added.
3167         * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
3168         * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
3169         * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
3170
3171 2011-03-04  Dan Bernstein  <mitz@apple.com>
3172
3173         LLVM Compiler build fix.
3174
3175         * WebProcess/WebPage/WebPage.cpp:
3176         (WebKit::WebPage::runJavaScriptInMainFrame):
3177
3178 2011-03-03  Timothy Hatcher  <timothy@apple.com>
3179
3180         Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
3181
3182         https://webkit.org/b/55623
3183
3184         Reviewed by Darin Adler.
3185
3186         * UIProcess/API/C/WKPage.cpp:
3187         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
3188         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
3189         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
3190         * UIProcess/WebPageProxy.cpp:
3191         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
3192         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
3193         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
3194         from the DataReference before calling the callback.
3195         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
3196         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
3197         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
3198         * WebProcess/WebPage/WebPage.cpp:
3199         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
3200         And use ScriptValueCallback to send the message back.
3201
3202 2011-03-03  Brian Weinstein  <bweinstein@apple.com>
3203
3204         Reviewed by Adam Roben.
3205
3206         Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
3207         
3208         Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
3209         on all platforms, and stub the functions on platforms that don't implement them.
3210
3211         * WebProcess/Cookies/WebCookieManager.cpp:
3212         (WebKit::WebCookieManager::startObservingCookieChanges):
3213         (WebKit::WebCookieManager::stopObservingCookieChanges):
3214
3215 2011-03-03  Jeff Miller  <jeffm@apple.com>
3216
3217         Reviewed by Darin Adler.
3218
3219         Refactor classes in GenericCallback.h
3220         https://bugs.webkit.org/show_bug.cgi?id=55732
3221         
3222         Since we're going to need to add additional callback classes, make a CallbackBase class that manages
3223         the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
3224         ComputedPagesCallback) now all derive from CallbackBase.
3225         
3226         Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
3227         constructor instead (we forgot the leading ~).
3228  
3229         * UIProcess/GenericCallback.h:
3230         (WebKit::CallbackBase::~CallbackBase):
3231         (WebKit::CallbackBase::callbackID):
3232         (WebKit::CallbackBase::CallbackBase):
3233         (WebKit::CallbackBase::context):
3234         (WebKit::CallbackBase::generateCallbackID):
3235         (WebKit::VoidCallback::~VoidCallback):
3236         (WebKit::VoidCallback::performCallback):
3237         (WebKit::VoidCallback::invalidate):
3238         (WebKit::VoidCallback::VoidCallback):
3239         (WebKit::GenericCallback::create):
3240         (WebKit::GenericCallback::~GenericCallback):
3241         (WebKit::GenericCallback::performCallbackWithReturnValue):
3242         (WebKit::GenericCallback::invalidate):
3243         (WebKit::GenericCallback::GenericCallback):
3244         (WebKit::ComputedPagesCallback::create):
3245         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
3246         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
3247         (WebKit::ComputedPagesCallback::invalidate):
3248         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
3249
3250 2011-03-03  Adam Roben  <aroben@apple.com>
3251
3252         Don't assume the web process has had a chance to paint before the view has to paint
3253
3254         Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
3255         BackingStore::paint
3256
3257         Reviewed by Anders Carlsson.
3258
3259         * UIProcess/DrawingAreaProxyImpl.cpp:
3260         (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
3261         yet.
3262
3263 2011-03-03  Adam Roben  <aroben@apple.com>
3264
3265         Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
3266
3267         The intent is to save memory for views that aren't painting.
3268
3269         Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
3270         backing store after not painting for a while
3271
3272         Reviewed by Anders Carlsson.
3273
3274         * UIProcess/DrawingAreaProxyImpl.cpp:
3275         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
3276         (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
3277         bail if we're in accelerated compositing mode); we might have thrown it away to save memory
3278         but now are being asked to paint by the view. The existing code in this function will handle
3279         getting a new backing store if possible by blocking for a little while to try to receive a
3280         DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
3281         don't have any outstanding UpdateBackingStoreState requests. After painting, call
3282         discardBackingStoreSoon to update our timer.
3283         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
3284         future.
3285         (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
3286         the web process we'll need a full backing store update on the next paint.
3287
3288         * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
3289
3290 2011-03-03  Adam Roben  <aroben@apple.com>
3291
3292         Add a way to tell the web process to perform a full backing store update on its next paint
3293
3294         Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
3295         full backing store update should happen immediately or should be deferred until the next
3296         paint or compositing mode change occurs. The deferred update isn't used yet, but will be
3297         used when we start throwing away backing stores to save memory.
3298
3299         Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
3300         store needs a full update on the next paint
3301
3302         Reviewed by Anders Carlsson.
3303
3304         * UIProcess/DrawingAreaProxyImpl.cpp:
3305         (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
3306         request, tell the web process to perform the backing store update right away, in case we
3307         previously told it it could defer the update.
3308         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
3309         store update.
3310         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
3311         were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
3312         for the web process to decide to send us this message on its own (if we asked it to do a
3313         deferred backing store update and then it needed to paint some part of the page). Specify
3314         that we need an immediate backing store update if the web process hasn't updated to our
3315         latest state, as we're about to draw potentially out-of-date bits to the screen and want to
3316         get the right bits as soon as possible. Also added a FIXME about a potential optimization.
3317         (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
3318         parameter, which is just passed through to sendUpdateBackingStoreState.
3319         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
3320         parameter that is used to specify to the web process whether to perform the full backing
3321         store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
3322         thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
3323         the web process for an immediate response; otherwise we could end up accidentally calling
3324         waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
3325         us such a message.
3326
3327         * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
3328
3329         * WebProcess/WebPage/DrawingArea.h:
3330         (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
3331
3332         * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
3333         UpdateBackingStoreState message.
3334
3335         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3336         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
3337         whether we should send a DidUpdateBackingStoreState message instead of an Update or
3338         compositing mode change message. This will be set to true when a deferred backing store
3339         update is pending.
3340         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
3341         DidUpdateBackingStoreState message instead of a compositing mode change message.
3342         (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
3343         we've already been told about this state ID (as can happen when the UI process decides it
3344         needs an immediate update to a state that it previously requested a deferred update to),
3345         don't bother updating the page's size, etc. In addition, if we've already sent a
3346         DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
3347         Moved code to send the DidUpdateBackingStoreState message from here...
3348         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
3349         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
3350         even if painting is suspended or we're in the process of updating the backing store state.
3351         It causes no harm and simplifies the code. If a deferred update is pending, send a
3352         DidUpdateBackingStoreState message instead of a compositing mode change message. Also
3353         removed a redundant if.
3354         (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
3355         backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
3356         messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
3357         of an Update message.
3358
3359         * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
3360         class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
3361
3362 2011-03-03  Andy Estes  <aestes@apple.com>
3363
3364         Reviewed by Darin Adler.
3365
3366         When displaying the missing plug-in sheet, pass the 'pluginspage'
3367         attribute to the UI process.
3368         https://bugs.webkit.org/show_bug.cgi?id=55553
3369
3370         * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
3371         missingPluginButtonClicked.
3372         * UIProcess/WebPageProxy.cpp:
3373         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
3374         * UIProcess/WebPageProxy.h: Ditto.
3375         * UIProcess/WebPageProxy.messages.in: Ditto.
3376         * UIProcess/WebUIClient.cpp:
3377         (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
3378         * UIProcess/WebUIClient.h: Ditto.
3379         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3380         (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
3381         pluginspageAttr.
3382
3383 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
3384
3385         Suggested by Dan Bernstein.
3386
3387         Move "const" around "NSString *", so that it suddenly begins to make sense.
3388
3389         * WebProcess/mac/FullKeyboardAccessWatcher.mm:
3390
3391 2011-03-03  Jeff Miller  <jeffm@apple.com>
3392
3393         Reviewed by Anders Carlsson.
3394
3395         WebKit2: Add WKViewRef API for executing edit commands
3396         https://bugs.webkit.org/show_bug.cgi?id=49829
3397
3398         Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
3399
3400         * UIProcess/API/C/win/WKView.cpp:
3401         (WKViewExecuteCommand): Added.
3402         * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
3403
3404 2011-03-03  Jessie Berlin  <jberlin@apple.com>
3405
3406         Reviewed by Adam Roben.
3407
3408         WebKit2: Use CFNetwork Sessions API.
3409         https://bugs.webkit.org/show_bug.cgi?id=55435
3410
3411         Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
3412
3413         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3414         (InitWebCoreSystemInterface):
3415         Support using WKCopyRequestWithStorageSession in WebCore.
3416
3417 2011-03-03  Adam Roben  <aroben@apple.com>
3418
3419         Don't try to paint outside the page's bounds
3420
3421         When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
3422         size, even though we only needed to paint at the new, smaller size.
3423
3424         The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
3425         test if this fix gets broken in the future.
3426
3427         Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
3428         the page is resized smaller
3429
3430         Reviewed by Anders Carlsson.
3431
3432         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3433         (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
3434         is suspended (but still refrain from updating it when in accelerated compositing mode).
3435         Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
3436         region with the page's new bounds. This prevents us from accumulating a dirty region that is
3437         larger than the page in the case where the page is being resized smaller.
3438         (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
3439         outside of the page's bounds.
3440
3441 2011-03-03  Maciej Stachowiak  <mjs@apple.com>
3442
3443         Reviewed by Brady Eidson.
3444
3445         WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
3446         https://bugs.webkit.org/show_bug.cgi?id=55701
3447         <rdar://problem/9074017>
3448
3449         * Shared/WebProcessCreationParameters.cpp:
3450         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
3451         flag parameters to false.
3452         (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
3453         (WebKit::WebProcessCreationParameters::decode): And deserialize.
3454
3455 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
3456
3457         Reviewed by Darin Adler.
3458
3459         REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
3460         https://bugs.webkit.org/show_bug.cgi?id=55633
3461         <rdar://problem/8963023>
3462
3463         * WebKit2.xcodeproj/project.pbxproj:
3464         * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
3465         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
3466         (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
3467         (-[FullKeyboardAccessWatcher init]):
3468         (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
3469         Get the current state of full keyboard access, listening for change notifications.
3470
3471         * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
3472
3473         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
3474         WebKit1 also doesn't implement this on platforms other than Mac.
3475
3476         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
3477         Just ask FullKeyboardAccessWatcher.
3478
3479         * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
3480         * WebProcess/WebCoreSupport/WebChromeClient.h:
3481         Added keyboardUIMode(), removed tabsToLinks().
3482
3483         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
3484         * WebProcess/WebPage/WebPage.h:
3485         Generate keyboard UI mode from tabToLinks preference and current state of FKA.
3486
3487 2011-03-03  Sam Weinig  <sam@webkit.org>
3488
3489         Reviewed by Anders Carlsson.
3490
3491         Give the Bundle's policy client the option of deciding the policy
3492         https://bugs.webkit.org/show_bug.cgi?id=55699
3493
3494         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3495         Add WKBundlePagePolicyAction enum and make it the return value of
3496         the WKBundlePagePolicyClient functions.
3497
3498         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp: