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