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