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