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