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