Make adjustMIMETypeIfNecessary use CFNetwork directly
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-03-13  Pratik Solanki  <psolanki@apple.com>
2
3         Reviewed by Brady Eidson.
4
5         Make adjustMIMETypeIfNecessary use CFNetwork directly
6         https://bugs.webkit.org/show_bug.cgi?id=55912
7
8         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
9         (InitWebCoreSystemInterface): Support for new WKSI functions.
10
11 2011-03-13  Dan Bernstein  <mitz@apple.com>
12
13         Reviewed by Darin Adler.
14
15         WebPageProxy cleanup
16         https://bugs.webkit.org/show_bug.cgi?id=56267
17
18         * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from
19         here to WebPageProxyMac.mm.
20         * UIProcess/WebPageProxy.h: Cleaned up #includes.
21         * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations
22         here.
23         (WebKit::WebPageProxy::updateWindowIsVisible):
24         (WebKit::WebPageProxy::windowAndViewFramesChanged):
25         (WebKit::WebPageProxy::getMarkedRange):
26         (WebKit::WebPageProxy::characterIndexForPoint):
27         (WebKit::WebPageProxy::firstRectForCharacterRange):
28         (WebKit::WebPageProxy::writeSelectionToPasteboard):
29         (WebKit::WebPageProxy::setDragImage):
30         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
31         (WebKit::WebPageProxy::interpretKeyEvent):
32         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
33         (WebKit::WebPageProxy::uppercaseWord):
34         (WebKit::WebPageProxy::lowercaseWord):
35         (WebKit::WebPageProxy::capitalizeWord):
36         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
37         (WebKit::WebPageProxy::didPerformDictionaryLookup):
38         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
39         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
40         (WebKit::WebPageProxy::setComplexTextInputEnabled):
41
42 2011-03-13  Dan Bernstein  <mitz@apple.com>
43
44         Reviewed by Darin Adler.
45
46         <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down
47         https://bugs.webkit.org/show_bug.cgi?id=56265
48
49         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
50         (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than
51         document coordinates.
52
53 2011-03-13  Dan Bernstein  <mitz@apple.com>
54
55         Reviewed by Mark Rowe.
56
57         Fix a crash when dragging.
58
59         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
60         (WebKit::convertImageToBitmap): Retain the saved context.
61
62 2011-03-12  Darin Adler  <darin@apple.com>
63
64         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
65         (WebKit::WebDragClient::startDrag): Fixed typo in a comment.
66
67 2011-03-11  Darin Adler  <darin@apple.com>
68
69         Reviewed by Sam Weinig.
70
71         Dragging image to desktop gives webloc instead of image file in WebKit2
72         https://bugs.webkit.org/show_bug.cgi?id=56193
73
74         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
75         (WebKit::convertImageToBitmap): Added. Factored out from startDrag to
76         make the startDrag code clearer.
77         (WebKit::WebDragClient::startDrag): Streamlined code a bit.
78         (WebKit::cachedImage): Added. Helper for function below.
79         (WebKit::arrayForURLsWithTitles): Added. Helper for function below.
80         (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file
81         promises and removed a log of uneeded code.
82         (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added.
83         (promisedDataClient): Added.
84         (-[WKPasteboardOwner clearImage]): Added.
85         (-[WKPasteboardOwner initWithImage:]): Added.
86         (-[WKPasteboardOwner dealloc]): Added.
87         (-[WKPasteboardOwner finalize]): Added.
88         (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added.
89         (-[WKPasteboardOwner pasteboardChangedOwner:]): Added.
90         (matchesExtensionOrEquivalent): Added.
91         (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added.
92         Much of the new code above came from the WebKit1 drag code.
93
94         * WebProcess/WebPage/WebPage.cpp:
95         (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded.
96         * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource.
97         * WebProcess/WebPage/mac/WebPageMac.mm:
98         (WebKit::WebPage::setDragSource): Added.
99         (WebKit::WebPage::platformDragEnded): Added.
100
101 2011-03-12  Mark Rowe  <mrowe@apple.com>
102
103         Fix the 32-bit build.
104
105         This involves hacking around some HIToolbox headers that do things of dubious correctness,
106         and fixing the usual CGRect vs NSRect issues.
107         
108         * UIProcess/mac/WKFullScreenWindowController.mm:
109         (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect.
110         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
111         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
112
113 2011-03-12  Anders Carlsson  <andersca@apple.com>
114
115         Reviewed by Sam Weinig.
116
117         * WebProcess/WebPage/WebFrame.cpp:
118         (WebKit::WebFrame::url):
119         Get the URL from the loader, not from the document.
120
121         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
122         Return the correct suggested filename for the main resource.
123
124         (WebKit::WebFrame::mimeTypeForResourceWithURL):
125         Return the correct mime type for the main resource.
126
127 2011-03-12  Anders Carlsson  <andersca@apple.com>
128
129         Reviewed by Sam Weinig.
130
131         Should be able to download a PDF to the Downloads folder
132         https://bugs.webkit.org/show_bug.cgi?id=56256
133
134         * UIProcess/API/C/WKPage.h:
135         Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client.
136
137         * UIProcess/API/mac/PDFViewController.h:
138         * UIProcess/API/mac/PDFViewController.mm:
139         (-[WKPDFView _applyPDFPreferences]):
140         (-[WKPDFView _updatePreferences:]):
141         Use new PDFViewController::page getter.
142
143         (-[WKPDFView PDFViewSavePDFToDownloadFolder:]):
144         Call PDFViewController::savePDFToDownloadsFolder.
145
146         (WebKit::releaseCFData):
147         (WebKit::PDFViewController::savePDFToDownloadsFolder):
148         Create a WebData that wraps the CFData, then pass it along to
149         WebPageProxy::saveDataToFileInDownloadsFolder.
150
151         * UIProcess/WebPageProxy.cpp:
152         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
153         Call WebUIClient::saveDataToFileInDownloadsFolder.
154
155         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
156         * UIProcess/WebUIClient.h:
157         Call the UI client callback function.
158
159 2011-03-12  Anders Carlsson  <andersca@apple.com>
160
161         Reviewed by Sam Weinig.
162
163         WebData should be able to wrap already existing data
164         https://bugs.webkit.org/show_bug.cgi?id=56254
165
166         * Shared/WebData.h:
167         (WebKit::WebData::createWithoutCopying):
168         (WebKit::WebData::create):
169         (WebKit::WebData::~WebData):
170         (WebKit::WebData::bytes):
171         (WebKit::WebData::size):
172         (WebKit::WebData::WebData):
173         (WebKit::WebData::fastFreeBytes):
174
175 2011-03-12  Jer Noble  <jer.noble@apple.com>
176
177         Reviewed by Eric Carlson.
178
179         WebKit2: Initialize the WebFullScreenManagerProxy with a WKView
180         https://bugs.webkit.org/show_bug.cgi?id=56250
181
182         * UIProcess/API/mac/WKView.mm:
183         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self).
184
185 2011-03-11  Jer Noble  <jer.noble@apple.com>
186
187         Reviewed by Anders Carlsson.
188
189         Add full screen animation code to WebFullScreenManager.
190         https://bugs.webkit.org/show_bug.cgi?id=56220
191
192         * WebProcess/FullScreen/WebFullScreenManager.cpp: .
193         (WebKit::WebFullScreenManager::~WebFullScreenManager): Added.
194         (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs.
195         (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color.
196         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto.
197         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
198         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
199         * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a 
200             concrete subclass.
201         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added.
202         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added.
203         (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations.
204         (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added.
205         (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added.
206         (-[WebFullScreenManagerAnimationListener invalidate]): Added.
207         (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac.
208         (WebKit::WebFullScreenManagerMac::create): Added.
209         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added.
210         (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added.
211         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host.
212         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D
213             which will animate the full screen renderer from its initial position to its final one.
214         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
215
216 2011-03-11  Jer Noble  <jer.noble@apple.com>
217
218         Reviewed by Anders Carlsson.
219
220         Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy
221         https://bugs.webkit.org/show_bug.cgi?id=56218
222
223         * UIProcess/WebFullScreenManagerProxy.cpp:
224         * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added.
225         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController.
226         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
227         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto.
228         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto.
229         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto.
230         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto.
231         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto.
232         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto.
233         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto.
234         * UIProcess/API/mac/WKView.mm:
235         (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController.
236         * UIProcess/API/mac/WKViewInternal.h:
237
238 2011-03-11  Jer Noble  <jer.noble@apple.com>
239
240         Reviewed by Anders Carlsson.
241
242         Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController.
243
244         [WebKit2] Implement a full screen window controller
245         https://bugs.webkit.org/show_bug.cgi?id=56210
246
247         * UIProcess/mac/WKFullScreenWindowController.h: Added.
248         * UIProcess/mac/WKFullScreenWindowController.mm: Added.
249         (-[WKFullScreenWindowController init]): Remove the _mediaEventListener.
250         (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests.
251         (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection.
252         (-[WKFullScreenWindowController webView]): Type change.
253         (-[WKFullScreenWindowController setWebView:]): Type change.
254         (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes.
255         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes.
256         (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code
257             which will reappear in WebFullScreenManager.
258         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added.
259         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added.
260         (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen.
261         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added.
262         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added.
263         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the
264             layer tree host.
265         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same.
266         (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added.
267         (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes.
268         (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto.
269         (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto.
270         (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto.
271         (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto.
272         (-[WKFullScreenWindowController _enableTickleTimer]): Ditto.
273         (-[WKFullScreenWindowController _disableTickleTimer]): Ditto.
274         (-[WKFullScreenWindowController _tickleTimerFired]): Ditto.
275         (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar.
276         (-[WKFullScreenWindowController _manager]): Added.
277         (-[WKFullScreenWindowController _requestExit]): Case changes.
278         (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto.
279         (-[WKFullScreenWindowController _swapView:with:]): Added.
280         (-[WKFullScreenWindowController _fullScreenWindow]): Case changes.
281         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no
282             longer needs to be flipped.
283         (-[WKFullScreenWindow cancelOperation:]): Case changes.
284
285 2011-03-11  Jer Noble  <jer.noble@apple.com>
286
287         Reviewed by Anders Carlsson.
288
289         Create new interface stubs to support full screen mode in WebKit2.
290
291         WebKit2: Plumb new full screen animation APIs through WebKit2.
292         https://bugs.webkit.org/show_bug.cgi?id=55993
293
294         * UIProcess/WebFullScreenManagerProxy.cpp:
295         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added.
296         (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView.
297         (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView.
298         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added.
299         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added.
300         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
301         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
302         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
303         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
304         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
305         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
306         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
307         * UIProcess/WebFullScreenManagerProxy.h:
308         * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions.
309         * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file.
310         * UIProcess/WebPageProxy.h: Ditto.
311         * WebProcess/FullScreen/WebFullScreenManager.cpp:
312         (WebKit::WebFullScreenManager::element): Added.
313         (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage.
314         (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
315         (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
316         (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added..
317         (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added.
318         (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added.
319         (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added.
320         (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub.
321         (WebKit::WebFullScreenManager::getFullScreenRect): Added.
322         (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub.
323         (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub.
324         * WebProcess/FullScreen/WebFullScreenManager.h:
325         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions.
326         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
327         (WebKit::WebChromeClient::setRootFullScreenLayer): Added.
328         * WebProcess/WebCoreSupport/WebChromeClient.h:
329
330 2011-03-11  Alice Liu  <alice.liu@apple.com>
331
332         Reviewed by Sam Weinig.
333
334         Support encoding /decoding WebData in usermessages
335         https://bugs.webkit.org/show_bug.cgi?id=56158
336
337         Added encoding/decoding for APIObject::TypeData
338         * Shared/UserMessageCoders.h:
339         (WebKit::UserMessageEncoder::baseEncode):
340         (WebKit::UserMessageDecoder::baseDecode):
341
342 2011-03-11  Alice Liu  <alice.liu@apple.com>
343
344         Reviewed by Sam Weinig.
345
346         Add api for "remove" to WKMutableDictionary
347         https://bugs.webkit.org/show_bug.cgi?id=56157
348
349         * Shared/API/c/WKMutableDictionary.cpp:
350         (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl.
351         * Shared/API/c/WKMutableDictionary.h:
352         * Shared/MutableDictionary.cpp:
353         (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap.
354         * Shared/MutableDictionary.h:
355
356 2011-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
357
358         Unreviewed, rolling out r80899 and r80912.
359         http://trac.webkit.org/changeset/80899
360         http://trac.webkit.org/changeset/80912
361         https://bugs.webkit.org/show_bug.cgi?id=56236
362
363         Caused animation tests to crash on Snow Leopard WebKit2
364         (Requested by rniwa on #webkit).
365
366         * Shared/ShareableBitmap.cpp:
367         (WebKit::ShareableBitmap::create):
368         (WebKit::ShareableBitmap::createShareable):
369         (WebKit::ShareableBitmap::resize):
370         * Shared/ShareableBitmap.h:
371         (WebKit::ShareableBitmap::numBytesForSize):
372         (WebKit::ShareableBitmap::sizeInBytes):
373         * UIProcess/DrawingAreaProxyImpl.cpp:
374         (WebKit::DrawingAreaProxyImpl::update):
375         * WebKit2.xcodeproj/project.pbxproj:
376         * WebProcess/WebPage/DrawingArea.h:
377         (WebKit::DrawingArea::didUpdate):
378         * WebProcess/WebPage/DrawingArea.messages.in:
379         * WebProcess/WebPage/DrawingAreaImpl.cpp:
380         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
381         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
382         (WebKit::DrawingAreaImpl::didUpdate):
383         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
384         (WebKit::DrawingAreaImpl::display):
385         * WebProcess/WebPage/DrawingAreaImpl.h:
386         * WebProcess/WebPage/SharedMemoryCache.cpp: Removed.
387         * WebProcess/WebPage/SharedMemoryCache.h: Removed.
388         * win/WebKit2.vcproj:
389
390 2011-03-11  Brian Weinstein  <bweinstein@apple.com>
391
392         Windows build fix. Add SharedMemoryCache to the vcproj.
393
394         * win/WebKit2.vcproj:
395
396 2011-03-11  Alexey Proskuryakov  <ap@apple.com>
397
398         Reviewed by Sam Weinig.
399
400         https://bugs.webkit.org/show_bug.cgi?id=56222
401         A window remains frozen if web process crashes during printing
402
403         * UIProcess/API/mac/PageClientImpl.h:
404         * UIProcess/API/mac/PageClientImpl.mm:
405         * UIProcess/PageClient.h:
406         * UIProcess/WebPageProxy.cpp:
407         (WebKit::WebPageProxy::setComplexTextInputEnabled):
408         * UIProcess/WebPageProxy.h:
409         Moved setAutodisplay code into WKPrintingView.
410
411         * UIProcess/API/mac/WKPrintingView.h:
412         * UIProcess/API/mac/WKView.mm:
413         (-[WKView printOperationWithPrintInfo:forFrame:]):
414         Keep a reference to the actual WKView, so that we can manipulate how it displays, even if
415         page goes away.
416
417         * UIProcess/API/mac/WKPrintingView.mm:
418         (-[WKPrintingView initWithFrameProxy:WebKit::view:]):
419         (-[WKPrintingView _setAutodisplay:]):
420         (-[WKPrintingView _suspendAutodisplay]):
421         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
422         Move setAutodisplay here.
423
424 2011-03-11  Anders Carlsson  <andersca@apple.com>
425
426         Reviewed by Sam Weinig.
427
428         Add a shared memory cache to the web process
429         https://bugs.webkit.org/show_bug.cgi?id=56232
430
431         Add a very simple shared memory cache to the web process, so that we don't have to allocate and
432         free memory over and over when painting.
433
434         * Shared/ShareableBitmap.cpp:
435         (WebKit::ShareableBitmap::create):
436         (WebKit::ShareableBitmap::createShareable):
437         (WebKit::ShareableBitmap::resize):
438         * Shared/ShareableBitmap.h:
439         (WebKit::ShareableBitmap::numBytesNeededForBitmapSize):
440         (WebKit::ShareableBitmap::sizeInBytes):
441         Rename numBytesForSize to numBytesNeededForBitmapSize.
442
443         * UIProcess/DrawingAreaProxyImpl.cpp:
444         (WebKit::DrawingAreaProxyImpl::update):
445         Always send back a DidUpdate message, even if we didn't use the update info.
446         This is needed so that the web process knows when the UI process is done with the shared memory inside
447         the update info struct.
448
449         * WebKit2.xcodeproj/project.pbxproj:
450         Add new files.
451
452         * WebProcess/WebPage/DrawingArea.h:
453         (WebKit::DrawingArea::didUpdate):
454         * WebProcess/WebPage/DrawingArea.messages.in:
455         DidUpdate now takes a boolean.
456
457         * WebProcess/WebPage/DrawingAreaImpl.cpp:
458         (WebKit::sharedMemoryCache):
459         Add shared memory cache.
460
461         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
462         Return the shared memory to the cache.
463
464         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
465         display now takes an extra boolean.
466
467         (WebKit::DrawingAreaImpl::didUpdate):
468         Return the shared memory to the cache.
469
470         (WebKit::DrawingAreaImpl::display):
471         If useSharedMemoryCache is true, get shared memory from the cache.
472
473         * WebProcess/WebPage/SharedMemoryCache.cpp: Added.
474         (WebKit::SharedMemoryCache::acquireSharedMemory):
475         If the memory we currently hold on to is big enough, return it.
476
477         (WebKit::SharedMemoryCache::releaseSharedMemory):
478         If we're already holding on to shared memory, evict it if the returned
479         shared memory object is bigger than the one we currently hold.
480
481         (WebKit::SharedMemoryCache::clearCacheTimerFired):
482         Null out the shared memory object.
483
484 2011-03-11  Jessie Berlin  <jberlin@apple.com>
485
486         Reviewed by Adam Roben.
487
488         Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
489         Process has finished launching.
490         https://bugs.webkit.org/show_bug.cgi?id=56208
491
492         Only send the message if the Web Process is valid.
493
494         * UIProcess/WebContext.cpp:
495         (WebKit::WebContext::clearResourceCaches):
496
497 2011-03-11  Anders Carlsson  <andersca@apple.com>
498
499         Reviewed by Dan Bernstein.
500
501         Don't paint more than 60 times per second
502         https://bugs.webkit.org/show_bug.cgi?id=56206
503         <rdar://problem/9085989>
504
505         * WebProcess/WebPage/DrawingAreaImpl.cpp:
506         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
507         Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired.
508
509         (WebKit::DrawingAreaImpl::didUpdate):
510         Call displayTimerFired instead of display.
511
512         (WebKit::DrawingAreaImpl::displayTimerFired):
513         If we're asked to paint again less than 1/60th of a second after we've already painted,
514         defer painting.
515
516         (WebKit::DrawingAreaImpl::display):
517         Update m_lastDisplayTime.
518
519 2011-03-11  Mark Rowe  <mrowe@apple.com>
520
521         Reviewed by Alice Liu.
522
523         <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL.
524
525         * UIProcess/cf/WebPageProxyCF.cpp:
526         (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item
527         as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will
528         be done by our call to loadURL elsewhere in the function.
529
530 2011-03-10  Alexey Proskuryakov  <ap@apple.com>
531
532         Reviewed by Jon Honeycutt.
533
534         WebKit2 UI process crashes if web process crashes while computing page rects for printing
535         https://bugs.webkit.org/show_bug.cgi?id=56160
536         <rdar://problem/9027410>
537
538         * UIProcess/API/mac/WKPrintingView.mm:
539         (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that
540         we have when resuming autodisplay.
541         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME.
542         (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing
543         when there is a communication error, so results are all null).
544         (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many
545         pages it had.
546         (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages
547         nor knowing them, as it happens when the web process crashes.        
548
549 2011-03-10  Mark Rowe  <mrowe@apple.com>
550
551         Rubber-stamped by Sam Weinig.
552
553         Part of <rdar://problem/8728860> WebKit2 needs to be made localizable
554
555         The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents
556         the default localization that we set during launch from being respected.
557
558         * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion.
559         * WebProcess/Info.plist: Ditto.
560
561 2011-03-10  Martin Robinson  <mrobinson@igalia.com>
562
563         Build for WebKit2 GTK+ after r80714.
564
565         * GNUmakefile.am: Update source list.
566         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 
567         (WebKit::x11Display): Add missing semicolon.
568
569 2011-03-10  Chris Fleizach  <cfleizach@apple.com>
570
571         Reviewed by Darin Adler.
572
573         REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus
574         https://bugs.webkit.org/show_bug.cgi?id=55959
575
576         NSApplication has to return the focused element within the app in order
577         for NSAccessibilityHandleFocusChanged() to work. The default implementation
578         relies on keyWindow. Consequently, in WK2, the WebProcess must override that method
579         to return the appropriate focused element within the WebProcess, since
580         there is no keyWindow.
581
582         * WebKit2.xcodeproj/project.pbxproj:
583         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
584         (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
585         * WebProcess/WebProcess.cpp:
586         (WebKit::WebProcess::focusedWebPage):
587         * WebProcess/WebProcess.h:
588         * WebProcess/mac/NSApplicationOverride.mm: Added.
589         (-[NSApplication accessibilityFocusedUIElement]):
590
591 2011-03-10  Oleg Romashin  <romaxa@gmail.com>
592
593         Reviewed by Andreas Kling.
594
595         Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3
596         Solving conflict of Qt and Xlib includes
597
598         * Shared/Plugins/NPIdentifierData.cpp:
599         * Shared/Plugins/NPIdentifierData.h:
600         * Shared/Plugins/NPObjectProxy.cpp:
601         * Shared/Plugins/NPVariantData.h:
602
603 2011-03-10  Sam Weinig  <sam@webkit.org>
604
605         Reviewed by Mark Rowe.
606
607         - Fix plugins in release and production builds.
608
609         * WebKit2.xcodeproj/project.pbxproj:
610         Make sure to base the PluginProcess target on the correct xcconfig file
611         in all configurations.
612
613 2011-03-09  Matthew Delaney  <mdelaney@apple.com>
614
615         Reviewed by Simon Fraser.
616
617         Plumb through settings for accelerated drawing for canvas
618         https://bugs.webkit.org/show_bug.cgi?id=56039
619
620         * Shared/WebPreferencesStore.h:
621         * UIProcess/API/C/WKPreferences.cpp:
622         * UIProcess/API/C/WKPreferencesPrivate.h:
623         * WebProcess/WebPage/WebPage.cpp:
624
625 2011-03-10  Jessie Berlin  <jberlin@apple.com>
626
627         Reviewed by Oliver Hunt and Brian Weinstein.
628
629         WebKit2: Need a way to clear only the in-memory resource caches
630         https://bugs.webkit.org/show_bug.cgi?id=56022
631
632         Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches
633         or just the memory caches.
634
635         * Shared/ResourceCachesToClear.h: Added.
636         * UIProcess/API/C/WKAPICast.h:
637         (WebKit::toResourceCachesToClear):
638
639         * UIProcess/API/C/WKContext.cpp:
640         (WKContextClearResourceCaches):
641         Add the new parameter.
642         * UIProcess/API/C/WKContext.h:
643         * UIProcess/WebContext.cpp:
644         (WebKit::WebContext::clearResourceCaches):
645         Ditto.
646         * UIProcess/WebContext.h:
647
648         * WebProcess/WebProcess.cpp:
649         (WebKit::WebProcess::clearResourceCaches):
650         Pass the new parameter through to the platform-specific functions.
651         * WebProcess/WebProcess.h:
652         Add the new parameter and give it a default of AllResourceCaches.
653         * WebProcess/WebProcess.messages.in:
654         Ditto.
655         * WebProcess/gtk/WebProcessGtk.cpp:
656         (WebKit::WebProcess::platformClearResourceCaches):
657         Ditto.
658         * WebProcess/qt/WebProcessQt.cpp:
659         (WebKit::WebProcess::platformClearResourceCaches):
660         Ditto.
661         * WebProcess/win/WebProcessWin.cpp:
662         (WebKit::WebProcess::platformClearResourceCaches):
663         When told to clear only the in-memory caches, return early so as not to clear the CFNetwork
664         disk cache.
665         * WebProcess/mac/WebProcessMac.mm:
666         (WebKit::WebProcess::platformClearResourceCaches):
667         Ditto.
668
669         * WebKit2.xcodeproj/project.pbxproj:
670         Add ResourceCachesToClear.h
671         * win/WebKit2.vcproj:
672         Ditto.
673
674 2011-03-10  Jeff Miller  <jeffm@apple.com>
675
676         Reviewed by Adam Roben.
677
678         WKViewRegisterEditCommandCallback should use WKViewUndoType
679         https://bugs.webkit.org/show_bug.cgi?id=56120
680
681         * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType.
682
683 2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
684
685         Reviewed by Kenneth Rohde Christiansen.
686
687         Tiled backing store's delegated scroll request uses incorrect convention
688         https://bugs.webkit.org/show_bug.cgi?id=56011
689
690         Adapt all of the internal API to match the delta to point
691         conversion at the WebCore side.
692
693         * UIProcess/API/qt/qwkpage.cpp:
694         (QWKPagePrivate::pageDidRequestScroll):
695         * UIProcess/API/qt/qwkpage_p.h:
696         * UIProcess/PageClient.h:
697         * UIProcess/WebPageProxy.cpp:
698         (WebKit::WebPageProxy::pageDidRequestScroll):
699         * UIProcess/WebPageProxy.h:
700         * UIProcess/WebPageProxy.messages.in:
701         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
702         (WebKit::WebChromeClient::delegatedScrollRequested):
703         * WebProcess/WebCoreSupport/WebChromeClient.h:
704         * WebProcess/WebPage/WebPage.cpp:
705         (WebKit::WebPage::pageDidRequestScroll):
706         * WebProcess/WebPage/WebPage.h:
707
708 2011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
709
710         Reviewed by Andreas Kling.
711
712         [WK2] Make non-transparent windowless plugins paint on X11
713         https://bugs.webkit.org/show_bug.cgi?id=55660
714
715         Implement painting for non-transparent windowless X11 plugins.
716         The essence of the logic has been adapted from WebCore.
717         The implementation is stubbed for GTK and working only on Qt
718         but it should be really easy to finish it for GTK.
719
720         * WebKit2.pro:
721         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
722         (WebKit::NPN_GetValue): Handle X11 specific values that are necessary.
723         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
724         (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific
725         members that has been added.
726         (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates
727         of the NP_Window to 0 on X11 since we are using a backings store as the
728         painting area for the plugin.
729         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
730         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour
731         of a common implementation for X11.
732         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto.
733         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added.
734         (WebKit::getPluginDisplay):
735
736         Platform specific static getters.
737         (WebKit::x11Display):
738         (WebKit::displayDepth):
739         (WebKit::rootWindowID):
740         (WebKit::x11Screen):
741
742         (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual
743         settings and the colormap for the plugin.
744         (WebKit::NetscapePlugin::platformDestroy):
745         (WebKit::NetscapePlugin::platformInvalidate): Remained stub.
746         (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new
747         pixmap that fits the geometry.
748         (WebKit::NetscapePlugin::platformPaint): Propagate a paint event
749         to the plugin, sync with it if necessary and draw the pixmap to
750         the screen.
751         (WebKit::toNP): Remained stub.
752         (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub.
753         (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub.
754         (WebKit::NetscapePlugin::platformSetFocus): Remained stub.
755         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub.
756         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub.
757         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub.
758         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
759         (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque
760         key-value pair to the plugin parameters to force Flash to act in
761         non-transparent windowless mode. Qt also doing this in WebCore.
762
763 2011-03-09  Peter Kasting  <pkasting@google.com>
764
765         Reviewed by Mihai Parparita.
766
767         Unify Windows version checks.
768         https://bugs.webkit.org/show_bug.cgi?id=55979
769
770         * UIProcess/win/WebPageProxyWin.cpp:
771         (WebKit::WebPageProxy::standardUserAgent):
772
773 2011-03-09  Adele Peterson  <adele@apple.com>
774
775         Reviewed by Anders Carlsson.
776
777         Fix for https://bugs.webkit.org/show_bug.cgi?id=56068
778         <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items
779
780         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected):
781         Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, 
782         and ContextMenuItemTagCheckGrammarWithSpelling
783
784 2011-03-09  Alexey Proskuryakov  <ap@apple.com>
785
786         Reviewed by Dan Bernstein.
787
788         Frequent crashes when printing in WebPageProxy::setAutodisplay
789         https://bugs.webkit.org/show_bug.cgi?id=56057
790         <rdar://problem/9053290>
791
792         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
793         Null check the page, there is no reason for it to still exist.
794
795 2011-03-09  Brent Fulgham  <bfulgham@webkit.org>
796
797         Unreviewed build correction.
798
799         * UIProcess/DrawingAreaProxy.messages.in: Exclude the other
800           method using LayerTreeContext for non-accelerated composition case.
801
802 2011-03-09  Sam Weinig  <sam@webkit.org>
803
804         Reviewed by Anders Carlsson.
805
806         Change plugins to use their own executable on Mac OS X
807         https://bugs.webkit.org/show_bug.cgi?id=55991
808
809         * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig.
810         * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist.
811         Add files necessary for adding PluginProcess.app.
812
813         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
814         (WebKit::ProcessLauncher::launchProcess):
815         Launch the PluginProcess.app when launching a plugin process.
816
817         * WebKit2.xcodeproj/project.pbxproj:
818         Add new executable and new files, removes some unneeded copying
819         and duplicate compiling of files.
820
821         * WebProcess/Info.plist:
822         Sorted.
823
824 2011-03-09  Jessie Berlin  <jberlin@apple.com>
825
826         Reviewed by Adam Roben.
827
828         Use the Cookie Storage from the Private Browsing Storage Session directly
829         https://bugs.webkit.org/show_bug.cgi?id=55986
830
831         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
832         (InitWebCoreSystemInterface):
833
834 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
835
836         Fix compilation after r80596, add soup Download stubs.
837
838         * GNUmakefile.am:
839         * WebProcess/Downloads/soup/DownloadSoup.cpp: Added.
840         (WebKit::Download::start):
841         (WebKit::Download::startWithHandle):
842         (WebKit::Download::cancel):
843         (WebKit::Download::platformInvalidate):
844         (WebKit::Download::didDecideDestination):
845         (WebKit::Download::platformDidFinish):
846
847 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
848
849         Fix GTK+ compilation after r80619. Add WebFullScreenManager.
850
851         * GNUmakefile.am:
852
853 2011-03-08  Jer Noble  <jer.noble@apple.com>
854
855         Reviewed by Sam Weinig.
856
857         WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
858         https://bugs.webkit.org/show_bug.cgi?id=55273
859
860         The FULLSCREEN_API Chrome client calls need to be plumbed through from the 
861         WebProcess to the UIProcess.  To do this, WebFullScreenManager (and Proxy)
862         classes have been added to WebPage.
863
864         * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files.
865         * DerivedSources.pro: Ditto.
866         * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager.
867         * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef.
868         * Shared/APIObject.h: Added APIType for WebFullScreenManager.
869         * UIProcess/WebFullScreenManagerProxy.cpp: Added.
870         * UIProcess/WebFullScreenManagerProxy.h: Added.
871         * UIProcess/WebFullScreenManagerProxy.messages.in: Added.
872         * UIProcess/WebPageProxy.cpp:
873         (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager.
874         (WebKit::WebPageProxy::processDidCrash): Ditto.
875         (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy.
876         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
877         (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager.
878         * UIProcess/WebPageProxy.h:
879         * UIProcess/WebPageProxy.messages.in:
880         * UIProcess/WebUIClient.cpp:
881         * UIProcess/WebUIClient.h:
882         * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file.
883         * WebKit2.pro: Ditto.
884         * win/WebKit2.vcproj: Ditto.
885         * WebKit2.pri: Added new directories to include file path.
886         * win/WebKit2Common.vsprops: Ditto.
887         * WebProcess/FullScreen/WebFullScreenManager.cpp: Added.
888         * WebProcess/FullScreen/WebFullScreenManager.h: Added.
889         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added.
890         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
891         (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager.
892         (WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
893         (WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
894         * WebProcess/WebPage/WebPage.cpp:
895         (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager.
896         (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager.
897         (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager.
898         * WebProcess/WebPage/WebPage.h:
899
900 2011-03-08  Jer Noble  <jer.noble@apple.com>
901
902         Reviewed by Sam Weinig.
903
904         WebKit2: Plumb through the "supportsFullScreen" preference.
905         https://bugs.webkit.org/show_bug.cgi?id=55261
906
907         The "supportsFullScreen" preference needs to be plumbed through from
908         the UIProcess to the WebProcess.
909
910         * Shared/WebPreferencesStore.h: Add a new macro entry.
911         * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter.
912         (WKPreferencesSetFullScreenEnabled):
913         (WKPreferencesGetFullScreenEnabled):
914         * UIProcess/API/C/WKPreferences.h:
915         * WebProcess/WebPage/WebPage.cpp:
916         (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to
917             the settings object.
918
919 2011-03-08  Jeff Miller  <jeffm@apple.com>
920
921         Reviewed by Adele Peterson.
922
923         WebKit2: Implement Windows glue for Undo/Redo
924         https://bugs.webkit.org/show_bug.cgi?id=55961
925         
926         Expose Undo/Redo infrastructure through WKView on Windows by
927         adding an undo client as well as APIs to reapply and unapply
928         an edit command.
929
930         * UIProcess/API/C/win/WKView.cpp:
931         (WKViewSetViewUndoClient): Added.
932         (WKViewReapplyEditCommand): Added.
933         (WKViewUnapplyEditCommand): Added.
934         * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand().
935         * UIProcess/WebPageProxy.cpp:
936         (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API.
937         * UIProcess/WebPageProxy.h: Added isValidEditCommand().
938         * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. 
939         (WebKit::WebUndoClient::registerEditCommand): Added.
940         (WebKit::WebUndoClient::clearAllEditCommands): Added.
941         * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient.
942         * UIProcess/win/WebView.cpp:
943         (WebKit::WebView::initializeUndoClient): Added.
944         (WebKit::WebView::close): Clear out undo client.
945         (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient.
946         (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient.
947         (WebKit::WebView::reapplyEditCommand): Added.
948         (WebKit::WebView::unapplyEditCommand): Added.
949         * UIProcess/win/WebView.h: Added undo client support.
950         * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h.
951
952 2011-03-08  Jeff Miller  <jeffm@apple.com>
953
954         Reviewed by Sam Weinig.
955
956         WebKit2: Expose WebEditCommandProxy in the C API on Windows
957         https://bugs.webkit.org/show_bug.cgi?id=55962
958         
959         Make WebEditCommandProxy a subclass of APIObject, and define
960         WKEditCommandRef as the type that will be exposed through the C API.
961
962         * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef.
963         * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy.
964         * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef.
965         * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject.
966         (WebKit::WebEditCommandProxy::type): Added.
967
968 2011-03-08  Jeff Miller  <jeffm@apple.com>
969
970         Reviewed by Oliver Hunt.
971
972         WebKit2: Redo is broken
973         https://bugs.webkit.org/show_bug.cgi?id=55978
974         
975         WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens.
976         For example, when we unapply(), we should register a Redo command, not an Undo command.
977
978         * UIProcess/WebEditCommandProxy.cpp:
979         (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command.
980         (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command.
981
982 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
983
984         Reviewed by Adam Roben.
985
986         https://bugs.webkit.org/show_bug.cgi?id=55977
987         Refine CF/CFNet distinctions for better code sharing.
988         1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp
989            since it does not use any CFNETWORK features.
990         2. Create new cfnet directory.
991         3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet
992         4. Update project file.
993
994         * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed.
995         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed.
996         * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp.
997         * WebProcess/Downloads/cfnet: Added.
998         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp.
999         * win/WebKit2.vcproj:
1000
1001 2011-03-08  Mark Rowe  <mrowe@apple.com>
1002
1003         Reviewed by Brady Eidson.
1004
1005         <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries.
1006
1007         * UIProcess/cf/WebPageProxyCF.cpp:
1008         (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state
1009         without navigating to the current item.
1010         * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item.
1011
1012 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
1013
1014         Reviewed by Anders Carlsson.
1015
1016         https://bugs.webkit.org/show_bug.cgi?id=55956
1017         WebKit2 Changes to correct WinCairo port build
1018
1019         * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated
1020           compositing case.
1021         * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build.
1022         * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for
1023           WinCairo build.
1024         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
1025         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
1026         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1027         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1028         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
1029         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
1030         * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when
1031           accelerated compositing is enabled.
1032         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
1033         * UIProcess/win/WebView.cpp: Protect CG-specific drawing code.
1034         (WebKit::WebView::setFindIndicator):
1035         * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag,
1036           as well as destination and bundle paths.
1037         * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation
1038           of file handling.  This will be moved to a common area in a future patch.)
1039         * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths.
1040         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
1041         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
1042         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1043         * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code.
1044         (WebKit::WebPage::drawRectToPDF):
1045         (WebKit::WebPage::drawPagesToPDF):
1046         * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo
1047
1048 2011-03-08  Ivan Krstić  <ike@apple.com>
1049
1050         Reviewed by Sam Weinig.
1051
1052         Re-fix: can't paste from 3rd party text editor into WebKit2 window
1053         <rdar://problem/8978624>
1054
1055         * WebProcess/com.apple.WebProcess.sb:
1056
1057 2011-03-08  Martin Robinson  <mrobinson@igalia.com>
1058
1059         Fix the WebKit2 compilation after r80578.
1060
1061         * UIProcess/gtk/WebView.cpp:
1062         (WebKit::WebView::setFocus): Added.
1063         * UIProcess/gtk/WebView.h:
1064
1065 2011-03-08  Jessie Berlin  <jberlin@apple.com>
1066
1067         Reviewed by Anders Carlsson.
1068
1069         Crash in CFNetwork visiting google.com
1070         https://bugs.webkit.org/show_bug.cgi?id=55958
1071
1072         * Shared/API/c/cf/WKURLResponseCF.cpp:
1073         (WKURLResponseCopyCFURLResponse):
1074         If the response to copy is null, return 0;
1075
1076 2011-03-08  John Sullivan  <sullivan@apple.com>
1077
1078         Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940
1079         
1080         The patch was insufficient, and it wasn't useful for the intended client use either.
1081
1082         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1083         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1084         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1085
1086 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
1087
1088         Unreviewed, fixed GTK+ compilation after r80569.
1089
1090         * UIProcess/gtk/WebView.cpp:
1091         (WebKit::WebView::windowToScreen):
1092         * UIProcess/gtk/WebView.h:
1093
1094 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
1095
1096         Reviewed by Sam Weinig.
1097
1098         WK2: Cannot set focus on an element when focus is outside of WKView
1099         https://bugs.webkit.org/show_bug.cgi?id=55281
1100
1101         * UIProcess/API/mac/PageClientImpl.h:
1102         * UIProcess/API/mac/PageClientImpl.mm:
1103         (WebKit::PageClientImpl::setFocus):
1104         * UIProcess/API/qt/qwkpage_p.h:
1105         (QWKPagePrivate::setFocus):
1106         * UIProcess/PageClient.h:
1107         * UIProcess/WebPageProxy.cpp:
1108         (WebKit::WebPageProxy::setFocus):
1109         * UIProcess/WebPageProxy.h:
1110         * UIProcess/WebPageProxy.messages.in:
1111         * UIProcess/win/WebView.h:
1112         (WebKit::WebView::setFocus):
1113         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1114         (WebKit::WebChromeClient::focus):
1115         (WebKit::WebChromeClient::unfocus):
1116
1117 2011-03-08  Jeff Miller  <jeffm@apple.com>
1118
1119         Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
1120
1121         * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
1122
1123 2011-03-08  Jeff Miller  <jeffm@apple.com>
1124
1125         Reviewed by Darin Adler.
1126
1127         Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
1128         https://bugs.webkit.org/show_bug.cgi?id=55952
1129
1130         * UIProcess/API/C/win/WKBaseWin.h: Removed.
1131         * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
1132
1133 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
1134
1135         Reviewed by Martin Robinson.
1136
1137         [GTK] Add new files to compilation after r77974
1138         https://bugs.webkit.org/show_bug.cgi?id=54076
1139
1140         The commit added new code to allow passing context to policy
1141         delegate methods, we also added dummy ResourceRequest and
1142         ResourceResponse decoders until we implement them.
1143
1144         * GNUmakefile.am:
1145         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1146         (CoreIPC::decodeResourceRequest):
1147         (CoreIPC::decodeResourceResponse):
1148
1149 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
1150
1151         Reviewed by Darin Adler.
1152
1153         AX: Webkit2 not sending UAZoomFocusChanged notifications
1154         https://bugs.webkit.org/show_bug.cgi?id=55916
1155
1156         Needed to implement the windowToScreen() method so that the right frame
1157         could be calculated to send for zoom focus changes.
1158
1159         * UIProcess/API/mac/PageClientImpl.h:
1160         * UIProcess/API/mac/PageClientImpl.mm:
1161         (WebKit::PageClientImpl::windowToScreen):
1162         * UIProcess/API/qt/qwkpage.cpp:
1163         (QWKPagePrivate::windowToScreen):
1164         * UIProcess/API/qt/qwkpage_p.h:
1165         * UIProcess/PageClient.h:
1166         * UIProcess/WebPageProxy.cpp:
1167         (WebKit::WebPageProxy::windowToScreen):
1168         * UIProcess/WebPageProxy.h:
1169         * UIProcess/WebPageProxy.messages.in:
1170         * UIProcess/win/WebView.cpp:
1171         (WebKit::WebView::windowToScreen):
1172         * UIProcess/win/WebView.h:
1173         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1174         (WebKit::WebChromeClient::windowToScreen):
1175         * WebProcess/WebPage/WebPage.cpp:
1176         (WebKit::WebPage::windowToScreen):
1177         * WebProcess/WebPage/WebPage.h:
1178
1179 2011-03-08  John Sullivan  <sullivan@apple.com>
1180
1181         Reviewed by Darin Adler.
1182
1183         https://bugs.webkit.org/show_bug.cgi?id=55940
1184         WebKit2 should support Ignore policy from injected bundle client
1185
1186         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1187         Added WKBundlePagePolicyActionIgnore.
1188         
1189         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1190         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1191         If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
1192         to the loader's PolicyIgnore.
1193
1194 2011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1195
1196         Reviewed by Kenneth Rohde Christiansen.
1197
1198         [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
1199         https://bugs.webkit.org/show_bug.cgi?id=55876
1200
1201         Make sure TESTS_SOURCE_DIR is set for Symbian the same way
1202         as it is for WK1.
1203
1204         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
1205         (tst_QGraphicsWKView::loadEmptyPage):
1206         * UIProcess/API/qt/tests/tests.pri:
1207
1208 2011-03-07  Damian Kaleta  <dkaleta@apple.com>
1209
1210         Reviewed by Anders Carlsson.
1211
1212         QuickTime plugin should opt in to a 32-bit non-executable heap
1213         https://bugs.webkit.org/show_bug.cgi?id=55704
1214         <rdar://problem/8105706>
1215
1216         * UIProcess/Plugins/PluginProcessProxy.cpp:
1217         (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
1218         By default it should opt-out.
1219         (WebKit::PluginProcessProxy::PluginProcessProxy):
1220
1221 2011-03-07  Sam Weinig  <sam@webkit.org>
1222
1223         Reviewed by Anders Carlsson.
1224
1225         Add unableToImplementPolicy callback for WebKit2 policy client
1226         <rdar://problem/9071902>
1227         https://bugs.webkit.org/show_bug.cgi?id=55884
1228
1229         * UIProcess/API/C/WKPage.h:
1230         * UIProcess/WebPageProxy.cpp:
1231         (WebKit::WebPageProxy::unableToImplementPolicy):
1232         * UIProcess/WebPageProxy.h:
1233         * UIProcess/WebPageProxy.messages.in:
1234         * UIProcess/WebPolicyClient.cpp:
1235         (WebKit::WebPolicyClient::unableToImplementPolicy):
1236         * UIProcess/WebPolicyClient.h:
1237         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1238         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1239         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
1240         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
1241         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1242         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
1243         Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
1244
1245 2011-03-07  Sam Weinig  <sam@webkit.org>
1246
1247         Reviewed by Anders Carlsson.
1248
1249         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
1250         https://bugs.webkit.org/show_bug.cgi?id=55827
1251
1252         - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
1253           and pass the entire response, instead of just the MIMEType.
1254         - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
1255           MIMEType.
1256
1257         * UIProcess/API/C/WKPage.h:
1258         * UIProcess/WebPageProxy.cpp:
1259         (WebKit::WebPageProxy::decidePolicyForResponse):
1260         * UIProcess/WebPageProxy.h:
1261         * UIProcess/WebPageProxy.messages.in:
1262         * UIProcess/WebPolicyClient.cpp:
1263         (WebKit::WebPolicyClient::decidePolicyForResponse):
1264         * UIProcess/WebPolicyClient.h:
1265         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1266         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1267         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
1268         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
1269         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1270         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
1271         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1272
1273 2011-03-06  Jessie Berlin  <jberlin@apple.com>
1274
1275         Reviewed by Sam Weinig.
1276
1277         WebKit2: Use CFNetwork Sessions API.
1278         https://bugs.webkit.org/show_bug.cgi?id=55435.
1279
1280         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
1281         Private Browsing Storage Session.
1282
1283         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1284         (InitWebCoreSystemInterface):
1285         Add support for using the new WKSI functions in WebCore.
1286
1287 2011-03-06  Oleg Romashin  <romaxa@gmail.com>
1288
1289         Reviewed by Kenneth Rohde Christiansen.
1290
1291         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
1292         Adding dummy Qt files for Plugin Process implementation,
1293         Adding missing sources into Qt pro files
1294         https://bugs.webkit.org/show_bug.cgi?id=55719
1295
1296         * DerivedSources.pro:
1297         * PluginProcess/qt: Added.
1298         * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
1299         (WebKit::PluginControllerProxy::platformInitialize):
1300         (WebKit::PluginControllerProxy::platformDestroy):
1301         (WebKit::PluginControllerProxy::platformGeometryDidChange):
1302         * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
1303         (WebKit::PluginProcessMain):
1304         * PluginProcess/qt/PluginProcessQt.cpp: Added.
1305         (WebKit::PluginProcess::platformInitialize):
1306         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
1307         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
1308         * WebKit2.pri:
1309         * WebKit2.pro:
1310         * WebKit2API.pri:
1311         * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
1312         (WebKit::PluginProxy::needsBackingStore):
1313
1314 2011-03-05  Sam Weinig  <sam@webkit.org>
1315
1316         Reviewed by Dan Bernstein.
1317
1318         Remove unneeded onPageClose function from DrawingArea
1319         https://bugs.webkit.org/show_bug.cgi?id=55836
1320
1321         * WebProcess/WebPage/DrawingArea.h:
1322         Remove empty function.
1323
1324         * WebProcess/WebPage/WebPage.cpp:
1325         (WebKit::WebPage::close):
1326         Remove only called
1327
1328 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
1329
1330         WK2 Mac build fix.
1331
1332         * UIProcess/API/C/WKPage.cpp:
1333         (WKPageComputePagesForPrinting):
1334         (WKPageBeginPrinting):
1335
1336         * UIProcess/API/C/WKPagePrivate.h:
1337
1338 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
1339
1340         WK2 Mac build fix.
1341
1342         * UIProcess/API/C/WKPagePrivate.h:
1343
1344 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
1345
1346         WK2 needs printing support on Windows
1347         https://bugs.webkit.org/show_bug.cgi?id=55800
1348         <rdar://problem/8903808>
1349
1350         Reviewed by Darin Adler.
1351
1352         * UIProcess/API/C/WKPage.cpp:
1353         (ComputedPagesContext::ComputedPagesContext):
1354         (computedPagesCallback):
1355         From the Vector of WebCore::IntRects, build up a Vector of WKRects.
1356         Call the callback, passing these rects and the scale factor.
1357         (printInfoFromWKPrintInfo):
1358         Return a PrintInfo structure from the WKPrintInfo.
1359         (WKPageComputePagesForPrinting):
1360         Call WebPageProxy::computePagesForPrinting(). Pass
1361         computedPagesCallback as the callback function, so that we can
1362         translate the WebCore rect type to WKRect before calling the caller's
1363         callback function.
1364         (WKPageBeginPrinting):
1365         Call WebPageProxy::beginPrinting().
1366         (WKPageDrawPagesToPDF):
1367         Call WebPageProxy::drawPagesToPDF().
1368
1369         * UIProcess/API/C/WKPagePrivate.h:
1370         Declare the WKPrintInfo type and new functions.
1371
1372         * UIProcess/WebPageProxy.cpp:
1373         Compile this code on Windows.
1374
1375         * UIProcess/WebPageProxy.h:
1376         Ditto.
1377
1378         * UIProcess/win/WebView.cpp:
1379         (WebKit::WebView::paint):
1380         We're painting the window; leave printing mode.
1381
1382         * WebProcess/WebPage/WebPage.cpp:
1383         Compile this code on Windows.
1384
1385         * WebProcess/WebPage/WebPage.h:
1386         Ditto.
1387
1388         * WebProcess/WebPage/WebPage.messages.in:
1389         Ditto.
1390
1391 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
1392
1393         Reviewed by Darin Adler.
1394
1395         Adopt VersionStamper tool for Windows WebKit DLLs
1396         https://bugs.webkit.org/show_bug.cgi?id=55784
1397         <rdar://problem/9021320>
1398
1399         We now use a tool to stamp the version number onto the Apple WebKit DLLs
1400         during the post-build step.
1401
1402         Fetch the WebKit version from a string resource instead of the version resource.
1403
1404         * UIProcess/win/WebPageProxyWin.cpp:
1405         (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
1406         * win/WebKit2.rc: Removed version, added stringtable.
1407         * win/WebKit2WebProcess.rc: Removed.
1408         * win/WebKit2WebProcess.vcproj:
1409         * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
1410         * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
1411         * win/WebKitPostBuild.cmd: Stamp version.
1412
1413 2011-03-04  Jeff Miller  <jeffm@apple.com>
1414
1415         Reviewed by Darin Adler.
1416
1417         Add WKPageValidateCommand()
1418         https://bugs.webkit.org/show_bug.cgi?id=55793
1419         
1420         On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
1421         However, on Windows we need to do this in the client, so expose this functionality
1422         in the API via WKPageValidateCommand().
1423         
1424         Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
1425         to match this new API, so it no longer has to go through PageClient to get notified
1426         when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
1427         so I removed the stub implementations in qt and gtk as well.
1428
1429         * UIProcess/API/C/WKPage.cpp:
1430         (WKPageValidateCommand): Added.
1431         * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
1432         * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
1433         * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
1434         * UIProcess/API/mac/WKView.mm:
1435         (validateCommandCallback): Added.
1436         (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
1437         * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
1438         * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
1439         * UIProcess/PageClient.h: Removed setEditCommandState().
1440         * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
1441         (WebKit::WebPageProxy::validateCommand): This now takes a callback.
1442         (WebKit::WebPageProxy::validateCommandCallback): Added.
1443         (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
1444         * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
1445         (WebKit::ValidateCommandCallback::create): Added.
1446         (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
1447         (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
1448         (WebKit::ValidateCommandCallback::invalidate): Added.
1449         (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
1450         * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
1451         * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
1452         * UIProcess/gtk/WebView.h: Removed setEditCommandState().
1453         * UIProcess/win/WebView.cpp: Removed setEditCommandState().
1454         * UIProcess/win/WebView.h: Removed setEditCommandState().
1455         * WebProcess/WebPage/WebPage.cpp:
1456         (WebKit::WebPage::validateCommand): This now takes a callbackID.
1457         * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
1458         * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
1459
1460 2011-03-04  Brian Weinstein  <bweinstein@apple.com>
1461
1462         Reviewed by Darin Adler.
1463
1464         Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
1465         https://bugs.webkit.org/show_bug.cgi?id=53919
1466         <rdar://problem/8966020>
1467         
1468         Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
1469
1470         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
1471         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
1472
1473 2011-03-04  Darin Adler  <darin@apple.com>
1474
1475         Reviewed by Mark Rowe.
1476
1477         WebKit2 session state should include even loads too new to be in the back/forward list
1478         https://bugs.webkit.org/show_bug.cgi?id=55781
1479         part of <rdar://problem/8968847>
1480
1481         * UIProcess/cf/WebPageProxyCF.cpp:
1482         (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
1483         process to not be included in the back/forward list yet: The pending API request URL and
1484         the provisional URL.
1485         (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
1486         list is not restored and a URL is present. Later we can improve the way we handle the
1487         case where we have both a back/forward list and a URL.
1488
1489 2011-03-04  Jessie Berlin  <jberlin@apple.com>
1490
1491         Reviewed by Darin Adler.
1492
1493         WebKit2: Use CFNetwork Sessions API.
1494         https://bugs.webkit.org/show_bug.cgi?id=55435.
1495
1496         Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
1497         contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
1498
1499         * UIProcess/mac/WebContextMac.mm:
1500         (WebKit::WebContext::platformInitializeWebProcess):
1501         * UIProcess/win/WebContextWin.cpp:
1502         (WebKit::WebContext::platformInitializeWebProcess):
1503
1504 2011-03-04  Jessie Berlin  <jberlin@apple.com>
1505
1506         Reviewed by Maciej Stachowiak.
1507
1508         WebKit2: Use CFNetwork Sessions API.
1509         https://bugs.webkit.org/show_bug.cgi?id=55435.
1510
1511         When Private Browsing is enabled, get the cached url response from the cache associated with
1512         the Private Browsing Storage Session.
1513
1514         * WebProcess/WebPage/mac/WebPageMac.mm:
1515         (WebKit::WebPage::platformHasLocalDataForURL):
1516         If Private Browsing is enabled, call into WKSI to get the response.
1517         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1518         Ditto.
1519         * WebProcess/WebPage/win/WebPageWin.cpp:
1520         (WebKit::WebPage::platformHasLocalDataForURL):
1521         If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
1522         (WebKit::WebPage::cachedResponseMIMETypeForURL):
1523         Ditto.
1524
1525 2011-03-04  Jeff Miller  <jeffm@apple.com>
1526
1527         Reviewed by Darin Adler.
1528
1529         Move WKViewExecuteCommand() to WKPageExecuteCommand()
1530         https://bugs.webkit.org/show_bug.cgi?id=55744
1531         
1532         Executing a command operates on a page, so it makes more sense for it to be in WKPage.
1533         This also makes it available on all platforms, not just Windows.
1534
1535         * UIProcess/API/C/WKPage.cpp:
1536         (WKPageExecuteCommand): Added.
1537         * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
1538         * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
1539         * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
1540
1541 2011-03-04  Dan Bernstein  <mitz@apple.com>
1542
1543         LLVM Compiler build fix.
1544
1545         * WebProcess/WebPage/WebPage.cpp:
1546         (WebKit::WebPage::runJavaScriptInMainFrame):
1547
1548 2011-03-03  Timothy Hatcher  <timothy@apple.com>
1549
1550         Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
1551
1552         https://webkit.org/b/55623
1553
1554         Reviewed by Darin Adler.
1555
1556         * UIProcess/API/C/WKPage.cpp:
1557         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
1558         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
1559         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
1560         * UIProcess/WebPageProxy.cpp:
1561         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
1562         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
1563         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
1564         from the DataReference before calling the callback.
1565         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
1566         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
1567         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
1568         * WebProcess/WebPage/WebPage.cpp:
1569         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
1570         And use ScriptValueCallback to send the message back.
1571
1572 2011-03-03  Brian Weinstein  <bweinstein@apple.com>
1573
1574         Reviewed by Adam Roben.
1575
1576         Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
1577         
1578         Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
1579         on all platforms, and stub the functions on platforms that don't implement them.
1580
1581         * WebProcess/Cookies/WebCookieManager.cpp:
1582         (WebKit::WebCookieManager::startObservingCookieChanges):
1583         (WebKit::WebCookieManager::stopObservingCookieChanges):
1584
1585 2011-03-03  Jeff Miller  <jeffm@apple.com>
1586
1587         Reviewed by Darin Adler.
1588
1589         Refactor classes in GenericCallback.h
1590         https://bugs.webkit.org/show_bug.cgi?id=55732
1591         
1592         Since we're going to need to add additional callback classes, make a CallbackBase class that manages
1593         the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
1594         ComputedPagesCallback) now all derive from CallbackBase.
1595         
1596         Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
1597         constructor instead (we forgot the leading ~).
1598  
1599         * UIProcess/GenericCallback.h:
1600         (WebKit::CallbackBase::~CallbackBase):
1601         (WebKit::CallbackBase::callbackID):
1602         (WebKit::CallbackBase::CallbackBase):
1603         (WebKit::CallbackBase::context):
1604         (WebKit::CallbackBase::generateCallbackID):
1605         (WebKit::VoidCallback::~VoidCallback):
1606         (WebKit::VoidCallback::performCallback):
1607         (WebKit::VoidCallback::invalidate):
1608         (WebKit::VoidCallback::VoidCallback):
1609         (WebKit::GenericCallback::create):
1610         (WebKit::GenericCallback::~GenericCallback):
1611         (WebKit::GenericCallback::performCallbackWithReturnValue):
1612         (WebKit::GenericCallback::invalidate):
1613         (WebKit::GenericCallback::GenericCallback):
1614         (WebKit::ComputedPagesCallback::create):
1615         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
1616         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
1617         (WebKit::ComputedPagesCallback::invalidate):
1618         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
1619
1620 2011-03-03  Adam Roben  <aroben@apple.com>
1621
1622         Don't assume the web process has had a chance to paint before the view has to paint
1623
1624         Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
1625         BackingStore::paint
1626
1627         Reviewed by Anders Carlsson.
1628
1629         * UIProcess/DrawingAreaProxyImpl.cpp:
1630         (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
1631         yet.
1632
1633 2011-03-03  Adam Roben  <aroben@apple.com>
1634
1635         Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
1636
1637         The intent is to save memory for views that aren't painting.
1638
1639         Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
1640         backing store after not painting for a while
1641
1642         Reviewed by Anders Carlsson.
1643
1644         * UIProcess/DrawingAreaProxyImpl.cpp:
1645         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
1646         (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
1647         bail if we're in accelerated compositing mode); we might have thrown it away to save memory
1648         but now are being asked to paint by the view. The existing code in this function will handle
1649         getting a new backing store if possible by blocking for a little while to try to receive a
1650         DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
1651         don't have any outstanding UpdateBackingStoreState requests. After painting, call
1652         discardBackingStoreSoon to update our timer.
1653         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
1654         future.
1655         (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
1656         the web process we'll need a full backing store update on the next paint.
1657
1658         * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
1659
1660 2011-03-03  Adam Roben  <aroben@apple.com>
1661
1662         Add a way to tell the web process to perform a full backing store update on its next paint
1663
1664         Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
1665         full backing store update should happen immediately or should be deferred until the next
1666         paint or compositing mode change occurs. The deferred update isn't used yet, but will be
1667         used when we start throwing away backing stores to save memory.
1668
1669         Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
1670         store needs a full update on the next paint
1671
1672         Reviewed by Anders Carlsson.
1673
1674         * UIProcess/DrawingAreaProxyImpl.cpp:
1675         (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
1676         request, tell the web process to perform the backing store update right away, in case we
1677         previously told it it could defer the update.
1678         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
1679         store update.
1680         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
1681         were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
1682         for the web process to decide to send us this message on its own (if we asked it to do a
1683         deferred backing store update and then it needed to paint some part of the page). Specify
1684         that we need an immediate backing store update if the web process hasn't updated to our
1685         latest state, as we're about to draw potentially out-of-date bits to the screen and want to
1686         get the right bits as soon as possible. Also added a FIXME about a potential optimization.
1687         (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
1688         parameter, which is just passed through to sendUpdateBackingStoreState.
1689         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
1690         parameter that is used to specify to the web process whether to perform the full backing
1691         store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
1692         thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
1693         the web process for an immediate response; otherwise we could end up accidentally calling
1694         waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
1695         us such a message.
1696
1697         * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
1698
1699         * WebProcess/WebPage/DrawingArea.h:
1700         (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
1701
1702         * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
1703         UpdateBackingStoreState message.
1704
1705         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1706         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
1707         whether we should send a DidUpdateBackingStoreState message instead of an Update or
1708         compositing mode change message. This will be set to true when a deferred backing store
1709         update is pending.
1710         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
1711         DidUpdateBackingStoreState message instead of a compositing mode change message.
1712         (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
1713         we've already been told about this state ID (as can happen when the UI process decides it
1714         needs an immediate update to a state that it previously requested a deferred update to),
1715         don't bother updating the page's size, etc. In addition, if we've already sent a
1716         DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
1717         Moved code to send the DidUpdateBackingStoreState message from here...
1718         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
1719         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
1720         even if painting is suspended or we're in the process of updating the backing store state.
1721         It causes no harm and simplifies the code. If a deferred update is pending, send a
1722         DidUpdateBackingStoreState message instead of a compositing mode change message. Also
1723         removed a redundant if.
1724         (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
1725         backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
1726         messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
1727         of an Update message.
1728
1729         * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
1730         class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
1731
1732 2011-03-03  Andy Estes  <aestes@apple.com>
1733
1734         Reviewed by Darin Adler.
1735
1736         When displaying the missing plug-in sheet, pass the 'pluginspage'
1737         attribute to the UI process.
1738         https://bugs.webkit.org/show_bug.cgi?id=55553
1739
1740         * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
1741         missingPluginButtonClicked.
1742         * UIProcess/WebPageProxy.cpp:
1743         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
1744         * UIProcess/WebPageProxy.h: Ditto.
1745         * UIProcess/WebPageProxy.messages.in: Ditto.
1746         * UIProcess/WebUIClient.cpp:
1747         (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
1748         * UIProcess/WebUIClient.h: Ditto.
1749         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1750         (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
1751         pluginspageAttr.
1752
1753 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
1754
1755         Suggested by Dan Bernstein.
1756
1757         Move "const" around "NSString *", so that it suddenly begins to make sense.
1758
1759         * WebProcess/mac/FullKeyboardAccessWatcher.mm:
1760
1761 2011-03-03  Jeff Miller  <jeffm@apple.com>
1762
1763         Reviewed by Anders Carlsson.
1764
1765         WebKit2: Add WKViewRef API for executing edit commands
1766         https://bugs.webkit.org/show_bug.cgi?id=49829
1767
1768         Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
1769
1770         * UIProcess/API/C/win/WKView.cpp:
1771         (WKViewExecuteCommand): Added.
1772         * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
1773
1774 2011-03-03  Jessie Berlin  <jberlin@apple.com>
1775
1776         Reviewed by Adam Roben.
1777
1778         WebKit2: Use CFNetwork Sessions API.
1779         https://bugs.webkit.org/show_bug.cgi?id=55435
1780
1781         Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
1782
1783         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1784         (InitWebCoreSystemInterface):
1785         Support using WKCopyRequestWithStorageSession in WebCore.
1786
1787 2011-03-03  Adam Roben  <aroben@apple.com>
1788
1789         Don't try to paint outside the page's bounds
1790
1791         When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
1792         size, even though we only needed to paint at the new, smaller size.
1793
1794         The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
1795         test if this fix gets broken in the future.
1796
1797         Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
1798         the page is resized smaller
1799
1800         Reviewed by Anders Carlsson.
1801
1802         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1803         (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
1804         is suspended (but still refrain from updating it when in accelerated compositing mode).
1805         Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
1806         region with the page's new bounds. This prevents us from accumulating a dirty region that is
1807         larger than the page in the case where the page is being resized smaller.
1808         (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
1809         outside of the page's bounds.
1810
1811 2011-03-03  Maciej Stachowiak  <mjs@apple.com>
1812
1813         Reviewed by Brady Eidson.
1814
1815         WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
1816         https://bugs.webkit.org/show_bug.cgi?id=55701
1817         <rdar://problem/9074017>
1818
1819         * Shared/WebProcessCreationParameters.cpp:
1820         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
1821         flag parameters to false.
1822         (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
1823         (WebKit::WebProcessCreationParameters::decode): And deserialize.
1824
1825 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
1826
1827         Reviewed by Darin Adler.
1828
1829         REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
1830         https://bugs.webkit.org/show_bug.cgi?id=55633
1831         <rdar://problem/8963023>
1832
1833         * WebKit2.xcodeproj/project.pbxproj:
1834         * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
1835         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
1836         (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
1837         (-[FullKeyboardAccessWatcher init]):
1838         (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
1839         Get the current state of full keyboard access, listening for change notifications.
1840
1841         * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
1842
1843         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
1844         WebKit1 also doesn't implement this on platforms other than Mac.
1845
1846         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
1847         Just ask FullKeyboardAccessWatcher.
1848
1849         * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
1850         * WebProcess/WebCoreSupport/WebChromeClient.h:
1851         Added keyboardUIMode(), removed tabsToLinks().
1852
1853         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
1854         * WebProcess/WebPage/WebPage.h:
1855         Generate keyboard UI mode from tabToLinks preference and current state of FKA.
1856
1857 2011-03-03  Sam Weinig  <sam@webkit.org>
1858
1859         Reviewed by Anders Carlsson.
1860
1861         Give the Bundle's policy client the option of deciding the policy
1862         https://bugs.webkit.org/show_bug.cgi?id=55699
1863
1864         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1865         Add WKBundlePagePolicyAction enum and make it the return value of
1866         the WKBundlePagePolicyClient functions.
1867
1868         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1869         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
1870         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
1871         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
1872         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
1873         Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
1874
1875         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1876         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
1877         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
1878         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1879         Call the policy function early if the bundle handles it.
1880
1881 2011-03-02  Brian Weinstein  <bweinstein@apple.com>
1882
1883         Reviewed by Adam Roben.
1884
1885         Rest of WebKit2: Need a way to send notifications to client when cookies change
1886         https://bugs.webkit.org/show_bug.cgi?id=55427
1887         <rdar://problem/9056027>
1888         
1889         This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
1890         listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
1891         when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
1892         change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
1893
1894         * UIProcess/API/C/WKCookieManager.cpp:
1895         (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
1896         (WKCookieManagerStartObservingCookieChanges): Ditto.
1897         (WKCookieManagerStopObservingCookieChanges): Ditto.
1898
1899         * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
1900             which is responsible for cookiesDidChange.
1901
1902         * UIProcess/WebCookieManagerProxy.cpp:
1903         (WebKit::WebCookieManagerProxy::initializeClient):
1904         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
1905         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
1906         (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
1907             modified.
1908         * UIProcess/WebCookieManagerProxy.h:
1909         * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
1910
1911         * UIProcess/WebCookieManagerProxyClient.cpp: Added.
1912         (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
1913             cookies changed.
1914         * UIProcess/WebCookieManagerProxyClient.h: Added.
1915     
1916         * WebProcess/Cookies/WebCookieManager.cpp:
1917         (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
1918             (on platforms that support it).
1919         (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
1920         (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
1921         * WebProcess/Cookies/WebCookieManager.h:
1922         * WebProcess/Cookies/WebCookieManager.messages.in:
1923         
1924         Add new files.
1925         * WebKit2.pro:
1926         * WebKit2.xcodeproj/project.pbxproj:
1927         * GNUmakefile.am:
1928         * win/WebKit2.vcproj:
1929
1930 2011-03-03  Anders Carlsson  <andersca@apple.com>
1931
1932         Reviewed by Darin Adler.
1933
1934         Remove CanRunBeforeUnloadConfirmPanel sync message
1935         https://bugs.webkit.org/show_bug.cgi?id=55689
1936
1937         * Shared/WebPageCreationParameters.cpp:
1938         (WebKit::WebPageCreationParameters::encode):
1939         (WebKit::WebPageCreationParameters::decode):
1940         Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
1941         being encoded/decoded.
1942
1943         * Shared/WebPageCreationParameters.h:
1944         Add canRunBeforeUnloadConfirmPanel.
1945
1946         * UIProcess/WebPageProxy.cpp:
1947         (WebKit::WebPageProxy::initializeUIClient):
1948         Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
1949
1950         (WebKit::WebPageProxy::creationParameters):
1951         Initialize parameters.canRunBeforeUnloadConfirmPanel.
1952
1953         * UIProcess/WebPageProxy.messages.in:
1954         Remove CanRunBeforeUnloadConfirmPanel message.
1955
1956         * UIProcess/WebUIClient.cpp:
1957         (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
1958         * UIProcess/WebUIClient.h:
1959         Make canRunBeforeUnloadConfirmPanel const.
1960
1961         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1962         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
1963         Ask the web page instead of sending a synchronous message.
1964
1965         * WebProcess/WebPage/WebPage.cpp:
1966         (WebKit::WebPage::WebPage):
1967         Initialize m_canRunBeforeUnloadConfirmPanel.
1968
1969         * WebProcess/WebPage/WebPage.h:
1970         (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
1971         (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
1972         Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
1973
1974         (WebKit::WebPage::setCanRunModal):
1975         Add setter for m_canRunModal.
1976
1977         * WebProcess/WebPage/WebPage.messages.in:
1978         Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
1979
1980 2011-03-03  Adam Roben  <aroben@apple.com>
1981
1982         Create the CFBundleRef for WebKit.dll on Windows if needed
1983
1984         WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
1985         out or crash on Windows 7 Release (WebKit2 Tests)
1986
1987         Reviewed by Darin Adler.
1988
1989         * Shared/win/WebKitBundle.cpp: Added.
1990         (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
1991         and returns a new bundle.
1992         (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
1993
1994         * Shared/win/WebKitBundle.h: Added.
1995
1996         * UIProcess/win/WebInspectorProxyWin.cpp:
1997         (WebKit::WebInspectorProxy::inspectorPageURL):
1998         * WebProcess/WebPage/win/WebInspectorWin.cpp:
1999         (WebKit::WebInspector::localizedStringsURL):
2000         Changed to use webKitBundle() to ensure that the bundle has been created.
2001
2002         * win/WebKit2.vcproj: Added new files.
2003
2004 2011-03-03  Peter Kasting  <pkasting@google.com>
2005
2006         Reviewed by James Robinson.
2007
2008         Drop redundant "Windows; " from the Windows-specific User Agent string.
2009         https://bugs.webkit.org/show_bug.cgi?id=54567
2010
2011         * UIProcess/win/WebPageProxyWin.cpp:
2012         (WebKit::WebPageProxy::standardUserAgent):
2013
2014 2011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2015
2016         Unreviewed, rolling out r80188.
2017         http://trac.webkit.org/changeset/80188
2018         https://bugs.webkit.org/show_bug.cgi?id=55647
2019
2020         Broke the WebKit API tests. (Requested by xenon on #webkit).
2021
2022         * UIProcess/API/C/WKPage.cpp:
2023         (WKPageRunJavaScriptInMainFrame):
2024         (callRunJavaScriptBlockAndRelease):
2025         * UIProcess/API/C/WKPage.h:
2026         * UIProcess/WebPageProxy.cpp:
2027         (WebKit::WebPageProxy::close):
2028         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
2029         (WebKit::WebPageProxy::processDidCrash):
2030         * UIProcess/WebPageProxy.h:
2031         * UIProcess/WebPageProxy.messages.in:
2032         * WebProcess/WebPage/WebPage.cpp:
2033         (WebKit::WebPage::runJavaScriptInMainFrame):
2034
2035 2011-03-02  Jeff Miller  <jeffm@apple.com>
2036
2037         Reviewed by Darin Adler.
2038
2039         Rename WebKit::WebPage::validateMenuItem() to validateCommand()
2040         https://bugs.webkit.org/show_bug.cgi?id=55636
2041         
2042         Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
2043
2044         * UIProcess/API/mac/WKView.mm:
2045         (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
2046         * UIProcess/WebPageProxy.cpp:
2047         (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
2048         (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
2049         * UIProcess/WebPageProxy.h:
2050         * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
2051         * WebProcess/WebPage/WebPage.cpp:
2052         (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
2053         * WebProcess/WebPage/WebPage.h:
2054         * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
2055
2056 2011-03-02  Anders Carlsson  <andersca@apple.com>
2057
2058         Reviewed by Sam Weinig.
2059
2060         WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
2061         https://bugs.webkit.org/show_bug.cgi?id=55635
2062
2063         * Shared/WebPageCreationParameters.cpp:
2064         (WebKit::WebPageCreationParameters::encode):
2065         (WebKit::WebPageCreationParameters::decode):
2066         Encode and decode areMemoryCacheClientCallsEnabled.
2067
2068         * Shared/WebPageCreationParameters.h:
2069         Add areMemoryCacheClientCallsEnabled member variable.
2070
2071         * UIProcess/WebPageProxy.cpp:
2072         (WebKit::WebPageProxy::WebPageProxy):
2073         Initialize m_areMemoryCacheClientCallsEnabled.
2074
2075         (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
2076         Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
2077
2078         (WebKit::WebPageProxy::creationParameters):
2079         Set areMemoryCacheClientCallsEnabled.
2080
2081         * WebProcess/WebPage/WebPage.cpp:
2082         (WebKit::WebPage::WebPage):
2083         Call WebPage::setMemoryCacheMessagesEnabled.
2084
2085 2011-03-02  Timothy Hatcher  <timothy@apple.com>
2086
2087         Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
2088
2089         https://webkit.org/b/55623
2090
2091         Reviewed by Darin Adler.
2092
2093         * UIProcess/API/C/WKPage.cpp:
2094         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
2095         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
2096         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
2097         * UIProcess/WebPageProxy.cpp:
2098         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
2099         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
2100         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
2101         from the DataReference before calling the callback.
2102         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
2103         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
2104         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
2105         * WebProcess/WebPage/WebPage.cpp:
2106         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
2107         And use ScriptValueCallback to send the message back.
2108
2109 2011-03-02  Jessie Berlin  <jberlin@apple.com>
2110
2111         Reviewed by Adam Roben.
2112
2113         WebKit2: Use CFNetwork Sessions API.
2114         https://bugs.webkit.org/show_bug.cgi?id=55435
2115
2116         Add the ability to create a Private Browsing Storage Session.
2117
2118         * Shared/WebProcessCreationParameters.cpp:
2119         (WebKit::WebProcessCreationParameters::encode):
2120         Encode the UI Process bundle identifier.
2121         (WebKit::WebProcessCreationParameters::decode):
2122         Decode the UI Process bundle identifier.
2123         * Shared/WebProcessCreationParameters.h:
2124
2125         * UIProcess/mac/WebContextMac.mm:
2126         (WebKit::WebContext::platformInitializeWebProcess):
2127         Grab the bundle identifier and use it to set the WebProcessCreationParameter.
2128         * UIProcess/win/WebContextWin.cpp:
2129         (WebKit::WebContext::platformInitializeWebProcess):
2130         Ditto.
2131
2132         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2133         (InitWebCoreSystemInterface):
2134         Support using the wkCreatePrivateStorageSession WKSI in WebCore.
2135
2136         * WebProcess/WebProcess.cpp:
2137         (WebKit::WebProcess::initializeWebProcess):
2138         Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
2139         from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
2140         same identifier as WebKit2.
2141
2142 2011-03-01  Brian Weinstein  <bweinstein@apple.com>
2143
2144         Reviewed by Adam Roben.
2145
2146         Part of WebKit2: Need a way to send notifications to client when cookies change
2147         https://bugs.webkit.org/show_bug.cgi?id=55427
2148         <rdar://problem/9056027>
2149
2150         * WebProcess/Cookies/WebCookieManager.cpp:
2151         (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
2152             message to the UI process.
2153
2154         * WebProcess/Cookies/WebCookieManager.h:
2155         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2156         (WebKit::WebPlatformStrategies::createCookiesStrategy):
2157         (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
2158         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2159
2160 2011-03-02  Andras Becsi  <abecsi@webkit.org>
2161
2162         Reviewed by Laszlo Gombos.
2163
2164         [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
2165         https://bugs.webkit.org/show_bug.cgi?id=55478
2166
2167         On case insensitive systems the generated forwarding headers cause build problems.
2168
2169         * Scripts/generate-forwarding-headers.pl: The generated header should
2170         also contain the framework name.
2171
2172 2011-03-01  Jeff Miller  <jeffm@apple.com>
2173
2174         Reviewed by Darin Adler.
2175
2176         Expose some selection state fields in WKPage
2177         https://bugs.webkit.org/show_bug.cgi?id=55541
2178         
2179         Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
2180         Edit menu items properly on Windows when using WebKit2.
2181
2182         * UIProcess/API/C/WKPage.cpp:
2183         (WKPageCanDelete): Added.
2184         (WKPageHasSelectedRange): Added.
2185         (WKPageIsContentEditable): Added.
2186         * UIProcess/API/C/WKPage.h: Added new functions.
2187         * UIProcess/WebPageProxy.h:
2188         (WebKit::WebPageProxy::canDelete): Added.
2189         (WebKit::WebPageProxy::hasSelectedRange): Added.
2190         (WebKit::WebPageProxy::isContentEditable): Added.
2191
2192 2011-03-01  Mark Rowe  <mrowe@apple.com>
2193
2194         Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
2195
2196         * Configurations/Base.xcconfig:
2197
2198 2011-03-01  Mark Rowe  <mrowe@apple.com>
2199
2200         Reviewed by Sam Weinig.
2201
2202         Add verification scripts to WebKit2 project and fix the issues they reveal.
2203
2204         * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
2205         library functions from being exported as weak externals.
2206         * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
2207         * Shared/WebContextMenuItem.cpp:
2208         (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
2209         * UIProcess/WebPageGroup.cpp:
2210         (WebKit::webPageGroupMap): Ditto.
2211         * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
2212         Run verification scripts at the appropriate times.
2213         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2214         (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
2215         (WebKit::WebEditorClient::respondToChangedContents): Ditto.
2216         (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
2217         (WebKit::WebEditorClient::didEndEditing): Ditto.
2218         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2219         (WebKit::idToHistoryItemMap): Ditto.
2220         (WebKit::historyItemToIDMap): Ditto.
2221
2222 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
2223
2224         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
2225
2226         * UIProcess/API/qt/qwkpage.cpp:
2227         (QWKPage::viewportAttributesForSize):
2228
2229 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
2230
2231         Unreviewed, missed updating a call to WebCore::computeViewportAttributes
2232         who's prototype changed.
2233
2234         Viewport Warning/Error Messages Are Now Inaccurate
2235         https://bugs.webkit.org/show_bug.cgi?id=53707
2236
2237         * UIProcess/API/qt/qwkpage.cpp:
2238         (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
2239
2240 2011-03-01  Anders Carlsson  <andersca@apple.com>
2241
2242         Reviewed by Sam Weinig.
2243
2244         WKPluginSiteDataManagerClearAllSiteData is not working
2245         https://bugs.webkit.org/show_bug.cgi?id=55528
2246         <rdar://problem/9071823>
2247
2248         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2249         (WebKit::NetscapePluginModule::tryGetSitesWithData):
2250         Remove version checks, checking that the function pointer is not null is enough.
2251
2252         (WebKit::NetscapePluginModule::tryClearSiteData):
2253         Remove version checks, checking that the function pointer is not null is enough.
2254         Also, correctly convert a null String to a null CString.
2255
2256 2011-03-01  Adam Roben  <aroben@apple.com>
2257
2258         Incorporate a review comment I missed in r80051
2259
2260         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
2261
2262 2011-03-01  Adam Roben  <aroben@apple.com>
2263
2264         Make the PLUGIN_ARCHITECTURE() macro work with MSVC
2265
2266         Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
2267         plugins tests crashing in NetscapePlugin::initialize on Windows
2268
2269         Reviewed by Anders Carlsson.
2270
2271         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
2272         PLUGIN_ARCHITECTURE() is defined for some platform.
2273
2274         * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
2275         macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
2276         replaced the nonsense OS(WIN) with OS(WINDOWS).
2277
2278         * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
2279
2280 2011-03-01  Sam Weinig  <sam@webkit.org>
2281
2282         Reviewed by Timothy Hatcher.
2283
2284         WebKit2 needs to be made localizable
2285         https://bugs.webkit.org/show_bug.cgi?id=55483
2286
2287         * PluginProcess/mac/PluginProcessMainMac.mm:
2288         * WebProcess/mac/WebProcessMainMac.mm:
2289         Set the default localization from the passed in parameter.
2290
2291         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2292         Add the preferred localization as a parameter when launching processes
2293         so that they can set their localization to match the launching app.
2294
2295         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2296         Use WebCore's localizedString function on the mac, to actually localize
2297         these strings.
2298
2299         (WebKit::WebPlatformStrategies::imageTitle):
2300         Switch to using replace, instead of concatenation, to give localizers a chance
2301         to rearrange the wording.
2302
2303 2011-03-01  Balazs Kelemen  <kbalazs@webkit.org>
2304
2305         Reviewed by Anders Carlsson.
2306
2307         [Qt][WK2] Plugin initialization
2308         https://bugs.webkit.org/show_bug.cgi?id=48127
2309
2310         Apply the quirks that are necessary for the flash plugin
2311         to not crash on X11.
2312
2313         * Platform/qt/ModuleQt.cpp:
2314         (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
2315         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2316         (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
2317         if PLUGIN_ARCHITECTURE is X11.
2318         * Shared/Plugins/Netscape/NetscapePluginModule.h:
2319         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
2320         (WebKit::initializeGTK):  The same hack that we do in WebCore.
2321         Call gtk_init because flash don't do it for itself.
2322         (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
2323         Do the hacks that we need to do before calling NP_Initialize on the
2324         flash plugin to save it form crashing.
2325         * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
2326         Added RequiresGTKToolKit quirk for X11.
2327         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2328         (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
2329         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2330         (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
2331         quirks to be available in NPN_GetValue.
2332
2333 2011-03-01  Adam Roben  <aroben@apple.com>
2334
2335         Convert seconds to milliseconds before calling ::SetTimer
2336
2337         Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
2338         early on Windows
2339
2340         Reviewed by Anders Carlsson.
2341
2342         * Platform/win/RunLoopWin.cpp:
2343         (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
2344         ::SetTimer expects.
2345
2346 2011-03-01  Andras Becsi  <abecsi@webkit.org>
2347
2348         Reviewed by Csaba Osztrogonác.
2349
2350         [Qt] Clean up the project files and move common options to WebKit.pri.
2351
2352         * WebKit2.pro: Deduplicate options.
2353
2354 2011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>
2355
2356         Reviewed by Andreas Kling.
2357
2358         [Qt] WebKit2 needs to support font size changing and getting default font size
2359         https://bugs.webkit.org/show_bug.cgi?id=53671
2360
2361         Added new enum for font size type and added methods to set and get default font sizes.
2362
2363         * UIProcess/API/qt/qwkpreferences.cpp:
2364         (QWKPreferences::setFontSize): Added.
2365         (QWKPreferences::fontSize): Added.
2366         * UIProcess/API/qt/qwkpreferences.h:
2367
2368 2011-02-28  Alice Liu  <alice.liu@apple.com>
2369
2370         Reviewed by Adam Roben and Gavin Barraclough.
2371
2372         https://bugs.webkit.org/show_bug.cgi?id=54898
2373         InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
2374
2375         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
2376         (WKBundleHitTestResultCopyNodeHandle): 
2377         Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
2378         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
2379         Renamed from "get" to "copy", because it leaksRef.
2380
2381 2011-02-28  Alice Liu  <alice.liu@apple.com>
2382
2383         Reviewed by Gavin Barraclough.
2384
2385         https://bugs.webkit.org/show_bug.cgi?id=55442
2386         Webarchives don't contain subframe content
2387
2388         * WebProcess/WebPage/WebPage.cpp:
2389         (WebKit::WebPage::getWebArchiveOfFrame):
2390         Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
2391
2392 2011-02-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
2393
2394         Reviewed by Kenneth Rohde Christiansen.
2395
2396         [Qt][WK2] Add a way to test the WebKit 2 APIs
2397         https://bugs.webkit.org/show_bug.cgi?id=55408
2398
2399         Add an initial test for the WebKit 2 APIs of Qt.
2400
2401         * UIProcess/API/qt/tests/html/basic_page.html: Added.
2402         * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
2403         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
2404         (View::View):
2405         (View::resizeEvent):
2406         (tst_QGraphicsWKView::init):
2407         (tst_QGraphicsWKView::cleanup):
2408         (tst_QGraphicsWKView::loadEmptyPage):
2409         * UIProcess/API/qt/tests/tests.pri: Added.
2410         * UIProcess/API/qt/tests/tests.pro: Added.
2411         * UIProcess/API/qt/tests/util.h: Added.
2412         (waitForSignal):
2413
2414 2011-02-28  Anders Carlsson  <andersca@apple.com>
2415
2416         Fix clang build.
2417
2418         * UIProcess/API/mac/FindIndicatorWindow.mm:
2419         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2420         (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
2421         (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
2422         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
2423         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2424         (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
2425         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
2426         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2427
2428 2011-02-28  Dan Bernstein  <mitz@apple.com>
2429
2430         Rubber-stamped by Anders Carlsson.
2431
2432         Do not copy config.h into WebKit2.
2433
2434         * WebKit2.xcodeproj/project.pbxproj:
2435
2436 2011-02-28  Dan Bernstein  <mitz@apple.com>
2437
2438         LLVM Compiler build fix.
2439
2440         * Scripts/webkit2/messages.py:
2441         * UIProcess/WebPageProxy.h:
2442
2443 2011-02-28  Anders Carlsson  <andersca@apple.com>
2444
2445         Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
2446
2447         Open PDF in Preview doesn't work
2448         https://bugs.webkit.org/show_bug.cgi?id=55400
2449         <rdar://problem/8750353>
2450
2451         * UIProcess/API/mac/PDFViewController.mm:
2452         (-[WKPDFView initWithFrame:PDFViewController:]):
2453         Set the WKPDFView as the delegate of itself.
2454
2455         (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
2456         Call PDFViewController::openPDFInFinder.
2457
2458         (WebKit::PDFViewController::PDFViewController):
2459         Initialize m_hasWrittenPDFToDisk to false.
2460
2461         (WebKit::PDFViewController::openPDFInFinder):
2462         Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
2463         
2464         (WebKit::temporaryPDFDirectoryPath):
2465         Create a directory to put PDFs in.
2466
2467         (WebKit::PDFViewController::pathToPDFOnDisk):
2468         Return a path to a (non-existent) file in the temporary PDF directory.
2469
2470 2011-02-28  Alexey Proskuryakov  <ap@apple.com>
2471
2472         Reviewed by Dan Bernstein.
2473
2474         Frequent crashes in CFURLCache code on Snow Leopard
2475         https://bugs.webkit.org/show_bug.cgi?id=55412
2476         <rdar://problem/9063922>
2477
2478         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
2479         creates a string with maximum possible buffer size. A path with garbage at the end confused
2480         CFURLCache into corrupting its data structures.
2481
2482         * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
2483         This problem wouldn't have occured if we didn't use CString in the first place.
2484
2485         * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
2486         Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
2487         have liked trailing slash).
2488
2489         * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
2490         Made slash removal conditional for robustness.
2491
2492         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
2493         Use actual string length, not CString::length().
2494
2495 2011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
2496
2497         Reviewed by Anders Carlsson.
2498
2499         [Qt][WK2] Plugin initialization
2500         https://bugs.webkit.org/show_bug.cgi?id=48127
2501
2502         Specialize the way of initializing the plugin for X11.
2503         Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
2504         across platforms.
2505
2506         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
2507         (WebKit::NetscapePluginModule::tryLoad):
2508         * config.h:
2509
2510 2011-02-28  Sam Weinig  <sam@webkit.org>
2511
2512         Reviewed by Brady Eidson.
2513
2514         WK2 Context Menus - Implement LookUpInDictionary
2515         https://bugs.webkit.org/show_bug.cgi?id=55405
2516
2517         * Shared/DictionaryPopupInfo.cpp:
2518         (WebKit::DictionaryPopupInfo::encode):
2519         (WebKit::DictionaryPopupInfo::decode):
2520         * Shared/DictionaryPopupInfo.h:
2521         Add type to differentiate between HotKey and ContextMenu triggered
2522         dictionary popups. This is necessary since HotKey triggered ones want
2523         to override the style to always be overlay.
2524
2525         * UIProcess/API/mac/PageClientImpl.mm:
2526         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2527         Only force the overlay style for HotKey triggered dictionary lookups.
2528
2529         * WebProcess/WebPage/WebPage.h:
2530         * WebProcess/WebPage/mac/WebPageMac.mm:
2531         (WebKit::WebPage::performDictionaryLookupAtLocation):
2532         (WebKit::WebPage::performDictionaryLookupForRange):
2533         Factor out shared functionality into performDictionaryLookupForRange.
2534
2535         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2536         (WebKit::WebContextMenuClient::lookUpInDictionary):
2537         Get selected range and call newly factored out performDictionaryLookupForRange.
2538
2539 2011-02-28  Anders Carlsson  <andersca@apple.com>
2540
2541         Reviewed by Dan Bernstein.
2542
2543         PDFViewController should hold a reference to the PDF data
2544         https://bugs.webkit.org/show_bug.cgi?id=55394
2545
2546         * UIProcess/API/mac/PDFViewController.h:
2547         * UIProcess/API/mac/PDFViewController.mm:
2548         (WebKit::PDFViewController::setPDFDocumentData):
2549
2550 2011-02-28  Sam Weinig  <sam@webkit.org>
2551
2552         Reviewed by Darin Adler.
2553
2554         Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
2555         https://bugs.webkit.org/show_bug.cgi?id=48234
2556
2557         * Shared/TextInfo.cpp: Removed.
2558         * Shared/TextInfo.h: Removed.
2559         Replace this with the more appropriately DictionaryPopupInfo.
2560
2561         * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
2562         (WebKit::DictionaryPopupInfo::encode):
2563         (WebKit::DictionaryPopupInfo::decode):
2564         * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
2565         (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
2566         Replace individual font related fields with FontInfo.
2567
2568         * Shared/FontInfo.cpp: Added.
2569         (WebKit::FontInfo::FontInfo):
2570         (WebKit::FontInfo::encode):
2571         (WebKit::FontInfo::decode):
2572         * Shared/FontInfo.h: Added.
2573         Add class to encapsulate passing a font description over the wire.
2574
2575         * Shared/PlatformPopupMenuData.cpp:
2576         (WebKit::PlatformPopupMenuData::encode):
2577         (WebKit::PlatformPopupMenuData::decode):
2578         * Shared/PlatformPopupMenuData.h:
2579         Add FontInfo as extra data for the Mac.
2580
2581         * UIProcess/API/mac/PageClientImpl.h:
2582         * UIProcess/API/mac/PageClientImpl.mm:
2583         (WebKit::PageClientImpl::didPerformDictionaryLookup):
2584         * UIProcess/PageClient.h:
2585         Add scaleFactor and use it to construct a font at the right size.
2586
2587         * UIProcess/WebPageProxy.cpp:
2588         (WebKit::WebPageProxy::showPopupMenu):
2589         (WebKit::WebPageProxy::didPerformDictionaryLookup):
2590         * UIProcess/WebPageProxy.h:
2591         * UIProcess/WebPageProxy.messages.in:
2592         * UIProcess/WebPopupMenuProxy.h:
2593         * UIProcess/mac/WebPopupMenuProxyMac.h:
2594         (WebKit::WebPopupMenuProxyMac::create):
2595         * UIProcess/mac/WebPopupMenuProxyMac.mm:
2596         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
2597         (WebKit::WebPopupMenuProxyMac::populate):
2598         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
2599         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
2600         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
2601         * UIProcess/qt/WebPopupMenuProxyQt.h:
2602         * UIProcess/win/WebPopupMenuProxyWin.cpp:
2603         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
2604         * UIProcess/win/WebPopupMenuProxyWin.h:
2605         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
2606         (WebKit::WebPopupMenu::setUpPlatformData):
2607         * WebProcess/WebPage/mac/WebPageMac.mm:
2608         (WebKit::WebPage::performDictionaryLookupAtLocation):
2609         Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
2610
2611         * WebKit2.pro:
2612         * WebKit2.xcodeproj/project.pbxproj:
2613         * win/WebKit2.vcproj:
2614         Add new files.
2615
2616 2011-02-28  Adam Roben  <aroben@apple.com>
2617
2618         One more rename as a followup to r79868
2619
2620         Rubber-stamped by Anders Carlsson.
2621
2622         * UIProcess/DrawingAreaProxyImpl.cpp:
2623         * UIProcess/DrawingAreaProxyImpl.h:
2624         Rename stateDidChange to backingStoreStateDidChange.
2625
2626 2011-02-28  Adam Roben  <aroben@apple.com>
2627
2628         Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
2629
2630         Rubber-stamped (and suggested) by Anders Carlsson.
2631
2632         * UIProcess/DrawingAreaProxy.h:
2633         * UIProcess/DrawingAreaProxy.messages.in:
2634         * UIProcess/DrawingAreaProxyImpl.cpp:
2635         * UIProcess/DrawingAreaProxyImpl.h:
2636         * WebProcess/WebPage/DrawingArea.h:
2637         * WebProcess/WebPage/DrawingArea.messages.in:
2638         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2639         * WebProcess/WebPage/DrawingAreaImpl.h:
2640         Perform the rename.
2641
2642 2011-02-28  Adam Roben  <aroben@apple.com>
2643
2644         Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
2645
2646         The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
2647         DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
2648         store. (Currently, this is just when the size changes.) This function will sometimes (but
2649         not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
2650         to the web process. This means it's now possible for the state IDs sent in consecutive
2651         UpdateState messages to increase by more than one, but that's OK.
2652
2653         This should cause no change in behavior.
2654
2655         Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
2656         its state changes, not just when we send an UpdateState message
2657
2658         Reviewed by Anders Carlsson.
2659
2660         * UIProcess/DrawingAreaProxyImpl.cpp:
2661         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
2662         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
2663         (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
2664         sendUpdateState whenever our state has changed for any reason since the last UpdateState
2665         message was sent.
2666         (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
2667         through to sendUpdateState.
2668         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
2669         the state ID we send to the web process from here to stateDidChange, and added an assertion.
2670
2671         * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
2672         the comment explaining its meaning.
2673
2674 2011-02-28  Adam Roben  <aroben@apple.com>
2675
2676         Pass the right dirty rect to Plugin::paint
2677
2678         A typo in r79040 broke this. Much of this patch is just support for testing the fix.
2679
2680         Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
2681         Large portions of pages with plugins paint black
2682
2683         Reviewed by Anders Carlsson.
2684
2685         * WebProcess/Plugins/PluginView.cpp:
2686         (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
2687         rather than just passing along the dirty rect that was passed into this function. This is
2688         the bug fix.
2689
2690         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
2691         (WKBundlePageForceRepaint):
2692         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2693         Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
2694
2695         * WebProcess/WebPage/WebPage.cpp:
2696         (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
2697         (WebKit::WebPage::forceRepaint): ...from here.
2698
2699         * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
2700
2701 2011-02-27  Sam Weinig  <sam@webkit.org>
2702
2703         Reviewed by Dan Bernstein.
2704
2705         Force dictionary popup to use overlay type
2706         <rdar://problem/9052483>
2707         https://bugs.webkit.org/show_bug.cgi?id=55337
2708
2709         * UIProcess/API/mac/PageClientImpl.mm:
2710         (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
2711         used for the hot key version of the dictionary popup, force the overlay
2712         style.
2713
2714 2011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
2715
2716         Reviewed by Kenneth Rohde Christiansen.
2717
2718         [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
2719         https://bugs.webkit.org/show_bug.cgi?id=55330
2720
2721         Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
2722         on its use.
2723
2724         * UIProcess/API/qt/qgraphicswkview.cpp:
2725         * UIProcess/API/qt/qgraphicswkview.h:
2726
2727 2011-02-27  Alejandro G. Castro  <alex@igalia.com>
2728
2729         Unreviewed, fixed GTK compilation after r79806.
2730
2731         * UIProcess/gtk/WebView.cpp:
2732         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
2733         * UIProcess/gtk/WebView.h:
2734
2735 2011-02-26  Anders Carlsson  <andersca@apple.com>
2736
2737         Reviewed by Dan Bernstein.
2738
2739         Asynchronous response to FramePolicyListener is not finishing the load
2740         https://bugs.webkit.org/show_bug.cgi?id=55305
2741         <rdar://problem/9044356>
2742
2743         Always initialize the receivedPolicyAction reply parameter.
2744
2745         * UIProcess/WebPageProxy.cpp:
2746         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
2747         (WebKit::WebPageProxy::decidePolicyForMIMEType):
2748
2749 2011-02-26  Anders Carlsson  <andersca@apple.com>
2750
2751         Reviewed by Sam Weinig.
2752
2753         DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
2754         https://bugs.webkit.org/show_bug.cgi?id=55304
2755
2756         * UIProcess/API/mac/PDFViewController.h:
2757         * UIProcess/API/mac/PDFViewController.mm:
2758         (WebKit::PDFViewController::setPDFDocumentData):
2759         * UIProcess/API/mac/PageClientImpl.h:
2760         * UIProcess/API/mac/PageClientImpl.mm:
2761         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
2762         * UIProcess/API/mac/WKView.mm:
2763         (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
2764         * UIProcess/API/mac/WKViewInternal.h:
2765         * UIProcess/API/qt/qwkpage.cpp:
2766         (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
2767         * UIProcess/API/qt/qwkpage_p.h:
2768         * UIProcess/PageClient.h:
2769         * UIProcess/WebPageProxy.cpp:
2770         (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
2771         * UIProcess/WebPageProxy.h:
2772         * UIProcess/WebPageProxy.messages.in:
2773         * UIProcess/win/WebView.cpp:
2774         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
2775         * UIProcess/win/WebView.h:
2776         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2777         (WebKit::WebFrameLoaderClient::finishedLoading):
2778
2779 2011-02-26  Anders Carlsson  <andersca@apple.com>
2780
2781         Reviewed by Oliver Hunt.
2782
2783         DrawingArea should not be reference counted
2784         https://bugs.webkit.org/show_bug.cgi?id=55284
2785
2786         * Shared/DrawingAreaInfo.h:
2787         * Shared/WebPageCreationParameters.cpp:
2788         (WebKit::WebPageCreationParameters::encode):
2789         (WebKit::WebPageCreationParameters::decode):
2790         * Shared/WebPageCreationParameters.h:
2791         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
2792         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
2793         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
2794         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
2795         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
2796         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
2797         * UIProcess/DrawingAreaProxy.cpp:
2798         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2799         * UIProcess/DrawingAreaProxy.h:
2800         (WebKit::DrawingAreaProxy::type):
2801         * UIProcess/DrawingAreaProxyImpl.cpp:
2802         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
2803         * UIProcess/DrawingAreaProxyImpl.h:
2804         * UIProcess/TiledDrawingAreaProxy.cpp:
2805         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
2806         * UIProcess/TiledDrawingAreaProxy.h:
2807         * UIProcess/WebPageProxy.cpp:
2808         (WebKit::WebPageProxy::didReceiveSyncMessage):
2809         (WebKit::WebPageProxy::creationParameters):
2810         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2811         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
2812         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
2813         (WebKit::ChunkedUpdateDrawingArea::display):
2814         (WebKit::ChunkedUpdateDrawingArea::setSize):
2815         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
2816         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
2817         * WebProcess/WebPage/DrawingArea.cpp:
2818         (WebKit::DrawingArea::create):
2819         (WebKit::DrawingArea::DrawingArea):
2820         * WebProcess/WebPage/DrawingArea.h:
2821         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2822         (WebKit::DrawingAreaImpl::create):
2823         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2824         * WebProcess/WebPage/DrawingAreaImpl.h:
2825         * WebProcess/WebPage/TiledDrawingArea.cpp:
2826         (WebKit::TiledDrawingArea::TiledDrawingArea):
2827         * WebProcess/WebPage/TiledDrawingArea.h:
2828         * WebProcess/WebPage/WebPage.cpp:
2829         (WebKit::WebPage::drawRect):
2830         * WebProcess/WebPage/WebPage.h:
2831
2832 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
2833
2834         Reviewed by Pavel Feldman.
2835
2836         DumpRenderTree should reset frame opener between tests.
2837         https://bugs.webkit.org/show_bug.cgi?id=54874
2838
2839         Added clearOpener method to WKBundleWebFramePrivate.
2840
2841         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2842         (WKBundleFrameClearOpener):
2843         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2844
2845 2011-02-26  Yael Aharon  <yael.aharon@nokia.com>
2846
2847         Reviewed by Andreas Kling.
2848
2849         [Qt] Fix the focus in MiniBrowser.
2850         https://bugs.webkit.org/show_bug.cgi?id=55288
2851
2852         Implement basic functionality for focus in QWKPagePrivate.
2853
2854         * UIProcess/API/qt/qwkpage.cpp:
2855         (QWKPagePrivate::isViewWindowActive):
2856         (QWKPagePrivate::isViewFocused):
2857         (QWKPagePrivate::isViewVisible):
2858
2859 2011-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2860
2861         Unreviewed, rolling out r79764.
2862         http://trac.webkit.org/changeset/79764
2863         https://bugs.webkit.org/show_bug.cgi?id=55295
2864
2865         "broke Chromium builds" (Requested by rniwa on #webkit).
2866
2867         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2868         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2869
2870 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
2871
2872         Reviewed by Pavel Feldman.
2873
2874         DumpRenderTree should reset frame opener between tests.
2875         https://bugs.webkit.org/show_bug.cgi?id=54874
2876
2877         Added clearOpener method to WKBundleWebFramePrivate.
2878
2879         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2880         (WKBundleFrameClearOpener):
2881         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2882
2883 2011-02-25  Anders Carlsson  <andersca@apple.com>
2884
2885         Reviewed by Darin Adler.
2886
2887         Plug-in process crashes when using GuardMalloc
2888         https://bugs.webkit.org/show_bug.cgi?id=55279
2889         <rdar://problem/9044618>
2890
2891         Update m_environmentPointer after copying the environment variables.
2892         
2893         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2894         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
2895
2896 2011-02-25  Darin Adler  <darin@apple.com>
2897
2898         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2899         (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.
2900
2901 2011-02-25  Darin Adler  <darin@apple.com>
2902
2903         Reviewed by Mark Rowe.
2904
2905         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2906         (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
2907         builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.
2908
2909 2011-02-25  Darin Adler  <darin@apple.com>
2910
2911         Reviewed by Anders Carlsson.
2912
2913         <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set
2914
2915         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2916         (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
2917         the strings here because they are allocated with fastMalloc, not new.
2918         (WebKit::EnvironmentVariables::set): Use const more.
2919         (WebKit::EnvironmentVariables::get): Ditto.
2920         (WebKit::EnvironmentVariables::appendValue): Ditto.
2921         (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
2922         where this would match if the name matched only a prefix of the environment variable's
2923         name. We want to match the whole name, so we need to use memcmp, not strncmp.
2924         (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
2925         (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
2926         for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
2927         ensuring we can pick up other frameworks from the same directory in the web process.
2928         Use a const_cast instead of a C-style cast.
2929
2930 2011-02-25  Chris Fleizach  <cfleizach@apple.com>
2931
2932         Reviewed by Anders Carlsson.
2933
2934         AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
2935         https://bugs.webkit.org/show_bug.cgi?id=55277
2936
2937         * UIProcess/API/mac/WKView.mm:
2938         (-[WKView accessibilityFocusedUIElement]):
2939
2940 2011-02-25  Alexey Proskuryakov  <ap@apple.com>
2941
2942         Reviewed by Anders Carlsson.
2943
2944         https://bugs.webkit.org/show_bug.cgi?id=55276
2945         WebPage::close() accesses "this" after it is destroyed.
2946
2947         This was making many tests crash with GuardMalloc.
2948
2949         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
2950         destroyed, not after.
2951
2952 2011-02-25  Balazs Kelemen  <kbalazs@webkit.org>
2953
2954         Unreviewed.
2955         Add missing sources to WebKit2API.pri.
2956
2957         * WebKit2API.pri:
2958
2959 2011-02-25  Anders Carlsson  <andersca@apple.com>
2960
2961         Reviewed by Darin Adler.
2962
2963         A WKView without a window will cause CG errors in the console
2964         https://bugs.webkit.org/show_bug.cgi?id=55264
2965         <rdar://problem/9044281>
2966
2967         Check that the window has a valid window number before trying to get its graphics context.
2968
2969         * UIProcess/API/mac/PageClientImpl.mm:
2970         (WebKit::PageClientImpl::containingWindowGraphicsContext):
2971
2972 2011-02-25  Brian Weinstein  <bweinstein@apple.com>
2973
2974         Reviewed by Brady Eidson and looked over by Jessie Berlin.
2975
2976         WebKit2: Need a way to manage cookies from the web process
2977         https://bugs.webkit.org/show_bug.cgi?id=55086
2978         
2979         Call through to WebCore::CookieJar in our WebCookieManager functions.
2980
2981         * WebProcess/Cookies/WebCookieManager.cpp:
2982         (WebKit::WebCookieManager::getHostnamesWithCookies):
2983         (WebKit::WebCookieManager::deleteCookiesForHostname):
2984         (WebKit::WebCookieManager::deleteAllCookies):
2985
2986 2011-02-25  Anders Carlsson  <andersca@apple.com>
2987
2988         Reviewed by Sam Weinig.
2989
2990         Option-clicking on links doesn't download them due to sandbox violation
2991         https://bugs.webkit.org/show_bug.cgi?id=55250
2992         <rdar://problem/9018359>
2993
2994         The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
2995         decided policy was "Download". Fix this by passing along the download ID back to the web process.
2996
2997         * Platform/CoreIPC/HandleMessage.h:
2998         (CoreIPC::callMemberFunction):
2999         Add new overload.
3000
3001         * UIProcess/WebPageProxy.cpp:
3002         (WebKit::WebPageProxy::WebPageProxy):
3003         Initialize m_syncNavigationActionPolicyDownloadID.
3004
3005         (WebKit::WebPageProxy::receivedPolicyDecision):
3006         Set m_syncNavigationActionPolicyDownloadID to the download ID.
3007
3008         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
3009         Return the m_syncNavigationActionPolicyDownloadID.
3010
3011         * UIProcess/WebPageProxy.h:
3012         * UIProcess/WebPageProxy.messages.in:
3013         Add a DownloadID reply parameter.
3014
3015         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3016         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
3017         Don't pass a zero download ID to didReceivePolicyDecision.
3018
3019 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
3020
3021         Reviewed by Martin Robinson.
3022
3023         [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
3024         https://bugs.webkit.org/show_bug.cgi?id=48510
3025
3026         * GNUmakefile.am:
3027         * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
3028         and constructors, in our case we need it because we use a pointer
3029         and copy the event.
3030         (WebKit::NativeWebKeyboardEvent::nativeEvent):
3031         * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
3032         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
3033         to copy the event in the constructor to avoid two references to
3034         the same event.
3035         * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
3036         functions to add const, we need it for the NativeWebKeyboardEvent
3037         constructor.
3038         (WebKit::modifiersForEvent):
3039         (WebKit::WebEventFactory::createWebKeyboardEvent):
3040         * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
3041         for GTK port. Yet to implement.
3042         (WebKit::WebContext::applicationCacheDirectory):
3043         (WebKit::WebContext::platformInitializeWebProcess):
3044         (WebKit::WebContext::platformDefaultDatabaseDirectory):
3045         * UIProcess/gtk/WebView.cpp:
3046         (WebKit::WebView::handleKeyboardEvent):
3047
3048 2011-02-25  Anders Carlsson  <andersca@apple.com>
3049
3050         Reviewed by Sam Weinig.
3051
3052         Get rid of more old accelerated compositing code
3053         https://bugs.webkit.org/show_bug.cgi?id=55235
3054
3055         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
3056         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3057         * UIProcess/DrawingAreaProxy.h:
3058         * UIProcess/DrawingAreaProxyImpl.cpp:
3059         * UIProcess/DrawingAreaProxyImpl.h:
3060         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3061         * WebProcess/WebPage/DrawingArea.h:
3062         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3063         * WebProcess/WebPage/DrawingAreaImpl.h:
3064
3065 2011-02-25  Andras Becsi  <abecsi@webkit.org>
3066
3067         Reviewed by Csaba Osztrogonác.
3068
3069         [Qt] Make the WebKit2 build system less confusing for non-Qt developers
3070         https://bugs.webkit.org/show_bug.cgi?id=55213
3071
3072         * WebKit2API.pri: Added.
3073
3074 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
3075
3076         Reviewed by Martin Robinson.
3077
3078         [GTK] Implement WebView and WebKitWebView classes for WebKit2
3079         https://bugs.webkit.org/show_bug.cgi?id=48509
3080
3081         * GNUmakefile.am:
3082         * UIProcess/API/C/gtk/WKView.cpp:
3083         * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
3084         constructor.
3085         * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
3086         for WebView. The GObject is the GtkWidget handle which is used by
3087         WebView class for GTK port.
3088         * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
3089         declarations for GtkWidget handle for GTK port.
3090         * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
3091         for GTK port which is associated with each WKViewRef.
3092         * UIProcess/gtk/WebView.h: Added. Class which implements the
3093         PageClient interface. It is a wrapper over the native GtkWidget
3094         handle associated with each WKViewRef for GTK port.
3095
3096 2011-02-25  Alejandro G. Castro  <alex@igalia.com>
3097
3098         Fix GTK compilation after r79654.
3099
3100         * GNUmakefile.am:
3101
3102 2011-02-24  Brian Weinstein  <bweinstein@apple.com>
3103
3104         Qt build fix.
3105
3106         * WebKit2.pri:
3107
3108 2011-02-24  Brady Eidson  <beidson@apple.com>
3109
3110         Reviewed by Sam Weinig and looked over by Brian Weinstein.
3111
3112         Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
3113         Need WebKit2 API to view/manage origins with LocalStorage.
3114
3115         Project file stuff:
3116         * GNUmakefile.am:
3117         * WebKit2.pri:
3118         * WebKit2.pro:
3119         * WebKit2.xcodeproj/project.pbxproj:
3120         * win/WebKit2.vcproj:
3121         * win/WebKit2Common.vsprops:
3122         * win/WebKit2Generated.make:
3123
3124         WK2 derived sources and API stuff:
3125         * DerivedSources.make:
3126         * DerivedSources.pro:
3127         * Platform/CoreIPC/MessageID.h:
3128         * Shared/API/c/WKBase.h:
3129         * Shared/APIObject.h:
3130         * UIProcess/API/C/WKAPICast.h:
3131
3132         Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
3133         * UIProcess/WebContext.cpp:
3134         (WebKit::WebContext::WebContext):
3135         (WebKit::WebContext::~WebContext):
3136         (WebKit::WebContext::disconnectProcess):
3137         (WebKit::WebContext::didReceiveMessage):
3138         * UIProcess/WebContext.h:
3139         (WebKit::WebContext::keyValueStorageManagerProxy):
3140
3141         Add API to get the KeyValueStorageManager for a context:
3142         * UIProcess/API/C/WKContext.cpp:
3143         (WKContextGetKeyValueStorageManager):
3144         * UIProcess/API/C/WKContext.h:
3145
3146         Route messages to the right place:
3147         * UIProcess/WebProcessProxy.cpp:
3148         (WebKit::WebProcessProxy::didReceiveMessage):
3149         * WebProcess/WebProcess.cpp:
3150         (WebKit::WebProcess::didReceiveMessage):
3151
3152         Add the API object, which wraps to WebKeyValueStorageManagerProxy:
3153         * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
3154         (WKKeyValueStorageManagerGetTypeID):
3155         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
3156         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
3157         (WKKeyValueStorageManagerDeleteAllEntries):
3158         * UIProcess/API/C/WKKeyValueStorageManager.h: Added.
3159
3160         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
3161         * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
3162         (WebKit::WebKeyValueStorageManagerProxy::create):
3163         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
3164         (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
3165         (WebKit::WebKeyValueStorageManagerProxy::invalidate):
3166         (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
3167         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
3168         (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
3169         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
3170         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
3171         * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
3172         (WebKit::WebKeyValueStorageManagerProxy::clearContext):
3173         (WebKit::WebKeyValueStorageManagerProxy::type):
3174         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.
3175
3176         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
3177         * WebProcess/KeyValueStorage: Added.
3178         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
3179         (WebKit::WebKeyValueStorageManager::shared):
3180         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
3181         (WebKit::WebKeyValueStorageManager::didReceiveMessage):
3182         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
3183         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
3184         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
3185         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
3186         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.
3187
3188 2011-02-24  Darin Adler  <darin@apple.com>
3189
3190         Reviewed by Anders Carlsson.
3191
3192         WebKit2: Image-based cursors do not work
3193         https://bugs.webkit.org/show_bug.cgi?id=55184
3194
3195         * Shared/ShareableBitmap.h: Added releaseData function
3196         declaration. This is only defined for CG, but we can declare
3197         it without defining it on non-CG platforms without causing problems.
3198
3199         * Shared/WebCoreArgumentCoders.cpp: Added.
3200         (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
3201         (CoreIPC::decodeImage): Ditto.
3202
3203         * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
3204         and decoder to handle image-based cursors, using the new encodeImage
3205         and decodeImage functions.
3206
3207         * Shared/cg/ShareableBitmapCG.cpp:
3208         (WebKit::ShareableBitmap::releaseData): Added.
3209         (WebKit::ShareableBitmap::createGraphicsContext): Use
3210         CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
3211         to guarantee we outlast the CGBitmapContext we create.
3212         (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.
3213
3214         * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
3215         (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.
3216
3217         * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
3218         and WebCoreArgumentCodersCG.cpp.
3219         * win/WebKit2.vcproj: Ditto.
3220
3221 2011-02-24  Anders Carlsson  <andersca@apple.com>
3222
3223         Reviewed by Dan Bernstein.
3224
3225         Crash when trying to send a sync message on an invalid connection
3226         https://bugs.webkit.org/show_bug.cgi?id=55190
3227         <rdar://problem/9035806>
3228
3229         * Platform/CoreIPC/Connection.cpp:
3230         (CoreIPC::Connection::sendSyncMessage):
3231         Don't try to call a client function if isValid() returns false since the client
3232         will be null in that case.
3233
3234 2011-02-24  Anders Carlsson  <andersca@apple.com>
3235
3236         Reviewed by Dan Bernstein.
3237
3238         Remove the layer backed drawing area
3239         https://bugs.webkit.org/show_bug.cgi?id=55174
3240
3241         * GNUmakefile.am:
3242         * Shared/DrawingAreaInfo.h:
3243         * UIProcess/API/mac/WKView.mm:
3244         * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
3245         * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
3246         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
3247         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
3248         * UIProcess/win/WebView.cpp:
3249         * WebKit2.xcodeproj/project.pbxproj:
3250         * WebProcess/WebPage/DrawingArea.cpp:
3251         (WebKit::DrawingArea::create):
3252         * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
3253         * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
3254         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
3255         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
3256         * win/WebKit2.vcproj:
3257
3258 2011-02-24  Mike Thole  <mthole@apple.com>
3259
3260         Reviewed by Sam Weinig.
3261
3262         WK2: Add ability to get document node for a WKBundleNodeHandle
3263         https://bugs.webkit.org/post_bug.cgi
3264
3265         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
3266         (WKBundleNodeHandleCopyDocument):
3267         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
3268         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
3269         (WebKit::InjectedBundleNodeHandle::document):
3270         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
3271
3272 2011-02-24  Brady Eidson  <beidson@apple.com>
3273
3274         Reviewed by Adam Roben and looked at by Brian Weinstein.
3275
3276         https://bugs.webkit.org/show_bug.cgi?id=55165
3277         Can call CF API with a null CFArray in WebResourceCacheManager
3278
3279         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
3280         (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef, 
3281           so the call to CFArrayGetCount must be null checked.
3282
3283 2011-02-24  Anders Carlsson  <andersca@apple.com>
3284
3285         Reviewed by Simon Fraser.
3286
3287         ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
3288         https://bugs.webkit.org/show_bug.cgi?id=55162
3289         <rdar://problem/9048523>
3290
3291         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3292         (WebKit::DrawingAreaImpl::updateState):
3293         Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
3294         EnterAcceleratedCompositingMode message.
3295
3296         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
3297         setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
3298
3299         * WebProcess/WebPage/LayerTreeHost.h:
3300         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3301         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3302         (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
3303         Make this take a boolean.
3304
3305 2011-02-24  Peter Kasting  <pkasting@google.com>
3306
3307         Reviewed by Eric Seidel.
3308
3309         Drop the "U; " encryption level from the User Agent string.
3310         https://bugs.webkit.org/show_bug.cgi?id=54566
3311
3312         * UIProcess/gtk/WebPageProxyGtk.cpp:
3313         (WebKit::WebPageProxy::standardUserAgent):
3314         * UIProcess/mac/WebPageProxyMac.mm:
3315         (WebKit::WebPageProxy::standardUserAgent):
3316         * UIProcess/qt/WebPageProxyQt.cpp:
3317         (WebKit::WebPageProxy::standardUserAgent):
3318         * UIProcess/win/WebPageProxyWin.cpp:
3319         (WebKit::WebPageProxy::standardUserAgent):
3320
3321 2011-02-24  Andrew Wilson  <atwilson@chromium.org>
3322
3323         Unreviewed, rolling out r79570.
3324         http://trac.webkit.org/changeset/79570
3325         https://bugs.webkit.org/show_bug.cgi?id=54874
3326
3327         Breaks chromium build because glue/mocks/mock_web_frame.h/cc
3328         was not updated
3329
3330         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3331         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3332
3333 2011-02-23  Brian Weinstein  <bweinstein@apple.com>
3334
3335         Reviewed by Adam Roben and looked over by Jessie Berlin.
3336
3337         Part of WebKit2: Need a way to manage cookies from the web process
3338         https://bugs.webkit.org/show_bug.cgi?id=55086
3339         
3340         This patch adds the plumbing and classes that are needed to manage cookies from the web process.
3341         The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
3342
3343         Project file changes.
3344         * DerivedSources.make:
3345         * DerivedSources.pro:
3346         * GNUmakefile.am:
3347         * WebKit2.pri:
3348         * WebKit2.pro:
3349         * WebKit2.xcodeproj/project.pbxproj:
3350         * win/WebKit2.vcproj:
3351         * win/WebKit2Common.vsprops:
3352         * win/WebKit2Generated.make:
3353
3354         Add some needed plumbing for WebCookieManager{Proxy}.
3355         * Platform/CoreIPC/MessageID.h:
3356         * Shared/API/c/WKBase.h:
3357         * Shared/APIObject.h:
3358         * UIProcess/API/C/WKAPICast.h:
3359
3360         * UIProcess/API/C/WKContext.cpp:
3361         (WKContextGetCookieManager): Gets the cookie manager proxy.
3362         * UIProcess/API/C/WKContext.h:
3363         * UIProcess/API/C/WKCookieManager.cpp: Added.
3364         (WKCookieManagerGetTypeID):
3365         (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
3366         (WKCookieManagerDeleteCookiesForHostname): Ditto.
3367         (WKCookieManagerDeleteAllCookies): Ditto.
3368         * UIProcess/API/C/WKCookieManager.h: Added.
3369
3370         * UIProcess/WebProcessProxy.cpp:
3371         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
3372         * UIProcess/WebContext.cpp:
3373         (WebKit::WebContext::WebContext): Initialize the cookie manager.
3374         (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
3375         (WebKit::WebContext::disconnectProcess): Ditto.
3376         (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
3377         * UIProcess/WebContext.h:
3378         (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
3379         * WebProcess/WebProcess.cpp:
3380         (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
3381
3382         * UIProcess/WebCookieManagerProxy.cpp: Added.
3383         (WebKit::WebCookieManagerProxy::create):
3384         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
3385         (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
3386         (WebKit::WebCookieManagerProxy::invalidate):
3387         (WebKit::WebCookieManagerProxy::didReceiveMessage): 
3388         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
3389         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
3390         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
3391             for the origin.
3392         (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
3393         * UIProcess/WebCookieManagerProxy.h: Added.
3394         (WebKit::WebCookieManagerProxy::clearContext):
3395         (WebKit::WebCookieManagerProxy::type):
3396         * UIProcess/WebCookieManagerProxy.messages.in: Added.
3397
3398         * WebProcess/Cookies: Added.
3399         * WebProcess/Cookies/WebCookieManager.cpp: Added.
3400         (WebKit::WebCookieManager::shared):
3401         (WebKit::WebCookieManager::WebCookieManager):
3402         (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
3403         (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
3404             convert that HashSet to a Vector to send to the UI process.
3405         (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
3406         (WebKit::WebCookieManager::deleteAllCookies): Ditto.
3407         * WebProcess/Cookies/WebCookieManager.h: Added.
3408         * WebProcess/Cookies/WebCookieManager.messages.in: Added.
3409
3410 2011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
3411
3412         Reviewed by Martin Robinson.
3413
3414         [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
3415         https://bugs.webkit.org/show_bug.cgi?id=48510
3416
3417         * GNUmakefile.am:
3418         * Shared/gtk/WebEventFactory.cpp: Added. implementation for
3419         WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
3420         * Shared/gtk/WebEventFactory.h: Added.
3421         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
3422         implementation for GTK port.
3423
3424 2011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>
3425
3426         Reviewed by Alexey Proskuryakov.
3427
3428         DumpRenderTree should reset frame opener between tests.
3429         https://bugs.webkit.org/show_bug.cgi?id=54874
3430
3431         Added clearOpener method to WKBundleWebFramePrivate.
3432
3433         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
3434         (WKBundleFrameClearOpener):
3435         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
3436
3437 2011-02-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
3438
3439         Reviewed by Eric Seidel.
3440
3441         Support building WebKit with Python 3
3442         https://bugs.webkit.org/show_bug.cgi?id=55038
3443
3444         Update the generator scripts to support Python 3.
3445
3446         * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
3447         sys.stdout to be compatible with Python 2 and 3.
3448         * Scripts/generate-messages-header.py:
3449         * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
3450           to dict.items which is common to Python 2 and 3.
3451
3452 2011-02-24  Andras Becsi  <abecsi@webkit.org>
3453
3454         Reviewed by Laszlo Gombos.
3455
3456         [Qt] MinGW build fails to link
3457         https://bugs.webkit.org/show_bug.cgi?id=55050
3458
3459         Prepend the libraries of subcomponents instead of appending them
3460         to fix the library order according to the dependency of the libraries
3461
3462         * WebKit2.pri:
3463
3464 2011-02-24  Andras Becsi  <abecsi@webkit.org>
3465
3466         Reviewed by Csaba Osztrogonác.
3467
3468         [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
3469         https://bugs.webkit.org/show_bug.cgi?id=47589
3470
3471         In case of file name clashes only generate forwarding header for the current platform.
3472
3473         * Scripts/generate-forwarding-headers.pl:
3474
3475 2011-02-23  Anders Carlsson  <andersca@apple.com>
3476