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