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