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