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