2011-01-17 Pavel Feldman <pfeldman@chromium.org>
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
2
3         Reviewed by Yury Semikhatsky.
4
5         Web Inspector: simplify debugger enabling routine.
6         https://bugs.webkit.org/show_bug.cgi?id=52472
7
8         * WebProcess/WebPage/WebInspector.cpp:
9         (WebKit::WebInspector::startJavaScriptDebugging):
10
11 2011-01-17  Balazs Kelemen  <kbalazs@webkit.org>
12
13         Reviewed by Andreas Kling.
14
15         [Qt][WK2] Crash due to double destruction of QSharedMemory
16         https://bugs.webkit.org/show_bug.cgi?id=52569
17
18         Avoid deleting the QSharedMemory twice.
19         * Platform/qt/SharedMemoryQt.cpp:
20         (WebKit::SharedMemory::~SharedMemory):
21         * Shared/qt/CleanupHandler.cpp:
22         Renamed m_inDeleteObjects to m_hasStartedDeleting and
23         added a getter for it.
24         (WebKit::CleanupHandler::CleanupHandler):
25         (WebKit::CleanupHandler::deleteObjects):
26         * Shared/qt/CleanupHandler.h:
27         (WebKit::CleanupHandler::unmark):
28         (WebKit::CleanupHandler::hasStartedDeleting):
29
30 2011-01-15  Adam Barth  <abarth@webkit.org>
31
32         Rubber-stamped by Eric Seidel.
33
34         Move WebKit2 into Source
35         https://bugs.webkit.org/show_bug.cgi?id=52438
36
37         * DerivedSources.pro:
38         * GNUmakefile.am:
39         * WebKit2.pro:
40         * WebProcess.pro:
41         * win/WebKit2.vcproj:
42         * win/WebKit2WebProcess.vcproj:
43
44 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
45
46         Reviewed by Antti Koivisto.
47
48         Rename cache() to memoryCache()
49         https://bugs.webkit.org/show_bug.cgi?id=52433
50
51         * WebProcess/WebProcess.cpp:
52         (WebKit::WebProcess::shutdownIfPossible):
53         (WebKit::WebProcess::didClose):
54         * WebProcess/mac/WebProcessMac.mm:
55         (WebKit::WebProcess::platformSetCacheModel):
56         * WebProcess/win/WebProcessWin.cpp:
57         (WebKit::WebProcess::platformSetCacheModel):
58
59 2011-01-13  Geoffrey Garen  <ggaren@apple.com>
60
61         Reviewed by Oliver Hunt.
62
63         Split out a MarkedSpace strategy object from Heap.
64         https://bugs.webkit.org/show_bug.cgi?id=52421
65
66         * Shared/mac/WebMemorySampler.mac.mm:
67         (WebKit::WebMemorySampler::sampleWebKit): Updated for class move.
68
69 2011-01-14  Anders Carlsson  <andersca@apple.com>
70
71         Reviewed by Dan Bernstein.
72
73         Add a new PageClient::displayView function and expose it on WebPageProxy
74         https://bugs.webkit.org/show_bug.cgi?id=52500
75
76         * UIProcess/API/mac/PageClientImpl.h:
77         * UIProcess/API/mac/PageClientImpl.mm:
78         (WebKit::PageClientImpl::displayView):
79         * UIProcess/API/qt/qwkpage.cpp:
80         (QWKPagePrivate::displayView):
81         * UIProcess/API/qt/qwkpage_p.h:
82         * UIProcess/PageClient.h:
83         * UIProcess/WebPageProxy.cpp:
84         (WebKit::WebPageProxy::displayView):
85         * UIProcess/WebPageProxy.h:
86         * UIProcess/win/WebView.cpp:
87         (WebKit::WebView::displayView):
88         * UIProcess/win/WebView.h:
89
90 2011-01-14  Anders Carlsson  <andersca@apple.com>
91
92         Reviewed by Sam Weinig.
93
94         Implement the "should paint bounds instead of indiviual rects" algorithm from WebKit1
95         https://bugs.webkit.org/show_bug.cgi?id=52499
96
97         * WebProcess/WebPage/DrawingAreaImpl.cpp:
98         (WebKit::shouldPaintBoundsRect):
99         Port code from -[WebView _mustDrawUnionedRect:singleRects:count:].
100
101         (WebKit::DrawingAreaImpl::display):
102         If shouldPaintBoundsRect returns true, clear the rects vector and append the bounds rect.
103
104 2011-01-14  Brian Weinstein  <bweinstein@apple.com>
105
106         Reviewed by Geoff Garen.
107
108         ShouldLoadResourceForFrame should use strings, not URLs.
109         https://bugs.webkit.org/show_bug.cgi?id=52476
110
111         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
112         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
113         (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Pass resourceURL as a string instead of
114             a URL, and rename from subresourceURL to resourceURL.
115
116 2011-01-14  Anders Carlsson  <andersca@apple.com>
117
118         Reviewed by Sam Weinig.
119
120         Fix for <rdar://problem/8711576> The web process should be able to read resources from the UI process.
121
122         Based on a patch by Ivan Krstić. This also makes the NSURLCache path a sandbox parameter.
123
124         * Shared/WebProcessCreationParameters.cpp:
125         (WebKit::WebProcessCreationParameters::encode):
126         (WebKit::WebProcessCreationParameters::decode):
127         Encode and decode the uiProcessBundleResourcePath member variable.
128
129         * Shared/WebProcessCreationParameters.h:
130         Add uiProcessBundleResourcePath member variable.
131
132         * UIProcess/mac/WebContextMac.mm:
133         (WebKit::WebContext::platformInitializeWebProcess):
134         Set the uiProcessBundleResourcePath member variable.
135
136         * WebProcess/com.apple.WebProcess.sb:
137         Allow read-only access to UI_PROCESS_BUNDLE_RESOURCE_DIR and all subdirectories.
138
139         * WebProcess/mac/WebProcessMac.mm:
140         (WebKit::initializeSandbox):
141         When initializing the sandbox, pass UI_PROCESS_BUNDLE_RESOURCE_DIR.
142
143         (WebKit::WebProcess::platformInitializeWebProcess):
144         Remove the code that would consume a sandbox extension for the url cache path.
145
146 2011-01-14  Anders Carlsson  <andersca@apple.com>
147
148         Reviewed by Sam Weinig.
149
150         Delay initializing the sandbox until we get the InitializeWebProcess message.
151
152         * WebProcess/mac/WebProcessMac.mm:
153         (WebKit::initializeSandbox):
154         (WebKit::WebProcess::platformInitializeWebProcess):
155         * WebProcess/mac/WebProcessMainMac.mm:
156         (WebKit::WebProcessMain):
157
158 2011-01-14  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
159
160         Reviewed by Kenneth Rohde Christiansen.
161
162         Align import/export directives
163         https://bugs.webkit.org/show_bug.cgi?id=52208
164
165         * Shared/API/c/WKBase.h: Align import/export directives with
166         JavaScriptCore/API/JSBase.h.
167
168 2011-01-14  Pavel Feldman  <pfeldman@chromium.org>
169
170         Reviewed by Yury Semikhatsky.
171
172         Web Inspector: extract InspectorSettings from InspectorState, 
173         simplify it.
174         https://bugs.webkit.org/show_bug.cgi?id=52429
175
176         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
177
178 2011-01-13  Enrica Casucci  <enrica@apple.com>
179
180         Reviewed by Darin Adler.
181
182         WebKit2: Add support for drag and drop
183         https://bugs.webkit.org/show_bug.cgi?id=52343
184         <rdar://problem/7660558>
185                
186         This patch contains the changes required to support dropping content
187         in WebKit on the Mac. The DragData class has been extended to provide
188         additional context from the application (keyboard state, modal windows, etc.)
189         as well as information of the drag pasteboard being used.
190         The support for WebKit as drag source will be added with a separate patch.
191
192         * Shared/DragControllerAction.h: Added.
193         * UIProcess/API/mac/WKView.mm:
194         Added implemention of the methods required to add suport for a drop target.
195         To maintain asynchronous communication with the WebProcess, we always return
196         the previous calculated value for the drag operation.
197         (-[WKView _registerDraggedTypes]):
198         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
199         (-[WKView applicationFlags:]):
200         (-[WKView draggingEntered:]):
201         (-[WKView draggingUpdated:]):
202         (-[WKView draggingExited:]):
203         (-[WKView prepareForDragOperation:]):
204         (-[WKView performDragOperation:]):
205         * UIProcess/WebPageProxy.cpp:
206         (WebKit::WebPageProxy::WebPageProxy):
207         (WebKit::WebPageProxy::performDragControllerAction):
208         (WebKit::WebPageProxy::didPerformDragControllerAction):
209         * UIProcess/WebPageProxy.h:
210         (WebKit::WebPageProxy::dragOperation):
211         (WebKit::WebPageProxy::resetDragOperation):
212         * UIProcess/WebPageProxy.messages.in:
213         * WebKit2.xcodeproj/project.pbxproj:
214         * WebProcess/WebCoreSupport/WebDragClient.cpp:
215         (WebKit::WebDragClient::willPerformDragDestinationAction):
216         (WebKit::WebDragClient::willPerformDragSourceAction):
217         (WebKit::WebDragClient::actionMaskForDrag):
218         (WebKit::WebDragClient::dragSourceActionMaskForPoint):
219         (WebKit::WebDragClient::startDrag):
220         * WebProcess/WebPage/WebPage.cpp:
221         (WebKit::WebPage::performDragControllerAction):
222         * WebProcess/WebPage/WebPage.h:
223         * WebProcess/WebPage/WebPage.messages.in:
224
225 2011-01-13  Dan Bernstein  <mitz@apple.com>
226
227         Reviewed by John Sullivan.
228
229         Incorrect assertion in DrawingAreaImpl::scroll()
230         https://bugs.webkit.org/show_bug.cgi?id=52376
231
232         * WebProcess/WebPage/DrawingAreaImpl.cpp:
233         (WebKit::DrawingAreaImpl::scroll): Changed to take the fast path if the rects have the same area.
234         This made the assertion valid, but I removed it anyway.
235
236 2011-01-12  Balazs Kelemen  <kbalazs@webkit.org>
237
238         Unreviewed.
239
240         Getting rid of the unused 'viewportSize' argument in QWKPagePrivate:init.
241         The argument is unused since http://trac.webkit.org/changeset/75468.
242
243         * UIProcess/API/qt/qgraphicswkview.cpp:
244         (QGraphicsWKView::QGraphicsWKView):
245         * UIProcess/API/qt/qwkpage.cpp:
246         (QWKPagePrivate::init):
247         * UIProcess/API/qt/qwkpage_p.h:
248
249 2011-01-12  Anders Carlsson  <andersca@apple.com>
250
251         Reviewed by Sam Weinig.
252
253         Implement DrawingAreaImpl::scroll
254         https://bugs.webkit.org/show_bug.cgi?id=52346
255
256         * WebProcess/WebPage/DrawingAreaImpl.cpp:
257         (WebKit::DrawingAreaImpl::scroll):
258         If there is already an active scroll, compute the area of both scroll rects and
259         invalidate the smallest one. Compute a new dirty region if necessary and also
260         add the scroll repaint region to the dirty region.
261
262         (WebKit::DrawingAreaImpl::display):
263         Reset the scroll area and scroll delta.
264
265         * WebProcess/WebPage/DrawingAreaImpl.h:
266         Add scroll area and scroll delta member variables.
267
268 2011-01-12  Anders Carlsson  <andersca@apple.com>
269
270         Reviewed by Dan Bernstein.
271
272         Region improvements
273         https://bugs.webkit.org/show_bug.cgi?id=52344
274
275         * Platform/Region.cpp:
276         (WebKit::Region::Shape::move):
277         (WebKit::Region::move):
278         Change Region::move to take an IntSize.
279
280         * Platform/Region.h:
281         (WebKit::intersect):
282         (WebKit::subtract):
283         (WebKit::move):
284         Add convenience functions.
285
286 2011-01-12  Ryosuke Niwa  <rniwa@webkit.org>
287
288         Unreviewed Qt build fix for r75661
289
290         * Shared/WebEvent.h: Don't declare phase() on non-Mac platforms.
291
292 2011-01-12  Beth Dakin  <bdakin@apple.com>
293
294         Reviewed by Anders Carlsson.
295
296         Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 
297         Expose fixed layout through WebKit SPI
298         -and corresponding-
299         <rdar://problem/8844464>
300
301         And now with getters!
302         * UIProcess/API/C/WKPage.cpp:
303         (WKPageUseFixedLayout):
304         (WKPageFixedLayoutSize):
305         * UIProcess/API/C/WKPage.h:
306         * UIProcess/WebPageProxy.h:
307         (WebKit::WebPageProxy::useFixedLayout):
308         (WebKit::WebPageProxy::fixedLayoutSize):
309
310 2011-01-12  Sam Weinig  <sam@webkit.org>
311
312         Reviewed by Anders Carlsson.
313
314         https://bugs.webkit.org/show_bug.cgi?id=52337
315         PlatformWheelEvent should know about the scroll phase on the Mac
316
317         Add a phase parameter on Mac WebWheelEvent and pipe it down to PlatformWheelEvent.
318
319         * Shared/WebEvent.h:
320         (WebKit::WebWheelEvent::phase):
321         * Shared/WebEventConversion.cpp:
322         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
323         * Shared/WebWheelEvent.cpp:
324         (WebKit::WebWheelEvent::WebWheelEvent):
325         (WebKit::WebWheelEvent::encode):
326         (WebKit::WebWheelEvent::decode):
327         * Shared/mac/WebEventFactory.mm:
328         (WebKit::phaseForEvent):
329         (WebKit::WebEventFactory::createWebWheelEvent):
330
331 2011-01-12  Anders Carlsson  <andersca@apple.com>
332
333         Reviewed by Sam Weinig.
334
335         Get rid of an unneeded parameter from DrawingArea::scroll
336         https://bugs.webkit.org/show_bug.cgi?id=52336
337
338         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
339         (WebKit::WebChromeClient::scroll):
340         * WebProcess/WebCoreSupport/WebChromeClient.h:
341         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
342         (WebKit::ChunkedUpdateDrawingArea::scroll):
343         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
344         * WebProcess/WebPage/DrawingArea.h:
345         * WebProcess/WebPage/DrawingAreaImpl.cpp:
346         (WebKit::DrawingAreaImpl::scroll):
347         * WebProcess/WebPage/DrawingAreaImpl.h:
348         * WebProcess/WebPage/LayerBackedDrawingArea.cpp:
349         (WebKit::LayerBackedDrawingArea::scroll):
350         * WebProcess/WebPage/LayerBackedDrawingArea.h:
351         * WebProcess/WebPage/TiledDrawingArea.cpp:
352         (WebKit::TiledDrawingArea::scroll):
353         * WebProcess/WebPage/TiledDrawingArea.h:
354
355 2011-01-12  Anders Carlsson  <andersca@apple.com>
356
357         Reviewed by Sam Weinig.
358
359         Get the new drawing area painting to the screen
360         https://bugs.webkit.org/show_bug.cgi?id=52331
361
362         * UIProcess/DrawingAreaProxyImpl.cpp:
363         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
364         Call setViewNeedsDisplay on all the update rects.
365
366         * UIProcess/WebPageProxy.cpp:
367         (WebKit::WebPageProxy::setViewNeedsDisplay):
368         Call through to the page client.
369
370         (WebKit::WebPageProxy::processDidCrash):
371         Null out the drawing area proxy.
372         
373         * UIProcess/mac/BackingStoreMac.mm:
374         (WebKit::BackingStore::paint):
375         Paint.
376
377 2011-01-12  Anders Carlsson  <andersca@apple.com>
378
379         Reviewed by Sam Weinig.
380
381         More work on getting the drawing area proxy to paint
382         https://bugs.webkit.org/show_bug.cgi?id=52328
383
384         * UIProcess/API/mac/WKView.mm:
385         (-[WKView drawRect:]):
386         Handle the new drawing area.
387
388         * UIProcess/BackingStore.cpp:
389         (WebKit::BackingStore::BackingStore):
390         Assert that the size isn't empty.
391         
392         * UIProcess/BackingStore.h:
393         * UIProcess/mac/BackingStoreMac.mm:
394         (WebKit::BackingStore::incorporateUpdate):
395         Paint all update rects into the bitmap context.
396
397         * WebProcess/WebPage/DrawingAreaImpl.cpp:
398         (WebKit::DrawingAreaImpl::display):
399         Create a handle so the shareable bitmap will actually be transferred over.
400
401 2011-01-12  Anders Carlsson  <andersca@apple.com>
402
403         Fix build.
404
405         * UIProcess/DrawingAreaProxyImpl.cpp:
406         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
407
408 2011-01-12  Anders Carlsson  <andersca@apple.com>
409
410         Reviewed by Sam Weinig.
411
412         Begin stubbing out some more BackingStore member functions
413         https://bugs.webkit.org/show_bug.cgi?id=52323
414
415         * UIProcess/BackingStore.cpp:
416         (WebKit::BackingStore::~BackingStore):
417         This was accidentally made into a constructor; it should be a destructor.
418
419         * UIProcess/DrawingAreaProxyImpl.cpp:
420         (WebKit::DrawingAreaProxyImpl::paint):
421         Call the backing store.
422
423         (WebKit::DrawingAreaProxyImpl::update):
424         Incorporate the update.
425
426         (WebKit::DrawingAreaProxyImpl::incorporateUpdate):
427         Create the backing store if needed and incorporate the update.
428
429         * UIProcess/mac/BackingStoreMac.mm: Added.
430         (WebKit::BackingStore::platformInitialize):
431         Create a bitmap context.
432
433         (WebKit::BackingStore::paint):
434         (WebKit::BackingStore::incorporateUpdate):
435         Add stubs.
436
437         * WebKit2.xcodeproj/project.pbxproj:
438         Add BackingStoreMac.mm
439
440 2011-01-12  Beth Dakin  <bdakin@apple.com>
441
442         Reviewed by Anders Carlsson.
443
444         Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
445         fixed layout through WebKit SPI
446         -and corresponding-
447         <rdar://problem/8844464>
448
449         Store useFixedLayout and fixedLayoutSize in the 
450         WebPageCreationParameters and the WebPageProxy.
451         * Shared/WebPageCreationParameters.cpp:
452         (WebKit::WebPageCreationParameters::encode):
453         (WebKit::WebPageCreationParameters::decode):
454         * Shared/WebPageCreationParameters.h:
455         * UIProcess/API/C/WKPage.cpp:
456         (WKPageSetUseFixedLayout):
457         (WKPageSetFixedLayoutSize):
458         * UIProcess/API/C/WKPage.h:
459         * UIProcess/WebPageProxy.cpp:
460         (WebKit::WebPageProxy::WebPageProxy):
461         (WebKit::WebPageProxy::setUseFixedLayout):
462         (WebKit::WebPageProxy::setFixedLayoutSize):
463         (WebKit::WebPageProxy::creationParameters):
464         * UIProcess/WebPageProxy.h:
465         * WebProcess/WebPage/WebPage.cpp:
466         (WebKit::WebPage::setUseFixedLayout):
467         (WebKit::WebPage::setFixedLayoutSize):
468         * WebProcess/WebPage/WebPage.h:
469         * WebProcess/WebPage/WebPage.messages.in:
470
471 2011-01-12  Anders Carlsson  <andersca@apple.com>
472
473         Reviewed by Beth Dakin.
474
475         Add BackingStore class
476         https://bugs.webkit.org/show_bug.cgi?id=52318
477
478         * UIProcess/BackingStore.cpp: Added.
479         (WebKit::BackingStore::create):
480         (WebKit::BackingStore::BackingStore):
481         * UIProcess/BackingStore.h: Added.
482         * WebKit2.xcodeproj/project.pbxproj:
483
484 2011-01-12  Brady Eidson  <beidson@apple.com>
485
486         Reviewed by Sam Weinig.
487
488         <rdar://problem/8837307>, <rdar://problem/8637038>, and https://bugs.webkit.org/show_bug.cgi?id=52248
489         Back/forward list recovery after a WebProcess crash is crashy itself.
490
491         Add an isEmpty() accessor so the WebProcess knows if it is actually restoring a session:
492         * Shared/SessionState.cpp:
493         (WebKit::SessionState::isEmpty):
494         * Shared/SessionState.h:
495
496         Keep track of the highest used itemID so a relaunched WebProcess can later be informed:
497         * Shared/WebBackForwardListItem.cpp:
498         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
499         (WebKit::WebBackForwardListItem::highedUsedItemID):
500         * Shared/WebBackForwardListItem.h:
501         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
502         (WebKit::generateHistoryItemID):
503         (WebKit::WebBackForwardListProxy::setHighestItemIDFromUIProcess):
504         (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Remove a now-invalid ASSERT, as the UIProcess
505           now tells the WebProcess that a previous WebProcess created.
506         * WebProcess/WebPage/WebBackForwardListProxy.h:
507
508         Encode/decode data relevant to restoring a session on WebPage creation:
509         * Shared/WebPageCreationParameters.cpp:
510         (WebKit::WebPageCreationParameters::encode):
511         (WebKit::WebPageCreationParameters::decode):
512         * Shared/WebPageCreationParameters.h:
513
514         If the WebProcess has crashed since the last load, change reload and the various back/forward APIs to 
515         update the current back/forward item (if necessary) then relaunch the process:
516         * UIProcess/WebPageProxy.cpp:
517         (WebKit::WebPageProxy::reattachToWebProcessWithItem):
518         (WebKit::WebPageProxy::reattachToWebProcess): Renamed from "relaunch()" and made private.
519         (WebKit::WebPageProxy::initializeWebPage):
520         (WebKit::WebPageProxy::loadURL):
521         (WebKit::WebPageProxy::loadURLRequest):
522         (WebKit::WebPageProxy::reload):
523         (WebKit::WebPageProxy::goForward):
524         (WebKit::WebPageProxy::goBack):
525         (WebKit::WebPageProxy::goToBackForwardItem):
526         (WebKit::WebPageProxy::creationParameters):
527         * UIProcess/WebPageProxy.h:
528
529         Rename "RestoreSession" to "RestoreSessionAndNavigateToCurrentItem"
530         * WebProcess/WebPage/WebPage.messages.in:
531         * UIProcess/cf/WebPageProxyCF.cpp:
532         (WebKit::WebPageProxy::restoreFromSessionStateData):
533
534         Restore a session on page creation if the parameters include it:
535         * WebProcess/WebPage/WebPage.cpp:
536         (WebKit::WebPage::WebPage): Call restoreSession if session state exists.
537         (WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
538         (WebKit::WebPage::restoreSession):
539         * WebProcess/WebPage/WebPage.h:
540
541 2011-01-12  Anders Carlsson  <andersca@apple.com>
542
543         Reviewed by Sam Weinig.
544
545         Send Update and DidUpdate messages
546         https://bugs.webkit.org/show_bug.cgi?id=52316
547
548         * UIProcess/DrawingAreaProxy.h:
549         (WebKit::DrawingAreaProxy::update):
550         Add empty stub.
551
552         * UIProcess/DrawingAreaProxy.messages.in:
553         Add Update message.
554
555         * UIProcess/DrawingAreaProxyImpl.cpp:
556         (WebKit::DrawingAreaProxyImpl::update):
557         Just send back a DidUpdate message.
558
559         * WebProcess/WebPage/DrawingArea.h:
560         (WebKit::DrawingArea::didUpdate):
561         Add empty stub.
562
563         * WebProcess/WebPage/DrawingArea.messages.in:
564         Add DidUpdate message.
565
566         * WebProcess/WebPage/DrawingAreaImpl.cpp:
567         (WebKit::DrawingAreaImpl::didUpdate):
568         Call display().
569
570         (WebKit::DrawingAreaImpl::display):
571         Send an Update message.
572
573 2011-01-12  Anders Carlsson  <andersca@apple.com>
574
575         Reviewed by Sam Weinig.
576
577         Make the new drawing area actually draw something
578         https://bugs.webkit.org/show_bug.cgi?id=52314
579
580         * Shared/UpdateInfo.cpp:
581         (WebKit::UpdateInfo::encode):
582         (WebKit::UpdateInfo::decode):
583         Encode and decode newly added fields.
584
585         * Shared/UpdateInfo.h:
586         Add a vector of update rects and a handle for the sharable bitmap.
587
588         * WebProcess/WebPage/DrawingAreaImpl.cpp:
589         (WebKit::DrawingAreaImpl::display):
590         Get the individual rects from the region and paint them into the shareable bitmap.
591
592         * WebProcess/WebPage/WebPage.cpp:
593         (WebKit::WebPage::mainFrameHasCustomRepresentation):
594         * WebProcess/WebPage/WebPage.h:
595         Add helper function.
596
597         * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp:
598         (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk):
599         Use helper function.
600
601 2011-01-12  Anders Carlsson  <andersca@apple.com>
602
603         Reviewed by Sam Weinig.
604
605         Add UpdateInfo class
606         https://bugs.webkit.org/show_bug.cgi?id=52306
607
608         * Shared/UpdateInfo.cpp: Added.
609         (WebKit::UpdateInfo::encode):
610         (WebKit::UpdateInfo::decode):
611         * Shared/UpdateInfo.h: Added.
612         (WebKit::UpdateInfo::UpdateInfo):
613         * WebKit2.xcodeproj/project.pbxproj:
614
615 2011-01-12  Anders Carlsson  <andersca@apple.com>
616
617         Reviewed by Sam Weinig.
618
619         More work on the new drawing area implementation
620         https://bugs.webkit.org/show_bug.cgi?id=52302
621
622         * Platform/Region.cpp:
623         (WebKit::Region::Shape::segments_end):
624         segments_end could end up returning an iterator that is one element past the Vector data, so
625         we can't use operator[] since that will assert.
626
627         * WebProcess/WebPage/DrawingAreaImpl.cpp:
628         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
629         Initialize the timer.
630
631         (WebKit::DrawingAreaImpl::setNeedsDisplay):
632         Unite the rect with the dirty region and schedule a display.
633
634         (WebKit::DrawingAreaImpl::setSize):
635         Tell the web page to resize.
636
637         (WebKit::DrawingAreaImpl::scheduleDisplay):
638         Start a display timer if needed.
639
640         (WebKit::DrawingAreaImpl::display):
641         Add a stub.
642
643 2011-01-12  Brent Fulgham  <bfulgham@webkit.org>
644
645         Unreviewed build fix after r75527.  Rename 'BackingStoreCairo.cpp'
646         to 'ShareableBitmapCairo.cpp' to match VS project changes.
647
648         * Shared/cairo/BackingStoreCairo.cpp: Removed.
649         * Shared/cairo/ShareableBitmapCairo.cpp: Copied from Shared/cairo/BackingStoreCairo.cpp.
650
651 2011-01-11  Jeff Miller  <jeffm@apple.com>
652
653         Reviewed by John Sullivan.
654
655         WebKit2: "Webpages not responding" dialog appears when <select> popup menu is showing
656         https://bugs.webkit.org/show_bug.cgi?id=52242
657
658         * UIProcess/WebPageProxy.cpp:
659         (WebKit::WebPageProxy::showPopupMenu):
660         On Windows, stop the responsiveness timer before calling showPopupMenu().
661
662 2011-01-11  Maciej Stachowiak  <mjs@apple.com>
663
664         Reviewed by Anders Carlsson.
665
666         UIProcess kills the WebProcess sometimes when detached frames exist
667         https://bugs.webkit.org/show_bug.cgi?id=52227
668
669         * UIProcess/WebPageProxy.cpp:
670         (WebKit::WebPageProxy::didSaveFrameToPageCache): Don't consider the message invalid
671         if it came in for a detached frame.
672
673 2011-01-11  Anders Carlsson  <andersca@apple.com>
674
675         Build fix.
676
677         * WebKit2.xcodeproj/project.pbxproj:
678
679 2011-01-11  Anders Carlsson  <andersca@apple.com>
680
681         Reviewed by Sam Weinig.
682
683         Add a Region class which represents a graphical region
684         https://bugs.webkit.org/show_bug.cgi?id=52255
685
686         * Platform/Region.cpp: Added.
687         (WebKit::Region::Region):
688         (WebKit::Region::rects):
689         (WebKit::Region::Shape::Shape):
690         (WebKit::Region::Shape::appendSpan):
691         (WebKit::Region::Shape::canCoalesce):
692         (WebKit::Region::Shape::appendSpans):
693         (WebKit::Region::Shape::appendSegment):
694         (WebKit::Region::Shape::spans_begin):
695         (WebKit::Region::Shape::spans_end):
696         (WebKit::Region::Shape::segments_begin):
697         (WebKit::Region::Shape::segments_end):
698         (WebKit::Region::Shape::dump):
699         (WebKit::Region::Shape::bounds):
700         (WebKit::Region::Shape::move):
701         (WebKit::Region::Shape::swap):
702         (WebKit::Region::Shape::shapeOperation):
703         (WebKit::Region::Shape::UnionOperation::trySimpleOperation):
704         (WebKit::Region::Shape::unionShapes):
705         (WebKit::Region::Shape::IntersectOperation::trySimpleOperation):
706         (WebKit::Region::Shape::intersectShapes):
707         (WebKit::Region::Shape::SubtractOperation::trySimpleOperation):
708         (WebKit::Region::Shape::subtractShapes):
709         (WebKit::Region::dump):
710         (WebKit::Region::intersect):
711         (WebKit::Region::unite):
712         (WebKit::Region::subtract):
713         (WebKit::Region::move):
714         * Platform/Region.h: Added.
715         (WebKit::Region::bounds):
716         (WebKit::Region::isEmpty):
717         (WebKit::Region::Span::Span):
718         (WebKit::Region::Shape::isEmpty):
719         * WebKit2.xcodeproj/project.pbxproj:
720
721 2011-01-11  Anders Carlsson  <andersca@apple.com>
722
723         Reviewed by Darin Adler.
724
725         Add DidSetSize message
726         https://bugs.webkit.org/show_bug.cgi?id=52254
727
728         * DerivedSources.make:
729         Add DrawingAReaProxy.messages.in.
730
731         * Platform/CoreIPC/MessageID.h:
732         Add DrawingAreaProxy message class.
733
734         * UIProcess/DrawingAreaProxy.h:
735         (WebKit::DrawingAreaProxy::didSetSize):
736         Add CoreIPC message handler function.
737
738         * UIProcess/DrawingAreaProxy.messages.in: Added.
739
740         * UIProcess/DrawingAreaProxyImpl.cpp:
741         (WebKit::DrawingAreaProxyImpl::didSetSize):
742         Add stub.
743
744         * UIProcess/WebPageProxy.cpp:
745         (WebKit::WebPageProxy::didReceiveMessage):
746         Handle DrawingAreaProxy messages.
747
748         * WebKit2.xcodeproj/project.pbxproj:
749         Add new files.
750
751         * WebProcess/WebPage/DrawingAreaImpl.cpp:
752         (WebKit::DrawingAreaImpl::setSize):
753         Send a DidSetSize message for now.
754
755 2011-01-11  Sam Weinig  <sam@webkit.org>
756
757         Reviewed by Anders Carlsson.
758
759         Fix spelling mistake. Sharable -> Shareable.
760
761         * Shared/API/c/WKImage.h:
762         * Shared/API/c/WKSharedAPICast.h:
763         (WebKit::toImageOptions):
764         * Shared/ImageOptions.h:
765         * Shared/WebImage.cpp:
766         (WebKit::WebImage::create):
767
768 2011-01-11  Anders Carlsson  <andersca@apple.com>
769
770         Reviewed by Sam Weinig.
771
772         Add SetSize message
773         https://bugs.webkit.org/show_bug.cgi?id=52247
774
775         * DerivedSources.make:
776         Add DrawingArea.messages.in
777
778         * Platform/CoreIPC/MessageID.h:
779         Add DrawingArea message class.
780
781         * UIProcess/DrawingAreaProxyImpl.cpp:
782         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
783         Call sendSetSize.
784
785         (WebKit::DrawingAreaProxyImpl::sendSetSize):
786         Send a SetSize message.
787
788         * UIProcess/DrawingAreaProxyImpl.h:
789         Add setSize override.
790
791         * WebKit2.xcodeproj/project.pbxproj:
792         Add new files.
793
794         * WebProcess/WebPage/DrawingArea.h:
795         (WebKit::DrawingArea::setSize):
796         Add setSize member function.
797
798         * WebProcess/WebPage/DrawingArea.messages.in: Added.
799
800         * WebProcess/WebPage/DrawingAreaImpl.cpp:
801         * WebProcess/WebPage/DrawingAreaImpl.h:
802         Add setSize.
803
804         * WebProcess/WebPage/WebPage.cpp:
805         (WebKit::WebPage::didReceiveMessage):
806         Handle drawing area messages.
807
808 2011-01-11  Anders Carlsson  <andersca@apple.com>
809
810         Reviewed by Sam Weinig.
811
812         Replace ASSERTs with FIXMEs.
813
814         * UIProcess/DrawingAreaProxyImpl.cpp:
815         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
816         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
817
818 2011-01-11  Anders Carlsson  <andersca@apple.com>
819
820         Reviewed by Sam Weinig.
821
822         Add DrawingAreaImpl skeleton class
823         https://bugs.webkit.org/show_bug.cgi?id=52246
824
825         * UIProcess/API/mac/WKView.mm:
826         (useNewDrawingArea):
827         New function which controls which drawing area to use, through an environment variable.
828
829         (-[WKView drawRect:]):
830         Bail if we're using the new drawing area (for now).
831
832         (-[WKView WebKit::]):
833         Create a DrawingAreaProxyImpl when asked to.
834
835         * WebKit2.xcodeproj/project.pbxproj:
836         Add new files.
837
838         * WebProcess/WebPage/DrawingArea.cpp:
839         (WebKit::DrawingArea::create):
840         Create a DrawingAreaImpl when asked to.
841
842         * WebProcess/WebPage/DrawingAreaImpl.cpp: Added.
843         * WebProcess/WebPage/DrawingAreaImpl.h: Added.
844         Add DrawingAreaImpl class.
845
846 2011-01-11  Anders Carlsson  <andersca@apple.com>
847
848         Reviewed by Sam Weinig.
849
850         Add Mac-only DrawingAreaProxyImpl class skeleton
851         https://bugs.webkit.org/show_bug.cgi?id=52243
852
853         This is the proxy side of a new drawing area implementation. This is Mac only for now
854         while the design is being fleshed out.
855
856         * Shared/DrawingAreaInfo.h:
857         * UIProcess/API/mac/WKView.mm:
858         (-[WKView _switchToDrawingAreaTypeIfNecessary:DrawingAreaInfo::]):
859         * UIProcess/DrawingAreaProxyImpl.cpp: Added.
860         (WebKit::DrawingAreaProxyImpl::create):
861         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
862         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
863         (WebKit::DrawingAreaProxyImpl::didReceiveMessage):
864         (WebKit::DrawingAreaProxyImpl::didReceiveSyncMessage):
865         (WebKit::DrawingAreaProxyImpl::paint):
866         (WebKit::DrawingAreaProxyImpl::sizeDidChange):
867         (WebKit::DrawingAreaProxyImpl::setPageIsVisible):
868         (WebKit::DrawingAreaProxyImpl::attachCompositingContext):
869         (WebKit::DrawingAreaProxyImpl::detachCompositingContext):
870         * UIProcess/DrawingAreaProxyImpl.h: Added.
871         * WebKit2.xcodeproj/project.pbxproj:
872         * WebProcess/WebPage/DrawingArea.cpp:
873         (WebKit::DrawingArea::create):
874
875 2011-01-11  Anders Carlsson  <andersca@apple.com>
876
877         Fix Windows build.
878
879         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
880         (WebKit::WebPopupMenu::setUpPlatformData):
881
882 2011-01-11  Anders Carlsson  <andersca@apple.com>
883
884         Reviewed by Sam Weinig.
885
886         Rename ShareableBitmap::createSharable to createShareable
887         https://bugs.webkit.org/show_bug.cgi?id=52234
888
889         * Shared/ShareableBitmap.cpp:
890         (WebKit::ShareableBitmap::createShareable):
891         * Shared/ShareableBitmap.h:
892         * Shared/WebImage.cpp:
893         (WebKit::WebImage::create):
894         * WebProcess/Plugins/PluginProxy.cpp:
895         (WebKit::PluginProxy::geometryDidChange):
896         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
897         (WebKit::WebPopupMenu::setUpPlatformData):
898         * WebProcess/WebPage/FindController.cpp:
899         (WebKit::FindController::updateFindIndicator):
900
901 2011-01-11  Anders Carlsson  <andersca@apple.com>
902
903         Reviewed by Sam Weinig.
904
905         Rename BackingStore to ShareableBitmap
906         https://bugs.webkit.org/show_bug.cgi?id=52228
907
908         * GNUmakefile.am:
909         * PluginProcess/PluginControllerProxy.cpp:
910         (WebKit::PluginControllerProxy::geometryDidChange):
911         * PluginProcess/PluginControllerProxy.h:
912         * Shared/API/c/cg/WKImageCG.cpp:
913         (WKImageCreateCGImage):
914         * Shared/BackingStore.cpp: Removed.
915         * Shared/BackingStore.h: Removed.
916         * Shared/PlatformPopupMenuData.cpp:
917         (WebKit::PlatformPopupMenuData::decode):
918         * Shared/PlatformPopupMenuData.h:
919         * Shared/ShareableBitmap.cpp: Copied from WebKit2/Shared/BackingStore.cpp.
920         (WebKit::ShareableBitmap::create):
921         (WebKit::ShareableBitmap::createSharable):
922         (WebKit::ShareableBitmap::createHandle):
923         (WebKit::ShareableBitmap::ShareableBitmap):
924         (WebKit::ShareableBitmap::~ShareableBitmap):
925         (WebKit::ShareableBitmap::resize):
926         (WebKit::ShareableBitmap::data):
927         * Shared/ShareableBitmap.h: Copied from WebKit2/Shared/BackingStore.h.
928         * Shared/UserMessageCoders.h:
929         (WebKit::UserMessageEncoder::baseEncode):
930         (WebKit::UserMessageDecoder::baseDecode):
931         * Shared/WebImage.cpp:
932         (WebKit::WebImage::create):
933         (WebKit::WebImage::WebImage):
934         (WebKit::WebImage::~WebImage):
935         (WebKit::WebImage::size):
936         * Shared/WebImage.h:
937         (WebKit::WebImage::bitmap):
938         * Shared/cairo/BackingStoreCairo.cpp:
939         (WebKit::ShareableBitmap::createGraphicsContext):
940         (WebKit::ShareableBitmap::paint):
941         * Shared/cg/BackingStoreCG.cpp: Removed.
942         * Shared/cg/ShareableBitmapCG.cpp: Copied from WebKit2/Shared/cg/BackingStoreCG.cpp.
943         (WebKit::ShareableBitmap::createGraphicsContext):
944         (WebKit::ShareableBitmap::paint):
945         * Shared/gtk/BackingStoreGtk.cpp: Removed.
946         * Shared/gtk/ShareableBitmapGtk.cpp: Copied from WebKit2/Shared/gtk/BackingStoreGtk.cpp.
947         (WebKit::ShareableBitmap::createGraphicsContext):
948         (WebKit::ShareableBitmap::paint):
949         * Shared/qt/BackingStoreQt.cpp: Removed.
950         * Shared/qt/ShareableBitmapQt.cpp: Copied from WebKit2/Shared/qt/BackingStoreQt.cpp.
951         (WebKit::ShareableBitmap::createGraphicsContext):
952         (WebKit::ShareableBitmap::paint):
953         * UIProcess/FindIndicator.cpp:
954         (WebKit::FindIndicator::create):
955         (WebKit::FindIndicator::FindIndicator):
956         * UIProcess/FindIndicator.h:
957         (WebKit::FindIndicator::contentImage):
958         * WebKit2.pro:
959         * WebKit2.xcodeproj/project.pbxproj:
960         * WebProcess/Plugins/PluginProxy.cpp:
961         (WebKit::PluginProxy::geometryDidChange):
962         * WebProcess/Plugins/PluginProxy.h:
963         * WebProcess/WebPage/FindController.cpp:
964         (WebKit::FindController::updateFindIndicator):
965         * WebProcess/WebPage/WebPage.cpp:
966         (WebKit::WebPage::snapshotInViewCoordinates):
967         (WebKit::WebPage::snapshotInDocumentCoordinates):
968         * win/WebKit2.vcproj:
969
970 2011-01-11  John Sullivan  <sullivan@apple.com>
971
972         Reviewed by Anders Carlsson.
973
974         [WKView setFrameSize:] derefs _page->drawingArea() without null check
975         <https://bugs.webkit.org/show_bug.cgi?id=52231>
976
977         * UIProcess/API/mac/WKView.mm:
978         (-[WKView setFrameSize:]):
979         Null check drawingArea(). This is OK because if it doesn't exist then it will be
980         created later with the correct initial size.
981
982 2011-01-07  Enrica Casucci  <enrica@apple.com>
983
984         Reviewed by Alexey Proskuryakov.
985
986         Paste and drag and drop use different code paths to interact with the pasteboard.
987         https://bugs.webkit.org/show_bug.cgi?id=52093
988         The change consists in a refactoring of the code to have only one class that
989         deals with the pasteboard on Mac.
990
991         * WebProcess/WebCoreSupport/WebEditorClient.h:
992         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: Added two methods to provide to WebCore functionality
993         exposed by NSURLExtras.
994         (WebKit::WebEditorClient::canonicalizeURL):
995         (WebKit::WebEditorClient::canonicalizeURLString):
996
997 2011-01-11  Jessie Berlin  <jberlin@apple.com>
998
999         Reviewed by Anders Carlsson and Sam Weinig.
1000
1001         Fix crash on launch on Windows.
1002
1003         * UIProcess/win/WebView.cpp:
1004         (WebKit::WebView::onSizeEvent):
1005         The drawing area is no longer initialized before the WebView is created and the first
1006         onSize is receieved.
1007
1008 2011-01-11  Anders Carlsson  <andersca@apple.com>
1009
1010         Reviewed by Dan Bernstein.
1011
1012         Automatically reinitialize the web page on relaunch
1013         https://bugs.webkit.org/show_bug.cgi?id=52224
1014         <rdar://problem/8765695>
1015
1016         * UIProcess/API/mac/WKView.mm:
1017         (-[WKView _didRelaunchProcess]):
1018         Remove call to reinitializeWebPage.
1019
1020         * UIProcess/WebPageProxy.cpp:
1021         (WebKit::WebPageProxy::relaunch):
1022         Call initializeWebPage().
1023
1024         (WebKit::WebPageProxy::initializeWebPage):
1025         Assert that the web page is valid here.
1026
1027         * UIProcess/WebPageProxy.h:
1028         Remove reinitializeWebPage.
1029
1030         * UIProcess/win/WebView.cpp:
1031         (WebKit::WebView::didRelaunchProcess):
1032         Remove call to reinitializeWebPage.
1033
1034 2011-01-10  Anders Carlsson  <andersca@apple.com>
1035
1036         Reviewed by Sam Weinig.
1037
1038         Pass the view size to the DrawingAreaProxy constructor
1039         https://bugs.webkit.org/show_bug.cgi?id=52189
1040
1041         * UIProcess/DrawingAreaProxy.cpp:
1042         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
1043         * UIProcess/WebPageProxy.cpp:
1044         (WebKit::WebPageProxy::viewSize):
1045         * UIProcess/WebPageProxy.h:
1046
1047 2011-01-11  Sam Weinig  <sam@webkit.org>
1048
1049         Roll r75460 back in with build fix.
1050
1051 2011-01-11  Anders Carlsson  <andersca@apple.com>
1052
1053         Reviewed by Andreas Kling.
1054
1055         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1056         https://bugs.webkit.org/show_bug.cgi?id=52184
1057
1058         Qt part made my Balazs Kelemen.
1059
1060         * UIProcess/API/mac/PageClientImpl.h:
1061         * UIProcess/API/mac/PageClientImpl.mm:
1062         (WebKit::PageClientImpl::createDrawingAreaProxy):
1063         Call -[WKView _createDrawingAreaProxy].
1064
1065         (WebKit::PageClientImpl::setViewNeedsDisplay):
1066         Call setNeedsDisplayInRect on the WKView.
1067
1068         * UIProcess/API/mac/WKView.mm:
1069         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1070         No need to set the drawing area proxy anymore.
1071
1072         (-[WKView _createDrawingAreaProxy]):
1073         Create a chunked update drawing area proxy for now.
1074
1075         * UIProcess/API/qt/qgraphicswkview.cpp:
1076         Added a QGraphicsItem* member that is initialized in init to the accociated view.
1077         Implement the new functions. This is a temporary solution, in the long term the view
1078         and the page should be decoupled.
1079         (QGraphicsWKView::QGraphicsWKView):
1080         * UIProcess/API/qt/qwkpage.cpp:
1081         (QWKPagePrivate::QWKPagePrivate):
1082         (QWKPagePrivate::init):
1083         (QWKPagePrivate::createDrawingAreaProxy):
1084         (QWKPagePrivate::setViewNeedsDisplay):
1085         * UIProcess/API/qt/qwkpage.h:
1086         * UIProcess/API/qt/qwkpage_p.h:
1087         
1088         * UIProcess/PageClient.h:
1089         Add new pure virtual member functions.
1090
1091         * UIProcess/WebPageProxy.cpp:
1092         (WebKit::WebPageProxy::initializeWebPage):
1093         (WebKit::WebPageProxy::reinitializeWebPage):
1094         Set the new drawing area proxy.
1095
1096         * UIProcess/win/WebView.cpp:
1097         (WebKit::WebView::WebView):
1098         No need to set the drawing area proxy anymore.
1099
1100         (WebKit::WebView::createDrawingAreaProxy):
1101         Create a chunked update drawing area proxy for now.
1102
1103         (WebKit::WebView::setViewNeedsDisplay):
1104         Invalidate the window.
1105
1106 2011-01-11  Adam Roben  <aroben@apple.com>
1107
1108         Fix a typo in a comment
1109
1110         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1111
1112 2011-01-10  Sheriff Bot  <webkit.review.bot@gmail.com>
1113
1114         Unreviewed, rolling out r75460.
1115         http://trac.webkit.org/changeset/75460
1116         https://bugs.webkit.org/show_bug.cgi?id=52191
1117
1118         It broke Qt-WK2 build (Requested by Ossy on #webkit).
1119
1120         * Shared/API/c/WKBase.h:
1121         * Shared/APIObject.h:
1122         * UIProcess/API/C/WKAPICast.h:
1123         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Removed.
1124         * UIProcess/API/C/WKGeolocationPermissionRequest.h: Removed.
1125         * UIProcess/API/C/WKPage.h:
1126         * UIProcess/API/C/WebKit2.h:
1127         * UIProcess/API/qt/qwkpage.cpp:
1128         (QWKPage::QWKPage):
1129         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Removed.
1130         * UIProcess/GeolocationPermissionRequestManagerProxy.h: Removed.
1131         * UIProcess/GeolocationPermissionRequestProxy.cpp: Removed.
1132         * UIProcess/GeolocationPermissionRequestProxy.h: Removed.
1133         * UIProcess/WebPageProxy.cpp:
1134         (WebKit::WebPageProxy::WebPageProxy):
1135         (WebKit::WebPageProxy::close):
1136         (WebKit::WebPageProxy::processDidCrash):
1137         * UIProcess/WebPageProxy.h:
1138         * UIProcess/WebPageProxy.messages.in:
1139         * UIProcess/WebUIClient.cpp:
1140         * UIProcess/WebUIClient.h:
1141         * WebKit2.pro:
1142         * WebKit2.xcodeproj/project.pbxproj:
1143         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Removed.
1144         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Removed.
1145         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1146         * WebProcess/Geolocation/WebGeolocationManager.h:
1147         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1148         (WebKit::WebGeolocationClient::requestPermission):
1149         (WebKit::WebGeolocationClient::cancelPermissionRequest):
1150         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1151         * WebProcess/WebPage/WebPage.cpp:
1152         (WebKit::WebPage::WebPage):
1153         * WebProcess/WebPage/WebPage.h:
1154         * WebProcess/WebPage/WebPage.messages.in:
1155         * win/WebKit2.vcproj:
1156         * win/WebKit2Generated.make:
1157
1158 2011-01-10  Csaba Osztrogonác  <ossy@webkit.org>
1159
1160         Unreviewed, rolling out r75459
1161         http://trac.webkit.org/changeset/75459
1162
1163         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1164         https://bugs.webkit.org/show_bug.cgi?id=52184
1165
1166         * UIProcess/API/mac/PageClientImpl.h:
1167         * UIProcess/API/mac/PageClientImpl.mm:
1168         * UIProcess/API/mac/WKView.mm:
1169         * UIProcess/API/mac/WKViewInternal.h:
1170         * UIProcess/API/qt/qwkpage.cpp:
1171         * UIProcess/API/qt/qwkpage_p.h:
1172         * UIProcess/PageClient.h:
1173         * UIProcess/WebPageProxy.cpp:
1174         (WebKit::WebPageProxy::initializeWebPage):
1175         (WebKit::WebPageProxy::reinitializeWebPage):
1176         * UIProcess/win/WebView.cpp:
1177         (WebKit::WebView::WebView):
1178         * UIProcess/win/WebView.h:
1179
1180 2011-01-10  Anders Carlsson  <andersca@apple.com>
1181
1182         Reviewed by Sam Weinig.
1183
1184         Remove size parameter to WebPageProxy::initializeWebPage
1185         https://bugs.webkit.org/show_bug.cgi?id=52188
1186
1187         * UIProcess/API/mac/WKView.mm:
1188         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1189         * UIProcess/API/qt/qwkpage.cpp:
1190         (QWKPagePrivate::init):
1191         * UIProcess/WebPageProxy.cpp:
1192         (WebKit::WebPageProxy::initializeWebPage):
1193         * UIProcess/WebPageProxy.h:
1194         * UIProcess/win/WebView.cpp:
1195         (WebKit::WebView::WebView):
1196
1197 2011-01-10  Anders Carlsson  <andersca@apple.com>
1198
1199         Didn't mean to land this.
1200
1201         * UIProcess/WebPageProxy.cpp:
1202         (WebKit::WebPageProxy::initializeWebPage):
1203         * UIProcess/WebPageProxy.h:
1204
1205 2011-01-10  Anders Carlsson  <andersca@apple.com>
1206
1207         Reviewed by Sam Weinig.
1208
1209         WebPageProxy::creationParameters no longer needs to take a size
1210         https://bugs.webkit.org/show_bug.cgi?id=52187
1211
1212         WebPageProxy::creationParameters can just ask the page client for the view size now.
1213
1214         * UIProcess/WebInspectorProxy.cpp:
1215         (WebKit::WebInspectorProxy::createInspectorPage):
1216         * UIProcess/WebPageProxy.cpp:
1217         (WebKit::WebPageProxy::initializeWebPage):
1218         (WebKit::WebPageProxy::reinitializeWebPage):
1219         (WebKit::WebPageProxy::createNewPage):
1220         (WebKit::WebPageProxy::creationParameters):
1221         * UIProcess/WebPageProxy.h:
1222
1223 2011-01-10  Anders Carlsson  <andersca@apple.com>
1224
1225         Reviewed by Sam Weinig.
1226
1227         Pass information about the view in the WebPageCreationParameters
1228         https://bugs.webkit.org/show_bug.cgi?id=52186
1229
1230         * Shared/WebPageCreationParameters.cpp:
1231         (WebKit::WebPageCreationParameters::encode):
1232         (WebKit::WebPageCreationParameters::decode):
1233         Encode and decode the state flags.
1234
1235         * Shared/WebPageCreationParameters.h:
1236         Add new state flags.
1237
1238         * UIProcess/WebPageProxy.cpp:
1239         (WebKit::WebPageProxy::creationParameters):
1240         Initialize the state flags.
1241
1242         * WebProcess/WebPage/WebPage.cpp:
1243         (WebKit::WebPage::WebPage):
1244         Update the page state from the state flags.
1245
1246 2011-01-10  Sam Weinig  <sam@webkit.org>
1247
1248         Reviewed by Anders Carlsson.
1249
1250         Make Geolocation features work in WebKit2
1251         https://bugs.webkit.org/show_bug.cgi?id=52078
1252
1253         Step 2 - Add support for requesting and granting permission for geolocation.
1254
1255         * Shared/API/c/WKBase.h:
1256         * Shared/APIObject.h:
1257         * UIProcess/API/C/WebKit2.h:
1258         * UIProcess/API/C/WKAPICast.h:
1259         * UIProcess/API/C/WKGeolocationPermissionRequest.cpp: Added.
1260         * UIProcess/API/C/WKGeolocationPermissionRequest.h: Added.
1261         Add new API type, WKGeolocationPermissionRequestRef.
1262
1263         * UIProcess/API/C/WKPage.h:
1264         Add new UIClient function for requesting permission.
1265
1266         * UIProcess/API/qt/qwkpage.cpp:
1267         (QWKPage::QWKPage): 
1268         Stub out the UIClient.
1269
1270         * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: Added.
1271         * UIProcess/GeolocationPermissionRequestManagerProxy.h: Added.
1272         * UIProcess/GeolocationPermissionRequestProxy.cpp: Added.
1273         * UIProcess/WebPageProxy.cpp:
1274         * UIProcess/WebPageProxy.h:
1275         * UIProcess/WebPageProxy.messages.in:
1276         * UIProcess/WebUIClient.cpp:
1277         * UIProcess/WebUIClient.h:
1278         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added.
1279         * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: Added.
1280         * WebProcess/Geolocation/WebGeolocationManager.cpp:
1281         * WebProcess/Geolocation/WebGeolocationManager.h:
1282         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp:
1283         * WebProcess/WebCoreSupport/WebGeolocationClient.h:
1284         * WebProcess/WebPage/WebPage.cpp:
1285         (WebKit::WebPage::WebPage):
1286         (WebKit::WebPage::didReceiveGeolocationPermissionDecision):
1287         * WebProcess/WebPage/WebPage.h:
1288         (WebKit::WebPage::geolocationPermissionRequestManager):
1289         * WebProcess/WebPage/WebPage.messages.in:
1290         Track the permission request through both sides of the process divide.
1291
1292         * WebKit2.pro:
1293         * WebKit2.xcodeproj/project.pbxproj:
1294         * win/WebKit2.vcproj:
1295         * win/WebKit2Generated.make:
1296         Add new files.
1297
1298 2011-01-10  Anders Carlsson  <andersca@apple.com>
1299
1300         Reviewed by Sam Weinig.
1301
1302         Work towards having the WebPageProxy decide when to create the DrawingAreaProxy
1303         https://bugs.webkit.org/show_bug.cgi?id=52184
1304
1305         * UIProcess/API/mac/PageClientImpl.h:
1306         * UIProcess/API/mac/PageClientImpl.mm:
1307         (WebKit::PageClientImpl::createDrawingAreaProxy):
1308         Call -[WKView _createDrawingAreaProxy].
1309
1310         (WebKit::PageClientImpl::setViewNeedsDisplay):
1311         Call setNeedsDisplayInRect on the WKView.
1312
1313         * UIProcess/API/mac/WKView.mm:
1314         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1315         No need to set the drawing area proxy anymore.
1316
1317         (-[WKView _createDrawingAreaProxy]):
1318         Create a chunked update drawing area proxy for now.
1319
1320         * UIProcess/API/qt/qwkpage.cpp:
1321         (QWKPagePrivate::createDrawingAreaProxy):
1322         (QWKPagePrivate::setViewNeedsDisplay):
1323         Add stubs.
1324     
1325         * UIProcess/PageClient.h:
1326         Add new pure virtual member functions.
1327
1328         * UIProcess/WebPageProxy.cpp:
1329         (WebKit::WebPageProxy::initializeWebPage):
1330         (WebKit::WebPageProxy::reinitializeWebPage):
1331         Set the new drawing area proxy.
1332
1333         * UIProcess/win/WebView.cpp:
1334         (WebKit::WebView::WebView):
1335         No need to set the drawing area proxy anymore.
1336
1337         (WebKit::WebView::createDrawingAreaProxy):
1338         Create a chunked update drawing area proxy for now.
1339
1340         (WebKit::WebView::setViewNeedsDisplay):
1341         Invalidate the window.
1342
1343 2011-01-10  Anders Carlsson  <andersca@apple.com>
1344
1345         Fix Windows build again.
1346
1347         * UIProcess/win/WebView.cpp:
1348         (WebKit::WebView::isViewWindowActive):
1349
1350 2011-01-10  Anders Carlsson  <andersca@apple.com>
1351
1352         Fix Windows build.
1353
1354         * UIProcess/win/WebView.cpp:
1355         (WebKit::WebView::onShowWindowEvent):
1356
1357 2011-01-10  Anders Carlsson  <andersca@apple.com>
1358
1359         Reviewed by Sam Weinig.
1360
1361         Use a pull model for view state changes
1362         https://bugs.webkit.org/show_bug.cgi?id=52175
1363
1364         Instead of having the WKView call setFocused, setActive etc on the WebPageProxy, the
1365         WKView now simply informs the WebPageProxy what has changed, using the WebPageProxy::viewStateDidChange
1366         function. The WebPageProxy can then fetch the relevant information using newly added PageClient functions.
1367
1368         * UIProcess/API/mac/PageClientImpl.h:
1369         * UIProcess/API/mac/PageClientImpl.mm:
1370         (WebKit::PageClientImpl::viewSize):
1371         (WebKit::PageClientImpl::isViewWindowActive):
1372         (WebKit::PageClientImpl::isViewFocused):
1373         (WebKit::PageClientImpl::isViewVisible):
1374         (WebKit::PageClientImpl::isViewInWindow):
1375         * UIProcess/API/mac/WKView.mm:
1376         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
1377         (-[WKView becomeFirstResponder]):
1378         (-[WKView resignFirstResponder]):
1379         (-[WKView viewDidMoveToWindow]):
1380         (-[WKView _windowDidBecomeKey:]):
1381         (-[WKView _windowDidResignKey:]):
1382         (-[WKView viewDidHide]):
1383         (-[WKView viewDidUnhide]):
1384         (-[WKView _isFocused]):
1385         (-[WKView _didRelaunchProcess]):
1386         * UIProcess/API/mac/WKViewInternal.h:
1387         * UIProcess/API/qt/qgraphicswkview.cpp:
1388         (QGraphicsWKView::focusInEvent):
1389         (QGraphicsWKView::focusOutEvent):
1390         * UIProcess/API/qt/qwkpage.cpp:
1391         (QWKPagePrivate::QWKPagePrivate):
1392         (QWKPagePrivate::viewSize):
1393         (QWKPagePrivate::isViewWindowActive):
1394         (QWKPagePrivate::isViewFocused):
1395         (QWKPagePrivate::isViewVisible):
1396         (QWKPagePrivate::isViewInWindow):
1397         * UIProcess/API/qt/qwkpage_p.h:
1398         * UIProcess/PageClient.h:
1399         * UIProcess/WebContext.cpp:
1400         (WebKit::WebContext::createWebPage):
1401         * UIProcess/WebContext.h:
1402         * UIProcess/WebPageProxy.cpp:
1403         (WebKit::WebPageProxy::create):
1404         (WebKit::WebPageProxy::WebPageProxy):
1405         (WebKit::WebPageProxy::viewStateDidChange):
1406         * UIProcess/WebPageProxy.h:
1407         * UIProcess/WebProcessProxy.cpp:
1408         (WebKit::WebProcessProxy::createWebPage):
1409         * UIProcess/WebProcessProxy.h:
1410         * UIProcess/win/WebView.cpp:
1411         (WebKit::WebView::WebView):
1412         (WebKit::WebView::onSetFocusEvent):
1413         (WebKit::WebView::onKillFocusEvent):
1414         (WebKit::WebView::onShowWindowEvent):
1415         (WebKit::WebView::updateActiveState):
1416         (WebKit::WebView::viewSize):
1417         (WebKit::WebView::isViewWindowActive):
1418         (WebKit::WebView::isViewFocused):
1419         (WebKit::WebView::isViewVisible):
1420         (WebKit::WebView::isViewInWindow):
1421         (WebKit::WebView::didRelaunchProcess):
1422         (WebKit::WebView::setIsInWindow):
1423         * UIProcess/win/WebView.h:
1424
1425 2011-01-10  Adam Roben  <aroben@apple.com>
1426
1427         Don't pass a reference type to va_start
1428
1429         C++ says this results in undefined behavior:
1430
1431             The restrictions that ISO C places on the second parameter to the
1432             va_start() macro in header <stdarg.h> are different in this
1433             International Standard. The parameter parmN is the identifier of
1434             the rightmost parameter in the variable parameter list of the
1435             function definition (the one just before the ...).221) If the
1436             parameter parmN is declared with a function, array, or reference
1437             type, or with a type that is not compatible with the type that
1438             results when passing an argument for which there is no parameter,
1439             the behavior is undefined.
1440
1441         Fixes <http://webkit.org/b/52168> Title of standalone image document
1442         includes bogus image dimensions
1443
1444         Rubber-stamped by Eric Seidel.
1445
1446         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1447         (WebKit::formatLocalizedString): Don't use a reference type for
1448         |format|.
1449
1450 2011-01-10  Siddharth Mathur  <siddharth.mathur@nokia.com>
1451
1452         Reviewed by Eric Seidel.
1453
1454         Support for ARM's RVCT(ARMCC) compiler in import/export directives
1455         https://bugs.webkit.org/show_bug.cgi?id=52146 
1456
1457         * Shared/API/c/WKBase.h:
1458
1459 2011-01-10  Sam Weinig  <sam@webkit.org>
1460
1461         Fix the build.
1462
1463         * WebProcess/WebPage/WebPage.cpp:
1464         (WebKit::WebPage::WebPage):
1465
1466 2011-01-10  Sam Weinig  <sam@webkit.org>
1467
1468         Reviewed by Anders Carlsson.
1469
1470         Make Geolocation features work in WebKit2
1471         https://bugs.webkit.org/show_bug.cgi?id=52078
1472
1473         Step 1 - Add enough support to get position data from a provider.
1474         This does not include permission support.
1475
1476         * Platform/CoreIPC/HandleMessage.h:
1477         Add #include of Arguments.h for CoreIPC::In and Out definitions.
1478
1479         * Platform/CoreIPC/MessageID.h:
1480         Add new message types.
1481
1482         * Shared/API/c/WKBase.h:
1483         * Shared/APIObject.h:
1484         Add new API types.
1485
1486         * Shared/WebGeolocationPosition.cpp: Added.
1487         * Shared/WebGeolocationPosition.h: Added.
1488         Internal position representation.
1489
1490         * UIProcess/API/C/WKAPICast.h:
1491         Add casts for new API types.
1492
1493         * UIProcess/API/C/WKContext.cpp:
1494         * UIProcess/API/C/WKContext.h:
1495         * UIProcess/API/C/WKGeolocationManager.cpp: Added.
1496         * UIProcess/API/C/WKGeolocationManager.h: Added.
1497         * UIProcess/API/C/WKGeolocationPosition.cpp: Added.
1498         * UIProcess/API/C/WKGeolocationPosition.h: Added.
1499         * UIProcess/API/C/WebKit2.h:
1500         Add API to provide and control geolocation data.
1501
1502         * UIProcess/WebContext.cpp:
1503         (WebKit::WebContext::WebContext):
1504         (WebKit::WebContext::~WebContext):
1505         (WebKit::WebContext::processDidClose):
1506         (WebKit::WebContext::didReceiveMessage):
1507         * UIProcess/WebContext.h:
1508         (WebKit::WebContext::geolocationManagerProxy):
1509         * UIProcess/WebGeolocationManagerProxy.cpp: Added.
1510         (WebKit::WebGeolocationManagerProxy::create):
1511         (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy):
1512         (WebKit::WebGeolocationManagerProxy::~WebGeolocationManagerProxy):
1513         (WebKit::WebGeolocationManagerProxy::invalidate):
1514         (WebKit::WebGeolocationManagerProxy::initializeProvider):
1515         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
1516         (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
1517         (WebKit::WebGeolocationManagerProxy::didReceiveMessage):
1518         (WebKit::WebGeolocationManagerProxy::startUpdating):
1519         (WebKit::WebGeolocationManagerProxy::stopUpdating):
1520         * UIProcess/WebGeolocationManagerProxy.h: Added.
1521         (WebKit::WebGeolocationManagerProxy::clearContext):
1522         (WebKit::WebGeolocationManagerProxy::type):
1523         * UIProcess/WebGeolocationManagerProxy.messages.in: Added.
1524         * UIProcess/WebGeolocationProvider.cpp: Added.
1525         (WebKit::WebGeolocationProvider::startUpdating):
1526         (WebKit::WebGeolocationProvider::stopUpdating):
1527         * UIProcess/WebGeolocationProvider.h: Added.
1528         * UIProcess/WebProcessProxy.cpp:
1529         (WebKit::WebProcessProxy::didReceiveMessage):
1530         * WebProcess/Geolocation: Added.
1531         * WebProcess/Geolocation/WebGeolocationManager.cpp: Added.
1532         (WebKit::WebGeolocationManager::WebGeolocationManager):
1533         (WebKit::WebGeolocationManager::~WebGeolocationManager):
1534         (WebKit::WebGeolocationManager::didReceiveMessage):
1535         (WebKit::WebGeolocationManager::registerWebPage):
1536         (WebKit::WebGeolocationManager::unregisterWebPage):
1537         (WebKit::WebGeolocationManager::didChangePosition):
1538         (WebKit::WebGeolocationManager::didFailToDeterminePosition):
1539         * WebProcess/Geolocation/WebGeolocationManager.h: Added.
1540         * WebProcess/Geolocation/WebGeolocationManager.messages.in: Added.
1541         * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: Added.
1542         (WebKit::WebGeolocationClient::geolocationDestroyed):
1543         (WebKit::WebGeolocationClient::startUpdating):
1544         (WebKit::WebGeolocationClient::stopUpdating):
1545         (WebKit::WebGeolocationClient::setEnableHighAccuracy):
1546         (WebKit::WebGeolocationClient::lastPosition):
1547         (WebKit::WebGeolocationClient::requestPermission):
1548         (WebKit::WebGeolocationClient::cancelPermissionRequest):
1549         * WebProcess/WebCoreSupport/WebGeolocationClient.h: Added.
1550         (WebKit::WebGeolocationClient::WebGeolocationClient):
1551         * WebProcess/WebPage/WebPage.cpp:
1552         (WebKit::WebPage::WebPage):
1553         * WebProcess/WebProcess.cpp:
1554         (WebKit::WebProcess::WebProcess):
1555         (WebKit::WebProcess::didReceiveMessage):
1556         * WebProcess/WebProcess.h:
1557         (WebKit::WebProcess::geolocationManager):
1558         Pipe geolocation positions/errors from the UIProcess to the WebProcess.
1559
1560         * DerivedSources.make:
1561         * DerivedSources.pro:
1562         * WebKit2.pro:
1563         * WebKit2.xcodeproj/project.pbxproj:
1564         * win/WebKit2.vcproj:
1565         * win/WebKit2Common.vsprops:
1566          * win/WebKit2Generated.make:
1567         Add new files.
1568
1569 2011-01-10  Martin Robinson  <mrobinson@igalia.com>
1570
1571         GTK+ build fix. Continue to fix 'make dist.'
1572
1573         * GNUmakefile.am: Remove more non-existent files from the WebKit2 build.
1574
1575 2011-01-10  Alejandro G. Castro  <alex@igalia.com>
1576
1577         Reviewed by Martin Robinson.
1578
1579         [GTK] Remove webkit2 files that are still not added to the
1580         repository from the makefile
1581         https://bugs.webkit.org/show_bug.cgi?id=52145
1582
1583         This change is required for the release, we can add the lines
1584         again to the makefiles with the patches adding the files.
1585
1586         * GNUmakefile.am:
1587
1588 2011-01-10  Andreas Kling  <kling@webkit.org>
1589
1590         Reviewed by Simon Hausmann.
1591
1592         [Qt] [WK2] MiniBrowser does not load pages opened in new windows
1593         https://bugs.webkit.org/show_bug.cgi?id=52111
1594
1595         * UIProcess/API/qt/qwkpage.cpp:
1596         (QWKPage::context): Implement this method.
1597
1598 2011-01-09  Dan Bernstein  <mitz@apple.com>
1599
1600         Reviewed by Simon Fraser.
1601
1602         <rdar://problem/8839498> Assertion failure in KURL::KURL when calling WKURLRequestCreateWithWKURL with a non-parsed URL
1603         https://bugs.webkit.org/show_bug.cgi?id=52132
1604
1605         * Shared/API/c/WKURLRequest.cpp:
1606         (WKURLRequestCreateWithWKURL): Parse the URL.
1607         * Shared/WebString.h: Fixed a comment.
1608         * Shared/WebURL.h: Ditto.
1609
1610 2011-01-09  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
1611
1612         Reviewed by Martin Robinson.
1613
1614         Changes to add Process Launcher and Thread Launcher implementation to the WebKit2 GTK port.
1615         The main() implementation for WebKitWebProcess binary to launch Web process from UI process.
1616         https://bugs.webkit.org/show_bug.cgi?id=48511
1617
1618         * UIProcess/Launcher/gtk: Added.
1619         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: Added. GTK (UNIX_X11 specific) implementation
1620         (WebKit::ProcessLauncher::launchProcess):
1621         (WebKit::ProcessLauncher::terminateProcess):
1622         (WebKit::ProcessLauncher::platformInvalidate):
1623         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp: Added. Stubbed implementation for GTK port. Yet to implement.
1624         (WebKit::ThreadLauncher::createWebThread):
1625         * WebProcess/gtk: Added.
1626         * WebProcess/gtk/WebProcessGtk.cpp: Added. The stubbed implementations of virtual functions of WebProcess.h for GTK port.
1627         (WebKit::WebProcess::platformSetCacheModel):
1628         (WebKit::WebProcess::platformClearResourceCaches):
1629         (WebKit::WebProcess::platformInitializeWebProcess):
1630         (WebKit::WebProcess::platformShutdown):
1631         * WebProcess/gtk/WebProcessMainGtk.cpp: Added. The WebProcessMain call which initiates the Web Process for GTK port.
1632         (WebKit::WebProcessMainGtk):
1633         * WebProcess/gtk/WebProcessMainGtk.h: Added. The WebProcessMain declaration for Web Process for GTK port.
1634         * gtk/MainGtk.cpp: Added. The main function implementation for binary WebKitWebProcess.
1635         (main):
1636
1637 2011-01-07 Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
1638
1639         Reviewed by Martin Robinson.
1640
1641         [GTK] WebKit2 GNUmakefile is out of date from trunk
1642         https://bugs.webkit.org/show_bug.cgi?id=51883
1643
1644         * GNUmakefile.am: Updated sources list as per latest revision
1645         * Platform/gtk/RunLoopGtk.cpp:
1646         (RunLoop::TimerBase::start):
1647         * Platform/gtk/WorkQueueGtk.cpp:
1648         (WorkQueue::scheduleWorkAfterDelay):
1649         * Shared/gtk/BackingStoreGtk.cpp:
1650         (WebKit::BackingStore::paint):
1651         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
1652         (WebKit::InjectedBundle::load):
1653         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
1654         (WebKit::NetscapePlugin::platformInvalidate):
1655
1656 2011-01-08  Dan Bernstein  <mitz@apple.com>
1657
1658         Reviewed by Sam Weinig.
1659
1660         <rdar://problem/8812759> In WebKit2, PDF view settings (mode and scale) do not stick
1661         https://bugs.webkit.org/show_bug.cgi?id=52118
1662
1663         * Shared/WebPreferencesStore.cpp:
1664         (WebKit::WebPreferencesStore::encode): Encode the double values map.
1665         (WebKit::WebPreferencesStore::decode): Decode the double values map.
1666         (WebKit::defaultValueForKey): Added double instance.
1667         (WebKit::WebPreferencesStore::setDoubleValueForKey): Added.
1668         (WebKit::WebPreferencesStore::getDoubleValueForKey): Added.
1669         * Shared/WebPreferencesStore.h: Added PDFScaleFactor and PDFDisplayMode preferences.
1670         * UIProcess/API/mac/PDFViewController.mm:
1671         (-[WKPDFView initWithFrame:PDFViewController:WebKit::]): Initialize the _pdfViewController ivar.
1672         (-[WKPDFView invalidate]): Changed 'nil' to '0' in assignment to a non-Objective-C pointer.
1673         (-[WKPDFView setDocument:]): Added.
1674         (-[WKPDFView _applyPDFPreferences]): Added.
1675         (-[WKPDFView _updatePreferences:]): Added.
1676         (-[WKPDFView _updatePreferencesSoon]): Added.
1677         (-[WKPDFView _scaleOrDisplayModeOrPageChanged:]): Added.
1678         (-[WKPDFView viewDidMoveToWindow]): Added. Starts observing the PDF view for changes to scale
1679         and display mode.
1680         (-[WKPDFView viewWillMoveToWindow:]): Added. Stops observing for changes.
1681         (WebKit::PDFViewController::setPDFDocumentData): Changed to call throguh -[WKPDFView setDocument:].
1682         * UIProcess/WebPreferences.cpp:
1683         (WebKit::WebPreferences::updateDoubleValueForKey): Added.
1684         * UIProcess/WebPreferences.h:
1685         * UIProcess/cf/WebPreferencesCF.cpp:
1686         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added empty implementation.
1687         * UIProcess/gtk/WebPreferencesGtk.cpp:
1688         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added stub.
1689         * UIProcess/mac/WebPreferencesMac.mm:
1690         (WebKit::setDoubleValueIfInUserDefaults): Added.
1691         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
1692         * UIProcess/qt/WebPreferencesQt.cpp:
1693         (WebKit::WebPreferences::platformUpdateDoubleValueForKey): Added.
1694
1695 2011-01-08  Dan Bernstein  <mitz@apple.com>
1696
1697         Reviewed by Maciej Stachowiak.
1698
1699         In WebKit2, page zooming does not work with PDF
1700         https://bugs.webkit.org/show_bug.cgi?id=52113
1701
1702         * UIProcess/API/C/WKPage.cpp:
1703         (WKPageSupportsTextZoom): Added. Returns whether the page currently supports text-only zoom.
1704         * UIProcess/API/C/WKPage.h:
1705         * UIProcess/API/mac/PDFViewController.h: Made pdfDocumentClass() private and declared new
1706         member functions.
1707         * UIProcess/API/mac/PDFViewController.mm:
1708         (WebKit::PDFViewController::zoomFactor): Added.
1709         (WebKit::PDFViewController::setZoomFactor): Added.
1710         * UIProcess/API/mac/PageClientImpl.h:
1711         * UIProcess/API/mac/PageClientImpl.mm:
1712         (WebKit::PageClientImpl::customRepresentationZoomFactor): Added. Calls through to the WKView.
1713         (WebKit::PageClientImpl::setCustomRepresentationZoomFactor): Ditto.
1714         * UIProcess/API/mac/WKView.mm:
1715         (-[WKView _customRepresentationZoomFactor]): Added. Calls through to the PDFViewController.
1716         (-[WKView _setCustomRepresentationZoomFactor:]): Ditto.
1717         * UIProcess/API/mac/WKViewInternal.h:
1718         * UIProcess/API/qt/qwkpage_p.h:
1719         (QWKPagePrivate::customRepresentationZoomFactor): Added.
1720         (QWKPagePrivate::setCustomRepresentationZoomFactor): Added.
1721         * UIProcess/PageClient.h:
1722         * UIProcess/WebPageProxy.cpp:
1723         (WebKit::WebPageProxy::WebPageProxy): Coding style fix.
1724         (WebKit::WebPageProxy::supportsTextZoom): Added. Returns false if the main frame has a custom
1725         representation or is a standalone image, true otherwise.
1726         (WebKit::WebPageProxy::setTextZoomFactor): Bail out if the main frame has a custom representation.
1727         (WebKit::WebPageProxy::pageZoomFactor): If the main frame has a custom representation, get the
1728         zoom factor from the page client.
1729         (WebKit::WebPageProxy::setPageZoomFactor): If the main frame has a custom representation, have
1730         the client set the zoom factor.
1731         (WebKit::WebPageProxy::setPageAndTextZoomFactors): Ditto.
1732         * UIProcess/WebPageProxy.h:
1733         (WebKit::WebPageProxy::textZoomFactor): Changed to return 1 if the main frame has a custom
1734         representation.
1735         * UIProcess/win/WebView.cpp:
1736         (WebKit::WebView::customRepresentationZoomFactor): Added.
1737         (WebKit::WebView::setCustomRepresentationZoomFactor): Added.
1738         * UIProcess/win/WebView.h:
1739
1740 2011-01-08  Jeff Miller  <jeffm@apple.com>
1741
1742         Reviewed by Jon Honeycutt.
1743
1744         Add WKBundleFrameGetVisibleContentBounds().
1745         https://bugs.webkit.org/show_bug.cgi?id=52089
1746
1747         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1748         (WKBundleFrameGetVisibleContentBounds):
1749         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1750         Added WKBundleFrameGetVisibleContentBounds().
1751
1752 2011-01-08  Balazs Kelemen  <kbalazs@webkit.org>
1753
1754         Reviewed by Kenneth Rohde Christiansen.
1755
1756         [Qt][WK2] QWKView does not propagate show and hide events to the drawing area
1757         https://bugs.webkit.org/show_bug.cgi?id=52108
1758
1759         * UIProcess/API/qt/qgraphicswkview.cpp:
1760         (QGraphicsWKView::event): Call setPageIsVisible on the drawing area
1761         if the event is Show or Hide.
1762
1763 2011-01-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1764
1765         Reviewed by Kenneth Rohde Christiansen.
1766
1767         [Qt][Symbian] Make sure WebKit headers are included before platform headers on Symbian
1768         https://bugs.webkit.org/show_bug.cgi?id=31273
1769
1770         On Symbian PREPEND_INCLUDEPATH is the best way to make sure that WebKit headers
1771         are included before platform headers. On all other platforms continue to use
1772         INCLUDEPATH (as before).
1773
1774         * WebKit2.pro:
1775
1776 2011-01-08  Csaba Osztrogonác  <ossy@webkit.org>
1777
1778         [Qt][WK2] Unreviewed buildfix after r75313.
1779
1780         * Scripts/generate-forwarding-headers.pl:
1781
1782 2011-01-08  Adam Barth  <abarth@webkit.org>
1783
1784         Moving WebCore changes the layout of the Qt build directory as well,
1785         which means we need to change where we look for these generated files.
1786
1787         * DerivedSources.pro:
1788
1789 2011-01-07  Adam Barth  <abarth@webkit.org>
1790
1791         Rubber-stamped by Eric Seidel.
1792
1793         Move WebCore to Source
1794         https://bugs.webkit.org/show_bug.cgi?id=52050
1795
1796         * WebKit2.pro:
1797
1798 2011-01-07  Stephanie Lewis  <slewis@apple.com>
1799
1800         Reviewed by Geoff Garen.
1801
1802         <rdar://problem/8649617> Migrate memory tracking from Safari to WebKit
1803         https://bugs.webkit.org/show_bug.cgi?id=50799 Add Memory Sampler to WebKit
1804         
1805         Add a sampler for printing off process memory statistics.
1806         This tool can track:
1807                 
1808                 WebCore
1809                    - FastMalloc allocations bytes              (in use or committed)
1810                 JavaScriptCore
1811                    - Garbage collector heap bytes              (in use or committed)
1812                    - Stack bytes                               (committed only!)
1813                    - JIT Code bytes                            (committed only!)
1814                 Malloc zones
1815                    - In use bytes for the following zones:
1816                        * Default zone                          (in use or committed)
1817                        * DispCon zone                          (in use or committed)
1818                        * Purgable zone                         (in use or committed)
1819                 Task Info
1820                    - Resident size memory (RSIZE)
1821         
1822                 Data collected is dumped to a temporary file.
1823         
1824         Create a sandbox for a temporary file.
1825         * Shared/SandboxExtension.h:
1826         (WebKit::SandboxExtension::createHandleForTemporaryFile):
1827         * Shared/mac/SandboxExtensionMac.mm:
1828         (WebKit::SandboxExtension::createHandleForTemporaryFile):
1829         
1830         Memory Sampler files
1831         
1832         * Shared/WebMemorySampler.cpp: Added.
1833         (WebKit::WebMemorySampler::shared):
1834         (WebKit::WebMemorySampler::WebMemorySampler):
1835         (WebKit::WebMemorySampler::start):
1836         (WebKit::WebMemorySampler::initializeTimers):
1837         (WebKit::WebMemorySampler::stop):
1838         (WebKit::WebMemorySampler::isRunning):
1839         (WebKit::WebMemorySampler::initializeTempLogFile):
1840         (WebKit::WebMemorySampler::initializeSandboxedLogFile):
1841         (WebKit::WebMemorySampler::writeHeaders):
1842         (WebKit::WebMemorySampler::sampleTimerFired):
1843         (WebKit::WebMemorySampler::stopTimerFired):
1844         (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile):
1845         * Shared/WebMemorySampler.h: Added.
1846         * Shared/mac/WebMemorySampler.mac.mm: Added.
1847         (WebKit::WebMemorySampler::sampleSystemMalloc):
1848         (WebKit::WebMemorySampler::sampleProcessCommittedBytes):
1849         (WebKit::WebMemorySampler::processName):
1850         (WebKit::WebMemorySampler::sampleWebKit):
1851         
1852         API to start and stop UIProcess and WebProcess sampling.
1853         
1854         * UIProcess/API/C/WKContext.cpp:
1855         (WKContextStartMemorySampler):
1856         (WKContextStopMemorySampler):
1857         * UIProcess/API/C/WKContext.h:
1858         
1859         Send messages to WebProcess to start and stop memory sampling.
1860         
1861         * UIProcess/WebContext.cpp:
1862         (WebKit::WebContext::WebContext):
1863         (WebKit::WebContext::processDidFinishLaunching):
1864         (WebKit::WebContext::startMemorySampler):
1865         (WebKit::WebContext::stopMemorySampler):
1866         * UIProcess/WebContext.h:
1867         * WebKit2.xcodeproj/project.pbxproj:
1868         * WebProcess/WebProcess.cpp:
1869         (WebKit::WebProcess::startMemorySampler):
1870         (WebKit::WebProcess::stopMemorySampler):
1871         * WebProcess/WebProcess.h:
1872         * WebProcess/WebProcess.messages.in:
1873
1874 2011-01-07  Jessie Berlin  <jberlin@apple.com>
1875
1876         Reviewed by Dan Bernstein.
1877
1878         WebKit2: Need WKBundleFrameCopyProvisionalURL
1879         https://bugs.webkit.org/show_bug.cgi?id=52083
1880
1881         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1882         (WKBundleFrameCopyProvisionalURL):
1883         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1884         * WebProcess/WebPage/WebFrame.cpp:
1885         (WebKit::WebFrame::provisionalURL):
1886         Grab the URL from the provisional document loader.
1887         * WebProcess/WebPage/WebFrame.h:
1888
1889 2011-01-07  James Robinson  <jamesr@chromium.org>
1890
1891         Revert "Implement mozilla's animationTime property"
1892         https://bugs.webkit.org/show_bug.cgi?id=51952
1893
1894         This approach isn't quite right.
1895
1896         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
1897         (WebKit::ChunkedUpdateDrawingArea::display):
1898         (WebKit::ChunkedUpdateDrawingArea::setSize):
1899         * WebProcess/WebPage/WebPage.cpp:
1900         (WebKit::WebPage::drawRect):
1901         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
1902         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
1903
1904 2011-01-07 Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com>
1905
1906         Reviewed by Martin Robinson.
1907
1908         [GTK] WebKit2 GNUmakefile is out of date from trunk
1909         Adding new stub files for compiling on latest revision
1910         https://bugs.webkit.org/show_bug.cgi?id=51883
1911
1912         * UIProcess/gtk: Added.
1913         * UIProcess/gtk/TextCheckerGtk.cpp: Added.
1914         (WebKit::TextChecker::state):
1915         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
1916         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
1917         (WebKit::TextChecker::setGrammarCheckingEnabled):
1918         (WebKit::TextChecker::uniqueSpellDocumentTag):
1919         (WebKit::TextChecker::closeSpellDocumentWithTag):
1920         (WebKit::TextChecker::checkTextOfParagraph):
1921         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
1922         (WebKit::TextChecker::getGuessesForWord):
1923         (WebKit::TextChecker::learnWord):
1924         (WebKit::TextChecker::ignoreWord):
1925         * UIProcess/gtk/WebInspectorGtk.cpp: Added.
1926         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1927         (WebKit::WebInspectorProxy::platformOpen):
1928         (WebKit::WebInspectorProxy::platformClose):
1929         (WebKit::WebInspectorProxy::inspectorPageURL):
1930         * UIProcess/gtk/WebPageProxyGtk.cpp: Added.
1931         (WebKit::WebPageProxy::standardUserAgent):
1932         * UIProcess/gtk/WebPreferencesGtk.cpp: Added.
1933         (WebKit::WebPreferences::platformInitializeStore):
1934         (WebKit::WebPreferences::platformUpdateStringValueForKey):
1935         (WebKit::WebPreferences::platformUpdateBoolValueForKey):
1936         (WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
1937         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Added.
1938         (WebKit::WebContextMenuClient::lookUpInDictionary):
1939         (WebKit::WebContextMenuClient::isSpeaking):
1940         (WebKit::WebContextMenuClient::speak):
1941         (WebKit::WebContextMenuClient::stopSpeaking):
1942         * WebProcess/WebCoreSupport/gtk/WebDatabaseManagerGtk.cpp: Added.
1943         (WebKit::WebDatabaseManager::databaseDirectory):
1944         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp: Added.
1945         (WebKit::WebPopupMenu::setUpPlatformData):
1946         * WebProcess/WebPage/gtk: Added.
1947         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: Added.
1948         (WebKit::WebInspector::localizedStringsURL):
1949
1950 2011-01-06  Adam Roben  <aroben@apple.com>
1951
1952         Don't ever call ::SetCursor(0)
1953
1954         Doing so makes the cursor disappear from the screen.
1955
1956         Fixes <http://webkit.org/b/52024> Mouse cursor flashes when moving it
1957         around a WKView before the web process has finished launching
1958
1959         Reviewed by Jon Honeycutt.
1960
1961         * UIProcess/win/WebView.cpp:
1962         (WebKit::WebView::onSetCursor): If we don't have a cursor to set, just
1963         let Windows do its default thing (which is to set the cursor to the
1964         window class's cursor, which in our case is the arrow cursor).
1965         (WebKit::WebView::cursorToShow): Just return 0 when the page has
1966         crashed so that we'll show the default cursor (which is the arrow
1967         cursor). This change has no visible effect, but seems slightly better
1968         conceptually.
1969         (WebKit::WebView::updateNativeCursor): Don't do anything if we don't
1970         have a cursor to set.
1971
1972 2011-01-06  Adam Roben  <aroben@apple.com>
1973
1974         Fill the WKView with white when the web process hasn't drawn anything
1975         yet
1976
1977         Fixes <http://webkit.org/b/52023> WKView accumulates pixel garbage
1978         before web process has had a chance to draw anything (if Aero is
1979         disabled)
1980
1981         Reviewed by Jon Honeycutt.
1982
1983         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
1984         (WebKit::ChunkedUpdateDrawingAreaProxy::paint):
1985         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1986         * UIProcess/DrawingAreaProxy.h:
1987         * UIProcess/LayerBackedDrawingAreaProxy.cpp:
1988         (WebKit::LayerBackedDrawingAreaProxy::paint):
1989         * UIProcess/LayerBackedDrawingAreaProxy.h:
1990         * UIProcess/TiledDrawingAreaProxy.cpp:
1991         (WebKit::TiledDrawingAreaProxy::paint):
1992         * UIProcess/TiledDrawingAreaProxy.h:
1993         * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm:
1994         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
1995         * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp:
1996         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
1997         * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp:
1998         (WebKit::ChunkedUpdateDrawingAreaProxy::platformPaint):
1999         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp:
2000         (WebKit::LayerBackedDrawingAreaProxy::paint):
2001         Changed these functions to return a boolean indicating whether we
2002         actually painted anything.
2003
2004         * UIProcess/win/WebView.cpp:
2005         (WebKit::WebView::onPaintEvent): Fill with white (and don't call
2006         didDraw) when the DrawingAreaProxy isn't able to paint.
2007
2008 2011-01-06  Jessie Berlin  <jberlin@apple.com>
2009
2010         Reviewed by Jon Honeycutt.
2011
2012         WebKit2: Need WKBundlePagePrivate equivalent of WebKit1's WebViewPrivate's setDefersCallbacks
2013         https://bugs.webkit.org/show_bug.cgi?id=52038
2014
2015         The implementation of WebKit1's WebViewPrivate's setDefersCallbacks on both Windows and Mac
2016         calls WebCore::Page::setDefersLoading.
2017
2018         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2019         (WKBundlePageSetDefersLoading):
2020         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2021         * WebProcess/WebPage/WebPage.cpp:
2022         (WebKit::WebPage::setDefersLoading):
2023         * WebProcess/WebPage/WebPage.h:
2024
2025 2011-01-06  Brady Eidson  <beidson@apple.com>
2026
2027         Reviewed by Darin Adler.
2028
2029         <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
2030         Change WebKit2 session restoring to restore the full back/forward list.
2031
2032         * UIProcess/WebProcessProxy.cpp:
2033         (WebKit::WebProcessProxy::registerNewWebBackForwardListItem): Let the UIProcess register its own
2034           WebBackForwardListItems in its ID map upon creation.
2035         * UIProcess/WebProcessProxy.h:
2036
2037         * UIProcess/cf/WebPageProxyCF.cpp:
2038         (WebKit::WebPageProxy::restoreFromSessionStateData): Register each new list entry in the
2039           UIProcess ID map.
2040
2041         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2042         (WebKit::WebBackForwardListProxy::addItemFromUIProcess): Add this method to register UIProcess
2043           created items without doing any of the other work normally associated with adding a new back/forward item
2044           (such as notifying the UIProcess).
2045         * WebProcess/WebPage/WebBackForwardListProxy.h:
2046
2047         * WebProcess/WebPage/WebPage.cpp:
2048         (WebKit::WebPage::restoreSession): Map all of the back/forward list entries from the UIProcess then
2049           cause a load of the current entry.
2050
2051 2011-01-06  Adam Roben  <aroben@apple.com>
2052
2053         Always show the arrow cursor when the web process has crashed
2054
2055         Fixes <http://webkit.org/b/52006> WKView shows a stale cursor when the
2056         web process crashes
2057
2058         Reviewed by Ada Chan.
2059
2060         * UIProcess/win/WebView.cpp:
2061         (WebKit::WebView::processDidCrash):
2062         (WebKit::WebView::didRelaunchProcess):
2063         Update the cursor to reflect the new state.
2064
2065         (WebKit::WebView::cursorToShow): Always show the arrow cursor when the
2066         web process has crashed.
2067
2068 2011-01-06  Adam Roben  <aroben@apple.com>
2069
2070         Reduce code duplication in WebView::updateNativeCursor
2071
2072         Fixes <http://webkit.org/b/52005> It's not easy to add new behavior to
2073         WebView::updateNativeCursor
2074
2075         Reviewed by Ada Chan.
2076
2077         * UIProcess/win/WebView.cpp:
2078         (WebKit::WebView::cursorToShow): Moved code to choose a cursor here...
2079         (WebKit::WebView::updateNativeCursor): ...from here.
2080
2081         * UIProcess/win/WebView.h: Added cursorToShow.
2082
2083 2011-01-06  Adam Roben  <aroben@apple.com>
2084
2085         Make WKView fill with white when the web process has crashed
2086
2087         Previously we would just draw whatever we had last drawn into the
2088         WKView (i.e., a stale picture of the web page), which was confusing
2089         (because the web page would mysteriously not respond to input) and ugly
2090         (because it wouldn't behave properly if the window was resized).
2091
2092         Fixes <http://webkit.org/b/52004> WKView keeps painting a stale
2093         picture of the web page when the web process crashes
2094
2095         Reviewed by Ada Chan.
2096
2097         * UIProcess/win/WebView.cpp:
2098         (WebKit::WebView::onPaintEvent): Ported code from -[WKView drawRect:]
2099         to fill with white if the page is invalid or has no DrawingArea. As a
2100         bonus, also ported the call to WebPageProxy::didDraw from that method.
2101
2102         (WebKit::WebView::processDidCrash):
2103         (WebKit::WebView::didRelaunchProcess):
2104         Invalidate our window so that we'll redraw with white or the new page.
2105
2106 2011-01-06  Adam Roben  <aroben@apple.com>
2107
2108         Make WKViews work on Windows after a crashed web process gets relaunched
2109
2110         Fixes <http://webkit.org/b/52001> Relaunching the web process fails to
2111         revivify WKViews on Windows
2112
2113         Reviewed by Ada Chan.
2114
2115         * UIProcess/win/WebView.cpp:
2116         (WebKit::WebView::didRelaunchProcess): Implemented by porting code from
2117         -[WKView _didRelaunchProcess].
2118
2119 2011-01-06  Adam Roben  <aroben@apple.com>
2120
2121         Remove WebView::m_rect
2122
2123         It was only used in the constructor, and wasn't even kept up-to-date as
2124         the WebView's size changed.
2125
2126         Fixes <http://webkit.org/b/52000> WebView::m_rect is unnecessary
2127
2128         Reviewed by Ada Chan.
2129
2130         * UIProcess/win/WebView.cpp:
2131         * UIProcess/win/WebView.h:
2132
2133 2011-01-05  Brian Weinstein  <bweinstein@apple.com>
2134
2135         Reviewed by Ada Chan.
2136
2137         WebKit2: Should be able to call into injected bundle to ask if we should allow resource loads
2138         https://bugs.webkit.org/show_bug.cgi?id=51969
2139         
2140         Add the ability to call into the injected bundle to ask if we should allow resource loads.
2141         If the injected bundle says we should cancel, we clear out the ResourceRequest that was
2142         passed into willSendRequest, which cancels the resource load.
2143
2144         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add the new callback for allowing/cancelling
2145             resource loads.
2146         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
2147         (WebKit::InjectedBundlePageLoaderClient::shouldLoadResourceForFrame): Calls through to the client.
2148         * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
2149         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2150         (WebKit::WebFrameLoaderClient::dispatchWillSendRequest): Ask the InjectedBundlePageLoaderClient if we
2151             should load the resource or not.
2152
2153 2011-01-06  Jeff Miller  <jeffm@apple.com>
2154
2155         Reviewed by Darin Adler.
2156
2157         WebKit2: Add APIs to WKBundleFrame to get content bounds and scroll offset
2158         https://bugs.webkit.org/show_bug.cgi?id=51968
2159
2160         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2161         (WKBundleFrameGetContentBounds):
2162         (WKBundleFrameGetScrollOffset):
2163         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
2164         Add WKBundleFrameGetContentBounds() and WKBundleFrameGetScrollOffset().
2165
2166 2011-01-06  James Robinson  <jamesr@chromium.org>
2167
2168         Reviewed by Simon Fraser.
2169
2170         Implement mozilla's animationTime property
2171         https://bugs.webkit.org/show_bug.cgi?id=51952
2172
2173         Tells the page to clear the current animation time after producing a frame.
2174
2175         * WebProcess/WebPage/WebPage.cpp:
2176         (WebKit::WebPage::drawRect):
2177         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2178         (WebKit::ChunkedUpdateDrawingArea::display):
2179         (WebKit::ChunkedUpdateDrawingArea::setSize):
2180         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm:
2181         (WebKit::LayerBackedDrawingArea::syncCompositingLayers):
2182
2183 2011-01-06  Darin Adler  <darin@apple.com>
2184
2185         Redo the half-done rename from the last check-in.
2186         Sorry for the broken build last night.
2187
2188         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2189         (WebKit::WebBackForwardListProxy::removeItem): Renamed.
2190         * WebProcess/WebPage/WebBackForwardListProxy.h: Updated
2191         for new name.
2192         * WebProcess/WebPage/WebPage.cpp:
2193         (WebKit::WebPage::didRemoveBackForwardItem): Updated to
2194         use the new name.
2195
2196 2011-01-06  Maciej Stachowiak  <mjs@apple.com>
2197
2198         Rubber stamped by Dan Bernstein.
2199
2200         Fix build for Darin's previous change w/ the obvious renaming.
2201
2202         * WebProcess/WebPage/WebBackForwardListProxy.h:
2203         * WebProcess/WebPage/WebPage.cpp:
2204         (WebKit::WebPage::didRemoveBackForwardItem):
2205
2206 2011-01-05  Darin Adler  <darin@apple.com>
2207
2208         Reviewed by Geoff Garen.
2209
2210         Back/Forward entries in WebKit2 leak
2211         https://bugs.webkit.org/show_bug.cgi?id=51983
2212
2213         Besides fixing the leak, this also fixes a problem where
2214         all history items were sent over to the UI process, but
2215         we wanted to send only back/forward items.
2216
2217         * UIProcess/WebBackForwardList.cpp:
2218         (WebKit::WebBackForwardList::pageClosed): Added.
2219         Tells the web process about all the back/forward
2220         items being removed.
2221         (WebKit::WebBackForwardList::addItem): Ditto.
2222         Also removed a redundant call to didChangeBackForwardList.
2223         (WebKit::WebBackForwardList::clear): Ditto.
2224
2225         * UIProcess/WebBackForwardList.h: Added pageClosed.
2226
2227         * UIProcess/WebPageProxy.cpp:
2228         (WebKit::WebPageProxy::close): Added a call to pageClosed.
2229         (WebKit::WebPageProxy::backForwardRemovedItem): Added.
2230         Sends a message to the web page in the web process.
2231
2232         * UIProcess/WebPageProxy.h: Added backForwardRemovedItem.
2233
2234         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2235         (WebKit::updateBackForwardItem): Added an itemID argument,
2236         since callers will now be getting it and we don't want to
2237         get it twice. Removed the code to generate an ID. Also
2238         removed some local variables to make the code a little
2239         tighter and clearer.
2240         (WebKit::WK2NotifyHistoryItemChanged): Only call
2241         updateBackForwardItem for items that already have IDs.
2242         We don't want to send cross-process messages for every
2243         history item; just the ones that are top level back/forward
2244         items.
2245         (WebKit::WebBackForwardListProxy::removeItem):
2246         Added. For use when the UI process tells us to remove it.
2247         (WebKit::WebBackForwardListProxy::addItem): Added code to
2248         assign an ID and put this item into the maps. This is called
2249         exactly once on each back/forward item.
2250
2251         * WebProcess/WebPage/WebBackForwardListProxy.h: Added
2252         removeItem.
2253
2254         * WebProcess/WebPage/WebPage.cpp:
2255         (WebKit::WebPage::didRemoveBackForwardItem): Added.
2256
2257         * WebProcess/WebPage/WebPage.h: Added didRemoveBackForwardItem.
2258
2259         * WebProcess/WebPage/WebPage.messages.in: Added
2260         DidRemoveBackForwardItem message.
2261
2262 2011-01-05  Steve Falkenburg  <sfalken@apple.com>
2263
2264         Reviewed by Darin Adler.
2265
2266         Debug and Release builds on Windows clobber each other
2267         https://bugs.webkit.org/show_bug.cgi?id=49185
2268
2269         Changes the structure of WebKitBuild build products directory so we
2270         completely separate each build configuration into independent directories.
2271         
2272         Although we previously had per-configuration directories for obj, this change adds
2273         per-configuration directories for bin, lib, obj, and include. Each configuration's
2274         build products are stored within a directory inside of WebKitBuild.
2275         
2276         Most use of $(WebKitOutputDir) in the build files has been replaced by $(ConfigurationBuildDir),
2277         defined in common.vsprops to be $(WebKitOutputDir)\$(ConfigurationName).
2278
2279         * win/WebKit2.make:
2280         * win/WebKit2.vcproj:
2281         * win/WebKit2Common.vsprops:
2282         * win/WebKit2Generated.make:
2283         * win/WebKit2GeneratedCommon.vsprops:
2284         * win/WebKit2WebProcessPostBuild.cmd:
2285         * win/WebKit2WebProcessPreBuild.cmd:
2286         * win/WebKitPostBuild.cmd:
2287         * win/WebKitPreBuild.cmd:
2288
2289 2011-01-05  Alexey Proskuryakov  <ap@apple.com>
2290
2291         Reviewed by Anders Carlsson.
2292
2293         https://bugs.webkit.org/show_bug.cgi?id=51973
2294         Make main frame PDF printing work
2295
2296         * UIProcess/API/mac/PDFViewController.h:
2297         * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::makePrintOperation):
2298         Ask PDFDocument to create an NSPrintOperation.
2299
2300         * UIProcess/API/mac/WKView.h:
2301         * UIProcess/API/mac/WKView.mm:
2302         (-[WKView printOperationWithPrintInfo:forFrame:]): Create a new NSPrintOperation, either
2303         from scratch or from a PDF view.
2304         (-[WKView canPrintHeadersAndFooters]): Report if the view can be re-paginated to add headers
2305         and footers.
2306
2307 2011-01-05  Anders Carlsson  <andersca@apple.com>
2308
2309         Reviewed by Sam Weinig.
2310
2311         <rdar://problem/8750248>
2312         Need a way to create a new DownloadProxy from an arbitrary resource request
2313
2314         <rdar://problem/8750465>
2315         Need a way to start a download in WKDownload
2316         
2317         <rdar://problem/8752204>
2318         WK2 Context Menus - "Save linked file" support
2319
2320         * Shared/ContextMenuState.h: Added.
2321         Add a ContextMenuState struct which contains state for context menus.
2322
2323         * UIProcess/API/C/WKContext.cpp:
2324         (WKContextDownloadURLRequest):
2325         Call WebContext::download.
2326
2327         * UIProcess/WebContext.cpp:
2328         (WebKit::WebContext::download):
2329         Send a DownloadRequest message to the web process.
2330
2331         * UIProcess/WebPageProxy.cpp:
2332         (WebKit::WebPageProxy::showContextMenu):
2333         Set the active context menu state.
2334
2335         (WebKit::WebPageProxy::contextMenuItemSelected):
2336         Handle ContextMenuItemTagDownloadImageToDisk and ContextMenuItemTagDownloadLinkToDisk by calling
2337         WebContext::Download, passing the respective URLs.
2338
2339         * UIProcess/WebPageProxy.messages.in:
2340         ShowContextMenu now takes state as well.
2341
2342         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2343         (WebKit::WebContextMenuClient::downloadURL):
2344         Assert that this is never reached; downloads are handled in the UI process.
2345
2346         * WebProcess/WebPage/WebContextMenu.cpp:
2347         (WebKit::WebContextMenu::show):
2348         Pass the context menu state along when sending the ShowContextMenu message.
2349
2350         * WebProcess/WebProcess.cpp:
2351         (WebKit::WebProcess::downloadRequest):
2352         Call the shared DownloadManager.
2353
2354         * WebProcess/WebProcess.messages.in:
2355         Add DownloadRequest message.
2356
2357         * WebKit2.xcodeproj/project.pbxproj:
2358         * win/WebKit2.vcproj:
2359         Add ContextMenuState.h.
2360
2361 2011-01-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2362
2363         Unreviewed build fix.
2364
2365         [Qt] [Symbian] Fix building NPAPI support
2366
2367         NPEvent is mapped to QAction on Symbian. QAction has no
2368         default constructor, so toNP() fails to build. Add a case for
2369         Symbian behind the OS(SYMBIAN) guard.
2370
2371         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2372         (WebKit::toNP):
2373
2374 2011-01-05  Jeff Miller  <jeffm@apple.com>
2375
2376         Reviewed by Dan Bernstein.
2377
2378         Copy WKImageCG.h to include\WebKit2 in build output
2379         https://bugs.webkit.org/show_bug.cgi?id=51944
2380
2381         * win/WebKit2Generated.make:
2382         Add xcopy command to copy WKImageCG.h.
2383
2384 2011-01-05  Brady Eidson  <beidson@apple.com>
2385
2386         Reviewed by Sam Weinig.
2387
2388         Part of <rdar://problem/8261624> and https://bugs.webkit.org/show_bug.cgi?id=47355
2389         Change WebKit2 session restoring to restore the full back/forward list
2390
2391         Add a new message to tell the WebProcess to restore a session state:
2392         * WebProcess/WebPage/WebPage.cpp:
2393         (WebKit::WebPage::restoreSession):
2394         * WebProcess/WebPage/WebPage.h:
2395         * WebProcess/WebPage/WebPage.messages.in: Add the new message, AND fix the intentional misspellings.
2396         
2397         Also, Sam sucks.
2398
2399         Change WebProcess back/forward list item ids to be odd (UIProcess's will be even):
2400         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2401         (WebKit::generateHistoryItemID):
2402
2403         Provide accessors to the entries in the list to pass to the WebProcess:
2404         * UIProcess/WebBackForwardList.h:
2405         (WebKit::WebBackForwardList::entries):
2406         (WebKit::WebBackForwardList::currentIndex):
2407
2408         Add decoding of the saved back/forward list itmes (we already encode them):
2409         * UIProcess/cf/WebBackForwardListCF.cpp:
2410         (WebKit::generateWebBackForwardItemID):
2411         (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation):
2412
2413         Instead of loading the current URL, pass the entire last back to the WebProcess:
2414         * UIProcess/cf/WebPageProxyCF.cpp:
2415         (WebKit::WebPageProxy::restoreFromSessionStateData):
2416
2417 2011-01-05  Brady Eidson  <beidson@apple.com>
2418
2419         Reviewed by Darin Adler.
2420
2421         https://bugs.webkit.org/show_bug.cgi?id=51953
2422         Add a "SessionState" object for IPC messaging.
2423
2424         This object includes all data necessary to restore a session state;
2425         For now, this is just the back/forward list to restore.
2426
2427         * Shared/SessionState.cpp: Added.
2428         (WebKit::SessionState::SessionState):
2429         (WebKit::SessionState::encode):
2430         (WebKit::SessionState::decode):
2431         * Shared/SessionState.h: Added.
2432         (WebKit::SessionState::list):
2433         (WebKit::SessionState::currentIndex):
2434
2435         * WebKit2.pro:
2436         * WebKit2.xcodeproj/project.pbxproj:
2437         * win/WebKit2.vcproj:
2438
2439 2011-01-05  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
2440
2441         Unreviewed build fix.
2442
2443         Include unistd.h for _exit() for non-Windows builds.
2444
2445         Build break noticed on QtWebkit Symbian builds.
2446
2447         * Shared/ChildProcess.cpp:
2448
2449 2011-01-05  Brady Eidson  <beidson@apple.com>
2450
2451         Reviewed by Darin Adler.
2452
2453         https://bugs.webkit.org/show_bug.cgi?id=51949
2454         Make WebBackForwardListItem shared, and add encoders and decoders
2455
2456         * Shared/WebBackForwardListItem.cpp: Copied from UIProcess/WebBackForwardListItem.cpp.
2457         (WebKit::WebBackForwardListItem::encode):
2458         (WebKit::WebBackForwardListItem::decode):
2459         * Shared/WebBackForwardListItem.h: Copied from UIProcess/WebBackForwardListItem.h.
2460         * UIProcess/WebBackForwardListItem.cpp: Removed.
2461         * UIProcess/WebBackForwardListItem.h: Removed.
2462
2463         * WebKit2.pro:
2464         * WebKit2.xcodeproj/project.pbxproj:
2465         * win/WebKit2.vcproj:
2466
2467 2011-01-05  Anders Carlsson  <andersca@apple.com>
2468
2469         Reviewed by Sam Weinig.
2470
2471         Handle smart insert/delete
2472         https://bugs.webkit.org/show_bug.cgi?id=51946
2473
2474         * Shared/WebPageCreationParameters.cpp:
2475         (WebKit::WebPageCreationParameters::encode):
2476         (WebKit::WebPageCreationParameters::decode):
2477         * Shared/WebPageCreationParameters.h:
2478         Add isSmartInsertDelete enabled.
2479
2480         * UIProcess/API/mac/WKView.mm:
2481         (-[WKView validateUserInterfaceItem:]):
2482         Handle toggleSmartInsertDelete:.
2483
2484         (-[WKView toggleSmartInsertDelete:]):
2485         Toggle the smart insert/delete state.
2486
2487         * UIProcess/TextChecker.h:
2488         Add isSmartInsertDeleteEnabled and setSmartInsertDeleteEnabled.
2489
2490         * UIProcess/WebPageProxy.cpp:
2491         (WebKit::WebPageProxy::WebPageProxy):
2492         Initialize m_isSmartInsertDeleteEnabled.
2493
2494         (WebKit::WebPageProxy::contextMenuItemSelected):
2495         Handle ContextMenuItemTagSmartCopyPaste.
2496
2497         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
2498         Update the state and send a SetSmartInsertDeleteEnabled message.
2499
2500         (WebKit::WebPageProxy::creationParameters):
2501         Initialize isSmartInsertDeleteEnabled.
2502
2503         * UIProcess/WebPageProxy.h:
2504         (WebKit::WebPageProxy::isSmartInsertDeleteEnabled):
2505         Return m_isSmartInsertDeleteEnabled.
2506
2507         * UIProcess/mac/TextCheckerMac.mm:
2508         (WebKit::TextChecker::isSmartInsertDeleteEnabled):
2509         (WebKit::TextChecker::setSmartInsertDeleteEnabled):
2510         Store and fetch the smart insert delete state.
2511
2512         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2513         (WebKit::WebEditorClient::smartInsertDeleteEnabled):
2514         Call WebPage::isSmartInsertDeleteEnabled.
2515
2516         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2517         (WebKit::WebEditorClient::toggleSmartInsertDelete):
2518         Assert that this is never called.
2519
2520         * WebProcess/WebPage/WebPage.cpp:
2521         (WebKit::WebPage::WebPage):
2522         Initialize m_isSmartInsertDeleteEnabled
2523
2524         * WebProcess/WebPage/WebPage.h:
2525         (WebKit::WebPage::isSmartInsertDeleteEnabled):
2526         (WebKit::WebPage::setSmartInsertDeleteEnabled):
2527         Add getter and setter.
2528
2529         * WebProcess/WebPage/WebPage.messages.in:
2530         Add SetSmartInsertDeleteEnabled message.
2531
2532 2011-01-05  Anders Carlsson  <andersca@apple.com>
2533
2534         Fix Windows build.
2535         
2536         * WebProcess/WebPage/WebPage.cpp:
2537
2538 2011-01-05  Anders Carlsson  <andersca@apple.com>
2539
2540         Reviewed by Adele Peterson.
2541
2542         Implement word transformation
2543         https://bugs.webkit.org/show_bug.cgi?id=51943
2544
2545         * UIProcess/API/mac/WKView.mm:
2546         (-[WKView validateUserInterfaceItem:]):
2547         Handle the word transformation selectors.
2548
2549         (-[WKView uppercaseWord:]):
2550         (-[WKView lowercaseWord:]):
2551         (-[WKView capitalizeWord:]):
2552         Call down to the WebPageProxy.
2553
2554         * UIProcess/WebPageProxy.cpp:
2555         (WebKit::WebPageProxy::uppercaseWord):
2556         (WebKit::WebPageProxy::lowercaseWord):
2557         (WebKit::WebPageProxy::capitalizeWord):
2558         Send messages to the WebPage.
2559
2560         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2561         (WebKit::changeWordCase):
2562         Add helper function.
2563
2564         (WebKit::WebEditorClient::uppercaseWord):
2565         (WebKit::WebEditorClient::lowercaseWord):
2566         (WebKit::WebEditorClient::capitalizeWord):
2567         Call helper function.
2568
2569         * WebProcess/WebPage/WebPage.cpp:
2570         (WebKit::WebPage::changeSpellingToWord):
2571         Call replaceSelectionWithText.
2572
2573         (WebKit::WebPage::uppercaseWord):
2574         (WebKit::WebPage::lowercaseWord):
2575         (WebKit::WebPage::capitalizeWord):
2576         Call the editor functions.
2577
2578         (WebKit::WebPage::replaceSelectionWithText):
2579         New helper function that replaces the selected string with another string.
2580
2581         * WebProcess/WebPage/WebPage.messages.in:
2582         Add new messages.
2583
2584 2011-01-05  Alexey Proskuryakov  <ap@apple.com>
2585
2586         Reviewed by Anders Carlsson.
2587
2588         https://bugs.webkit.org/show_bug.cgi?id=51935
2589         Add WebKit2 API for largest frame
2590
2591         * UIProcess/API/C/WKPage.cpp:
2592         (WKPageGetFrameSetLargestFrame):
2593         * UIProcess/API/C/WKPage.h:
2594
2595 2011-01-05  Anders Carlsson  <andersca@apple.com>
2596
2597         Reviewed by Sam Weinig.
2598
2599         More work on spelling
2600         https://bugs.webkit.org/show_bug.cgi?id=51939
2601
2602         * UIProcess/API/mac/WKView.mm:
2603         (-[WKView validateUserInterfaceItem:]):
2604         Handle changeSpelling: as well.
2605
2606         (-[WKView showGuessPanel:]):
2607         Show or hide the guess panel.
2608
2609         (-[WKView checkSpelling:]):
2610         Pass false to advanceToNextMisspelling.
2611
2612         (-[WKView changeSpelling:]):
2613         Call changeSpellingToWord.
2614
2615         * UIProcess/TextChecker.h:
2616         * UIProcess/WebPageProxy.cpp:
2617         (WebKit::WebPageProxy::WebPageProxy):
2618         Initialize m_pendingLearnOrIgnoreWordMessageCount.
2619
2620         (WebKit::WebPageProxy::contextMenuItemSelected):
2621         Handle smart toggles directly in the UI process, keep track of whether
2622         we're asked to learn or ignore a word.
2623
2624         (WebKit::WebPageProxy::advanceToNextMisspelling):
2625         Pass the boolean through.
2626
2627         (WebKit::WebPageProxy::changeSpellingToWord):
2628         Send a ChangeSpellingToWord message.
2629
2630         (WebKit::WebPageProxy::learnWord):
2631         (WebKit::WebPageProxy::ignoreWord):
2632         Check that we do have a pending learn or ignore word message. Call through to
2633         the text checker.
2634
2635         (WebKit::WebPageProxy::processDidCrash):
2636         Reset the m_pendingLearnOrIgnoreWordMessageCount variable.
2637
2638         * UIProcess/WebPageProxy.h:
2639         * UIProcess/WebPageProxy.messages.in:
2640         Add new messages.
2641
2642         * UIProcess/mac/TextCheckerMac.mm:
2643         (WebKit::TextChecker::learnWord):
2644         (WebKit::TextChecker::ignoreWord):
2645         Implement in terms of NSSpellChecker.
2646
2647         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2648         (WebKit::WebEditorClient::ignoreWordInSpellDocument):
2649         (WebKit::WebEditorClient::learnWord):
2650         Send IgnoreWord and LearnWord messages.
2651
2652         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2653         (WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution):
2654         (WebKit::WebEditorClient::toggleAutomaticLinkDetection):
2655         (WebKit::WebEditorClient::toggleAutomaticDashSubstitution):
2656         (WebKit::WebEditorClient::toggleAutomaticTextReplacement):
2657         Add assertions.
2658
2659         * WebProcess/WebPage/WebPage.cpp:
2660         (WebKit::WebPage::advanceToNextMisspelling):
2661         Pass the bool along to the Editor.
2662
2663         (WebKit::WebPage::changeSpellingToWord):
2664         Replace the selected text.
2665
2666         * WebProcess/WebPage/WebPage.messages.in:
2667         Add new ChangeSpellingToWord message and add a boolean to AdvanceToNextMisspelling.
2668
2669 2011-01-05  Anders Carlsson  <andersca@apple.com>
2670
2671         Reviewed by Dan Bernstein.
2672
2673         Keep track of active text substitution preferences
2674         https://bugs.webkit.org/show_bug.cgi?id=51931
2675
2676         * Shared/TextCheckerState.h:
2677         * UIProcess/API/mac/WKView.mm:
2678         (-[WKView validateUserInterfaceItem:]):
2679         Handle new selectors, mostly copied from WebKit1 code.
2680
2681         (-[WKView orderFrontSubstitutionsPanel:]):
2682         Open the substitution panel.
2683
2684         (-[WKView isAutomaticQuoteSubstitutionEnabled]):
2685         (-[WKView setAutomaticQuoteSubstitutionEnabled:]):
2686         (-[WKView toggleAutomaticQuoteSubstitution:]):
2687         (-[WKView isAutomaticDashSubstitutionEnabled]):
2688         (-[WKView setAutomaticDashSubstitutionEnabled:]):
2689         (-[WKView toggleAutomaticDashSubstitution:]):
2690         (-[WKView isAutomaticLinkDetectionEnabled]):
2691         (-[WKView setAutomaticLinkDetectionEnabled:]):
2692         (-[WKView toggleAutomaticLinkDetection:]):
2693         (-[WKView isAutomaticTextReplacementEnabled]):
2694         (-[WKView setAutomaticTextReplacementEnabled:]):
2695         (-[WKView toggleAutomaticTextReplacement:]):
2696         Call the text checker, and update the state in the web process if needed.
2697
2698         * UIProcess/TextChecker.h:
2699         Add new flags.
2700
2701         * UIProcess/mac/TextCheckerMac.mm:
2702         (WebKit::initializeState):
2703         Initialize flags from user defaults.
2704
2705         (WebKit::TextChecker::setAutomaticQuoteSubstitutionEnabled):
2706         (WebKit::TextChecker::setAutomaticDashSubstitutionEnabled):
2707         (WebKit::TextChecker::setAutomaticLinkDetectionEnabled):
2708         (WebKit::TextChecker::setAutomaticTextReplacementEnabled):
2709         Update and save the flags.
2710
2711         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2712         (WebKit::WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
2713         (WebKit::WebEditorClient::isAutomaticLinkDetectionEnabled):
2714         (WebKit::WebEditorClient::isAutomaticDashSubstitutionEnabled):
2715         (WebKit::WebEditorClient::isAutomaticTextReplacementEnabled):
2716         Get the text checker state.
2717
2718 2011-01-05  Dan Bernstein  <mitz@apple.com>
2719
2720         Rubber-stamped by Darin Adler.
2721
2722         Cleaned up com.apple.WebProcess.sb
2723
2724         * WebProcess/com.apple.WebProcess.sb: Moved the closing parentheses of multi-line blocks to
2725         their own lines. Changed to use WebKit-standard 4-space indentation.
2726
2727 2011-01-05  Alexey Proskuryakov  <ap@apple.com>
2728
2729         Reviewed by Sam Weinig.
2730
2731         https://bugs.webkit.org/show_bug.cgi?id=51903
2732         Tell UI process which subframe is largest
2733
2734         * UIProcess/WebPageProxy.h:
2735         (WebKit::WebPageProxy::frameSetLargestFrame):
2736         Remember largest frame in frameset pages.
2737
2738         * UIProcess/WebPageProxy.cpp:
2739         (WebKit::WebPageProxy::frameDidBecomeFrameSet): Reset stored largest frame if main frame
2740         changes to a frameset or back.
2741         (WebKit::WebPageProxy::frameSetLargestFrameChanged): Store a new largest frame when notified
2742         of a change.
2743
2744         * UIProcess/WebPageProxy.messages.in: Added FrameSetLargestFrameChanged.
2745
2746         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2747         (WebKit::area): Calculate area of a frame.
2748         (WebKit::findLargestFrameInFrameSet): Find largest first-level subframe in a frameset page.
2749         (WebKit::WebChromeClient::contentsSizeChanged): Recalculate largest frame, and notify UI
2750         process if it changed.
2751
2752         * WebProcess/WebCoreSupport/WebChromeClient.h: Store the latest largest frame.
2753
2754         * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::size):
2755         * WebProcess/WebPage/WebFrame.h:
2756         Expose frame size.
2757
2758 2011-01-04  Benjamin Poulain  <benjamin.poulain@nokia.com>
2759
2760         Reviewed by Kenneth Rohde Christiansen.
2761
2762         [Qt] [WK2] Add support for non-trivial context menu action
2763         https://bugs.webkit.org/show_bug.cgi?id=51902
2764
2765         Implement a call back from the QAction triggered in the UIProcess to the
2766         action in WebProcess.
2767
2768         A few basic actions have been implemented based on this feature.
2769
2770         * UIProcess/API/qt/qwkpage.cpp:
2771         (contextMenuActionForWebAction):
2772         (QWKPage::triggerAction):
2773         (QWKPage::action):
2774         * UIProcess/API/qt/qwkpage.h:
2775         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2776         (WebKit::webActionForContextMenuAction):
2777
2778 2011-01-04  Siddharth Mathur  <siddharth.mathur@nokia.com>
2779
2780         Reviewed by Laszlo Gombos.
2781
2782         Include unistd.h for sleep() for non-Windows builds.
2783
2784         * WebProcess/WebProcess.cpp:
2785         * WebProcess/qt/WebProcessMainQt.cpp:
2786
2787 2011-01-04  Brian Weinstein  <bweinstein@apple.com>
2788
2789         Windows build fix. Change the inline type of consumePermanently.
2790
2791         * Shared/SandboxExtension.h:
2792         (WebKit::SandboxExtension::consumePermanently):
2793
2794 2011-01-04  Anders Carlsson  <andersca@apple.com>
2795
2796         Reviewed by Dan Bernstein.
2797
2798         <rdar://problem/8821203> Sandbox violations trying to access the Safari cache
2799
2800         * Shared/SandboxExtension.h:
2801         (WebKit::SandboxExtension::consumePermanently):
2802         New function which consumes a sandbox extension and destroys it, making it impossible
2803         to later revoke it.
2804
2805         * Shared/WebProcessCreationParameters.cpp:
2806         (WebKit::WebProcessCreationParameters::encode):
2807         (WebKit::WebProcessCreationParameters::decode):
2808         Encode and decode the path extension handle.
2809
2810         * Shared/mac/SandboxExtensionMac.mm:
2811         (WebKit::SandboxExtension::createHandle):
2812         Standardize the path before creating the handle.
2813
2814         * UIProcess/mac/WebContextMac.mm:
2815         (WebKit::WebContext::platformInitializeWebProcess):
2816         Create a sandbox extension for the cache path.
2817
2818         * WebProcess/mac/WebProcessMac.mm:
2819         (WebKit::WebProcess::platformInitializeWebProcess):
2820         Consume the sandbox extension.
2821
2822 2011-01-04  Anders Carlsson  <andersca@apple.com>
2823
2824         Fix build.
2825
2826         * UIProcess/mac/TextCheckerMac.mm:
2827         (WebKit::TextChecker::getGuessesForWord):
2828
2829 2011-01-04  Jeff Miller  <jeffm@apple.com>
2830
2831         Reviewed by Darin Adler.
2832
2833         Mouse events in WebKit2 on Windows need to know whether the click activated the WebView to match WebKit1 behavior.
2834         https://bugs.webkit.org/show_bug.cgi?id=51228
2835
2836         * Shared/WebEvent.h:
2837         (WebKit::WebMouseEvent::didActivateWebView):
2838         Add m_didActivateWebView to WebMouseEvent on Windows.
2839
2840         * Shared/WebEventConversion.cpp:
2841         (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent):
2842         Propagate whether the click activated the WebView when converting to a PlatformMouseEvent.
2843
2844         * Shared/WebMouseEvent.cpp:
2845         (WebKit::WebMouseEvent::WebMouseEvent):
2846         Add m_didActivateWebView to WebMouseEvent on Windows.
2847
2848         (WebKit::WebMouseEvent::encode):
2849         (WebKit::WebMouseEvent::decode):
2850         Encode and decode new m_didActivateWebView member variable.
2851
2852         * Shared/win/WebEventFactory.cpp:
2853         (WebKit::WebEventFactory::createWebMouseEvent):
2854         * Shared/win/WebEventFactory.h:
2855         Add didActivateWebView parameter to createWebMouseEvent().
2856
2857         * UIProcess/win/WebView.cpp:
2858         (WebKit::WebView::wndProc):
2859         (WebKit::WebView::WebView):
2860         (WebKit::WebView::onMouseEvent):
2861         * UIProcess/win/WebView.h:
2862         (WebKit::WebView::setWasActivatedByMouseEvent):
2863         Keep track of whether the click activated the WebView.
2864
2865 2011-01-04  Ivan Krstić  <ike@apple.com>
2866
2867         Reviewed and landed by Anders Carlsson.
2868
2869         <rdar://problem/8602585>
2870         <rdar://problem/8711641>
2871
2872         * WebProcess/com.apple.WebProcess.sb:
2873         Fix a misplaced right parenthesis and add a new system path regex.
2874
2875 2011-01-04  Anders Carlsson  <andersca@apple.com>
2876
2877         Reviewed by Sam Weinig.
2878
2879         More work on spelling and grammar
2880         https://bugs.webkit.org/show_bug.cgi?id=51910
2881
2882         * Scripts/webkit2/messages.py:
2883         Add special case for WebCore::TextCheckingResult.
2884
2885         * Shared/NotImplemented.h:
2886         Fix macro so that defining DISABLE_NOT_IMPLEMENTED_WARNINGS to 0 will enable the warnings.
2887         
2888         * Shared/WebCoreArgumentCoders.h:
2889         Add argument coders for WebCore::GrammarDetail and WebCore::TextCheckingResult.
2890
2891         * UIProcess/API/mac/WKView.mm:
2892         (-[WKView checkSpelling:]):
2893         Call advanceToNextMisspelling.
2894
2895         * UIProcess/TextChecker.h:
2896         Add new NSSpellChecker wrappers.
2897
2898         * UIProcess/WebPageProxy.cpp:
2899         (WebKit::WebPageProxy::WebPageProxy):
2900         Initialize the new member variables.
2901
2902         (WebKit::WebPageProxy::~WebPageProxy):
2903         Call TextChecker::closeSpellDocumentWithTag.
2904
2905         (WebKit::WebPageProxy::advanceToNextMisspelling):
2906         Send the AdvanceToNextMisspelling message.
2907
2908         (WebKit::WebPageProxy::spellDocumentTag):
2909         Create a spell document tag if necessary.
2910
2911         (WebKit::WebPageProxy::checkTextOfParagraph):
2912         (WebKit::WebPageProxy::updateSpellingUIWithMisspelledWord):
2913         (WebKit::WebPageProxy::getGuessesForWord):
2914         Call the TextChecker.
2915         
2916         * UIProcess/WebPageProxy.messages.in:
2917         Add new messages.
2918
2919         * UIProcess/mac/TextCheckerMac.mm:
2920         (WebKit::TextChecker::uniqueSpellDocumentTag):
2921         (WebKit::TextChecker::closeSpellDocumentWithTag):
2922         (WebKit::TextChecker::checkTextOfParagraph):
2923         (WebKit::TextChecker::updateSpellingUIWithMisspelledWord):
2924         (WebKit::TextChecker::getGuessesForWord):
2925         Add NSSpellChecker wrappers.
2926
2927         * UIProcess/qt/TextCheckerQt.cpp:
2928         * UIProcess/win/TextCheckerWin.cpp:
2929         Add stubs.
2930
2931         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2932         (WebKit::WebEditorClient::isContinuousSpellCheckingEnabled):
2933         (WebKit::WebEditorClient::isGrammarCheckingEnabled):
2934         Get the text checking state from the web process.
2935
2936         (WebKit::WebEditorClient::updateSpellingUIWithMisspelledWord):
2937         (WebKit::WebEditorClient::getGuessesForWord):
2938         Proxy calls to the UI process.
2939
2940         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2941         (WebKit::WebEditorClient::isAutomaticSpellingCorrectionEnabled):
2942         
2943         (WebKit::WebEditorClient::checkTextOfParagraph):
2944         Proxy calls to the UI process.
2945
2946         * WebProcess/WebPage/WebPage.cpp:
2947         (WebKit::WebPage::advanceToNextMisspelling):
2948         Call the frame.
2949
2950         * WebProcess/WebPage/WebPage.messages.in:
2951         Add AdvanceToNextMisspelling message.
2952
2953         * WebProcess/WebProcess.cpp:
2954         (WebKit::WebProcess::initializeWebProcess):
2955         Set the text checker state.
2956
2957 2011-01-04  Chris Fleizach  <cfleizach@apple.com>
2958
2959         Unreviewed. Build fix.
2960
2961         WK2: Support Accessibility
2962         https://bugs.webkit.org/show_bug.cgi?id=51859
2963
2964         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2965
2966 2011-01-04  Chris Fleizach  <cfleizach@apple.com>
2967
2968         Unreviewed. Build fix.
2969
2970         WK2: Support Accessibility
2971         https://bugs.webkit.org/show_bug.cgi?id=51859
2972
2973         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
2974         (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
2975
2976 2011-01-04  Chris Fleizach  <cfleizach@apple.com>
2977
2978         Reviewed by Sam Weinig.
2979
2980         WK2: Support Accessibility
2981         https://bugs.webkit.org/show_bug.cgi?id=51859
2982
2983         Implement remote accessibility API to support cross process accessibility
2984         on the Mac platform.
2985
2986         * Shared/WebProcessCreationParameters.cpp:
2987         (WebKit::WebProcessCreationParameters::encode):
2988         (WebKit::WebProcessCreationParameters::decode):
2989         * Shared/WebProcessCreationParameters.h:
2990         * UIProcess/API/mac/PageClientImpl.h:
2991         * UIProcess/API/mac/PageClientImpl.mm:
2992         (WebKit::PageClientImpl::accessibilityChildTokenReceived):
2993         * UIProcess/API/mac/WKView.mm:
2994         (-[WKView initWithFrame:contextRef:pageGroupRef:]):
2995         (-[WKView _updateWindowAndViewFrames]):
2996         (-[WKView _setAccessibilityChildToken:]):
2997         (-[WKView accessibilityIsIgnored]):
2998         (-[WKView accessibilityHitTest:]):
2999         (-[WKView accessibilityAttributeValue:]):
3000         * UIProcess/API/mac/WKViewInternal.h:
3001         * UIProcess/PageClient.h:
3002         * UIProcess/WebContext.cpp:
3003         (WebKit::WebContext::ensureWebProcess):
3004         * UIProcess/WebPageProxy.cpp:
3005         (WebKit::WebPageProxy::windowAndViewFramesChanged):
3006         (WebKit::WebPageProxy::didReceiveAccessibilityPageToken):
3007         (WebKit::WebPageProxy::sendAccessibilityPresenterToken):
3008         * UIProcess/WebPageProxy.h:
3009         * UIProcess/WebPageProxy.messages.in:
3010         * WebKit2.xcodeproj/project.pbxproj:
3011         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3012         (WebKit::WebFrameLoaderClient::accessibilityRemoteObject):
3013         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3014         * WebProcess/WebPage/WebPage.cpp:
3015         (WebKit::WebPage::windowAndViewFramesChanged):
3016         * WebProcess/WebPage/WebPage.h:
3017         (WebKit::WebPage::accessibilityPosition):
3018         * WebProcess/WebPage/WebPage.messages.in:
3019         * WebProcess/WebPage/mac/AccessibilityWebPageObject.h: Added.
3020         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: Added.
3021         (-[AccessibilityWebPageObject setWebPage:]):
3022         (-[AccessibilityWebPageObject setRemoteParent:]):
3023         (-[AccessibilityWebPageObject dealloc]):
3024         (-[AccessibilityWebPageObject accessibilityIsIgnored]):
3025         (-[AccessibilityWebPageObject accessibilityAttributeNames]):
3026         (-[AccessibilityWebPageObject accessibilityIsAttributeSettable:]):
3027         (-[AccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
3028         (-[AccessibilityWebPageObject accessibilityActionNames]):
3029         (-[AccessibilityWebPageObject accessibilityChildren]):
3030         (-[AccessibilityWebPageObject accessibilityAttributeValue:]):
3031         (-[AccessibilityWebPageObject accessibilityShouldUseUniqueId]):
3032         (-[AccessibilityWebPageObject accessibilityHitTest:]):
3033         (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
3034         * WebProcess/WebPage/mac/WebPageMac.mm:
3035         (WebKit::WebPage::platformInitialize):
3036         (WebKit::WebPage::sendAccessibilityPresenterToken):
3037         (WebKit::WebPage::accessibilityRemoteObject):
3038         * WebProcess/WebProcess.cpp:
3039         (WebKit::WebProcess::initializeWebProcess):
3040         * WebProcess/WebProcess.h:
3041         (WebKit::WebProcess::presenterApplicationPid):
3042         * WebProcess/mac/WebProcessMainMac.mm:
3043         (WebKit::WebProcessMain):
3044
3045 2011-01-04  Brady Eidson  <beidson@apple.com>
3046
3047         Reviewed by Darin Adler.
3048
3049         Get rid of an extra copy in the back/forward item IPC message by using a DataReference.
3050
3051         * UIProcess/WebBackForwardListItem.cpp:
3052         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3053         (WebKit::WebBackForwardListItem::setBackForwardData):
3054         * UIProcess/WebBackForwardListItem.h:
3055
3056         * UIProcess/WebPageProxy.cpp:
3057         (WebKit::WebPageProxy::dataCallback): Get rid of no-longer-needed check for size 0.
3058
3059         * UIProcess/WebProcessProxy.cpp:
3060         (WebKit::WebProcessProxy::addBackForwardItem):
3061         * UIProcess/WebProcessProxy.h:
3062
3063         * UIProcess/WebProcessProxy.messages.in:
3064
3065         * WebProcess/WebPage/EncoderAdapter.cpp:
3066         (WebKit::EncoderAdapter::data):
3067         * WebProcess/WebPage/EncoderAdapter.h:
3068
3069         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3070
3071 2011-01-04  Brady Eidson  <beidson@apple.com>
3072
3073         Reviewed by Darin Adler.
3074
3075         Store more data per history entry in the session state blob.
3076
3077         * UIProcess/WebBackForwardListItem.cpp:
3078         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3079         * UIProcess/WebBackForwardListItem.h:
3080         (WebKit::WebBackForwardListItem::create):
3081
3082         * UIProcess/WebProcessProxy.cpp:
3083         (WebKit::WebProcessProxy::addBackForwardItem):
3084
3085         * UIProcess/cf/WebBackForwardListCF.cpp:
3086         (WebKit::WebBackForwardList::createCFDictionaryRepresentation):
3087
3088         * UIProcess/cf/WebPageProxyCF.cpp:
3089
3090 2011-01-04  Darin Adler  <darin@apple.com>
3091
3092         Reviewed by Brady Eidson.
3093
3094         Add back/forward encoding and decoding to WebKit2
3095         https://bugs.webkit.org/show_bug.cgi?id=51901
3096
3097         * GNUmakefile.am: Added new source files.
3098         * WebKit2.pro: Ditto.
3099         * WebKit2.xcodeproj/project.pbxproj: Ditto.
3100         * win/WebKit2.vcproj: Ditto.
3101
3102         * WebProcess/WebPage/DecoderAdapter.cpp: Added.
3103         * WebProcess/WebPage/DecoderAdapter.h: Added.
3104         * WebProcess/WebPage/EncoderAdapter.cpp: Added.
3105         * WebProcess/WebPage/EncoderAdapter.h: Added.
3106
3107         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3108         (WebKit::updateBackForwardItem): Added code to encode the back/forward
3109         tree and send it along. The code to decode needs to wait on Brady's
3110         current project.
3111
3112 2011-01-04  Anders Carlsson  <andersca@apple.com>
3113
3114         Reviewed by Sam Weinig.
3115
3116         <rdar://problem/8766999> WebKit2: Sandboxing causes certificate error on access to any HTTPS URL
3117
3118         Allow read access to /Library/Preferences/com.apple.security.plist.
3119
3120         * WebProcess/com.apple.WebProcess.sb:
3121
3122 2011-01-04  Anders Carlsson  <andersca@apple.com>
3123
3124         Build fixes.
3125
3126         * UIProcess/qt/TextCheckerQt.cpp:
3127         * UIProcess/win/TextCheckerWin.cpp:
3128
3129 2011-01-04  Anders Carlsson  <andersca@apple.com>
3130
3131         Reviewed by Darin Adler.
3132
3133         Don't use macros for the key names.
3134
3135         * UIProcess/mac/TextCheckerMac.mm:
3136
3137 2011-01-04  Anders Carlsson  <andersca@apple.com>
3138
3139         Reviewed by Sam Weinig.
3140
3141         Send over text checker state to the web process
3142         https://bugs.webkit.org/show_bug.cgi?id=51896
3143
3144         * Platform/CoreIPC/Arguments.h:
3145         Remove 'const' from the argument, this matches all the other Arguments classes.
3146
3147         * Shared/TextCheckerState.h: Added.
3148         New class with text checker state.
3149
3150         * Shared/WebProcessCreationParameters.cpp:
3151         (WebKit::WebProcessCreationParameters::encode):
3152         (WebKit::WebProcessCreationParameters::decode):
3153         * Shared/WebProcessCreationParameters.h:
3154         Add textCheckerState.
3155
3156         * UIProcess/API/mac/WKView.mm:
3157         (-[WKView validateUserInterfaceItem:]):        
3158         (-[WKView toggleContinuousSpellChecking:]):
3159         (-[WKView toggleGrammarChecking:]):
3160         (-[WKView toggleAutomaticSpellingCorrection:]):
3161         Get the needed flags from the text checker state.
3162
3163         * UIProcess/TextChecker.h:
3164         Add state() function, remove getters.
3165
3166         * UIProcess/WebContext.cpp:
3167         (WebKit::WebContext::ensureWebProcess):
3168         Initialize the text checker state.
3169
3170         * UIProcess/WebProcessProxy.cpp:
3171         (WebKit::WebProcessProxy::updateTextCheckerState):
3172         Send the SetTextCheckerState message to the web process.
3173
3174         * UIProcess/mac/TextCheckerMac.mm:
3175         (WebKit::initializeState):
3176         Initialize the state from the user defaults.
3177
3178         (WebKit::TextChecker::state):
3179         Return the state.
3180
3181         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
3182         (WebKit::TextChecker::setGrammarCheckingEnabled):
3183         (WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
3184         Make sure to write the new state.
3185         
3186         * UIProcess/qt/TextCheckerQt.cpp:
3187         (WebKit::TextChecker::state):
3188         * UIProcess/win/TextCheckerWin.cpp:
3189         (WebKit::TextChecker::state):
3190         Add stubs.
3191
3192         * WebKit2.xcodeproj/project.pbxproj:
3193         Add TextCheckerState.h.
3194
3195         * WebProcess/WebProcess.cpp:
3196         (WebKit::WebProcess::WebProcess):
3197         Initialize m_textCheckerState.
3198
3199         (WebKit::WebProcess::setTextCheckerState):
3200         Update.
3201
3202         * WebProcess/WebProcess.messages.in:
3203         Add SetTextCheckerState message.
3204
3205         * win/WebKit2.vcproj:
3206         Add TextCheckerState.h.
3207
3208 2011-01-04  Brady Eidson  <beidson@apple.com>
3209
3210         Rubberstamped by Anders Carlsson.
3211
3212         Attach a radar # to this FIXME:
3213         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3214
3215 2011-01-04  Anders Carlsson  <andersca@apple.com>
3216
3217         Reviewed by John Sullivan.
3218
3219         Add more spelling/grammar related methods
3220         https://bugs.webkit.org/show_bug.cgi?id=51886
3221
3222         * UIProcess/API/mac/WKView.mm:
3223         (-[WKView validateUserInterfaceItem:]):
3224         Handle more selectors.
3225
3226         (-[WKView showGuessPanel:]):
3227         Add stub.
3228
3229         (-[WKView checkSpelling:]):
3230         Ditto.
3231
3232         (-[WKView toggleAutomaticSpellingCorrection:]):
3233         Toggle automatic spelling correction.
3234
3235         * UIProcess/TextChecker.h:
3236         Add setAutomaticSpellingCorrectionEnabled and isAutomaticSpellingCorrectionEnabled.
3237
3238         * UIProcess/mac/TextCheckerMac.mm:
3239         (WebKit::TextChecker::setAutomaticSpellingCorrectionEnabled):
3240         (WebKit::TextChecker::isAutomaticSpellingCorrectionEnabled):
3241         Update the toggle.
3242
3243         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3244         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
3245         Add a Radar URL for the localization FIXMEs.
3246
3247 2011-01-04  Brent Fulgham  <bfulgham@webkit.org>
3248
3249         Unreviewed build fix.
3250
3251         * win/WebKit2.vcproj: Correct the missing $(WebKitVSPropsRedirectionDir)
3252         variables that Visual Studio helpfully removes when making changes.
3253
3254 2011-01-04  Brent Fulgham  <bfulgham@webkit.org>
3255
3256         Unreviewed build fix.
3257
3258         * win/WebKit2.vcproj: Disable CG-specific WKImageCG.cpp from
3259         Debug_Cairo_CFLite/Release_Cario_CFLite builds.
3260
3261 2011-01-04  Brady Eidson  <beidson@apple.com>
3262
3263         Reviewed by Darin Adler.
3264
3265         https://bugs.webkit.org/show_bug.cgi?id=51856
3266         Pass encoded back/forward tree data from the WebProcess to the UIProcess
3267
3268         Remove the WKBackForwardListItemCopyOriginalURL API as it's not needed:
3269         * UIProcess/API/C/WKBackForwardListItem.cpp:
3270         * UIProcess/API/C/WKBackForwardListItem.h:
3271         * UIProcess/API/qt/qwkhistory.cpp:
3272         * UIProcess/API/qt/qwkhistory.h:
3273         
3274         * UIProcess/WebBackForwardListItem.cpp:
3275         (WebKit::WebBackForwardListItem::WebBackForwardListItem):
3276         * UIProcess/WebBackForwardListItem.h:
3277         (WebKit::WebBackForwardListItem::create):
3278         (WebKit::WebBackForwardListItem::setBackForwardData):
3279         (WebKit::WebBackForwardListItem::backForwardData):
3280         
3281         * UIProcess/WebProcessProxy.cpp:
3282         (WebKit::WebProcessProxy::addBackForwardItem):
3283         * UIProcess/WebProcessProxy.h:
3284         
3285         * UIProcess/WebProcessProxy.messages.in:
3286         
3287         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
3288         (WebKit::updateBackForwardItem):
3289
3290 2011-01-04  Balazs Kelemen  <kbalazs@webkit.org>
3291
3292         Reviewed by Kenneth Rohde Christiansen.
3293
3294         [Qt][WK2] Incomplete clean up on termination
3295         https://bugs.webkit.org/show_bug.cgi?id=51474
3296
3297         Do not kill the web process to force it's termination.
3298         Fix object destruction and cleanup logic and make the cleanup more reliable.
3299         Do not try to cleanup on crash because it is not reliable.
3300
3301         * Platform/CoreIPC/qt/ConnectionQt.cpp:
3302         (CoreIPC::Connection::platformInvalidate): Do not delete the socket if we
3303         do not own it. This is the case with a server connection.
3304         * Platform/qt/MappedMemoryPool.cpp:
3305         Turn MappedMemoryPool into a QObject so the CleanupHandler can destruct it
3306         in the same way as the other objects.
3307         (WebKit::MappedMemoryPool::instance):
3308         (WebKit::MappedMemoryPool::~MappedMemoryPool):
3309         * Platform/qt/MappedMemoryPool.h:
3310         (WebKit::MappedMemoryPool::MappedMemoryPool):
3311         * Platform/qt/SharedMemoryQt.cpp:
3312         (WebKit::SharedMemory::create): No need to care about QCoreApplication::aboutToQuit.
3313         It is handled by the CleanupHandler.
3314         (WebKit::SharedMemory::~SharedMemory): Ditto.
3315         * Shared/qt/CleanupHandler.cpp: Renamed from WebKit2/Shared/qt/CrashHandler.cpp.
3316         No longer try to handle crash but just normal termination.
3317         (WebKit::CleanupHandler::CleanupHandler): Connect deleteObjects with QCoreApplication::aboutToQuit.
3318         Ensure appropriate thread affinity.
3319         (WebKit::CleanupHandler::sigTermHandler): Stop the main event loop.
3320         (WebKit::CleanupHandler::deleteObjects): Use deleteLater instead of delete since it is more reliable.
3321         * Shared/qt/CleanupHandler.h: Renamed from WebKit2/Shared/qt/CrashHandler.h.
3322         (WebKit::CleanupHandler::instance):
3323         (WebKit::CleanupHandler::markForCleanup):
3324         (WebKit::CleanupHandler::unmark):
3325         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3326         Do not kill the web process immidiately but give it a chance to cleanup.
3327         Use QLocalServer::removeServer for assuring that the socket file will be removed.
3328         (WebKit::ProcessLauncherHelper::serverName):
3329         (WebKit::cleanupAtExit): Renamed from cleanupProcesses. Only kill the web process when it times
3330         out terminating. Fixed the bug of changing the list while iterating it over by disconnecting
3331         from the processStateChanged slot.
3332         (WebKit::QtWebProcess::QtWebProcess): Added missing meta type registration of QProcess::ProcessState.
3333         (WebKit::ProcessLauncherHelper::~ProcessLauncherHelper):
3334         (WebKit::ProcessLauncherHelper::ProcessLauncherHelper): No need to add the the instance to the
3335         CleanupHandler because we will remove the socket file in cleanupAtExit.
3336         (WebKit::ProcessLauncherHelper::instance):
3337         (WebKit::ProcessLauncher::terminateProcess):
3338         * WebKit2.pro:
3339
3340 2011-01-04  Benjamin Poulain  <benjamin.poulain@nokia.com>
3341
3342         Reviewed by Kenneth Rohde Christiansen.
3343
3344         [Qt] [WK2] create an initial implementation of the context menu handling for WebKit 2
3345         https://bugs.webkit.org/show_bug.cgi?id=51825
3346
3347         Implement the necessary methods to get a basic context menu working for Qt.
3348
3349         Only 4 basic WebAction have been added on the UIProcess side: back, forward, stop and reload.
3350
3351         * UIProcess/API/qt/qgraphicswkview.cpp:
3352         (QGraphicsWKView::QGraphicsWKView):
3353         (QGraphicsWKView::showContextMenu):
3354         (QGraphicsWKViewPrivate::QGraphicsWKViewPrivate):
3355         * UIProcess/API/qt/qgraphicswkview.h:
3356         * UIProcess/API/qt/qwkpage.cpp:
3357         (QWKPagePrivate::createContextMenuProxy):
3358         * UIProcess/API/qt/qwkpage.h:
3359         * UIProcess/qt/WebContextMenuProxyQt.cpp:
3360         (WebKit::webActionForContextMenuAction):
3361         (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt):
3362         (WebKit::WebContextMenuProxyQt::create):
3363         (WebKit::WebContextMenuProxyQt::showContextMenu):
3364         (WebKit::WebContextMenuProxyQt::hideContextMenu):
3365         (WebKit::WebContextMenuProxyQt::createContextMenu):
3366         * UIProcess/qt/WebContextMenuProxyQt.h:
3367
3368 2011-01-03  Yi Shen  <yi.4.shen@nokia.com>
3369
3370         Reviewed by Adam Barth.
3371
3372         [Qt] Add SelectAll option to the context menu for the editor
3373         https://bugs.webkit.org/show_bug.cgi?id=50049
3374
3375         Add WebPlatformStrategies::contextMenuItemTagSelectAll for Qt.
3376
3377         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3378         (WebKit::WebPlatformStrategies::contextMenuItemTagSelectAll):
3379         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3380
3381 2011-01-03  Sam Weinig  <sam@webkit.org>
3382
3383         Reviewed by Anders Carlsson.
3384
3385         Ensure that the correct initial focusable area is focused when tabbing
3386         and shift-tabbing into the WKView.
3387
3388         * UIProcess/API/mac/WKView.mm:
3389         (-[WKView becomeFirstResponder]): Use the keyViewSelectionDirection to set
3390         the initial focus.
3391
3392 2011-01-02  Dan Bernstein  <mitz@apple.com>
3393
3394         Rubber-stamped by Simon Fraser.
3395
3396         <rdar://problem/8812159> Update copyright strings
3397
3398         * Info.plist:
3399         * WebProcess/Info.plist:
3400
3401 2011-01-02  Benjamin Poulain  <benjamin.poulain@nokia.com>
3402
3403         Reviewed by Csaba Osztrogonác.
3404
3405         WebKit 2 does not build on 64bits with a recent GCC
3406         https://bugs.webkit.org/show_bug.cgi?id=51754
3407
3408         Change the argument coding for DatabaseDetails to use explicitly the 64 bits type.
3409
3410         * Shared/OriginAndDatabases.h:
3411         * Shared/WebCoreArgumentCoders.h:
3412
3413 2011-01-02  Csaba Osztrogonác  <ossy@webkit.org>
3414
3415         Reviewed by Adam Barth.
3416
3417         Move JavaScriptCore to Source
3418         https://bugs.webkit.org/show_bug.cgi?id=51604
3419
3420         Workaround until moving all sources to Source directory is finished.
3421
3422         * Scripts/generate-forwarding-headers.pl: Add Sources to searching path for JavaScriptCore.
3423
3424 2011-01-01  Adam Barth  <abarth@webkit.org>
3425
3426         Speculative build fix for Qt.  Add some more include paths.
3427
3428         * WebKit2.pro:
3429
3430 2011-01-01  Adam Barth  <abarth@webkit.org>
3431
3432         Reviewed by Eric Seidel.
3433
3434         Move JavaScriptCore to Source
3435         https://bugs.webkit.org/show_bug.cgi?id=51604
3436
3437         * WebKit2.pro:
3438           - Point to JavaScriptCore in its new location.
3439
3440 2010-12-15  Amruth Raj  <amruthraj@motorola.com> and Ravi Kasibhatla  <ravi.kasibhatla@motorola.com>
3441
3442         Reviewed by Martin Robinson.
3443
3444         [GTK] Enable building whatever already exists of WebKit2
3445         https://bugs.webkit.org/show_bug.cgi?id=37369
3446
3447         * GNUmakefile.am: Added. 
3448         * WebKit2Prefix.h: Included WebCore/config.h for GTK port as the first header
3449         file for WebKit2 sources files.
3450         * gtk: Added.
3451         * gtk/webkit2.pc.in: Added.
3452
3453 2010-12-29  Juha Savolainen  <juha.savolainen@weego.fi>
3454
3455         Reviewed by Kenneth Rohde Christiansen.
3456
3457         [Qt] [WK2] Added more webattributes to the qwkpreferences
3458         https://bugs.webkit.org/show_bug.cgi?id=51697
3459
3460         Added PrivateBrowsingEnabled, DeveloperExtrasEnabled, DnsPrefetchEnabled attributes
3461
3462         * UIProcess/API/qt/qwkpreferences.cpp:
3463         (QWKPreferences::testAttribute): 
3464         (QWKPreferences::setAttribute): 
3465         * UIProcess/API/qt/qwkpreferences.h:
3466
3467 2010-12-27  Sam Weinig  <sam@webkit.org>
3468
3469         Reviewed by Anders Carlsson.
3470
3471         WebKit2 snapshots should contain accelerated content
3472         <rdar://problem/8807393>
3473         https://bugs.webkit.org/show_bug.cgi?id=51660
3474
3475         When creating a snapshot, flatten the layer tree for painting so that
3476         accelerated content is included in the snapshot.
3477
3478         * WebProcess/WebPage/WebPage.cpp:
3479         (WebKit::WebPage::snapshotInViewCoordinates):
3480         (WebKit::WebPage::snapshotInDocumentCoordinates):
3481
3482 2010-12-27  Daniel Bates  <dbates@rim.com>
3483
3484         Attempt to fix the WebKit2 Windows build after changeset 74698
3485         <http://trac.webkit.org/changeset/74698> (bug #51656).
3486
3487         Add "..\Shared\API\c\WKImage.h" to WebKit2Generated.make.
3488
3489         * win/WebKit2Generated.make:
3490
3491 2010-12-27  Sam Weinig  <sam@webkit.org>
3492
3493         Reviewed by Anders Carlsson.
3494
3495         WebKit2: Add API for getting snapshots
3496         https://bugs.webkit.org/show_bug.cgi?id=51656
3497
3498         * Shared/API/c/WKBase.h:
3499         * Shared/API/c/WKImage.cpp: Added.
3500         (WKImageGetTypeID):
3501         (WKImageCreate):
3502         (WKImageGetSize):
3503         * Shared/API/c/WKImage.h: Added.
3504         * Shared/WebImage.cpp: Added.
3505         (WebKit::WebImage::create):
3506         (WebKit::WebImage::size):
3507         * Shared/WebImage.h: Added.
3508         (WebKit::WebImage::backingStore):
3509         (WebKit::WebImage::WebImage):
3510         (WebKit::WebImage::type):
3511         Add a general purpose API image class.
3512
3513         * Shared/API/c/cg: Added.
3514         * Shared/API/c/cg/WKImageCG.cpp: Added.
3515         (WKImageCreateCGImage):
3516         * Shared/API/c/cg/WKImageCG.h: Added.
3517         Add function to convert a WKImageRef to a CGImageRef for platforms that use CG.
3518
3519         * Shared/API/c/WKSharedAPICast.h:
3520         (WebKit::toFloatRect):
3521         (WebKit::toIntSize):
3522         (WebKit::toIntPoint):
3523         (WebKit::toIntRect):
3524         (WebKit::toImageOptions):
3525         Make conversion functions that are ambiguous more explicit.
3526
3527         * Shared/APIObject.h:
3528         * Shared/BackingStore.h:
3529         (WebKit::BackingStore::isBackedBySharedMemory):
3530         * Shared/ImageOptions.h: Added.
3531         * Shared/UserMessageCoders.h:
3532         (WebKit::UserMessageEncoder::baseEncode):
3533         (WebKit::UserMessageDecoder::baseDecode):
3534         Allow a WKImageRef to be passed in user messages.  Right now, it only
3535         works if the image is sharable.
3536
3537         * UIProcess/API/C/WKPage.cpp:
3538         (WKPageScaleWebView):
3539         * UIProcess/WebUIClient.cpp:
3540         (WebKit::WebUIClient::windowFrame):
3541         Use the more explicit conversion function name.
3542
3543         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3544         (WKBundlePageCreateSnapshotInViewCoordinates):
3545         (WKBundlePageCreateSnapshotInDocumentCoordinates):
3546         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
3547         * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
3548         (WKBundlePageOverlaySetNeedsDisplay):
3549         * WebProcess/WebPage/WebPage.cpp:
3550         (WebKit::WebPage::snapshotInViewCoordinates):
3551         (WebKit::WebPage::snapshotInDocumentCoordinates):
3552         Add function to take the snapshot.
3553
3554         * WebProcess/WebPage/WebPage.h:
3555         * WebKit2.pro:
3556         * WebKit2.xcodeproj/project.pbxproj:
3557         * win/WebKit2.vcproj:
3558         Add new files.
3559
3560 2010-12-27  Sam Weinig  <sam@webkit.org>
3561
3562         Reviewed by Anders Carlsson.
3563
3564         WebKit2: Add additional API for managing databases
3565         https://bugs.webkit.org/show_bug.cgi?id=51629
3566
3567         - Adds client for the database manager to get notifications
3568           of changes to databases.
3569
3570         * UIProcess/API/C/WKDatabaseManager.cpp: