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