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