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