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