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