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