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