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