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