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