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