WebKit2: Crash when InjectedBundlePageLoaderClient::willSendRequestForFrame returns...
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
2
3         Reviewed by Maciej Stachowiak.
4
5         WebKit2: Crash when InjectedBundlePageLoaderClient::willSendRequestForFrame returns a null WKURLRequestRef
6         https://bugs.webkit.org/show_bug.cgi?id=53829
7         
8         Store the result of m_client.willSendRequestForFrame in a RefPtr, and null check it before
9         calling resourceRequest() on it.
10
11         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
12         (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
13
14 2011-02-04  Anders Carlsson  <andersca@apple.com>
15
16         Fix build.
17
18         * WebProcess/mac/WebProcessMac.mm:
19
20 2011-02-04  Anders Carlsson  <andersca@apple.com>
21
22         Reviewed by Mark Rowe.
23
24         Link opened in background tab fails to paint when activated if it completes loading before tab is selected
25         https://bugs.webkit.org/show_bug.cgi?id=53827
26         <rdar://problem/8962355>
27
28         * WebProcess/WebPage/DrawingAreaImpl.cpp:
29         (WebKit::DrawingAreaImpl::resumePainting):
30         Invalidate the entire page.
31
32 2011-02-04  Anders Carlsson  <andersca@apple.com>
33
34         Reviewed by Sam Weinig.
35
36         Fix <rdar://problem/8961227> WebKit2 does not work with symlinked home directories.
37
38         * WebProcess/mac/WebProcessMac.mm:
39         (WebKit::WebProcess::platformSetCacheModel):
40         Don't adopt an autoreleased pointer, this would lead to a crash.
41
42         (WebKit::appendSandboxParameterPath):
43         (WebKit::appendSandboxParameterConfPath):
44         (WebKit::initializeSandbox):
45         Clean up the sandbox parameter code and make sure that realpath is called for all parameters.
46
47 2011-02-04  Sam Weinig  <sam@webkit.org>
48
49         Reviewed by Mark Rowe.
50
51         Sandbox violations when visiting a site using HTTP authentication
52         <rdar://problem/8951079> 
53
54         * WebProcess/com.apple.WebProcess.sb:
55
56 2011-02-04  Alexey Proskuryakov  <ap@apple.com>
57
58         Reviewed by Darin Adler.
59
60         https://bugs.webkit.org/show_bug.cgi?id=53823
61         Print layout sometimes seen on screen
62
63         <rdar://problem/8948742> REGRESSION (WebKit2) - When I print a page, I visually see it re-layout
64         <rdar://problem/8899389> REGRESSION(WebKit2): Wrong content can appear when print dialog is up
65
66         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setAutodisplay): Removed a
67         branch that didn't do anything useful.
68
69         * UIProcess/API/mac/WKPrintingView.h:
70         * UIProcess/API/mac/WKPrintingView.mm:
71         (-[WKPrintingView _suspendAutodisplay]):
72         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
73         (-[WKPrintingView _delayedResumeAutodisplay]):
74         (-[WKPrintingView knowsPageRange:]):
75         (-[WKPrintingView beginDocument]):
76         (-[WKPrintingView endDocument]):
77         When page setup changes, or when going from print preview to actual printing, AppKit calls
78         -endDocument just to begin it again. Delay resuming autodisplay until the next run loop
79         iteration.
80
81         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
82         (WebKit::WebChromeClient::invalidateContentsAndWindow):
83         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
84         Tightened it up from other side - we should never send pixels to UI process while in
85         printing mode. This is not 100% reliable, because relayout doesn't happen immediately,
86         and we can still have print layout in screen mode - but it helps.
87
88 2011-02-04  Sam Weinig  <sam@webkit.org>
89
90         Reviewed by Mark Rowe.
91
92         Fix for <rdar://problem/8961580>.
93         Work around for <rdar://problem/8957845>.
94
95         * WebProcess/com.apple.WebProcess.sb:
96
97 2011-02-04  Darin Adler  <darin@apple.com>
98
99         Reviewed by Dan Bernstein.
100
101         WebKit2 doesn't hide mouse pointer on keypress
102         https://bugs.webkit.org/show_bug.cgi?id=53821
103         rdar://problem/8630895
104
105         * UIProcess/PageClient.h: Renamed didNotHandleKeyEvent to
106         doneWithKeyEvent and added a bool wasEventHandled argument.
107         * UIProcess/WebPageProxy.cpp:
108         (WebKit::WebPageProxy::didReceiveEvent): Changed code to call
109         doneWithKeyEvent and call even if event was handled.
110
111         * UIProcess/API/mac/PageClientImpl.h: Updated for above change.
112         * UIProcess/API/mac/PageClientImpl.mm:
113         (WebKit::PageClientImpl::doneWithKeyEvent): Ditto. But also
114         call [NSCursor setHiddenUntilMouseMoves:YES] when a key down
115         event was handled. This matches what -[WebHTMLView keyDown:] does.
116         * UIProcess/API/qt/qwkpage.cpp:
117         (QWKPagePrivate::doneWithKeyEvent): Ditto.
118         * UIProcess/API/qt/qwkpage_p.h: Ditto.
119         * UIProcess/win/WebView.cpp:
120         (WebKit::WebView::doneWithKeyEvent): Ditto.
121         * UIProcess/win/WebView.h: Ditto.
122
123 2011-02-04  Steve Falkenburg  <sfalken@apple.com>
124
125         Reviewed by Adam Roben.
126
127         WebKit2 clients fail to launch on Windows if client exe is in a different directory from WebKit
128         https://bugs.webkit.org/show_bug.cgi?id=53810
129         <rdar://problem/8946085>
130         
131         If WebKit2WebProcess.exe is in a different directory from the client process, and that
132         client process uses CreateProcess to launch WebKit2WebProcess, the DLL search path may
133         end up excluding the directory containing WebKit. To address this, we use SetDllDirectory
134         to explicitly include the WebKit directory in the DLL search path.
135
136         * win/MainWin.cpp:
137         (wWinMain): Use SetDllDirectory and LoadLibrary to load WebKit.dll from WebKit2WebProcess.exe
138         * win/WebKit2WebProcessCommon.vsprops: Don't link directly to WebKit. Link against shlwapi.
139
140 2011-02-04  Adam Roben  <aroben@apple.com>
141
142         Allow passing a null filter callback to WKPageCopySessionState
143
144         WebKit2 part of <http://webkit.org/b/53616> <rdar://problem/8949883>.
145
146         Reviewed by Sam Weinig.
147
148         * UIProcess/cf/WebBackForwardListCF.cpp:
149         (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Check if the filter is null
150         before calling it.
151
152 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
153
154         Reviewed by John Sullivan.
155
156         WebKit2: DidInitiateLoadForResource needs to know if the resource is being loaded by a committed or provisional frame
157         https://bugs.webkit.org/show_bug.cgi?id=53794
158         
159         When we navigate from one page to another, there can be multiple subresource requests between when
160         the new page has started its provisional load and when it has committed the load.
161         
162         There can be:
163         
164         - The main resource load of the provisional page
165         - Synchronous XHR from the unload event of the loaded page.
166         
167         WebKit clients need to be able to differentiate between these loads.
168
169         * UIProcess/API/C/WKPage.h:
170         * UIProcess/WebPageProxy.cpp:
171         (WebKit::WebPageProxy::didInitiateLoadForResource): Pass whether or not the page is provisionally loading
172             to the client.
173         * UIProcess/WebPageProxy.h:
174         * UIProcess/WebPageProxy.messages.in: Add a new parameter to DidInitiateLoadForResource.
175         * UIProcess/WebResourceLoadClient.cpp:
176         (WebKit::WebResourceLoadClient::didInitiateLoadForResource):  a new parameter to didInitiateLoadForResource.
177         * UIProcess/WebResourceLoadClient.h:
178         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
179         (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Pass whether or not the page is currently
180             in a provisional load (checked by seeing if the DocumentLoader matches the FrameLoader's provisionalDocumentLoader)
181             to the UI Process.
182
183 2011-02-04  Anders Carlsson  <andersca@apple.com>
184
185         Reviewed by Mark Rowe.
186
187         Mac WebKit2 should use the new drawing area
188         https://bugs.webkit.org/show_bug.cgi?id=53802
189         <rdar://problem/7881419>
190         <rdar://problem/7881447>
191         <rdar://problem/8252632>
192         <rdar://problem/8479422>
193         <rdar://problem/8633813>
194         <rdar://problem/8734512>
195         <rdar://problem/8787660>
196
197         * UIProcess/API/mac/WKView.mm:
198         (useNewDrawingArea):
199         Return true. Eventually this function should be removed, but let's keep it for now so
200         we can go back to the old drawing area if necessary.
201
202 2011-02-04  Maciej Stachowiak  <mjs@apple.com>
203
204         Reviewed by Anders Carlsson.
205
206         WebKit2: Crash in WebPageProxy::setPendingAPIRequestURL after web process crashed
207         https://bugs.webkit.org/show_bug.cgi?id=53799
208         <rdar://problem/8943956>
209
210         * UIProcess/WebPageProxy.cpp:
211         (WebKit::WebPageProxy::reload):
212
213 2011-02-04  Anders Carlsson  <andersca@apple.com>
214
215         Reviewed by Maciej Stachowiak.
216
217         Fix a shared memory leak
218         https://bugs.webkit.org/show_bug.cgi?id=53800
219
220         Move the send right representing the shared memory.
221
222         * Platform/mac/SharedMemoryMac.cpp:
223         (WebKit::SharedMemory::Handle::encode):
224
225 2011-02-04  Brady Eidson  <beidson@apple.com>
226
227         Reviewed by Anders Carlsson.
228
229         <rdar://problem/8636239> and https://bugs.webkit.org/show_bug.cgi?id=53785
230         WebKit2: Pages with dynamically inserted iframes can add extraneous back/forward items.
231
232         WebCore doesn't gracefully handle the case where the decidePolicyForNavigationAction callback
233         does not occur synchronously. Let's make it synchronous.
234
235         Change WebPageProxy to handle this message reply synchronously:
236         * UIProcess/WebPageProxy.cpp:
237         (WebKit::WebPageProxy::WebPageProxy):
238         (WebKit::WebPageProxy::receivedPolicyDecision):
239         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
240         * UIProcess/WebPageProxy.h:
241         * UIProcess/WebPageProxy.messages.in: Make the navigation policy action message be synchronous.
242
243         * Platform/CoreIPC/HandleMessage.h:
244         (CoreIPC::callMemberFunction): Add a 6-argument varient 
245
246         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
247         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the message synchronously.
248
249 2011-02-04  Steve Falkenburg  <sfalken@apple.com>
250
251         Windows build fix.
252         Correct prebuild build-stopping rule to allow project only rebuilds.
253
254         * win/WebKit2WebProcessPreBuild.cmd:
255
256 2011-02-04  Brian Weinstein  <bweinstein@apple.com>
257
258         Reviewed by Adam Roben.
259
260         Assertion failure in WebInspectorProxy::platformClose closing main window when inspecting a popup 
261         window, or when running regression tests.
262         https://bugs.webkit.org/show_bug.cgi?id=53798
263         <rdar://problem/8814364>
264         
265         Only assert about the state of m_inspectorWindow and m_inspectorView if the inspector is visible.
266         Also, only call ::DestroyWindow if the HWND is non-null, just to be safe.
267
268         * UIProcess/win/WebInspectorProxyWin.cpp:
269         (WebKit::WebInspectorProxy::platformClose):
270
271 2011-02-04  Anders Carlsson  <andersca@apple.com>
272
273         Reviewed by Dan Bernstein.
274
275         Go out of accelerated compositing mode when the drawing area is destroyed
276         https://bugs.webkit.org/show_bug.cgi?id=53788
277
278         This fixes a crash in the UI process if a web process crashes while in accelerated compositing mode.
279
280         * UIProcess/DrawingAreaProxyImpl.cpp:
281         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
282
283 2011-02-03  Yury Semikhatsky  <yurys@chromium.org>
284
285         Reviewed by Pavel Feldman.
286
287         Web Inspector: remove settings related methods from InspectorClient
288         https://bugs.webkit.org/show_bug.cgi?id=53686
289
290         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
291         (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient):
292
293 2011-02-03  Maciej Stachowiak  <mjs@apple.com>
294
295         Reviewed by Dan Bernstein.
296
297         WebKit2: Need WebKit2 equivalent of WebResourceLoadDelegate::willSendRequest in the Bundle
298         https://bugs.webkit.org/show_bug.cgi?id=52897
299         <rdar://problem/8898294>
300
301         * Shared/API/c/WKSharedAPICast.h:
302         (WebKit::toAPI):
303         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
304         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
305         (WebKit::InjectedBundlePageLoaderClient::willSendRequestForFrame):
306         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
307         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
308         (WebKit::WebFrameLoaderClient::dispatchWillSendRequest):
309
310 2011-02-03  Ivan Krstić  <ike@apple.com>
311
312         Reviewed by Maciej Stachowiak.
313
314         Make WebProcess pass explicit homedir parameter to the sandbox
315         <rdar://problem/8405760>
316         <https://webkit.org/b/53558>
317
318         * WebProcess/com.apple.WebProcess.sb:
319         * WebProcess/mac/WebProcessMac.mm:
320         (WebKit::initializeSandbox):
321
322 2011-02-03  James Kozianski  <koz@chromium.org>
323
324         Reviewed by Dimitri Glazkov.
325
326         Add navigator.registerProtocolHandler behind a flag.
327         https://bugs.webkit.org/show_bug.cgi?id=52609
328
329         * Configurations/FeatureDefines.xcconfig:
330
331 2011-02-03  Adam Langley  <agl@chromium.org>
332
333         Reviewed by Adam Barth.
334
335         Plumb mixed script URL to FrameLoaderClient
336         https://bugs.webkit.org/show_bug.cgi?id=52384
337
338         Regressions covered by http/tests/security/mixedContent/*
339
340         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
341         (WebKit::WebFrameLoaderClient::didRunInsecureContent):
342         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
343
344 2011-02-03  Jon Honeycutt  <jhoneycutt@apple.com>
345
346         Download bundles should be moved to their final destination when they
347         finish.
348
349         https://bugs.webkit.org/show_bug.cgi?id=53668
350
351         Reviewed by Adam Roben.
352
353         * WebProcess/Downloads/Download.cpp:
354         (WebKit::Download::Download):
355         Initialize m_allowOverwrite.
356         (WebKit::Download::retrieveDestinationWithSuggestedFilename):
357         Return the result of requesting the destination filename from the UI
358         process.
359         (WebKit::Download::decideDestinationWithSuggestedFilename):
360         Call retrieveDestinationWithSuggestedFilename().
361         (WebKit::Download::didFinish):
362         Call platformDidFinish().
363
364         * WebProcess/Downloads/Download.h:
365         Declare retrieveDestinationWithSuggestedFilename() and
366         platformDidFinish(). Add a member variable to store whether the UI
367         process would like us to overwrite existing files.
368
369         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
370         (WebKit::willResumeWithResponseCallback):
371         Remove some trailing whitespace.
372
373         * WebProcess/Downloads/curl/DownloadCurl.cpp:
374         (WebKit::Download::platformDidFinish):
375         Stubbed.
376
377         * WebProcess/Downloads/mac/DownloadMac.mm:
378         (WebKit::Download::platformDidFinish):
379         Stubbed.
380
381         * WebProcess/Downloads/qt/DownloadQt.cpp:
382         (WebKit::Download::platformDidFinish):
383         Stubbed.
384
385         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp:
386         (WebKit::Download::didDecideDestination):
387         Store whether the UI process would like us to overwrite existing files.
388         (WebKit::Download::platformDidFinish):
389         Try to move the bundle to the final destination. If that fails, ask the
390         UI process for a new destination. If we receive one, try again to move
391         the bundle. Call didCreateDestination() to report the updated path of
392         file whether it's the bundle that we failed to move, or the new final
393         destination.
394
395         This is similar to what is done by WebKit 1's CFNetwork port.
396
397         * win/WebKit2.vcproj:
398         Add DownloadWin.cpp.
399
400 2011-02-01  Jon Honeycutt  <jhoneycutt@apple.com>
401
402         Small clean-up in DownloadCFNet.cpp.
403
404         Rubber-stamped by Mark Rowe.
405
406         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
407         (WebKit::Download::didDecideDestination):
408         Moved out of the section labeled "CFURLDownload callbacks" and up near
409         the other member functions.
410
411 2011-02-03  Anders Carlsson  <andersca@apple.com>
412
413         Reviewed by Sam Weinig.
414
415         Paint non-composited contents in a layer
416         https://bugs.webkit.org/show_bug.cgi?id=53742
417
418         * WebProcess/WebPage/DrawingAreaImpl.cpp:
419         (WebKit::DrawingAreaImpl::setNeedsDisplay):
420         Call LayerTreeHost::setNonCompositedContentsNeedDisplayInRect.
421
422         (WebKit::DrawingAreaImpl::scroll):
423         Call LayerTreeHost::scrollNonCompositedContents.
424
425         (WebKit::DrawingAreaImpl::setSize):
426         Call LayerTreeHost::sizeDidChange.
427
428         * WebProcess/WebPage/LayerTreeHost.h:
429         Add new pure virtual member functions.
430
431         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
432         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
433         Create the non-composited content layer.
434
435         (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect):
436         Call setNeedsDisplay on the GraphicsLayer.
437
438         (WebKit::LayerTreeHostMac::scrollNonCompositedContents):
439         Just call setNonCompositedContentsNeedDisplayInRect.
440
441         (WebKit::LayerTreeHostMac::sizeDidChange):
442         Resize the layers and flush any changes.
443         
444         (WebKit::LayerTreeHostMac::paintContents):
445         Call WebPage::drawRect.
446
447         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
448         Lay out the web page.
449
450         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
451         Call syncCompositingStateForThisLayerOnly on the non-composited content layer.
452
453 2011-02-03  Anders Carlsson  <andersca@apple.com>
454
455         Reviewed by Sam Weinig.
456
457         When in accelerated compositing mode, wait for DidSetSize messages
458         https://bugs.webkit.org/show_bug.cgi?id=53736
459
460         Normally we wait for DidSetSize messages from ::paint, but that's never called in 
461         accelerated compositing mode so we just do it right after sending the SetSize message.
462
463         * UIProcess/DrawingAreaProxyImpl.cpp:
464         (WebKit::DrawingAreaProxyImpl::paint):
465         Call waitForAndDispatchDidSetSize.
466
467         (WebKit::DrawingAreaProxyImpl::sendSetSize):
468         Call waitForAndDispatchDidSetSize when in accelerated compositing mode.
469
470         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize):
471         New utility function which waits for and dispatches a DidSetSize message.
472
473         * UIProcess/DrawingAreaProxyImpl.h:
474
475 2011-02-03  Anders Carlsson  <andersca@apple.com>
476
477         Reviewed by Dan Bernstein.
478
479         Pass along an UpdateInfo object to the ExitAcceleratedCompositingMode message
480         https://bugs.webkit.org/show_bug.cgi?id=53734
481
482         * UIProcess/DrawingAreaProxy.h:
483         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
484         Add an UpdateInfo parameter.
485
486         * UIProcess/DrawingAreaProxy.messages.in:
487         Add an UpdateInfo parameter to the ExitAcceleratedCompositingMode message.
488
489         * UIProcess/DrawingAreaProxyImpl.cpp:
490         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
491         Incorporate the passed in update.
492
493         * WebProcess/WebPage/DrawingAreaImpl.cpp:
494         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
495         Create a new UpdateInfo object, paint into it and pass it along as a parameter
496         to the ExitAcceleratedCompositingMode message.
497
498 2011-02-03  Beth Dakin  <bdakin@apple.com>
499
500         Reviewed by Sam Weinig.
501
502         Fix for <rdar://problem/8944544> Ability to animate track
503         for WKPainter scrollers
504
505         * WebCoreSupport/WebSystemInterface.mm:
506         (InitWebCoreSystemInterface):
507
508 2011-02-03  Anders Carlsson  <andersca@apple.com>
509
510         Reviewed by Dan Bernstein.
511
512         Change DidSetSize to take a LayerTreeContext parameter
513         https://bugs.webkit.org/show_bug.cgi?id=53724
514
515         Since SetSize can cause layout to happen, we need to pass along a layer tree context to 
516         the DidSetSize message so the UI process can enter/exit accelerated compositing mode appropriately.
517         
518         * Shared/LayerTreeContext.h:
519         * Shared/mac/LayerTreeContextMac.mm:
520         Add equality operators to LayerTreeContext.
521
522         * UIProcess/DrawingAreaProxy.h:
523         (WebKit::DrawingAreaProxy::didSetSize):
524         This now takes a LayerTreeContext parameter.
525         
526         * UIProcess/DrawingAreaProxy.messages.in:
527         Add LayerTreeContext parameter.
528
529         * UIProcess/DrawingAreaProxyImpl.cpp:
530         Get rid of m_isInAcceleratedCompositingMode and use the current layer context instead.
531
532         (WebKit::DrawingAreaProxyImpl::paint):
533         Bail if the call to DidSetSize ended up entering accelerated compositing mode.
534
535         (WebKit::DrawingAreaProxyImpl::didSetSize):
536         If the new layer tree context is different, enter/exit accelerated compositing mode accordingly.
537
538         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
539         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
540         Update the layer tree context.
541
542         * UIProcess/DrawingAreaProxyImpl.h:
543         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
544         Add simple getter.
545
546         * WebProcess/WebPage/DrawingAreaImpl.cpp:
547         (WebKit::DrawingAreaImpl::setSize):
548         Pass along the layer tree context.
549
550 2011-02-03  Anders Carlsson  <andersca@apple.com>
551
552         Reviewed by Dan Bernstein.
553
554         Get rid of LayerTreeContext::seed on Mac.
555         Add sequence checks to enterAcceleratedCompositingMode and exitAcceleratedCompositingMode and
556         have them call newly added overloads that don't have the checks.
557
558         * Shared/LayerTreeContext.h:
559         * Shared/mac/LayerTreeContextMac.mm:
560         (WebKit::LayerTreeContext::LayerTreeContext):
561         (WebKit::LayerTreeContext::encode):
562         (WebKit::LayerTreeContext::decode):
563         * UIProcess/DrawingAreaProxyImpl.cpp:
564         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
565         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
566         * UIProcess/DrawingAreaProxyImpl.h:
567         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
568         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
569
570 2011-02-03  Anders Carlsson  <andersca@apple.com>
571
572         Reviewed by Dan Bernstein.
573
574         Get rid of timestamps in UpdateInfo
575         https://bugs.webkit.org/show_bug.cgi?id=53713
576
577         Add a 64-bit sequence number to all DrawingAreaProxy messages, and use it to
578         check whether Update messages should be handled or not.
579
580         * Shared/UpdateInfo.cpp:
581         (WebKit::UpdateInfo::encode):
582         (WebKit::UpdateInfo::decode):
583         * Shared/UpdateInfo.h:
584         (WebKit::UpdateInfo::UpdateInfo):
585         * UIProcess/BackingStore.cpp:
586         (WebKit::BackingStore::BackingStore):
587         (WebKit::BackingStore::incorporateUpdate):
588         * UIProcess/BackingStore.h:
589         * UIProcess/DrawingAreaProxy.h:
590         (WebKit::DrawingAreaProxy::update):
591         (WebKit::DrawingAreaProxy::didSetSize):
592         (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
593         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
594         * UIProcess/DrawingAreaProxy.messages.in:
595         * UIProcess/DrawingAreaProxyImpl.cpp:
596         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
597         (WebKit::DrawingAreaProxyImpl::update):
598         (WebKit::DrawingAreaProxyImpl::didSetSize):
599         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
600         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
601         * UIProcess/DrawingAreaProxyImpl.h:
602         * WebProcess/WebPage/DrawingAreaImpl.cpp:
603         (WebKit::generateSequenceNumber):
604         (WebKit::DrawingAreaImpl::setSize):
605         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
606         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
607         (WebKit::DrawingAreaImpl::display):
608
609 2011-02-03  Anders Carlsson  <andersca@apple.com>
610
611         Reviewed by Darin Adler.
612
613         Don't send enter/exit accelerated compositing mode messages when handling setSize
614         https://bugs.webkit.org/show_bug.cgi?id=53706
615
616         Don't send EnterAcceleratedCompositingMode/ExitAcceleratedCompositing mode when
617         the mode changes happen as a result of relayout in setSize, since an updated state
618         is going to be sent back in the DidSetSize message.
619         
620         * UIProcess/DrawingAreaProxyImpl.cpp:
621         (WebKit::DrawingAreaProxyImpl::didSetSize):
622         Add an assert.
623
624         * WebProcess/WebPage/DrawingAreaImpl.cpp:
625         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
626         Initialize m_inSetSize.
627
628         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
629         Factor out code into enterAcceleratedCompositingMode and exitAcceleratedCompositingMode.
630
631         (WebKit::DrawingAreaImpl::setSize):
632         Set m_inSetSize to true while handling setSize.
633
634         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
635         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
636         Take over the message sending responsibility from LayerTreeHostMac, and don't send messages
637         if we're currently handling a SetSize message.
638
639         * WebProcess/WebPage/DrawingAreaImpl.h:
640         Add m_inSetSize.
641
642         * WebProcess/WebPage/LayerTreeHost.h:
643         Add layerTreeHost getter.
644
645         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
646         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
647         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
648         Don't send EnterAcceleratedCompositingMode messages.
649
650         (WebKit::LayerTreeHostMac::layerTreeContext):
651         Add getter for the current layer tree context.
652
653         (WebKit::LayerTreeHostMac::invalidate):
654         Don't send ExitAcceleratedCompositingMode messages.
655
656 2011-02-03  Anders Carlsson  <andersca@apple.com>
657
658         Reviewed by Sam Weinig.
659
660         Make the layer tree host keep track of the layer tree context
661         https://bugs.webkit.org/show_bug.cgi?id=53698
662
663         Add a LayerTreeContext member variable to the LayerTreeHost object,
664         and also add a seed count to the LayerTreeContext so we can keep track of 
665         how layer tree contexts relate to each other.
666
667         * Shared/LayerTreeContext.h:
668         * Shared/mac/LayerTreeContextMac.mm:
669         (WebKit::LayerTreeContext::LayerTreeContext):
670         (WebKit::LayerTreeContext::makeWithSeed):
671         (WebKit::LayerTreeContext::encode):
672         (WebKit::LayerTreeContext::decode):
673
674         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
675         Add the layer tree context as a member variable.
676
677         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
678         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
679         Initialize the layer tree context.
680
681 2011-02-03  Sam Weinig  <sam@webkit.org>
682
683         Fix Qt build.
684
685         * UIProcess/API/qt/qwkpage.cpp:
686         (QWKPage::QWKPage):
687
688 2011-02-02  Sam Weinig  <sam@webkit.org>
689
690         Reviewed by Anders Carlsson.
691
692         Add notification of the end of a rubber band.
693         <rdar://problem/8940648>
694
695         * UIProcess/API/C/WKPage.h:
696         * UIProcess/WebPageProxy.cpp:
697         (WebKit::WebPageProxy::drawHeader):
698         (WebKit::WebPageProxy::drawFooter):
699         (WebKit::WebPageProxy::didCompleteRubberBandForMainFrame):
700         * UIProcess/WebPageProxy.h:
701         * UIProcess/WebPageProxy.messages.in:
702         * UIProcess/WebUIClient.cpp:
703         (WebKit::WebUIClient::didCompleteRubberBandForMainFrame):
704         * UIProcess/WebUIClient.h:
705         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
706         (WebKit::WebChromeClient::didCompleteRubberBandForMainFrame):
707         * WebProcess/WebCoreSupport/WebChromeClient.h:
708         Pipe the notification up to the WKUIClient.
709
710 2011-02-03  Sheriff Bot  <webkit.review.bot@gmail.com>
711
712         Unreviewed, rolling out r77449.
713         http://trac.webkit.org/changeset/77449
714         https://bugs.webkit.org/show_bug.cgi?id=53663
715
716         causes many WebKit2 tests to crash (Requested by othermaciej
717         on #webkit).
718
719         * Shared/API/c/WKSharedAPICast.h:
720         (WebKit::toAPI):
721         (WebKit::toCopiedAPI):
722         (WebKit::toURLRef):
723         (WebKit::toCopiedURLAPI):
724         * Shared/WebString.h:
725         (WebKit::WebString::isNull):
726         (WebKit::WebString::WebString):
727
728 2011-02-02  Sam Weinig  <sam@webkit.org>
729
730         Fix license block issues pointed out by Daniel Bates.
731
732         * Shared/API/c/WKGraphicsContext.cpp:
733         * Shared/API/c/WKGraphicsContext.h:
734         * Shared/API/c/cg/WKGraphicsContextCG.cpp:
735         * Shared/API/c/cg/WKGraphicsContextCG.h:
736         * Shared/WebGraphicsContext.cpp:
737
738 2011-02-02  Sam Weinig  <sam@webkit.org>
739
740         Reviewed by Dan Bernstein.
741
742         Add WKBundleFrameGetVisibleContentBoundsExcludingScrollbars API for WebKit2.
743
744         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
745         (WKBundleFrameGetContentBounds):
746         (WKBundleFrameGetVisibleContentBounds):
747         (WKBundleFrameGetVisibleContentBoundsExcludingScrollbars):
748         (WKBundleFrameGetScrollOffset):
749         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
750         * WebProcess/WebPage/WebFrame.cpp:
751         (WebKit::WebFrame::contentBounds):
752         (WebKit::WebFrame::visibleContentBounds):
753         (WebKit::WebFrame::visibleContentBoundsExcludingScrollbars):
754         (WebKit::WebFrame::scrollOffset):
755         * WebProcess/WebPage/WebFrame.h:
756         Move implementation of frame geometry to the implementation file
757         instead of keeping it in the API file.
758
759 2011-02-02  Stephanie Lewis  <slewis@apple.com>
760
761         Reviewed by Geoff Garen.
762
763         https://bugs.webkit.org/show_bug.cgi?id=53361
764         <rdar://problem/8921729> REGRESSION: Membuster accumulates 1GB+ memory due to autorelease 
765         pools not being drained.
766         Call into AppKit to add observers that push and pop autorelease pools on entry 
767         and exit from the CFRunLoop.  This will prevent memory from accumulating.
768
769         * WebProcess/mac/WebProcessMainMac.mm:
770         (WebKit::WebProcessMain):
771
772 2011-02-02  Darin Adler  <darin@apple.com>
773
774         Reviewed by Sam Weinig.
775
776         Make null WTF::String objects turn into 0 pointers for WKStringRef and WKURLRef.
777         rdar://problem/8948688
778
779         * Shared/API/c/WKSharedAPICast.h:
780         (WebKit::toAPI): Return 0 if the passed in string is 0.
781         (WebKit::toCopiedAPI): Ditto.
782         (WebKit::toURLRef): Ditto. Old code was trying to do this but was missing a return.
783         (WebKit::toCopiedURLAPI): Ditto. Old code was trying to do this but had incorrect
784         nll check.
785
786         * Shared/WebString.h: Removed isNull function. It can never return true.
787         Removed constructor code that turns the null string into the empty string.
788         Instead assert that the passed in string is not null.
789
790 2011-02-02  Mark Rowe  <mrowe@apple.com>
791
792         Reviewed by Beth Dakin.
793
794         <rdar://problem/8928367> Crash when loading canvas pages inside HTMLCanvasElement::createImageBuffer().
795
796         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
797         (InitWebCoreSystemInterface): Add some missing initializers.
798
799 2011-02-02  Sam Weinig  <sam@webkit.org>
800
801         Reviewed by Beth Dakin.
802
803         Add ChromeClient function to paint custom overhang areas.
804         https://bugs.webkit.org/show_bug.cgi?id=53639
805
806         * Shared/API/c/WKBase.h:
807         * Shared/API/c/WKGraphicsContext.cpp: Added.
808         (WKGraphicsContextGetTypeID):
809         * Shared/API/c/WKGraphicsContext.h: Added.
810         * Shared/API/c/WKSharedAPICast.h:
811         * Shared/API/c/cg/WKGraphicsContextCG.cpp: Added.
812         (WKGraphicsContextGetCGContext):
813         * Shared/API/c/cg/WKGraphicsContextCG.h: Added.
814         * Shared/APIObject.h:
815         * Shared/WebGraphicsContext.cpp: Added.
816         (WebKit::WebGraphicsContext::WebGraphicsContext):
817         * Shared/WebGraphicsContext.h: Added.
818         (WebKit::WebGraphicsContext::create):
819         (WebKit::WebGraphicsContext::platformContext):
820         (WebKit::WebGraphicsContext::type):
821         Add WebGraphicsContext API type.
822
823         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
824         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
825         (WebKit::InjectedBundlePageUIClient::pageDidScroll):
826         (WebKit::InjectedBundlePageUIClient::shouldPaintCustomOverhangArea):
827         (WebKit::InjectedBundlePageUIClient::paintCustomOverhangArea):
828         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
829         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
830         (WebKit::WebChromeClient::paintCustomOverhangArea):
831         * WebProcess/WebCoreSupport/WebChromeClient.h:
832         Pipe paintCustomOverhangArea to the InjectedBundlePageUIClient.
833
834         * UIProcess/API/C/WebKit2.h:
835         * WebKit2.pro:
836         * WebKit2.xcodeproj/project.pbxproj:
837         * win/WebKit2.vcproj:
838         * win/WebKit2Generated.make:
839         Add new files.
840
841 2011-02-02  Anders Carlsson  <andersca@apple.com>
842
843         Reviewed by Dan Bernstein.
844
845         Work towards making the layer tree host be in charge of all painting
846         https://bugs.webkit.org/show_bug.cgi?id=53636
847
848         Make sure that DrawingAreaImpl::display is never called when in accelerated compositing mode,
849         since the layer tree host is supposed to handle all drawing in that case.
850
851         * WebProcess/WebPage/DrawingAreaImpl.cpp:
852         (WebKit::DrawingAreaImpl::scroll):
853         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
854         (WebKit::DrawingAreaImpl::setSize):
855         (WebKit::DrawingAreaImpl::didUpdate):
856
857 2011-02-02  Mark Rowe  <mrowe@apple.com>
858
859         Fix the 32-bit build.
860
861         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
862         (WebKit::computeFakeWindowBoundsRect):
863
864 2011-02-02  Anders Carlsson  <andersca@apple.com>
865
866         Reviewed by Sam Weinig.
867
868         Make sure that we don't try to call display() when in accelerated compositing mode
869         https://bugs.webkit.org/show_bug.cgi?id=53629
870
871         When in accelerated compositing mode, the layer tree host should handle all painting, so make sure that display() is never called.
872
873         * WebProcess/WebPage/DrawingAreaImpl.cpp:
874         (WebKit::DrawingAreaImpl::setNeedsDisplay):
875         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
876         (WebKit::DrawingAreaImpl::display):
877
878 2011-02-02  Adam Roben  <aroben@apple.com>
879
880         Assert WebBackForwardList's current index is valid to help catch errors
881
882         Hopefully this will help catch a crash I saw once but haven't yet been able to reproduce.
883
884         Fixes <http://webkit.org/b/53622>.
885
886         Reviewed by Brady Eidson.
887
888         * UIProcess/WebBackForwardList.cpp:
889         (WebKit::WebBackForwardList::WebBackForwardList):
890         (WebKit::WebBackForwardList::addItem):
891         (WebKit::WebBackForwardList::goToItem):
892         (WebKit::WebBackForwardList::currentItem):
893         (WebKit::WebBackForwardList::backItem):
894         (WebKit::WebBackForwardList::forwardItem):
895         (WebKit::WebBackForwardList::itemAtIndex):
896         (WebKit::WebBackForwardList::backListCount):
897         (WebKit::WebBackForwardList::forwardListCount):
898         (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit):
899         (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit):
900         (WebKit::WebBackForwardList::clear):
901         * UIProcess/cf/WebBackForwardListCF.cpp:
902         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
903         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
904         Assert that m_current is valid.
905
906         * UIProcess/WebBackForwardList.h: Moved the NoCurrentItemIndex to a static data member so
907         that it can be used from WebBackForwardListCF.cpp.
908
909 2011-02-02  Anders Carlsson  <andersca@apple.com>
910
911         Reviewed by Sam Weinig.
912
913         The drawing area proxy should keep track of the accelerated compositing state
914         https://bugs.webkit.org/show_bug.cgi?id=53624
915
916         * UIProcess/DrawingAreaProxyImpl.cpp:
917         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
918         Initialize m_isInAcceleratedCompositingMode to false.
919
920         (WebKit::DrawingAreaProxyImpl::paint):
921         Don't try to paint if we're in accelerated compositing mode.
922
923         (WebKit::DrawingAreaProxyImpl::didSetSize):
924         Bail if we're in accelerated compositing mode.
925
926         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
927         Set m_isInAcceleratedCompositingMode to true, null out the backing store.
928
929         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
930         Set m_isInAcceleratedCompositingMode back to false.
931
932         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
933         Assert that we're not in accelerated compositing mode.
934
935         * UIProcess/DrawingAreaProxyImpl.h:
936
937 2011-02-02  Timothy Hatcher  <timothy@apple.com>
938
939         Give the Web Process access to the Safari RSS preferences.
940
941         <rdar://problem/8916870> Sandbox violation related to RSS during initial
942         page load with WebKit2 (prevents RSS from working)
943
944         Reviewed by Darin Adler.
945
946         * WebProcess/com.apple.WebProcess.sb:
947
948 2011-02-02  Steve Lacey  <sjl@chromium.org>
949
950         Reviewed by Eric Carlson.
951
952         Implement basic media statistics on media elements.
953         https://bugs.webkit.org/show_bug.cgi?id=53322
954
955         * Configurations/FeatureDefines.xcconfig:
956
957 2011-02-01  Alexey Proskuryakov  <ap@apple.com>
958
959         Reviewed by Sam Weinig.
960
961         https://bugs.webkit.org/show_bug.cgi?id=53561
962         <rdar://problem/8900228> Stepping through print previews in WebKit2 mode steps in and out of
963         printing mode a lot
964
965         Disable NSView autodisplay, so that -[WKView drawRect:] isn't called (other than when
966         resizing the window), so that we don't have to switch modes all the time.
967
968         * UIProcess/API/mac/PageClientImpl.h:
969         * UIProcess/API/mac/PageClientImpl.mm:
970         (WebKit::PageClientImpl::setAutodisplay):
971         * UIProcess/PageClient.h:
972         * UIProcess/WebPageProxy.cpp:
973         (WebKit::WebPageProxy::setAutodisplay):
974         * UIProcess/WebPageProxy.h:
975         Pipe the call from WKPrintingView down to WKView.
976
977         * UIProcess/API/mac/WKPrintingView.mm:
978         (-[WKPrintingView beginDocument]): Added. We don't want to autodisplay WKView while printing,
979         because layout is changed to print at the time, and drawing to screen requires relayout.
980         
981         (-[WKPrintingView endDocument]): When not printing, turn autodisplay back on. Also, call
982         -[super endDocument] for unknown but definitive good (oops!).
983
984 2011-02-02  David Hyatt  <hyatt@apple.com>
985
986         Reviewed by Darin Adler.
987
988         Conversion of right()/bottom() to maxX()/maxY() as part of the removal of those accessors.
989
990         * UIProcess/win/WebPopupMenuProxyWin.cpp:
991         (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize):
992         * UIProcess/win/WebView.cpp:
993         (WebKit::WebView::prepareCandidateWindow):
994         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
995         (WebKit::NetscapePlugin::platformGeometryDidChange):
996
997 2011-02-01  Darin Adler  <darin@apple.com>
998
999         Reviewed by Anders Carlsson.
1000
1001         Overflow in WebKit2 argument decoder buffer checking
1002         https://bugs.webkit.org/show_bug.cgi?id=53536
1003
1004         * Platform/CoreIPC/ArgumentDecoder.cpp:
1005         (CoreIPC::roundUpToAlignment): Tweak code a bit for clarity and to replace
1006         C casts with C++ casts.
1007         (CoreIPC::ArgumentDecoder::alignBufferPosition): Rearrange buffer calculation
1008         so we don't do any math with the passed-in size, because that could overflow.
1009         (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain): Ditto.
1010
1011 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
1012
1013         Unreviewed.
1014
1015         Fix Qt build after r77339.
1016
1017         * UIProcess/API/qt/qwkpage.cpp:
1018         (QWKPagePrivate::enterAcceleratedCompositingMode):
1019         (QWKPagePrivate::exitAcceleratedCompositingMode):
1020         * UIProcess/API/qt/qwkpage_p.h:
1021
1022 2011-02-01  Anders Carlsson  <andersca@apple.com>
1023
1024         Reviewed by Dan Bernstein.
1025
1026         Attach the layer tree in the UI process
1027         https://bugs.webkit.org/show_bug.cgi?id=53560
1028
1029         * UIProcess/API/mac/WKView.mm:
1030         (-[WKView _enterAcceleratedCompositingMode:]):
1031         Make a render layer and add it as a sublayer of our root layer.
1032
1033         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1034         Make LayerTreeHostMac a GraphicsLayerClient.
1035
1036         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1037         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1038         Create a root layer, add the layer subtree as a child of the root layer.
1039
1040         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
1041         Assert that m_rootLayer is null.
1042
1043         (WebKit::LayerTreeHostMac::invalidate):
1044         Null out m_rootLayer.
1045
1046         (WebKit::LayerTreeHostMac::notifyAnimationStarted):
1047         (WebKit::LayerTreeHostMac::notifySyncRequired):
1048         (WebKit::LayerTreeHostMac::paintContents):
1049         Add stubs.
1050
1051         (WebKit::LayerTreeHostMac::showDebugBorders):
1052         (WebKit::LayerTreeHostMac::showRepaintCounter):
1053         Return the correct settings.
1054
1055         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
1056         Flush the root layer changes.
1057
1058 2011-02-01  Anders Carlsson  <andersca@apple.com>
1059
1060         Fix Windows build.
1061
1062         * UIProcess/win/WebView.cpp:
1063         (WebKit::WebView::enterAcceleratedCompositingMode):
1064         (WebKit::WebView::exitAcceleratedCompositingMode):
1065         * UIProcess/win/WebView.h:
1066
1067 2011-02-01  Anders Carlsson  <andersca@apple.com>
1068
1069         Reviewed by Dan Bernstein.
1070
1071         Add a layer backed NSView for accelerated content
1072         https://bugs.webkit.org/show_bug.cgi?id=53555
1073
1074         Rename the current _layerHostingView to _oldLayerHostingView and
1075         add a new _layerHostingView to be used with the new drawing area.
1076
1077         * UIProcess/API/mac/WKView.mm:
1078         (-[WKView hitTest:]):
1079         (-[WKView _startAcceleratedCompositing:]):
1080         (-[WKView _stopAcceleratedCompositing]):
1081         (-[WKView _enterAcceleratedCompositingMode:]):
1082         (-[WKView _exitAcceleratedCompositingMode]):
1083
1084 2011-02-01  Anders Carlsson  <andersca@apple.com>
1085
1086         Reviewed by Dan Bernstein.
1087
1088         Pass enter/exit accelerated compositing mode to the WKView
1089         https://bugs.webkit.org/show_bug.cgi?id=53552
1090
1091         * UIProcess/API/mac/PageClientImpl.h:
1092         * UIProcess/API/mac/PageClientImpl.mm:
1093         (WebKit::PageClientImpl::enterAcceleratedCompositingMode):
1094         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
1095         * UIProcess/API/mac/WKView.mm:
1096         (-[WKView _enterAcceleratedCompositingMode:]):
1097         (-[WKView _exitAcceleratedCompositingMode]):
1098         * UIProcess/API/mac/WKViewInternal.h:
1099         * UIProcess/DrawingAreaProxyImpl.cpp:
1100         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1101         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1102         * UIProcess/PageClient.h:
1103         * UIProcess/WebPageProxy.cpp:
1104         (WebKit::WebPageProxy::enterAcceleratedCompositingMode):
1105         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
1106         * UIProcess/WebPageProxy.h:
1107
1108 2011-02-01  Csaba Osztrogonác  <ossy@webkit.org>
1109
1110         Unreviewed Qt buildfix after r77286.
1111
1112         https://bugs.webkit.org/show_bug.cgi?id=53520 
1113         Remove the physical terminology from IntRect and FloatRect.
1114
1115         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
1116         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
1117
1118 2011-02-01  Anders Carlsson  <andersca@apple.com>
1119
1120         Reviewed by Adam Roben.
1121
1122         Send messages when entering/exiting accelerated compositing
1123         https://bugs.webkit.org/show_bug.cgi?id=53534
1124
1125         * Shared/LayerTreeContext.h: Added.
1126         * Shared/mac/LayerTreeContextMac.mm: Added.
1127         Add new LayerTreeContext which holds all information needed to enter
1128         accelerated compositing mode.
1129
1130         * UIProcess/DrawingAreaProxy.h:
1131         (WebKit::DrawingAreaProxy::enterAcceleratedCompositingMode):
1132         (WebKit::DrawingAreaProxy::exitAcceleratedCompositingMode):
1133         Add empty stubs.
1134
1135         * UIProcess/DrawingAreaProxy.messages.in:
1136         Add new messgaes.
1137
1138         * UIProcess/DrawingAreaProxyImpl.cpp:
1139         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1140         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1141         * UIProcess/DrawingAreaProxyImpl.h:
1142         Add empty stubs.
1143
1144         * WebKit2.xcodeproj/project.pbxproj:
1145         Add new files.
1146
1147         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1148         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1149         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1150         (WebKit::LayerTreeHostMac::invalidate):
1151         Send messages.
1152
1153 2011-02-01  Alexey Proskuryakov  <ap@apple.com>
1154
1155         Reviewed by Dan Bernstein and Darin Adler.
1156
1157         <rdar://problem/8830594> Printed page is sometimes shifted down, making footer invisible
1158
1159         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView locationOfPrintRect:]): Instead of
1160         letting AppKit compute content position on page, make the view provide it. We can do this
1161         because WK(Printing)Views are always printed on their own, not as part of other views.
1162
1163 2011-02-01  Anders Carlsson  <andersca@apple.com>
1164
1165         Reviewed by Adam Roben.
1166
1167         Make LayerTreeHost ref counted
1168         https://bugs.webkit.org/show_bug.cgi?id=53530
1169
1170         LayerTreeHostMac will soon be able to trigger layout, which could cause
1171         the page to leave accelerated compositing mode and free the LayerTreeHostMac object.
1172
1173         Making LayerTreeHost ref counted will let LayerTreeHostMac protect itself while triggering layout.
1174
1175         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1176         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1177         * WebProcess/WebPage/DrawingAreaImpl.h:
1178         * WebProcess/WebPage/LayerTreeHost.cpp:
1179         (WebKit::LayerTreeHost::create):
1180         * WebProcess/WebPage/LayerTreeHost.h:
1181         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1182         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1183         (WebKit::LayerTreeHostMac::create):
1184         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1185         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
1186         (WebKit::LayerTreeHostMac::invalidate):
1187
1188 2011-02-01  Sam Weinig  <sam@webkit.org>
1189
1190         Reviewed by Beth Dakin.
1191
1192         Part 2 for <rdar://problem/8492788>
1193         Adopt WKScrollbarPainterController
1194
1195         Use header detection to define scrollbar painting controller #define.
1196
1197         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1198         (InitWebCoreSystemInterface):
1199
1200 2011-02-01  David Hyatt  <hyatt@apple.com>
1201
1202         Reviewed by Oliver Hunt.
1203
1204         https://bugs.webkit.org/show_bug.cgi?id=53520
1205         
1206         Remove the physical terminology from IntRect and FloatRect.
1207         
1208         Now that we have flipped RenderBlocks for vertical-rl and horizontal-bt writing modes,
1209         we need to update our terminology to be more accurate.
1210
1211         I'm borrowing a page from AppKit here (which also supports flipped NSViews) and
1212         renaming right() and bottom() to maxX() and maxY().  These terms remain accurate
1213         even for flipped rectangles.
1214
1215         * Platform/Region.cpp:
1216         (WebKit::Region::Shape::Shape):
1217         * UIProcess/API/mac/WKPrintingView.mm:
1218         (pageDidComputePageRects):
1219         * UIProcess/FindIndicator.cpp:
1220         (WebKit::FindIndicator::draw):
1221         * UIProcess/TiledDrawingAreaProxy.cpp:
1222         (WebKit::TiledDrawingAreaProxy::invalidate):
1223         (WebKit::TiledDrawingAreaProxy::paint):
1224         (WebKit::TiledDrawingAreaProxy::createTiles):
1225         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1226         (WebKit::ChunkedUpdateDrawingAreaProxy::drawUpdateChunkIntoBackingStore):
1227         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1228         (WebKit::NetscapePlugin::callSetWindow):
1229
1230 2011-02-01  Anders Carlsson  <andersca@apple.com>
1231
1232         Reviewed by Adam Roben.
1233
1234         Move flushPendingLayerChanges to LayerTreeHostMac
1235         https://bugs.webkit.org/show_bug.cgi?id=53525
1236
1237         In preparation for adding more Mac specific code to flushPendingLayerChanges.
1238
1239         * WebProcess/WebPage/LayerTreeHost.cpp:
1240         * WebProcess/WebPage/LayerTreeHost.h:
1241         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1242         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1243         (WebKit::LayerTreeHostMac::flushPendingLayerChanges):
1244
1245 2011-02-01  Beth Dakin  <bdakin@apple.com>
1246
1247         Reviewed by Sam Weinig.
1248
1249         Fix for <rdar://problem/8492788> Adopt WKScrollbarPainterController
1250
1251         Implement NSView's viewWillStartLiveResize and
1252         viewDidEndLiveResize and propagate the messages down
1253         to WebCore.
1254         * UIProcess/API/mac/WKView.mm:
1255         (-[WKView viewWillStartLiveResize]):
1256         (-[WKView viewDidEndLiveResize]):
1257         * UIProcess/WebPageProxy.cpp:
1258         (WebKit::WebPageProxy::viewWillStartLiveResize):
1259         (WebKit::WebPageProxy::viewWillEndLiveResize):
1260         * UIProcess/WebPageProxy.h:
1261         * WebProcess/WebPage/WebPage.cpp:
1262         (WebKit::WebPage::viewWillStartLiveResize):
1263         (WebKit::WebPage::viewWillEndLiveResize):
1264         * WebProcess/WebPage/WebPage.h:
1265         * WebProcess/WebPage/WebPage.messages.in:
1266
1267         A bunch of new WebKitSystemInterface functions.
1268         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1269         (InitWebCoreSystemInterface):
1270
1271 2011-02-01  Dave Hyatt  <hyatt@apple.com>
1272
1273         Reviewed by Darin Adler.
1274
1275         https://bugs.webkit.org/show_bug.cgi?id=46422, make printing and pagination work
1276         with vertical text.
1277
1278         Change printing functions to check writing-mode and properly swap width and height
1279         as needed.
1280
1281         * WebProcess/WebPage/WebPage.cpp:
1282         (WebKit::WebPage::computePagesForPrinting):
1283
1284 2011-01-31  Alexey Proskuryakov  <ap@apple.com>
1285
1286         Reviewed by Maciej Stachowiak.
1287
1288         https://bugs.webkit.org/show_bug.cgi?id=53466
1289         Move WebKit2 to printing via API methods
1290
1291         Also fixes <rdar://problem/8933724> REGRESSION: Wrong pages are printed when not printing from page 1
1292
1293         Also fixes horizontal tiling (no bug filed).
1294
1295         The main idea here is that we don't force AppKit to use a different scaling factor when
1296         a Web view can't be resized to exact page size, and scale when drawing instead.
1297
1298         * UIProcess/API/mac/WKPrintingView.mm:
1299         (-[WKPrintingView _firstPrintedPageNumber]): Factored out into a separate method.
1300         (-[WKPrintingView _lastPrintedPageNumber]): Ditto.
1301         (pageDidDrawToPDF): Avoid crashing if data is null.
1302         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Use -_firstPrintedPageNumber
1303         and -_lastPrintedPageNumber.
1304         (pageDidComputePageRects): Set frame size to what it would have been for a normal NSView
1305         that's been asked to resize.
1306         (-[WKPrintingView _pageForRect:]): Check x(), because several pages can be at the same y()
1307         when tiling horizontally.
1308         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): Point to draw at and frame size are
1309         now using different units, translate as appropriate.
1310         (-[WKPrintingView _drawPreview:]): Scale the rect to WebCore units.
1311         (-[WKPrintingView drawRect:]): Correctly calculate page number when the first page to print
1312         isn't page 1.
1313         (-[WKPrintingView rectForPage:]): Scale the rect to AppKit units.
1314
1315 2011-01-31  Darin Adler  <darin@apple.com>
1316
1317         Reviewed by Adele Peterson.
1318
1319         WKView should support scrollPageDown:, scrollPageUp:, scrollToBeg and other similar selectors
1320         https://bugs.webkit.org/show_bug.cgi?id=53460
1321
1322         * UIProcess/API/mac/WKView.mm: Added WEBCORE_COMMAND macro for lots of editor commands that
1323         are implemented in WebCore so they will get forwarded. Many of these will probably work without
1324         any further changes required. Added comments about the methods that we do not yet forward.
1325         (createSelectorExceptionMap): Map scrollPageDown: to ScrollPageForward and
1326         scrollPageUp: to ScrollPageBackward because we want the page up and page down
1327         keys to follow the document logical order, not physical order. This is equivalent
1328         to what we do in WebPage::performDefaultBehaviorForKeyEvent.
1329
1330 2011-01-31  Jessie Berlin  <jberlin@apple.com>
1331
1332         Reviewed by Steve Falkenburg.
1333
1334         WebKit2: the cookies used by the WebKit2 Web Process should not go in a top-level
1335         directory.
1336         https://bugs.webkit.org/show_bug.cgi?id=53278
1337
1338         Use the name WebKit2WebProcess since the default location for the cookies is determined
1339         based on the process name (which is WebKit2WebProcess.exe on Windows).
1340
1341         * win/WebKit2.make:
1342         Copy the WebKit2WebProcess.resources directory into the AppleInternal bin.
1343
1344         * win/WebKit2WebProcess.resources: Added.
1345         * win/WebKit2WebProcess.resources/Info.plist: Added.
1346         Copied from the WebKit version of Info.plist.
1347
1348         * win/WebKit2WebProcessPostBuild.cmd:
1349         Copy the WebKit2WebProcess.resources directory into the WebKitOutPutDir's bin.
1350
1351 2011-01-31  Anders Carlsson  <andersca@apple.com>
1352
1353         Reviewed by Adam Roben.
1354
1355         Make LayerTreeHost an abstract base class and make LayerTreeHostMac inherit from it
1356         https://bugs.webkit.org/show_bug.cgi?id=53432
1357
1358         * WebKit2.xcodeproj/project.pbxproj:
1359         Add LayerTreeHostMac.h.
1360
1361         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1362         * WebProcess/WebPage/DrawingAreaImpl.h:
1363         Make m_layerTreeHost an OwnPtr and initialize/destroy it appropriately.
1364
1365         * WebProcess/WebPage/LayerTreeHost.cpp:
1366         (WebKit::LayerTreeHost::create):
1367         On Mac, create a LayerTreeHostMac instance.
1368
1369         (WebKit::LayerTreeHost::~LayerTreeHost):
1370         No need to call platformInvalidate anymore.
1371
1372         * WebProcess/WebPage/LayerTreeHost.h:
1373         * WebProcess/WebPage/mac/LayerTreeHostMac.h: Added.
1374         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1375         (WebKit::LayerTreeHostMac::~LayerTreeHostMac):
1376         Invalidate the run loop observer here instead of in platformInvalidate.
1377
1378         (WebKit::LayerTreeHostMac::scheduleLayerFlush):
1379         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
1380         These are now members of LayerTreeHostMac.
1381
1382 2011-01-30  Geoffrey Garen  <ggaren@apple.com>
1383
1384         Reviewed by Sam Weinig.
1385
1386         [Take 2!]
1387         Fixed crash on window close (maybe crash on launch?) due to missing frame null checks
1388         https://bugs.webkit.org/show_bug.cgi?id=53408
1389
1390         * UIProcess/WebContext.cpp:
1391         (WebKit::WebContext::didNavigateWithNavigationData):
1392         (WebKit::WebContext::didPerformClientRedirect):
1393         (WebKit::WebContext::didPerformServerRedirect):
1394         (WebKit::WebContext::didUpdateHistoryTitle): Use MESSAGE_CHECK because
1395         we don't think we should be able to reach this state under normal conditions.
1396
1397 2011-01-30  Geoffrey Garen  <ggaren@apple.com>
1398
1399         Reviewed by Maciej Stachowiak.
1400
1401         Fixed crash on window close (maybe crash on launch?) due to missing
1402         frame null checks
1403         https://bugs.webkit.org/show_bug.cgi?id=53408
1404
1405         * UIProcess/WebContext.cpp:
1406         (WebKit::WebContext::didNavigateWithNavigationData):
1407         (WebKit::WebContext::didPerformClientRedirect):
1408         (WebKit::WebContext::didPerformServerRedirect):
1409         (WebKit::WebContext::didUpdateHistoryTitle): Check for NULL, since we're
1410         calling a function that can return it.
1411
1412 2011-01-30  Balazs Kelemen  <kbalazs@webkit.org>
1413
1414         Reviewed by Csaba Osztrogonác.
1415
1416         [Qt][WK2]REGRESSION (r76991): Fix build errors
1417         https://bugs.webkit.org/show_bug.cgi?id=53400
1418
1419         Revert the temporary build fix (http://trac.webkit.org/changeset/77088)
1420         and remove WebKit2Prefix.h from the build.
1421         * UIProcess/API/qt/qwkhistory.h:
1422         * UIProcess/API/qt/qwkpage.h:
1423         * WebKit2.pro:
1424
1425 2011-01-30  Jeff Miller  <jeffm@apple.com>
1426
1427         Reviewed by Dan Bernstein.
1428
1429         FindController::updateFindIndicator() crashes if selection isn't visible
1430         https://bugs.webkit.org/show_bug.cgi?id=53399
1431
1432         * WebProcess/WebPage/FindController.cpp:
1433         (WebKit::FindController::updateFindIndicator): Return false if ShareableBitmap::createShareable() returns null (typically because the selection rect is empty).
1434
1435 2011-01-30  Csaba Osztrogonác  <ossy@webkit.org>
1436
1437         Unreviewed.
1438
1439         [Qt][WK2] Buildfix.
1440
1441         * UIProcess/API/qt/qwkhistory.h:
1442         * UIProcess/API/qt/qwkpage.h:
1443
1444 2011-01-29  Maciej Stachowiak  <mjs@apple.com>
1445
1446         Reviewed by Geoffrey Garen.
1447
1448         Add WKPageCopyPendingAPIRequestURL API
1449         https://bugs.webkit.org/show_bug.cgi?id=53383
1450
1451         This API returns the last URL requested for load via API, if neither that load nor any
1452         other load subsequently reaches the provisional state.
1453         
1454         This is useful to be able to track loads initiated via the API
1455         
1456         * UIProcess/API/C/WKPage.cpp:
1457         (WKPageCopyPendingAPIRequestURL): Retrieve the pending URL.
1458         * UIProcess/API/C/WKPage.h:
1459         * UIProcess/WebPageProxy.cpp:
1460         (WebKit::WebPageProxy::loadURL): Set pending URL.
1461         (WebKit::WebPageProxy::loadURLRequest): ditto
1462         (WebKit::WebPageProxy::reload): ditto
1463         (WebKit::WebPageProxy::goForward): ditto
1464         (WebKit::WebPageProxy::goBack): ditto
1465         (WebKit::WebPageProxy::estimatedProgress): Assume the initial
1466         progress value when there is a pending URL.
1467         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Clear
1468         pending URL; clients should look at the provisional URL now.
1469         (WebKit::WebPageProxy::decidePolicyForNavigationAction): Clear
1470         pending URL if it doesn't match the policy URL; this means we
1471         were interrupted by another load.
1472         * UIProcess/WebPageProxy.h:
1473         (WebKit::WebPageProxy::pendingAPIRequestURL): Helper function.
1474         (WebKit::WebPageProxy::clearPendingAPIRequestURL): ditto
1475         (WebKit::WebPageProxy::setPendingAPIRequestURL): ditto
1476
1477 2011-01-28  Jon Honeycutt  <jhoneycutt@apple.com>
1478
1479         Downloads in WK2 on Windows should write resume data to bundle
1480         https://bugs.webkit.org/show_bug.cgi?id=53282
1481         <rdar://problem/8753077>
1482
1483         Reviewed by Alice Liu.
1484
1485         * WebProcess/Downloads/Download.cpp:
1486         (WebKit::Download::decideDestinationWithSuggestedFilename):
1487         Call didDecideDestination(), now that the destination is decided.
1488
1489         * WebProcess/Downloads/Download.h:
1490         Declare didDecideDestination(). Added member variables to hold the
1491         destination file path and the download bundle path.
1492         (WebKit::Download::destination):
1493         Return the path to the final destination for this download.
1494
1495         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
1496         (WebKit::Download::start):
1497         Remove the name of an unused param.
1498         (WebKit::Download::startWithHandle):
1499         Ditto.
1500         (WebKit::Download::cancel):
1501         Tell CFNetwork not to delete the file upon failure, and tell it to
1502         cancel the download. Copy the resume data for the download, and append
1503         it to the download bundle. Call didCancel() with an empty
1504         DataReference, since we have written our own resume data.
1505         (WebKit::decideDestinationWithSuggestedObjectNameCallback):
1506         Remove some unused param names. Removed the call to
1507         CFURLDownloadSetDestination() - this is now handled in
1508         Download::didDecideDestination().
1509         (WebKit::didCreateDestinationCallback):
1510         Report that the final destination was created, rather than the download
1511         bundle, matching old WebKit.
1512         (WebKit::Download::didDecideDestination):
1513         Store the final destination and the download bundle paths, and call
1514         CFURLDownloadSetDestination(), passing the path to the download bundle.
1515
1516         * WebProcess/Downloads/curl/DownloadCurl.cpp:
1517         (WebKit::Download::didDecideDestination):
1518         Stubbed.
1519
1520         * WebProcess/Downloads/mac/DownloadMac.mm:
1521         (WebKit::Download::didDecideDestination):
1522         Stubbed - unneeded on the Mac.
1523
1524         * WebProcess/Downloads/qt/DownloadQt.cpp:
1525         (WebKit::Download::didDecideDestination):
1526         Stubbed.
1527
1528 2011-01-29  Jeff Miller  <jeffm@apple.com>
1529
1530         Reviewed by Anders Carlsson.
1531
1532         Support find bouncy in WebKit2 on Windows
1533         https://bugs.webkit.org/show_bug.cgi?id=53329
1534         <rdar://problem/8565843>
1535         The Mac implements the find bouncy inside of WebKit in the UI process for WebKit2, but we need to do this inside Safari for WebKit2 on Windows.
1536         Add infrastructure to call back into the app when the find indicator changes.
1537
1538         * UIProcess/API/C/win/WKView.cpp: Cleanup some code style violations.
1539         (WKViewSetFindIndicatorCallback): Added.
1540         (WKViewGetFindIndicatorCallback): Added.
1541         * UIProcess/API/C/win/WKView.h: Cleanup some code style violations.
1542         * UIProcess/FindIndicator.cpp:
1543         (WebKit::FindIndicator::create):
1544         (WebKit::FindIndicator::FindIndicator):
1545         (WebKit::FindIndicator::frameRect):
1546         (WebKit::FindIndicator::draw):
1547         Rename m_selectionRect to m_selectionRectInWindowCoordinates and m_textRects to m_textRectsInSelectionRectCoordinates (along with similarly named local variables) to be more explict about the coordinate system.
1548         * UIProcess/FindIndicator.h:
1549         (WebKit::FindIndicator::selectionRectInWindowCoordinates): Added.
1550         (WebKit::FindIndicator::textRects): Rename m_textRects to m_textRectsInSelectionRectCoordinates.
1551         * UIProcess/WebPageProxy.cpp:
1552         (WebKit::WebPageProxy::setFindIndicator): Rename selectionRect to selectionRectInWindowCoordinates and textRects to textRectsInSelectionRectCoordinates to be more explict about the coordinate system.
1553         * UIProcess/WebPageProxy.h: Ditto.
1554         * UIProcess/win/WebView.cpp:
1555         (WebKit::WebView::WebView):
1556         (WebKit::WebView::setFindIndicator): Added.
1557         (WebKit::WebView::setFindIndicatorCallback): Added.
1558         (WebKit::WebView::getFindIndicatorCallback): Added.
1559         * UIProcess/win/WebView.h:
1560
1561 2011-01-28  Alexey Proskuryakov  <ap@apple.com>
1562
1563         Reviewed by Dan Bernstein.
1564
1565         https://bugs.webkit.org/show_bug.cgi?id=53367
1566         <rdar://problem/8926460> Remove dysfunctional code from -[WKPrintingView _isPrintingPreview].
1567
1568         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _isPrintingPreview]): The common
1569         branch works fine for now, no need to make platforms different.
1570
1571 2011-01-28  Maciej Stachowiak  <mjs@apple.com>
1572
1573         Reviewed by Dan Bernstein.
1574
1575         WKPageGetEstimatedProgress returns wrong value after a mainframe provisional load has started
1576         https://bugs.webkit.org/show_bug.cgi?id=53358
1577
1578         * UIProcess/WebPageProxy.cpp:
1579         (WebKit::WebPageProxy::didStartProgress): Start progress at the magic initial value, not 0.
1580
1581 2011-01-28  Anders Carlsson  <andersca@apple.com>
1582
1583         Yet another build fix (What was I thinking?)
1584
1585         * WebProcess/Downloads/Download.h:
1586         * WebProcess/Plugins/PluginProxy.h:
1587
1588 2011-01-28  Anders Carlsson  <andersca@apple.com>
1589
1590         Fix Windows build.
1591
1592         * Shared/PrintInfo.h:
1593
1594 2011-01-28  Anders Carlsson  <andersca@apple.com>
1595
1596         Fix tyop.
1597
1598         * Shared/mac/CoreAnimationRenderer.mm:
1599
1600 2011-01-28  Anders Carlsson  <andersca@apple.com>
1601
1602         Reviewed by Sam Weinig.
1603
1604         Add CoreAnimationRenderer class
1605         https://bugs.webkit.org/show_bug.cgi?id=53343
1606
1607         * Shared/mac/CoreAnimationRenderer.h: Added.
1608         * Shared/mac/CoreAnimationRenderer.mm: Added.
1609
1610         (WebKit::CoreAnimationRenderer::CoreAnimationRenderer):
1611         Initialize the underlying CARenderer object and hook up a notification observer.
1612
1613         (WebKit::CoreAnimationRenderer::~CoreAnimationRenderer):
1614         Assert that the client is null. It has been set to null by the call to invalidate().
1615
1616         (WebKit::CoreAnimationRenderer::setBounds):
1617         Update the bounds on the CARenderer and the root layer.
1618
1619         (WebKit::CoreAnimationRenderer::render):
1620         Ask the renderer to render and return the next frame time.
1621
1622         (WebKit::CoreAnimationRenderer::invalidate):
1623         Remove the change observer and reset the client.
1624
1625         (WebKit::CoreAnimationRenderer::rendererDidChange):
1626         Call the client member function.
1627
1628         * WebKit2.xcodeproj/project.pbxproj:
1629         Add new files.
1630
1631 2011-01-28  Anders Carlsson  <andersca@apple.com>
1632
1633         Reviewed by Sam Weinig.
1634
1635         Add an OBJC_CLASS macro for forward declaring an Objective-C class
1636         https://bugs.webkit.org/show_bug.cgi?id=53337
1637
1638         * Shared/NativeWebKeyboardEvent.h:
1639         * Shared/PrintInfo.h:
1640         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1641         * UIProcess/LayerBackedDrawingAreaProxy.h:
1642         * UIProcess/WebInspectorProxy.h:
1643         * UIProcess/mac/WebContextMenuProxyMac.h:
1644         * UIProcess/mac/WebPopupMenuProxyMac.h:
1645         * WebProcess/Downloads/Download.h:
1646         * WebProcess/Plugins/PluginProxy.h:
1647         * WebProcess/WebPage/LayerBackedDrawingArea.h:
1648         * WebProcess/WebPage/WebPage.h:
1649         * config.h:
1650
1651 2011-01-28  Anders Carlsson  <andersca@apple.com>
1652
1653         Reviewed by Sam Weinig.
1654
1655         Don't put config.h in the message headers.
1656
1657         * Scripts/webkit2/messages.py:
1658         * Scripts/webkit2/messages_unittest.py:
1659
1660 2011-01-28  Anders Carlsson  <andersca@apple.com>
1661
1662         Fix build.
1663
1664         * Shared/mac/ShareableSurface.cpp:
1665
1666 2011-01-28  Anders Carlsson  <andersca@apple.com>
1667
1668         Try to unbreak the Windows build.
1669
1670         * UIProcess/cf/WebPageProxyCF.cpp:
1671
1672 2011-01-28  Brady Eidson  <beidson@apple.com>
1673
1674         Reviewed by John Sullivan.
1675
1676         https://bugs.webkit.org/show_bug.cgi?id=53330
1677         Need InjectedBundle API to get the response MIMEType for a URL
1678
1679         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1680         (WKBundleFrameCopyMIMETypeForResourceWithURL):
1681         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1682
1683         Get the MIMEType from the in-memory cache, or cachedResponseMIMETypeForURL() if not available:
1684         * WebProcess/WebPage/WebFrame.cpp:
1685         (WebKit::WebFrame::mimeTypeForResourceWithURL):
1686         * WebProcess/WebPage/WebFrame.h:
1687
1688         Get the MIMEType from the platform's disk cache if available:
1689         * WebProcess/WebPage/WebPage.h:
1690         * WebProcess/WebPage/mac/WebPageMac.mm:
1691         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1692         * WebProcess/WebPage/qt/WebPageQt.cpp:
1693         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1694         * WebProcess/WebPage/win/WebPageWin.cpp:
1695         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1696
1697 2011-01-28  Anders Carlsson  <andersca@apple.com>
1698
1699         Reviewed by Sam Weinig.
1700
1701         Clean up the mess introduced when config.h was added to the project:
1702
1703         - Remove the contents of WebKit2Prefix.h that is now in config.h, to avoid including everything
1704           twice in each file, probably slowing down compile time.
1705
1706         - Add config.h to all the files that were forgotten in order to keep the build from breaking.
1707
1708         - Added trap to ensure that config.h is included at the top of every implementation file. If this
1709           had been added it would have caught the previous issue.
1710
1711 2011-01-28  Stephanie Lewis  <slewis@apple.com>
1712
1713         Reviewed by Geoff Garen.
1714
1715         <rdar://problem/8857651> Implement unregisterWorld for WebKit2
1716         Rename unregisterWorld to clearWrappers.  Clearing the wrappers reduces the 
1717         memory use of isolated worlds.
1718
1719         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
1720         (WKBundleScriptWorldClearWrappers):
1721         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.h:
1722         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
1723         (WebKit::InjectedBundleScriptWorld::clearWrappers):
1724         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h:
1725
1726 2011-01-28  Dan Bernstein  <mitz@apple.com>
1727
1728         Reviewed by Sam Weinig.
1729
1730         <select> can't display right-to-left (rtl) languages
1731         https://bugs.webkit.org/show_bug.cgi?id=19785
1732
1733         * Shared/WebPopupItem.cpp:
1734         (WebKit::WebPopupItem::WebPopupItem): Added initializers for m_textDirection and m_hasTextDirectionOverride.
1735         (WebKit::WebPopupItem::encode): Encode the item's writing direction and direction override values.
1736         (WebKit::WebPopupItem::decode): Decode the item's writing direction and direction override values.
1737         * Shared/WebPopupItem.h:
1738         * UIProcess/WebPageProxy.cpp:
1739         (WebKit::WebPageProxy::showPopupMenu): Added a parameter for the menu's text direction.
1740         * UIProcess/WebPageProxy.h:
1741         * UIProcess/WebPageProxy.messages.in: Ditto.
1742         * UIProcess/WebPopupMenuProxy.h:
1743         * UIProcess/mac/WebPopupMenuProxyMac.h:
1744         * UIProcess/mac/WebPopupMenuProxyMac.mm:
1745         (WebKit::WebPopupMenuProxyMac::populate): Added a parameter for the menu's text direction.
1746         Set items' text alignment to match the menu's writing direction. Set items' writing direction
1747         and direction override according to their styles.
1748         (WebKit::WebPopupMenuProxyMac::showPopupMenu): Set the pop-up's layout direction.
1749         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1750         (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): Changed to return false.
1751         (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): Added.
1752         * WebProcess/WebCoreSupport/WebChromeClient.h:
1753         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1754         (WebKit::WebPopupMenu::populateItems): Initialize items' writing direction and direction override
1755         values.
1756         (WebKit::WebPopupMenu::show): Pass the menu's writing direction.
1757
1758 2011-01-28  Anders Carlsson  <andersca@apple.com>
1759
1760         Reviewed by Adam Roben.
1761
1762         Add ShareableSurface class
1763         https://bugs.webkit.org/show_bug.cgi?id=53313
1764
1765         * Shared/mac/ShareableSurface.cpp: Added.
1766         (WebKit::ShareableSurface::Handle::Handle):
1767         Initialize the mach port.
1768
1769         (WebKit::ShareableSurface::Handle::~Handle):
1770         Deallocate our send right if needed.
1771
1772         (WebKit::ShareableSurface::Handle::encode):
1773         Encode the send right, and then null it out.
1774
1775         (WebKit::ShareableSurface::Handle::decode):
1776         Decode the send right.
1777         
1778         (WebKit::createIOSurface):
1779         Create an IOSurface with the given size.
1780
1781         (WebKit::ShareableSurface::create):
1782         Create an IOSurface, either from a size or from a handle.
1783
1784         (WebKit::ShareableSurface::~ShareableSurface):
1785         Delete the texture and framebuffer.
1786
1787         (WebKit::ShareableSurface::createHandle):
1788         Create a mach port from the surface.
1789
1790         (WebKit::ShareableSurface::attach):
1791         Create an FBO if needed and bind it.
1792
1793         (WebKit::ShareableSurface::detach):
1794         Unbind the FBO.
1795
1796         (WebKit::ShareableSurface::textureID):
1797         Generate a new texture and bind it to the IOSurface.
1798
1799         * Shared/mac/ShareableSurface.h: Added.
1800
1801         * WebKit2.xcodeproj/project.pbxproj:
1802         Add new files.
1803
1804 2011-01-27  Adam Roben  <aroben@apple.com>
1805
1806         Change BinarySemaphore to wrap an auto-reset Win32 event on Windows
1807
1808         Fixes <http://webkit.org/b/53208> <rdar://problem/8922490>.
1809
1810         Reviewed by Dave Hyatt.
1811
1812         * Platform/CoreIPC/BinarySemaphore.cpp: Wrap this implementation in #if !PLATFORM(WIN).
1813
1814         * Platform/CoreIPC/BinarySemaphore.h: Make the Windows implementation have a single HANDLE
1815         member that holds the event.
1816
1817         * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Copied from Source/WebKit2/Platform/CoreIPC/BinarySemaphore.cpp.
1818         (CoreIPC::BinarySemaphore::BinarySemaphore): Create our event.
1819         (CoreIPC::BinarySemaphore::~BinarySemaphore): Destory our event.
1820         (CoreIPC::BinarySemaphore::signal): Signal the event.
1821         (CoreIPC::BinarySemaphore::wait): Convert the absolute time to a wait interval, then wait
1822         for the event to be signaled or for the interval to elapse.
1823
1824         * win/WebKit2.vcproj: Added BinarySemaphoreWin.cpp. Also let VS have its way with the file.
1825
1826 2011-01-27  Chris Marrin  <cmarrin@apple.com>
1827
1828         Reviewed by Anders Carlsson.
1829
1830         WebKit2: Page flashes just before accelerated compositing animation
1831         https://bugs.webkit.org/show_bug.cgi?id=53274
1832
1833         When switching out of compositing mode, the new ChunkedUpdateDrawingAreaProxy
1834         is getting created with the current page size. When the setSize() call is
1835         subsequently made, the sizeDidChange() call is not made (which does the initial
1836         render of the page) because the old size and new size are the same. The solution
1837         is to skip the setting of the size in the ctor and let it go through a size
1838         change sequence.
1839
1840         * UIProcess/DrawingAreaProxy.cpp:
1841         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1842
1843 2011-01-28  Alejandro G. Castro  <alex@igalia.com>
1844
1845         Reviewed by Xan Lopez.
1846
1847         [GTK] Fix dist compilation for the release
1848         https://bugs.webkit.org/show_bug.cgi?id=53290
1849
1850         * GNUmakefile.am: Remove a file that is not in the repository
1851         anymore.
1852
1853
1854 2011-01-28  Andreas Kling  <kling@webkit.org>
1855
1856         Rubber-stamped by Simon Hausmann.
1857
1858         [Qt][WK2] Combine QWKPage::engine{Connected,Disconnected} into one signal.
1859
1860         Having two signals for this is redundant, combine them into
1861         QWKPage::engineConnectionChanged(bool connected).
1862
1863         * UIProcess/API/qt/qwkpage.cpp:
1864         (QWKPagePrivate::didRelaunchProcess):
1865         (QWKPagePrivate::processDidCrash):
1866         * UIProcess/API/qt/qwkpage.h:
1867
1868 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1869
1870         Reviewed by Maciej Stachowiak.
1871
1872         Build fix for Mac Intel Debug after r76916
1873         https://bugs.webkit.org/show_bug.cgi?id=53284
1874
1875         Fix macro redefinition by guarding the redefined macros.
1876
1877         * config.h:
1878
1879 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1880
1881         Unreviewed build fix for Mac Intel Debug after r76916.
1882
1883         Fix macro redefinition by guarding the redefined macros.
1884
1885         Check if the macro is already defined before defininig it.
1886         c++config.h has the same macros with the same values.
1887
1888         * config.h:
1889
1890 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1891
1892         Reviewed by Adam Barth.
1893
1894         Update the expected results for test-webkitpy after r76916.
1895
1896         Include "config.h" in the expected results as well.
1897
1898         * Scripts/webkit2/messages_unittest.py:
1899
1900 2011-01-27  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1901
1902         Unreviewed buildfix for SnowLeopard Intel Debug.
1903
1904         Fix macro redefinition by not including config.h.
1905
1906         Revert previous change in WebPageProxyCF.cpp.
1907
1908         * UIProcess/cf/WebPageProxyCF.cpp:
1909
1910 2011-01-27  Greg Coletta  <greg.coletta@nokia.com>
1911
1912         Reviewed by Laszlo Gombos.
1913
1914         Get rid of prefix header dependency for WebKit2 build system.
1915         https://bugs.webkit.org/show_bug.cgi?id=50174
1916
1917         Add config.h include explicitelly.
1918
1919         * Platform/CoreIPC/ArgumentDecoder.cpp:
1920         * Platform/CoreIPC/ArgumentEncoder.cpp:
1921         * Platform/CoreIPC/Attachment.cpp:
1922         * Platform/CoreIPC/BinarySemaphore.cpp:
1923         * Platform/CoreIPC/Connection.cpp:
1924         * Platform/CoreIPC/DataReference.cpp:
1925         * Platform/CoreIPC/gtk/ConnectionGtk.cpp:
1926         * Platform/CoreIPC/mac/ConnectionMac.cpp:
1927         * Platform/CoreIPC/qt/ConnectionQt.cpp:
1928         * Platform/CoreIPC/win/ConnectionWin.cpp:
1929         * Platform/Logging.cpp:
1930         * Platform/Module.cpp:
1931         * Platform/Region.cpp:
1932         * Platform/RunLoop.cpp:
1933         * Platform/WorkQueue.cpp:
1934         * Platform/cg/CGUtilities.cpp:
1935         * Platform/gtk/RunLoopGtk.cpp:
1936         * Platform/gtk/SharedMemoryGtk.cpp:
1937         * Platform/gtk/WorkQueueGtk.cpp:
1938         * Platform/mac/MachUtilities.cpp:
1939         * Platform/mac/SharedMemoryMac.cpp:
1940         * Platform/mac/WorkQueueMac.cpp:
1941         * Platform/qt/MappedMemoryPool.cpp:
1942         * Platform/qt/ModuleQt.cpp:
1943         * Platform/qt/RunLoopQt.cpp:
1944         * Platform/qt/WorkQueueQt.cpp:
1945         * Platform/win/ModuleWin.cpp:
1946         * Platform/win/RunLoopWin.cpp:
1947         * Platform/win/SharedMemoryWin.cpp:
1948         * Platform/win/WorkQueueWin.cpp:
1949         * PluginProcess/PluginControllerProxy.cpp:
1950         * PluginProcess/PluginProcess.cpp:
1951         * PluginProcess/WebProcessConnection.cpp:
1952         * Scripts/webkit2/messages.py:
1953         * Shared/API/c/WKArray.cpp:
1954         * Shared/API/c/WKCertificateInfo.cpp:
1955         * Shared/API/c/WKContextMenuItem.cpp:
1956         * Shared/API/c/WKData.cpp:
1957         * Shared/API/c/WKDictionary.cpp:
1958         * Shared/API/c/WKError.cpp:
1959         * Shared/API/c/WKImage.cpp:
1960         * Shared/API/c/WKMutableArray.cpp:
1961         * Shared/API/c/WKMutableDictionary.cpp:
1962         * Shared/API/c/WKNumber.cpp:
1963         * Shared/API/c/WKSecurityOrigin.cpp:
1964         * Shared/API/c/WKSerializedScriptValue.cpp:
1965         * Shared/API/c/WKString.cpp:
1966         * Shared/API/c/WKType.cpp:
1967         * Shared/API/c/WKURL.cpp:
1968         * Shared/API/c/WKURLRequest.cpp:
1969         * Shared/API/c/WKURLResponse.cpp:
1970         * Shared/API/c/WKUserContentURLPattern.cpp:
1971         * Shared/API/c/cf/WKStringCF.cpp:
1972         * Shared/API/c/cf/WKURLCF.cpp:
1973         * Shared/API/c/cf/WKURLRequestCF.cpp:
1974         * Shared/API/c/cf/WKURLResponseCF.cpp:
1975         * Shared/API/c/cg/WKImageCG.cpp:
1976         * Shared/API/c/win/WKCertificateInfoWin.cpp:
1977         * Shared/ChildProcess.cpp:
1978         * Shared/ImmutableArray.cpp:
1979         * Shared/ImmutableDictionary.cpp:
1980         * Shared/MutableArray.cpp:
1981         * Shared/MutableDictionary.cpp:
1982         * Shared/OriginAndDatabases.cpp:
1983         * Shared/PlatformPopupMenuData.cpp:
1984         * Shared/Plugins/NPIdentifierData.cpp:
1985         * Shared/Plugins/NPObjectMessageReceiver.cpp:
1986         * Shared/Plugins/NPObjectProxy.cpp:
1987         * Shared/Plugins/NPRemoteObjectMap.cpp:
1988         * Shared/Plugins/NPVariantData.cpp:
1989         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1990         * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp:
1991         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
1992         * Shared/Plugins/PluginProcessCreationParameters.cpp:
1993         * Shared/PrintInfo.cpp:
1994         * Shared/SessionState.cpp:
1995         * Shared/ShareableBitmap.cpp:
1996         * Shared/UpdateInfo.cpp:
1997         * Shared/VisitedLinkTable.cpp:
1998         * Shared/WebBackForwardListItem.cpp:
1999         * Shared/WebContextMenuItem.cpp:
2000         * Shared/WebContextMenuItemData.cpp:
2001         * Shared/WebError.cpp:
2002         * Shared/WebEvent.cpp:
2003         * Shared/WebEventConversion.cpp:
2004         * Shared/WebGeolocationPosition.cpp:
2005         * Shared/WebImage.cpp:
2006         * Shared/WebKeyboardEvent.cpp:
2007         * Shared/WebMemorySampler.cpp:
2008         * Shared/WebMouseEvent.cpp:
2009         * Shared/WebOpenPanelParameters.cpp:
2010         * Shared/WebPageCreationParameters.cpp:
2011         * Shared/WebPageGroupData.cpp:
2012         * Shared/WebPlatformTouchPoint.cpp:
2013         * Shared/WebPopupItem.cpp:
2014         * Shared/WebPreferencesStore.cpp:
2015         * Shared/WebProcessCreationParameters.cpp:
2016         * Shared/WebTouchEvent.cpp:
2017         * Shared/WebURLRequest.cpp:
2018         * Shared/WebURLResponse.cpp:
2019         * Shared/WebWheelEvent.cpp:
2020         * Shared/cairo/ShareableBitmapCairo.cpp:
2021         * Shared/cf/ArgumentCodersCF.cpp:
2022         * Shared/cg/ShareableBitmapCG.cpp:
2023         * Shared/gtk/ShareableBitmapGtk.cpp:
2024         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2025         * Shared/mac/CommandLineMac.cpp:
2026         * Shared/mac/UpdateChunk.cpp:
2027         * Shared/qt/CleanupHandler.cpp:
2028         * Shared/qt/NativeWebKeyboardEventQt.cpp:
2029         * Shared/qt/ShareableBitmapQt.cpp:
2030         * Shared/qt/UpdateChunk.cpp:
2031         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2032         * Shared/qt/WebEventFactoryQt.cpp:
2033         * Shared/qt/WebURLRequestQt.cpp:
2034         * Shared/qt/WebURLResponseQt.cpp:
2035         * Shared/win/CommandLineWin.cpp:
2036         * Shared/win/NativeWebKeyboardEventWin.cpp:
2037         * Shared/win/PlatformCertificateInfo.cpp:
2038         * Shared/win/UpdateChunk.cpp:
2039         * Shared/win/WebCoreArgumentCodersWin.cpp:
2040         * Shared/win/WebEventFactory.cpp:
2041         * Shared/win/WebURLRequestWin.cpp:
2042         * Shared/win/WebURLResponseWin.cpp:
2043         * UIProcess/API/C/WKAuthenticationChallenge.cpp:
2044         * UIProcess/API/C/WKAuthenticationDecisionListener.cpp:
2045         * UIProcess/API/C/WKBackForwardList.cpp:
2046         * UIProcess/API/C/WKBackForwardListItem.cpp:
2047         * UIProcess/API/C/WKContext.cpp:
2048         * UIProcess/API/C/WKCredential.cpp:
2049         * UIProcess/API/C/WKDatabaseManager.cpp:
2050         * UIProcess/API/C/WKDownload.cpp:
2051         * UIProcess/API/C/WKFormSubmissionListener.cpp:
2052         * UIProcess/API/C/WKFrame.cpp:
2053         * UIProcess/API/C/WKFramePolicyListener.cpp:
2054         * UIProcess/API/C/WKGeolocationManager.cpp:
2055         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp:
2056         * UIProcess/API/C/WKGeolocationPosition.cpp:
2057         * UIProcess/API/C/WKInspector.cpp:
2058         * UIProcess/API/C/WKNavigationData.cpp:
2059         * UIProcess/API/C/WKOpenPanelParameters.cpp:
2060         * UIProcess/API/C/WKOpenPanelResultListener.cpp:
2061         * UIProcess/API/C/WKPage.cpp:
2062         * UIProcess/API/C/WKPageGroup.cpp:
2063         * UIProcess/API/C/WKPreferences.cpp:
2064         * UIProcess/API/C/WKProtectionSpace.cpp:
2065         * UIProcess/API/C/win/WKContextWin.cpp:
2066         * UIProcess/API/C/win/WKView.cpp:
2067         * UIProcess/API/C/win/WKViewPrivate.cpp:
2068         * UIProcess/API/cpp/qt/WKStringQt.cpp:
2069         * UIProcess/API/cpp/qt/WKURLQt.cpp:
2070         * UIProcess/API/qt/ClientImpl.cpp:
2071         * UIProcess/API/qt/qgraphicswkview.cpp:
2072         * UIProcess/API/qt/qwkcontext.cpp:
2073         * UIProcess/API/qt/qwkpage.cpp:
2074         * UIProcess/API/qt/qwkpreferences.cpp:
2075         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2076         * UIProcess/Authentication/AuthenticationDecisionListener.cpp:
2077         * UIProcess/Authentication/WebCredential.cpp:
2078         * UIProcess/Authentication/WebProtectionSpace.cpp:
2079         * UIProcess/BackingStore.cpp:
2080         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2081         * UIProcess/Downloads/DownloadProxy.cpp:
2082         * UIProcess/DrawingAreaProxy.cpp:
2083         * UIProcess/DrawingAreaProxyImpl.cpp:
2084         * UIProcess/FindIndicator.cpp:
2085         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp:
2086         * UIProcess/GeolocationPermissionRequestProxy.cpp:
2087         * UIProcess/Launcher/ProcessLauncher.cpp:
2088         * UIProcess/Launcher/ThreadLauncher.cpp:
2089         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
2090         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2091         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2092         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
2093         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
2094         * UIProcess/Launcher/win/ThreadLauncherWin.cpp:
2095         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2096         * UIProcess/Plugins/PluginInfoStore.cpp:
2097         * UIProcess/Plugins/PluginProcessManager.cpp:
2098         * UIProcess/Plugins/PluginProcessProxy.cpp:
2099         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2100         * UIProcess/Plugins/qt/PluginInfoStoreQt.cpp:
2101         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
2102         * UIProcess/ResponsivenessTimer.cpp:
2103         * UIProcess/TiledDrawingAreaProxy.cpp:
2104         * UIProcess/VisitedLinkProvider.cpp:
2105         * UIProcess/WebBackForwardList.cpp:
2106         * UIProcess/WebContext.cpp:
2107         * UIProcess/WebContextInjectedBundleClient.cpp:
2108         * UIProcess/WebContextMenuProxy.cpp:
2109         * UIProcess/WebDatabaseManagerProxy.cpp:
2110         * UIProcess/WebDatabaseManagerProxyClient.cpp:
2111         * UIProcess/WebDownloadClient.cpp:
2112         * UIProcess/WebEditCommandProxy.cpp:
2113         * UIProcess/WebFindClient.cpp:
2114         * UIProcess/WebFormClient.cpp:
2115         * UIProcess/WebFormSubmissionListenerProxy.cpp:
2116         * UIProcess/WebFrameListenerProxy.cpp:
2117         * UIProcess/WebFramePolicyListenerProxy.cpp:
2118         * UIProcess/WebFrameProxy.cpp:
2119         * UIProcess/WebGeolocationManagerProxy.cpp:
2120         * UIProcess/WebGeolocationProvider.cpp:
2121         * UIProcess/WebHistoryClient.cpp:
2122         * UIProcess/WebInspectorProxy.cpp:
2123         * UIProcess/WebLoaderClient.cpp:
2124         * UIProcess/WebNavigationData.cpp:
2125         * UIProcess/WebOpenPanelResultListenerProxy.cpp:
2126         * UIProcess/WebPageContextMenuClient.cpp:
2127         * UIProcess/WebPageGroup.cpp:
2128         * UIProcess/WebPageProxy.cpp:
2129         * UIProcess/WebPolicyClient.cpp:
2130         * UIProcess/WebPreferences.cpp:
2131         * UIProcess/WebProcessManager.cpp:
2132         * UIProcess/WebProcessProxy.cpp:
2133         * UIProcess/WebResourceLoadClient.cpp:
2134         * UIProcess/WebUIClient.cpp:
2135         * UIProcess/cf/WebBackForwardListCF.cpp:
2136         * UIProcess/cf/WebPageProxyCF.cpp:
2137         * UIProcess/cf/WebPreferencesCF.cpp:
2138         * UIProcess/gtk/TextCheckerGtk.cpp:
2139         * UIProcess/gtk/WebInspectorGtk.cpp:
2140         * UIProcess/gtk/WebPageProxyGtk.cpp:
2141         * UIProcess/gtk/WebPreferencesGtk.cpp:
2142         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
2143         * UIProcess/qt/TextCheckerQt.cpp:
2144         * UIProcess/qt/TiledDrawingAreaProxyQt.cpp:
2145         * UIProcess/qt/TiledDrawingAreaTileQt.cpp:
2146         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2147         * UIProcess/qt/WebContextQt.cpp:
2148         * UIProcess/qt/WebInspectorProxyQt.cpp:
2149         * UIProcess/qt/WebPageProxyQt.cpp:
2150         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2151         * UIProcess/qt/WebPreferencesQt.cpp:
2152         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
2153         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
2154         * UIProcess/win/TextCheckerWin.cpp:
2155         * UIProcess/win/WebContextMenuProxyWin.cpp:
2156         * UIProcess/win/WebContextWin.cpp:
2157         * UIProcess/win/WebInspectorProxyWin.cpp:
2158         * UIProcess/win/WebPageProxyWin.cpp:
2159         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2160         * UIProcess/win/WebView.cpp:
2161         * WebKit2.xcodeproj/project.pbxproj:
2162         * WebProcess/Authentication/AuthenticationManager.cpp:
2163         * WebProcess/Downloads/Download.cpp:
2164         * WebProcess/Downloads/DownloadManager.cpp:
2165         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2166         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2167         * WebProcess/Downloads/qt/DownloadQt.cpp:
2168         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2169         * WebProcess/Geolocation/WebGeolocationManager.cpp:
2170         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2171         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardList.cpp:
2172         * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp:
2173         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2174         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2175         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
2176         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2177         * WebProcess/InjectedBundle/API/c/WKBundlePageGroup.cpp:
2178         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
2179         * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
2180         * WebProcess/InjectedBundle/API/c/WKBundleScriptWorld.cpp:
2181         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2182         * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
2183         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2184         * WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
2185         * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.cpp:
2186         * WebProcess/InjectedBundle/InjectedBundleClient.cpp:
2187         * WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
2188         * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp:
2189         * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp:
2190         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
2191         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2192         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2193         * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp:
2194         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2195         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
2196         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
2197         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
2198         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2199         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2200         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2201         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2202         * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp:
2203         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2204         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2205         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2206         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2207         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2208         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2209         * WebProcess/Plugins/Plugin.cpp:
2210         * WebProcess/Plugins/PluginProcessConnection.cpp:
2211         * WebProcess/Plugins/PluginProcessConnectionManager.cpp:
2212         * WebProcess/Plugins/PluginProxy.cpp:
2213         * WebProcess/Plugins/PluginView.cpp:
2214         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2215         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2216         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2217         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2218         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2219         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2220         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
2221         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2222         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2223         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2224         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
2225         * WebProcess/WebCoreSupport/WebSearchPopupMenu.cpp:
2226         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2227         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2228         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2229         * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp:
2230         * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp:
2231         * WebProcess/WebCoreSupport/qt/WebPopupMenuQt.cpp:
2232         * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp:
2233         * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp:
2234         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2235         * WebProcess/WebKitMain.cpp:
2236         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2237         * WebProcess/WebPage/DecoderAdapter.cpp:
2238         * WebProcess/WebPage/DrawingArea.cpp:
2239         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2240         * WebProcess/WebPage/EncoderAdapter.cpp:
2241         * WebProcess/WebPage/FindController.cpp:
2242         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
2243         * WebProcess/WebPage/PageOverlay.cpp:
2244         * WebProcess/WebPage/TiledDrawingArea.cpp:
2245         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2246         * WebProcess/WebPage/WebContextMenu.cpp:
2247         * WebProcess/WebPage/WebEditCommand.cpp:
2248         * WebProcess/WebPage/WebFrame.cpp:
2249         * WebProcess/WebPage/WebInspector.cpp:
2250         * WebProcess/WebPage/WebOpenPanelResultListener.cpp:
2251         * WebProcess/WebPage/WebPage.cpp:
2252         * WebProcess/WebPage/WebPageGroupProxy.cpp:
2253         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2254         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
2255         * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp:
2256         * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp:
2257         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2258         * WebProcess/WebPage/qt/WebPageQt.cpp:
2259         * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp:
2260         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp:
2261         * WebProcess/WebPage/win/WebInspectorWin.cpp:
2262         * WebProcess/WebPage/win/WebPageWin.cpp:
2263         * WebProcess/WebProcess.cpp:
2264         * WebProcess/gtk/WebProcessGtk.cpp:
2265         * WebProcess/gtk/WebProcessMainGtk.cpp:
2266         * WebProcess/qt/WebProcessMainQt.cpp:
2267         * WebProcess/qt/WebProcessQt.cpp:
2268         * WebProcess/win/WebProcessMainWin.cpp:
2269         * WebProcess/win/WebProcessWin.cpp:
2270         * config.h: Copied from Source/WebKit2/WebKit2Prefix.h.
2271         * win/WebKit2Common.vsprops:
2272
2273 2011-01-27  Maciej Stachowiak  <mjs@apple.com>
2274
2275         Reviewed by Darin Adler.
2276
2277         execCommand("Paste") doesn't work in WebKitTestRunner
2278         https://bugs.webkit.org/show_bug.cgi?id=52785
2279         
2280         Thread through the new JavaScriptCanAccessClipboard setting.
2281
2282         * Shared/WebPreferencesStore.h:
2283         * UIProcess/API/C/WKPreferences.cpp:
2284         (WKPreferencesSetJavaScriptCanAccessClipboard):
2285         (WKPreferencesGetJavaScriptCanAccessClipboard):
2286         * UIProcess/API/C/WKPreferences.h:
2287         * WebProcess/WebPage/WebPage.cpp:
2288         (WebKit::WebPage::updatePreferences):
2289
2290 2011-01-27  Nate Chapin  <japhet@chromium.org>
2291
2292         Reviewed by Adam Barth.
2293
2294         Use Document::url() instead of FrameLoader::url().
2295         https://bugs.webkit.org/show_bug.cgi?id=41165
2296
2297         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2298         (WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
2299         (WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage):
2300         (WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
2301         (WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage):
2302         * WebProcess/WebPage/WebFrame.cpp:
2303         (WebKit::WebFrame::url):
2304
2305 2011-01-27  Sam Weinig  <sam@webkit.org>
2306
2307         Reviewed by Anders Carlsson.
2308
2309         Encode/Decode hasPreciseScrollingDeltas bit in WebWheelEvent
2310         https://bugs.webkit.org/show_bug.cgi?id=53254
2311
2312         * Shared/WebWheelEvent.cpp:
2313         (WebKit::WebWheelEvent::WebWheelEvent):
2314         Initialize m_phase and m_hasPreciseScrollingDeltas.
2315
2316         (WebKit::WebWheelEvent::encode):
2317         (WebKit::WebWheelEvent::decode):
2318         Add missing coding for m_hasPreciseScrollingDeltas.
2319
2320 2011-01-26  Enrica Casucci  <enrica@apple.com>
2321
2322         Reviewed by Darin Adler and Adam Roben.
2323
2324         WebKit2: add support for drag and drop on Windows
2325         https://bugs.webkit.org/show_bug.cgi?id=52775
2326         <rdar://problem/8514409>
2327
2328         On Windows the access to the content being dragged is
2329         provided via the IDataObject interface that is made available
2330         to the window that registers itself as drop target.
2331         Since this interface cannot be accessed from the WebProcess,
2332         in every call to one of the methods of the IDropTarget interface
2333         we serialize the content of the drag clipboard and send it over to
2334         the WebProcess. The implementation uses the same messages as the
2335         Mac one, with slightly different parameters to pass the serialized
2336         clipboard.
2337
2338         * UIProcess/WebPageProxy.cpp:
2339         (WebKit::WebPageProxy::performDragControllerAction): Added Windows
2340         specific implementation.
2341         * UIProcess/WebPageProxy.h:
2342         * UIProcess/win/WebView.cpp:
2343         (WebKit::WebView::WebView): Added dropTargetHelper object creation.
2344         (WebKit::WebView::initialize): Added to register for drag/drop with out
2345         refcount issues.
2346         (WebKit::WebView::close):
2347         (WebKit::WebView::windowReceivedMessage):
2348         (WebKit::WebView::QueryInterface):
2349         (WebKit::WebView::AddRef):
2350         (WebKit::WebView::Release):
2351         (WebKit::dragOperationToDragCursor):
2352         (WebKit::WebView::keyStateToDragOperation):
2353         (WebKit::WebView::DragEnter):
2354         (WebKit::WebView::DragOver):
2355         (WebKit::WebView::DragLeave):
2356         (WebKit::WebView::Drop):
2357         * UIProcess/win/WebView.h:
2358         (WebKit::WebView::create):
2359         * WebProcess/WebPage/WebPage.cpp:
2360         (WebKit::WebPage::performDragControllerAction):
2361         * WebProcess/WebPage/WebPage.h:
2362         * WebProcess/WebPage/WebPage.messages.in:
2363
2364 2011-01-26  Alexey Proskuryakov  <ap@apple.com>
2365
2366         Reviewed by Darin Adler.
2367
2368         https://bugs.webkit.org/show_bug.cgi?id=53197
2369         <rdar://problem/8895682> Make WebKit2 printing asynchronous
2370
2371         <rdar://problem/8899988> REGRESSION(WebKit2): Attempting to print WHATWG HTML spec shows
2372         1-page blank preview
2373
2374         <rdar://problem/8900078> WebKit2 printing has a separate message exchange per page when
2375         printing instead of printing all at once
2376
2377         * UIProcess/API/mac/WKPrintingView.h: Store a lot more cached information.
2378
2379         * UIProcess/API/mac/WKPrintingView.mm:
2380         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]): Use PrintOperation stored in
2381         class. We generally want that now, because current operation will not be set up on other threads.
2382         (-[WKPrintingView _isPrintingPreview]): Added. Preview is different, because it can draw
2383         a placeholder - but actual printing need to wait until UI process has data.
2384         (-[WKPrintingView _updatePreview]): Force AppKit to update print preview when we have real
2385         data to replace placeholder with.
2386         (-[WKPrintingView _hasPageRects]): Return if page rects have already been computed.
2387         (-[WKPrintingView _expectedPreviewCallbackForRect:]): Find an existing request for this rect,
2388         if any.
2389         (pageDidDrawToPDF): Update preview - or if actually printing, release control to printing thread.
2390         (-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ask for a PDF document with
2391         pages the user asked to print.
2392         (pageDidComputePageRects): When web process returns page geometry data, we update preview to display
2393         a page count (which indirectly triggers a request for a preview). When actually printing,
2394         request a PDF right away, we'll need it later.
2395         (-[WKPrintingView _askPageToComputePageRects]): Ask web process for page geometry.
2396         (prepareDataForPrintingOnSecondaryThread): This function starts preparing all data necessary
2397         for actual printing on main thread.
2398         (-[WKPrintingView knowsPageRange:]): Changed to be async for preview, and to call main
2399         thread for actual printing.
2400         (-[WKPrintingView _pageForRect:]): Find page number for a given range, assuming that AppKit
2401         always asks for full pages.
2402         (-[WKPrintingView _drawPDFDocument:page:atPoint:]): A helper function to draw a PDF document.
2403         (-[WKPrintingView _drawPreview:]): Draw the whole page for preview.
2404         (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
2405         Draw the whole page for actual printing.
2406         (-[WKPrintingView _drawPageBorderWithSizeOnMainThread:]): Call drawPageBorderWithSize: with
2407         correct graphics context and print operation.
2408         (-[WKPrintingView drawPageBorderWithSize:]): Delegate work to main thread when called from a
2409         secondary one.
2410         (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]): Added an assertion that
2411         our stored NSPrintOperation isn't out of sync with reality.
2412         (-[WKPrintingView rectForPage:]): Handle the case where we don't have the data yet, drawing
2413         a placeholder.
2414         (-[WKPrintingView endDocument]): When page setup changes, we must reset all state.
2415
2416         * UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): Tell
2417         NSPrintingView which operation it's serving, so that it knows it even when current operation
2418         isn't set.
2419
2420         * UIProcess/GenericCallback.h:
2421         (WebKit::ComputedPagesCallback::create):
2422         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
2423         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
2424         (WebKit::ComputedPagesCallback::invalidate):
2425         (WebKit::ComputedPagesCallback::callbackID):
2426         (WebKit::ComputedPagesCallback::generateCallbackID):
2427         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
2428         Added ComputedPagesCallback, which returns a vector of IntRects and a double. Hopefully,
2429         it will become a specialization of GenericCallback one day.
2430
2431         * UIProcess/WebPageProxy.cpp:
2432         (WebKit::WebPageProxy::close): Added m_voidCallbacks - it looks like they were omitted
2433         by accident.
2434         (WebKit::WebPageProxy::computedPagesCallback): Added.
2435         (WebKit::WebPageProxy::processDidCrash): Added m_computedPagesCallbacks.
2436         (WebKit::WebPageProxy::computePagesForPrinting): Async now!
2437         (WebKit::WebPageProxy::drawRectToPDF): Ditto.
2438         (WebKit::WebPageProxy::drawPagesToPDF): Added.
2439         * UIProcess/WebPageProxy.h:
2440
2441         * UIProcess/WebPageProxy.messages.in: Added ComputedPagesCallback.
2442
2443         * WebProcess/WebPage/WebPage.cpp:
2444         (WebKit::WebPage::beginPriting): Compute page rects right away - we'll need them in
2445         drawPagesToPDF(), which doesn't have a PrintInfo.
2446         (WebKit::WebPage::computePagesForPrinting): Send async response.
2447         (WebKit::WebPage::drawRectToPDF): This function used to draw into original
2448         location at frame coordinates, and now it draws at (0, 0).
2449         (WebKit::WebPage::drawPagesToPDF): Added - make a multi-page PDF.
2450         * WebProcess/WebPage/WebPage.h:
2451
2452         * WebProcess/WebPage/WebPage.messages.in: Added DrawPagesToPDF.
2453
2454 2011-01-27  Alejandro G. Castro  <alex@igalia.com>
2455
2456         Unreviewed GTK build fix after r76797.
2457
2458         * Shared/WebPreferencesStore.h: Use Qt fonts preference for the moment.
2459
2460 2011-01-27  Dan Bernstein  <mitz@apple.com>
2461
2462         Reviewed by Anders Carlsson.
2463
2464         Allow pop-up menus to contain multiple items that have the same title.
2465
2466         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2467         (WebKit::WebPopupMenuProxyMac::populate): Set the item’s title after adding it rather than
2468         when adding it, so that it will not replace any existing item with the same title.
2469
2470 2011-01-27  Andreas Kling  <kling@webkit.org>
2471
2472         Reviewed by Kenneth Rohde Christiansen.
2473
2474         [Qt][WK2] Add QWKPage APIs regarding engine process availability
2475         https://bugs.webkit.org/show_bug.cgi?id=53237
2476
2477         QWKPage will now emit engineConnected() and engineDisconnected()
2478         when the web process crashes and is relaunched respectively.
2479
2480         Also added QWKPage::isConnectedToEngine() for convenience.
2481
2482         * UIProcess/API/qt/qwkpage.cpp:
2483         (QWKPagePrivate::QWKPagePrivate):
2484         (QWKPagePrivate::didRelaunchProcess):
2485         (QWKPagePrivate::processDidCrash):
2486         (QWKPage::isConnectedToEngine):
2487         * UIProcess/API/qt/qwkpage.h:
2488         * UIProcess/API/qt/qwkpage_p.h:
2489
2490 2011-01-27  Balazs Kelemen  <kbalazs@webkit.org>
2491
2492         Reviewed by Andreas Kling.
2493
2494         [Qt][WK2] Lots of layout test failures due to wrong font type
2495         https://bugs.webkit.org/show_bug.cgi?id=53233
2496
2497         * Shared/WebPreferencesStore.h:
2498         Specialize default font families for Qt.
2499
2500 2011-01-26  Maciej Stachowiak  <mjs@apple.com>
2501
2502         Reviewed by Dan Bernstein.
2503
2504         WebKitTestRunner needs to support layoutTestController.evaluateInWebInspector
2505         https://bugs.webkit.org/show_bug.cgi?id=42319
2506
2507         Add WKBundleInspector and APIs needed to implement WebKitTestRunner APIs.
2508         
2509         * GNUmakefile.am:
2510         * Shared/API/c/WKBase.h:
2511         * Shared/APIObject.h:
2512         * WebKit2.pro:
2513         * WebKit2.xcodeproj/project.pbxproj:
2514         * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
2515         * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: Added.
2516         (WKBundleInspectorGetTypeID):
2517         (WKBundleInspectorShow):
2518         (WKBundleInspectorClose):
2519         (WKBundleInspectorEvaluateScriptForTest):
2520         (WKBundleInspectorSetPageProfilingEnabled):
2521         * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: Added.
2522         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2523         (WKBundlePageGetInspector):
2524         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2525         * WebProcess/WebPage/WebInspector.cpp:
2526         (WebKit::WebInspector::create):
2527         (WebKit::WebInspector::evaluateScriptForTest):
2528         * WebProcess/WebPage/WebInspector.h:
2529         (WebKit::WebInspector::type):
2530         * WebProcess/WebPage/WebPage.cpp:
2531         (WebKit::WebPage::inspector):
2532         * WebProcess/WebPage/WebPage.h:
2533         * win/WebKit2.vcproj:
2534         * win/WebKit2Generated.make:
2535
2536 2011-01-26  David Kilzer  <ddkilzer@apple.com>
2537
2538         <http://webkit.org/b/53192> Add experimental support for HTTP pipelining in CFNetwork
2539         <rdar://problem/8821760>
2540
2541         Reviewed by Antti Koivisto.
2542
2543         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2544         (InitWebCoreSystemInterface): Added initialization for
2545         GetHTTPPipeliningPriority and SetHTTPPipeliningPriority.
2546
2547 2011-01-26  Beth Dakin  <bdakin@apple.com>
2548
2549         Reviewed by Darin Adler.
2550
2551         Fix for <rdar://problem/8895140> Adopt WKScrollbar metrics 
2552         when using WKScrollbars.
2553
2554         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2555         (InitWebCoreSystemInterface):
2556
2557 2011-01-26  Sam Weinig  <sam@webkit.org>
2558
2559         Reviewed by Maciej Stachowiak.
2560
2561         Add events to represent the start/end of a gesture scroll
2562         https://bugs.webkit.org/show_bug.cgi?id=53215
2563
2564         * Scripts/webkit2/messages.py:
2565         * Shared/WebEvent.h:
2566         (WebKit::WebGestureEvent::WebGestureEvent):
2567         (WebKit::WebGestureEvent::position):
2568         (WebKit::WebGestureEvent::globalPosition):
2569         * Shared/WebEventConversion.cpp:
2570         (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent):
2571         (WebKit::platform):
2572         * Shared/WebEventConversion.h:
2573         * Shared/WebGestureEvent.cpp: Added.
2574         (WebKit::WebGestureEvent::WebGestureEvent):
2575         (WebKit::WebGestureEvent::encode):
2576         (WebKit::WebGestureEvent::decode):
2577         (WebKit::WebGestureEvent::isGestureEventType):
2578         * Shared/mac/WebEventFactory.h:
2579         * Shared/mac/WebEventFactory.mm:
2580         (WebKit::gestureEventTypeForEvent):
2581         (WebKit::WebEventFactory::createWebGestureEvent):
2582         * UIProcess/API/mac/WKView.mm:
2583         (-[WKView shortCircuitedEndGestureWithEvent:]):
2584         (-[WKView beginGestureWithEvent:]):
2585         (-[WKView viewDidMoveToWindow]):
2586         * UIProcess/WebPageProxy.cpp:
2587         (WebKit::WebPageProxy::handleGestureEvent):
2588         (WebKit::WebPageProxy::didReceiveEvent):
2589         * UIProcess/WebPageProxy.h:
2590         * WebKit2.xcodeproj/project.pbxproj:
2591         * WebProcess/WebPage/WebPage.cpp:
2592         (WebKit::handleGestureEvent):
2593         (WebKit::WebPage::gestureEvent):
2594         * WebProcess/WebPage/WebPage.h:
2595         * WebProcess/WebPage/WebPage.messages.in:
2596         Pipe gesture events down to WebCore.
2597
2598 2011-01-26  Dan Bernstein  <mitz@apple.com>
2599
2600         Reviewed by Dave Hyatt.
2601
2602         <rdar://problem/8446709> Allow inter-ideograph justification for CJK
2603         https://bugs.webkit.org/show_bug.cgi?id=53184
2604
2605         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2606         (WebKit::WebPopupMenu::setUpPlatformData): Added a TrailingExpansionBehavior parameter to the
2607         RenderText constructor.
2608
2609 2011-01-26  Jing Jin  <jjin@apple.com>
2610
2611         Reviewed by Darin Adler.
2612
2613         Methods to temporarily disable size updates to the page drawing area in WKView.
2614         https://bugs.webkit.org/show_bug.cgi?id=53206
2615         Part of <rdar://problem/8818585>
2616
2617         * UIProcess/API/mac/WKView.h: Added _frameSizeUpdateDisabledCount.
2618         * UIProcess/API/mac/WKView.mm:
2619         (-[WKView setFrameSize:]): Only update page size if frame size updates are enabled.
2620         (-[WKView _setDrawingAreaSize:]): Helper method to set the page's drawing area's size.
2621         (-[WKView disableFrameSizeUpdates]): Increment _frameSizeUpdateDisabledCount
2622         (-[WKView enableFrameSizeUpdates]): Decrement _frameSizeUpdateDisabledCount, and if the count is 0, meaning
2623         that no one is disabling frame size updates anymore, update the drawing area's size to match the current frame.
2624         (-[WKView frameSizeUpdatesDisabled]): Returns YES if at least one caller is disabling frame size updates.
2625         * UIProcess/API/mac/WKViewInternal.h: Declared -disableFrameSizeUpdates, -enableFrameSizeUpdates, and -frameSizeUpdatesDisabled.
2626         * UIProcess/API/mac/WKViewPrivate.h: Added.
2627         * WebKit2.xcodeproj/project.pbxproj: Added WKViewPrivate.h
2628
2629 2011-01-26  Jing Jin  <jjin@apple.com>
2630
2631         Rubber-stamped by Dan Bernstein.
2632         
2633         Several WKView Internal category methods are implemented in the main category.
2634         https://bugs.webkit.org/show_bug.cgi?id=53195
2635
2636         * UIProcess/API/mac/WKView.mm:
2637         (-[WKView _setEventBeingResent:]): Moved into implementation of WKView (Internal).
2638         (-[WKView _interceptKeyEvent:]): Moved into implementation of WKView (Internal).
2639         (-[WKView _getTextInputState:selectionEnd:underlines:WebCore::]): Moved into implementation of WKView (Internal).
2640         (-[WKView _setAccessibilityChildToken:]): Moved into implementation of WKView (Internal).
2641
2642 2011-01-26  Brian Weinstein  <bweinstein@apple.com>
2643
2644         Reviewed by John Sullivan.
2645
2646         WebKit2: Need API to get the frame load state of a BundleFrame
2647         https://bugs.webkit.org/show_bug.cgi?id=53193
2648
2649         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2650         (WKBundleFrameGetFrameLoadState): Call through to the FrameLoader to get the frame load state.
2651         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2652
2653 2011-01-25  Brian Weinstein  <bweinstein@apple.com>
2654
2655         Reviewed by Antti Koivisto.
2656
2657         Crashes loading pages when cancelling subresource loads through WebKit
2658         https://bugs.webkit.org/show_bug.cgi?id=53123
2659         <rdar://problem/8914361>
2660
2661         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2662         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType): If our URL is null, return early instead of dispatching
2663             a message.
2664
2665 2011-01-25  Chris Fleizach  <cfleizach@apple.com>
2666
2667         Reviewed by Darin Adler.
2668
2669         WK2 leaks when a page is closed
2670         https://bugs.webkit.org/show_bug.cgi?id=53100
2671
2672         Allow the WKView a chance to clean up on a page close. In this case,
2673         cleaning up means removing the references the accessibility token has
2674         to the window.
2675
2676         * UIProcess/API/mac/PageClientImpl.h:
2677         * UIProcess/API/mac/PageClientImpl.mm:
2678         (WebKit::PageClientImpl::pageClosed):
2679         * UIProcess/API/mac/WKView.mm:
2680         (-[WKView _setRemoteAccessibilityWindow:]):
2681         (-[WKView _setAccessibilityChildToken:]):
2682         (-[WKView _processDidCrash]):
2683         (-[WKView _pageClosed]):
2684         * UIProcess/API/mac/WKViewInternal.h:
2685         * UIProcess/API/qt/qwkpage_p.h:
2686         (QWKPagePrivate::pageClosed):
2687         * UIProcess/PageClient.h:
2688         * UIProcess/WebPageProxy.cpp:
2689         (WebKit::WebPageProxy::close):
2690         * UIProcess/win/WebView.cpp:
2691         (WebKit::WebView::pageClosed):
2692         * UIProcess/win/WebView.h:
2693
2694 2011-01-25  Chris Marrin  <cmarrin@apple.com>
2695
2696         Reviewed by Adam Roben.
2697
2698         Expose WebGL flag set/get in WK2
2699         https://bugs.webkit.org/show_bug.cgi?id=53096
2700
2701         * Shared/WebPreferencesStore.h:
2702         * UIProcess/API/C/WKPreferences.cpp:
2703         (WKPreferencesSetWebGLEnabled):
2704         (WKPreferencesGetWebGLEnabled):
2705         * UIProcess/API/C/WKPreferencesPrivate.h:
2706         * WebProcess/WebPage/WebPage.cpp:
2707         (WebKit::WebPage::updatePreferences):
2708
2709 2011-01-25  Anders Carlsson  <andersca@apple.com>
2710
2711         Reviewed by Adam Roben.
2712
2713         Add and implement LayerTreeHost::scheduleLayerFlush
2714         https://bugs.webkit.org/show_bug.cgi?id=53135
2715
2716         * WebKit2.xcodeproj/project.pbxproj:
2717         Add LayerTreeHostMac.mm.
2718
2719         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2720         (WebKit::DrawingAreaImpl::scheduleCompositingLayerSync):
2721         Call LayerTreeHost::scheduleLayerFlush.
2722
2723         * WebProcess/WebPage/LayerTreeHost.cpp:
2724         (WebKit::LayerTreeHost::~LayerTreeHost):
2725         Call platformInvalidate().
2726
2727         (WebKit::LayerTreeHost::flushPendingLayerChanges):
2728         Rename from syncCompositingLayers.
2729
2730         * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Added.
2731         (WebKit::LayerTreeHost::scheduleLayerFlush):
2732         Create a run loop observer if needed. This code is copied from LayerBackedDrawingAreaMac.mm
2733
2734         (WebKit::LayerTreeHost::platformInvalidate):
2735         Invalidate the run loop observer.
2736
2737         (WebKit::LayerTreeHost::flushPendingLayerChangesRunLoopObserverCallback):
2738         Call flushPendingChanges() and remove the run loop observer if it succeeded.
2739
2740 2011-01-25  Anders Carlsson  <andersca@apple.com>
2741
2742         Reviewed by Simon Fraser.
2743
2744         Add LayerTreeHost class
2745         https://bugs.webkit.org/show_bug.cgi?id=53132
2746
2747         * WebKit2.xcodeproj/project.pbxproj:
2748         Add LayerTreeHost files.
2749
2750         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2751         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2752         Initialize m_layerTreeHost.
2753
2754         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
2755         Call the m_layerTreeHost.
2756
2757         * WebProcess/WebPage/LayerTreeHost.cpp: Added.
2758         (WebKit::LayerTreeHost::attachRootCompositingLayer):
2759         (WebKit::LayerTreeHost::detachRootCompositingLayer):
2760         Add stubbed out functions.
2761
2762         (WebKit::LayerTreeHost::syncCompositingLayers):
2763         Sync the compositing layers in the main frame.
2764
2765         * WebProcess/WebPage/LayerTreeHost.h: Added.
2766
2767 2011-01-25  Steve Falkenburg  <sfalken@apple.com>
2768
2769         Rubber-stamped by Adam Roben.
2770
2771         Windows production build fix.
2772         Use correct environment variable escaping
2773
2774         * win/WebKit2.make:
2775         * win/WebKit2Generated.make:
2776
2777 2011-01-25  Anders Carlsson  <andersca@apple.com>
2778
2779         Reviewed by Sam Weinig.
2780
2781         Don't inform the UI process about compositing changes when using the new drawing area
2782         https://bugs.webkit.org/show_bug.cgi?id=53120
2783
2784         * WebProcess/WebPage/WebPage.cpp:
2785         (WebKit::WebPage::changeAcceleratedCompositingMode):
2786         Return early if we're using the new drawing area.
2787
2788         (WebKit::WebPage::exitAcceleratedCompositingMode):
2789         Call setRootCompositingLayer(0) so the drawing area knows when we leave accelerated compositing.
2790
2791 2011-01-25  Sam Weinig  <sam@webkit.org>
2792
2793         Reviewed by Anders Carlsson.
2794
2795         Pipe a timestamp down into the PlatformWheelEvent for the Mac.
2796         https://bugs.webkit.org/show_bug.cgi?id=53111
2797
2798         * Shared/WebEventConversion.cpp:
2799         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2800         Assign the timestamp.
2801
2802 2011-01-25  Sam Weinig  <sam@webkit.org>
2803
2804         Reviewed by Anders Carlsson.
2805
2806         Add hasPreciseScrollingDeltas bit to PlatformWheelEvent on the Mac.
2807         https://bugs.webkit.org/show_bug.cgi?id=53107
2808
2809         * Shared/WebEvent.h:
2810         (WebKit::WebWheelEvent::hasPreciseScrollingDeltas):
2811         * Shared/WebEventConversion.cpp:
2812         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2813         * Shared/WebWheelEvent.cpp:
2814         (WebKit::WebWheelEvent::WebWheelEvent):
2815         * Shared/mac/WebEventFactory.mm:
2816         (WebKit::WebEventFactory::createWebWheelEvent):
2817
2818 2011-01-25  Anders Carlsson  <andersca@apple.com>
2819
2820         Reviewed by Sam Weinig.
2821
2822         need a way to request the host CALayer render server port
2823         https://bugs.webkit.org/show_bug.cgi?id=53101
2824         <rdar://problem/8913620>
2825
2826         * PluginProcess/PluginControllerProxy.cpp:
2827         (WebKit::PluginControllerProxy::compositingRenderServerPort):
2828         Get the render server port from the plug-in process.
2829
2830         * PluginProcess/PluginControllerProxy.h:
2831         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2832         (WebKit::NPN_GetValue):
2833         Call NetscapePlugin::compositingRenderServerPort.
2834
2835         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2836         (WebKit::NetscapePlugin::compositingRenderServerPort):
2837         Call PluginController::compositingRenderServerPort.
2838
2839         * WebProcess/Plugins/PluginView.cpp:
2840         (WebKit::PluginView::compositingRenderServerPort):
2841         Get the render server port from the web process.
2842
2843         * WebProcess/Plugins/PluginView.h:
2844         Add compositingRenderServerPort.
2845
2846 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
2847
2848         Rubber stamped by Dan Bernstein.
2849
2850         Change some floating point constants from 1.0 to 1.
2851
2852         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2853         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2854
2855 2011-01-25  Maciej Stachowiak  <mjs@apple.com>
2856
2857         Reviewed by Anders Carlsson.
2858
2859         Improve scale factor resetting
2860         https://bugs.webkit.org/show_bug.cgi?id=53093
2861         
2862         Two key changes:
2863         - Don't set the scale factor to what it already is, as this causes an
2864         uneeded force layout and scroll
2865         - Don't ever set the scale factor based on a non-main frame committing
2866         
2867         This fixes two WebKit2 layout tests.
2868
2869         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2870         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2871
2872 2011-01-24  Chris Marrin  <cmarrin@apple.com>
2873
2874         Reviewed by Eric Seidel.
2875
2876         Change ENABLE_3D_CANVAS to ENABLE_WEBGL
2877         https://bugs.webkit.org/show_bug.cgi?id=53041
2878
2879         * Configurations/FeatureDefines.xcconfig:
2880
2881 2011-01-25  Andreas Kling  <kling@webkit.org>
2882
2883         Reviewed by Kenneth Rohde Christiansen.
2884
2885         [Qt][WK2] Add QWKPage::processCrashed() signal
2886         https://bugs.webkit.org/show_bug.cgi?id=53076
2887
2888         * UIProcess/API/qt/qwkpage.cpp:
2889         (QWKPagePrivate::processDidCrash):
2890         * UIProcess/API/qt/qwkpage.h:
2891         * UIProcess/API/qt/qwkpage_p.h:
2892
2893 2011-01-24  Anders Carlsson  <andersca@apple.com>
2894
2895         Fix build.
2896         
2897         * WebProcess/mac/WebProcessMac.mm:
2898         (WebKit::initializeSandbox):
2899
2900 2011-01-24  Anders Carlsson  <andersca@apple.com>
2901
2902         Reviewed by Dan Bernstein.
2903
2904         Reset the page scale factor on standard frame loads
2905         https://bugs.webkit.org/show_bug.cgi?id=53058
2906         <rdar://problem/8908844>
2907
2908         * UIProcess/WebPageProxy.cpp:
2909         (WebKit::WebPageProxy::scaleWebView):
2910         Don't set m_viewScaleFactor here. It will be set in viewScaleFactorDidChange.
2911
2912         (WebKit::WebPageProxy::viewScaleFactorDidChange):
2913         Update m_viewScaleFactor.
2914
2915         * UIProcess/WebPageProxy.h:
2916         Add viewScaleFactorDidChange.
2917
2918         * UIProcess/WebPageProxy.messages.in:
2919         Add ViewScaleFactorDidChange message.
2920
2921         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2922         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
2923         Set the scale factor.
2924
2925         (WebKit::WebFrameLoaderClient::restoreViewState):
2926         Inform the UI process about the new view scale factor.
2927
2928         * WebProcess/WebPage/WebPage.cpp:
2929         (WebKit::WebPage::scaleWebView):
2930         Send a ViewScaleFactorDidChange message.
2931
2932 2011-01-24  Maciej Stachowiak  <mjs@apple.com>
2933
2934         Reviewed by Anders Carlsson.
2935
2936         Use designated temp directory for the database for WebKit2
2937         https://bugs.webkit.org/show_bug.cgi?id=53052
2938         
2939         Add the API necessary to support this. Database path is now
2940         determined on the UI process side and passed to the Web process.
2941         Reviewed by Anders Carlsson.
2942
2943         * GNUmakefile.am:
2944         * Shared/WebProcessCreationParameters.cpp:
2945         (WebKit::WebProcessCreationParameters::encode):
2946         (WebKit::WebProcessCreationParameters::decode):
2947         * Shared/WebProcessCreationParameters.h:
2948         * UIProcess/API/C/WKContext.cpp:
2949         (WKContextSetDatabaseDirectory):
2950         * UIProcess/API/C/WKContextPrivate.h:
2951         * UIProcess/WebContext.cpp:
2952         (WebKit::WebContext::ensureWebProcess):
2953         (WebKit::WebContext::databaseDirectory):
2954         * UIProcess/WebContext.h:
2955         (WebKit::WebContext::setDatabaseDirectory):
2956         * UIProcess/mac/WebContextMac.mm:
2957         (WebKit::WebContext::platformDefaultDatabaseDirectory):
2958         * UIProcess/qt/WebContextQt.cpp:
2959         (WebKit::WebContext::platformDefaultDatabaseDirectory):
2960         * UIProcess/win/WebContextWin.cpp:
2961         (WebKit::WebContext::platformDefaultDatabaseDirectory):
2962         * WebKit2.pro:
2963         * WebKit2.xcodeproj/project.pbxproj:
2964         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2965         (WebKit::WebDatabaseManager::initialize):
2966         (WebKit::WebDatabaseManager::WebDatabaseManager):
2967         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
2968         * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Removed.
2969         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm: Removed.
2970         * WebProcess/WebCoreSupport/qt/WebDatabaseManagerQt.cpp: Removed.
2971         * WebProcess/WebCoreSupport/win/WebDatabaseManagerWin.cpp: Removed.
2972         * WebProcess/WebProcess.cpp:
2973         (WebKit::WebProcess::WebProcess):
2974         (WebKit::WebProcess::initializeWebProcess):
2975         * WebProcess/com.apple.WebProcess.sb:
2976         * WebProcess/mac/WebProcessMac.mm:
2977         (WebKit::initializeSandbox):
2978         * win/WebKit2.vcproj:
2979
2980 2011-01-24  Brent Fulgham  <bfulgham@webkit.org>
2981
2982         Unreviewed build fix.
2983
2984         * win/WebKit2.vcproj: Don't build the CG Utilities when building
2985         without CG support.
2986
2987 2011-01-24  Anders Carlsson  <andersca@apple.com>
2988
2989         Reviewed by John Sullivan.
2990
2991         Don't use the timeout checker for non-user-interaction messages
2992         https://bugs.webkit.org/show_bug.cgi?id=53046
2993
2994         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2995         (WebKit::ChunkedUpdateDrawingAreaProxy::didSetSize):
2996         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
2997         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
2998         (WebKit::LayerBackedDrawingAreaProxy::sizeDidChange):
2999         (WebKit::LayerBackedDrawingAreaProxy::didSetSize):
3000
3001 2011-01-24  Adam Roben  <aroben@apple.com>
3002
3003         Windows Production build fix
3004
3005         * win/WebKit2.make: Update for move of WebKit2 into Source.
3006
3007 2011-01-24  Jessie Berlin  <jberlin@apple.com>
3008
3009         Reviewed by Adam Roben.
3010
3011         WebKit2: LayoutTests: The UNIMPLEMENTED warnings in TextCheckerWin should be disabled
3012         https://bugs.webkit.org/show_bug.cgi?id=53029
3013
3014         * UIProcess/win/TextCheckerWin.cpp:
3015         Disable the warnings for this file.
3016
3017 2011-01-24  Anders Carlsson  <andersca@apple.com>
3018
3019         Reviewed by Sam Weinig.
3020
3021         Wait for half a second if we're asked to paint when receiving a DidSetSize message
3022         https://bugs.webkit.org/show_bug.cgi?id=53028
3023
3024         * UIProcess/DrawingAreaProxyImpl.cpp:
3025         (WebKit::DrawingAreaProxyImpl::paint):
3026
3027 2011-01-24  Anders Carlsson  <andersca@apple.com>
3028
3029         Reviewed by Sam Weinig.
3030
3031         Implement forceRedisplay in the new drawing area
3032         https://bugs.webkit.org/show_bug.cgi?id=53026
3033
3034         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3035         (WebKit::DrawingAreaImpl::forceRepaint):
3036         * WebProcess/WebPage/DrawingAreaImpl.h:
3037
3038 2011-01-24  Anders Carlsson  <andersca@apple.com>
3039
3040         Reviewed by Sam Weinig.
3041
3042         Fill unpainted rects with the background color.
3043         https://bugs.webkit.org/show_bug.cgi?id=53025
3044
3045         * UIProcess/API/mac/WKView.mm:
3046         (drawPageBackground):
3047         Add new helper function.
3048
3049         (-[WKView drawRect:]):
3050         Iterate over the unpainted rects and fill them with the background color.
3051
3052 2011-01-24  Dan Bernstein  <mitz@apple.com>
3053
3054         Reviewed by John Sullivan.
3055
3056         WebKit2 version of <rdar://problem/6097826> Mail's cursor does not become a resize cursor when moving mouse from scrolled email to the horizontal splitter
3057
3058         * UIProcess/API/mac/PageClientImpl.mm:
3059         (WebKit::PageClientImpl::setCursor): If the current cursor comes from a cursor rect, do not override it.
3060
3061 2011-01-24  Balazs Kelemen  <kbalazs@webkit.org>
3062
3063         Rubber-stamped by Csaba Osztrogonác.
3064
3065         Typo fix.
3066
3067         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3068         (WebKit::ProcessLauncher::launchProcess): Move the bracket to the right place.
3069
3070 2011-01-24  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
3071
3072         Reviewed by Kenneth Rohde Christiansen.
3073
3074         [Qt] Remove CleanupHandler by passing file descriptors.
3075
3076         Deleting files in signal handler of UI process is not a good idea,
3077         because the memory where filenames are stored might not be valid
3078         after a crash.
3079
3080         To avoid the need of using signal handlers for cleanup,
3081         change following:
3082           1) Avoid passing filenames between processes, pass fds
3083           2) When mmap'ing files, delete them immediately after
3084              opening and mmap'ing them.
3085           3) Pass sockets with fds during fork+exec instead of
3086              passing them via the filesystem.
3087           4) Use mmap'ed files for implementation of SharedMemory.
3088              QSharedMemory does not support cleanup correctly.
3089
3090         Consquences:
3091           - Move MappedMemory to SharedMemory, make UpdateChunk use this.
3092           - Implement CoreIPC::Attachment using mmaped files.
3093           - Send messages using datagram socket. This solution works
3094             similiarly to Mach ports on Mac.
3095           - Send big messages out-of-line and thus avoid increasing
3096             the receive buffer.
3097           - Remove MemoryMappedPool and rely on libc/kernel caching
3098             of mmapped areas.
3099           - Unmap memory areas after use.
3100           - When UI process crashes, kill the web process using SIGKILL.
3101             This is possible again because cleanup handler is not needed.
3102
3103         [WK2][Qt] Multiple problems with MemoryMappedPool
3104         https://bugs.webkit.org/show_bug.cgi?id=51984
3105
3106         * Platform/CoreIPC/Attachment.cpp:
3107         (CoreIPC::Attachment::Attachment):
3108         * Platform/CoreIPC/Attachment.h:
3109         (CoreIPC::Attachment::size):
3110         (CoreIPC::Attachment::releaseFileDescriptor):
3111         (CoreIPC::Attachment::fileDescriptor):
3112         * Platform/CoreIPC/Connection.h:
3113         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3114         (CoreIPC::MessageInfo::MessageInfo):
3115         (CoreIPC::MessageInfo::setMessageBodyOOL):
3116         (CoreIPC::MessageInfo::isMessageBodyOOL):
3117         (CoreIPC::MessageInfo::bodySize):
3118         (CoreIPC::MessageInfo::messageID):
3119         (CoreIPC::MessageInfo::attachmentCount):
3120         (CoreIPC::Connection::platformInitialize):
3121         (CoreIPC::Connection::platformInvalidate):
3122         (CoreIPC::SocketNotifierDisableGuard::SocketNotifierDisableGuard):
3123         (CoreIPC::SocketNotifierDisableGuard::~SocketNotifierDisableGuard):
3124         (CoreIPC::Connection::readyReadHandler):
3125         (CoreIPC::Connection::open):
3126         (CoreIPC::Connection::platformCanSendOutgoingMessages):
3127         (CoreIPC::Connection::sendOutgoingMessage):
3128         * Platform/SharedMemory.h:
3129         * Platform/WorkQueue.h:
3130         * Platform/qt/MappedMemoryPool.cpp: Removed.
3131         * Platform/qt/MappedMemoryPool.h: Removed.
3132         * Platform/qt/SharedMemoryQt.cpp:
3133         (WebKit::SharedMemory::Handle::Handle):
3134         (WebKit::SharedMemory::Handle::~Handle):
3135         (WebKit::SharedMemory::Handle::isNull):
3136         (WebKit::SharedMemory::Handle::encode):
3137         (WebKit::SharedMemory::Handle::decode):
3138         (WebKit::SharedMemory::Handle::releaseToAttachment):
3139         (WebKit::SharedMemory::Handle::adoptFromAttachment):
3140         (WebKit::SharedMemory::create):
3141         (WebKit::accessModeMMap):
3142         (WebKit::SharedMemory::~SharedMemory):
3143         (WebKit::accessModeFile):
3144         (WebKit::SharedMemory::createHandle):
3145         * Platform/qt/WorkQueueQt.cpp:
3146         (WorkQueue::registerSocketEventHandler):
3147         * Shared/qt/UpdateChunk.cpp:
3148         (WebKit::UpdateChunk::UpdateChunk):
3149         (WebKit::UpdateChunk::~UpdateChunk):
3150         (WebKit::UpdateChunk::encode):
3151         (WebKit::UpdateChunk::decode):
3152         (WebKit::UpdateChunk::createImage):
3153         * Shared/qt/UpdateChunk.h:
3154         * UIProcess/Launcher/ProcessLauncher.h:
3155         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3156         (WebKit::QtWebProcess::QtWebProcess):
3157         (WebKit::QtWebProcess::setupChildProcess):
3158         (WebKit::ProcessLauncher::launchProcess):
3159         (WebKit::ProcessLauncher::platformInvalidate):
3160         * UIProcess/Launcher/qt/ThreadLauncherQt.cpp:
3161         (WebKit::webThreadBody):
3162         (WebKit::ThreadLauncher::createWebThread):
3163         * WebKit2.pro:
3164         * WebProcess/qt/WebProcessMainQt.cpp:
3165         (WebKit::WebProcessMainQt):
3166
3167 2011-01-24  Andras Becsi  <abecsi@webkit.org>
3168
3169         Reviewed by Csaba Osztrogonác.
3170
3171         [Qt] Move project files into Source
3172         https://bugs.webkit.org/show_bug.cgi?id=52891
3173
3174         * DerivedSources.pro:
3175         * WebKit2.pro:
3176         * WebProcess.pro:
3177
3178 2011-01-23  Damian Kaleta  <dkaleta@apple.com>
3179
3180         Reviewed by Kevin Decker.
3181
3182         <rdar://problem/8905171>
3183         https://bugs.webkit.org/show_bug.cgi?id=52985 
3184
3185         * UIProcess/WebPageProxy.cpp:
3186         (WebKit::WebPageProxy::scaleWebView): Eliminated early return inside WebPageProxy::scaleWebView, making it 
3187         consistent with WebKit1.
3188
3189 2011-01-23  Alexey Proskuryakov  <ap@apple.com>
3190
3191         Reviewed by Dan Bernstein.
3192
3193         https://bugs.webkit.org/show_bug.cgi?id=52968
3194         Use a separate NSView for printing
3195
3196         Also addresses <rdar://problem/8900148> Improper check for 
3197         -[NSGraphicsContext currentContextDrawingToScreen]
3198
3199         * UIProcess/API/mac/WKPrintingView.h: Added.
3200         * UIProcess/API/mac/WKPrintingView.mm: Added.
3201         (-[WKPrintingView initWithFrameProxy:]):
3202         (-[WKPrintingView isFlipped]):
3203         (-[WKPrintingView _adjustPrintingMarginsForHeaderAndFooter]):
3204         (-[WKPrintingView knowsPageRange:]):
3205         (-[WKPrintingView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3206         (-[WKPrintingView drawPageBorderWithSize:]):
3207         (-[WKPrintingView _provideTotalScaleFactorForPrintOperation:]):
3208         (-[WKPrintingView rectForPage:]):
3209         * UIProcess/API/mac/WKView.mm:
3210         (-[WKView drawRect:]):
3211         (-[WKView canChangeFrameLayout:]):
3212         (-[WKView printOperationWithPrintInfo:forFrame:]):
3213         * WebKit2.xcodeproj/project.pbxproj:
3214         Moved printing code to a separate view, simplifying as appropriate. The view is currently not
3215         referenced by anything in WebKit2 directly, being owned by NSPrintOperation.
3216
3217 2011-01-22  Anders Carlsson  <andersca@apple.com>
3218
3219         Reviewed by Sam Weinig.
3220
3221         Transparent windows with compositing WebKit2 content show garbage
3222         https://bugs.webkit.org/show_bug.cgi?id=52966
3223         <rdar://problem/8765051>
3224
3225         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
3226         (WebKit::LayerBackedDrawingAreaProxy::paint):
3227         If the WKView should draw transparent background, do so.
3228
3229 2011-01-22  Anders Carlsson  <andersca@apple.com>
3230
3231         Reviewed by Sam Weinig.
3232
3233         Add an asynchronous WKPageForceRepaint
3234         https://bugs.webkit.org/show_bug.cgi?id=52964
3235         <rdar://problem/8898527>
3236
3237         * UIProcess/API/C/WKPage.cpp:
3238         (WKPageForceRepaint):
3239         Call WebPageProxy::forceRepaint.
3240
3241         * UIProcess/API/C/WKPage.h:
3242         Add WKPageForceRepaint.
3243
3244         * UIProcess/GenericCallback.h:
3245         Add a "generic" VoidCallback class.
3246
3247         * UIProcess/WebPageProxy.cpp:
3248         (WebKit::WebPageProxy::forceRepaint):
3249         Insert the callback in the m_voidCallbacks map and send a forceRepaint message.
3250
3251         (WebKit::WebPageProxy::voidCallback):
3252         Call the right void callback.
3253
3254         (WebKit::WebPageProxy::processDidCrash):
3255         Invalidate m_voidCallbacks.
3256
3257         * UIProcess/WebPageProxy.messages.in:
3258         Add a VoidCallback message.
3259
3260         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3261         (WebKit::ChunkedUpdateDrawingArea::forceRepaint):
3262         Force a repaint.
3263
3264         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3265         Add forceRepaint.
3266
3267         * WebProcess/WebPage/WebPage.cpp:
3268         (WebKit::WebPage::forceRepaint):
3269         Call forceRepaint on the drawing area.
3270
3271         * WebProcess/WebPage/WebPage.messages.in:
3272         Add a ForceRepaint message.
3273
3274 2011-01-21  Nikolas Zimmermann  <nzimmermann@rim.com>
3275
3276         Reviewed by Dirk Schulze.
3277
3278         Introduce FontMetrics abstraction
3279         https://bugs.webkit.org/show_bug.cgi?id=51456
3280
3281         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Use FontMetrics instead of Font to access the metrics.
3282         (WebKit::WebPopupMenu::setUpPlatformData):
3283
3284 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
3285
3286         Reviewed by Dan Bernstein.
3287
3288         https://bugs.webkit.org/show_bug.cgi?id=52950
3289         Leak in WebPage::drawRectToPDF
3290
3291         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Use RetainPtr here, too.
3292
3293 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
3294
3295         Reviewed by Dan Bernstein.
3296
3297         https://bugs.webkit.org/show_bug.cgi?id=52951
3298         WebKit2 generates a bad PDF for cross process messaging
3299
3300         * UIProcess/API/mac/WKView.mm:
3301         (-[WKView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3302         Use a correct offset when flipping.
3303
3304 2011-01-21  Alexey Proskuryakov  <ap@apple.com>
3305
3306         Reviewed by Dan Bernstein.
3307
3308         https://bugs.webkit.org/show_bug.cgi?id=52943
3309         Objective-C files should use #import, not #include
3310
3311         * UIProcess/API/C/WebKit2.h: This is an interesting one, because it's cross-platform, and
3312         there is more than one WKView.h.
3313
3314         * Platform/mac/ModuleMac.mm:
3315         * Platform/mac/RunLoopMac.mm:
3316         * PluginProcess/mac/PluginControllerProxyMac.mm:
3317         * PluginProcess/mac/PluginProcessMac.mm:
3318         * PluginProcess/mac/PluginProcessMainMac.mm:
3319         * Shared/API/c/mac/WKCertificateInfoMac.mm:
3320         * Shared/API/c/mac/WKURLRequestNS.mm:
3321         * Shared/API/c/mac/WKURLResponseNS.mm:
3322         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3323         * Shared/mac/PlatformCertificateInfo.mm:
3324         * Shared/mac/SandboxExtensionMac.mm:
3325         * Shared/mac/WebCoreArgumentCodersMac.mm:
3326         * Shared/mac/WebMemorySampler.mac.mm:
3327         * Shared/mac/WebURLRequestMac.mm:
3328         * Shared/mac/WebURLResponseMac.mm:
3329         * UIProcess/API/mac/FindIndicatorWindow.mm:
3330         * UIProcess/API/mac/WKTextInputWindowController.mm:
3331         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3332         * UIProcess/Launcher/mac/ThreadLauncherMac.mm:
3333         * UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
3334         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3335         * UIProcess/mac/BackingStoreMac.mm:
3336         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
3337         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
3338         * UIProcess/mac/TextCheckerMac.mm:
3339         * UIProcess/mac/WebContextMac.mm:
3340         * UIProcess/mac/WebContextMenuProxyMac.mm:
3341         * UIProcess/mac/WebPageProxyMac.mm:
3342         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3343         * UIProcess/mac/WebPreferencesMac.mm:
3344         * WebProcess/Downloads/mac/DownloadMac.mm:
3345         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3346         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
3347         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3348         * WebProcess/WebCoreSupport/mac/WebDatabaseManagerMac.mm:
3349         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
3350         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
3351         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
3352         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
3353         * WebProcess/WebPage/mac/WebPageMac.mm:
3354         * WebProcess/mac/WebProcessMac.mm:
3355
3356 2011-01-21  Mark Rowe  <mrowe@apple.com>
3357
3358         Reviewed by Sam Weinig.
3359
3360         Fix the WebKit2 build with clang.
3361
3362         * Scripts/webkit2/messages.py: Add some more structs to the list.
3363         * UIProcess/DrawingAreaProxy.h: Forward-declare UpdateInfo as a class.
3364         * UIProcess/TextChecker.h: Forward-declare TextCheckerState as a struct.
3365         * UIProcess/WebPageProxy.h: Forward-declare ContextMenuState as a struct.
3366         * UIProcess/mac/TextCheckerMac.mm: Fix the type of the string constants so that they can be passed to
3367         functions expecting NSString* without generating warnings.
3368         * WebProcess/WebPage/DrawingArea.h: Forward-declare WebPageCreationParameters as a struct.
3369         * WebProcess/WebPage/DrawingAreaImpl.h: Forward-declare UpdateInfo as a class.
3370         * WebProcess/WebPage/WebPage.cpp:
3371         (WebKit::WebPage::getResourceDataFromFrame): Add parens around the assignment in the condition of
3372         the if statement to suppress a warning.
3373
3374 2011-01-21  Brian Weinstein  <bweinstein@apple.com>
3375
3376         Reviewed by Adam Roben.
3377
3378         WebKit2: Need API to stop loading a WKFrame
3379         https://bugs.webkit.org/show_bug.cgi?id=52925
3380
3381         * UIProcess/API/C/WKFrame.cpp:
3382         (WKFrameStopLoading): Call through to WebFrameProxy::stopLoading.
3383         * UIProcess/API/C/WKFrame.h:
3384         * UIProcess/WebFrameProxy.cpp:
3385         (WebKit::WebFrameProxy::stopLoading): Send a message to the WebProcess to stop loading the frame
3386             with the passed in ID.
3387         * UIProcess/WebFrameProxy.h:
3388         * WebProcess/WebPage/WebPage.cpp:
3389         (WebKit::WebPage::stopLoadingFrame): Call stopForUserCancel on the passed-in frame.
3390         * WebProcess/WebPage/WebPage.h:
3391         * WebProcess/WebPage/WebPage.messages.in: Add StopLoadingFrame.
3392
3393 2011-01-21  Brady Eidson  <beidson@apple.com>
3394
3395         Reviewed by Adam Roben.
3396
3397         <rdar://problem/8894125> and https://bugs.webkit.org/show_bug.cgi?id=52916
3398         Expose "suggested filename" for a resource based on its resource response.
3399
3400         API pieces:
3401         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3402         (WKBundleFrameCopySuggestedFilenameForResourceURL):
3403         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
3404         
3405         Implementation:
3406         * WebProcess/WebPage/WebFrame.cpp:
3407         (WebKit::WebFrame::suggestedFilenameForResourceURL): See if the DocumentLoader has
3408           a resource for this URL and, if so, return the response's suggested filename.
3409         * WebProcess/WebPage/WebFrame.h:
3410
3411 2011-01-21  Anders Carlsson  <andersca@apple.com>
3412
3413         Reviewed by Dan Bernstein.
3414
3415         DrawingAreaProxyImpl::paint should return the unpainted region
3416         https://bugs.webkit.org/show_bug.cgi?id=52918
3417
3418         * UIProcess/API/mac/WKView.mm:
3419         (-[WKView drawRect:]):
3420         Add unpaintedRegion parameter.
3421
3422         * UIProcess/BackingStore.h:
3423         (WebKit::BackingStore::size):
3424         Add a size getter.
3425
3426         * UIProcess/DrawingAreaProxyImpl.cpp:
3427         (WebKit::DrawingAreaProxyImpl::paint):
3428         Initialize the unpainted region to the dirty region, then subtract the painted region.
3429
3430 2011-01-21  Anders Carlsson  <andersca@apple.com>
3431
3432         Reviewed by Dan Bernstein and Maciej Stachowiak.
3433
3434         Fix for <rdar://problem/8896057>
3435
3436         Give the Web Process access to the PubSub agent.
3437
3438         * WebProcess/com.apple.WebProcess.sb:
3439
3440 2011-01-21  Sam Weinig  <sam@webkit.org>
3441
3442         Reviewed by Anders Carlsson.
3443
3444         Part 2 of "Cleanup Scrollbar/ScrollbarClient relationship"
3445         https://bugs.webkit.org/show_bug.cgi?id=52779
3446
3447         Rename ScrollbarClient -> ScrollableArea.
3448
3449         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3450         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
3451         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
3452         * UIProcess/win/WebPopupMenuProxyWin.h:
3453
3454 2011-01-21  Adam Roben  <aroben@apple.com>
3455
3456         Update for WKCACFLayerRenderer -> CACFLayerView rename
3457
3458         Fixes <http://webkit.org/b/52898> WKCACFLayerRenderer sounds like a render object, but isn't
3459
3460         Reviewed by Simon Fraser.
3461
3462         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Just removed all the unnecessary
3463         #includes.
3464
3465 2011-01-20  Darin Adler  <darin@apple.com>
3466
3467         Reviewed by Dan Bernstein.
3468
3469         WebKit2: Implement showModalDialog
3470         https://bugs.webkit.org/show_bug.cgi?id=52855
3471
3472         * Shared/WebPageCreationParameters.h: Added canRunModal.
3473
3474         * UIProcess/API/C/WKPage.h: Added a runModal function pointer to
3475         WKPageUIClient. Also removed a lot of redundant typedefs and added
3476         a new one, WKPageCallback, for callbacks without arguments or return
3477         values.
3478
3479         * UIProcess/API/qt/qwkpage.cpp:
3480         (QWKPage::QWKPage): Added a runModal function pointer of 0.
3481
3482         * UIProcess/WebPageProxy.cpp:
3483         (WebKit::WebPageProxy::creationParameters): Set canRunModal
3484         based on return value of WebUIClient::canRunModal.
3485
3486         * UIProcess/WebPageProxy.h: Added runModal.
3487         Calls WebUIClient::runModal.
3488
3489         * UIProcess/WebPageProxy.messages.in: Added RunModal message.
3490         Also removed the periods from the phrases in the comments
3491         as Maciej requested a while back.
3492
3493         * UIProcess/WebUIClient.cpp:
3494         (WebKit::WebUIClient::canRunModal): Added. Returns true or false
3495         based on whether a runModal function was supplied in the
3496         WKPageUIClient structure.
3497         (WebKit::WebUIClient::runModal): Added. Calls the runModal
3498         function from the WKPageUIClient structure.
3499         * UIProcess/WebUIClient.h: Declared the above functions.
3500
3501         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3502         (WebKit::WebChromeClient::canRunModal): Call through to WebPage.
3503         (WebKit::WebChromeClient::runModal): Ditto.
3504
3505         * WebProcess/WebPage/WebPage.cpp:
3506         (WebKit::WebPage::WebPage): Initialize m_canRunModal based on the
3507         creation parameters. Initialize m_isRunningModal to false.
3508         (WebKit::WebPage::close): Stop the nested run loop if we are running modal.
3509         (WebKit::WebPage::runModal): Send a message to ask the UI process to run
3510         modal and then start a nested run loop. It gets stopped when the page is closed.
3511         * WebProcess/WebPage/WebPage.h: Defined the canRunModal function
3512         and declared the runModal function.
3513
3514 2011-01-20  Alexey Proskuryakov  <ap@apple.com>
3515
3516         Reviewed by Darin Adler.
3517
3518         https://bugs.webkit.org/show_bug.cgi?id=52849
3519         Make window.print work with WebKit2
3520
3521         * UIProcess/API/qt/qwkpage.cpp:
3522         (QWKPage::QWKPage):
3523         * UIProcess/WebPageProxy.cpp:
3524         (WebKit::WebPageProxy::printFrame):
3525         * UIProcess/WebPageProxy.h:
3526         * UIProcess/WebPageProxy.messages.in:
3527         * UIProcess/WebUIClient.cpp:
3528         (WebKit::WebUIClient::printFrame):
3529         * UIProcess/WebUIClient.h:
3530         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3531         (WebKit::WebChromeClient::print):
3532         Just pass through deelagte call to a WebKit2 client.
3533
3534         * UIProcess/API/C/WKPage.h: Also added "Callback" suffix to other printing related function
3535         types.
3536
3537 2011-01-20  Anders Carlsson  <andersca@apple.com>
3538
3539         Reviewed by Darin Adler.
3540
3541         Keep track of the latest update timestamp in the backing store
3542         https://bugs.webkit.org/show_bug.cgi?id=52848
3543
3544         * Shared/UpdateInfo.h:
3545         (WebKit::UpdateInfo::UpdateInfo):
3546         Initialize timestamp to 0.
3547
3548         * UIProcess/BackingStore.cpp:
3549         (WebKit::BackingStore::BackingStore):
3550         Initialize m_latestUpdateTimestamp to 0.
3551
3552         (WebKit::BackingStore::incorporateUpdate):
3553         If the update is too old, discard it. Otherwise, create a bitmap
3554         and pass it to platformIncorporateUpdate. Finally update the timestamp.
3555
3556         * UIProcess/BackingStore.h:
3557         Add m_latestUpdateTimestamp.
3558
3559         * UIProcess/mac/BackingStoreMac.mm:
3560         (WebKit::BackingStore::platformIncorporateUpdate):
3561         Update now that we are already given the shareable bitmap.
3562
3563 2011-01-20  Beth Dakin  <bdakin@apple.com>
3564
3565         Reviewed by Geoffrey Garen.
3566
3567         Fix for <rdar://problem/8890255>
3568
3569         Allow WebKitSystemInterface to draw scrollbars 
3570         when appropriate.
3571         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
3572         (InitWebCoreSystemInterface):
3573
3574 2011-01-20  Sam Weinig  <sam@webkit.org>
3575
3576         Reviewed by Dave Hyatt.
3577
3578         Cleanup Scrollbar/ScrollbarClient relationship
3579         https://bugs.webkit.org/show_bug.cgi?id=52779
3580
3581         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3582         (WebKit::WebPopupMenuProxyWin::scrollPosition):
3583         (WebKit::WebPopupMenuProxyWin::setScrollOffset):
3584         (WebKit::WebPopupMenuProxyWin::scrollTo):
3585         (WebKit::WebPopupMenuProxyWin::onMouseWheel):
3586         (WebKit::WebPopupMenuProxyWin::scrollToRevealSelection):
3587         * UIProcess/win/WebPopupMenuProxyWin.h:
3588         (WebKit::WebPopupMenuProxyWin::verticalScrollbar):
3589
3590 2011-01-20  Anders Carlsson  <andersca@apple.com>
3591
3592         Reviewed by Adam Roben.
3593
3594         Add a timestamp to UpdateInfo
3595         https://bugs.webkit.org/show_bug.cgi?id=52844
3596
3597         * Shared/UpdateInfo.cpp:
3598         (WebKit::UpdateInfo::encode):
3599         (WebKit::UpdateInfo::decode):
3600         * Shared/UpdateInfo.h:
3601         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3602         (WebKit::DrawingAreaImpl::setSize):
3603         (WebKit::DrawingAreaImpl::display):
3604
3605 2011-01-20  Anders Carlsson  <andersca@apple.