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