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