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