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