2011-04-07 Maciej Stachowiak <mjs@apple.com>
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-04-07  Maciej Stachowiak  <mjs@apple.com>
2
3         Reviewed by Dan Bernstein.
4
5         Remove some no longer needed WebProcess sandbox allowances
6         https://bugs.webkit.org/show_bug.cgi?id=58015
7         <rdar://problem/9232592>
8
9         * WebProcess/com.apple.WebProcess.sb: Remove no-longer needed extra network
10         and launching privileges, since the bugs that required them are fixed.
11
12 2011-04-06  Chang Shu  <cshu@webkit.org>
13
14         Reviewed by Darin Adler.
15
16         WebKitTestRunner needs layoutTestController.pageSizeAndMarginsInPixels
17         https://bugs.webkit.org/show_bug.cgi?id=57984
18
19         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
20         (WKBundlePageSizeAndMarginsInPixels):
21         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
22         * WebProcess/InjectedBundle/InjectedBundle.cpp:
23         (WebKit::InjectedBundle::pageSizeAndMarginsInPixels):
24         * WebProcess/InjectedBundle/InjectedBundle.h:
25
26 2011-04-06  Siddharth Mathur  <siddharth.mathur@nokia.com>
27
28         Reviewed by Benjamin Poulain.
29
30         [Qt][WK2][Symbian] Remove use of stack arrays with variable size
31         https://bugs.webkit.org/show_bug.cgi?id=57877
32         
33         For better compiler portability, use new/delete for arrays when size
34         isn't known at compile time. Also fix one compiler warning about bitshift
35         operations on signed integers. 
36         * Platform/CoreIPC/qt/ConnectionQt.cpp: 
37         (CoreIPC::Connection::readyReadHandler): 
38         (CoreIPC::Connection::sendOutgoingMessage):
39
40 2011-04-06  Brian Weinstein  <bweinstein@apple.com>
41
42         Reviewed by Adam Roben.
43
44         WebKit2: Support Windows 7 Gestures
45         https://bugs.webkit.org/show_bug.cgi?id=49824
46         <rdar://problem/8689728>
47         
48         Port code from WebKit1 -> WebKit2 to handle Windows 7 gestures.
49         
50         The UIProcess gets a WM_GESTURENOTIFY message, it sends a sync message to the WebProcess to ask
51         if we should allow panning. The WebProcess checks if we're in a scrollable area, and the mouse
52         isn't over a scrollbar.
53
54         The UIProcess then gets a WM_GESTURE message, and if it is a pan gesture, it sends a message to
55         the WebProcess to scroll by the amount fingers have moved since the last WM_GESTURE messeage. The
56         X and Y are reversed because panning up -> moving the page down, and vice versa.
57
58         * UIProcess/WebPageProxy.cpp:
59         (WebKit::WebPageProxy::gestureWillBegin): Send a sync message to the WebProcess
60             to initialize the gesture. The WebProcess returns whether or not we can start a pan
61             gesture from where we are.
62         (WebKit::WebPageProxy::gestureDidScroll): Send a message to the WebProcess to scroll by
63             pan gesture.
64         (WebKit::WebPageProxy::gestureDidEnd): Send a message to the WebProcess that the gesture has ended.
65         * UIProcess/WebPageProxy.h:
66         * UIProcess/win/WebView.cpp:
67         (WebKit::WebView::wndProc): Add WM_GESTURE and WM_GESTURENOTIFY handlers.
68         (WebKit::WebView::WebView): Initialize two new variables.
69         (WebKit::WebView::onGestureNotify): Figure out which gestures we should support based on where
70             the gesture is beginning.
71         (WebKit::WebView::onGesture): Support starting a gesture, ending a gesture, and panning.
72         * UIProcess/win/WebView.h:
73         * WebProcess/WebPage/WebPage.h:
74         * WebProcess/WebPage/WebPage.messages.in: Add messages needed for gestures.
75         * WebProcess/WebPage/win/WebPageWin.cpp:
76         (WebKit::WebPage::gestureWillBegin): Set the node that the gesture started on (so we 
77             know which layer to scroll if the user pans), and determine whether or not we should allow
78             panning. If the page can't scroll, or the user is on a scrollbar, disallow panning.
79         (WebKit::WebPage::gestureDidScroll): Scroll the enclosing layer of the element the gesture
80             started on.
81         (WebKit::WebPage::gestureDidEnd): Clear the node the gesture started on.
82
83 2011-04-06  Jeff Miller  <jeffm@apple.com>
84
85         Reviewed by Adam Roben.
86
87         Add WKStringGetCharactersPtr() and WKStringGetLength() to WebKit2 C API
88         https://bugs.webkit.org/show_bug.cgi?id=57989
89         
90         Note that WKChar, which is returned by WKStringGetCharactersPtr(), is defined the same way we define JSChar in JSStringRef.h.
91
92         * Shared/API/c/WKString.cpp:
93         (WKStringGetLength): Added.
94         (WKStringGetCharactersPtr): Added.
95         * Shared/API/c/WKString.h: Define WKChar and added WKStringGetLength() and WKStringGetCharactersPtr().
96         * Shared/WebString.h:
97         (WebKit::WebString::length): Added.
98         (WebKit::WebString::characters): Added.
99
100 2011-04-06  Anders Carlsson  <andersca@apple.com>
101
102         Reviewed by Oliver Hunt.
103
104         Dock stays in front of Hulu.com full screen video output
105         https://bugs.webkit.org/show_bug.cgi?id=57988
106         <rdar://problem/9216260>
107
108         Instead of using -[NSMenu setMenuBarVisible:] to toggle full screen, use
109         -[NSApp setPresentationOptions:]. Also, make the UI process the front most app before
110         setting the presentation options when exiting full screen, otherwise the dock won't
111         be restored correctly.
112
113         * PluginProcess/mac/PluginProcessShim.mm:
114         Remove some shim functions that aren't needed.
115
116         * UIProcess/Plugins/PluginProcessProxy.cpp:
117         (WebKit::PluginProcessProxy::PluginProcessProxy):
118         Initialize m_preFullscreenAppPresentationOptions.
119
120         * UIProcess/Plugins/PluginProcessProxy.h:
121         Add m_preFullscreenAppPresentationOptions.
122
123         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
124         (WebKit::PluginProcessProxy::enterFullscreen):
125         Change the presentation options for the app.
126
127         (WebKit::PluginProcessProxy::exitFullscreen):
128         Restore the presentation options.
129
130 2011-04-06  Mark Rowe  <mrowe@apple.com>
131
132         Reviewed by Darin Adler.
133
134         Expose the original URL of a WKBackForwardListItem.
135
136         Needed for <rdar://problem/9074651>.
137
138         * UIProcess/API/C/WKBackForwardListItem.cpp:
139         (WKBackForwardListItemCopyOriginalURL):
140         * UIProcess/API/C/WKBackForwardListItem.h:
141
142 2011-04-06  Brady Eidson  <beidson@apple.com>
143
144         Reviewed by Anders Carlsson.
145
146         https://bugs.webkit.org/show_bug.cgi?id=57973 and https://bugs.webkit.org/show_bug.cgi?id=57973
147         WK2 icon database should be able to get a CGImage of a specific size
148
149         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
150         (WKIconDatabaseTryGetCGImageForURL): Change this API to take a requested size, and find the first matching
151           CGImage in the icon.
152         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
153
154 2011-04-06  Jessie Berlin  <jberlin@apple.com>
155
156         Reviewed by Anders Carlsson.
157
158         WebKit2: Implement TextChecker on Windows
159         https://bugs.webkit.org/show_bug.cgi?id=57862
160
161         Part 2: Implement uniqueSpellDocumentTag and closeSpellDocumentWithTag.
162
163         * UIProcess/API/C/win/WKTextChecker.h:
164         * UIProcess/win/TextCheckerWin.cpp:
165         (WebKit::TextChecker::uniqueSpellDocumentTag):
166         (WebKit::TextChecker::closeSpellDocumentWithTag):
167         * UIProcess/win/WebTextCheckerClient.cpp:
168         (WebKit::WebTextCheckerClient::uniqueSpellDocumentTag):
169         (WebKit::WebTextCheckerClient::closeSpellDocumentWithTag):
170         * UIProcess/win/WebTextCheckerClient.h:
171
172 2011-04-06  Robert Sesek  <rsesek@chromium.org>
173
174         Reviewed by Alexey Proskuryakov.
175
176         Move code duplicated between the WebKit/mac and WebKit2 down to WebCore because Chromium will need it too
177         https://bugs.webkit.org/show_bug.cgi?id=54969
178
179         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
180         (WebKit::WebEditorClient::respondToChangedSelection): Moved duplicated code to WebCore
181         * WebProcess/WebPage/mac/WebPageMac.mm: Moved duplicated code to WebCore
182         (WebKit::WebPage::getMarkedRange):
183         (WebKit::WebPage::getSelectedRange):
184         (WebKit::WebPage::characterIndexForPoint):
185         (WebKit::WebPage::performDictionaryLookupAtLocation):
186
187 2011-04-06  Chang Shu  <cshu@webkit.org>
188
189         Reviewed by Darin Adler.
190
191         WebKitTestRunner needs layoutTestController.pageNumberForElementById
192         https://bugs.webkit.org/show_bug.cgi?id=42329
193
194         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
195         (WKBundlePageNumberForElementById):
196         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
197         * WebProcess/InjectedBundle/InjectedBundle.cpp:
198         (WebKit::InjectedBundle::pageNumberForElementById):
199         * WebProcess/InjectedBundle/InjectedBundle.h:
200
201 2011-04-05  Enrica Casucci  <enrica@apple.com>
202
203         Reviewed by Darin Adler.
204
205         REGRESSION: Drag & Drop Gmail Attachments doesn't work.
206         https://bugs.webkit.org/show_bug.cgi?id=57909
207         <rdar://problem/9103220>
208
209         Added _hitTest method to support drag and drop when the drag types cannot be matched.
210         This is the case for elements that do not place content
211         in the drag pasteboard automatically when the drag start (i.e. dragging a DIV element).
212                
213         * UIProcess/API/mac/WKView.mm:
214         (-[WKView _hitTest:dragTypes:]): Added.
215
216 2011-04-06  Csaba Osztrogonác  <ossy@webkit.org>
217
218         Reviewed by Darin Adler.
219
220         Fix using UNUSED_PARAM introduced in r82907
221         https://bugs.webkit.org/show_bug.cgi?id=57940
222
223         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
224         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
225
226 2011-04-06  Jessie Berlin  <jberlin@apple.com>
227
228         Reviewed by Anders Carlsson.
229
230         WebKit2: Implement TextChecker on Windows
231         https://bugs.webkit.org/show_bug.cgi?id=57862
232
233         Part 1: Get and set the state.
234
235         * Shared/API/c/win/WKBaseWin.h:
236         * Shared/APIObject.h:
237         * UIProcess/API/C/win/WKAPICastWin.h:
238  
239         * UIProcess/API/C/win/WKTextChecker.cpp: Added.
240         (WKTextCheckerSetClient):
241         (WKTextCheckerContinuousSpellCheckingEnabledStateChanged):
242         (WKTextCheckerGrammarCheckingEnabledStateChanged):
243         * UIProcess/API/C/win/WKTextChecker.h: Added.
244  
245         * UIProcess/TextChecker.h:
246         * UIProcess/win/TextCheckerWin.cpp:
247         (WebKit::TextChecker::state):
248         Do the initalization for the state only once so that it is not necessary to call the client
249         every time the state is requested.
250         (WebKit::TextChecker::isContinuousSpellCheckingAllowed):
251         Call the client.
252         (WebKit::TextChecker::setContinuousSpellCheckingEnabled):
253         Update the state and tell the client.
254         (WebKit::TextChecker::setGrammarCheckingEnabled):
255         Ditto.
256         (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged):
257         Update the state.
258         (WebKit::TextChecker::grammarCheckingEnabledStateChanged):
259         Update the state.
260
261         * UIProcess/win/WebTextChecker.cpp: Added.
262         (WebKit::WebTextChecker::shared):
263         Make the WebTextChecker available globally.
264         (WebKit::WebTextChecker::WebTextChecker):
265         (WebKit::WebTextChecker::setClient):
266         (WebKit::updateStateForAllWebProcesses):
267         (WebKit::WebTextChecker::continuousSpellCheckingEnabledStateChanged):
268         Tell the TextChecker that the state has changed, and then tell the
269         WebProcessProxies to send the new state to the WebProcesses.
270         (WebKit::WebTextChecker::grammarCheckingEnabledStateChanged):
271         Ditto.
272         * UIProcess/win/WebTextChecker.h: Added.
273         (WebKit::WebTextChecker::client):
274         (WebKit::WebTextChecker::type):
275
276         * UIProcess/win/WebTextCheckerClient.cpp: Added.
277         (WebKit::WebTextCheckerClient::continuousSpellCheckingAllowed):
278         (WebKit::WebTextCheckerClient::continuousSpellCheckingEnabled):
279         (WebKit::WebTextCheckerClient::setContinuousSpellCheckingEnabled):
280         (WebKit::WebTextCheckerClient::grammarCheckingEnabled):
281         (WebKit::WebTextCheckerClient::setGrammarCheckingEnabled):
282         * UIProcess/win/WebTextCheckerClient.h: Added.
283  
284         * win/WebKit2.vcproj:
285         Add WKTextChecker.h/.cpp, WebTextChecker.h/.cpp, and WebTextCheckerClient.h/.cpp.
286         * win/WebKit2Generated.make:
287         Copy over WKTextChecker.h.
288
289 2011-04-05  Chang Shu  <cshu@webkit.org>
290
291         Reviewed by Darin Adler.
292
293         WebKitTestRunner needs layoutTestController.numberOfPages
294         https://bugs.webkit.org/show_bug.cgi?id=42694
295
296         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
297         (WKBundleNumberOfPages):
298         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
299         * WebProcess/InjectedBundle/InjectedBundle.cpp:
300         (WebKit::InjectedBundle::numberOfPages):
301         * WebProcess/InjectedBundle/InjectedBundle.h:
302
303 2011-04-05  Darin Adler  <darin@apple.com>
304
305         Reviewed by Alexey Proskuryakov.
306
307         [Mac] WebKit2: Escape key does not stop page loads when focus is on the web page
308         https://bugs.webkit.org/show_bug.cgi?id=57893
309         <rdar://problem/9130486>
310
311         * UIProcess/API/mac/PageClientImpl.h: Added executeSavedCommandBySelector.
312         * UIProcess/API/mac/PageClientImpl.mm: Renamed internal Objective-C classes to use
313         the WebKit2 Objective-C class prefix, WK, rather than the WebKit1 Objective-C class
314         prefix, Web. Removed some unneeded explicit WebKit namespace prefixes.
315         (-[WKEditCommandObjC initWithWebEditCommandProxy:]): Removed unneeded WebKit
316         namespace prefix.
317         (-[WKEditCommandObjC command]): Ditto.
318         (-[WKEditorUndoTargetObjC undoEditing:]): Updated for new class name.
319         (-[WKEditorUndoTargetObjC redoEditing:]): Ditto.
320         (WebKit::PageClientImpl::PageClientImpl): Ditto.
321         (WebKit::PageClientImpl::registerEditCommand): Ditto.
322         (WebKit::PageClientImpl::executeSavedCommandBySelector): Added.
323
324         * UIProcess/API/mac/WKView.mm: Renamed internal Objective-C categories to use the
325         WebKit2 Objective-C prefix, WK, rather than the WebKit1 Objective-C prefix, Web,
326         or no prefix at all. Tweaked use of extern "C" a little.
327         (-[WKView doCommandBySelector:]): Tweaked the comment.
328         (-[WKView _executeSavedCommandBySelector:]): Added. For use when command is not handled
329         by WebCore.
330         (-[WKResponderChainSink initWithResponderChain:]): Added. Based on the
331         WebResponderChainSink class in WebKit1.
332         (-[WKResponderChainSink detach]): Added.
333         (-[WKResponderChainSink didReceiveUnhandledCommand]): Added.
334         (-[WKResponderChainSink noResponderFor:]): Added.
335         (-[WKResponderChainSink doCommandBySelector:]): Added.
336         (-[WKResponderChainSink tryToPerform:with:]): Added.
337
338         * UIProcess/API/mac/WKViewInternal.h: Added declaration of _executeSavedCommandBySelector:
339         method. Also removed unneeded includes.
340
341         * UIProcess/PageClient.h: Added executeSavedCommandBySelector.
342         * UIProcess/WebPageProxy.h: Added executeSavedCommandBySelector.
343         * UIProcess/WebPageProxy.messages.in: Added ExecuteSavedCommandBySelector.
344
345         * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Updated includes.
346
347         * UIProcess/mac/WebPageProxyMac.mm:
348         (WebKit::WebPageProxy::executeSavedCommandBySelector): Added.
349
350         * WebProcess/WebPage/mac/WebPageMac.mm:
351         (WebKit::WebPage::executeKeypressCommandsInternal): Send the synchronous
352         ExecuteSavedCommandBySelector message when a command is not handled by WebCore.
353
354 2011-04-05  Anders Carlsson  <andersca@apple.com>
355
356         Reviewed by Alexey Proskuryakov.
357
358         Some plug-in content is displayed upside down in Unity plug-in
359         https://bugs.webkit.org/show_bug.cgi?id=57895
360         <rdar://problem/9212003>
361
362         Create the flipped geometry layer in the web process instead of the plug-in process,
363         which matches what we do in WebKit1.
364
365         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
366         (WebKit::NetscapePlugin::platformPostInitialize):
367         * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm:
368         (WebKit::PluginProxy::pluginLayer):
369
370 2011-04-05  Anders Carlsson  <andersca@apple.com>
371
372         Reviewed by Darin Adler.
373
374         Assertion failure when navigating quickly between file URLs
375         https://bugs.webkit.org/show_bug.cgi?id=57884
376         <rdar://problem/9080559>
377
378         Remove bogus assertion. The pending provisional sandbox extension can be
379         non-null if the current provisional load fails because we're about to load a new
380         page that also has a sandbox extension.
381
382         * WebProcess/WebPage/WebPage.cpp:
383         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
384
385 2011-04-05  Anders Carlsson  <andersca@apple.com>
386
387         Reviewed by Adam Roben.
388
389         Grant the web process access to ~/Library/Preferences/com.apple.universalaccess.plist
390         https://bugs.webkit.org/show_bug.cgi?id=57879
391
392         The web process needs access to the unviersal access preferences to determine if full keyboard
393         access is enabled. I've filed <rdar://problem/9237619> which tracks reading this preference in the UI
394         process and sending it over to the web process whenever it changes.
395
396         * WebProcess/com.apple.WebProcess.sb:
397
398 2011-04-05  Dean Jackson  <dino@apple.com>
399
400         Reviewed by Simon Fraser.
401
402         Add parentheses around && within || to avoid clang warning.
403
404         * WebProcess/WebPage/DrawingAreaImpl.cpp:
405         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
406
407 2011-04-05  Anders Carlsson  <andersca@apple.com>
408
409         Reviewed by Adam Roben.
410
411         Add two more entries to the sandbox profile
412         https://bugs.webkit.org/show_bug.cgi?id=57875
413
414         Allow read-access to /Library/Dictionaries since WebCore::nextBreakablePosition
415         ends up calling into ICU which accesses the dictionary.
416
417         Allow Mach access to com.apple.networkd since it's used by CFNetwork.
418
419         * WebProcess/com.apple.WebProcess.sb:
420
421 2011-04-05  Anders Carlsson  <andersca@apple.com>
422
423         Reviewed by Oliver Hunt.
424
425         Invalidate callbacks if the WebPageProxy is no longer valid
426         https://bugs.webkit.org/show_bug.cgi?id=57873
427         <rdar://problem/9059717>
428
429         Audit all function calls that take callbacks and make sure to invalidate the callbacks
430         if the web page is no longer valid.
431
432         * UIProcess/WebPageProxy.cpp:
433         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
434         (WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
435         (WebKit::WebPageProxy::getSourceForFrame):
436         (WebKit::WebPageProxy::getContentsAsString):
437         (WebKit::WebPageProxy::getSelectionOrContentsAsString):
438         (WebKit::WebPageProxy::getMainResourceDataOfFrame):
439         (WebKit::WebPageProxy::getResourceDataFromFrame):
440         (WebKit::WebPageProxy::getWebArchiveOfFrame):
441         (WebKit::WebPageProxy::forceRepaint):
442         (WebKit::WebPageProxy::computePagesForPrinting):
443         (WebKit::WebPageProxy::drawRectToPDF):
444         (WebKit::WebPageProxy::drawPagesToPDF):
445
446 2011-04-05  Adam Roben  <aroben@apple.com>
447
448         Disable accelerated compositing on Windows machines that don't support it
449
450         This includes machines without the necessary graphics hardware, and machines without
451         WebKitQuartzCoreAdditions (like the Windows 7 Release (WebKit2 Tests) bots).
452
453         Fixes <http://webkit.org/b/57870> REGRESSION (r82960): Lots of tests crashing in
454         DrawingAreaImpl::enterAcceleratedCompositingMode on Windows 7 Release (WebKit2 Tests)
455
456         Reviewed by Anders Carlsson.
457
458         * WebProcess/WebPage/LayerTreeHost.h:
459         (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. On platforms other than
460         Windows, this always returns true.
461
462         * WebProcess/WebPage/WebPage.cpp:
463         (WebKit::WebPage::updatePreferences): Only enable accelerated compositing-related
464         preferences if the machine supports accelerated compositing.
465
466         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
467         (WebKit::LayerTreeHostCAWin::supportsAcceleratedCompositing): Added. Creates a view, asks it
468         if it can draw, and returns the result.
469
470         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added supportsAcceleratedCompositing.
471
472         * WebProcess/WebPage/win/LayerTreeHostWin.cpp: Added.
473         (WebKit::LayerTreeHost::supportsAcceleratedCompositing): Added. Calls through to
474         LayerTreeHostCAWin in configurations that support that class. Otherwise just returns false.
475
476         * win/WebKit2.vcproj: Added LayerTreeHostWin.cpp. Let VS reorder some other files.
477
478 2011-04-05  Adam Roben  <aroben@apple.com>
479
480         Make accelerated compositing work in WebKit2 on Windows
481
482         LayerTreeHostCAWin uses WKCACFView to render each frame to an image, then has
483         DrawingAreaImpl send that image over to the UI process (just like it does for
484         non-accelerated rendering). It's unfortunate that this requires reading every frame back
485         from the GPU into system memory. More efficient solutions can be explored in the future.
486
487         Fixes <http://webkit.org/b/45567>.
488
489         Reviewed by Anders Carlsson.
490
491         * DerivedSources.make: Added $(WebKit2) to the VPATH so that DerivedSources.make can be
492         found when used as a target dependency. Added rules to generate a HeaderDetection.h file on
493         Windows. If we can find WebKitQuartzCoreAdditions headers, we define HAVE_WKQCA in
494         HeaderDetection.h.
495
496         * WebProcess/WebPage/DrawingAreaImpl.cpp:
497         (WebKit::DrawingAreaImpl::setLayerHostNeedsDisplay):
498         * WebProcess/WebPage/DrawingAreaImpl.h:
499         Added setLayerHostNeedsDisplay. Lets the layer host tell the DrawingAreaImpl that it has a
500         new frame to render. This should only be called by layer hosts that participate in
501         DrawingAreaImpl's display mechanism.
502
503         * WebProcess/WebPage/LayerTreeHost.cpp:
504         (WebKit::LayerTreeHost::create): Only try to instantiate LayerTreeHostCAWin if we have
505         WebKitQuartzCoreAdditions, since it depends on that library.
506
507         * WebProcess/WebPage/WebPage.cpp:
508         (WebKit::WebPage::updatePreferences): Removed code that forced accelerated compositing to be
509         disabled on Windows.
510
511         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
512         (WebKit::registerDummyWindowClass): Registers the window class we use for the dummy window.
513         (WebKit::createDummyWindow): Creates the dummy window we pass to WKCACFView so that D3D can
514         determine the display mode, etc. (The window is never shown on screen.)
515         (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Initialize new members.
516         (WebKit::LayerTreeHostCAWin::platformInitialize): Create our dummy window and view and
517         associate the two. We set ourselves as the view's context's user data so that
518         PlatformCALayer can get our AbstractCACFLayerTreeHost pointer as needed.
519         (WebKit::LayerTreeHostCAWin::invalidate): Cancel any pending flushes, tear down our view,
520         and destroy the dummy window if no other layer host is using it.
521         (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Ask LayerChangesFlusher to call us back
522         soon to perform the flush.
523         (WebKit::LayerTreeHostCAWin::participatesInDisplay): Added. Returns true, since we render
524         each frame to an image.
525         (WebKit::LayerTreeHostCAWin::needsDisplay): Added. Returns true if it's now time to
526         displayReturns true if it's now time to display.
527         (WebKit::LayerTreeHostCAWin::timeUntilNextDisplay): Added. Returns how many seconds remain
528         before we need to display again.
529         (WebKit::size): Added. Helper function to get the size of a WKCACFImage.
530         (WebKit::toShareableBitmap): Added. Helper function to convert a WKCACFImage to a
531         ShareableBitmap.
532         (WebKit::LayerTreeHostCAWin::display): Added. Renders the next frame to an image and stuffs
533         the image into the UpdateInfo struct.
534         (WebKit::LayerTreeHostCAWin::sizeDidChange): Added. Tells the view about the new size.
535         (WebKit::LayerTreeHostCAWin::forceRepaint): Added. Flushes any pending changes to the view.
536         (WebKit::LayerTreeHostCAWin::contextDidChangeCallback): Added. WKCACFView calls this
537         whenever any changes made to the view or its layer tree have been flushed. Just calls
538         through to contextDidChange.
539         (WebKit::LayerTreeHostCAWin::contextDidChange): Added. Tells layers that they've started
540         animating, and tells the DrawingAreaImpl that we need to display again.
541         (WebKit::LayerTreeHostCAWin::rootLayer): Added. Gets the root layer's PlatformCALayer.
542         (WebKit::LayerTreeHostCAWin::addPendingAnimatedLayer): Added. Stores the layer so that we
543         can tell it animations have started the next time we get a contextDidChange callback.
544         (WebKit::LayerTreeHostCAWin::layerTreeDidChange): Added. Schedules a flush, unless we're
545         already in the process of flushing. This code came from WebCore::WKCACFViewLayerTreeHost.
546         (WebKit::LayerTreeHostCAWin::flushPendingLayerChangesNow): Added. Performs the flush. This
547         code was adapted from WebCore::WKCACFViewLayerTreeHost.
548
549         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Wrapped this whole header in HAVE(WKQCA),
550         since this class only works when WebKitQuartzCoreAdditions is available. Added a bunch of
551         new members.
552
553 2011-04-04  Adam Roben  <aroben@apple.com>
554
555         Add a way for LayerTreeHost to participate in DrawingAreaImpl's normal display mechanism
556
557         When LayerTreeHost participates in display, it renders each frame into a bitmap.
558         DrawingAreaImpl sends the bitmap to the UI process in an Update message, just like in
559         non-accelerated compositing mode. The UI process never knows that accelerated compositing is
560         going on. (When LayerTreeHost does not participate in display, as on Mac, it is responsible
561         for getting bits from the web process to the UI process.)
562
563         No LayerTreeHost uses this mechanism (yet). This patch should cause no change in behavior.
564
565         Fixes <http://webkit.org/b/57792> LayerTreeHost needs a way to render frames to a bitmap
566
567         Reviewed by Anders Carlsson.
568
569         * WebProcess/WebPage/DrawingAreaImpl.cpp:
570         (WebKit::DrawingAreaImpl::forceRepaint): If the layer tree host participates in display,
571         perform a display (like in the non-accelerated case).
572         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): Don't send an
573         EnterAcceleratedCompositing message to the UI process if the layer tree host participates in
574         display. In that case, the UI process doesn't even need to know we're using accelerated
575         compositing in the web process.
576         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Go through the normal display
577         mechanism if we have a layer tree host that participates in display.
578         (WebKit::DrawingAreaImpl::didUpdate): Don't ignore DidUpdate messages when we have a layer
579         tree host that participates in display.
580         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): If the new layer tree host
581         participates in display, let the display timer continue to run and continue to expect
582         DidUpdate messages so that we don't interrupt the normal display mechanism. We still clear
583         out m_dirtyRegion, m_scrollRect, and m_scrollOffset, though, because the layer tree host is
584         still responsible for keeping track of those things even when it participates in display.
585         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): If the outgoing layer tree host
586         was participating in display, just send another Update message instead of an
587         ExitAcceleratedCompositing message, since the UI process never even knew we were using
588         accelerated compositing.
589         (WebKit::DrawingAreaImpl::displayTimerFired): If we have a layer tree host that's
590         participating in display, ask it when it next needs to display when scheduling our timer.
591
592         (WebKit::DrawingAreaImpl::scheduleDisplay):
593         (WebKit::DrawingAreaImpl::display):
594         If we have a layer tree host that's participating in display, it will keep track of its own
595         dirty region, so ask it if it needs display rather than checking our own dirty region.
596
597         (WebKit::DrawingAreaImpl::display): If we have a layer tree host that's participating in
598         display, don't bail out. Instead, tell it to display rather than asking the page to paint.
599         Moved the setting of updateInfo.viewSize earlier so that it will be set even when the layer
600         tree host is displaying. Other changes are just due to indentation.
601
602         * WebProcess/WebPage/LayerTreeHost.h:
603         (WebKit::LayerTreeHost::participatesInDisplay):
604         (WebKit::LayerTreeHost::needsDisplay):
605         (WebKit::LayerTreeHost::timeUntilNextDisplay):
606         (WebKit::LayerTreeHost::display):
607         Stubbed out these functions. Derived classes can override them to participate in display.
608
609 2011-04-04  MORITA Hajime  <morrita@google.com>
610
611         Reviewed by Ryosuke Niwa.
612
613         [Refactoring] SpellCheckingResult should be replaced with TextCheckingResult
614         https://bugs.webkit.org/show_bug.cgi?id=56085
615         
616         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
617         (WebKit::WebEditorClient::requestCheckingOfString):
618         * WebProcess/WebCoreSupport/WebEditorClient.h:
619         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
620         (WebKit::WebEditorClient::checkTextOfParagraph):
621
622 2011-04-05  Alejandro G. Castro  <alex@igalia.com>
623
624         Another compilation fix after r82929 horrible patch merge.
625
626         * UIProcess/WebPageProxy.messages.in:
627
628 2011-04-05  Alejandro G. Castro  <alex@igalia.com>
629
630         Fix compilation error after r82929.
631
632         * WebProcess/WebPage/WebPage.h:
633
634 2011-04-05  Amruth Raj  <amruthraj@motorola.com>, Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
635
636         Reviewed by Martin Robinson.
637
638         [GTK] Implement WebPage class for WebKit2
639         https://bugs.webkit.org/show_bug.cgi?id=54230
640
641         Added functions to handle the generation of commands from the
642         keycodes.
643
644         * GNUmakefile.am:
645         * Scripts/webkit2/messages.py:
646         * UIProcess/PageClient.h:
647         * UIProcess/WebPageProxy.h:
648         * UIProcess/WebPageProxy.messages.in:
649         * UIProcess/gtk/WebPageProxyGtk.cpp:
650         (WebKit::WebPageProxy::getEditorCommandsForKeyEvent):
651         * UIProcess/gtk/WebView.cpp:
652         (WebKit::backspaceCallback):
653         (WebKit::selectAllCallback):
654         (WebKit::cutClipboardCallback):
655         (WebKit::copyClipboardCallback):
656         (WebKit::pasteClipboardCallback):
657         (WebKit::toggleOverwriteCallback):
658         (WebKit::popupMenuCallback):
659         (WebKit::showHelpCallback):
660         (WebKit::deleteFromCursorCallback):
661         (WebKit::moveCursorCallback):
662         (WebKit::WebView::WebView):
663         (WebKit::WebView::getEditorCommandsForKeyEvent):
664         * UIProcess/gtk/WebView.h:
665         (WebKit::WebView::addPendingEditorCommand):
666         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
667         * WebProcess/WebCoreSupport/WebEditorClient.h:
668         * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Added.
669         (WebKit::WebEditorClient::getEditorCommandsForKeyEvent):
670         (WebKit::WebEditorClient::executePendingEditorCommands):
671         (WebKit::WebEditorClient::handleKeyboardEvent):
672         (WebKit::WebEditorClient::handleInputMethodKeydown):
673         * WebProcess/WebPage/WebPage.cpp:
674         * WebProcess/WebPage/WebPage.h:
675         * WebProcess/WebPage/gtk/WebPageGtk.cpp: Added.
676         (WebKit::WebPage::platformInitialize):
677         (WebKit::WebPage::platformPreferencesDidChange):
678         (WebKit::scroll):
679         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
680         (WebKit::WebPage::platformHasLocalDataForURL):
681         (WebKit::WebPage::cachedResponseMIMETypeForURL):
682         (WebKit::WebPage::platformCanHandleRequest):
683
684 2011-04-05  Csaba Osztrogonác  <ossy@webkit.org>
685
686         Remove duplicate API from WKContext
687         <rdar://problem/8727879>
688         https://bugs.webkit.org/show_bug.cgi?id=57815
689
690         Unreviewed buildfix after r82906.
691
692         Add UNUSED_PARAM to resourceCachesToClear, because
693         it is only used within #if USE(CFURLCACHE) guard.
694
695         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
696         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
697
698 2011-04-04  Sam Weinig  <sam@webkit.org>
699
700         Reviewed by Brian Weinstein.
701
702         Remove duplicate API from WKContext
703         <rdar://problem/8727879>
704         https://bugs.webkit.org/show_bug.cgi?id=57815
705
706         - Remove WKContextClearResourceCaches and WKContextClearApplicationCache in favor
707           of their more modern counterparts WKResourceCacheManagerClearCacheForAllOrigins
708           and WKApplicationCacheManagerDeleteAllEntries.
709
710         - Expand clearing functionality of WKResourceCacheManager by adding type of resources
711           to clear.
712
713         * Shared/WebProcessCreationParameters.cpp:
714         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
715         (WebKit::WebProcessCreationParameters::encode):
716         (WebKit::WebProcessCreationParameters::decode):
717         * Shared/WebProcessCreationParameters.h:
718         Remove clearing bools.
719
720         * UIProcess/API/C/WKAPICast.h:
721         (WebKit::toResourceCachesToClear):
722         Update for new name of enum.
723
724         * UIProcess/API/C/WKContext.cpp:
725         * UIProcess/API/C/WKContext.h:
726         Remove WKContextClearResourceCaches and WKContextClearApplicationCache.
727
728         * UIProcess/API/C/WKResourceCacheManager.cpp:
729         (WKResourceCacheManagerClearCacheForOrigin):
730         (WKResourceCacheManagerClearCacheForAllOrigins):
731         * UIProcess/API/C/WKResourceCacheManager.h:
732         Add WKResourceCachesToClear enum and use it in the clearing functions.
733
734         * UIProcess/WebContext.cpp:
735         (WebKit::WebContext::WebContext):
736         (WebKit::WebContext::ensureWebProcess):
737         * UIProcess/WebContext.h:
738         * WebProcess/WebProcess.messages.in:
739         Remove clearing functions and setting of bools for clear on launch.
740
741         * UIProcess/WebFullScreenManagerProxy.cpp:
742         Remove unnecessary #include.
743
744         * UIProcess/WebResourceCacheManagerProxy.cpp:
745         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
746         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
747         * UIProcess/WebResourceCacheManagerProxy.h:
748         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
749         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
750         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
751         * WebProcess/ResourceCache/WebResourceCacheManager.h:
752         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in:
753         Add enum parameter describing what type of caches to clear.
754
755         * WebProcess/WebProcess.cpp:
756         (WebKit::WebProcess::initializeWebProcess):
757         (WebKit::WebProcess::clearResourceCaches):
758         * WebProcess/WebProcess.h:
759         No longer need to use opaque type now that it is not a message receiver.
760
761 2011-04-04  David Kilzer  <ddkilzer@apple.com>
762
763         <http://webkit.org/b/57384> CFNetwork and WebCore load priorities should match
764
765         Reviewed by Alexey Proskuryakov.
766
767         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
768         (InitWebCoreSystemInterface): Added initialization for
769         wkSetHTTPPipeliningMaximumPriority().
770
771 2011-04-04  Anders Carlsson  <andersca@apple.com>
772
773         Reviewed by Darin Adler.
774
775         Send NPCocoaEventFlagsChanged events
776         https://bugs.webkit.org/show_bug.cgi?id=57811
777         <rdar://problem/9215600>
778
779         * Shared/WebEvent.h:
780         (WebKit::WebEvent::capsLockKey):
781         Add CapsLock modifier and getter.
782
783         * Shared/mac/WebEventFactory.mm:
784         (WebKit::modifiersForEvent):
785         Check for NSAlphaShiftKeyMask and set the CapsLockKey modifier.
786
787         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
788         (WebKit::modifierFlags):
789         Check for CapsLockKey and set NSAlphaShiftKeyMask.
790
791         (WebKit::isFlagsChangedEvent):
792         Return whether a given event is a Cocoa flags changed event.
793
794         (WebKit::initializeKeyboardEvent):
795         If this is a flags changed event, set the event type to NPCocoaEventFlagsChanged.
796
797 2011-04-04  Anders Carlsson  <andersca@apple.com>
798
799         Reviewed by Darin Adler.
800
801         Don't discard the backing stores of WKViews in the key window
802         https://bugs.webkit.org/show_bug.cgi?id=57808
803         <rdar://problem/9110793>
804         <rdar://problem/9194284>
805         <rdar://problem/9222216>
806
807         * UIProcess/DrawingAreaProxy.h:
808         (WebKit::DrawingAreaProxy::setBackingStoreIsDiscardable):
809         Add empty stub.
810
811         * UIProcess/DrawingAreaProxyImpl.cpp:
812         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
813         Initialize m_isBackingStoreDiscardable to true.
814
815         (WebKit::DrawingAreaProxyImpl::setBackingStoreIsDiscardable):
816         Set m_isBackingStoreDiscardable and schedule or stop the discard backing store timer.
817
818         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon):
819         Don't start the timer if m_isBackingStoreDiscardable is false.
820
821         * UIProcess/DrawingAreaProxyImpl.h:
822         Add m_isBackingStoreDiscardable.
823
824         * UIProcess/WebPageProxy.cpp:
825         (WebKit::WebPageProxy::viewStateDidChange):
826         Mark the backing store as discardable if the view is hidden or if the containing window
827         is not active.
828
829 2011-04-04  Jade Han  <jade.han@nokia.com>
830
831         Reviewed by Csaba Osztrogonác.
832
833         Symbian build fix.
834         https://bugs.webkit.org/show_bug.cgi?id=54977
835
836         * config.h:
837
838 2011-04-04  Brady Eidson  <beidson@apple.com>
839
840         Rubberstamped by Adam Roben.
841
842         Add WKIconDatabase* headers to the WebKit2 export for Windows:
843         * win/WebKit2Generated.make:
844
845 2011-04-04  Anders Carlsson  <andersca@apple.com>
846
847         Reviewed by Dan Bernstein.
848
849         Get rid of WebContext::process() in more places
850         https://bugs.webkit.org/show_bug.cgi?id=57787
851
852         Migrate calls to WebContext::process() over to sendToAllProcesses and
853         sendToAllProcessesRelaunchingThemIfNecessary.
854
855         Add FIXMEs for things that need to be fixed in order to support multiple web processes.
856                 
857         * UIProcess/Downloads/DownloadProxy.cpp:
858         (WebKit::DownloadProxy::cancel):
859         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
860         (WebKit::WebPluginSiteDataManager::getSitesWithData):
861         (WebKit::WebPluginSiteDataManager::clearSiteData):
862         * UIProcess/VisitedLinkProvider.cpp:
863         (WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
864         * UIProcess/WebApplicationCacheManagerProxy.cpp:
865         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
866         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
867         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
868         * UIProcess/WebCookieManagerProxy.cpp:
869         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
870         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
871         * UIProcess/WebDatabaseManagerProxy.cpp:
872         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
873         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
874         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
875         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
876         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
877         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
878         * UIProcess/WebGeolocationManagerProxy.cpp:
879         (WebKit::WebGeolocationManagerProxy::providerDidChangePosition):
880         (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition):
881         * UIProcess/WebIconDatabase.cpp:
882         (WebKit::WebIconDatabase::getLoadDecisionForIconURL):
883         (WebKit::WebIconDatabase::didFinishURLImport):
884         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
885         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
886         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
887         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
888         * UIProcess/WebMediaCacheManagerProxy.cpp:
889         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
890         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
891         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
892         * UIProcess/WebResourceCacheManagerProxy.cpp:
893         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
894         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
895         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
896
897 2011-04-04  Alexey Proskuryakov  <ap@apple.com>
898
899         Reviewed by Dan Bernstein.
900
901         REGRESSION (WebKit2): Caps-Lock indicator sometimes doesn't appear in WebKit2
902         https://bugs.webkit.org/show_bug.cgi?id=51230
903         <rdar://problem/8780989>
904
905         <rdar://problem/9015250> REGRESSION (WebKit2): Key events not fired for modifier keys
906
907         * UIProcess/API/mac/WKView.mm:
908         (-[WKView flagsChanged:]): Ported from WebHTMLView.
909         (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
910         AppKit isn't happy about attempts to interpret NSFlagsChanged, but WK2 lacked the check.
911
912 2011-04-04  Steve Falkenburg  <sfalken@apple.com>
913
914         Reviewed by Adam Roben.
915
916         Remove unused AnalyzeWithLargeStack code from Windows build files
917         https://bugs.webkit.org/show_bug.cgi?id=57771
918         
919         This was used for us to build with prefast automatically,
920         but it is out-of-date and hasn't been used for some time.
921         Removing completely for now.
922
923         * win/WebKitPreBuild.cmd:
924
925 2011-04-04  Anders Carlsson  <andersca@apple.com>
926
927         Attempt to fix the Windows build.
928
929         * UIProcess/win/WebContextWin.cpp:
930         (WebKit::WebContext::setShouldPaintNativeControls):
931
932 2011-04-04  Anders Carlsson  <andersca@apple.com>
933
934         Reviewed by Adam Roben.
935
936         Make it easier to send a message to all processes in a context
937         https://bugs.webkit.org/show_bug.cgi?id=57776
938
939         Add WebContext::sendToAllProcesses and WebContext::sendToAllProcessesRelaunchingThemIfNecessary
940         as a first step towards getting rid of WebContext::process() and getting rid of a class of crashers
941         where WebContext::process() is null.
942
943         * UIProcess/WebContext.cpp:
944         (WebKit::WebContext::initializeHistoryClient):
945         (WebKit::WebContext::languageChanged):
946         (WebKit::WebContext::setAlwaysUsesComplexTextCodePath):
947         (WebKit::WebContext::registerURLSchemeAsEmptyDocument):
948         (WebKit::WebContext::registerURLSchemeAsSecure):
949         (WebKit::WebContext::setDomainRelaxationForbiddenForURLScheme):
950         (WebKit::WebContext::setCacheModel):
951         (WebKit::WebContext::setDefaultRequestTimeoutInterval):
952         (WebKit::WebContext::clearResourceCaches):
953         (WebKit::WebContext::clearApplicationCache):
954         (WebKit::WebContext::setEnhancedAccessibility):
955         (WebKit::WebContext::startMemorySampler):
956         Use sendToAllProcesses.
957
958         (WebKit::WebContext::stopMemorySampler):
959         Use sendToAllProcesses. This is a slight policy change where we now create a sandbox extension even
960         if there's no process around. Since this is a debugging tool it seems OK to do this.
961
962         * UIProcess/WebContext.h:
963         Get rid of hasValidProcess.
964
965         (WebKit::WebContext::sendToAllProcesses):
966         If we have a process and we can send messages to it, then do so.
967
968         (WebKit::WebContext::sendToAllProcessesRelaunchingThemIfNecessary):
969         Relaunch the web process and send the message.
970
971         * UIProcess/WebCookieManagerProxy.cpp:
972         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
973         (WebKit::WebCookieManagerProxy::deleteAllCookies):
974         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
975         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges):
976         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
977         Use sendToAllProcesses and sendToAllProcessesRelaunchingThemIfNecessary.
978
979 2011-04-04  Adam Roben  <aroben@apple.com>
980
981         Move a teensy bit of non-Mac-specific code up to LayerTreeHostCA
982
983         Fixes <http://webkit.org/b/57774> LayerTreeHostCA should know how to flip the root layer
984
985         Reviewed by Anders Carlsson.
986
987         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
988         (WebKit::LayerTreeHostCA::initialize): Cross-platformized and moved some code here...
989
990         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
991         (WebKit::LayerTreeHostCAMac::platformInitialize): ...from here.
992
993 2011-04-01  Enrica Casucci  <enrica@apple.com>
994
995         Reviewed by Darin Adler.
996
997         WK2: Reproducible crash when dragging out of or over Safari window.
998         https://bugs.webkit.org/show_bug.cgi?id=57654
999         <rdar://problem/9139755>
1000         
1001         AppKit does not retain the owner given to the pasteboard, therefore we
1002         need to give the ownership of the retained pointer to NSPasteboard.
1003         Also, dragImage will release the NSFilePromiseDragSource object, therefore
1004         we retain it before calling dragImage to be able to control its lifetime.
1005         
1006         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
1007         (WebKit::WebDragClient::declareAndWriteDragImage): Passing ownership
1008         of the pointer to AppKit when providing the owner pointer to the NSPasteboard
1009         object.
1010         * WebProcess/WebPage/mac/WebPageMac.mm:
1011         (WebKit::WebPage::platformDragEnded): Retaining the NSFilePromiseDragSource
1012         since dragImage will release it.
1013
1014 2011-03-30  Jer Noble  <jer.noble@apple.com>
1015
1016         Reviewed by Dan Bernstein.
1017
1018         WebKit2: No "open in preview" contextual menu item for PDFs
1019         https://bugs.webkit.org/show_bug.cgi?id=57527
1020
1021         Add support for opening a PDF in the associated application from the
1022         context menu.
1023
1024         * UIProcess/API/mac/PDFViewController.mm:
1025         (_applicationInfoForMIMEType): Added, copied from WebKit/WebPDFView.mm
1026         (-[WKPDFView _openWithFinder:]): Added.
1027         (-[WKPDFView hitTest:]): Added, copied from WebKit/WebPDFView.mm.
1028         (-[WKPDFView menuForEvent:]): Added, adapted from WebKit/WebPDFVie.mm.
1029         (-[WKPDFView validateUserInterfaceItem:]): Added.
1030
1031 2011-04-04  Chang Shu  <cshu@webkit.org>
1032
1033         Reviewed by Darin Adler.
1034
1035         WebKitTestRunner needs layoutTestController.setAllowFileAccessFromFileURLs
1036         https://bugs.webkit.org/show_bug.cgi?id=57572
1037
1038         * Shared/WebPreferencesStore.cpp:
1039         (WebKit::WebPreferencesStore::decode):
1040         (WebKit::WebPreferencesStore::overrideAllowFileAccessFromFileURLsForTestRunner):
1041         * Shared/WebPreferencesStore.h:
1042         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1043         (WKBundleSetAllowFileAccessFromFileURLs):
1044         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1045         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1046         (WebKit::InjectedBundle::setAllowFileAccessFromFileURLs):
1047         * WebProcess/InjectedBundle/InjectedBundle.h:
1048
1049 2011-04-04  Brady Eidson  <beidson@apple.com>
1050
1051         Reviewed by Darin Adler.
1052
1053         https://bugs.webkit.org/show_bug.cgi?id=57683
1054         Flesh out WK2 Icon Database API
1055
1056         For now the new API will add a client interface where the WK1 version used NSNotifications.
1057
1058         If we decide we'd like the granularity of specific callback functions later, 
1059         they can easily be added on.
1060
1061         Project file nonsense:
1062         * GNUmakefile.am:
1063         * WebKit2.pro:
1064         * WebKit2.xcodeproj/project.pbxproj:
1065         * win/WebKit2.vcproj:
1066
1067         Add a WKIconDatabaseClient and some new API:
1068         * UIProcess/API/C/WKIconDatabase.cpp:
1069         (WKIconDatabaseSetIconDatabaseClient):
1070         (WKIconDatabaseRemoveAllIcons):
1071         (WKIconDatabaseCheckIntegrityBeforeOpening):
1072         * UIProcess/API/C/WKIconDatabase.h:
1073         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp:
1074         (WKIconDatabaseTryGetCGImageForURL): Renamed to "try" for subtle clarification.
1075         * UIProcess/API/C/cg/WKIconDatabaseCG.h:
1076
1077         Implementations for the new APIs:
1078         * UIProcess/WebIconDatabase.cpp:
1079         (WebKit::WebIconDatabase::retainIconForPageURL): Remove excessive logging.
1080         (WebKit::WebIconDatabase::releaseIconForPageURL): Ditto.
1081         (WebKit::WebIconDatabase::imageForPageURL):
1082         (WebKit::WebIconDatabase::removeAllIcons):
1083         (WebKit::WebIconDatabase::checkIntegrityBeforeOpening):
1084         (WebKit::WebIconDatabase::initializeIconDatabaseClient):
1085         (WebKit::WebIconDatabase::didImportIconURLForPageURL): Dispatch a client callback,
1086           much like the WK1 API uses notifications.
1087         (WebKit::WebIconDatabase::didImportIconDataForPageURL): Ditto.
1088         (WebKit::WebIconDatabase::didChangeIconForPageURL): Ditto.
1089         (WebKit::WebIconDatabase::didRemoveAllIcons): Ditto.
1090         * UIProcess/WebIconDatabase.h:
1091         * UIProcess/WebIconDatabaseClient.cpp: Added.
1092         (WebKit::WebIconDatabaseClient::didChangeIconForPageURL):
1093         (WebKit::WebIconDatabaseClient::didRemoveAllIcons):
1094         * UIProcess/WebIconDatabaseClient.h: Added.
1095
1096 2011-04-04  Carlos Garcia Campos  <cgarcia@igalia.com>
1097
1098         Reviewed by Martin Robinson.
1099
1100         [GTK] Main loop sources are leaked in RunLoopGtk
1101         https://bugs.webkit.org/show_bug.cgi?id=57618
1102
1103         * Platform/RunLoop.h:
1104         (RunLoop::TimerBase::isRepeating):
1105         * Platform/gtk/RunLoopGtk.cpp:
1106         (RunLoop::~RunLoop): Make sure main loop is currently running
1107         before calling g_main_loop_quit(), RunLoop::stop() might have been
1108         called.
1109         (RunLoop::wakeUp): Use an idle source with default priority
1110         instead of a timeout one with a 0 interval.
1111         (RunLoop::TimerBase::clearTimerSource): New method to clear the
1112         timer.
1113         (RunLoop::TimerBase::destroyNotifyCallback): Destroy notify
1114         callback called when the source is destroyed to clear the timer.
1115         (RunLoop::TimerBase::timerFiredCallback): Use the same callback for
1116         repeating and no repeating timers.
1117         (RunLoop::TimerBase::start): g_source_attach() increments the
1118         source reference counter, so use GRefPtr to make sure the source
1119         is freed.
1120         (RunLoop::TimerBase::stop): Use clearTimerSource().
1121
1122 2011-04-03  Dan Bernstein  <mitz@apple.com>
1123
1124         Build fix.
1125
1126         * Shared/DictionaryPopupInfo.cpp:
1127         (WebKit::DictionaryPopupInfo::encode):
1128         (WebKit::DictionaryPopupInfo::decode):
1129         * Shared/DictionaryPopupInfo.h:
1130
1131 2011-04-03  Dan Bernstein  <mitz@apple.com>
1132
1133         Reviewed by Maciej Stachowiak.
1134
1135         <rdar://problem/9227839> REGRESSION: Reproducible crash in Snow Leopard when trying to show the Dictionary panel or application
1136         https://bugs.webkit.org/show_bug.cgi?id=57739
1137
1138         * Shared/DictionaryPopupInfo.cpp:
1139         (WebKit::DictionaryPopupInfo::encode): Do not encode the options dictionary on Snow Leopard.
1140         (WebKit::DictionaryPopupInfo::decode): Do not decode the options dictionary on Snow Leopard.
1141         * Shared/DictionaryPopupInfo.h: Removed the options member variable on Snow Leopard.
1142         * Shared/Plugins/PluginQuirks.h:
1143         * WebProcess/WebPage/mac/WebPageMac.mm:
1144         (WebKit::WebPage::performDictionaryLookupForRange): Do not set the options member variable on
1145         Snow Leopard.
1146
1147 2011-04-02  Sam Weinig  <sam@webkit.org>
1148
1149         Reviewed by Beth Dakin.
1150
1151         https://bugs.webkit.org/show_bug.cgi?id=57605
1152         Frame::pageScaleFactor() should not affect getBoundingClientRect() or 
1153         getClientRects()
1154         -and corresponding-
1155         <rdar://problem/9194541>
1156
1157         Add DRT support for the scaleWebView SPI.
1158         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1159         (WKBundlePageSetScaleAtOrigin):
1160         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
1161
1162 2011-04-02  Sam Weinig  <sam@webkit.org>
1163
1164         Reviewed by Oliver Hunt.
1165
1166         "Search in Spotlight" broken in WebKit2
1167         https://bugs.webkit.org/show_bug.cgi?id=57712
1168
1169         Proxy spotlight searching to the UIProcess.
1170
1171         * UIProcess/WebPageProxy.messages.in:
1172         Add new message. Re-organize messages to put all mac specific ones together.
1173
1174         * UIProcess/WebPageProxy.h:
1175         * UIProcess/mac/WebPageProxyMac.mm:
1176         (WebKit::WebPageProxy::speak):
1177         (WebKit::WebPageProxy::searchWithSpotlight):
1178         Moved code to trigger spotlight here. Use WTF::String -> NSString conversion function
1179         instead of relying on the built in conversion since it doesn't always work in the UIProcess.
1180
1181         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
1182         (WebKit::WebContextMenuClient::searchWithSpotlight):
1183         Post message to the UIProcess to do the searching.
1184
1185 2011-04-02  Jeff Miller  <jeffm@apple.com>
1186
1187         Reviewed by Dan Bernstein.
1188
1189         WebKit2: Specify the certificate store in WKBundleSetClientCertificate()
1190         https://bugs.webkit.org/show_bug.cgi?id=57707
1191
1192         Include the name of the system certificate store that the client certificate came from in WKBundleSetClientCertificate().
1193
1194         The PCCERT_CONTEXT for the client certificate we create from the message from the UI process doesn't contain enough information to actually use it in a request, we need to get the real certificate from the certificate store (which is typically the "MY" store).
1195
1196         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp:
1197         (WKBundleSetClientCertificate): Add certificateSystemStoreName to parameters.
1198         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Add certificateSystemStoreName to WKBundleSetClientCertificate() parameters.
1199         * WebProcess/InjectedBundle/InjectedBundle.h: Add certificateSystemStoreName to setClientCertificate() parameters.
1200         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
1201         (WebKit::InjectedBundle::setClientCertificate): Read the real certificate from the certificate store.
1202
1203 2011-04-02  Sam Weinig  <sam@webkit.org>
1204
1205         Reviewed by Dan Bernstein.
1206
1207         Implement WKBundleFrameHasHorizontalScrollbar/WKBundleFrameHasVerticalScrollbar
1208         <rdar://problem/9225772>
1209         https://bugs.webkit.org/show_bug.cgi?id=57709
1210
1211         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1212         (WKBundleFrameHasHorizontalScrollbar):
1213         (WKBundleFrameHasVerticalScrollbar):
1214         * WebProcess/InjectedBundle/API/c/WKBundleFrame.h:
1215         * WebProcess/WebPage/WebFrame.cpp:
1216         (WebKit::WebFrame::hasHorizontalScrollbar):
1217         (WebKit::WebFrame::hasVerticalScrollbar):
1218         * WebProcess/WebPage/WebFrame.h:
1219
1220 2011-04-01  Jon Lee  <jonlee@apple.com>
1221
1222         Reviewed by Darin Adler.
1223
1224         WebKit2: Type-to-select doesn't work in open <select> menu (53023)
1225         https://bugs.webkit.org/show_bug.cgi?id=53023
1226         <rdar://problem/8907678>
1227
1228         * UIProcess/WebPageProxy.h:
1229         * UIProcess/WebPageProxy.messages.in: adding new setPopupMenuSelectedIndex message for windows platform
1230         * UIProcess/win/WebPageProxyWin.cpp:
1231         (WebKit::WebPageProxy::setPopupMenuSelectedIndex):
1232         * UIProcess/win/WebPopupMenuProxyWin.h: moving setFocusedIndex() into public method
1233         * WebProcess/WebCoreSupport/WebPopupMenu.cpp:
1234         (WebKit::WebPopupMenu::updateFromElement): send message back to UIProcess to update the selected element
1235
1236 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
1237
1238         Reviewed by Darin Adler.
1239
1240         REGRESSION: Assertion failure when executing a complex custom key binding
1241         https://bugs.webkit.org/show_bug.cgi?id=57681
1242
1243         Also completes a fix for
1244         <rdar://problem/9063782> WebKit2: Text fields in Safari don't honor custom key bindings
1245
1246         * UIProcess/API/mac/WKView.mm: (-[WKView hasMarkedText]): There is no need to execute saved
1247         commands when they can't possibly change the result.
1248
1249 2011-04-01  Brian Weinstein  <bweinstein@apple.com>
1250
1251         Reviewed by Anders Carlsson.
1252
1253         Crash when calling WebPageProxy::setMemoryCacheClientCallsEnabled with an invalid Web Process
1254         https://bugs.webkit.org/show_bug.cgi?id=57680
1255         <rdar://problem/9202909>
1256
1257         * UIProcess/WebPageProxy.cpp:
1258         (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Add an isValid check before sending
1259             the message.
1260
1261 2011-03-31  Jer Noble  <jer.noble@apple.com>
1262
1263         Reviewed by Dan Bernstein.
1264
1265         WebKit2: Save as PDF in Safari provides Untitled as default file name
1266         https://bugs.webkit.org/show_bug.cgi?id=57529
1267
1268         Set the NSPrintOperation's jobTitle to the printing frame's title.
1269
1270         * UIProcess/API/mac/WKView.mm:
1271         (-[WKView printOperationWithPrintInfo:forFrame:]):
1272
1273 2011-04-01  Jer Noble  <jer.noble@apple.com>
1274
1275         Reviewed by Darin Adler.
1276
1277         WebKit2: Link from PDF opens in a new tab instead of in the same tab
1278         https://bugs.webkit.org/show_bug.cgi?id=57528
1279
1280         Notify the WebProcess that a link has been clicked so that the normal policy
1281         lookup can occur.
1282
1283         * Shared/WebEvent.cpp:
1284         (WebKit::WebEvent::WebEvent): Initialize ivars in the default constructor.
1285         * Shared/WebEvent.h: Add WebEvent::NoType to Type enum.
1286         * Shared/WebMouseEvent.cpp: 
1287         (WebKit::WebMouseEvent::WebMouseEvent): Ditto.
1288         * UIProcess/API/mac/PDFViewController.mm:
1289         (-[WKPDFView PDFViewWillClickOnLink:withURL:]): Handle the delegate
1290             function and override the PDFView default behavior.
1291         * UIProcess/WebPageProxy.cpp:
1292         (WebKit::WebPageProxy::didReceiveEvent): Handle the new WebEvent::NoType enum.
1293         (WebKit::WebPageProxy::linkClicked): Added.  Send event through to WebPage.
1294         * UIProcess/WebPageProxy.h:
1295         * WebProcess/WebPage/WebPage.cpp:
1296         (WebKit::WebPage::linkClicked): Added.  Call loadFrameRequest().
1297         * WebProcess/WebPage/WebPage.h:
1298         * WebProcess/WebPage/WebPage.messages.in: Added LinkClicked.
1299
1300 2011-04-01  Sam Weinig  <sam@webkit.org>
1301
1302         Reviewed by Adam "Keyword Slasher" Roben.
1303
1304         Remove unnecessary static keyword.
1305
1306         * UIProcess/API/cpp/WKRetainPtr.h:
1307         (WebKit::adoptWK):
1308
1309 2011-04-01  Sam Weinig  <sam@webkit.org>
1310
1311         Reviewed by Adam Roben.
1312
1313         Add adoptWK to WKRetainPtr.h
1314         https://bugs.webkit.org/show_bug.cgi?id=57670
1315
1316         * UIProcess/API/cpp/WKRetainPtr.h:
1317         (WebKit::adoptWK):
1318         Add shared implementation of adoptWK. Previously both WebKitTestRunner
1319         and TestWebKitAPI had separate versions of it.
1320
1321 2011-04-01  Anders Carlsson  <andersca@apple.com>
1322
1323         Reviewed by Sam Weinig.
1324
1325         Shockwave plug-in doesn't accept mouse events
1326         https://bugs.webkit.org/show_bug.cgi?id=57653
1327         <rdar://problem/8483273>
1328
1329         Add a missing break.
1330
1331         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1332         (WebKit::NetscapePlugin::convertPoint):
1333
1334 2011-04-01  Sam Weinig  <sam@webkit.org>
1335
1336         Reviewed by Anders Carlsson.
1337
1338         WebKitTestRunner needs layoutTestController.shadowRoot
1339         https://bugs.webkit.org/show_bug.cgi?id=57661
1340
1341         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1342         (WKBundleNodeHandleGetRenderRect):
1343         (WKBundleNodeHandleGetElementBounds):
1344         (WKBundleNodeHandleCopyElementShadowRoot):
1345         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1346         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1347         (WebKit::InjectedBundleNodeHandle::elementShadowRoot):
1348         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1349         Add accessor for the shadowRoot of an element in the bundle.
1350
1351 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
1352
1353         Reviewed by Darin Adler.
1354
1355         Make WebKit2 text input handling more like WebKit1
1356         https://bugs.webkit.org/show_bug.cgi?id=57649
1357
1358         We now send more sync messages from UI process to Web process for NSTextInput protocol
1359         methods. Some of the exchanges are avoided by pre-calculating the responses before asking
1360         UI process to interpret key events, and also with each sync message sent during
1361         interpretation, and which could change the state.
1362
1363         * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added a missing
1364         specialization for a function with 6 arguments and 2 returned values.
1365
1366         * Scripts/webkit2/messages.py: Added TextInputState to struct list.
1367
1368         * Shared/WebCoreArgumentCoders.h: Fixed a bug in CompositionUnderline encoding, which only
1369         encoded a part of Color field, and didn't match decoder.
1370
1371         * Shared/mac/TextInputState.h: Added. This is state that's needed for IM machinery and that
1372         we don't want to send sync messages for. This is similar to SelectionState, but the latter
1373         is only updated asynchronously, and is thus less reliable.
1374
1375         * UIProcess/API/mac/PageClientImpl.h: We don't "intercept", we "interpret".
1376
1377         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::interpretKeyEvent): Pass
1378         current text input state, and don't expect anything input method related in return, as input
1379         methods are now sync.
1380
1381         * UIProcess/API/mac/WKView.mm:
1382         (-[WKView doCommandBySelector:]):
1383         (-[WKView insertText:]):
1384         (-[WKView keyDown:]):
1385         (-[WKView _executeSavedKeypressCommands]):
1386         (-[WKView inputContext]):
1387         (-[WKView selectedRange]):
1388         (-[WKView hasMarkedText]):
1389         (-[WKView unmarkText]):
1390         (-[WKView setMarkedText:selectedRange:]):
1391         (-[WKView markedRange]):
1392         (-[WKView attributedSubstringFromRange:]):
1393         (-[WKView characterIndexForPoint:]):
1394         (-[WKView firstRectForCharacterRange:]):
1395         (-[WKView _interpretKeyEvent:withCachedTextInputState:savingCommandsTo:WebCore::]):
1396         * UIProcess/API/mac/WKViewInternal.h:
1397         * UIProcess/PageClient.h:
1398         * UIProcess/WebPageProxy.h:
1399         * UIProcess/WebPageProxy.messages.in:
1400         * UIProcess/mac/WebPageProxyMac.mm:
1401         (WebKit::WebPageProxy::setComposition):
1402         (WebKit::WebPageProxy::confirmComposition):
1403         (WebKit::WebPageProxy::insertText):
1404         (WebKit::WebPageProxy::getSelectedRange):
1405         (WebKit::WebPageProxy::executeKeypressCommands):
1406         (WebKit::WebPageProxy::interpretQueuedKeyEvent):
1407         * WebKit2.xcodeproj/project.pbxproj:
1408         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
1409         (WebKit::WebEditorClient::handleKeyboardEvent):
1410         (WebKit::WebEditorClient::handleInputMethodKeydown):
1411         * WebProcess/WebPage/WebPage.cpp:
1412         (WebKit::WebPage::WebPage):
1413         * WebProcess/WebPage/WebPage.h:
1414         (WebKit::WebPage::viewFrameInWindowCoordinates):
1415         * WebProcess/WebPage/WebPage.messages.in:
1416         * WebProcess/WebPage/mac/WebPageMac.mm:
1417         (WebKit::createSelectorExceptionMap):
1418         (WebKit::commandNameForSelectorName):
1419         (WebKit::currentTextInputState):
1420         (WebKit::frameForEvent):
1421         (WebKit::WebPage::executeKeypressCommandsInternal):
1422         (WebKit::WebPage::handleEditingKeyboardEvent):
1423         (WebKit::WebPage::setComposition):
1424         (WebKit::WebPage::confirmComposition):
1425         (WebKit::WebPage::insertText):
1426         (WebKit::WebPage::getSelectedRange):
1427         (WebKit::convertToRange):
1428         (WebKit::WebPage::executeKeypressCommands):
1429         (WebKit::WebPage::performDefaultBehaviorForKeyEvent):
1430         Rewrote to be more like WebKit1.
1431
1432 2011-04-01  Chang Shu  <cshu@webkit.org>
1433
1434         Reviewed by Darin Adler.
1435
1436         WebKitTestRunner needs layoutTestController.setDatabaseQuota
1437         https://bugs.webkit.org/show_bug.cgi?id=57568
1438
1439         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1440         (WKBundleSetDatabaseQuota):
1441         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1442         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1443         (WebKit::InjectedBundle::setDatabaseQuota):
1444         * WebProcess/InjectedBundle/InjectedBundle.h:
1445         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1446
1447 2011-04-01  Timothy Hatcher  <timothy@apple.com>
1448
1449         Make momentum scroll event latching work in WebKit2 on Mac.
1450
1451         <rdar://problem/8751861>
1452
1453         Reviewed by Darin Adler.
1454
1455         * Shared/mac/WebEventFactory.mm:
1456         (WebKit::momentumPhaseForEvent): Return a phase on older Mac system by using WKGetNSEventMomentumPhase.
1457         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1458         (InitWebCoreSystemInterface): Remove IsLatchingWheelEvent, add GetNSEventMomentumPhase.
1459
1460 2011-04-01  Alexey Proskuryakov  <ap@apple.com>
1461
1462         Reviewed by Anders Carlsson.
1463
1464         Assertion failure (type == event.type()) after a web process crash
1465         https://bugs.webkit.org/show_bug.cgi?id=56228
1466         <rdar://problem/8806106>
1467
1468         This partially un-confuses the UI process about key processing state after a web process
1469         crash. It may not be pefect yet - sending a KeyUp to a new process that never saw a KeyDown
1470         seems weird.
1471
1472         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash):
1473
1474 2011-04-01  Adam Roben  <aroben@apple.com>
1475
1476         Cairo build fix
1477
1478         * WebProcess/WebPage/LayerTreeHost.cpp: Only pull in the LayerTreeHostCA derived classes for
1479         PLATFORM(CA) ports.
1480
1481 2011-03-31  Adam Roben  <aroben@apple.com>
1482
1483         Split LayerTreeHostCA into a base class and derived Mac and Win classes
1484
1485         This will make it easier to customize the Mac and Windows implementations without adding too
1486         many #ifdefs.
1487
1488         Fixes <http://webkit.org/b/57606> Windows and Mac should use separate LayerTreeHost classes
1489
1490         Reviewed by Anders Carlsson.
1491
1492         * WebKit2.xcodeproj/project.pbxproj: Added LayerTreeHostCAMac.h.
1493
1494         * WebProcess/WebPage/LayerTreeHost.cpp:
1495         (WebKit::LayerTreeHost::create): Create a LayerTreeHostCAMac on Mac, and LayerTreeHostCAWin
1496         on Windows.
1497
1498         * WebProcess/WebPage/ca/LayerTreeHostCA.cpp:
1499         (WebKit::LayerTreeHostCA::LayerTreeHostCA): Moved some code from here...
1500         (WebKit::LayerTreeHostCA::initialize): ...to here. This function will be called after the
1501         constructor returns, and thus can safely call functions that are pure virtual in this class
1502         and its base class. We now pass our LayerTreeContext to platformInitialize so that our
1503         derived classes can initialize it.
1504         (WebKit::LayerTreeHostCA::~LayerTreeHostCA): Removed Mac-specific code.
1505
1506         (WebKit::LayerTreeHostCA::invalidate):
1507         (WebKit::LayerTreeHostCA::sizeDidChange):
1508         (WebKit::LayerTreeHostCA::forceRepaint):
1509         (WebKit::LayerTreeHostCA::didPerformScheduledLayerFlush):
1510         Removed platform* calls. Derived classes can just override these functions to do what they
1511         need.
1512
1513         * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed Mac-specific pieces. Made some functions
1514         virtual so that derived classes can override them.
1515
1516         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: Added.
1517
1518         * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm:
1519         (WebKit::LayerTreeHostCAMac::create): Create and initialize a host.
1520         (WebKit::LayerTreeHostCAMac::LayerTreeHostCAMac): Simple constructor.
1521         (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac): Moved code here from LayerTreeHostCA
1522         destructor.
1523         (WebKit::LayerTreeHostCAMac::platformInitialize): Removed direct uses of LayerTreeHostCA
1524         data members.
1525
1526         (WebKit::LayerTreeHostCAMac::invalidate):
1527         (WebKit::LayerTreeHostCAMac::sizeDidChange):
1528         (WebKit::LayerTreeHostCAMac::forceRepaint):
1529         (WebKit::LayerTreeHostCAMac::didPerformScheduledLayerFlush):
1530         Renamed from platform*. Now call up to the base class.
1531
1532         (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Updated type.
1533
1534         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp:
1535         (WebKit::LayerTreeHostCAWin::create): Create and initialize a host.
1536
1537         (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin):
1538         (WebKit::LayerTreeHostCAWin::~LayerTreeHostCAWin):
1539         (WebKit::LayerTreeHostCAWin::platformInitialize):
1540         (WebKit::LayerTreeHostCAWin::scheduleLayerFlush):
1541         Stubbed out.
1542
1543         * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added.
1544
1545         * win/WebKit2.vcproj: Added LayerTreeHostCAWin.h
1546
1547         * win/WebKit2Apple.vsprops: Added WebProcess/WebPage/ca/win to the include path.
1548
1549 2011-03-31  Brent Fulgham  <bfulgham@webkit.org>
1550
1551         Unreviewed WinCairo build fix after r82632.
1552
1553         * UIProcess/DrawingAreaProxyImpl.cpp:
1554         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
1555
1556 2011-03-31  Adam Roben  <aroben@apple.com>
1557
1558         Add SharedMemory::adopt, which can take ownership of an existing file mapping object
1559
1560         Fixes <http://webkit.org/b/57599> Need a way to wrap an existing file mapping object in a
1561         SharedMemory
1562
1563         Reviewed by Anders Carlsson.
1564
1565         * Platform/SharedMemory.h: Added adopt.
1566
1567         * Platform/win/SharedMemoryWin.cpp:
1568         (WebKit::SharedMemory::create): Moved code to adopt the HANDLE from here...
1569         (WebKit::SharedMemory::adopt): ...to here.
1570
1571 2011-03-31  Chang Shu  <cshu@webkit.org>
1572
1573         Reviewed by Darin Adler.
1574
1575         WebKitTestRunner needs layoutTestController.clearAllDatabases
1576         https://bugs.webkit.org/show_bug.cgi?id=42540
1577
1578         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
1579         (WKBundleClearAllDatabases):
1580         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
1581         * WebProcess/InjectedBundle/InjectedBundle.cpp:
1582         (WebKit::InjectedBundle::clearAllDatabases):
1583         * WebProcess/InjectedBundle/InjectedBundle.h:
1584         * WebProcess/WebCoreSupport/WebDatabaseManager.h:
1585
1586 2011-03-31  Anders Carlsson  <andersca@apple.com>
1587
1588         Reviewed by Sam Weinig.
1589
1590         Add some more media related things to the sandbox profile.
1591
1592         * WebProcess/com.apple.WebProcess.sb:
1593
1594 2011-03-31  Anders Carlsson  <andersca@apple.com>
1595
1596         Reviewed by Dan Bernstein.
1597
1598         Tabbed pages redraw unnecessarily when activated
1599         https://bugs.webkit.org/show_bug.cgi?id=57589
1600         <rdar://problem/9218258>
1601
1602         * UIProcess/DrawingAreaProxyImpl.cpp:
1603         (WebKit::DrawingAreaProxyImpl::visibilityDidChange):
1604         If we become visible and have no backing store, make sure to call backingStoreStateDidChange
1605         so that the next time we're asked to paint we'll wait for something to paint.
1606
1607         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1608         Remove now redundant call to backingStoreStateDidChange.
1609
1610 2011-03-31  Sam Weinig  <sam@webkit.org>
1611
1612         Reviewed by Anders Carlsson.
1613
1614         Sandbox violations when playing back HTML5 video on YouTube
1615         <rdar://problem/8950692>
1616
1617         * WebProcess/com.apple.WebProcess.sb:
1618
1619 2011-03-31  Darin Adler  <darin@apple.com>
1620
1621         Reviewed by Sam Weinig.
1622
1623         Implement mouseDown, mouseUp, and mouseMoveTo in WebKitTestRunner
1624         https://bugs.webkit.org/show_bug.cgi?id=57573
1625
1626         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1627         (WKBundlePageSimulateMouseDown): Added.
1628         (WKBundlePageSimulateMouseUp): Added.
1629         (WKBundlePageSimulateMouseMotion): Added.
1630         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Added above functions.
1631         * WebProcess/WebPage/WebPage.cpp:
1632         (WebKit::WebPage::simulateMouseDown): Added.
1633         (WebKit::WebPage::simulateMouseUp): Added.
1634         (WebKit::WebPage::simulateMouseMotion): Added.
1635         * WebProcess/WebPage/WebPage.h: Added above functions.
1636
1637 2011-03-31  Sam Weinig  <sam@webkit.org>
1638
1639         Reviewed by Anders Carlsson.
1640
1641         Rename WebCore's UI_STRING to WEB_UI_STRING to not overlap with WebKit API
1642         https://bugs.webkit.org/show_bug.cgi?id=57582
1643
1644         * PluginProcess/mac/PluginProcessMac.mm:
1645         (WebKit::PluginProcess::platformInitialize):
1646         * UIProcess/mac/WebInspectorProxyMac.mm:
1647         (WebKit::WebInspectorProxy::platformInspectedURLChanged):
1648         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1649         * WebProcess/mac/WebProcessMac.mm:
1650         (WebKit::WebProcess::platformInitializeWebProcess):
1651
1652 2011-03-31  Adam Roben  <aroben@apple.com>
1653
1654         Specify both FILE_MAP_READ and FILE_MAP_WRITE when creating a read-write SharedMemory object
1655
1656         When passed to ::MapViewOfFile, FILE_MAP_WRITE implies FILE_MAP_READ, but other file mapping
1657         APIs don't work that way. This bug wasn't causing any problems in practice, but it would
1658         have prevented us from creating a DIB that wraps a SharedMemory object (which I noticed
1659         while working on another bug).
1660
1661         Fixes <http://webkit.org/b/57576> File mappings used by read-write SharedMemory objects
1662         aren't correctly marked as read-write after being sent over a CoreIPC::Connection
1663
1664         Reviewed by Brian Weinstein.
1665
1666         * Platform/win/SharedMemoryWin.cpp:
1667         (WebKit::accessRights): Specify FILE_MAP_READ in addition to FILE_MAP_WRITE for read-write
1668         SharedMemory.
1669
1670 2011-03-31  Adam Roben  <aroben@apple.com>
1671
1672         Quote the executable path we pass to ::CreateProcessW
1673
1674         This will ensure that spaces in the path will be interpreted correctly.
1675
1676         Fixes <http://webkit.org/b/57569> Web process sometimes fails to launch when there are
1677         spaces in its path
1678
1679         Reviewed by Steve Falkenburg.
1680
1681         * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
1682         (WebKit::ProcessLauncher::launchProcess): Surround the executable path in quotes.
1683
1684 2011-03-31  Alexey Proskuryakov  <ap@apple.com>
1685
1686         Patch by John Harvey, reviewed and tweaked by me.
1687
1688         <rdar://problem/8644403> Should notify TSM that plug-ins would show a bottom input window for marked text.
1689
1690         * UIProcess/API/mac/WKTextInputWindowController.mm:
1691         (-[WKTextInputPanel _interpretKeyEvent:string:]):
1692
1693 2011-03-31  Anders Carlsson  <andersca@apple.com>
1694
1695         Reviewed by John Sullivan, Darin Adler, Dan Bernstein and Sam Weinig.
1696
1697         If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
1698         https://bugs.webkit.org/show_bug.cgi?id=57561
1699         <rdar://problem/9127411>
1700
1701         Ensure that any readwrite sandbox directories actually exist before entering the sandbox.
1702
1703         * WebProcess/mac/WebProcessMac.mm:
1704         (WebKit::appendReadwriteSandboxDirectory):
1705
1706 2011-03-31  John Sullivan  <sullivan@apple.com>
1707
1708         Reviewed by Darin Adler and Adam Roben.
1709
1710         <rdar://problem/9214824> Find client not told when WKPageCountStringMatches exceeds maximum
1711         https://bugs.webkit.org/show_bug.cgi?id=57552
1712
1713         * WebProcess/WebPage/FindController.cpp:
1714         (WebKit::FindController::countStringMatches):
1715         Use the same technique as findString() to report kWKMoreThanMaximumMatchCount when appropriate.
1716         (WebKit::FindController::findString):
1717         Convert numeric_limits::max() to max() - 1 to avoid overflow case.
1718
1719 2011-03-31  Evan Martin  <evan@chromium.org>
1720
1721         Reviewed by Eric Seidel.
1722
1723         <title> should support dir attribute
1724         https://bugs.webkit.org/show_bug.cgi?id=50961
1725
1726         Update to new FrameLoaderClient interface.
1727
1728         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1729         (WebKit::WebFrameLoaderClient::dispatchDidReceiveTitle):
1730         (WebKit::WebFrameLoaderClient::setTitle):
1731         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1732
1733 2011-03-31  Balazs Kelemen  <kbalazs@webkit.org>
1734
1735         Reviewed by Csaba Osztrogonác.
1736
1737         [WK2] Introduce an option for no NPAPI support
1738         https://bugs.webkit.org/show_bug.cgi?id=55828
1739
1740         Stub out NPAPI support for platform and OS combinations that are
1741         not supported yet. Ancestor patch was made by Laszlo Gombos.
1742
1743         * GNUmakefile.am: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
1744         to the build system.
1745
1746         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
1747         Remove the sanity check because from now all combinations that
1748         don't have an explicitly set plugin architecture fall into
1749         the PLUGIN_ARCHITECTURE(UNSUPPORTED) category and has a stubbed
1750         implementation.
1751
1752         * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: Added.
1753         Stubbed implementation.
1754         (WebKit::NetscapePluginModule::getPluginInfo):
1755         (WebKit::NetscapePluginModule::determineQuirks):
1756
1757         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: Guard with
1758         PLUGIN_ARCHITECTURE(X11).
1759
1760         * WebKit2.pro: Add NetscapePluginModuleNone.cpp and NetscapePluginNone.cpp
1761         to the build system.
1762
1763         * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: Added.
1764         Stubbed implementation
1765         (WebKit::NetscapePlugin::platformPostInitialize):
1766         (WebKit::NetscapePlugin::platformDestroy):
1767         (WebKit::NetscapePlugin::platformInvalidate):
1768         (WebKit::NetscapePlugin::platformGeometryDidChange):
1769         (WebKit::NetscapePlugin::platformPaint):
1770         (WebKit::NetscapePlugin::platformHandleMouseEvent):
1771         (WebKit::NetscapePlugin::platformHandleWheelEvent):
1772         (WebKit::NetscapePlugin::platformSetFocus):
1773         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent):
1774         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent):
1775         (WebKit::NetscapePlugin::platformHandleKeyboardEvent):
1776
1777         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Guard with
1778         PLUGIN_ARCHITECTURE(X11)
1779
1780         * config.h: Introduce PLUGIN_ARCHITECTURE(UNSUPPORTED) as another
1781         option. Make platform and OS combinations that are not supported
1782         yet fall into this. Don't use Q_WS_X11 to test the window system
1783         for Qt because it is not defined without including <QtGlobal>.
1784         No clue about how could it work so far.
1785
1786 2011-03-31  Vamshikrishna.Yellenki  <vamshi@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1787
1788         Reviewed by Martin Robinson.
1789
1790         Implement MiniBrowser for Gtk port.
1791         https://bugs.webkit.org/show_bug.cgi?id=48512
1792
1793         * Shared/API/c/gtk/WKBaseGtk.h: Add the stdbool.h include.
1794
1795 2011-03-30  Dan Bernstein  <mitz@apple.com>
1796
1797         Reviewed by Maciej Stachowiak.
1798
1799         <rdar://problem/9005982> Flash of white when a WKView with composited content moves on-screen
1800         https://bugs.webkit.org/show_bug.cgi?id=57522
1801
1802         * UIProcess/DrawingAreaProxyImpl.cpp:
1803         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode): Invalidate the current
1804         backing store state, so that we get an update as soon as the page enters compositing mode
1805         next.
1806         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1807         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Added a call to
1808         LayerTreeHost::forceRepaint() in order to flush and synchronize the layers
1809         before sending the update message to the UI process.
1810
1811 2011-03-30  Sam Weinig  <sam@webkit.org>
1812
1813         Reviewed by Anders Carlsson.
1814
1815         Sandbox violations if you navigate a file URL via something other than a click
1816         <rdar://problem/9016086>
1817         https://bugs.webkit.org/show_bug.cgi?id=57519
1818
1819         * WebProcess/WebPage/WebPage.cpp:
1820         (WebKit::shouldReuseCommittedSandboxExtension):
1821         Remove unnecessary restriction on extension reuse. Any type of file to file navigation
1822         should be allowed.
1823
1824 2011-03-30  Anders Carlsson  <andersca@apple.com>
1825
1826         Reviewed by Sam Weinig.
1827
1828         Clean up the sandbox parameter code
1829         https://bugs.webkit.org/show_bug.cgi?id=57518
1830
1831         * Shared/WebProcessCreationParameters.h:
1832         Make nsURLCachePath and uiProcessBundleResourcePath Strings to match the other paths we send over.
1833
1834         * UIProcess/mac/WebContextMac.mm:
1835         (WebKit::WebContext::platformInitializeWebProcess):
1836         nsURLCachePath and uiProcessBundleResourcePath are now Strings.
1837
1838         * WebProcess/mac/WebProcessMac.mm:
1839         (WebKit::appendSandboxParameterPathInternal):
1840         (WebKit::appendReadwriteConfDirectory):
1841         (WebKit::appendReadonlySandboxDirectory):
1842         (WebKit::appendReadwriteSandboxDirectory):
1843         (WebKit::initializeSandbox):
1844         Make it more clear whether the directories we're adding are readonly or readwrite. No functionality change.
1845         
1846         (WebKit::WebProcess::platformInitializeWebProcess):
1847         nsURLCachePath is now a string.
1848
1849 2011-03-30  Anders Carlsson  <andersca@apple.com>
1850
1851         Reviewed by Sam Weinig.
1852
1853         Downloading a file fails due to a sandbox violation if the destination path is a symlink
1854         https://bugs.webkit.org/show_bug.cgi?id=57517
1855         <rdar://problem/8943865>
1856
1857         Make sure to resolve any symlinks in the given path when creating a sandbox extension handle.
1858         Note that we can't use realpath or -[NSString stringByResolvingSymlinksInPath], because those calls
1859         will fail if the pointed to file doesn't exist.
1860
1861         * Shared/mac/SandboxExtensionMac.mm:
1862         (WebKit::resolveSymlinksInPath):
1863         New function that resolves all the symlinks in the given path.
1864
1865         (WebKit::SandboxExtension::createHandle):
1866         Call resolveSymlinksInPath on the resulting path.
1867
1868 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1869
1870         Reviewed by Adam Roben.
1871
1872         Share most vsprops between Release and Production builds in releaseproduction.vsprops
1873         https://bugs.webkit.org/show_bug.cgi?id=57508
1874
1875         * win/WebKit2Production.vsprops:
1876         * win/WebKit2Release.vsprops:
1877         * win/WebKit2ReleaseCairoCFLite.vsprops:
1878         * win/WebKit2WebProcessProduction.vsprops:
1879         * win/WebKit2WebProcessRelease.vsprops:
1880         * win/WebKit2WebProcessReleaseCairoCFLite.vsprops:
1881
1882 2011-03-30  Ivan Krstić  <ike@apple.com>
1883
1884         Reviewed by Oliver Hunt.
1885
1886         Ensure consistent, readable working directory for WebProcess before entering sandbox
1887         <rdar://problem/8951176>
1888
1889         * WebProcess/mac/WebProcessMac.mm:
1890         (WebKit::WebProcess::platformInitializeWebProcess):
1891
1892 2011-03-30  Sam Weinig  <sam@webkit.org>
1893
1894         Reviewed by Brady Eidson.
1895
1896         WebKit2: Attempting to view css file from url causes it to download
1897         <rdar://problem/9102611>
1898         https://bugs.webkit.org/show_bug.cgi?id=57501
1899
1900         * UIProcess/WebPageProxy.cpp:
1901         (WebKit::WebPageProxy::canShowMIMEType):
1902         Match WebKit1 by allowing any MIME type that starts with "text/"
1903         except the ones we explicitly blacklist.
1904
1905 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1906
1907         Reviewed by Adam Roben.
1908
1909         Update Windows production build logic for new production configurations
1910         https://bugs.webkit.org/show_bug.cgi?id=57494
1911
1912         * win/WebKit2.make:
1913         * win/WebKit2Production.vsprops:
1914         * win/WebKit2WebProcessProduction.vsprops:
1915
1916 2011-03-30  Steve Falkenburg  <sfalken@apple.com>
1917
1918         Reviewed by Adam Roben.
1919
1920         Rename Windows configuration Release_LTCG to Production for clarity
1921         https://bugs.webkit.org/show_bug.cgi?id=57465
1922
1923         * win/WebKit2.submit.sln:
1924         * win/WebKit2.vcproj:
1925         * win/WebKit2Generated.vcproj:
1926         * win/WebKit2Production.vsprops: Copied from Source/WebKit2/win/WebKit2ReleaseLTCG.vsprops.
1927         * win/WebKit2ReleaseLTCG.vsprops: Removed.
1928         * win/WebKit2WebProcess.vcproj:
1929         * win/WebKit2WebProcessProduction.vsprops: Copied from Source/WebKit2/win/WebKit2WebProcessReleaseLTCG.vsprops.
1930         * win/WebKit2WebProcessReleaseLTCG.vsprops: Removed.
1931
1932 2011-03-30  Jer Noble  <jer.noble@apple.com>
1933
1934         Reviewed by Dan Bernstein.
1935
1936         WebKit2: WebProcess is using 89%, while viewing a PDF
1937         https://bugs.webkit.org/show_bug.cgi?id=57471
1938
1939         Break a never ending display/update cycle between the UIProcess and the WebProcess
1940         by clearing the dirty region when a page has a custom representation (like a PDF).
1941         Also, avoid the issue where possible by not setting the dirty region in the same case.
1942
1943         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1944         (WebKit::DrawingAreaImpl::setNeedsDisplay): Bail early if mainFrameHasCustomRepresentation().
1945         (WebKit::DrawingAreaImpl::scroll): Ditto.
1946         (WebKit::DrawingAreaImpl::display): Both bail early and clear m_dirtyRegion if 
1947             mainFrameHasCustomRepresentation().
1948
1949 2011-03-30  Sam Weinig  <sam@webkit.org>
1950
1951         Fix Snow Leopard build.
1952
1953         * UIProcess/mac/WebContextMenuProxyMac.mm:
1954         (WebKit::WebContextMenuProxyMac::showContextMenu):
1955
1956 2011-03-30  Sam Weinig  <sam@webkit.org>
1957
1958         Reviewed by Anders Carlsson.
1959
1960         WebKit2 contextual menu looks different than the rest of the OS
1961         <rdar://problem/9172935>
1962         https://bugs.webkit.org/show_bug.cgi?id=57475
1963
1964         * UIProcess/mac/WebContextMenuProxyMac.mm:
1965         (WebKit::WebContextMenuProxyMac::showContextMenu):
1966         Use correct SPI for showing a context menu. The dummy view is also
1967         not necessary, so remove it.
1968
1969 2011-03-30  Anders Carlsson  <andersca@apple.com>
1970
1971         Reviewed by Sam Weinig.
1972
1973         Crash when NPN_Evaluate removes the plug-in frame
1974         https://bugs.webkit.org/show_bug.cgi?id=57474
1975         <rdar://problem/9191396>
1976
1977         Get a reference to the frame since it can be nulled out if running the JavaScript code
1978         causes the plug-in's containing frame to be removed from the frame tree.
1979
1980         * WebProcess/Plugins/PluginView.cpp:
1981         (WebKit::PluginView::evaluate):
1982
1983 2011-03-30  Sam Weinig  <sam@webkit.org>
1984
1985         Reviewed by Anders Carlsson.
1986
1987         Add default localization strategy that can be shared by WebKit1 and WebKit2
1988         https://bugs.webkit.org/show_bug.cgi?id=57406
1989
1990         * Shared/WebLocalizableStrings.h: Removed.
1991         Removed in favor of using WebCore/LocalizedStrings.h directly.
1992
1993         * PluginProcess/mac/PluginProcessMac.mm:
1994         * UIProcess/API/mac/WKView.mm:
1995         * UIProcess/mac/WebInspectorProxyMac.mm:
1996         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
1997         * WebProcess/mac/WebProcessMac.mm:
1998         Use WebCore/LocalizedStrings.h directly.
1999
2000         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2001         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2002         Remove localization strategy override in favor of using new default implementation.
2003
2004         * GNUmakefile.am:
2005         * WebKit2.pro:
2006         * WebKit2.xcodeproj/project.pbxproj:
2007         * win/WebKit2.vcproj:
2008         Remove WebLocalizableStrings.h
2009
2010 2011-03-30  Anders Carlsson  <andersca@apple.com>
2011
2012         Reviewed by Adam Roben.
2013
2014         Assertion failure in plug-in process when calling WKPluginSiteDataManagerGetSitesWithData
2015         https://bugs.webkit.org/show_bug.cgi?id=57468
2016         <rdar://problem/9199089>
2017
2018         Call decrementLoadCount from removeWebProcessConnection instead of startShutdownTimerIfNecessary,
2019         otherwise we'll get a load count underflow when a connection is never created.
2020
2021         * PluginProcess/PluginProcess.cpp:
2022         (WebKit::PluginProcess::removeWebProcessConnection):
2023         (WebKit::PluginProcess::createWebProcessConnection):
2024         (WebKit::PluginProcess::startShutdownTimerIfNecessary):
2025
2026 2011-03-30  Jessie Berlin  <jberlin@apple.com>
2027
2028         Reviewed by Anders Carlsson.
2029
2030         WebKit2: Make sure to try to terminate the Web Process when any work that might require the
2031         Web Process to be relaunched is done
2032         https://bugs.webkit.org/show_bug.cgi?id=57462
2033
2034         For the ManagerProxies in the UIProcess, only return true from shouldTerminate if there are
2035         no more callbacks waiting to be invoked.
2036
2037         For the the Managers in the WebProcess, call WebProcess::shared().terminateIfPossible() when
2038         any work called for by a ManagerProxy function that called relaunchProcessIfNecessary is
2039         finished.
2040
2041         * UIProcess/WebContext.cpp:
2042         (WebKit::WebContext::shouldTerminate):
2043         Check with each of the ManagerProxies.
2044
2045         * UIProcess/WebApplicationCacheManagerProxy.cpp:
2046         (WebKit::WebApplicationCacheManagerProxy::shouldTerminate):
2047         * UIProcess/WebApplicationCacheManagerProxy.h:
2048         * UIProcess/WebCookieManagerProxy.cpp:
2049         (WebKit::WebCookieManagerProxy::shouldTerminate):
2050         * UIProcess/WebCookieManagerProxy.h:
2051         * UIProcess/WebDatabaseManagerProxy.cpp:
2052         (WebKit::WebDatabaseManagerProxy::shouldTerminate):
2053         * UIProcess/WebDatabaseManagerProxy.h:
2054         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
2055         (WebKit::WebKeyValueStorageManagerProxy::shouldTerminate):
2056         * UIProcess/WebKeyValueStorageManagerProxy.h:
2057         * UIProcess/WebMediaCacheManagerProxy.cpp:
2058         (WebKit::WebMediaCacheManagerProxy::shouldTerminate):
2059         * UIProcess/WebMediaCacheManagerProxy.h:
2060         * UIProcess/WebResourceCacheManagerProxy.cpp:
2061         (WebKit::WebResourceCacheManagerProxy::shouldTerminate):
2062         * UIProcess/WebResourceCacheManagerProxy.h:
2063
2064         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp:
2065         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
2066         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
2067         (WebKit::WebApplicationCacheManager::deleteAllEntries):
2068         * WebProcess/Cookies/WebCookieManager.cpp:
2069         (WebKit::WebCookieManager::getHostnamesWithCookies):
2070         (WebKit::WebCookieManager::deleteCookiesForHostname):
2071         (WebKit::WebCookieManager::deleteAllCookies):
2072         (WebKit::WebCookieManager::startObservingCookieChanges):
2073         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
2074         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
2075         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
2076         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
2077         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
2078         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
2079         * WebProcess/MediaCache/WebMediaCacheManager.cpp:
2080         (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache):
2081         (WebKit::WebMediaCacheManager::clearCacheForHostname):
2082         (WebKit::WebMediaCacheManager::clearCacheForAllHostnames):
2083         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2084         (WebKit::WebResourceCacheManager::getCacheOrigins):
2085         (WebKit::WebResourceCacheManager::clearCacheForOrigin):
2086         (WebKit::WebResourceCacheManager::clearCacheForAllOrigins):
2087         * WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
2088         (WebKit::WebDatabaseManager::getDatabasesByOrigin):
2089         (WebKit::WebDatabaseManager::getDatabaseOrigins):
2090         (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin):
2091         (WebKit::WebDatabaseManager::deleteDatabasesForOrigin):
2092         (WebKit::WebDatabaseManager::deleteAllDatabases):
2093         (WebKit::WebDatabaseManager::setQuotaForOrigin):
2094
2095 2011-03-30  Adam Roben  <aroben@apple.com>
2096
2097         Mac build fix after r82442
2098
2099         * WebProcess/Plugins/PluginProxy.cpp:
2100         (WebKit::PluginProxy::geometryDidChange): Added a missing argument.
2101
2102 2011-03-29  Adam Roben  <aroben@apple.com>
2103
2104         Add a way to specify that a ShareableBitmap has no alpha channel
2105
2106         Before this patch, all ShareableBitmaps had an alpha channel. With this patch, all
2107         ShareableBitmaps *still* have an alpha channel. But now there's a way to specify you don't
2108         want one (which will be used in the future)!
2109
2110         Fixes <http://webkit.org/b/57388> Need a way to specify that a ShareableBitmap has no alpha
2111         channel
2112
2113         Reviewed by Anders Carlsson.
2114
2115         * Shared/ShareableBitmap.cpp:
2116         (WebKit::ShareableBitmap::Handle::Handle): Moved here from the header file, and added
2117         initialization of m_flags.
2118
2119         (WebKit::ShareableBitmap::Handle::encode):
2120         (WebKit::ShareableBitmap::Handle::decode):
2121         Encode/decode m_flags.
2122
2123         (WebKit::ShareableBitmap::create):
2124         (WebKit::ShareableBitmap::createShareable):
2125         Pass along the new Flags argument.
2126
2127         (WebKit::ShareableBitmap::createHandle): Store our Flags on the Handle.
2128         (WebKit::ShareableBitmap::ShareableBitmap): Store the Flags in m_flags.
2129
2130         * Shared/ShareableBitmap.h: Added Flag, Flags, and m_flags, and added a Flags argument to
2131         some create functions.
2132
2133         * Shared/WebCoreArgumentCoders.cpp:
2134         (CoreIPC::encodeImage):
2135         * Shared/WebImage.cpp:
2136         (WebKit::WebImage::create):
2137         Specify that we want a bitmap that supports alpha to maintain current behavior.
2138
2139         * Shared/cg/ShareableBitmapCG.cpp:
2140         (WebKit::bitmapInfo): New helper function. Includes an alpha channel only if specified in
2141         the flags.
2142
2143         (WebKit::ShareableBitmap::createGraphicsContext):
2144         (WebKit::ShareableBitmap::makeCGImage):
2145         Use the new helper function.
2146
2147         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
2148         (WebKit::NetscapePlugin::snapshot):
2149         * WebProcess/Plugins/PluginProxy.cpp:
2150         (WebKit::PluginProxy::geometryDidChange):
2151         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2152         (WebKit::convertImageToBitmap):
2153         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2154         (WebKit::WebPopupMenu::setUpPlatformData):
2155         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2156         (WebKit::DrawingAreaImpl::display):
2157         * WebProcess/WebPage/FindController.cpp:
2158         (WebKit::FindController::updateFindIndicator):
2159         Specify that we want a bitmap that supports alpha to maintain current behavior.
2160
2161 2011-03-29  Adam Roben  <aroben@apple.com>
2162
2163         Add ShareableBitmap::Handle
2164
2165         This object is used for encoding/decoding a ShareableBitmap via CoreIPC. It currently just
2166         encapsulates a SharedMemory::Handle (which is what we were using previously) and the image's
2167         size (which means callers no longer need to deal with the size explicitly), but in the
2168         future could be used to store more information about the bitmap.
2169
2170         This should cause no behavior changes.
2171
2172         Fixes <http://webkit.org/b/57397> ShareableBitmap needs its own Handle type
2173
2174         Reviewed by Anders Carlsson.
2175
2176         * PluginProcess/PluginControllerProxy.cpp:
2177         (WebKit::PluginControllerProxy::geometryDidChange): No longer need to pass a size to create,
2178         since the Handle records the size.
2179         (WebKit::PluginControllerProxy::snapshot): No longer need the bufferSize argument, since the
2180         Handle records the size.
2181
2182         * PluginProcess/PluginControllerProxy.h:
2183         * PluginProcess/PluginControllerProxy.messages.in:
2184         Updated Handle types and removed unnecessary size argument to Snapshot.
2185
2186         * Shared/PlatformPopupMenuData.cpp:
2187         (WebKit::PlatformPopupMenuData::encode):
2188         (WebKit::PlatformPopupMenuData::decode):
2189         * Shared/PlatformPopupMenuData.h:
2190         Changed to use ShareableBitmap::Handle and removed m_backingStoreSize, which is now stored
2191         in the Handles.
2192
2193         * Shared/ShareableBitmap.cpp:
2194         (WebKit::ShareableBitmap::Handle::encode):
2195         (WebKit::ShareableBitmap::Handle::decode):
2196         Simple encode/decode functions.
2197
2198         (WebKit::ShareableBitmap::create): Get the size from the Handle instead of as a separate
2199         argument.
2200         (WebKit::ShareableBitmap::createHandle): Store our size in the Handle.
2201
2202         * Shared/ShareableBitmap.h: Added ShareableBitmap::Handle and made some functions use it.
2203
2204         * Shared/UpdateInfo.h: Changed to use ShareableBitmap::Handle.
2205
2206         * Shared/UserMessageCoders.h:
2207         (WebKit::UserMessageEncoder::baseEncode):
2208         (WebKit::UserMessageDecoder::baseDecode):
2209         * Shared/WebCoreArgumentCoders.cpp:
2210         (CoreIPC::encodeImage):
2211         (CoreIPC::decodeImage):
2212         Use the size stored in the Handle instead of encoding/decoding one separately.
2213
2214         * UIProcess/API/mac/PageClientImpl.h:
2215         * UIProcess/API/mac/PageClientImpl.mm:
2216         (WebKit::PageClientImpl::setDragImage):
2217         Removed the unnecessary imageSize argument. We can get it from the image itself.
2218
2219         * UIProcess/BackingStore.cpp:
2220         (WebKit::BackingStore::incorporateUpdate):
2221         * UIProcess/FindIndicator.cpp:
2222         (WebKit::FindIndicator::create):
2223         No longer need to pass a size when creating a ShareableBitmap from a Handle.
2224
2225         * UIProcess/FindIndicator.h: Changed to use ShareableBitmap::Handle.
2226
2227         * UIProcess/PageClient.h: Removed unnecessary imageSize argument from setDragImage.
2228
2229         * UIProcess/WebPageProxy.cpp:
2230         (WebKit::WebPageProxy::setFindIndicator):
2231         * UIProcess/WebPageProxy.h:
2232         * UIProcess/WebPageProxy.messages.in:
2233         * UIProcess/mac/WebPageProxyMac.mm:
2234         (WebKit::WebPageProxy::setDragImage):
2235         * WebProcess/Plugins/PluginProxy.cpp:
2236         (WebKit::PluginProxy::snapshot):
2237         (WebKit::PluginProxy::geometryDidChange):
2238         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
2239         (WebKit::WebDragClient::startDrag):
2240         Changed to use ShareableBitmap::Handle and removed now-unnecessary size arguments (since we
2241         can get the size from the Handle).
2242
2243         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
2244         (WebKit::WebPopupMenu::setUpPlatformData): Don't need to store the backing store size in the
2245         data anymore; the Handles will make sure it reaches the other process.
2246
2247         * WebProcess/WebPage/FindController.cpp:
2248         (WebKit::FindController::updateFindIndicator):
2249         (WebKit::FindController::hideFindIndicator):
2250         Changed to use ShareableBitmap::Handle.
2251
2252 2011-03-30  Alejandro G. Castro  <alex@igalia.com>
2253
2254         Fix GTK build after r81980.
2255
2256         * GNUmakefile.am:
2257
2258 2011-03-29  Beth Dakin  <bdakin@apple.com>
2259
2260         Reviewed by Maciej Stachowiak.
2261
2262         Fix for https://bugs.webkit.org/show_bug.cgi?id=57408 
2263         webkit-min-device-pixel-ratio media query doesn't work post-SnowLeopard 
2264         -and corresponding-
2265         <rdar://problem/8665411>
2266
2267         * Shared/WebPageCreationParameters.cpp:
2268         (WebKit::WebPageCreationParameters::encode):
2269         (WebKit::WebPageCreationParameters::decode):
2270         * Shared/WebPageCreationParameters.h:
2271         * UIProcess/API/mac/PageClientImpl.h:
2272         * UIProcess/API/mac/PageClientImpl.mm:
2273         (WebKit::PageClientImpl::userSpaceScaleFactor):
2274         * UIProcess/API/qt/qwkpage_p.h:
2275         (QWKPagePrivate::userSpaceScaleFactor):
2276         * UIProcess/PageClient.h:
2277         * UIProcess/WebPageProxy.cpp:
2278         (WebKit::WebPageProxy::creationParameters):
2279         * UIProcess/gtk/WebView.h:
2280         (WebKit::WebView::userSpaceScaleFactor):
2281         * UIProcess/win/WebView.h:
2282         (WebKit::WebView::userSpaceScaleFactor):
2283         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2284         (WebKit::WebChromeClient::scaleFactor):
2285         * WebProcess/WebPage/WebPage.cpp:
2286         (WebKit::WebPage::WebPage):
2287         * WebProcess/WebPage/WebPage.h:
2288         (WebKit::WebPage::userSpaceScaleFactor):
2289
2290 2011-03-29  Brent Fulgham  <bfulgham@webkit.org>
2291
2292         Unreviewed WinCairo build fix.
2293
2294         Bring DownloadCurl implementation stubs in line with current
2295         CFNetwork API.
2296
2297         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2298         (WebKit::Download::receivedCredential):
2299         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2300         (WebKit::Download::receivedCancellation):
2301
2302 2011-03-29  Chris Fleizach  <cfleizach@apple.com>
2303
2304         Reviewed by Darin Adler.
2305
2306         AX: WK2: When creating the window remote token, use what's returned from accessibility
2307         https://bugs.webkit.org/show_bug.cgi?id=57398
2308
2309         This will allow a specific WKView to override what's used for the window attribute of the
2310         HTML elements.
2311
2312         * UIProcess/API/mac/WKView.mm:
2313         (-[WKView viewDidMoveToWindow]):
2314
2315 2011-03-29  Jeff Miller  <jeffm@apple.com>
2316
2317         Reviewed by Sam Weinig.
2318
2319         Make Windows-only InjectedBundle functions platform-specific
2320         https://bugs.webkit.org/show_bug.cgi?id=57385
2321         
2322         Added files for Windows-specific WKBundle functions.
2323         Removed stub wrappers for InjectedBundle::setHostAllowsAnyHTTPSCertificate() and InjectedBundle::setClientCertificate() from non-Windows platforms.
2324
2325         * WebProcess/InjectedBundle/API/c/WKBundle.cpp: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.cpp.
2326         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Moved WKBundleSetHostAllowsAnyHTTPSCertificate() and WKBundleSetClientCertificate() to WKBundlePrivateWin.h.
2327         * WebProcess/InjectedBundle/API/c/win: Added.
2328         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp: Added.
2329         (WKBundleSetHostAllowsAnyHTTPSCertificate): Moved from WKBundle.cpp.
2330         (WKBundleSetClientCertificate): Moved from WKBundle.cpp.
2331         * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Added.
2332         * WebProcess/InjectedBundle/InjectedBundle.h: setHostAllowsAnyHTTPSCertificate() and setClientCertificate() are Windows-only.
2333         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
2334         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
2335         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp: Removed setHostAllowsAnyHTTPSCertificate() and setClientCertificate().
2336         * win/WebKit2.vcproj: Added WKBundlePrivateWin.cpp and WKBundlePrivateWin.h.
2337         * win/WebKit2Generated.make: Copy WKBundlePrivateWin.h.
2338
2339 2011-03-29  Anders Carlsson  <andersca@apple.com>
2340
2341         Fix Windows build.
2342
2343         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
2344         (WebKit::Download::receivedCredential):
2345         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2346         (WebKit::Download::receivedCancellation):
2347
2348 2011-03-29  Anders Carlsson  <andersca@apple.com>
2349
2350         Reviewed by Sam Weinig.
2351
2352         Downloads: Authentication support
2353         https://bugs.webkit.org/show_bug.cgi?id=57403
2354         <rdar://problem/8691166>
2355
2356         * UIProcess/API/C/WKContext.h:
2357         Add didReceiveAuthenticationChallenge callback.
2358
2359         * UIProcess/Downloads/DownloadProxy.cpp:
2360         (WebKit::DownloadProxy::didReceiveAuthenticationChallenge):
2361         Call the download client.
2362
2363         * UIProcess/Downloads/DownloadProxy.messages.in:
2364         Add DidReceiveAuthenticationChallenge message.
2365
2366         * UIProcess/WebDownloadClient.cpp:
2367         (WebKit::WebDownloadClient::didReceiveAuthenticationChallenge):
2368         Call the client callback function.
2369
2370         * UIProcess/WebDownloadClient.h:
2371         * WebProcess/Authentication/AuthenticationManager.cpp:
2372         (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
2373         Send the DidReceiveAuthenticationChallenge message to the download proxy.
2374
2375         (WebKit::AuthenticationManager::useCredentialForChallenge):
2376         (WebKit::AuthenticationManager::continueWithoutCredentialForChallenge):
2377         (WebKit::AuthenticationManager::cancelChallenge):
2378         If the authentication client is null, call the static download member functions.
2379
2380         * WebProcess/Authentication/AuthenticationManager.h:
2381         * WebProcess/Downloads/Download.cpp:
2382         (WebKit::Download::didReceiveAuthenticationChallenge):
2383         Call the authentication manager.
2384
2385         * WebProcess/Downloads/Download.h:
2386         * WebProcess/Downloads/mac/DownloadMac.mm:
2387         (WebKit::Download::receivedCredential):
2388         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2389         (WebKit::Download::receivedCancellation):
2390         Call the right sender methods.
2391
2392         (-[WKDownloadAsDelegate download:didReceiveAuthenticationChallenge:]):
2393         (-[WKDownloadAsDelegate downloadShouldUseCredentialStorage:]):
2394         Call the right Download member functions.
2395
2396         * WebProcess/Downloads/qt/DownloadQt.cpp:
2397         (WebKit::Download::receivedCredential):
2398         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2399         (WebKit::Download::receivedCancellation):
2400         * WebProcess/Downloads/soup/DownloadSoup.cpp:
2401         (WebKit::Download::receivedCredential):
2402         (WebKit::Download::receivedRequestToContinueWithoutCredential):
2403         (WebKit::Download::receivedCancellation):
2404         Add stubs.
2405
2406 2011-03-29  Anders Carlsson  <andersca@apple.com>
2407
2408         Reviewed by Sam Weinig.
2409
2410         AuthenticationChallengeProxy objects should be associated with processes, not pages
2411         https://bugs.webkit.org/show_bug.cgi?id=57401
2412
2413         * UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
2414         (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy):
2415         (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy):
2416         (WebKit::AuthenticationChallengeProxy::useCredential):
2417         (WebKit::AuthenticationChallengeProxy::cancel):
2418         * UIProcess/Authentication/AuthenticationChallengeProxy.h:
2419         (WebKit::AuthenticationChallengeProxy::create):
2420         * UIProcess/WebPageProxy.cpp:
2421         (WebKit::WebPageProxy::didReceiveAuthenticationChallenge):
2422
2423 2011-03-29  Sam Weinig  <sam@webkit.org>
2424
2425         Reviewed by Anders Carlsson.
2426
2427         Use LocalizedStrings.h as a bottleneck for localized strings instead of
2428         using UI_STRING.
2429
2430         * UIProcess/API/mac/WKView.mm:
2431         (-[WKView validateUserInterfaceItem:]):
2432         Call existing localization functions instead of using UI_STRING.
2433
2434         (-[WKView _getTextInputState:selectionEnd:underlines:]):
2435         Remove unnecessary WebCore:: prefix.
2436
2437 2011-03-29  Chang Shu  <cshu@webkit.org>
2438
2439         Reviewed by Kenneth Rohde Christiansen.
2440
2441         WebKitTestRunner needs layoutTestController.setAllowUniversalAccessFromFileURLs
2442         https://bugs.webkit.org/show_bug.cgi?id=42692
2443
2444         * Shared/WebPreferencesStore.cpp:
2445         (WebKit::WebPreferencesStore::decode):
2446         (WebKit::WebPreferencesStore::overrideAllowUniversalAccessFromFileURLsForTestRunner):
2447         * Shared/WebPreferencesStore.h:
2448         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2449         (WKBundleOverrideAllowUniversalAccessFromFileURLsForTestRunner):
2450         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2451         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2452         (WebKit::InjectedBundle::overrideAllowUniversalAccessFromFileURLsForTestRunner):
2453         * WebProcess/InjectedBundle/InjectedBundle.h:
2454
2455 2011-03-29  Timothy Hatcher  <timothy@apple.com>
2456
2457         Update the order of the context menu to better match AppKit on Mac.
2458
2459         <rdar://problem/9054893>
2460
2461         Reviewed by John Sullivan.
2462
2463         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2464         (WebKit::WebPlatformStrategies::contextMenuItemTagLookUpInDictionary): Added argument for selected string.
2465         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2466
2467 2011-03-29  Jeff Miller  <jeffm@apple.com>
2468
2469         Fix formatting of WebKit2.vcproj after r82283.
2470
2471         * win/WebKit2.vcproj:
2472
2473 2011-03-29  Martin Robinson  <mrobinson@igalia.com>
2474
2475         [GTK] Build failed with ‘GDK_KEY_KP_Space’ was not declared in this scope
2476         https://bugs.webkit.org/show_bug.cgi?id=55314
2477
2478         Build fix for older versions of GTK+. Use the deprecated names for GDK key
2479         defines and include GtkVersioning.h to allow building on newer versions
2480         of GTK+.
2481
2482         * Shared/gtk/WebEventFactory.cpp:
2483         (WebKit::isGdkKeyCodeFromKeyPad): Update key defines.
2484
2485 2011-03-29  Steve Falkenburg  <sfalken@apple.com>
2486
2487         Reviewed by Darin Adler.
2488
2489         Use per-configuration vsprops in WebKit to avoid WebKitVSPropsRedirectionDir removal by MSVC IDE
2490         https://bugs.webkit.org/show_bug.cgi?id=57383
2491
2492         Visual Studio's IDE was removing instances of $(WebKitVSPropsRedirectionDir) from
2493         InheritedPropertySheet rules in our vcproj files when the vcproj was edited from within
2494         the IDE. To avoid this, add a separate vsprops file for each project configuration that
2495         contains the required inherited property sheets.
2496
2497         * win/WebKit2.vcproj:
2498         * win/WebKit2Debug.vsprops: Added.
2499         * win/WebKit2DebugAll.vsprops: Added.
2500         * win/WebKit2DebugCairoCFLite.vsprops: Added.
2501         * win/WebKit2Release.vsprops: Added.
2502         * win/WebKit2ReleaseCairoCFLite.vsprops: Added.
2503         * win/WebKit2ReleaseLTCG.vsprops: Added.
2504         * win/WebKit2WebProcess.vcproj:
2505         * win/WebKit2WebProcessDebug.vsprops: Added.
2506         * win/WebKit2WebProcessDebugAll.vsprops: Added.
2507         * win/WebKit2WebProcessDebugCairoCFLite.vsprops: Added.
2508         * win/WebKit2WebProcessRelease.vsprops: Added.
2509         * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: Added.
2510         * win/WebKit2WebProcessReleaseLTCG.vsprops: Added.
2511
2512 2011-03-29  Jessie Berlin  <jberlin@apple.com>
2513
2514         Reviewed by Anders Carlsson.
2515
2516         WebKit2: The WebProcess should be relaunched if necessary when WebKit2 is asked for
2517         information about Cookies, Databases, Local Storage, etc.
2518         https://bugs.webkit.org/show_bug.cgi?id=57374
2519
2520         Instead of bailing when the WebProcess is not valid, call relaunchProcessIfNecessary().
2521
2522         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
2523         (WebKit::WebPluginSiteDataManager::getSitesWithData):
2524         (WebKit::WebPluginSiteDataManager::clearSiteData):
2525         * UIProcess/WebApplicationCacheManagerProxy.cpp:
2526         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
2527         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
2528         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
2529         * UIProcess/WebCookieManagerProxy.cpp:
2530         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
2531         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname):
2532         (WebKit::WebCookieManagerProxy::deleteAllCookies):
2533         (WebKit::WebCookieManagerProxy::startObservingCookieChanges):
2534         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
2535         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
2536         * UIProcess/WebDatabaseManagerProxy.cpp:
2537         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
2538         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
2539         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
2540         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
2541         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
2542         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
2543         * UIProcess/WebKeyValueStorageManagerProxy.cpp:
2544         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
2545         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
2546         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
2547         * UIProcess/WebMediaCacheManagerProxy.cpp:
2548         (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
2549         (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname):
2550         (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames):
2551         * UIProcess/WebResourceCacheManagerProxy.cpp:
2552         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
2553         (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
2554         (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins):
2555
2556 2011-03-29  Jeff Miller  <jeffm@apple.com>
2557
2558         Reviewed by Darin Adler.
2559
2560         WebKit2: Support setting the client certificate on Windows
2561         https://bugs.webkit.org/show_bug.cgi?id=57368
2562         
2563         Allow setting the client certificate for a host via the injected bundle.
2564         This requires the ability for Webkit2 Windows clients to create a WKCertificateInfo from a PCCERT_CONTEXT so they can send it to the web process.
2565
2566         * Shared/API/c/win/WKCertificateInfoWin.cpp:
2567         (WKCertificateInfoCreateWithCertificate): Added.
2568         * Shared/API/c/win/WKCertificateInfoWin.h: Added WKCertificateInfoCreateWithCertificate().
2569         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2570         (WKBundleSetClientCertificate): Added.
2571         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Added WKBundleSetClientCertificate().
2572         * WebProcess/InjectedBundle/InjectedBundle.h: Added setClientCertificate().
2573         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2574         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
2575         * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp:
2576         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
2577         * WebProcess/InjectedBundle/qt/InjectedBundleQt.cpp:
2578         (WebKit::InjectedBundle::setClientCertificate): Added, should never be called.
2579         * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp:
2580         (WebKit::InjectedBundle::setClientCertificate): Added.
2581
2582 2011-03-29  Timothy Hatcher  <timothy@apple.com>
2583
2584         Make WebKit2 work with update-webkit-localizable-strings.
2585
2586         https://webkit.org/b/57354
2587
2588         Reviewed by Sam Weinig.
2589
2590         * PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
2591         * Shared/WebLocalizableStrings.h: Added.
2592         * UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
2593         * UIProcess/mac/WebInspectorProxyMac.mm:
2594         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME.
2595         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros.
2596         Use WebLocalizableStrings.h.
2597         * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2598         (registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h.
2599         * WebProcess/mac/WebProcessMac.mm:
2600         (WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME.
2601
2602         * GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
2603         * WebKit2.pro: Ditto.
2604         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2605         * win/WebKit2.vcproj: Ditto.
2606
2607 2011-03-29  Jeff Miller  <jeffm@apple.com>
2608
2609         Reviewed by Darin Adler.
2610
2611         CoreIPC::decodeResourceError() leaks a CFDataRef
2612         https://bugs.webkit.org/show_bug.cgi?id=57366
2613
2614         * Shared/win/WebCoreArgumentCodersWin.cpp:
2615         (CoreIPC::decodeResourceError): Don't leak the result of WebCore::copyCertificateToData(), since the ResourceError will retain it.
2616
2617 2011-03-29  Anders Carlsson  <andersca@apple.com>
2618
2619         Reviewed by Sam Weinig.
2620
2621         Allow the AppleConnect plug-in to use the QuickDraw drawing model
2622         https://bugs.webkit.org/show_bug.cgi?id=57365
2623         <rdar://problem/8712320>
2624
2625         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2626         (WebKit::NetscapePluginModule::determineQuirks):
2627         * Shared/Plugins/PluginQuirks.h:
2628         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
2629         (WebKit::NetscapePlugin::platformPostInitialize):
2630
2631 2011-03-29  Darin Adler  <darin@apple.com>
2632
2633         Reviewed by Adam Roben.
2634
2635         WebKit2 bundle page needs to offer generated file hooks
2636         https://bugs.webkit.org/show_bug.cgi?id=57279
2637
2638         * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Added shouldGenerateFileForUpload and
2639         generateFileForUpload callback pointers.
2640
2641         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
2642         (WebKit::InjectedBundlePageUIClient::shouldGenerateFileForUpload): Added.
2643         (WebKit::InjectedBundlePageUIClient::generateFileForUpload): Added.
2644         * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added functions above.
2645
2646         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2647         (WebKit::WebChromeClient::shouldReplaceWithGeneratedFileForUpload): Implemented by
2648         calling the functions above.
2649         (WebKit::WebChromeClient::generateReplacementFile): Ditto.
2650
2651 2011-03-29  Anders Carlsson  <andersca@apple.com>
2652
2653         Reviewed by Darin Adler.
2654
2655         Assertion failure in plug-in process with clang-built 32/64-bit WebKit2
2656         https://bugs.webkit.org/show_bug.cgi?id=57359
2657
2658         Don't use __alignof when encoding and decoding scalar types.
2659         
2660         Darwin 32-bit, double and unsigned long long are 4-byte aligned but on 64-bit they're
2661         8-byte aligned which causes problems when doing IPC between 32-bit and 64-bit processes.
2662         GCC is buggy and returns 8, but clang is correct and returns 4. Use sizeof instead which we know
2663         is equal to or greater than the alignment.
2664
2665         * Platform/CoreIPC/ArgumentDecoder.cpp:
2666         (CoreIPC::ArgumentDecoder::decodeBool):
2667         (CoreIPC::ArgumentDecoder::decodeUInt32):
2668         (CoreIPC::ArgumentDecoder::decodeUInt64):
2669         (CoreIPC::ArgumentDecoder::decodeInt32):
2670         (CoreIPC::ArgumentDecoder::decodeInt64):
2671         (CoreIPC::ArgumentDecoder::decodeFloat):
2672         (CoreIPC::ArgumentDecoder::decodeDouble):
2673         * Platform/CoreIPC/ArgumentEncoder.cpp:
2674         (CoreIPC::ArgumentEncoder::encodeBool):
2675         (CoreIPC::ArgumentEncoder::encodeUInt32):
2676         (CoreIPC::ArgumentEncoder::encodeUInt64):
2677         (CoreIPC::ArgumentEncoder::encodeInt32):
2678         (CoreIPC::ArgumentEncoder::encodeInt64):
2679         (CoreIPC::ArgumentEncoder::encodeFloat):
2680         (CoreIPC::ArgumentEncoder::encodeDouble):
2681
2682 2011-03-29  Brent Fulgham  <bfulgham@webkit.org>
2683
2684         Unreviewed build fix after r81928.
2685
2686         * win/WebKit2.vcproj: Don't build CG-specific icon routines
2687         for WinCairo port.
2688
2689 2011-03-29  Sam Weinig  <sam@webkit.org>
2690
2691         Reviewed by Anders Carlsson.
2692
2693         Reproducible crash running under libgmalloc, in -[WKView(Internal) removeTrackingRect:] --&gt; objc_assign_ivar_non_gc
2694         <rdar://problem/9193352>
2695         https://bugs.webkit.org/show_bug.cgi?id=57358
2696
2697         -[WKView removeTrackingRect] can be called from below -[WKView dealloc] after we have
2698         destroyed _data. So, nil out _data after releasing it and nil check it appropriately.
2699         
2700         * UIProcess/API/mac/WKView.mm:
2701         (-[WKView dealloc]):
2702         Nil out _data after releasing it.
2703
2704         (-[WKView removeTrackingRect:]):
2705         Add early return for nil _data.
2706
2707 2011-03-29  Jeff Miller  <jeffm@apple.com>
2708
2709         Reviewed by Jon Honeycutt.
2710
2711         Add WebCore::copyCertificateToData() on Windows
2712         https://bugs.webkit.org/show_bug.cgi?id=57296
2713         
2714         Remove duplicate code that implemented this functionality in WebCoreArgumentCodersWin.cpp and use WebCore::copyCertificateToData() instead. 
2715
2716         * Shared/win/WebCoreArgumentCodersWin.cpp:
2717         (CoreIPC::decodeResourceError): Use WebCore::copyCertificateToData().
2718
2719 2011-03-29  Balazs Kelemen  <kbalazs@webkit.org>
2720
2721         Unreviewed build fix (64 bit gcc).
2722
2723         GCC does not accept uint64_t formatted as %lli.
2724
2725         * UIProcess/WebIconDatabase.cpp:
2726         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Add explicit cast to long long.
2727
2728 2011-03-28  Maciej Stachowiak  <mjs@apple.com>
2729
2730         Reviewed by Dan Bernstein.
2731
2732         WKPageGetSourceForFrame and WKPageGetContentsAsString should throw an error in case of a race with page loading
2733         https://bugs.webkit.org/show_bug.cgi?id=57305
2734         <rdar://problem/8738060>, <rdar://problem/8780168>
2735
2736         * UIProcess/WebPageProxy.cpp:
2737         (WebKit::WebPageProxy::close): Clear m_loadDependentStringCallbackIDs
2738         (WebKit::WebPageProxy::getSourceForFrame): track the callback as load dependent
2739         (WebKit::WebPageProxy::getContentsAsString): ditto
2740         (WebKit::WebPageProxy::clearLoadDependentCallbacks): Invalidate all load dependent callbacks
2741         (WebKit::WebPageProxy::didCommitLoadForFrame): Call clearLoadDependentCallbacks
2742         (WebKit::WebPageProxy::didFailLoadForFrame): ditto
2743         (WebKit::WebPageProxy::stringCallback): Remove callback from load dependent set if appropriate
2744         (WebKit::WebPageProxy::processDidCrash): Clear m_loadDependentStringCallbackIDs
2745         * UIProcess/WebPageProxy.h: Add m_loadDependentStringCallbackIDs hash set.
2746
2747 2011-03-28  Patrick Gansterer  <paroga@webkit.org>
2748
2749         Reviewed by Darin Adler.
2750
2751         Use String instead of CString as return value of openTemporaryFile
2752         https://bugs.webkit.org/show_bug.cgi?id=55332
2753
2754         * Shared/WebMemorySampler.cpp:
2755         (WebKit::WebMemorySampler::initializeTempLogFile):
2756         * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
2757         (WebKit::NetscapePluginStream::stop):
2758         * WebProcess/Plugins/Netscape/NetscapePluginStream.h:
2759
2760 2011-03-28  Brian Weinstein  <bweinstein@apple.com>
2761
2762         Reviewed by Jon Honeycutt.
2763
2764         WebKit2: Downloads started with DownloadCFNet::start never start
2765         https://bugs.webkit.org/show_bug.cgi?id=57268
2766
2767         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp:
2768         (WebKit::Download::start): Call CFURLDownloadStart on the download we create.
2769
2770 2011-03-28  Anders Carlsson  <andersca@apple.com>
2771
2772         Fix Windows build.
2773
2774         * Shared/ShareableBitmap.h:
2775
2776 2011-03-28  Anders Carlsson  <andersca@apple.com>
2777
2778         Reviewed by Sam Weinig.
2779
2780         Beep when pressing a menu key equivalent when a plug-in has focus
2781         https://bugs.webkit.org/show_bug.cgi?id=57264
2782         <rdar://problem/8935597>
2783
2784         We don't want the WKTextInputWindowController inputContext to be involved in interpretKeyEvents.
2785
2786         * UIProcess/API/mac/WKView.mm:
2787         (-[WKView inputContext]):
2788
2789 2011-03-28  Anders Carlsson  <andersca@apple.com>
2790
2791         Reviewed by Sam Weinig.
2792
2793         CGImageRefs must hold a strong reference to underlying data
2794         https://bugs.webkit.org/show_bug.cgi?id=57263
2795         <rdar://problem/9146179>
2796
2797         Make paintBitmapContext use CGBitmapContextCreateImage, which creates a copy-on-write copy
2798         of the bitmap data. Also, add ShareableBitmap::makeCGImageCopy which does the same thing, and
2799         ShareableBitmap::makeCGImage in the cases where we know that the ShareableBitmap data will never change.
2800
2801         * Platform/cg/CGUtilities.cpp:
2802         (WebKit::paintImage):
2803         Factor image painting code out into a separate function.
2804
2805         (WebKit::paintBitmapContext):
2806         Call paintImage.
2807
2808         * Shared/API/c/cg/WKImageCG.cpp:
2809         (WKImagemakeCGImage):
2810         Use ShareableBitmap::makeCGImageCopy.
2811
2812         * Shared/ShareableBitmap.h:
2813         * Shared/cg/ShareableBitmapCG.cpp:
2814         (WebKit::ShareableBitmap::createGraphicsContext):
2815         (WebKit::ShareableBitmap::paint):
2816         (WebKit::ShareableBitmap::makeCGImageCopy):
2817         (WebKit::ShareableBitmap::makeCGImage):
2818         (WebKit::ShareableBitmap::releaseBitmapContextData):
2819         (WebKit::ShareableBitmap::releaseDataProviderData):
2820         Add makeCGImage and makeCGImageCopy.
2821
2822         * Shared/cg/WebCoreArgumentCodersCG.cpp:
2823         (CoreIPC::createImage):
2824         Use ShareableBitmap::makeCGImage.
2825         
2826         * UIProcess/API/mac/PageClientImpl.mm:
2827         (WebKit::PageClientImpl::setDragImage):
2828         Use ShareableBitmap::makeCGImage and plug a CGImageRef leak.
2829
2830 2011-03-28  Alexey Proskuryakov  <ap@apple.com>
2831
2832         Build fix.
2833
2834         * UIProcess/API/mac/WKView.mm: (-[WKView keyDown:]): It's not "event" in this function, it's
2835         "theEvent".
2836
2837 2011-03-28  Alexey Proskuryakov  <ap@apple.com>
2838
2839         Reviewed by Darin Adler.
2840
2841         https://bugs.webkit.org/show_bug.cgi?id=57260
2842         Clean up text input code a little
2843
2844         * UIProcess/API/mac/WKView.mm:
2845         (-[WKView doCommandBySelector:]): This NSTextInput protocol method lacked a LOG() call.
2846         (-[WKView keyDown:]): Added (possibly useless) event protection to match performKeyEquivalent:
2847         and also WebKit1.
2848
2849         * WebProcess/WebPage/mac/WebPageMac.mm: Removed an obsolete comment.
2850
2851 2011-03-28  Jeff Miller  <jeffm@apple.com>
2852
2853         Reviewed by Adam Roben.
2854
2855         ResourceError::certificate() should return a PCCERT_CONTEXT
2856         https://bugs.webkit.org/show_bug.cgi?id=57262
2857
2858         * Shared/win/PlatformCertificateInfo.cpp:
2859         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Don't assert if no PCCERT_CONTEXT is specified.
2860         * Shared/win/WebCoreArgumentCodersWin.cpp:
2861         (CoreIPC::encodeResourceError): Removed unneeded code now that ResourceError::certificate() returns a PCCERT_CONTEXT.
2862
2863 2011-03-28  Jeff Miller  <jeffm@apple.com>
2864
2865         Rubber-stamped by Adam Roben.
2866
2867         Remove unused CFErrorRef.
2868
2869         * Shared/win/WebCoreArgumentCodersWin.cpp:
2870         (CoreIPC::encodeResourceError): Remove unused CFErrorRef.
2871
2872 2011-03-28  Jeff Miller  <jeffm@apple.com>
2873
2874         Reviewed by Adam Roben.
2875
2876         Include certificate when sending a WebCore::ResourceError to UI process on Windows
2877         https://bugs.webkit.org/show_bug.cgi?id=57195
2878         
2879         Add support for sending the certificate with the WebCore::ResourceError.
2880
2881         * Shared/win/WebCoreArgumentCodersWin.cpp:
2882         (CoreIPC::encodeResourceError): Encode certificate data.
2883         (CoreIPC::deallocCertContext): Added.
2884         (CoreIPC::createCertContextDeallocator): Added.
2885         (CoreIPC::copyCert): Added.
2886         (CoreIPC::decodeResourceError): Decode certificate data.
2887
2888 2011-03-27  Andy Estes  <aestes@apple.com>
2889
2890         Reviewed by Maciej Stachowiak.
2891
2892         Correctly get a plug-in's MIME type when it uses WebPluginMIMETypesFilename
2893         https://bugs.webkit.org/show_bug.cgi?id=57205
2894         
2895         If the plug-in's Info.plist uses WebPluginMIMETypesFilename to specify
2896         plug-in MIME types, WebKit has to check for a property list file in
2897         ~/Library/Preferences for the MIME type dictionary.
2898
2899         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
2900         (WebKit::getMIMETypesFromPluginBundle): If the bundle's Info dictionary
2901         has the key WebPluginMIMETypesFilename, open the property list
2902         specified by that key's value and return the MIME type dictionary from
2903         there. Otherwise, return the MIME type dictionary specified by the key
2904         WebPluginMIMETypes.
2905         (WebKit::getPluginInfoFromPropertyLists): Call
2906         getMIMETypesFromPluginBundle().
2907
2908 2011-03-27  Jer Noble  <jer.noble@apple.com>
2909
2910         Reviewed by Maciej Stachowiak.
2911
2912         Full Screen: disable keyboard access by default
2913         https://bugs.webkit.org/show_bug.cgi?id=56684
2914
2915         Take into account whether keyboard access was requested when deciding whether full
2916         screen mode is supported.
2917
2918         * UIProcess/WebFullScreenManagerProxy.cpp:
2919         (WebKit::WebFullScreenManagerProxy::supportsFullScreen):
2920         * UIProcess/WebFullScreenManagerProxy.h:
2921         * UIProcess/WebFullScreenManagerProxy.messages.in:
2922         * WebProcess/FullScreen/WebFullScreenManager.cpp:
2923         (WebKit::WebFullScreenManager::supportsFullScreen):
2924         * WebProcess/FullScreen/WebFullScreenManager.h:
2925         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2926         (WebKit::WebChromeClient::supportsFullScreenForElement):
2927         * WebProcess/WebCoreSupport/WebChromeClient.h:
2928
2929 2011-03-27  Anders Carlsson  <andersca@apple.com>
2930
2931         Reviewed by Sam Weinig.
2932
2933         Dock doesn't come back after leaving fullscreen on Hulu
2934         https://bugs.webkit.org/show_bug.cgi?id=57189
2935         <rdar://problem/9192413>
2936
2937         Port some code over from the old WebKit1 plug-in host.
2938
2939         * PluginProcess/mac/PluginProcessShim.mm:
2940         (WebKit::shimShowMenuBar):
2941         (WebKit::shimHideMenuBar):
2942         (WebKit::shimIsMenuBarVisible):
2943
2944 2011-03-27  Anders Carlsson  <andersca@apple.com>
2945
2946         Reviewed by Sam Weinig.
2947
2948         Keep a strong reference to the connection to avoid crashes.
2949
2950         * Platform/CoreIPC/Connection.cpp:
2951
2952 2011-03-26  Jeff Miller  <jeffm@apple.com>
2953
2954         Reviewed by Sam Weinig.
2955
2956         WKErrorCopyCFError() doesn't actually return a copy of the CFErrorRef
2957         https://bugs.webkit.org/show_bug.cgi?id=57172
2958
2959         * Shared/API/c/cf/WKErrorCF.cpp:
2960         (WKErrorCopyCFError): Use RetainPtr<> and leakRef() to return a real copy.
2961
2962 2011-03-26  Maciej Stachowiak  <mjs@apple.com>
2963
2964         Revert inadvertently committed changes.
2965
2966         * WebProcess/com.apple.WebProcess.sb:
2967
2968 2011-03-26  Jer Noble  <jer.noble@apple.com>
2969
2970         Reviewed by Eric Carlson.
2971
2972         Enable the Full Screen API by default in WebKit/mac and WebKit2
2973         https://bugs.webkit.org/show_bug.cgi?id=56956
2974
2975         * Shared/WebPreferencesStore.h: Default the fullScreenEnabled preference to true.
2976
2977 2011-03-26  Jeff Miller  <jeffm@apple.com>
2978
2979         Reviewed by Steve Falkenburg.
2980
2981         Add PlatformCertificateInfo::PlatformCertificateInfo(PCCERT_CONTEXT) constructor on Windows
2982         https://bugs.webkit.org/show_bug.cgi?id=57152
2983         
2984         We're going to need to create a PlatformCertificateInfo with a single certificate on Windows to support client certificates.
2985         Also, stop relying on the fact that the Win32 API CertDuplicateCertificateContext() currently returns the same PCCERT_CONTEXT that you pass to it, since that may change in the future.
2986
2987         * Shared/win/PlatformCertificateInfo.cpp:
2988         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor. Use return value from CertDuplicateCertificateContext().
2989         (WebKit::PlatformCertificateInfo::operator=): Use return value from CertDuplicateCertificateContext().
2990         * Shared/win/PlatformCertificateInfo.h: Added PlatformCertificateInfo(PCCERT_CONTEXT) construtor.
2991
2992 2011-03-26  Anders Carlsson  <andersca@apple.com>
2993
2994         Reviewed by Sam Weinig.
2995
2996         Graphic corruption appeared with Silverlight contents while resizing window
2997         https://bugs.webkit.org/show_bug.cgi?id=57167
2998         <rdar://problem/9094052>
2999
3000         Pass DispatchMessageEvenWhenWaitingForSyncReply when sending GeometryDidChange messages since that will guarantee
3001         that those messages will be handled before PaintEntirePlugin messages which prevents the PaintEntirePlugin handler from
3002         painting into the wrong backing store.
3003
3004         * WebProcess/Plugins/PluginProxy.cpp:
3005         (WebKit::PluginProxy::geometryDidChange):
3006
3007 2011-03-26  Sam Weinig  <sam@webkit.org>
3008
3009         Reviewed by Anders Carlsson.
3010
3011         Web process considered unresponsive (SPOD shown) when displaying a JavaScript alert() as a result of a click
3012         <rdar://problem/9067557>
3013         https://bugs.webkit.org/show_bug.cgi?id=57166
3014
3015         * UIProcess/WebPageProxy.cpp:
3016         (WebKit::WebPageProxy::runJavaScriptAlert):
3017         (WebKit::WebPageProxy::runJavaScriptConfirm):
3018         (WebKit::WebPageProxy::runJavaScriptPrompt):
3019         Invalidate the responsiveness timer before calling out to the client.
3020
3021 2011-03-26  Anders Carlsson  <andersca@apple.com>
3022
3023         Reviewed by Sam Weinig.
3024
3025         ASSERTION FAILED: m_operationInProgress == NoOperation loading nytimes.com
3026         https://bugs.webkit.org/show_bug.cgi?id=57165
3027         <rdar://problem/9024311>
3028
3029         The assertion fired because during GC, the web process sends a synchronous NPObjectMessageReceiver::Deallocate
3030         message to the plug-in process. Since this is a synchronous message, the web process needs to process incoming synchronous
3031         messages. While waiting, we get an incoming PluginProxy::Evaluate message from the plug-in. This causes JavaScript to run
3032         during GC which is very bad.
3033
3034         The fix for this is to add a flag on the connection that will cause synchronous messages sent by the connection (in this case the
3035         plug-in process) to not be processed while the other side (the web process) is waiting for a synchronous reply _unless_ the connection
3036         is actually processing a synchronous message. (The last part is to avoid deadlocks).
3037
3038         Since the call to NPN_Evaluate by the plug-in (that ends up sending the PluginProxy::Evaluate message) comes from a run loop timer firing,
3039         it's OK to wait for it to be processed by the web process when it returns to the run loop.
3040
3041         * Platform/CoreIPC/Connection.cpp:
3042         (CoreIPC::Connection::Connection):
3043         Initialize m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage and m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount.
3044
3045         (CoreIPC::Connection::setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage):
3046         Set m_onlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage.
3047
3048         (CoreIPC::Connection::sendMessage):
3049         Don't add the MessageID::DispatchMessageWhenWaitingForSyncReply flag when the right flags has been set on the connection, and it's not processing a synchronous message.
3050
3051         (CoreIPC::Connection::dispatchMessage):
3052         Increment and decrement m_inDispatchMessageMarkedDispatchWhenWaitingForSyncReplyCount accordingly.
3053
3054         * PluginProcess/WebProcessConnection.cpp:
3055         (WebKit::WebProcessConnection::WebProcessConnection):
3056         Call setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage on the connection.
3057
3058 2011-03-26  Sam Weinig  <sam@webkit.org>
3059
3060         Rollout r82042 (If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations))
3061
3062         -[NSString stringByResolvingSymlinksInPath] does not do what we needed for paths within /private.
3063         This caused all SSL sites to stop working.
3064
3065         * WebProcess/mac/WebProcessMac.mm:
3066         (WebKit::appendSandboxParameterPath):
3067         (WebKit::initializeSandbox):
3068
3069 2011-03-26  Sam Weinig  <sam@webkit.org>
3070
3071         Reviewed by Anders Carlsson.
3072
3073         If a user doesn't have a Database/LocalStorage directory, it can't be created (sandbox violations)
3074         <rdar://problem/9127411>
3075         https://bugs.webkit.org/show_bug.cgi?id=57164
3076
3077         * WebProcess/mac/WebProcessMac.mm:
3078         (WebKit::appendSandboxParameterPath):
3079         (WebKit::initializeSandbox):
3080         Use -[NSString stringByResolvingSymlinksInPath] instead of realpath to ensure we can resolve
3081         symlinks even if the file/directory doesn't exist yet.
3082
3083 2011-03-26  Anders Carlsson  <andersca@apple.com>
3084
3085         Reviewed by Sam Weinig.
3086
3087         Factor processing of incoming sync replies out into processIncomingSyncReply
3088         https://bugs.webkit.org/show_bug.cgi?id=57161
3089
3090         * Platform/CoreIPC/Connection.cpp:
3091         (CoreIPC::Connection::sendSyncMessage):
3092         Pass DispatchMessageEvenWhenWaitingForSyncReply to sendMessage.
3093
3094         (CoreIPC::Connection::processIncomingSyncReply):
3095         Move code from processIncomingMessage to here.
3096
3097         (CoreIPC::Connection::processIncomingMessage):
3098         Call processIncomingSyncReply.
3099
3100 2011-03-26  Sam Weinig  <sam@webkit.org>
3101
3102         Reviewed by Anders Carlsson.
3103
3104         WebKit2: Assert in CoreIPC::typeFromCFTypeRef() when loading a site with an invalid certificate
3105         <rdar://problem/9188041>
3106         https://bugs.webkit.org/show_bug.cgi?id=57159
3107
3108         * Shared/cf/ArgumentCodersCF.cpp:
3109         (CoreIPC::typeFromCFTypeRef):
3110         (CoreIPC::encode):
3111         (CoreIPC::decode):
3112         * Shared/cf/ArgumentCodersCF.h:
3113         Add encoding/decoding for SecCertificateRef type.
3114
3115         * Shared/mac/PlatformCertificateInfo.mm:
3116         (WebKit::PlatformCertificateInfo::encode):
3117         (WebKit::PlatformCertificateInfo::decode):
3118         Use ArgumentCodersCF now that it knows how to encode/decode SecCertificateRefs.
3119
3120 2011-03-26  Anders Carlsson  <andersca@apple.com>
3121
3122         Reviewed by Sam Weinig.
3123
3124         Handle synchronous replies coming in out of order
3125         https://bugs.webkit.org/show_bug.cgi?id=57158
3126
3127         When processing an incoming reply, don't assume that it belongs to the last sent synchronous request.
3128         Instead, iterate over the m_pendingSyncReplies vector backwards looking for the corresponding request.
3129
3130         * Platform/CoreIPC/Connection.cpp:
3131         (CoreIPC::Connection::processIncomingMessage):
3132
3133 2011-03-26  Anders Carlsson  <andersca@apple.com>
3134
3135         Reviewed by Sam Weinig.
3136
3137         Fix a possible deadlock when two synchronous messages are sent at the same time
3138         https://bugs.webkit.org/show_bug.cgi?id=57155
3139
3140         Simplify code and fix a possible (although highly improbable) dead lock.
3141
3142         * Platform/CoreIPC/Connection.cpp:
3143         Make SyncMessageState atomically ref counted since it can be ref()'ed from the connection queue.
3144         Get rid of m_waitForSyncReplyCount and add m_didScheduleDispatchMessagesWork.
3145
3146         (CoreIPC::Connection::SyncMessageState::SyncMessageState):
3147         Initialize m_didScheduleDispatchMessagesWork to false.
3148
3149         (CoreIPC::Connection::SyncMessageState::processIncomingMessage):
3150         if m_didScheduleDispatchMessagesWork is false, schedule a call to dispatchMessageAndResetDidScheduleDispatchMessagesWork
3151         on the client run loop.
3152
3153         (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesWork):
3154         Dispatch messages and set m_didScheduleDispatchMessagesWork back to false.
3155
3156         (CoreIPC::Connection::sendSyncMessage):
3157         Remove calls to beginWaitForSyncReply and endWaitForSyncReply.
3158
3159 2011-03-25  Sam Weinig  <sam@webkit.org>
3160
3161         Reviewed by Adele Peterson.
3162
3163         WKPageLoadAlternateHTMLString doesn't re-spawn a dead WebProcess, but should
3164         <rdar://problem/9191493>
3165         https://bugs.webkit.org/show_bug.cgi?id=57134
3166
3167         Make all load functions respawn a dead WebProcess for consistency.
3168
3169         * UIProcess/WebPageProxy.cpp:
3170         (WebKit::WebPageProxy::loadHTMLString):
3171         Respawn a dead WebProcess.
3172
3173         (WebKit::WebPageProxy::loadAlternateHTMLString):
3174         Respawn a dead WebProcess.
3175
3176         (WebKit::WebPageProxy::loadPlainTextString):
3177         Respawn a dead WebProcess.
3178
3179         (WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
3180         * UIProcess/WebPageProxy.h:
3181         * UIProcess/WebPageProxy.messages.in:
3182         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3183         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3184         * WebProcess/WebPage/WebPage.cpp:
3185         (WebKit::WebPage::loadAlternateHTMLString):
3186         Since we may no longer always have a main frame when calling WKPageLoadAlternateHTMLString,
3187         set the unreachable URL, if there is one, on provisional load.
3188
3189 2011-03-25  Anders Carlsson  <andersca@apple.com>
3190
3191         Reviewed by Sam Weinig.
3192
3193         PluginView's call to invalidateContentsAndWindow() in invalidateRect() is wrong for plug-ins which paint into compositing layers
3194         https://bugs.webkit.org/show_bug.cgi?id=57133
3195         <rdar://problem/9029442>
3196
3197         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3198         (WebKit::NetscapePlugin::platformInvalidate):
3199         Return true under the Core Animation drawing model, since that prevents the plug-in from calling PluginController::invalidate.
3200
3201         * WebProcess/Plugins/PluginView.cpp:
3202         (WebKit::PluginView::invalidateRect):
3203         Don't call invalidateContentsAndWindow() if the plug-in has a Core Animation layer.
3204
3205 2011-03-25  Brady Eidson  <beidson@apple.com>
3206
3207         Reviewed by Sam Weinig.
3208
3209         <rdar://problem/8648311> and https://bugs.webkit.org/show_bug.cgi?id=56425
3210         WebKit2 IconDatabase and API
3211
3212         This gets a basic, usable API in place.
3213         Enhancements can come in other bugs as they're needed.
3214
3215         * UIProcess/API/C/WKIconDatabase.cpp:
3216         (WKIconDatabaseRetainIconForURL):
3217         (WKIconDatabaseReleaseIconForURL):
3218         (WKIconDatabaseEnableDatabaseCleanup):
3219         * UIProcess/API/C/WKIconDatabase.h:
3220         
3221         The first actual accessor for an "icon for a URL" is for a CGImageRef:
3222         * UIProcess/API/C/cg: Added.
3223         * UIProcess/API/C/cg/WKIconDatabaseCG.cpp: Added.
3224         (WKIconDatabaseGetCGImageForURL):
3225         * UIProcess/API/C/cg/WKIconDatabaseCG.h: Added.
3226         
3227         Expose relevant methods to support the above API:
3228         * UIProcess/WebIconDatabase.cpp:
3229         (WebKit::WebIconDatabase::WebIconDatabase): New IconDatabases will have cleanup disabled from the start,
3230           and require a single call to "enableDatabaseCleanup" to allow cleanup.
3231         (WebKit::WebIconDatabase::setDatabasePath):
3232         (WebKit::WebIconDatabase::enableDatabaseCleanup):
3233         (WebKit::WebIconDatabase::imageForPageURL):
3234         * UIProcess/WebIconDatabase.h:
3235         
3236         Project file stuff:
3237         * WebKit2.xcodeproj/project.pbxproj:
3238         * win/WebKit2.vcproj:
3239
3240 2011-03-25  Jeff Miller  <jeffm@apple.com>
3241
3242         Reviewed by Darin Adler.
3243
3244         Add CoreIPC::encodeResourceError() and CoreIPC::decodeResourceError() for all platforms
3245         https://bugs.webkit.org/show_bug.cgi?id=57125
3246         
3247         Currently, these are only implemented on the Mac, but we're going to need them for Windows as well, so we might as well make them always platform-specific.
3248         In this patch, just replicate the existing common non-Mac implementation in WebCoreArgumentCoders.h to platform-specific files.
3249
3250         * Shared/WebCoreArgumentCoders.h: Move non-Mac implementations of encodeResourceError() and decodeResourceError() to common files.
3251         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
3252         (CoreIPC::encodeResourceError): Added.
3253         (CoreIPC::decodeResourceError): Added.
3254         * Shared/qt/WebCoreArgumentCodersQt.cpp:
3255         (CoreIPC::encodeResourceError): Added.
3256         (CoreIPC::decodeResourceError): Added.
3257         * Shared/win/WebCoreArgumentCodersWin.cpp:
3258         (CoreIPC::encodeResourceError): Added.
3259         (CoreIPC::decodeResourceError): Added.
3260
3261 2011-03-25  Andy Estes  <aestes@apple.com>
3262
3263         Reviewed by Adele Peterson.
3264
3265         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js
3266         https://bugs.webkit.org/show_bug.cgi?id=49016
3267
3268         Update objectContentType() implementation to handle the
3269         shouldPreferPlugInsForImages flag.
3270
3271         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3272         (WebKit::WebFrameLoaderClient::objectContentType):
3273         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3274
3275 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
3276
3277         Unreviewed build correction.
3278
3279         Add stubs for WK2 cookie handling with cURL.
3280
3281         * WebProcess/Cookies/curl: Added.
3282         * WebProcess/Cookies/curl/WebCookieManagerCurl.cpp: Added.
3283         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3284         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3285         * win/WebKit2.vcproj:
3286
3287 2011-03-25  Steve Falkenburg  <sfalken@apple.com>
3288
3289         Reviewed by Brian Weinstein.
3290
3291         Microsoft Windows Presentation Foundation (WPF) plug-in complains about missing xpcom.dll
3292         https://bugs.webkit.org/show_bug.cgi?id=57119
3293         <rdar://problem/9054148>
3294
3295         This plug-in from Microsoft links against xpcom.dll, which is a Firefox-specific DLL
3296         not available in WebKit. The plug-in is fairly widespread, since it was included in
3297         a Windows Update push at one point.
3298
3299         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
3300         (WebKit::PluginInfoStore::shouldUsePlugin): Blacklist npwpf.dll.
3301
3302 2011-03-25  Jessie Berlin  <jberlin@apple.com>
3303
3304         Reviewed by Anders Carlsson.
3305
3306         WebKit2: Need to be able to set and get the Cookie Storage Policy.
3307         https://bugs.webkit.org/show_bug.cgi?id=50780
3308
3309         Part 2: Make it possible to set the initial policy on Windows.
3310
3311         In WebKit1, we read the initial policy on Windows from WebPreferences at startup.
3312         Since that is not possible in WebKit2, make it possible to specify the initial policy
3313         as a creation parameter to the WebProcess.
3314
3315         * Shared/WebProcessCreationParameters.cpp:
3316         (WebKit::WebProcessCreationParameters::encode):
3317         Encode initialHTTPCookieAcceptPolicy on Windows.
3318         (WebKit::WebProcessCreationParameters::decode):
3319         Decode initialHTTPCookieAcceptPolicy on Windows.
3320         * Shared/WebProcessCreationParameters.h:
3321
3322         * UIProcess/API/C/win/WKContextPrivateWin.h:
3323         * UIProcess/API/C/win/WKContextWin.cpp:
3324         (WKContextSetInitialHTTPCookieAcceptPolicy):
3325         Call through to WebContext.
3326
3327         * UIProcess/WebContext.cpp:
3328         (WebKit::WebContext::WebContext):
3329         Give the initial policy a default of "Always".
3330         * UIProcess/WebContext.h:
3331         (WebKit::WebContext::setInitialHTTPCookieAcceptPolicy):
3332         * UIProcess/win/WebContextWin.cpp:
3333         (WebKit::WebContext::platformInitializeWebProcess):
3334         Set the initial policy on Windows.
3335
3336         * WebProcess/Cookies/WebCookieManager.h:
3337         Make setHTTPCookieAcceptPolicy public so that it can be called from WebProcessWin.
3338
3339         * WebProcess/win/WebProcessWin.cpp:
3340         (WebKit::WebProcess::platformInitializeWebProcess):
3341         Tell the WebCookieManager about the initial policy.
3342
3343 2011-03-25  Jessie Berlin  <jberlin@apple.com>
3344
3345         Reviewed by Sam Weinig.
3346
3347         WebKit2: Need to be able to set and get the Cookie Storage Policy.
3348         https://bugs.webkit.org/show_bug.cgi?id=50780
3349
3350         * Shared/HTTPCookieAcceptPolicy.h: Added.
3351
3352         * UIProcess/API/C/WKAPICast.h:
3353         (WebKit::toHTTPCookieAcceptPolicy):
3354         (WebKit::toAPI):
3355
3356         * UIProcess/API/C/WKCookieManager.cpp:
3357         (WKCookieManagerSetHTTPCookieAcceptPolicy):
3358         Call through to WebCookieManagerProxy.
3359         (WKCookieManagerGetHTTPCookieAcceptPolicy):
3360         Ditto.
3361         * UIProcess/API/C/WKCookieManager.h:
3362
3363         * UIProcess/WebCookieManagerProxy.cpp:
3364         (WebKit::WebCookieManagerProxy::invalidate):
3365         Invalidate the get http cookie accept policy callbacks.
3366         (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy):
3367         Send a message to the Web Process with the new value.
3368         (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
3369         Keep track of the callback and send a message to the Web Process.
3370         (WebKit::WebCookieManagerProxy::didGetHTTPCookieAcceptPolicy):
3371         Invoke the callback.
3372         * UIProcess/mac/WebCookieManagerProxyMac.mm: Added.
3373         (WebKit::WebCookieManagerProxy::persistHTTPCookieAcceptPolicy):
3374         On Mac, also set the policy in the UI Process because the sandboxed Web Process cannot
3375         persist the policy.
3376         * UIProcess/WebCookieManagerProxy.h:
3377         * UIProcess/WebCookieManagerProxy.messages.in:
3378
3379         * WebKit2.pri:
3380         * WebKit2.pro:
3381         * WebKit2.xcodeproj/project.pbxproj:
3382         * win/WebKit2.vcproj:
3383         * win/WebKit2Common.vsprops:
3384
3385         * WebProcess/Cookies/WebCookieManager.cpp:
3386         (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy):
3387         Call platformSetHTTPCookieAcceptPolicy.
3388         (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy):
3389         Send the result of platformGetHTTPCookieAcceptPolicy to the UI Process.
3390         * WebProcess/Cookies/WebCookieManager.h:
3391         * WebProcess/Cookies/WebCookieManager.messages.in:
3392
3393         * WebProcess/Cookies/cf: Added.
3394         * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: Added.
3395         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3396         Set the policy on both the default cookie storage and any Private Browsing cookie storage.
3397         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3398         * WebProcess/Cookies/mac: Added.
3399         * WebProcess/Cookies/mac/WebCookieManagerMac.mm: Added.
3400         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3401         Set the policy on the default cookie storage and add a FIXME to set it on any Private
3402         Browsing cookie storage.
3403         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3404
3405         * WebProcess/Cookies/gtk: Added.
3406         * WebProcess/Cookies/gtk/WebCookieManagerGtk.cpp: Added.
3407         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3408         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3409         * WebProcess/Cookies/qt: Added.
3410         * WebProcess/Cookies/qt/WebCookieManagerQt.cpp: Added.
3411         (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy):
3412         (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy):
3413
3414 2011-03-25  Brian Weinstein  <bweinstein@apple.com>
3415
3416         Reviewed by Alexey Proskuryakov.
3417
3418         REGRESSION(r79227): CFURLCache not initialized correctly in WebKit2
3419         https://bugs.webkit.org/show_bug.cgi?id=57109
3420         <rdar://problem/9184590>
3421         
3422         Check for a trailing Windows path separator, not a Unix path separator.
3423
3424         * UIProcess/win/WebContextWin.cpp:
3425         (WebKit::WebContext::platformInitializeWebProcess):
3426
3427 2011-03-25  Benjamin Poulain  <benjamin.poulain@nokia.com>
3428
3429         Reviewed by Andreas Kling.
3430
3431         [Qt] QtWebKit will not compile with QT_ASCII_CAST_WARNINGS enabled
3432         https://bugs.webkit.org/show_bug.cgi?id=57087
3433
3434         Use explicit conversion for string to avoid depending on the default codec
3435         installed by the user code.
3436
3437         * Platform/qt/SharedMemoryQt.cpp:
3438         (WebKit::SharedMemory::create):
3439         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3440         (WebKit::initializeGTK):
3441         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
3442         (tst_QGraphicsWKView::loadEmptyPage):
3443         (tst_QGraphicsWKView::loadEmptyUrl):
3444         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp:
3445         (tst_QWKPage::loadEmptyUrl):
3446         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
3447         (WebKit::ProcessLauncher::launchProcess):
3448         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
3449         (WebKit::getPluginDisplay):
3450         * WebProcess/qt/WebProcessMainQt.cpp:
3451         (WebKit::EnvHttpProxyFactory::initializeFromEnvironment):
3452         (WebKit::WebProcessMainQt):
3453
3454 2011-03-25  Brent Fulgham  <bfulgham@webkit.org>
3455
3456         Correct project file missing $(WebKitVSPropsRedirectionDir)s
3457         after r81924.
3458
3459         * win/WebKit2.vcproj: Restore lost $(WebKitVSPropsRedirectionDir)
3460
3461 2011-03-25  Alejandro G. Castro  <alex@igalia.com>
3462
3463         Reviewed by Martin Robinson.
3464
3465         [WK2] Consider .c files in the generate-forwarding-headers script
3466         https://bugs.webkit.org/show_bug.cgi?id=56680
3467
3468         * Scripts/generate-forwarding-headers.pl:
3469
3470 2011-03-24  Sheriff Bot  <webkit.review.bot@gmail.com>
3471
3472         Unreviewed, rolling out r81916 and r81917.
3473         http://trac.webkit.org/changeset/81916
3474         http://trac.webkit.org/changeset/81917
3475         https://bugs.webkit.org/show_bug.cgi?id=57071
3476
3477         broke a test on platforms that do not have QuickTime installed
3478         (Requested by estes on #webkit).
3479
3480         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3481         (WebKit::WebFrameLoaderClient::objectContentType):
3482         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3483
3484 2011-03-24  Brady Eidson  <beidson@apple.com>
3485
3486         Reviewed by Darin Adler.
3487
3488         https://bugs.webkit.org/show_bug.cgi?id=57069
3489         Add WKIconDatabase api to the project files, and expose accessor on WKContext.
3490
3491         Project file stuffs:
3492         * GNUmakefile.am:
3493         * WebKit2.xcodeproj/project.pbxproj:
3494         * win/WebKit2.vcproj:
3495
3496         * Shared/API/c/WKBase.h:
3497         * UIProcess/API/C/WKAPICast.h:
3498
3499         * UIProcess/API/C/WKContext.cpp:
3500         (WKContextGetIconDatabase):
3501         * UIProcess/API/C/WKContext.h:
3502
3503         * UIProcess/API/C/WKIconDatabase.cpp: Added.
3504         (WKIconDatabaseGetTypeID):
3505         * UIProcess/API/C/WKIconDatabase.h: Added.
3506
3507         * UIProcess/WebContext.h:
3508         (WebKit::WebContext::iconDatabase):
3509
3510 2011-03-24  Brent Fulgham  <bfulgham@webkit.org>
3511
3512         Build correction.
3513
3514         Disable the CA Layer stuff when building with Cairo.
3515
3516         * win/WebKit2.vcproj:
3517
3518 2011-03-24  Brady Eidson  <beidson@apple.com>
3519
3520         Reviewed by Sam Weinig.
3521
3522         https://bugs.webkit.org/show_bug.cgi?id=57058
3523         Hookup the UIProcess WebIconDatabase to a WebCore::IconDatabase as its implementation
3524
3525         * UIProcess/WebIconDatabase.cpp:
3526         (WebKit::WebIconDatabase::WebIconDatabase):
3527         (WebKit::WebIconDatabase::setDatabasePath): Create a new WebCore::IconDatabase and open it to this path.
3528         (WebKit::WebIconDatabase::retainIconForPageURL): Actually retain the url, using the impl.
3529         (WebKit::WebIconDatabase::releaseIconForPageURL): Actually release the url, using the impl.
3530         (WebKit::WebIconDatabase::setIconURLForPageURL): Actually set the url, using the impl.
3531         (WebKit::WebIconDatabase::setIconDataForIconURL): Actually set the data, using the impl.
3532         (WebKit::WebIconDatabase::getLoadDecisionForIconURL): Actually ask for a load decision to call back with.
3533         (WebKit::WebIconDatabase::performImport):
3534         (WebKit::WebIconDatabase::didImportIconURLForPageURL):
3535         (WebKit::WebIconDatabase::didImportIconDataForPageURL):
3536         (WebKit::WebIconDatabase::didChangeIconForPageURL):
3537         (WebKit::WebIconDatabase::didRemoveAllIcons):
3538         (WebKit::WebIconDatabase::didFinishURLImport): Notify all the pending callbacks what their load decisions
3539           are now that they're available.
3540         * UIProcess/WebIconDatabase.h:
3541
3542         Add an IconDatabase logging channel:
3543         * Platform/Logging.cpp:
3544         (WebKit::initializeLogChannelsIfNecessary):
3545         * Platform/Logging.h:
3546
3547         * UIProcess/WebContext.cpp:
3548         (WebKit::WebContext::setIconDatabasePath): Pass the new path on to the WebIconDatabase, possibly
3549           opening it.
3550         * UIProcess/WebContext.h:
3551
3552 2011-03-24  Andy Estes  <aestes@apple.com>
3553
3554         Reviewed by Darin Adler.
3555
3556         REGRESSION (r70748): latest nightly builds kills AC_QuickTime.js