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