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