Source/WebCore: WK2: Cannot set focus on an element when focus is outside of WKView
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
2
3         Reviewed by Sam Weinig.
4
5         WK2: Cannot set focus on an element when focus is outside of WKView
6         https://bugs.webkit.org/show_bug.cgi?id=55281
7
8         * UIProcess/API/mac/PageClientImpl.h:
9         * UIProcess/API/mac/PageClientImpl.mm:
10         (WebKit::PageClientImpl::setFocus):
11         * UIProcess/API/qt/qwkpage_p.h:
12         (QWKPagePrivate::setFocus):
13         * UIProcess/PageClient.h:
14         * UIProcess/WebPageProxy.cpp:
15         (WebKit::WebPageProxy::setFocus):
16         * UIProcess/WebPageProxy.h:
17         * UIProcess/WebPageProxy.messages.in:
18         * UIProcess/win/WebView.h:
19         (WebKit::WebView::setFocus):
20         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
21         (WebKit::WebChromeClient::focus):
22         (WebKit::WebChromeClient::unfocus):
23
24 2011-03-08  Jeff Miller  <jeffm@apple.com>
25
26         Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
27
28         * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
29
30 2011-03-08  Jeff Miller  <jeffm@apple.com>
31
32         Reviewed by Darin Adler.
33
34         Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
35         https://bugs.webkit.org/show_bug.cgi?id=55952
36
37         * UIProcess/API/C/win/WKBaseWin.h: Removed.
38         * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
39
40 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
41
42         Reviewed by Martin Robinson.
43
44         [GTK] Add new files to compilation after r77974
45         https://bugs.webkit.org/show_bug.cgi?id=54076
46
47         The commit added new code to allow passing context to policy
48         delegate methods, we also added dummy ResourceRequest and
49         ResourceResponse decoders until we implement them.
50
51         * GNUmakefile.am:
52         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
53         (CoreIPC::decodeResourceRequest):
54         (CoreIPC::decodeResourceResponse):
55
56 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
57
58         Reviewed by Darin Adler.
59
60         AX: Webkit2 not sending UAZoomFocusChanged notifications
61         https://bugs.webkit.org/show_bug.cgi?id=55916
62
63         Needed to implement the windowToScreen() method so that the right frame
64         could be calculated to send for zoom focus changes.
65
66         * UIProcess/API/mac/PageClientImpl.h:
67         * UIProcess/API/mac/PageClientImpl.mm:
68         (WebKit::PageClientImpl::windowToScreen):
69         * UIProcess/API/qt/qwkpage.cpp:
70         (QWKPagePrivate::windowToScreen):
71         * UIProcess/API/qt/qwkpage_p.h:
72         * UIProcess/PageClient.h:
73         * UIProcess/WebPageProxy.cpp:
74         (WebKit::WebPageProxy::windowToScreen):
75         * UIProcess/WebPageProxy.h:
76         * UIProcess/WebPageProxy.messages.in:
77         * UIProcess/win/WebView.cpp:
78         (WebKit::WebView::windowToScreen):
79         * UIProcess/win/WebView.h:
80         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
81         (WebKit::WebChromeClient::windowToScreen):
82         * WebProcess/WebPage/WebPage.cpp:
83         (WebKit::WebPage::windowToScreen):
84         * WebProcess/WebPage/WebPage.h:
85
86 2011-03-08  John Sullivan  <sullivan@apple.com>
87
88         Reviewed by Darin Adler.
89
90         https://bugs.webkit.org/show_bug.cgi?id=55940
91         WebKit2 should support Ignore policy from injected bundle client
92
93         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
94         Added WKBundlePagePolicyActionIgnore.
95         
96         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
97         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
98         If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
99         to the loader's PolicyIgnore.
100
101 2011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
102
103         Reviewed by Kenneth Rohde Christiansen.
104
105         [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
106         https://bugs.webkit.org/show_bug.cgi?id=55876
107
108         Make sure TESTS_SOURCE_DIR is set for Symbian the same way
109         as it is for WK1.
110
111         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
112         (tst_QGraphicsWKView::loadEmptyPage):
113         * UIProcess/API/qt/tests/tests.pri:
114
115 2011-03-07  Damian Kaleta  <dkaleta@apple.com>
116
117         Reviewed by Anders Carlsson.
118
119         QuickTime plugin should opt in to a 32-bit non-executable heap
120         https://bugs.webkit.org/show_bug.cgi?id=55704
121         <rdar://problem/8105706>
122
123         * UIProcess/Plugins/PluginProcessProxy.cpp:
124         (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
125         By default it should opt-out.
126         (WebKit::PluginProcessProxy::PluginProcessProxy):
127
128 2011-03-07  Sam Weinig  <sam@webkit.org>
129
130         Reviewed by Anders Carlsson.
131
132         Add unableToImplementPolicy callback for WebKit2 policy client
133         <rdar://problem/9071902>
134         https://bugs.webkit.org/show_bug.cgi?id=55884
135
136         * UIProcess/API/C/WKPage.h:
137         * UIProcess/WebPageProxy.cpp:
138         (WebKit::WebPageProxy::unableToImplementPolicy):
139         * UIProcess/WebPageProxy.h:
140         * UIProcess/WebPageProxy.messages.in:
141         * UIProcess/WebPolicyClient.cpp:
142         (WebKit::WebPolicyClient::unableToImplementPolicy):
143         * UIProcess/WebPolicyClient.h:
144         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
145         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
146         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
147         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
148         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
149         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
150         Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
151
152 2011-03-07  Sam Weinig  <sam@webkit.org>
153
154         Reviewed by Anders Carlsson.
155
156         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
157         https://bugs.webkit.org/show_bug.cgi?id=55827
158
159         - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
160           and pass the entire response, instead of just the MIMEType.
161         - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
162           MIMEType.
163
164         * UIProcess/API/C/WKPage.h:
165         * UIProcess/WebPageProxy.cpp:
166         (WebKit::WebPageProxy::decidePolicyForResponse):
167         * UIProcess/WebPageProxy.h:
168         * UIProcess/WebPageProxy.messages.in:
169         * UIProcess/WebPolicyClient.cpp:
170         (WebKit::WebPolicyClient::decidePolicyForResponse):
171         * UIProcess/WebPolicyClient.h:
172         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
173         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
174         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
175         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
176         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
177         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
178         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
179
180 2011-03-06  Jessie Berlin  <jberlin@apple.com>
181
182         Reviewed by Sam Weinig.
183
184         WebKit2: Use CFNetwork Sessions API.
185         https://bugs.webkit.org/show_bug.cgi?id=55435.
186
187         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
188         Private Browsing Storage Session.
189
190         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
191         (InitWebCoreSystemInterface):
192         Add support for using the new WKSI functions in WebCore.
193
194 2011-03-06  Oleg Romashin  <romaxa@gmail.com>
195
196         Reviewed by Kenneth Rohde Christiansen.
197
198         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
199         Adding dummy Qt files for Plugin Process implementation,
200         Adding missing sources into Qt pro files
201         https://bugs.webkit.org/show_bug.cgi?id=55719
202
203         * DerivedSources.pro:
204         * PluginProcess/qt: Added.
205         * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
206         (WebKit::PluginControllerProxy::platformInitialize):
207         (WebKit::PluginControllerProxy::platformDestroy):
208         (WebKit::PluginControllerProxy::platformGeometryDidChange):
209         * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
210         (WebKit::PluginProcessMain):
211         * PluginProcess/qt/PluginProcessQt.cpp: Added.
212         (WebKit::PluginProcess::platformInitialize):
213         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
214         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
215         * WebKit2.pri:
216         * WebKit2.pro:
217         * WebKit2API.pri:
218         * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
219         (WebKit::PluginProxy::needsBackingStore):
220
221 2011-03-05  Sam Weinig  <sam@webkit.org>
222
223         Reviewed by Dan Bernstein.
224
225         Remove unneeded onPageClose function from DrawingArea
226         https://bugs.webkit.org/show_bug.cgi?id=55836
227
228         * WebProcess/WebPage/DrawingArea.h:
229         Remove empty function.
230
231         * WebProcess/WebPage/WebPage.cpp:
232         (WebKit::WebPage::close):
233         Remove only called
234
235 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
236
237         WK2 Mac build fix.
238
239         * UIProcess/API/C/WKPage.cpp:
240         (WKPageComputePagesForPrinting):
241         (WKPageBeginPrinting):
242
243         * UIProcess/API/C/WKPagePrivate.h:
244
245 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
246
247         WK2 Mac build fix.
248
249         * UIProcess/API/C/WKPagePrivate.h:
250
251 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
252
253         WK2 needs printing support on Windows
254         https://bugs.webkit.org/show_bug.cgi?id=55800
255         <rdar://problem/8903808>
256
257         Reviewed by Darin Adler.
258
259         * UIProcess/API/C/WKPage.cpp:
260         (ComputedPagesContext::ComputedPagesContext):
261         (computedPagesCallback):
262         From the Vector of WebCore::IntRects, build up a Vector of WKRects.
263         Call the callback, passing these rects and the scale factor.
264         (printInfoFromWKPrintInfo):
265         Return a PrintInfo structure from the WKPrintInfo.
266         (WKPageComputePagesForPrinting):
267         Call WebPageProxy::computePagesForPrinting(). Pass
268         computedPagesCallback as the callback function, so that we can
269         translate the WebCore rect type to WKRect before calling the caller's
270         callback function.
271         (WKPageBeginPrinting):
272         Call WebPageProxy::beginPrinting().
273         (WKPageDrawPagesToPDF):
274         Call WebPageProxy::drawPagesToPDF().
275
276         * UIProcess/API/C/WKPagePrivate.h:
277         Declare the WKPrintInfo type and new functions.
278
279         * UIProcess/WebPageProxy.cpp:
280         Compile this code on Windows.
281
282         * UIProcess/WebPageProxy.h:
283         Ditto.
284
285         * UIProcess/win/WebView.cpp:
286         (WebKit::WebView::paint):
287         We're painting the window; leave printing mode.
288
289         * WebProcess/WebPage/WebPage.cpp:
290         Compile this code on Windows.
291
292         * WebProcess/WebPage/WebPage.h:
293         Ditto.
294
295         * WebProcess/WebPage/WebPage.messages.in:
296         Ditto.
297
298 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
299
300         Reviewed by Darin Adler.
301
302         Adopt VersionStamper tool for Windows WebKit DLLs
303         https://bugs.webkit.org/show_bug.cgi?id=55784
304         <rdar://problem/9021320>
305
306         We now use a tool to stamp the version number onto the Apple WebKit DLLs
307         during the post-build step.
308
309         Fetch the WebKit version from a string resource instead of the version resource.
310
311         * UIProcess/win/WebPageProxyWin.cpp:
312         (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
313         * win/WebKit2.rc: Removed version, added stringtable.
314         * win/WebKit2WebProcess.rc: Removed.
315         * win/WebKit2WebProcess.vcproj:
316         * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
317         * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
318         * win/WebKitPostBuild.cmd: Stamp version.
319
320 2011-03-04  Jeff Miller  <jeffm@apple.com>
321
322         Reviewed by Darin Adler.
323
324         Add WKPageValidateCommand()
325         https://bugs.webkit.org/show_bug.cgi?id=55793
326         
327         On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
328         However, on Windows we need to do this in the client, so expose this functionality
329         in the API via WKPageValidateCommand().
330         
331         Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
332         to match this new API, so it no longer has to go through PageClient to get notified
333         when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
334         so I removed the stub implementations in qt and gtk as well.
335
336         * UIProcess/API/C/WKPage.cpp:
337         (WKPageValidateCommand): Added.
338         * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
339         * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
340         * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
341         * UIProcess/API/mac/WKView.mm:
342         (validateCommandCallback): Added.
343         (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
344         * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
345         * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
346         * UIProcess/PageClient.h: Removed setEditCommandState().
347         * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
348         (WebKit::WebPageProxy::validateCommand): This now takes a callback.
349         (WebKit::WebPageProxy::validateCommandCallback): Added.
350         (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
351         * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
352         (WebKit::ValidateCommandCallback::create): Added.
353         (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
354         (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
355         (WebKit::ValidateCommandCallback::invalidate): Added.
356         (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
357         * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
358         * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
359         * UIProcess/gtk/WebView.h: Removed setEditCommandState().
360         * UIProcess/win/WebView.cpp: Removed setEditCommandState().
361         * UIProcess/win/WebView.h: Removed setEditCommandState().
362         * WebProcess/WebPage/WebPage.cpp:
363         (WebKit::WebPage::validateCommand): This now takes a callbackID.
364         * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
365         * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
366
367 2011-03-04  Brian Weinstein  <bweinstein@apple.com>
368
369         Reviewed by Darin Adler.
370
371         Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
372         https://bugs.webkit.org/show_bug.cgi?id=53919
373         <rdar://problem/8966020>
374         
375         Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
376
377         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
378         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
379
380 2011-03-04  Darin Adler  <darin@apple.com>
381
382         Reviewed by Mark Rowe.
383
384         WebKit2 session state should include even loads too new to be in the back/forward list
385         https://bugs.webkit.org/show_bug.cgi?id=55781
386         part of <rdar://problem/8968847>
387
388         * UIProcess/cf/WebPageProxyCF.cpp:
389         (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
390         process to not be included in the back/forward list yet: The pending API request URL and
391         the provisional URL.
392         (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
393         list is not restored and a URL is present. Later we can improve the way we handle the
394         case where we have both a back/forward list and a URL.
395
396 2011-03-04  Jessie Berlin  <jberlin@apple.com>
397
398         Reviewed by Darin Adler.
399
400         WebKit2: Use CFNetwork Sessions API.
401         https://bugs.webkit.org/show_bug.cgi?id=55435.
402
403         Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
404         contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
405
406         * UIProcess/mac/WebContextMac.mm:
407         (WebKit::WebContext::platformInitializeWebProcess):
408         * UIProcess/win/WebContextWin.cpp:
409         (WebKit::WebContext::platformInitializeWebProcess):
410
411 2011-03-04  Jessie Berlin  <jberlin@apple.com>
412
413         Reviewed by Maciej Stachowiak.
414
415         WebKit2: Use CFNetwork Sessions API.
416         https://bugs.webkit.org/show_bug.cgi?id=55435.
417
418         When Private Browsing is enabled, get the cached url response from the cache associated with
419         the Private Browsing Storage Session.
420
421         * WebProcess/WebPage/mac/WebPageMac.mm:
422         (WebKit::WebPage::platformHasLocalDataForURL):
423         If Private Browsing is enabled, call into WKSI to get the response.
424         (WebKit::WebPage::cachedResponseMIMETypeForURL):
425         Ditto.
426         * WebProcess/WebPage/win/WebPageWin.cpp:
427         (WebKit::WebPage::platformHasLocalDataForURL):
428         If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
429         (WebKit::WebPage::cachedResponseMIMETypeForURL):
430         Ditto.
431
432 2011-03-04  Jeff Miller  <jeffm@apple.com>
433
434         Reviewed by Darin Adler.
435
436         Move WKViewExecuteCommand() to WKPageExecuteCommand()
437         https://bugs.webkit.org/show_bug.cgi?id=55744
438         
439         Executing a command operates on a page, so it makes more sense for it to be in WKPage.
440         This also makes it available on all platforms, not just Windows.
441
442         * UIProcess/API/C/WKPage.cpp:
443         (WKPageExecuteCommand): Added.
444         * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
445         * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
446         * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
447
448 2011-03-04  Dan Bernstein  <mitz@apple.com>
449
450         LLVM Compiler build fix.
451
452         * WebProcess/WebPage/WebPage.cpp:
453         (WebKit::WebPage::runJavaScriptInMainFrame):
454
455 2011-03-03  Timothy Hatcher  <timothy@apple.com>
456
457         Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
458
459         https://webkit.org/b/55623
460
461         Reviewed by Darin Adler.
462
463         * UIProcess/API/C/WKPage.cpp:
464         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
465         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
466         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
467         * UIProcess/WebPageProxy.cpp:
468         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
469         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
470         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
471         from the DataReference before calling the callback.
472         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
473         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
474         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
475         * WebProcess/WebPage/WebPage.cpp:
476         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
477         And use ScriptValueCallback to send the message back.
478
479 2011-03-03  Brian Weinstein  <bweinstein@apple.com>
480
481         Reviewed by Adam Roben.
482
483         Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
484         
485         Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
486         on all platforms, and stub the functions on platforms that don't implement them.
487
488         * WebProcess/Cookies/WebCookieManager.cpp:
489         (WebKit::WebCookieManager::startObservingCookieChanges):
490         (WebKit::WebCookieManager::stopObservingCookieChanges):
491
492 2011-03-03  Jeff Miller  <jeffm@apple.com>
493
494         Reviewed by Darin Adler.
495
496         Refactor classes in GenericCallback.h
497         https://bugs.webkit.org/show_bug.cgi?id=55732
498         
499         Since we're going to need to add additional callback classes, make a CallbackBase class that manages
500         the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
501         ComputedPagesCallback) now all derive from CallbackBase.
502         
503         Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
504         constructor instead (we forgot the leading ~).
505  
506         * UIProcess/GenericCallback.h:
507         (WebKit::CallbackBase::~CallbackBase):
508         (WebKit::CallbackBase::callbackID):
509         (WebKit::CallbackBase::CallbackBase):
510         (WebKit::CallbackBase::context):
511         (WebKit::CallbackBase::generateCallbackID):
512         (WebKit::VoidCallback::~VoidCallback):
513         (WebKit::VoidCallback::performCallback):
514         (WebKit::VoidCallback::invalidate):
515         (WebKit::VoidCallback::VoidCallback):
516         (WebKit::GenericCallback::create):
517         (WebKit::GenericCallback::~GenericCallback):
518         (WebKit::GenericCallback::performCallbackWithReturnValue):
519         (WebKit::GenericCallback::invalidate):
520         (WebKit::GenericCallback::GenericCallback):
521         (WebKit::ComputedPagesCallback::create):
522         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
523         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
524         (WebKit::ComputedPagesCallback::invalidate):
525         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
526
527 2011-03-03  Adam Roben  <aroben@apple.com>
528
529         Don't assume the web process has had a chance to paint before the view has to paint
530
531         Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
532         BackingStore::paint
533
534         Reviewed by Anders Carlsson.
535
536         * UIProcess/DrawingAreaProxyImpl.cpp:
537         (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
538         yet.
539
540 2011-03-03  Adam Roben  <aroben@apple.com>
541
542         Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
543
544         The intent is to save memory for views that aren't painting.
545
546         Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
547         backing store after not painting for a while
548
549         Reviewed by Anders Carlsson.
550
551         * UIProcess/DrawingAreaProxyImpl.cpp:
552         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
553         (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
554         bail if we're in accelerated compositing mode); we might have thrown it away to save memory
555         but now are being asked to paint by the view. The existing code in this function will handle
556         getting a new backing store if possible by blocking for a little while to try to receive a
557         DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
558         don't have any outstanding UpdateBackingStoreState requests. After painting, call
559         discardBackingStoreSoon to update our timer.
560         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
561         future.
562         (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
563         the web process we'll need a full backing store update on the next paint.
564
565         * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
566
567 2011-03-03  Adam Roben  <aroben@apple.com>
568
569         Add a way to tell the web process to perform a full backing store update on its next paint
570
571         Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
572         full backing store update should happen immediately or should be deferred until the next
573         paint or compositing mode change occurs. The deferred update isn't used yet, but will be
574         used when we start throwing away backing stores to save memory.
575
576         Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
577         store needs a full update on the next paint
578
579         Reviewed by Anders Carlsson.
580
581         * UIProcess/DrawingAreaProxyImpl.cpp:
582         (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
583         request, tell the web process to perform the backing store update right away, in case we
584         previously told it it could defer the update.
585         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
586         store update.
587         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
588         were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
589         for the web process to decide to send us this message on its own (if we asked it to do a
590         deferred backing store update and then it needed to paint some part of the page). Specify
591         that we need an immediate backing store update if the web process hasn't updated to our
592         latest state, as we're about to draw potentially out-of-date bits to the screen and want to
593         get the right bits as soon as possible. Also added a FIXME about a potential optimization.
594         (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
595         parameter, which is just passed through to sendUpdateBackingStoreState.
596         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
597         parameter that is used to specify to the web process whether to perform the full backing
598         store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
599         thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
600         the web process for an immediate response; otherwise we could end up accidentally calling
601         waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
602         us such a message.
603
604         * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
605
606         * WebProcess/WebPage/DrawingArea.h:
607         (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
608
609         * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
610         UpdateBackingStoreState message.
611
612         * WebProcess/WebPage/DrawingAreaImpl.cpp:
613         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
614         whether we should send a DidUpdateBackingStoreState message instead of an Update or
615         compositing mode change message. This will be set to true when a deferred backing store
616         update is pending.
617         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
618         DidUpdateBackingStoreState message instead of a compositing mode change message.
619         (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
620         we've already been told about this state ID (as can happen when the UI process decides it
621         needs an immediate update to a state that it previously requested a deferred update to),
622         don't bother updating the page's size, etc. In addition, if we've already sent a
623         DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
624         Moved code to send the DidUpdateBackingStoreState message from here...
625         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
626         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
627         even if painting is suspended or we're in the process of updating the backing store state.
628         It causes no harm and simplifies the code. If a deferred update is pending, send a
629         DidUpdateBackingStoreState message instead of a compositing mode change message. Also
630         removed a redundant if.
631         (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
632         backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
633         messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
634         of an Update message.
635
636         * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
637         class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
638
639 2011-03-03  Andy Estes  <aestes@apple.com>
640
641         Reviewed by Darin Adler.
642
643         When displaying the missing plug-in sheet, pass the 'pluginspage'
644         attribute to the UI process.
645         https://bugs.webkit.org/show_bug.cgi?id=55553
646
647         * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
648         missingPluginButtonClicked.
649         * UIProcess/WebPageProxy.cpp:
650         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
651         * UIProcess/WebPageProxy.h: Ditto.
652         * UIProcess/WebPageProxy.messages.in: Ditto.
653         * UIProcess/WebUIClient.cpp:
654         (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
655         * UIProcess/WebUIClient.h: Ditto.
656         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
657         (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
658         pluginspageAttr.
659
660 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
661
662         Suggested by Dan Bernstein.
663
664         Move "const" around "NSString *", so that it suddenly begins to make sense.
665
666         * WebProcess/mac/FullKeyboardAccessWatcher.mm:
667
668 2011-03-03  Jeff Miller  <jeffm@apple.com>
669
670         Reviewed by Anders Carlsson.
671
672         WebKit2: Add WKViewRef API for executing edit commands
673         https://bugs.webkit.org/show_bug.cgi?id=49829
674
675         Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
676
677         * UIProcess/API/C/win/WKView.cpp:
678         (WKViewExecuteCommand): Added.
679         * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
680
681 2011-03-03  Jessie Berlin  <jberlin@apple.com>
682
683         Reviewed by Adam Roben.
684
685         WebKit2: Use CFNetwork Sessions API.
686         https://bugs.webkit.org/show_bug.cgi?id=55435
687
688         Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
689
690         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
691         (InitWebCoreSystemInterface):
692         Support using WKCopyRequestWithStorageSession in WebCore.
693
694 2011-03-03  Adam Roben  <aroben@apple.com>
695
696         Don't try to paint outside the page's bounds
697
698         When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
699         size, even though we only needed to paint at the new, smaller size.
700
701         The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
702         test if this fix gets broken in the future.
703
704         Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
705         the page is resized smaller
706
707         Reviewed by Anders Carlsson.
708
709         * WebProcess/WebPage/DrawingAreaImpl.cpp:
710         (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
711         is suspended (but still refrain from updating it when in accelerated compositing mode).
712         Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
713         region with the page's new bounds. This prevents us from accumulating a dirty region that is
714         larger than the page in the case where the page is being resized smaller.
715         (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
716         outside of the page's bounds.
717
718 2011-03-03  Maciej Stachowiak  <mjs@apple.com>
719
720         Reviewed by Brady Eidson.
721
722         WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
723         https://bugs.webkit.org/show_bug.cgi?id=55701
724         <rdar://problem/9074017>
725
726         * Shared/WebProcessCreationParameters.cpp:
727         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
728         flag parameters to false.
729         (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
730         (WebKit::WebProcessCreationParameters::decode): And deserialize.
731
732 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
733
734         Reviewed by Darin Adler.
735
736         REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
737         https://bugs.webkit.org/show_bug.cgi?id=55633
738         <rdar://problem/8963023>
739
740         * WebKit2.xcodeproj/project.pbxproj:
741         * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
742         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
743         (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
744         (-[FullKeyboardAccessWatcher init]):
745         (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
746         Get the current state of full keyboard access, listening for change notifications.
747
748         * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
749
750         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
751         WebKit1 also doesn't implement this on platforms other than Mac.
752
753         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
754         Just ask FullKeyboardAccessWatcher.
755
756         * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
757         * WebProcess/WebCoreSupport/WebChromeClient.h:
758         Added keyboardUIMode(), removed tabsToLinks().
759
760         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
761         * WebProcess/WebPage/WebPage.h:
762         Generate keyboard UI mode from tabToLinks preference and current state of FKA.
763
764 2011-03-03  Sam Weinig  <sam@webkit.org>
765
766         Reviewed by Anders Carlsson.
767
768         Give the Bundle's policy client the option of deciding the policy
769         https://bugs.webkit.org/show_bug.cgi?id=55699
770
771         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
772         Add WKBundlePagePolicyAction enum and make it the return value of
773         the WKBundlePagePolicyClient functions.
774
775         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
776         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
777         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
778         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
779         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
780         Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
781
782         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
783         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
784         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
785         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
786         Call the policy function early if the bundle handles it.
787
788 2011-03-02  Brian Weinstein  <bweinstein@apple.com>
789
790         Reviewed by Adam Roben.
791
792         Rest of WebKit2: Need a way to send notifications to client when cookies change
793         https://bugs.webkit.org/show_bug.cgi?id=55427
794         <rdar://problem/9056027>
795         
796         This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
797         listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
798         when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
799         change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
800
801         * UIProcess/API/C/WKCookieManager.cpp:
802         (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
803         (WKCookieManagerStartObservingCookieChanges): Ditto.
804         (WKCookieManagerStopObservingCookieChanges): Ditto.
805
806         * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
807             which is responsible for cookiesDidChange.
808
809         * UIProcess/WebCookieManagerProxy.cpp:
810         (WebKit::WebCookieManagerProxy::initializeClient):
811         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
812         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
813         (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
814             modified.
815         * UIProcess/WebCookieManagerProxy.h:
816         * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
817
818         * UIProcess/WebCookieManagerProxyClient.cpp: Added.
819         (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
820             cookies changed.
821         * UIProcess/WebCookieManagerProxyClient.h: Added.
822     
823         * WebProcess/Cookies/WebCookieManager.cpp:
824         (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
825             (on platforms that support it).
826         (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
827         (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
828         * WebProcess/Cookies/WebCookieManager.h:
829         * WebProcess/Cookies/WebCookieManager.messages.in:
830         
831         Add new files.
832         * WebKit2.pro:
833         * WebKit2.xcodeproj/project.pbxproj:
834         * GNUmakefile.am:
835         * win/WebKit2.vcproj:
836
837 2011-03-03  Anders Carlsson  <andersca@apple.com>
838
839         Reviewed by Darin Adler.
840
841         Remove CanRunBeforeUnloadConfirmPanel sync message
842         https://bugs.webkit.org/show_bug.cgi?id=55689
843
844         * Shared/WebPageCreationParameters.cpp:
845         (WebKit::WebPageCreationParameters::encode):
846         (WebKit::WebPageCreationParameters::decode):
847         Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
848         being encoded/decoded.
849
850         * Shared/WebPageCreationParameters.h:
851         Add canRunBeforeUnloadConfirmPanel.
852
853         * UIProcess/WebPageProxy.cpp:
854         (WebKit::WebPageProxy::initializeUIClient):
855         Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
856
857         (WebKit::WebPageProxy::creationParameters):
858         Initialize parameters.canRunBeforeUnloadConfirmPanel.
859
860         * UIProcess/WebPageProxy.messages.in:
861         Remove CanRunBeforeUnloadConfirmPanel message.
862
863         * UIProcess/WebUIClient.cpp:
864         (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
865         * UIProcess/WebUIClient.h:
866         Make canRunBeforeUnloadConfirmPanel const.
867
868         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
869         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
870         Ask the web page instead of sending a synchronous message.
871
872         * WebProcess/WebPage/WebPage.cpp:
873         (WebKit::WebPage::WebPage):
874         Initialize m_canRunBeforeUnloadConfirmPanel.
875
876         * WebProcess/WebPage/WebPage.h:
877         (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
878         (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
879         Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
880
881         (WebKit::WebPage::setCanRunModal):
882         Add setter for m_canRunModal.
883
884         * WebProcess/WebPage/WebPage.messages.in:
885         Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
886
887 2011-03-03  Adam Roben  <aroben@apple.com>
888
889         Create the CFBundleRef for WebKit.dll on Windows if needed
890
891         WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
892         out or crash on Windows 7 Release (WebKit2 Tests)
893
894         Reviewed by Darin Adler.
895
896         * Shared/win/WebKitBundle.cpp: Added.
897         (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
898         and returns a new bundle.
899         (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
900
901         * Shared/win/WebKitBundle.h: Added.
902
903         * UIProcess/win/WebInspectorProxyWin.cpp:
904         (WebKit::WebInspectorProxy::inspectorPageURL):
905         * WebProcess/WebPage/win/WebInspectorWin.cpp:
906         (WebKit::WebInspector::localizedStringsURL):
907         Changed to use webKitBundle() to ensure that the bundle has been created.
908
909         * win/WebKit2.vcproj: Added new files.
910
911 2011-03-03  Peter Kasting  <pkasting@google.com>
912
913         Reviewed by James Robinson.
914
915         Drop redundant "Windows; " from the Windows-specific User Agent string.
916         https://bugs.webkit.org/show_bug.cgi?id=54567
917
918         * UIProcess/win/WebPageProxyWin.cpp:
919         (WebKit::WebPageProxy::standardUserAgent):
920
921 2011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>
922
923         Unreviewed, rolling out r80188.
924         http://trac.webkit.org/changeset/80188
925         https://bugs.webkit.org/show_bug.cgi?id=55647
926
927         Broke the WebKit API tests. (Requested by xenon on #webkit).
928
929         * UIProcess/API/C/WKPage.cpp:
930         (WKPageRunJavaScriptInMainFrame):
931         (callRunJavaScriptBlockAndRelease):
932         * UIProcess/API/C/WKPage.h:
933         * UIProcess/WebPageProxy.cpp:
934         (WebKit::WebPageProxy::close):
935         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
936         (WebKit::WebPageProxy::processDidCrash):
937         * UIProcess/WebPageProxy.h:
938         * UIProcess/WebPageProxy.messages.in:
939         * WebProcess/WebPage/WebPage.cpp:
940         (WebKit::WebPage::runJavaScriptInMainFrame):
941
942 2011-03-02  Jeff Miller  <jeffm@apple.com>
943
944         Reviewed by Darin Adler.
945
946         Rename WebKit::WebPage::validateMenuItem() to validateCommand()
947         https://bugs.webkit.org/show_bug.cgi?id=55636
948         
949         Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
950
951         * UIProcess/API/mac/WKView.mm:
952         (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
953         * UIProcess/WebPageProxy.cpp:
954         (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
955         (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
956         * UIProcess/WebPageProxy.h:
957         * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
958         * WebProcess/WebPage/WebPage.cpp:
959         (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
960         * WebProcess/WebPage/WebPage.h:
961         * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
962
963 2011-03-02  Anders Carlsson  <andersca@apple.com>
964
965         Reviewed by Sam Weinig.
966
967         WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
968         https://bugs.webkit.org/show_bug.cgi?id=55635
969
970         * Shared/WebPageCreationParameters.cpp:
971         (WebKit::WebPageCreationParameters::encode):
972         (WebKit::WebPageCreationParameters::decode):
973         Encode and decode areMemoryCacheClientCallsEnabled.
974
975         * Shared/WebPageCreationParameters.h:
976         Add areMemoryCacheClientCallsEnabled member variable.
977
978         * UIProcess/WebPageProxy.cpp:
979         (WebKit::WebPageProxy::WebPageProxy):
980         Initialize m_areMemoryCacheClientCallsEnabled.
981
982         (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
983         Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
984
985         (WebKit::WebPageProxy::creationParameters):
986         Set areMemoryCacheClientCallsEnabled.
987
988         * WebProcess/WebPage/WebPage.cpp:
989         (WebKit::WebPage::WebPage):
990         Call WebPage::setMemoryCacheMessagesEnabled.
991
992 2011-03-02  Timothy Hatcher  <timothy@apple.com>
993
994         Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
995
996         https://webkit.org/b/55623
997
998         Reviewed by Darin Adler.
999
1000         * UIProcess/API/C/WKPage.cpp:
1001         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
1002         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
1003         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
1004         * UIProcess/WebPageProxy.cpp:
1005         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
1006         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
1007         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
1008         from the DataReference before calling the callback.
1009         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
1010         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
1011         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
1012         * WebProcess/WebPage/WebPage.cpp:
1013         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
1014         And use ScriptValueCallback to send the message back.
1015
1016 2011-03-02  Jessie Berlin  <jberlin@apple.com>
1017
1018         Reviewed by Adam Roben.
1019
1020         WebKit2: Use CFNetwork Sessions API.
1021         https://bugs.webkit.org/show_bug.cgi?id=55435
1022
1023         Add the ability to create a Private Browsing Storage Session.
1024
1025         * Shared/WebProcessCreationParameters.cpp:
1026         (WebKit::WebProcessCreationParameters::encode):
1027         Encode the UI Process bundle identifier.
1028         (WebKit::WebProcessCreationParameters::decode):
1029         Decode the UI Process bundle identifier.
1030         * Shared/WebProcessCreationParameters.h:
1031
1032         * UIProcess/mac/WebContextMac.mm:
1033         (WebKit::WebContext::platformInitializeWebProcess):
1034         Grab the bundle identifier and use it to set the WebProcessCreationParameter.
1035         * UIProcess/win/WebContextWin.cpp:
1036         (WebKit::WebContext::platformInitializeWebProcess):
1037         Ditto.
1038
1039         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1040         (InitWebCoreSystemInterface):
1041         Support using the wkCreatePrivateStorageSession WKSI in WebCore.
1042
1043         * WebProcess/WebProcess.cpp:
1044         (WebKit::WebProcess::initializeWebProcess):
1045         Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
1046         from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
1047         same identifier as WebKit2.
1048
1049 2011-03-01  Brian Weinstein  <bweinstein@apple.com>
1050
1051         Reviewed by Adam Roben.
1052
1053         Part of WebKit2: Need a way to send notifications to client when cookies change
1054         https://bugs.webkit.org/show_bug.cgi?id=55427
1055         <rdar://problem/9056027>
1056
1057         * WebProcess/Cookies/WebCookieManager.cpp:
1058         (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
1059             message to the UI process.
1060
1061         * WebProcess/Cookies/WebCookieManager.h:
1062         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1063         (WebKit::WebPlatformStrategies::createCookiesStrategy):
1064         (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
1065         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1066
1067 2011-03-02  Andras Becsi  <abecsi@webkit.org>
1068
1069         Reviewed by Laszlo Gombos.
1070
1071         [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
1072         https://bugs.webkit.org/show_bug.cgi?id=55478
1073
1074         On case insensitive systems the generated forwarding headers cause build problems.
1075
1076         * Scripts/generate-forwarding-headers.pl: The generated header should
1077         also contain the framework name.
1078
1079 2011-03-01  Jeff Miller  <jeffm@apple.com>
1080
1081         Reviewed by Darin Adler.
1082
1083         Expose some selection state fields in WKPage
1084         https://bugs.webkit.org/show_bug.cgi?id=55541
1085         
1086         Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
1087         Edit menu items properly on Windows when using WebKit2.
1088
1089         * UIProcess/API/C/WKPage.cpp:
1090         (WKPageCanDelete): Added.
1091         (WKPageHasSelectedRange): Added.
1092         (WKPageIsContentEditable): Added.
1093         * UIProcess/API/C/WKPage.h: Added new functions.
1094         * UIProcess/WebPageProxy.h:
1095         (WebKit::WebPageProxy::canDelete): Added.
1096         (WebKit::WebPageProxy::hasSelectedRange): Added.
1097         (WebKit::WebPageProxy::isContentEditable): Added.
1098
1099 2011-03-01  Mark Rowe  <mrowe@apple.com>
1100
1101         Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
1102
1103         * Configurations/Base.xcconfig:
1104
1105 2011-03-01  Mark Rowe  <mrowe@apple.com>
1106
1107         Reviewed by Sam Weinig.
1108
1109         Add verification scripts to WebKit2 project and fix the issues they reveal.
1110
1111         * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
1112         library functions from being exported as weak externals.
1113         * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
1114         * Shared/WebContextMenuItem.cpp:
1115         (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
1116         * UIProcess/WebPageGroup.cpp:
1117         (WebKit::webPageGroupMap): Ditto.
1118         * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
1119         Run verification scripts at the appropriate times.
1120         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1121         (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
1122         (WebKit::WebEditorClient::respondToChangedContents): Ditto.
1123         (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
1124         (WebKit::WebEditorClient::didEndEditing): Ditto.
1125         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
1126         (WebKit::idToHistoryItemMap): Ditto.
1127         (WebKit::historyItemToIDMap): Ditto.
1128
1129 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
1130
1131         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
1132
1133         * UIProcess/API/qt/qwkpage.cpp:
1134         (QWKPage::viewportAttributesForSize):
1135
1136 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
1137
1138         Unreviewed, missed updating a call to WebCore::computeViewportAttributes
1139         who's prototype changed.
1140
1141         Viewport Warning/Error Messages Are Now Inaccurate
1142         https://bugs.webkit.org/show_bug.cgi?id=53707
1143
1144         * UIProcess/API/qt/qwkpage.cpp:
1145         (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
1146
1147 2011-03-01  Anders Carlsson  <andersca@apple.com>
1148
1149         Reviewed by Sam Weinig.
1150
1151         WKPluginSiteDataManagerClearAllSiteData is not working
1152         https://bugs.webkit.org/show_bug.cgi?id=55528
1153         <rdar://problem/9071823>
1154
1155         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1156         (WebKit::NetscapePluginModule::tryGetSitesWithData):
1157         Remove version checks, checking that the function pointer is not null is enough.
1158
1159         (WebKit::NetscapePluginModule::tryClearSiteData):
1160         Remove version checks, checking that the function pointer is not null is enough.
1161         Also, correctly convert a null String to a null CString.
1162
1163 2011-03-01  Adam Roben  <aroben@apple.com>
1164
1165         Incorporate a review comment I missed in r80051
1166
1167         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
1168
1169 2011-03-01  Adam Roben  <aroben@apple.com>
1170
1171         Make the PLUGIN_ARCHITECTURE() macro work with MSVC
1172
1173         Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
1174         plugins tests crashing in NetscapePlugin::initialize on Windows
1175
1176         Reviewed by Anders Carlsson.
1177
1178         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
1179         PLUGIN_ARCHITECTURE() is defined for some platform.
1180
1181         * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
1182         macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
1183         replaced the nonsense OS(WIN) with OS(WINDOWS).
1184
1185         * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
1186
1187 2011-03-01  Sam Weinig  <sam@webkit.org>
1188
1189         Reviewed by Timothy Hatcher.
1190
1191         WebKit2 needs to be made localizable
1192         https://bugs.webkit.org/show_bug.cgi?id=55483
1193
1194         * PluginProcess/mac/PluginProcessMainMac.mm:
1195         * WebProcess/mac/WebProcessMainMac.mm:
1196         Set the default localization from the passed in parameter.
1197
1198         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1199         Add the preferred localization as a parameter when launching processes
1200         so that they can set their localization to match the launching app.
1201
1202         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1203         Use WebCore's localizedString function on the mac, to actually localize
1204         these strings.
1205
1206         (WebKit::WebPlatformStrategies::imageTitle):
1207         Switch to using replace, instead of concatenation, to give localizers a chance
1208         to rearrange the wording.
1209
1210 2011-03-01  Balazs Kelemen  <kbalazs@webkit.org>
1211
1212         Reviewed by Anders Carlsson.
1213
1214         [Qt][WK2] Plugin initialization
1215         https://bugs.webkit.org/show_bug.cgi?id=48127
1216
1217         Apply the quirks that are necessary for the flash plugin
1218         to not crash on X11.
1219
1220         * Platform/qt/ModuleQt.cpp:
1221         (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
1222         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1223         (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
1224         if PLUGIN_ARCHITECTURE is X11.
1225         * Shared/Plugins/Netscape/NetscapePluginModule.h:
1226         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1227         (WebKit::initializeGTK):  The same hack that we do in WebCore.
1228         Call gtk_init because flash don't do it for itself.
1229         (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
1230         Do the hacks that we need to do before calling NP_Initialize on the
1231         flash plugin to save it form crashing.
1232         * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
1233         Added RequiresGTKToolKit quirk for X11.
1234         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1235         (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
1236         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1237         (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
1238         quirks to be available in NPN_GetValue.
1239
1240 2011-03-01  Adam Roben  <aroben@apple.com>
1241
1242         Convert seconds to milliseconds before calling ::SetTimer
1243
1244         Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
1245         early on Windows
1246
1247         Reviewed by Anders Carlsson.
1248
1249         * Platform/win/RunLoopWin.cpp:
1250         (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
1251         ::SetTimer expects.
1252
1253 2011-03-01  Andras Becsi  <abecsi@webkit.org>
1254
1255         Reviewed by Csaba Osztrogonác.
1256
1257         [Qt] Clean up the project files and move common options to WebKit.pri.
1258
1259         * WebKit2.pro: Deduplicate options.
1260
1261 2011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>
1262
1263         Reviewed by Andreas Kling.
1264
1265         [Qt] WebKit2 needs to support font size changing and getting default font size
1266         https://bugs.webkit.org/show_bug.cgi?id=53671
1267
1268         Added new enum for font size type and added methods to set and get default font sizes.
1269
1270         * UIProcess/API/qt/qwkpreferences.cpp:
1271         (QWKPreferences::setFontSize): Added.
1272         (QWKPreferences::fontSize): Added.
1273         * UIProcess/API/qt/qwkpreferences.h:
1274
1275 2011-02-28  Alice Liu  <alice.liu@apple.com>
1276
1277         Reviewed by Adam Roben and Gavin Barraclough.
1278
1279         https://bugs.webkit.org/show_bug.cgi?id=54898
1280         InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
1281
1282         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
1283         (WKBundleHitTestResultCopyNodeHandle): 
1284         Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
1285         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
1286         Renamed from "get" to "copy", because it leaksRef.
1287
1288 2011-02-28  Alice Liu  <alice.liu@apple.com>
1289
1290         Reviewed by Gavin Barraclough.
1291
1292         https://bugs.webkit.org/show_bug.cgi?id=55442
1293         Webarchives don't contain subframe content
1294
1295         * WebProcess/WebPage/WebPage.cpp:
1296         (WebKit::WebPage::getWebArchiveOfFrame):
1297         Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
1298
1299 2011-02-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
1300
1301         Reviewed by Kenneth Rohde Christiansen.
1302
1303         [Qt][WK2] Add a way to test the WebKit 2 APIs
1304         https://bugs.webkit.org/show_bug.cgi?id=55408
1305
1306         Add an initial test for the WebKit 2 APIs of Qt.
1307
1308         * UIProcess/API/qt/tests/html/basic_page.html: Added.
1309         * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
1310         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
1311         (View::View):
1312         (View::resizeEvent):
1313         (tst_QGraphicsWKView::init):
1314         (tst_QGraphicsWKView::cleanup):
1315         (tst_QGraphicsWKView::loadEmptyPage):
1316         * UIProcess/API/qt/tests/tests.pri: Added.
1317         * UIProcess/API/qt/tests/tests.pro: Added.
1318         * UIProcess/API/qt/tests/util.h: Added.
1319         (waitForSignal):
1320
1321 2011-02-28  Anders Carlsson  <andersca@apple.com>
1322
1323         Fix clang build.
1324
1325         * UIProcess/API/mac/FindIndicatorWindow.mm:
1326         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1327         (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
1328         (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
1329         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1330         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1331         (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
1332         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1333         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1334
1335 2011-02-28  Dan Bernstein  <mitz@apple.com>
1336
1337         Rubber-stamped by Anders Carlsson.
1338
1339         Do not copy config.h into WebKit2.
1340
1341         * WebKit2.xcodeproj/project.pbxproj:
1342
1343 2011-02-28  Dan Bernstein  <mitz@apple.com>
1344
1345         LLVM Compiler build fix.
1346
1347         * Scripts/webkit2/messages.py:
1348         * UIProcess/WebPageProxy.h:
1349
1350 2011-02-28  Anders Carlsson  <andersca@apple.com>
1351
1352         Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
1353
1354         Open PDF in Preview doesn't work
1355         https://bugs.webkit.org/show_bug.cgi?id=55400
1356         <rdar://problem/8750353>
1357
1358         * UIProcess/API/mac/PDFViewController.mm:
1359         (-[WKPDFView initWithFrame:PDFViewController:]):
1360         Set the WKPDFView as the delegate of itself.
1361
1362         (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
1363         Call PDFViewController::openPDFInFinder.
1364
1365         (WebKit::PDFViewController::PDFViewController):
1366         Initialize m_hasWrittenPDFToDisk to false.
1367
1368         (WebKit::PDFViewController::openPDFInFinder):
1369         Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
1370         
1371         (WebKit::temporaryPDFDirectoryPath):
1372         Create a directory to put PDFs in.
1373
1374         (WebKit::PDFViewController::pathToPDFOnDisk):
1375         Return a path to a (non-existent) file in the temporary PDF directory.
1376
1377 2011-02-28  Alexey Proskuryakov  <ap@apple.com>
1378
1379         Reviewed by Dan Bernstein.
1380
1381         Frequent crashes in CFURLCache code on Snow Leopard
1382         https://bugs.webkit.org/show_bug.cgi?id=55412
1383         <rdar://problem/9063922>
1384
1385         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
1386         creates a string with maximum possible buffer size. A path with garbage at the end confused
1387         CFURLCache into corrupting its data structures.
1388
1389         * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
1390         This problem wouldn't have occured if we didn't use CString in the first place.
1391
1392         * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
1393         Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
1394         have liked trailing slash).
1395
1396         * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
1397         Made slash removal conditional for robustness.
1398
1399         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
1400         Use actual string length, not CString::length().
1401
1402 2011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
1403
1404         Reviewed by Anders Carlsson.
1405
1406         [Qt][WK2] Plugin initialization
1407         https://bugs.webkit.org/show_bug.cgi?id=48127
1408
1409         Specialize the way of initializing the plugin for X11.
1410         Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
1411         across platforms.
1412
1413         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1414         (WebKit::NetscapePluginModule::tryLoad):
1415         * config.h:
1416
1417 2011-02-28  Sam Weinig  <sam@webkit.org>
1418
1419         Reviewed by Brady Eidson.
1420
1421         WK2 Context Menus - Implement LookUpInDictionary
1422         https://bugs.webkit.org/show_bug.cgi?id=55405
1423
1424         * Shared/DictionaryPopupInfo.cpp:
1425         (WebKit::DictionaryPopupInfo::encode):
1426         (WebKit::DictionaryPopupInfo::decode):
1427         * Shared/DictionaryPopupInfo.h:
1428         Add type to differentiate between HotKey and ContextMenu triggered
1429         dictionary popups. This is necessary since HotKey triggered ones want
1430         to override the style to always be overlay.
1431
1432         * UIProcess/API/mac/PageClientImpl.mm:
1433         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1434         Only force the overlay style for HotKey triggered dictionary lookups.
1435
1436         * WebProcess/WebPage/WebPage.h:
1437         * WebProcess/WebPage/mac/WebPageMac.mm:
1438         (WebKit::WebPage::performDictionaryLookupAtLocation):
1439         (WebKit::WebPage::performDictionaryLookupForRange):
1440         Factor out shared functionality into performDictionaryLookupForRange.
1441
1442         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1443         (WebKit::WebContextMenuClient::lookUpInDictionary):
1444         Get selected range and call newly factored out performDictionaryLookupForRange.
1445
1446 2011-02-28  Anders Carlsson  <andersca@apple.com>
1447
1448         Reviewed by Dan Bernstein.
1449
1450         PDFViewController should hold a reference to the PDF data
1451         https://bugs.webkit.org/show_bug.cgi?id=55394
1452
1453         * UIProcess/API/mac/PDFViewController.h:
1454         * UIProcess/API/mac/PDFViewController.mm:
1455         (WebKit::PDFViewController::setPDFDocumentData):
1456
1457 2011-02-28  Sam Weinig  <sam@webkit.org>
1458
1459         Reviewed by Darin Adler.
1460
1461         Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
1462         https://bugs.webkit.org/show_bug.cgi?id=48234
1463
1464         * Shared/TextInfo.cpp: Removed.
1465         * Shared/TextInfo.h: Removed.
1466         Replace this with the more appropriately DictionaryPopupInfo.
1467
1468         * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
1469         (WebKit::DictionaryPopupInfo::encode):
1470         (WebKit::DictionaryPopupInfo::decode):
1471         * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
1472         (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
1473         Replace individual font related fields with FontInfo.
1474
1475         * Shared/FontInfo.cpp: Added.
1476         (WebKit::FontInfo::FontInfo):
1477         (WebKit::FontInfo::encode):
1478         (WebKit::FontInfo::decode):
1479         * Shared/FontInfo.h: Added.
1480         Add class to encapsulate passing a font description over the wire.
1481
1482         * Shared/PlatformPopupMenuData.cpp:
1483         (WebKit::PlatformPopupMenuData::encode):
1484         (WebKit::PlatformPopupMenuData::decode):
1485         * Shared/PlatformPopupMenuData.h:
1486         Add FontInfo as extra data for the Mac.
1487
1488         * UIProcess/API/mac/PageClientImpl.h:
1489         * UIProcess/API/mac/PageClientImpl.mm:
1490         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1491         * UIProcess/PageClient.h:
1492         Add scaleFactor and use it to construct a font at the right size.
1493
1494         * UIProcess/WebPageProxy.cpp:
1495         (WebKit::WebPageProxy::showPopupMenu):
1496         (WebKit::WebPageProxy::didPerformDictionaryLookup):
1497         * UIProcess/WebPageProxy.h:
1498         * UIProcess/WebPageProxy.messages.in:
1499         * UIProcess/WebPopupMenuProxy.h:
1500         * UIProcess/mac/WebPopupMenuProxyMac.h:
1501         (WebKit::WebPopupMenuProxyMac::create):
1502         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1503         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
1504         (WebKit::WebPopupMenuProxyMac::populate):
1505         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
1506         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
1507         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
1508         * UIProcess/qt/WebPopupMenuProxyQt.h:
1509         * UIProcess/win/WebPopupMenuProxyWin.cpp:
1510         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
1511         * UIProcess/win/WebPopupMenuProxyWin.h:
1512         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
1513         (WebKit::WebPopupMenu::setUpPlatformData):
1514         * WebProcess/WebPage/mac/WebPageMac.mm:
1515         (WebKit::WebPage::performDictionaryLookupAtLocation):
1516         Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
1517
1518         * WebKit2.pro:
1519         * WebKit2.xcodeproj/project.pbxproj:
1520         * win/WebKit2.vcproj:
1521         Add new files.
1522
1523 2011-02-28  Adam Roben  <aroben@apple.com>
1524
1525         One more rename as a followup to r79868
1526
1527         Rubber-stamped by Anders Carlsson.
1528
1529         * UIProcess/DrawingAreaProxyImpl.cpp:
1530         * UIProcess/DrawingAreaProxyImpl.h:
1531         Rename stateDidChange to backingStoreStateDidChange.
1532
1533 2011-02-28  Adam Roben  <aroben@apple.com>
1534
1535         Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
1536
1537         Rubber-stamped (and suggested) by Anders Carlsson.
1538
1539         * UIProcess/DrawingAreaProxy.h:
1540         * UIProcess/DrawingAreaProxy.messages.in:
1541         * UIProcess/DrawingAreaProxyImpl.cpp:
1542         * UIProcess/DrawingAreaProxyImpl.h:
1543         * WebProcess/WebPage/DrawingArea.h:
1544         * WebProcess/WebPage/DrawingArea.messages.in:
1545         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1546         * WebProcess/WebPage/DrawingAreaImpl.h:
1547         Perform the rename.
1548
1549 2011-02-28  Adam Roben  <aroben@apple.com>
1550
1551         Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
1552
1553         The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
1554         DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
1555         store. (Currently, this is just when the size changes.) This function will sometimes (but
1556         not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
1557         to the web process. This means it's now possible for the state IDs sent in consecutive
1558         UpdateState messages to increase by more than one, but that's OK.
1559
1560         This should cause no change in behavior.
1561
1562         Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
1563         its state changes, not just when we send an UpdateState message
1564
1565         Reviewed by Anders Carlsson.
1566
1567         * UIProcess/DrawingAreaProxyImpl.cpp:
1568         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
1569         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
1570         (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
1571         sendUpdateState whenever our state has changed for any reason since the last UpdateState
1572         message was sent.
1573         (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
1574         through to sendUpdateState.
1575         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
1576         the state ID we send to the web process from here to stateDidChange, and added an assertion.
1577
1578         * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
1579         the comment explaining its meaning.
1580
1581 2011-02-28  Adam Roben  <aroben@apple.com>
1582
1583         Pass the right dirty rect to Plugin::paint
1584
1585         A typo in r79040 broke this. Much of this patch is just support for testing the fix.
1586
1587         Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
1588         Large portions of pages with plugins paint black
1589
1590         Reviewed by Anders Carlsson.
1591
1592         * WebProcess/Plugins/PluginView.cpp:
1593         (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
1594         rather than just passing along the dirty rect that was passed into this function. This is
1595         the bug fix.
1596
1597         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1598         (WKBundlePageForceRepaint):
1599         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1600         Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
1601
1602         * WebProcess/WebPage/WebPage.cpp:
1603         (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
1604         (WebKit::WebPage::forceRepaint): ...from here.
1605
1606         * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
1607
1608 2011-02-27  Sam Weinig  <sam@webkit.org>
1609
1610         Reviewed by Dan Bernstein.
1611
1612         Force dictionary popup to use overlay type
1613         <rdar://problem/9052483>
1614         https://bugs.webkit.org/show_bug.cgi?id=55337
1615
1616         * UIProcess/API/mac/PageClientImpl.mm:
1617         (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
1618         used for the hot key version of the dictionary popup, force the overlay
1619         style.
1620
1621 2011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
1622
1623         Reviewed by Kenneth Rohde Christiansen.
1624
1625         [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
1626         https://bugs.webkit.org/show_bug.cgi?id=55330
1627
1628         Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
1629         on its use.
1630
1631         * UIProcess/API/qt/qgraphicswkview.cpp:
1632         * UIProcess/API/qt/qgraphicswkview.h:
1633
1634 2011-02-27  Alejandro G. Castro  <alex@igalia.com>
1635
1636         Unreviewed, fixed GTK compilation after r79806.
1637
1638         * UIProcess/gtk/WebView.cpp:
1639         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
1640         * UIProcess/gtk/WebView.h:
1641
1642 2011-02-26  Anders Carlsson  <andersca@apple.com>
1643
1644         Reviewed by Dan Bernstein.
1645
1646         Asynchronous response to FramePolicyListener is not finishing the load
1647         https://bugs.webkit.org/show_bug.cgi?id=55305
1648         <rdar://problem/9044356>
1649
1650         Always initialize the receivedPolicyAction reply parameter.
1651
1652         * UIProcess/WebPageProxy.cpp:
1653         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1654         (WebKit::WebPageProxy::decidePolicyForMIMEType):
1655
1656 2011-02-26  Anders Carlsson  <andersca@apple.com>
1657
1658         Reviewed by Sam Weinig.
1659
1660         DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
1661         https://bugs.webkit.org/show_bug.cgi?id=55304
1662
1663         * UIProcess/API/mac/PDFViewController.h:
1664         * UIProcess/API/mac/PDFViewController.mm:
1665         (WebKit::PDFViewController::setPDFDocumentData):
1666         * UIProcess/API/mac/PageClientImpl.h:
1667         * UIProcess/API/mac/PageClientImpl.mm:
1668         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
1669         * UIProcess/API/mac/WKView.mm:
1670         (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
1671         * UIProcess/API/mac/WKViewInternal.h:
1672         * UIProcess/API/qt/qwkpage.cpp:
1673         (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
1674         * UIProcess/API/qt/qwkpage_p.h:
1675         * UIProcess/PageClient.h:
1676         * UIProcess/WebPageProxy.cpp:
1677         (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
1678         * UIProcess/WebPageProxy.h:
1679         * UIProcess/WebPageProxy.messages.in:
1680         * UIProcess/win/WebView.cpp:
1681         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
1682         * UIProcess/win/WebView.h:
1683         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1684         (WebKit::WebFrameLoaderClient::finishedLoading):
1685
1686 2011-02-26  Anders Carlsson  <andersca@apple.com>
1687
1688         Reviewed by Oliver Hunt.
1689
1690         DrawingArea should not be reference counted
1691         https://bugs.webkit.org/show_bug.cgi?id=55284
1692
1693         * Shared/DrawingAreaInfo.h:
1694         * Shared/WebPageCreationParameters.cpp:
1695         (WebKit::WebPageCreationParameters::encode):
1696         (WebKit::WebPageCreationParameters::decode):
1697         * Shared/WebPageCreationParameters.h:
1698         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1699         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
1700         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
1701         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
1702         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
1703         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1704         * UIProcess/DrawingAreaProxy.cpp:
1705         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1706         * UIProcess/DrawingAreaProxy.h:
1707         (WebKit::DrawingAreaProxy::type):
1708         * UIProcess/DrawingAreaProxyImpl.cpp:
1709         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
1710         * UIProcess/DrawingAreaProxyImpl.h:
1711         * UIProcess/TiledDrawingAreaProxy.cpp:
1712         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
1713         * UIProcess/TiledDrawingAreaProxy.h:
1714         * UIProcess/WebPageProxy.cpp:
1715         (WebKit::WebPageProxy::didReceiveSyncMessage):
1716         (WebKit::WebPageProxy::creationParameters):
1717         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
1718         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1719         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
1720         (WebKit::ChunkedUpdateDrawingArea::display):
1721         (WebKit::ChunkedUpdateDrawingArea::setSize):
1722         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
1723         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1724         * WebProcess/WebPage/DrawingArea.cpp:
1725         (WebKit::DrawingArea::create):
1726         (WebKit::DrawingArea::DrawingArea):
1727         * WebProcess/WebPage/DrawingArea.h:
1728         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1729         (WebKit::DrawingAreaImpl::create):
1730         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1731         * WebProcess/WebPage/DrawingAreaImpl.h:
1732         * WebProcess/WebPage/TiledDrawingArea.cpp:
1733         (WebKit::TiledDrawingArea::TiledDrawingArea):
1734         * WebProcess/WebPage/TiledDrawingArea.h:
1735         * WebProcess/WebPage/WebPage.cpp:
1736         (WebKit::WebPage::drawRect):
1737         * WebProcess/WebPage/WebPage.h:
1738
1739 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
1740
1741         Reviewed by Pavel Feldman.
1742
1743         DumpRenderTree should reset frame opener between tests.
1744         https://bugs.webkit.org/show_bug.cgi?id=54874
1745
1746         Added clearOpener method to WKBundleWebFramePrivate.
1747
1748         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1749         (WKBundleFrameClearOpener):
1750         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1751
1752 2011-02-26  Yael Aharon  <yael.aharon@nokia.com>
1753
1754         Reviewed by Andreas Kling.
1755
1756         [Qt] Fix the focus in MiniBrowser.
1757         https://bugs.webkit.org/show_bug.cgi?id=55288
1758
1759         Implement basic functionality for focus in QWKPagePrivate.
1760
1761         * UIProcess/API/qt/qwkpage.cpp:
1762         (QWKPagePrivate::isViewWindowActive):
1763         (QWKPagePrivate::isViewFocused):
1764         (QWKPagePrivate::isViewVisible):
1765
1766 2011-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1767
1768         Unreviewed, rolling out r79764.
1769         http://trac.webkit.org/changeset/79764
1770         https://bugs.webkit.org/show_bug.cgi?id=55295
1771
1772         "broke Chromium builds" (Requested by rniwa on #webkit).
1773
1774         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1775         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1776
1777 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
1778
1779         Reviewed by Pavel Feldman.
1780
1781         DumpRenderTree should reset frame opener between tests.
1782         https://bugs.webkit.org/show_bug.cgi?id=54874
1783
1784         Added clearOpener method to WKBundleWebFramePrivate.
1785
1786         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1787         (WKBundleFrameClearOpener):
1788         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1789
1790 2011-02-25  Anders Carlsson  <andersca@apple.com>
1791
1792         Reviewed by Darin Adler.
1793
1794         Plug-in process crashes when using GuardMalloc
1795         https://bugs.webkit.org/show_bug.cgi?id=55279
1796         <rdar://problem/9044618>
1797
1798         Update m_environmentPointer after copying the environment variables.
1799         
1800         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1801         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
1802
1803 2011-02-25  Darin Adler  <darin@apple.com>
1804
1805         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1806         (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.
1807
1808 2011-02-25  Darin Adler  <darin@apple.com>
1809
1810         Reviewed by Mark Rowe.
1811
1812         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1813         (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
1814         builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.
1815
1816 2011-02-25  Darin Adler  <darin@apple.com>
1817
1818         Reviewed by Anders Carlsson.
1819
1820         <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set
1821
1822         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1823         (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
1824         the strings here because they are allocated with fastMalloc, not new.
1825         (WebKit::EnvironmentVariables::set): Use const more.
1826         (WebKit::EnvironmentVariables::get): Ditto.
1827         (WebKit::EnvironmentVariables::appendValue): Ditto.
1828         (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
1829         where this would match if the name matched only a prefix of the environment variable's
1830         name. We want to match the whole name, so we need to use memcmp, not strncmp.
1831         (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
1832         (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
1833         for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
1834         ensuring we can pick up other frameworks from the same directory in the web process.
1835         Use a const_cast instead of a C-style cast.
1836
1837 2011-02-25  Chris Fleizach  <cfleizach@apple.com>
1838
1839         Reviewed by Anders Carlsson.
1840
1841         AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
1842         https://bugs.webkit.org/show_bug.cgi?id=55277
1843
1844         * UIProcess/API/mac/WKView.mm:
1845         (-[WKView accessibilityFocusedUIElement]):
1846
1847 2011-02-25  Alexey Proskuryakov  <ap@apple.com>
1848
1849         Reviewed by Anders Carlsson.
1850
1851         https://bugs.webkit.org/show_bug.cgi?id=55276
1852         WebPage::close() accesses "this" after it is destroyed.
1853
1854         This was making many tests crash with GuardMalloc.
1855
1856         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
1857         destroyed, not after.
1858
1859 2011-02-25  Balazs Kelemen  <kbalazs@webkit.org>
1860
1861         Unreviewed.
1862         Add missing sources to WebKit2API.pri.
1863
1864         * WebKit2API.pri:
1865
1866 2011-02-25  Anders Carlsson  <andersca@apple.com>
1867
1868         Reviewed by Darin Adler.
1869
1870         A WKView without a window will cause CG errors in the console
1871         https://bugs.webkit.org/show_bug.cgi?id=55264
1872         <rdar://problem/9044281>
1873
1874         Check that the window has a valid window number before trying to get its graphics context.
1875
1876         * UIProcess/API/mac/PageClientImpl.mm:
1877         (WebKit::PageClientImpl::containingWindowGraphicsContext):
1878
1879 2011-02-25  Brian Weinstein  <bweinstein@apple.com>
1880
1881         Reviewed by Brady Eidson and looked over by Jessie Berlin.
1882
1883         WebKit2: Need a way to manage cookies from the web process
1884         https://bugs.webkit.org/show_bug.cgi?id=55086
1885         
1886         Call through to WebCore::CookieJar in our WebCookieManager functions.
1887
1888         * WebProcess/Cookies/WebCookieManager.cpp:
1889         (WebKit::WebCookieManager::getHostnamesWithCookies):
1890         (WebKit::WebCookieManager::deleteCookiesForHostname):
1891         (WebKit::WebCookieManager::deleteAllCookies):
1892
1893 2011-02-25  Anders Carlsson  <andersca@apple.com>
1894
1895         Reviewed by Sam Weinig.
1896
1897         Option-clicking on links doesn't download them due to sandbox violation
1898         https://bugs.webkit.org/show_bug.cgi?id=55250
1899         <rdar://problem/9018359>
1900
1901         The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
1902         decided policy was "Download". Fix this by passing along the download ID back to the web process.
1903
1904         * Platform/CoreIPC/HandleMessage.h:
1905         (CoreIPC::callMemberFunction):
1906         Add new overload.
1907
1908         * UIProcess/WebPageProxy.cpp:
1909         (WebKit::WebPageProxy::WebPageProxy):
1910         Initialize m_syncNavigationActionPolicyDownloadID.
1911
1912         (WebKit::WebPageProxy::receivedPolicyDecision):
1913         Set m_syncNavigationActionPolicyDownloadID to the download ID.
1914
1915         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1916         Return the m_syncNavigationActionPolicyDownloadID.
1917
1918         * UIProcess/WebPageProxy.h:
1919         * UIProcess/WebPageProxy.messages.in:
1920         Add a DownloadID reply parameter.
1921
1922         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1923         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1924         Don't pass a zero download ID to didReceivePolicyDecision.
1925
1926 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1927
1928         Reviewed by Martin Robinson.
1929
1930         [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
1931         https://bugs.webkit.org/show_bug.cgi?id=48510
1932
1933         * GNUmakefile.am:
1934         * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
1935         and constructors, in our case we need it because we use a pointer
1936         and copy the event.
1937         (WebKit::NativeWebKeyboardEvent::nativeEvent):
1938         * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
1939         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
1940         to copy the event in the constructor to avoid two references to
1941         the same event.
1942         * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
1943         functions to add const, we need it for the NativeWebKeyboardEvent
1944         constructor.
1945         (WebKit::modifiersForEvent):
1946         (WebKit::WebEventFactory::createWebKeyboardEvent):
1947         * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
1948         for GTK port. Yet to implement.
1949         (WebKit::WebContext::applicationCacheDirectory):
1950         (WebKit::WebContext::platformInitializeWebProcess):
1951         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1952         * UIProcess/gtk/WebView.cpp:
1953         (WebKit::WebView::handleKeyboardEvent):
1954
1955 2011-02-25  Anders Carlsson  <andersca@apple.com>
1956
1957         Reviewed by Sam Weinig.
1958
1959         Get rid of more old accelerated compositing code
1960         https://bugs.webkit.org/show_bug.cgi?id=55235
1961
1962         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
1963         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1964         * UIProcess/DrawingAreaProxy.h:
1965         * UIProcess/DrawingAreaProxyImpl.cpp:
1966         * UIProcess/DrawingAreaProxyImpl.h:
1967         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1968         * WebProcess/WebPage/DrawingArea.h:
1969         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1970         * WebProcess/WebPage/DrawingAreaImpl.h:
1971
1972 2011-02-25  Andras Becsi  <abecsi@webkit.org>
1973
1974         Reviewed by Csaba Osztrogonác.
1975
1976         [Qt] Make the WebKit2 build system less confusing for non-Qt developers
1977         https://bugs.webkit.org/show_bug.cgi?id=55213
1978
1979         * WebKit2API.pri: Added.
1980
1981 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1982
1983         Reviewed by Martin Robinson.
1984
1985         [GTK] Implement WebView and WebKitWebView classes for WebKit2
1986         https://bugs.webkit.org/show_bug.cgi?id=48509
1987
1988         * GNUmakefile.am:
1989         * UIProcess/API/C/gtk/WKView.cpp:
1990         * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
1991         constructor.
1992         * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
1993         for WebView. The GObject is the GtkWidget handle which is used by
1994         WebView class for GTK port.
1995         * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
1996         declarations for GtkWidget handle for GTK port.
1997         * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
1998         for GTK port which is associated with each WKViewRef.
1999         * UIProcess/gtk/WebView.h: Added. Class which implements the
2000         PageClient interface. It is a wrapper over the native GtkWidget
2001         handle associated with each WKViewRef for GTK port.
2002
2003 2011-02-25  Alejandro G. Castro  <alex@igalia.com>
2004
2005         Fix GTK compilation after r79654.
2006
2007         * GNUmakefile.am:
2008
2009 2011-02-24  Brian Weinstein  <bweinstein@apple.com>
2010
2011         Qt build fix.
2012
2013         * WebKit2.pri:
2014
2015 2011-02-24  Brady Eidson  <beidson@apple.com>
2016
2017         Reviewed by Sam Weinig and looked over by Brian Weinstein.
2018
2019         Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
2020         Need WebKit2 API to view/manage origins with LocalStorage.
2021
2022         Project file stuff:
2023         * GNUmakefile.am:
2024         * WebKit2.pri:
2025         * WebKit2.pro:
2026         * WebKit2.xcodeproj/project.pbxproj:
2027         * win/WebKit2.vcproj:
2028         * win/WebKit2Common.vsprops:
2029         * win/WebKit2Generated.make:
2030
2031         WK2 derived sources and API stuff:
2032         * DerivedSources.make:
2033         * DerivedSources.pro:
2034         * Platform/CoreIPC/MessageID.h:
2035         * Shared/API/c/WKBase.h:
2036         * Shared/APIObject.h:
2037         * UIProcess/API/C/WKAPICast.h:
2038
2039         Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
2040         * UIProcess/WebContext.cpp:
2041         (WebKit::WebContext::WebContext):
2042         (WebKit::WebContext::~WebContext):
2043         (WebKit::WebContext::disconnectProcess):
2044         (WebKit::WebContext::didReceiveMessage):
2045         * UIProcess/WebContext.h:
2046         (WebKit::WebContext::keyValueStorageManagerProxy):
2047
2048         Add API to get the KeyValueStorageManager for a context:
2049         * UIProcess/API/C/WKContext.cpp:
2050         (WKContextGetKeyValueStorageManager):
2051         * UIProcess/API/C/WKContext.h:
2052
2053         Route messages to the right place:
2054         * UIProcess/WebProcessProxy.cpp:
2055         (WebKit::WebProcessProxy::didReceiveMessage):
2056         * WebProcess/WebProcess.cpp:
2057         (WebKit::WebProcess::didReceiveMessage):
2058
2059         Add the API object, which wraps to WebKeyValueStorageManagerProxy:
2060         * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
2061         (WKKeyValueStorageManagerGetTypeID):
2062         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
2063         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
2064         (WKKeyValueStorageManagerDeleteAllEntries):
2065         * UIProcess/API/C/WKKeyValueStorageManager.h: Added.
2066
2067         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
2068         * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
2069         (WebKit::WebKeyValueStorageManagerProxy::create):
2070         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
2071         (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
2072         (WebKit::WebKeyValueStorageManagerProxy::invalidate):
2073         (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
2074         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
2075         (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
2076         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
2077         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
2078         * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
2079         (WebKit::WebKeyValueStorageManagerProxy::clearContext):
2080         (WebKit::WebKeyValueStorageManagerProxy::type):
2081         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.
2082
2083         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
2084         * WebProcess/KeyValueStorage: Added.
2085         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
2086         (WebKit::WebKeyValueStorageManager::shared):
2087         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
2088         (WebKit::WebKeyValueStorageManager::didReceiveMessage):
2089         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2090         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2091         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2092         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
2093         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.
2094
2095 2011-02-24  Darin Adler  <darin@apple.com>
2096
2097         Reviewed by Anders Carlsson.
2098
2099         WebKit2: Image-based cursors do not work
2100         https://bugs.webkit.org/show_bug.cgi?id=55184
2101
2102         * Shared/ShareableBitmap.h: Added releaseData function
2103         declaration. This is only defined for CG, but we can declare
2104         it without defining it on non-CG platforms without causing problems.
2105
2106         * Shared/WebCoreArgumentCoders.cpp: Added.
2107         (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
2108         (CoreIPC::decodeImage): Ditto.
2109
2110         * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
2111         and decoder to handle image-based cursors, using the new encodeImage
2112         and decodeImage functions.
2113
2114         * Shared/cg/ShareableBitmapCG.cpp:
2115         (WebKit::ShareableBitmap::releaseData): Added.
2116         (WebKit::ShareableBitmap::createGraphicsContext): Use
2117         CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
2118         to guarantee we outlast the CGBitmapContext we create.
2119         (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.
2120
2121         * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
2122         (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.
2123
2124         * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
2125         and WebCoreArgumentCodersCG.cpp.
2126         * win/WebKit2.vcproj: Ditto.
2127
2128 2011-02-24  Anders Carlsson  <andersca@apple.com>
2129
2130         Reviewed by Dan Bernstein.
2131
2132         Crash when trying to send a sync message on an invalid connection
2133         https://bugs.webkit.org/show_bug.cgi?id=55190
2134         <rdar://problem/9035806>
2135
2136         * Platform/CoreIPC/Connection.cpp:
2137         (CoreIPC::Connection::sendSyncMessage):
2138         Don't try to call a client function if isValid() returns false since the client
2139         will be null in that case.
2140
2141 2011-02-24  Anders Carlsson  <andersca@apple.com>
2142
2143         Reviewed by Dan Bernstein.
2144
2145         Remove the layer backed drawing area
2146         https://bugs.webkit.org/show_bug.cgi?id=55174
2147
2148         * GNUmakefile.am:
2149         * Shared/DrawingAreaInfo.h:
2150         * UIProcess/API/mac/WKView.mm:
2151         * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
2152         * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
2153         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
2154         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
2155         * UIProcess/win/WebView.cpp:
2156         * WebKit2.xcodeproj/project.pbxproj:
2157         * WebProcess/WebPage/DrawingArea.cpp:
2158         (WebKit::DrawingArea::create):
2159         * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
2160         * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
2161         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
2162         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
2163         * win/WebKit2.vcproj:
2164
2165 2011-02-24  Mike Thole  <mthole@apple.com>
2166
2167         Reviewed by Sam Weinig.
2168
2169         WK2: Add ability to get document node for a WKBundleNodeHandle
2170         https://bugs.webkit.org/post_bug.cgi
2171
2172         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2173         (WKBundleNodeHandleCopyDocument):
2174         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
2175         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2176         (WebKit::InjectedBundleNodeHandle::document):
2177         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2178
2179 2011-02-24  Brady Eidson  <beidson@apple.com>
2180
2181         Reviewed by Adam Roben and looked at by Brian Weinstein.
2182
2183         https://bugs.webkit.org/show_bug.cgi?id=55165
2184         Can call CF API with a null CFArray in WebResourceCacheManager
2185
2186         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2187         (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef, 
2188           so the call to CFArrayGetCount must be null checked.
2189
2190 2011-02-24  Anders Carlsson  <andersca@apple.com>
2191
2192         Reviewed by Simon Fraser.
2193
2194         ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
2195         https://bugs.webkit.org/show_bug.cgi?id=55162
2196         <rdar://problem/9048523>
2197
2198         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2199         (WebKit::DrawingAreaImpl::updateState):
2200         Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
2201         EnterAcceleratedCompositingMode message.
2202
2203         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
2204         setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
2205
2206         * WebProcess/WebPage/LayerTreeHost.h:
2207         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
2208         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2209         (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
2210         Make this take a boolean.
2211
2212 2011-02-24  Peter Kasting  <pkasting@google.com>
2213
2214         Reviewed by Eric Seidel.
2215
2216         Drop the "U; " encryption level from the User Agent string.
2217         https://bugs.webkit.org/show_bug.cgi?id=54566
2218
2219         * UIProcess/gtk/WebPageProxyGtk.cpp:
2220         (WebKit::WebPageProxy::standardUserAgent):
2221         * UIProcess/mac/WebPageProxyMac.mm:
2222         (WebKit::WebPageProxy::standardUserAgent):
2223         * UIProcess/qt/WebPageProxyQt.cpp:
2224         (WebKit::WebPageProxy::standardUserAgent):
2225         * UIProcess/win/WebPageProxyWin.cpp:
2226         (WebKit::WebPageProxy::standardUserAgent):
2227
2228 2011-02-24  Andrew Wilson  <atwilson@chromium.org>
2229
2230         Unreviewed, rolling out r79570.
2231         http://trac.webkit.org/changeset/79570
2232         https://bugs.webkit.org/show_bug.cgi?id=54874
2233
2234         Breaks chromium build because glue/mocks/mock_web_frame.h/cc
2235         was not updated
2236
2237         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2238         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2239
2240 2011-02-23  Brian Weinstein  <bweinstein@apple.com>
2241
2242         Reviewed by Adam Roben and looked over by Jessie Berlin.
2243
2244         Part of WebKit2: Need a way to manage cookies from the web process
2245         https://bugs.webkit.org/show_bug.cgi?id=55086
2246         
2247         This patch adds the plumbing and classes that are needed to manage cookies from the web process.
2248         The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
2249
2250         Project file changes.
2251         * DerivedSources.make:
2252         * DerivedSources.pro:
2253         * GNUmakefile.am:
2254         * WebKit2.pri:
2255         * WebKit2.pro:
2256         * WebKit2.xcodeproj/project.pbxproj:
2257         * win/WebKit2.vcproj:
2258         * win/WebKit2Common.vsprops:
2259         * win/WebKit2Generated.make:
2260
2261         Add some needed plumbing for WebCookieManager{Proxy}.
2262         * Platform/CoreIPC/MessageID.h:
2263         * Shared/API/c/WKBase.h:
2264         * Shared/APIObject.h:
2265         * UIProcess/API/C/WKAPICast.h:
2266
2267         * UIProcess/API/C/WKContext.cpp:
2268         (WKContextGetCookieManager): Gets the cookie manager proxy.
2269         * UIProcess/API/C/WKContext.h:
2270         * UIProcess/API/C/WKCookieManager.cpp: Added.
2271         (WKCookieManagerGetTypeID):
2272         (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
2273         (WKCookieManagerDeleteCookiesForHostname): Ditto.
2274         (WKCookieManagerDeleteAllCookies): Ditto.
2275         * UIProcess/API/C/WKCookieManager.h: Added.
2276
2277         * UIProcess/WebProcessProxy.cpp:
2278         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
2279         * UIProcess/WebContext.cpp:
2280         (WebKit::WebContext::WebContext): Initialize the cookie manager.
2281         (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
2282         (WebKit::WebContext::disconnectProcess): Ditto.
2283         (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
2284         * UIProcess/WebContext.h:
2285         (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
2286         * WebProcess/WebProcess.cpp:
2287         (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
2288
2289         * UIProcess/WebCookieManagerProxy.cpp: Added.
2290         (WebKit::WebCookieManagerProxy::create):
2291         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
2292         (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
2293         (WebKit::WebCookieManagerProxy::invalidate):
2294         (WebKit::WebCookieManagerProxy::didReceiveMessage): 
2295         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
2296         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
2297         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
2298             for the origin.
2299         (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
2300         * UIProcess/WebCookieManagerProxy.h: Added.
2301         (WebKit::WebCookieManagerProxy::clearContext):
2302         (WebKit::WebCookieManagerProxy::type):
2303         * UIProcess/WebCookieManagerProxy.messages.in: Added.
2304
2305         * WebProcess/Cookies: Added.
2306         * WebProcess/Cookies/WebCookieManager.cpp: Added.
2307         (WebKit::WebCookieManager::shared):
2308         (WebKit::WebCookieManager::WebCookieManager):
2309         (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
2310         (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
2311             convert that HashSet to a Vector to send to the UI process.
2312         (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
2313         (WebKit::WebCookieManager::deleteAllCookies): Ditto.
2314         * WebProcess/Cookies/WebCookieManager.h: Added.
2315         * WebProcess/Cookies/WebCookieManager.messages.in: Added.
2316
2317 2011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
2318
2319         Reviewed by Martin Robinson.
2320
2321         [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
2322         https://bugs.webkit.org/show_bug.cgi?id=48510
2323
2324         * GNUmakefile.am:
2325         * Shared/gtk/WebEventFactory.cpp: Added. implementation for
2326         WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
2327         * Shared/gtk/WebEventFactory.h: Added.
2328         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
2329         implementation for GTK port.
2330
2331 2011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>
2332
2333         Reviewed by Alexey Proskuryakov.
2334
2335         DumpRenderTree should reset frame opener between tests.
2336         https://bugs.webkit.org/show_bug.cgi?id=54874
2337
2338         Added clearOpener method to WKBundleWebFramePrivate.
2339
2340         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2341         (WKBundleFrameClearOpener):
2342         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2343
2344 2011-02-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
2345
2346         Reviewed by Eric Seidel.
2347
2348         Support building WebKit with Python 3
2349         https://bugs.webkit.org/show_bug.cgi?id=55038
2350
2351         Update the generator scripts to support Python 3.
2352
2353         * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
2354         sys.stdout to be compatible with Python 2 and 3.
2355         * Scripts/generate-messages-header.py:
2356         * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
2357           to dict.items which is common to Python 2 and 3.
2358
2359 2011-02-24  Andras Becsi  <abecsi@webkit.org>
2360
2361         Reviewed by Laszlo Gombos.
2362
2363         [Qt] MinGW build fails to link
2364         https://bugs.webkit.org/show_bug.cgi?id=55050
2365
2366         Prepend the libraries of subcomponents instead of appending them
2367         to fix the library order according to the dependency of the libraries
2368
2369         * WebKit2.pri:
2370
2371 2011-02-24  Andras Becsi  <abecsi@webkit.org>
2372
2373         Reviewed by Csaba Osztrogonác.
2374
2375         [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
2376         https://bugs.webkit.org/show_bug.cgi?id=47589
2377
2378         In case of file name clashes only generate forwarding header for the current platform.
2379
2380         * Scripts/generate-forwarding-headers.pl:
2381
2382 2011-02-23  Anders Carlsson  <andersca@apple.com>
2383
2384         Reviewed by Sam Weinig.
2385
2386         Remove some of the old accelerated compositing code
2387         https://bugs.webkit.org/show_bug.cgi?id=55084
2388
2389         * UIProcess/API/mac/PageClientImpl.h:
2390         * UIProcess/API/mac/PageClientImpl.mm:
2391         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
2392         * UIProcess/API/mac/WKView.mm:
2393         * UIProcess/API/mac/WKViewInternal.h:
2394         * UIProcess/API/qt/qwkpage_p.h:
2395         * UIProcess/PageClient.h:
2396         * UIProcess/WebPageProxy.cpp:
2397         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
2398         * UIProcess/WebPageProxy.h:
2399         * UIProcess/WebPageProxy.messages.in:
2400         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
2401         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
2402         (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
2403         * UIProcess/win/WebView.cpp:
2404         * UIProcess/win/WebView.h:
2405         * WebProcess/WebPage/WebPage.cpp:
2406         (WebKit::WebPage::enterAcceleratedCompositingMode):
2407         (WebKit::WebPage::exitAcceleratedCompositingMode):
2408         * WebProcess/WebPage/WebPage.h:
2409
2410 2011-02-23  Enrica Casucci  <enrica@apple.com>
2411
2412         Reverting an unintentional change that was part of http://trac.webkit.org/changeset/79494.
2413         Unreviewed.
2414
2415         * WebProcess/WebPage/mac/WebPageMac.mm:
2416         (WebKit::WebPage::interceptEditingKeyboardEvent):
2417
2418 2011-02-18  Enrica Casucci  <enrica@apple.com>
2419
2420         Reviewed by Adam Roben.
2421
2422         Mac OS X Services are not available for selected text in WebKit2 windows.
2423         https://bugs.webkit.org/show_bug.cgi?id=54777
2424         <rdar://problem/8666428>
2425         
2426         This patch adds support for Mac OS X Services in WebKit2 windows.
2427         In WKView we now call registerServicesMenuSendTypes providing the
2428         pasteboard types supported by WebKit and we also implement the two
2429         protocol methods required to validate the send type and write the
2430         content to the pasteboard. Unfortunately, AppKit expects the content
2431         to be available in the pasteboard upon return from writeSelectionToPasteboard and
2432         this is the reason why the call to the WebProcess is synchronous.
2433
2434         * Shared/SelectionState.h:
2435         (WebKit::SelectionState::SelectionState): Extended to include
2436         isContentRichlyEditable
2437         * Shared/mac/PasteboardTypes.h:
2438         * Shared/mac/PasteboardTypes.mm:
2439         (WebKit::PasteboardTypes::forSelection): Added.
2440         * UIProcess/API/mac/WKView.mm:
2441         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Added call
2442         to registerServicesMenuSendTypes.
2443         (-[WKView writeSelectionToPasteboard:types:]): Added.
2444         (-[WKView validRequestorForSendType:returnType:]): Added.
2445         * UIProcess/WebPageProxy.cpp:
2446         (WebKit::WebPageProxy::writeSelectionToPasteboard):
2447         * UIProcess/WebPageProxy.h:
2448         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2449         (WebKit::WebEditorClient::respondToChangedSelection): Modified to
2450         support the new SelectionState value.
2451         * WebProcess/WebPage/WebPage.h:
2452         * WebProcess/WebPage/WebPage.messages.in:
2453         * WebProcess/WebPage/mac/WebPageMac.mm:
2454         (WebKit::WebPage::writeSelectionToPasteboard): Added synchronous
2455         message to write the selected content to the pasteboard.
2456
2457 2011-02-23  Anders Carlsson  <andersca@apple.com>
2458
2459         Reviewed by Sam Weinig.
2460
2461         Add a ShareableBitmap::create overload that takes an existing SharedMemory object
2462         https://bugs.webkit.org/show_bug.cgi?id=55081
2463
2464         * Shared/ShareableBitmap.cpp:
2465         (WebKit::ShareableBitmap::createShareable):
2466         (WebKit::ShareableBitmap::create):
2467         * Shared/ShareableBitmap.h:
2468
2469 2011-02-23  Anders Carlsson  <andersca@apple.com>
2470
2471         Reviewed by Dan Bernstein.
2472
2473         Web Inspector toolbar looks bad in WebKit2
2474         https://bugs.webkit.org/show_bug.cgi?id=55076
2475         <rdar://problem/8866258>
2476
2477         * UIProcess/API/mac/WKView.mm:
2478         (-[WKView mouseDownCanMoveWindow]):
2479         Return NO from mouseDownCanMoveWindow to prevent drags in the (now transparent) inspector WKView
2480         from dragging the window around.
2481
2482         * UIProcess/mac/WebInspectorProxyMac.mm:
2483         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
2484         Call [WKView setDrawsBackground:NO].
2485
2486 2011-02-23  Sam Weinig  <sam@webkit.org>
2487
2488         Reviewed by Anders Carlsson.
2489
2490         Remove WKPageForceRepaintWithInvalidation and instead make WKPageForceRepaint
2491         always dirty the entire page.
2492
2493         * Shared/ForceRepaintFlags.h: Removed.
2494         * UIProcess/API/C/WKPage.cpp:
2495         (WKPageForceRepaint):
2496         * UIProcess/API/C/WKPage.h:
2497         * UIProcess/WebPageProxy.cpp:
2498         (WebKit::WebPageProxy::forceRepaint):
2499         * UIProcess/WebPageProxy.h:
2500         * WebKit2.pro:
2501         * WebKit2.xcodeproj/project.pbxproj:
2502         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2503         (WebKit::DrawingAreaImpl::forceRepaint):
2504         * WebProcess/WebPage/WebPage.cpp:
2505         (WebKit::WebPage::forceRepaint):
2506         * WebProcess/WebPage/WebPage.h:
2507         * WebProcess/WebPage/WebPage.messages.in:
2508         * win/WebKit2.vcproj:
2509
2510 2011-02-23  Anders Carlsson  <andersca@apple.com>
2511
2512         Reviewed by Sam Weinig.
2513
2514         Race condition when creating and destroying pages quickly
2515         https://bugs.webkit.org/show_bug.cgi?id=55061
2516         <rdar://problem/8708435>
2517
2518         When the last page in a web process is closed, the web process would
2519         previously terminate, even if the UI process had created a new page
2520         (the CreateNewPage message just wouldn't have reached the web process yet).
2521
2522         Fix this by adding a ShouldTerminate message that the web process sends when it's
2523         about to terminate. If the UI process has any pending pages, downloads etc. it will
2524         prevent the web process from terminating. Otherwise, it will immmediately disconnect
2525         the WebPageProxy so that creating a page after that will launch a new web process.
2526
2527         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2528         (WebKit::WebPluginSiteDataManager::shouldTerminate):
2529         * UIProcess/Plugins/WebPluginSiteDataManager.h:
2530         * UIProcess/WebContext.cpp:
2531         (WebKit::WebContext::shouldTerminate):
2532         (WebKit::WebContext::disconnectProcess):
2533         * UIProcess/WebContext.h:
2534         * UIProcess/WebProcessProxy.cpp:
2535         (WebKit::WebProcessProxy::disconnect):
2536         (WebKit::WebProcessProxy::didReceiveSyncMessage):
2537         (WebKit::WebProcessProxy::didClose):
2538         (WebKit::WebProcessProxy::shouldTerminate):
2539         * UIProcess/WebProcessProxy.h:
2540         * UIProcess/WebProcessProxy.messages.in:
2541         * WebProcess/WebProcess.cpp:
2542         (WebKit::WebProcess::terminateIfPossible):
2543
2544 2011-02-23  Mike Thole  <mthole@apple.com>
2545
2546         Reviewed by Darin Adler.
2547
2548         WKBundleNavigationAction.h should be exposed as a public header
2549         https://bugs.webkit.org/show_bug.cgi?id=55059
2550
2551         * WebKit2.xcodeproj/project.pbxproj:
2552         Changed WKBundleNavigationAction.h from 'project' to 'public'.
2553
2554 2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
2555
2556         Reviewed by Laszlo Gombos.
2557
2558         [Qt] Make sure Symbian binary UIDs are unique
2559
2560         * WebProcess.pro: Resolve the UID collision with QtTestBrowser.pro
2561         by changing the UID.
2562
2563 2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
2564
2565         Reviewed by Laszlo Gombos.
2566
2567         [Qt] Fix the Symbian build after r79334
2568         https://bugs.webkit.org/show_bug.cgi?id=55044
2569
2570         * WebKit2.pri: Copy the rules from JavaScriptCore.pri for
2571         defineTest().
2572
2573         Remove addWebKit2LibWholeArchive as it is no longer needed.
2574
2575 2011-02-23  Alejandro G. Castro  <alex@igalia.com>
2576
2577         Unreviewed, fixed GTK WebKit2 compilation after r79366.
2578
2579         * GNUmakefile.am:
2580
2581 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
2582
2583         Reviewed by Darin Adler.
2584
2585         Rename PLATFORM(CF) to USE(CF)
2586         https://bugs.webkit.org/show_bug.cgi?id=53540
2587
2588         * UIProcess/WebBackForwardList.h:
2589         * UIProcess/WebPageProxy.cpp:
2590         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2591         (WebKit::formatLocalizedString):
2592
2593 2011-02-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
2594
2595         Reviewed by Andreas Kling.
2596
2597         [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
2598         https://bugs.webkit.org/show_bug.cgi?id=54996
2599
2600         Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
2601         is empty/contain only disabled elements.
2602
2603         * UIProcess/API/qt/qgraphicswkview.cpp:
2604         (QGraphicsWKView::showContextMenu):
2605         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2606         (WebKit::WebContextMenuProxyQt::showContextMenu):
2607
2608 2011-02-22  Dan Bernstein  <mitz@apple.com>
2609
2610         LLVM Compiler build fix.
2611
2612         * Scripts/webkit2/messages.py:
2613         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
2614
2615 2011-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2616
2617         Reviewed by Alexey Proskuryakov.
2618
2619         Drop the language tag part from the User Agent string
2620         https://bugs.webkit.org/show_bug.cgi?id=54560
2621
2622         * UIProcess/gtk/WebPageProxyGtk.cpp:
2623         (WebKit::WebPageProxy::standardUserAgent):
2624
2625         * UIProcess/mac/WebPageProxyMac.mm:
2626         (WebKit::WebPageProxy::standardUserAgent):
2627
2628         * UIProcess/qt/WebPageProxyQt.cpp:
2629         (WebKit::WebPageProxy::standardUserAgent):
2630
2631         * UIProcess/win/WebPageProxyWin.cpp:
2632         (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
2633         part and fix style.
2634
2635 2011-02-22  Sam Weinig  <sam@webkit.org>
2636
2637         Reviewed by Anders Carlsson.
2638
2639         Add WebKit2 API to force a repaint with an invalidation
2640         https://bugs.webkit.org/show_bug.cgi?id=55015
2641
2642         * Shared/ForceRepaintFlags.h: Added.
2643         * UIProcess/API/C/WKPage.cpp:
2644         (WKPageForceRepaint):
2645         (WKPageForceRepaintWithInvalidation):
2646         * UIProcess/API/C/WKPage.h:
2647         Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
2648         but also calls setNeedsDisplay on the entire bounds of the page.
2649
2650         * UIProcess/WebPageProxy.cpp:
2651         (WebKit::WebPageProxy::forceRepaint):
2652         * UIProcess/WebPageProxy.h:
2653         * WebProcess/WebPage/WebPage.cpp:
2654         (WebKit::WebPage::forceRepaint):
2655         * WebProcess/WebPage/WebPage.h:
2656         * WebProcess/WebPage/WebPage.messages.in:
2657         Pipe the flag down to the WebProcess.
2658
2659         * WebKit2.pro:
2660         * WebKit2.xcodeproj/project.pbxproj:
2661         * win/WebKit2.vcproj:
2662         Add ForceRepaintFlags.h.
2663
2664 2011-02-22  Simon Fraser  <simon.fraser@apple.com>
2665
2666         Reviewed by Dan Bernstein.
2667
2668         <rdar://problem/9039670>
2669         
2670         Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
2671         non-composited content layer if the preference is set.
2672
2673         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
2674         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
2675
2676 2011-02-22  Brady Eidson  <beidson@apple.com>
2677
2678         Fix it Windows-style.
2679
2680         * WebProcess/WebProcess.cpp:
2681         (WebKit::WebProcess::getSitesWithPluginData):
2682         (WebKit::WebProcess::clearPluginSiteData):
2683
2684 2011-02-22  Anders Carlsson  <andersca@apple.com>
2685
2686         Reviewed by Dan Bernstein.
2687
2688         Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
2689         https://bugs.webkit.org/show_bug.cgi?id=55008
2690
2691         * WebProcess/Downloads/DownloadManager.cpp:
2692         (WebKit::DownloadManager::downloadFinished):
2693         * WebProcess/WebProcess.cpp:
2694         (WebKit::WebProcess::removeWebPage):
2695         (WebKit::WebProcess::terminateIfPossible):
2696         (WebKit::WebProcess::getSitesWithPluginData):
2697         * WebProcess/WebProcess.h:
2698         * WebProcess/gtk/WebProcessGtk.cpp:
2699         (WebKit::WebProcess::platformTerminate):
2700         * WebProcess/mac/WebProcessMac.mm:
2701         (WebKit::WebProcess::platformTerminate):
2702         * WebProcess/qt/WebProcessQt.cpp:
2703         (WebKit::WebProcess::platformTerminate):
2704         * WebProcess/win/WebProcessWin.cpp:
2705         (WebKit::WebProcess::platformTerminate):
2706
2707 2011-02-22  Brady Eidson  <beidson@apple.com>
2708
2709         Windows build-fix attempt.
2710
2711         * win/WebKit2Generated.make:
2712
2713 2011-02-22  Csaba Osztrogonác  <ossy@webkit.org>
2714
2715         Unreviewed.
2716
2717         <rdar://problem/8762042> and  https://bugs.webkit.org/show_bug.cgi?id=54514
2718         API to view and delete Application Cache data by origin.
2719
2720         [Qt][WK2] Buildfix after r79364.
2721
2722         * DerivedSources.pro:
2723         * WebKit2.pri:
2724
2725 2011-02-22  Brady Eidson  <beidson@apple.com>
2726
2727         Reviewed by Anders Carlsson and looked over by Brian Weinstein.
2728
2729         <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
2730         API to view and delete Application Cache data by origin.
2731
2732         I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
2733         it's sorting was wrong due to a last minute name change.
2734
2735         Project file changes:
2736         * GNUmakefile.am:
2737         * win/WebKit2.vcproj:
2738         * win/WebKit2Common.vsprops:
2739         * win/WebKit2Generated.make:
2740         * WebKit2.pro:
2741         * WebKit2.xcodeproj/project.pbxproj:
2742
2743         WK2 build-system and API paperwork:
2744         * DerivedSources.make:
2745         * Platform/CoreIPC/MessageID.h:
2746         * Shared/API/c/WKBase.h:
2747         * Shared/APIObject.h:
2748         * UIProcess/API/C/WKAPICast.h:
2749
2750         Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
2751         * Shared/SecurityOriginData.cpp:
2752         (WebKit::performAPICallbackWithSecurityOriginDataVector):
2753         * Shared/SecurityOriginData.h:
2754         * UIProcess/WebResourceCacheManagerProxy.cpp:
2755         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2756
2757         Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
2758         * UIProcess/WebContext.cpp:
2759         (WebKit::WebContext::WebContext):
2760         (WebKit::WebContext::~WebContext):
2761         (WebKit::WebContext::processDidClose):
2762         (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
2763         * UIProcess/WebContext.h:
2764         (WebKit::WebContext::applicationCacheManagerProxy):
2765         (WebKit::WebContext::resourceCacheManagerProxy):
2766
2767         Add API to get the ApplicationCacheManager for a context:
2768         * UIProcess/API/C/WKContext.cpp:
2769         (WKContextGetApplicationCacheManager):
2770         (WKContextGetResourceCacheManager):
2771         * UIProcess/API/C/WKContext.h:
2772
2773         Route messages to the right place:
2774         * UIProcess/WebProcessProxy.cpp:
2775         (WebKit::WebProcessProxy::didReceiveMessage):
2776         * WebProcess/WebProcess.cpp:
2777         (WebKit::WebProcess::didReceiveMessage):
2778
2779         Add the API object, which wraps to WebApplicationCacheManagerProxy:
2780         * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
2781         (WKApplicationCacheManagerGetTypeID):
2782         (WKApplicationCacheManagerGetApplicationCacheOrigins):
2783         (WKApplicationCacheManagerDeleteEntriesForOrigin):
2784         (WKApplicationCacheManagerDeleteAllEntries):
2785         * UIProcess/API/C/WKApplicationCacheManager.h: Added.
2786
2787         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
2788         * UIProcess/WebApplicationCacheManagerProxy.cpp: Added.
2789         (WebKit::WebApplicationCacheManagerProxy::create):
2790         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
2791         (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy):
2792         (WebKit::WebApplicationCacheManagerProxy::invalidate):
2793         (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
2794         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
2795         (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2796         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
2797         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
2798         * UIProcess/WebApplicationCacheManagerProxy.h: Added.
2799         (WebKit::WebApplicationCacheManagerProxy::clearContext):
2800         (WebKit::WebApplicationCacheManagerProxy::type):
2801         * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added.
2802
2803         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
2804         * WebProcess/ApplicationCache: Added.
2805         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added.
2806         (WebKit::WebApplicationCacheManager::shared):
2807         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
2808         (WebKit::WebApplicationCacheManager::didReceiveMessage):
2809         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
2810         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
2811         (WebKit::WebApplicationCacheManager::deleteAllEntries):
2812         * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added.
2813         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added.
2814
2815 2011-02-22  Anders Carlsson  <andersca@apple.com>
2816
2817         Reviewed by Sam Weinig.
2818
2819         Get rid of WebProcessManager
2820         https://bugs.webkit.org/show_bug.cgi?id=55001
2821
2822         WebProcessManager had become a stupid map of WebContext > WebProcess relations,
2823         which isn't really useful since the WebContext already knows about its process.
2824
2825         * Shared/WebURLRequest.cpp:
2826         * UIProcess/API/mac/WKView.mm:
2827         * UIProcess/WebContext.cpp:
2828         (WebKit::WebContext::~WebContext):
2829         (WebKit::WebContext::ensureWebProcess):
2830         (WebKit::WebContext::processDidFinishLaunching):
2831         * UIProcess/WebProcessManager.cpp: Removed.
2832         * UIProcess/WebProcessManager.h: Removed.
2833         * UIProcess/WebProcessProxy.cpp:
2834         (WebKit::WebProcessProxy::didClose):
2835         * WebKit2.pro:
2836         * WebKit2.xcodeproj/project.pbxproj:
2837         * win/WebKit2.vcproj:
2838
2839 2011-02-22  Anders Carlsson  <andersca@apple.com>
2840
2841         Reviewed by Darin Adler.
2842
2843         Get rid of WebProcessManager::getAllWebProcessContexts
2844         https://bugs.webkit.org/show_bug.cgi?id=55000
2845
2846         * Shared/WebURLRequest.cpp:
2847         (WebKit::WebURLRequest::setDefaultTimeoutInterval):
2848         Call WebContext::allContexts instead.
2849
2850         * UIProcess/WebContext.cpp:
2851         * UIProcess/WebContext.h:
2852         Add a vector of WebContext objects. Update it when creating and destroying contexts.
2853
2854         * UIProcess/WebProcessManager.cpp:
2855         * UIProcess/WebProcessManager.h:
2856         Remove WebProcessManager::getAllWebProcessContexts.
2857
2858 2011-02-22  Sam Weinig  <sam@webkit.org>
2859
2860         Reviewed by Anders Carlsson.
2861
2862         Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents
2863         a crash running fast/loader/empty-embed-src-attribute.html. This matches a 
2864         bail out in the default policy delegate in WebKit1.
2865
2866         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2867         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2868
2869 2011-02-22  Anders Carlsson  <andersca@apple.com>
2870
2871         Reviewed by Dan Bernstein.
2872
2873         Grammar correction from Spelling & Grammar window doesn't work
2874         https://bugs.webkit.org/show_bug.cgi?id=54982
2875         <rdar://problem/8940918>
2876
2877         * UIProcess/API/mac/WKView.mm:
2878         (-[WKView isGrammarCheckingEnabled]):
2879         (-[WKView setGrammarCheckingEnabled:]):
2880         Call down to the text checker.
2881
2882         * UIProcess/TextChecker.h:
2883         Add updateSpellingUIWithGrammarString.
2884
2885         * UIProcess/WebPageProxy.cpp:
2886         (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
2887         Call TextChecker::updateSpellingUIWithGrammarString.
2888
2889         * UIProcess/WebPageProxy.messages.in:
2890         Add UpdateSpellingUIWithGrammarString message.
2891
2892         * UIProcess/gtk/TextCheckerGtk.cpp:
2893         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2894         * UIProcess/qt/TextCheckerQt.cpp:
2895         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2896         * UIProcess/win/TextCheckerWin.cpp:
2897         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2898         Add stubs.
2899
2900         * UIProcess/mac/TextCheckerMac.mm:
2901         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2902         Update the spelling panel.
2903
2904         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2905         (WebKit::WebEditorClient::updateSpellingUIWithGrammarString):
2906         Send an UpdateSpellingUIWithGrammarString message to the UI process.
2907
2908 2011-02-22  Balazs Kelemen  <kbalazs@webkit.org>
2909
2910         Reviewed by Anders Carlsson.
2911
2912         notImplemented() should behave identical in WebCore and WebKit2
2913         https://bugs.webkit.org/show_bug.cgi?id=54449
2914
2915         Use NotImplemented.h from WebCore. Initialize logging channels.
2916         Remove the WebKit2 concept of notImplemented().
2917
2918         * Platform/gtk/SharedMemoryGtk.cpp:
2919         * Platform/gtk/WorkQueueGtk.cpp:
2920         * Platform/qt/WorkQueueQt.cpp:
2921         * Platform/win/WorkQueueWin.cpp:
2922         * Shared/NotImplemented.h: Removed.
2923         * Shared/Plugins/NPIdentifierData.cpp:
2924         * Shared/Plugins/NPRemoteObjectMap.cpp:
2925         * Shared/Plugins/NPVariantData.cpp:
2926         * Shared/cairo/ShareableBitmapCairo.cpp:
2927         * Shared/gtk/ShareableBitmapGtk.cpp:
2928         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2929         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2930         * Shared/win/LayerTreeContextWin.cpp:
2931         * UIProcess/API/mac/PageClientImpl.mm:
2932         * UIProcess/API/qt/qwkpage.cpp:
2933         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2934         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2935         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2936         * UIProcess/WebContext.cpp:
2937         (WebKit::WebContext::WebContext):
2938         * UIProcess/WebInspectorProxy.cpp:
2939         * UIProcess/gtk/TextCheckerGtk.cpp:
2940         * UIProcess/gtk/WebInspectorGtk.cpp:
2941         * UIProcess/gtk/WebPreferencesGtk.cpp:
2942         * UIProcess/qt/TextCheckerQt.cpp:
2943         * UIProcess/qt/WebInspectorProxyQt.cpp:
2944         * UIProcess/win/TextCheckerWin.cpp:
2945         * UIProcess/win/WebContextMenuProxyWin.cpp:
2946         * WebKit2.pro:
2947         * WebKit2.xcodeproj/project.pbxproj:
2948         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2949         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2950         * WebProcess/Downloads/mac/DownloadMac.mm:
2951         * WebProcess/Downloads/qt/DownloadQt.cpp:
2952         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2953         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2954         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2955         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2956         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2957         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2958         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2959         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2960         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2961         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2962         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2963         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2964         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2965         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2966         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2967         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2968         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2969         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2970         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2971         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2972         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2973         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2974         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2975         * WebProcess/WebProcess.cpp:
2976         (WebKit::WebProcess::WebProcess):
2977         * WebProcess/gtk/WebProcessGtk.cpp:
2978         * config.h:
2979         * win/WebKit2.vcproj:
2980
2981 2011-02-22  Brian Weinstein  <bweinstein@apple.com>
2982
2983         Rubber-stamped by Brady Eidson.
2984
2985         Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.
2986
2987         * UIProcess/WebContext.cpp:
2988         (WebKit::WebContext::processDidClose):
2989
2990 2011-02-21  Adam Roben  <aroben@apple.com>
2991
2992         Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process
2993
2994         This will be useful for sending repeated messages for the same state ID to the web process.
2995         We don't do this currently, but will need to if we're asked to paint after we've thrown away
2996         our backing store to save memory.
2997
2998         Fixes <http://webkit.org/b/54916> DrawingAreaProxyImpl should keep track of the state ID it
2999         last sent to the web process
3000
3001         Reviewed by Anders Carlsson.
3002
3003         * UIProcess/DrawingAreaProxyImpl.cpp:
3004         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and
3005         reordered member initialization to match the new declaration order.
3006         (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got
3007         from the web process is no newer than the most recent one we requested.
3008         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send
3009         m_requestedStateID instead of a new global stateID.
3010
3011         * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before
3012         other data members. Also beefed the comment explaining m_currentStateID.
3013
3014 2011-02-22  Andras Becsi  <abecsi@webkit.org>
3015
3016         Reviewed by Laszlo Gombos.
3017
3018         [Qt] Redesign the build system
3019         https://bugs.webkit.org/show_bug.cgi?id=51339
3020
3021         Part 2.
3022
3023         Build WebCore as a static library, compile the WebKit API and WebKit2 API
3024         in a final step and link to WebKit2, WebCore and JSC libraries to fix
3025         linking issues resulting from stripped away symbols.
3026
3027         * WebKit2.pri: Add include paths.
3028         * WebKit2.pro: Move include paths to WebKit2.pri and move
3029         the API source to WebKit/qt/QtWebKit.pro
3030
3031 2011-02-22  Benjamin Poulain  <benjamin.poulain@nokia.com>
3032
3033         Reviewed by Kenneth Rohde Christiansen.
3034
3035         [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2
3036         https://bugs.webkit.org/show_bug.cgi?id=54902
3037
3038         Refactor the context menu handling of Qt to make it simpler to manage memory.
3039
3040         WebContextMenuProxyQt uses smart pointer for all the references to menu so
3041         there is no need to delete it explicitely.
3042
3043         Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so
3044         the client can choose to handle the memory, but there is no leak if it does not.
3045
3046         * UIProcess/API/qt/qgraphicswkview.cpp:
3047         (QGraphicsWKView::QGraphicsWKView):
3048         (QGraphicsWKView::showContextMenu):
3049         * UIProcess/API/qt/qgraphicswkview.h:
3050         * UIProcess/API/qt/qwkpage.h:
3051         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3052         (WebKit::WebContextMenuProxyQt::showContextMenu):
3053         (WebKit::WebContextMenuProxyQt::createContextMenu):
3054         * UIProcess/qt/WebContextMenuProxyQt.h:
3055
3056 2011-02-22  Philippe Normand  <pnormand@igalia.com>
3057
3058         Reviewed by Xan Lopez.
3059
3060         [GTK] make distcheck fails
3061         https://bugs.webkit.org/show_bug.cgi?id=54943
3062
3063         Removed reference to NotImplemented.h which was removed.
3064
3065         * GNUmakefile.am:
3066
3067 2011-02-22  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
3068
3069         Reviewed by Kenneth Rohde Christiansen.
3070
3071         [Qt] QtWebProcess should be installed with 'make install'
3072         https://bugs.webkit.org/show_bug.cgi?id=44100
3073
3074         Follow the standard in other project files and allow install
3075         location to be changed with INSTALL_BINS variable.
3076
3077         * WebProcess.pro: Install QtWebProcess.
3078
3079 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
3080
3081         Unreviewed, rolling out r79296.
3082         http://trac.webkit.org/changeset/79296
3083         https://bugs.webkit.org/show_bug.cgi?id=54941
3084
3085         Breaks compilation on SnowLeapard Intel Release (Requested by
3086         kbalazs_ on #webkit).
3087
3088         * Platform/gtk/SharedMemoryGtk.cpp:
3089         * Platform/gtk/WorkQueueGtk.cpp:
3090         * Platform/qt/WorkQueueQt.cpp:
3091         * Platform/win/WorkQueueWin.cpp:
3092         * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
3093         * Shared/Plugins/NPIdentifierData.cpp:
3094         * Shared/Plugins/NPRemoteObjectMap.cpp:
3095         * Shared/Plugins/NPVariantData.cpp:
3096         * Shared/cairo/ShareableBitmapCairo.cpp:
3097         * Shared/gtk/ShareableBitmapGtk.cpp:
3098         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
3099         * Shared/qt/WebCoreArgumentCodersQt.cpp:
3100         * Shared/win/LayerTreeContextWin.cpp:
3101         * UIProcess/API/mac/PageClientImpl.mm:
3102         * UIProcess/API/qt/qwkpage.cpp:
3103         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
3104         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3105         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
3106         * UIProcess/WebContext.cpp:
3107         (WebKit::WebContext::WebContext):
3108         * UIProcess/WebInspectorProxy.cpp:
3109         * UIProcess/gtk/TextCheckerGtk.cpp:
3110         * UIProcess/gtk/WebInspectorGtk.cpp:
3111         * UIProcess/gtk/WebPreferencesGtk.cpp:
3112         * UIProcess/qt/TextCheckerQt.cpp:
3113         * UIProcess/qt/WebInspectorProxyQt.cpp:
3114         * UIProcess/win/TextCheckerWin.cpp:
3115         * UIProcess/win/WebContextMenuProxyWin.cpp:
3116         * WebKit2.pro:
3117         * WebKit2.xcodeproj/project.pbxproj:
3118         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3119         * WebProcess/Downloads/curl/DownloadCurl.cpp:
3120         * WebProcess/Downloads/mac/DownloadMac.mm:
3121         * WebProcess/Downloads/qt/DownloadQt.cpp:
3122         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
3123         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3124         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3125         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3126         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3127         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3128         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
3129         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3130         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3131         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3132         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3133         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3134         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3135         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3136         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3137         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3138         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
3139         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
3140         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3141         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3142         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
3143         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3144         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3145         * WebProcess/WebProcess.cpp:
3146         (WebKit::WebProcess::WebProcess):
3147         * WebProcess/gtk/WebProcessGtk.cpp:
3148         * config.h:
3149         * win/WebKit2.vcproj:
3150
3151 2011-02-16  Balazs Kelemen  <kbalazs@webkit.org>
3152
3153         Reviewed by Anders Carlsson.
3154
3155         notImplemented() should behave identical in WebCore and WebKit2
3156         https://bugs.webkit.org/show_bug.cgi?id=54449
3157
3158         Use NotImplemented.h from WebCore. Initialize logging channels.
3159         Remove the WebKit2 concept of notImplemented().
3160
3161         * Platform/gtk/SharedMemoryGtk.cpp:
3162         * Platform/gtk/WorkQueueGtk.cpp:
3163         * Platform/qt/WorkQueueQt.cpp:
3164         * Platform/win/WorkQueueWin.cpp:
3165         * Shared/NotImplemented.h: Removed.
3166         * Shared/Plugins/NPIdentifierData.cpp:
3167         * Shared/Plugins/NPRemoteObjectMap.cpp:
3168         * Shared/Plugins/NPVariantData.cpp:
3169         * Shared/cairo/ShareableBitmapCairo.cpp:
3170         * Shared/gtk/ShareableBitmapGtk.cpp:
3171         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
3172         * Shared/qt/WebCoreArgumentCodersQt.cpp:
3173         * Shared/win/LayerTreeContextWin.cpp:
3174         * UIProcess/API/qt/qwkpage.cpp:
3175         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
3176         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3177         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
3178         * UIProcess/WebContext.cpp:
3179         (WebKit::WebContext::WebContext):
3180         * UIProcess/WebInspectorProxy.cpp:
3181         * UIProcess/gtk/TextCheckerGtk.cpp:
3182         * UIProcess/gtk/WebInspectorGtk.cpp:
3183         * UIProcess/gtk/WebPreferencesGtk.cpp:
3184         * UIProcess/qt/TextCheckerQt.cpp:
3185         * UIProcess/qt/WebInspectorProxyQt.cpp:
3186         * UIProcess/win/TextCheckerWin.cpp:
3187         * UIProcess/win/WebContextMenuProxyWin.cpp:
3188         * WebKit2.pro:
3189         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
3190         * WebProcess/Downloads/curl/DownloadCurl.cpp:
3191         * WebProcess/Downloads/mac/DownloadMac.mm:
3192         * WebProcess/Downloads/qt/DownloadQt.cpp:
3193         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
3194         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
3195         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
3196         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
3197         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3198         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3199         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
3200         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3201         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3202         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
3203         * WebProcess/WebCoreSupport/WebDragClient.cpp:
3204         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3205         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3206         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
3207         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3208         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3209         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
3210         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
3211         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3212         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3213         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
3214         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
3215         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
3216         * WebProcess/WebProcess.cpp:
3217         (WebKit::WebProcess::WebProcess):
3218         * WebProcess/gtk/WebProcessGtk.cpp:
3219
3220 2011-02-21  Timothy Hatcher  <timothy@apple.com>
3221
3222         Set and update the window title for the Web Inspector in WebKit2.
3223
3224         https://webkit.org/b/50945
3225         rdar://problem/8762410
3226
3227         Reviewed by Adam Roben.
3228
3229         * UIProcess/WebInspectorProxy.cpp:
3230         (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged.
3231         * UIProcess/WebInspectorProxy.h:
3232         * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged.
3233         * UIProcess/mac/WebInspectorProxyMac.mm:
3234         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
3235         * UIProcess/win/WebInspectorProxyWin.cpp:
3236         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
3237         * UIProcess/gtk/WebInspectorGtk.cpp:
3238         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
3239         * UIProcess/qt/WebInspectorProxyQt.cpp:
3240         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
3241         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
3242         (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged.
3243         * WebProcess/WebPage/WebInspector.cpp:
3244         (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message.
3245         * WebProcess/WebPage/WebInspector.h:
3246
3247 2011-02-21  Sam Weinig  <sam@webkit.org>
3248
3249         Reviewed by Anders Carlsson.
3250
3251         Can't paste from 3rd party text editor into WebKit2 window.
3252         <rdar://problem/8978624>
3253
3254         * WebProcess/com.apple.WebProcess.sb:
3255
3256 2011-02-21  Anders Carlsson  <andersca@apple.com>
3257
3258         Reviewed by Dan Bernstein.
3259
3260         Initialize DrawingAreaProxy::m_size
3261         https://bugs.webkit.org/show_bug.cgi?id=54913
3262
3263         This was removed in r76962 since it caused flashes when switching drawing areas due to
3264         entering and exiting composited mode, but since we no longer switch drawing areas we can
3265         put it back.
3266
3267         * UIProcess/DrawingAreaProxy.cpp:
3268         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
3269
3270 2011-02-21  Adam Roben  <aroben@apple.com>
3271
3272         Add some assertions about the state IDs we receive from the web process
3273
3274         Rubber-stamped by Anders Carlsson.
3275
3276         * UIProcess/DrawingAreaProxyImpl.cpp:
3277         (WebKit::DrawingAreaProxyImpl::update):
3278         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
3279         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
3280         Assert that the state ID the web process sent us is no newer than our own state ID.
3281
3282 2011-02-21  Adam Roben  <aroben@apple.com>
3283
3284         Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID".
3285
3286         As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes
3287         all operations performed before that state change to become invalid. Currently, this state
3288         consists of a single piece of data: the view's size. Eventually it will encompass more data
3289         (e.g., the backing store we're drawing into; when we start throwing away the backing store
3290         to save memory, our state will have changed, and any operations that were intended for the
3291         old backing store will have become invalid). r79251 effectively transformed
3292         DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl
3293         sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's
3294         size changes.
3295
3296         This patch is just a set of simple renames to reflect the transformation that r79251
3297         effected. It should not introduce any changes in behavior. The renames are:
3298           - Messages::DrawingArea::SetSize -> UpdateState
3299           - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState
3300           - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID
3301           - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState
3302           - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState
3303           - DrawingAreaImpl::m_inSetSize -> m_inUpdateState
3304           - generateSequenceNumber -> generateStateID
3305           - sequenceNumber -> stateID
3306
3307         Fixes <http://webkit.org/b/54911> DrawingArea[Proxy]Impl's "sequence number" concept should
3308         be renamed to "state ID"
3309
3310         Reviewed by Anders Carlsson.
3311
3312         * UIProcess/DrawingAreaProxy.h:
3313         * UIProcess/DrawingAreaProxy.messages.in:
3314         * UIProcess/DrawingAreaProxyImpl.cpp:
3315         * UIProcess/DrawingAreaProxyImpl.h:
3316         * WebProcess/WebPage/DrawingArea.h:
3317         * WebProcess/WebPage/DrawingArea.messages.in:
3318         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3319         * WebProcess/WebPage/DrawingAreaImpl.h:
3320         Performed the renames described above.
3321
3322 2011-02-21  Alexey Proskuryakov  <ap@apple.com>
3323
3324         Reviewed by Adam Roben.
3325
3326         REGRESSION (WebKit2): HTTP requests time out after 60 seconds
3327         https://bugs.webkit.org/show_bug.cgi?id=54755
3328         <rdar://problem/9006592>
3329
3330         * Shared/API/c/WKURLRequest.cpp:
3331         (WKURLRequestSetDefaultTimeoutInterval):
3332         * Shared/API/c/WKURLRequest.h:
3333         Added an API to set a default timeout interval for requests created from URLs. The API
3334         affects both the UI process and requests created internally by the Web process. Requests
3335         created from NSURLRequest or CFURLRequest take timeout from those.
3336
3337         * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval):
3338         * Shared/WebURLRequest.h:
3339         Pipe the default timeout interval from WKURLRequest down to actual implementation. Since
3340         WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects
3341         NSURLRequest default timeout interval.
3342
3343         * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts):
3344         * UIProcess/WebProcessManager.h:
3345         Added a way to enumerate all contexts running in separate processes.
3346
3347         * Shared/WebProcessCreationParameters.cpp:
3348         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
3349         (WebKit::WebProcessCreationParameters::encode):
3350         (WebKit::WebProcessCreationParameters::decode):
3351         * Shared/WebProcessCreationParameters.h:
3352         (WebKit::WebContext::ensureWebProcess):
3353         (WebKit::WebContext::setDefaultRequestTimeoutInterval):
3354         * UIProcess/WebContext.h:
3355         * WebProcess/WebProcess.cpp:
3356         (WebKit::WebProcess::initializeWebProcess):
3357         (WebKit::WebProcess::setDefaultRequestTimeoutInterval):
3358         * WebProcess/WebProcess.h:
3359         * WebProcess/WebProcess.messages.in:
3360         Use UI process default timeout interval in separate process contexts, too.
3361
3362 2011-02-18  Brian Weinstein  <bweinstein@apple.com>
3363
3364         Reviewed by Adam Roben.
3365
3366         WebResourceCacheManager should be responsible for managing the CFURLCache as well
3367         as the WebCore memory cache.
3368         https://bugs.webkit.org/show_bug.cgi?id=54886
3369         Part of <rdar://problem/8971738>
3370
3371         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3372         (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add
3373             create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache.
3374         (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for
3375             the origin's hostname.
3376         * WebProcess/ResourceCache/WebResourceCacheManager.h:
3377
3378         * WebProcess/ResourceCache/cf: Added.
3379         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added.
3380         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface.
3381         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto.
3382
3383         * win/WebKit2.vcproj: Added new file.
3384         * WebKit2.xcodeproj/project.pbxproj: Ditto.
3385
3386 2011-02-21  Adam Roben  <aroben@apple.com>
3387
3388         Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl
3389
3390         DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed
3391         before that state change to become invalid. When painting, we need to have performed at
3392         least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits
3393         into the view.
3394
3395         Currently, this state consists of a single piece of data: the view's size. Whenever the
3396         state (i.e., size) changes, we tell the web process via the SetSize message, and the web
3397         process lets us know that it has updated to match the new state (i.e., size) via the
3398         DidSetSize message.
3399
3400         When it's time to paint, if we're waiting for the web process to update to match our current
3401         state (i.e., size), we block for a little while hoping to receive a DidSetSize message so
3402         that we can paint up-to-date bits into the window. This can cause us to receive messages
3403         out-of-order; the DidSetSize message will be processed immediately, and any messages that
3404         were sent before the DidSetSize message will be processed later. Since the messages from
3405         before the DidSetSize message correspond to an old state (i.e., size), they are no longer
3406         useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so
3407         we discard them.
3408
3409         The way we identify and discard these messages is by keeping track of a sequence number.
3410         Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to
3411         DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize
3412         message, it records the sequence number that came along with it. If we then later receive
3413         any messages that have a lower sequence number, we know they correspond to an old state
3414         (i.e., size) and can discard them.
3415
3416         This patch moves control of the sequence number to DrawingAreaProxyImpl.
3417         DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize
3418         message. DrawingAreaImpl records this sequence number when it receives the SetSize message,
3419         and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same
3420         as before.
3421
3422         This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a
3423         full backing store update (by incrementing the sequence number) at times other than when the
3424         view's size changes (e.g., after it has thrown away its backing store in order to save
3425         memory).
3426
3427         Fixes <http://webkit.org/b/54907> DrawingAreaProxyImpl should tell DrawingAreaImpl what
3428         sequence number to use
3429
3430         Reviewed by Anders Carlsson.
3431
3432         * UIProcess/DrawingAreaProxyImpl.cpp:
3433         (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp.
3434         (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the
3435         SetSize message.
3436         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a
3437         potential improvement.
3438
3439         * WebProcess/WebPage/DrawingArea.h:
3440         (WebKit::DrawingArea::setSize): Updated to match the message's new parameters.
3441
3442         * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize.
3443
3444         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3445         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber.
3446         (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process.
3447
3448         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
3449         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
3450         (WebKit::DrawingAreaImpl::display):
3451         Send m_sequenceNumber, instead of a new sequence number, back to the UI process.
3452
3453         * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to
3454         match the base class.
3455
3456 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
3457
3458         Reviewed by Sam Weinig.
3459
3460         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
3461
3462         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
3463         containing a pointer to its parent class. These links should reflect the inheritance
3464         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
3465         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
3466         since intervening C++ classes may not have ClassInfo - but would be a potential bug
3467         were ClassInfo were to be added.
3468
3469         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
3470
3471 2011-02-21  Balazs Kelemen  <kbalazs@webkit.org>
3472
3473         Reviewed by Kenneth Rohde Christiansen.
3474
3475         [Qt] Implement WorkQueue::sheduleWorkAfterDelay