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