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