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