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