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