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