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