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