Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj...
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-03-17  Jeff Miller  <jeffm@apple.com>
2
3         Use a consistent set of file patterns in the svn:ignore property for all .xcodeproj directories, specifically:
4         
5         *.mode*
6         *.pbxuser
7         *.perspective*
8         project.xcworkspace
9         xcuserdata
10
11         * WebKit2.xcodeproj: Modified property svn:ignore.
12
13 2011-03-17  Sam Weinig  <sam@webkit.org>
14
15         Reviewed by Anders Carlsson.
16
17         WKErrors need the PeerCertificateChain for certificate errors
18         <rdar://problem/8951784>
19         https://bugs.webkit.org/show_bug.cgi?id=56592
20
21         * Shared/WebCoreArgumentCoders.h:
22         Special case encoding/decoding of ResourceErrors for the mac.
23
24         * Shared/mac/PlatformCertificateInfo.h:
25         * Shared/mac/PlatformCertificateInfo.mm:
26         (WebKit::PlatformCertificateInfo::PlatformCertificateInfo):
27         Add constructor that take the PeerCertificateChain as CFArrayRef.
28
29         * Shared/mac/WebCoreArgumentCodersMac.mm:
30         (CoreIPC::encodeResourceError):
31         (CoreIPC::decodeResourceError):
32         Add encode/decode for ResourceError using the underlying NSError
33         and encoding/decoding as much of the userInfo as we know how to.
34         Right now this includes all string values and the PeerCertificateChain.
35
36 2011-03-17  John Sullivan  <sullivan@apple.com>
37
38         Reviewed by Adam Roben.
39
40         https://bugs.webkit.org/show_bug.cgi?id=56574
41         Dealloc'ing a WKView can leave a stale reference to it in NSWindow
42
43         * UIProcess/API/mac/WKView.mm:
44         (-[WKView viewWillMoveToWindow:]):
45         Clear the outgoing window's growBoxOwner if it is this view.
46
47 2011-03-17  Anders Carlsson  <andersca@apple.com>
48
49         Rubber-stamped by John Sullivan.
50
51         Rename PluginProcessShim.cpp to PluginProcessShim.mm.
52
53         * PluginProcess/mac/PluginProcessShim.cpp: Removed.
54         * PluginProcess/mac/PluginProcessShim.mm: Copied from PluginProcess/mac/PluginProcessShim.cpp.
55         * WebKit2.xcodeproj/project.pbxproj:
56
57 2011-03-17  Anders Carlsson  <andersca@apple.com>
58
59         Reviewed by Darin Adler.
60
61         Invalidate all NPObjects for a plug-in when that plug-in is destroyed
62         https://bugs.webkit.org/show_bug.cgi?id=56511
63         <rdar://problem/8993491>
64
65         Before this change, we would invalidate NPObjectProxy objects and delete NPObjectMessageReceiver
66         objects when the last plug-in of a certain type was destroyed. Doing so caused us to hold on to memory
67         which we don't need, and could also lead to crashes if the NPObjectMessageReceiver would get a message and
68         tried to invoke it on a already deallocated NPObject.
69
70         * PluginProcess/PluginControllerProxy.cpp:
71         (WebKit::PluginControllerProxy::initialize):
72         If we fail to initialize, call removePluginControllerProxy instead of having WebProcessConnection do so.
73
74         (WebKit::PluginControllerProxy::destroy):
75         Pass the plug-in to removePluginControllerProxy.
76
77         * PluginProcess/WebProcessConnection.cpp:
78         (WebKit::WebProcessConnection::removePluginControllerProxy):
79         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
80
81         (WebKit::WebProcessConnection::createPlugin):
82         Don't call removePluginControllerProxy if the plug-in fails to initialize. PluginControllerProxy::initialize now
83         takes care of doing this.
84
85         * Shared/Plugins/NPObjectMessageReceiver.cpp:
86         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
87         (WebKit::NPObjectMessageReceiver::~NPObjectMessageReceiver):
88         * Shared/Plugins/NPObjectMessageReceiver.h:
89         Remove m_shouldReleaseObjectWhenInvalidating, we now know that no NPObjects will have been deallocated
90         by the time the NPObjectMessageReceiver is destroyed.
91
92         (WebKit::NPObjectMessageReceiver::plugin):
93         Add getter.
94         
95         * Shared/Plugins/NPObjectProxy.h:
96         (WebKit::NPObjectProxy::plugin):
97         Add getter.
98         
99         * Shared/Plugins/NPRemoteObjectMap.cpp:
100         (WebKit::NPRemoteObjectMap::NPRemoteObjectMap):
101         Remove m_isInvalidating.
102
103         (WebKit::NPRemoteObjectMap::npObjectProxyDestroyed):
104         Simplify code.
105
106         (WebKit::NPRemoteObjectMap::pluginDestroyed):
107         Rename invalidate to pluginDestroyed. Only invalidate/delete objects that belong to the given plug-in.
108
109         * Shared/Plugins/NPRemoteObjectMap.h:
110         Remove m_isInvalidating.
111         
112         * WebProcess/Plugins/PluginProcessConnection.cpp:
113         (WebKit::PluginProcessConnection::removePluginProxy):
114         Call NPRemoteObjectMap::pluginDestroyed when the plug-in has been destroyed.
115
116 2011-03-17  Oleg Romashin  <oleg.romashin@nokia.com>
117
118         Reviewed by Anders Carlsson.
119
120         Teach WebKit2 messages.py generator to ifdef headers include
121         which are related to ifdef-ed methods/types
122         https://bugs.webkit.org/show_bug.cgi?id=55658
123
124         * Scripts/webkit2/messages.py:
125         * Scripts/webkit2/messages_unittest.py:
126
127 2011-03-16  Joseph Pecoraro  <joepeck@webkit.org>
128
129         Reviewed by Kenneth Rohde Christiansen.
130
131         Viewport no longer allows an auto value for "user-scalable"
132         https://bugs.webkit.org/show_bug.cgi?id=55416
133
134         Make the default value for userScalable be true.
135
136         * UIProcess/API/qt/qwkpage.cpp:
137         (QWKPage::viewportAttributesForSize):
138
139 2011-03-16  Anders Carlsson  <andersca@apple.com>
140
141         Reviewed by Dan Bernstein.
142
143         NPObjectProxy and NPObjectMessageReceiver objects should know their Plugin object
144         https://bugs.webkit.org/show_bug.cgi?id=56506
145
146         * PluginProcess/PluginControllerProxy.cpp:
147         (WebKit::PluginControllerProxy::windowScriptNPObject):
148         (WebKit::PluginControllerProxy::pluginElementNPObject):
149         (WebKit::PluginControllerProxy::evaluate):
150         (WebKit::PluginControllerProxy::getPluginScriptableNPObject):
151         * Shared/Plugins/NPObjectMessageReceiver.cpp:
152         (WebKit::NPObjectMessageReceiver::create):
153         (WebKit::NPObjectMessageReceiver::NPObjectMessageReceiver):
154         (WebKit::NPObjectMessageReceiver::invoke):
155         (WebKit::NPObjectMessageReceiver::invokeDefault):
156         (WebKit::NPObjectMessageReceiver::getProperty):
157         (WebKit::NPObjectMessageReceiver::setProperty):
158         (WebKit::NPObjectMessageReceiver::construct):
159         * Shared/Plugins/NPObjectMessageReceiver.h:
160         * Shared/Plugins/NPObjectProxy.cpp:
161         (WebKit::NPObjectProxy::create):
162         (WebKit::NPObjectProxy::NPObjectProxy):
163         (WebKit::NPObjectProxy::invalidate):
164         (WebKit::NPObjectProxy::initialize):
165         (WebKit::NPObjectProxy::invoke):
166         (WebKit::NPObjectProxy::invokeDefault):
167         (WebKit::NPObjectProxy::getProperty):
168         (WebKit::NPObjectProxy::setProperty):
169         (WebKit::NPObjectProxy::construct):
170         * Shared/Plugins/NPObjectProxy.h:
171         * Shared/Plugins/NPRemoteObjectMap.cpp:
172         (WebKit::NPRemoteObjectMap::createNPObjectProxy):
173         (WebKit::NPRemoteObjectMap::registerNPObject):
174         (WebKit::NPRemoteObjectMap::npVariantToNPVariantData):
175         (WebKit::NPRemoteObjectMap::npVariantDataToNPVariant):
176         * Shared/Plugins/NPRemoteObjectMap.h:
177         * WebProcess/Plugins/PluginProxy.cpp:
178         (WebKit::PluginProxy::pluginScriptableNPObject):
179         (WebKit::PluginProxy::getWindowScriptNPObject):
180         (WebKit::PluginProxy::getPluginElementNPObject):
181         (WebKit::PluginProxy::evaluate):
182
183 2011-03-16  Beth Dakin  <bdakin@apple.com>
184
185         Reviewed by Darin Adler.
186
187         Fix for https://bugs.webkit.org/show_bug.cgi?id=54987 Crash beneath 
188         WebPageProxy::viewWillStartLiveResize when resizing window after web process 
189         crashed
190         -and corresponding-
191         <rdar://problem/9037685>
192
193         Just need simple isValid() checks here. 
194         * UIProcess/WebPageProxy.cpp:
195         (WebKit::WebPageProxy::initializeUIClient):
196         (WebKit::WebPageProxy::viewWillStartLiveResize):
197         (WebKit::WebPageProxy::viewWillEndLiveResize):
198
199 2011-03-16  Damian Kaleta  <dkaleta@apple.com>
200
201         Reviewed by Kevin Decker.
202
203         Add a user default that will force all plugins to opt in to non-executable data
204         https://bugs.webkit.org/show_bug.cgi?id=56487
205         <rdar://problem/9109095>
206
207         * UIProcess/Plugins/PluginProcessProxy.cpp:
208         (WebKit::PluginProcessProxy::PluginProcessProxy):
209         * UIProcess/Plugins/PluginProcessProxy.h:
210         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
211         (WebKit::PluginProcessProxy::pluginNeedsExecutableHeap):
212
213 2011-03-16  Chris Fleizach  <cfleizach@apple.com>
214
215         Reviewed by Darin Adler.
216
217         WK2: Need to propagate enhanced accessibility flag from UI -> web process
218         https://bugs.webkit.org/show_bug.cgi?id=56379
219
220         Support sending the enhanced accessibility flag between processes.
221
222         * UIProcess/WebContext.cpp:
223         (WebKit::WebContext::~WebContext):
224         (WebKit::WebContext::setEnhancedAccessibility):
225         * UIProcess/WebContext.h:
226         * UIProcess/gtk/WebContextGtk.cpp:
227         (WebKit::WebContet::platformInvalidateContext):
228         * UIProcess/mac/WebContextMac.mm:
229         (WebKit::WebContext::platformInitializeWebProcess):
230         (WebKit::WebContext::platformInvalidateContext):
231         * UIProcess/qt/WebContextQt.cpp:
232         (WebKit::WebContext::platformInvalidateContext):
233         * UIProcess/win/WebContextWin.cpp:
234         (WebKit::WebContext::platformInvalidateContext):
235         * WebProcess/WebProcess.cpp:
236         (WebKit::WebProcess::setEnhancedAccessibility):
237         * WebProcess/WebProcess.h:
238         * WebProcess/WebProcess.messages.in:
239
240 2011-03-15  Oliver Hunt  <oliver@apple.com>
241
242         Reviewed by Geoffrey Garen.
243
244         Make Structure creation require a JSGlobalData
245         https://bugs.webkit.org/show_bug.cgi?id=56438
246
247         Mechanical change to make all Structure creation use a JSGlobalData&.
248
249         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
250         (WebKit::JSNPMethod::JSNPMethod):
251         * WebProcess/Plugins/Netscape/JSNPMethod.h:
252         (WebKit::JSNPMethod::createStructure):
253         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
254         (WebKit::JSNPObject::JSNPObject):
255         * WebProcess/Plugins/Netscape/JSNPObject.h:
256         (WebKit::JSNPObject::createStructure):
257
258 2011-03-16  Alexey Proskuryakov  <ap@apple.com>
259
260         Reviewed by Dan Bernstein.
261
262         WebKit2: Sometimes Command-[ opens a new tab and loads the back page in it
263         https://bugs.webkit.org/show_bug.cgi?id=56477
264         <rdar://problem/8806664>
265
266         * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::doneWithKeyEvent):
267         Set NSApplication current event when re-dispatching a key event that returned from the web
268         process unhandled. That way, code that looks at current event modifiers won't be confused.
269
270 2011-03-16  Sam Weinig  <sam@webkit.org>
271
272         Reviewed by Adam Roben.
273
274         Add WebKit2 API to figure out if an input or textarea was edited
275         https://bugs.webkit.org/show_bug.cgi?id=56474
276
277         Expose WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit and
278         WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit. Next time,
279         I will work on giving these functions longer names.
280
281         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
282         (WKBundleNodeHandleGetHTMLInputElementLastChangeWasUserEdit):
283         (WKBundleNodeHandleGetHTMLTextAreaElementLastChangeWasUserEdit):
284         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
285         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
286         (WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
287         (WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
288         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
289
290 2011-03-16  Brady Eidson  <beidson@apple.com>
291
292         Reviewed by Adam Roben.
293
294         https://bugs.webkit.org/show_bug.cgi?id=56467
295         IconDatabase-related crash seen in WK2 tests
296
297         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp:
298         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): The IconLoader might set a null data for an icon, so handle that case.
299
300 2011-03-16  Benjamin Poulain  <benjamin.poulain@nokia.com>
301
302         Reviewed by Kenneth Rohde Christiansen.
303
304         [Qt][WK2] Loading an empty URL crashes
305         https://bugs.webkit.org/show_bug.cgi?id=55501
306
307         A null WKURLRef is created in the API of WebKit 2 when converting a null string. The code
308         of WKPageLoadURL assume the WKPageRef is not null which causes crashes if it is.
309
310         This patch uses the converter toWTFString() to pass from WKPageRef to WTFString. This converter
311         ensure the returned string is a valid null string.
312
313         Tested through the Qt API tests.
314
315         * UIProcess/API/C/WKPage.cpp:
316         (WKPageLoadURL):
317         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
318         (tst_QGraphicsWKView::loadEmptyUrl):
319         * UIProcess/API/qt/tests/qwkpage/qwkpage.pro: Added.
320         * UIProcess/API/qt/tests/qwkpage/tst_qwkpage.cpp: Added.
321         (tst_QWKPage::init):
322         (tst_QWKPage::cleanup):
323         (tst_QWKPage::loadEmptyUrl):
324         * UIProcess/API/qt/tests/tests.pro:
325
326 2011-03-15  Brady Eidson  <beidson@apple.com>
327
328         Reviewed by Sam Weinig.
329
330         https://bugs.webkit.org/show_bug.cgi?id=56425
331         WebKit2 icon database.
332
333         Project file paperwork:
334         * DerivedSources.make:
335         * DerivedSources.pro:
336         * GNUmakefile.am:
337         * WebKit2.pri:
338         * WebKit2.pro:
339         * WebKit2.xcodeproj/project.pbxproj:
340         * win/WebKit2.vcproj:
341         * win/WebKit2Common.vsprops:
342         * Scripts/webkit2/messages.py: Special-case capitalization for messages that start with "URL" to be lowercased
343           to "url" instead of "uRL".
344
345         Add messaging-related stuff:
346         * Platform/CoreIPC/MessageID.h:
347         * UIProcess/WebIconDatabase.messages.in: Added.
348         * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: Added.
349         * UIProcess/WebProcessProxy.cpp:
350         (WebKit::WebProcessProxy::didReceiveMessage):
351         (WebKit::WebProcessProxy::didReceiveSyncMessage):
352
353         Prep to make WebIconDatabase an API object:
354         * Shared/APIObject.h:
355
356         Add an "icon DB is enabled" flag to WebProcessCreationParameters:
357         * Shared/WebProcessCreationParameters.cpp:
358         (WebKit::WebProcessCreationParameters::encode):
359         (WebKit::WebProcessCreationParameters::decode):
360         * Shared/WebProcessCreationParameters.h:
361
362         Add SPI for client apps to set the icon database path:
363         * UIProcess/API/C/WKContext.cpp:
364         (WKContextSetIconDatabasePath):
365         * UIProcess/API/C/WKContextPrivate.h:
366         * UIProcess/WebContext.h:
367         (WebKit::WebContext::setIconDatabasePath):
368
369         Hook up initialization, clearing, and messaging for the icon database:
370         * UIProcess/WebContext.cpp:
371         (WebKit::WebContext::WebContext):
372         (WebKit::WebContext::~WebContext):
373         (WebKit::WebContext::ensureWebProcess):
374         (WebKit::WebContext::didReceiveMessage):
375         (WebKit::WebContext::didReceiveSyncMessage):
376         (WebKit::WebContext::iconDatabasePath):
377         * UIProcess/gtk/WebContextGtk.cpp:
378         (WebKit::WebContext::platformDefaultIconDatabasePath):
379         * UIProcess/mac/WebContextMac.mm:
380         (WebKit::WebContext::platformDefaultIconDatabasePath):
381         * UIProcess/qt/WebContextQt.cpp:
382         (WebKit::WebContext::platformDefaultIconDatabasePath):
383         * UIProcess/win/WebContextWin.cpp:
384         (WebKit::WebContext::platformDefaultIconDatabasePath):
385
386         Add the UIProcess-side IconDatabase. It will be the "actual database" as well as the API object:
387         * UIProcess/WebIconDatabase.cpp: Added.
388         (WebKit::WebIconDatabase::create):
389         (WebKit::WebIconDatabase::~WebIconDatabase):
390         (WebKit::WebIconDatabase::WebIconDatabase):
391         (WebKit::WebIconDatabase::invalidate):
392         (WebKit::WebIconDatabase::retainIconForPageURL):
393         (WebKit::WebIconDatabase::releaseIconForPageURL):
394         (WebKit::WebIconDatabase::setIconURLForPageURL):
395         (WebKit::WebIconDatabase::setIconDataForIconURL):
396         (WebKit::WebIconDatabase::iconDataForPageURL):
397         (WebKit::WebIconDatabase::iconURLForPageURL):
398         (WebKit::WebIconDatabase::iconDataKnownForIconURL):
399         (WebKit::WebIconDatabase::loadDecisionForIconURL):
400         (WebKit::WebIconDatabase::didReceiveMessage):
401         (WebKit::WebIconDatabase::didReceiveSyncMessage):
402         * UIProcess/WebIconDatabase.h: Added.
403         (WebKit::WebIconDatabase::clearContext):
404         (WebKit::WebIconDatabase::type):
405
406         Add the WebProcess-side IconDatabaseProxy. It acts as the WebCore IconDatabase and operates via messaging:
407         * WebProcess/IconDatabase: Added.
408         * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: Added.
409         (WebKit::WebIconDatabaseProxy::~WebIconDatabaseProxy):
410         (WebKit::WebIconDatabaseProxy::WebIconDatabaseProxy):
411         (WebKit::WebIconDatabaseProxy::isEnabled):
412         (WebKit::WebIconDatabaseProxy::setEnabled):
413         (WebKit::WebIconDatabaseProxy::iconForPageURL):
414         (WebKit::WebIconDatabaseProxy::retainIconForPageURL):
415         (WebKit::WebIconDatabaseProxy::releaseIconForPageURL):
416         (WebKit::WebIconDatabaseProxy::iconURLForPageURL):
417         (WebKit::WebIconDatabaseProxy::iconDataKnownForIconURL):
418         (WebKit::WebIconDatabaseProxy::loadDecisionForIconURL):
419         (WebKit::WebIconDatabaseProxy::setIconURLForPageURL):
420         (WebKit::WebIconDatabaseProxy::setIconDataForIconURL):
421         (WebKit::WebIconDatabaseProxy::urlImportFinished):
422         (WebKit::WebIconDatabaseProxy::didReceiveMessage):
423         * WebProcess/IconDatabase/WebIconDatabaseProxy.h: Added.
424
425         Hook up initialization and messaging for the icon database proxy:
426         * WebProcess/WebProcess.cpp:
427         (WebKit::WebProcess::WebProcess):
428         (WebKit::WebProcess::initializeWebProcess):
429         (WebKit::WebProcess::didReceiveMessage):
430         * WebProcess/WebProcess.h:
431
432 2011-03-15  Sam Weinig  <sam@webkit.org>
433
434         Reviewed by Anders Carlsson.
435
436         WebKit2: False SPOD cursor when context menu is open
437         <rdar://problem/9029154>
438         https://bugs.webkit.org/show_bug.cgi?id=56433
439
440         * UIProcess/WebPageProxy.cpp:
441         (WebKit::WebPageProxy::showContextMenu):
442         Update to match showPopupMenu idiomatically, and stop the responsivenessTimer
443         since the act of showing the context menu could spin a nested runloop.
444
445         * UIProcess/mac/WebContextMenuProxyMac.mm:
446         (WebKit::WebContextMenuProxyMac::showContextMenu):
447         * UIProcess/qt/WebContextMenuProxyQt.cpp:
448         (WebKit::WebContextMenuProxyQt::showContextMenu):
449         * UIProcess/win/WebContextMenuProxyWin.cpp:
450         (WebKit::WebContextMenuProxyWin::showContextMenu):
451         Move isEmpty() check to implementations, since we don't want to show
452         this in any case, not just the one where we check it.
453
454 2011-03-15  Siddharth Mathur  <siddharth.mathur@nokia.com>
455
456         Reviewed by Laszlo Gombos.
457
458         [Qt][Symbian][WK2] Fix exporting and importing the WebProcessMainQt symbol
459         https://bugs.webkit.org/show_bug.cgi?id=56417
460
461         Use the Q_DECL_EXPORT and Q_DECL_IMPORT macros directly to make sure
462         the symbol is always exported/imported.
463
464         * WebProcess/qt/WebProcessMainQt.cpp:
465         (WebKit::WebProcessMainQt):
466         * qt/MainQt.cpp:
467
468 2011-03-15  Alexey Proskuryakov  <ap@apple.com>
469
470         Reviewed by Darin Adler.
471
472         REGRESSION (WebKit2): keygen element doesn't work
473         https://bugs.webkit.org/show_bug.cgi?id=56402
474         <rdar://problem/9006545>
475
476         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
477         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
478         Added strings used by keygen.
479
480         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: Initialize a WebCore pointer to
481         a function used by keygen.
482
483 2011-03-15  Beth Dakin  <bdakin@apple.com>
484
485         Reviewed by Simon Fraser.
486
487         WebKit2 part of <rdar://problem/9075624> Overlay scrollbars slow down PLT by 6%
488
489         New WebKitystemInterface function to force the scrollbars to flash
490         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
491         (InitWebCoreSystemInterface):
492
493 2011-03-15  Anders Carlsson  <andersca@apple.com>
494
495         Reviewed by Sam Weinig.
496
497         Make sure that NP_Shutdown is always the last NPP function called
498         https://bugs.webkit.org/show_bug.cgi?id=56391
499         <rdar://problem/8989902>
500
501         Make sure to always increment the load count whenever a web process connection
502         is opened to a plug-in process, and decrement it when the last web process connection
503         goes away.
504
505         * PluginProcess/PluginProcess.cpp:
506         (WebKit::PluginProcess::createWebProcessConnection):
507         (WebKit::PluginProcess::startShutdownTimerIfNecessary):
508         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
509         * Shared/Plugins/Netscape/NetscapePluginModule.h:
510         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
511         (WebKit::NetscapePlugin::NetscapePlugin):
512         (WebKit::NetscapePlugin::~NetscapePlugin):
513
514 2011-03-15  Martin Robinson  <mrobinson@igalia.com>
515
516         Reviewed by Adam Barth.
517
518         [GTK] [WebKit2] The UIProcess never changes the mouse cursor
519         https://bugs.webkit.org/show_bug.cgi?id=56333
520
521         Add an implementation for WebView::addCursor for WebKit2 GTK+. This allows
522         the cursor to change as the user mouses around the page. There is currently
523         no test infrastructure to track cursor changes.
524
525         * UIProcess/gtk/WebView.cpp:
526         (WebKit::WebView::setCursor): Ported implementation from WebKit1.
527
528 2011-03-15  Kevin Ollivier  <kevino@theolliviers.com>
529
530         Reviewed by Darin Adler.
531
532         Introduce WTF_USE_EXPORT_MACROS, which will allow us to put shared library import/export
533         info into the headers rather than in export symbol definition files, but disable it on 
534         all platforms initially so we can deal with port build issues one port at a time.
535         
536         https://bugs.webkit.org/show_bug.cgi?id=27551
537
538         * config.h:
539
540 2011-03-14  Alexey Proskuryakov  <ap@apple.com>
541
542         Reviewed by Darin Adler.
543
544         REGRESSION: Print preview is blank when selecting multiple pages per sheet
545         https://bugs.webkit.org/show_bug.cgi?id=56341
546         <rdar://problem/8991382>
547
548         * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): Don't reset latest expected
549         callback number after receiving a different one. We only update preview after receiving
550         the latest expected page data (and the assumption is that AppKit will ask for pages in
551         natural order for N-up).
552
553 2011-03-14  Adam Roben  <aroben@apple.com>
554
555         Make WKBundlePageCanHandleRequest return true for empty document URLs
556
557         Reviewed by Sam Weinig.
558
559         * WebProcess/WebPage/WebPage.cpp:
560         (WebKit::WebPage::canHandleRequest): Return true for any URL schemes that are handled as
561         empty documents, and defer to the platform for everything else.
562
563         * WebProcess/WebPage/WebPage.h: Added platformCanHandleRequest.
564
565         * WebProcess/WebPage/mac/WebPageMac.mm:
566         (WebKit::WebPage::platformCanHandleRequest):
567         * WebProcess/WebPage/qt/WebPageQt.cpp:
568         (WebKit::WebPage::platformCanHandleRequest):
569         * WebProcess/WebPage/win/WebPageWin.cpp:
570         (WebKit::WebPage::platformCanHandleRequest):
571         Renamed from canHandleRequest.
572
573 2011-03-14  Chris Fleizach  <cfleizach@apple.com>
574
575         Reviewed by Beth Dakin.
576
577         CrashTracer: 60 crashes in WebProcess at com.apple.WebKit2: -[AccessibilityWebPageObject accessibilityHitTest:] + 248
578         https://bugs.webkit.org/show_bug.cgi?id=56336
579
580         Crash trace indicates a nil pointer access in one of these m_page->mainFrame()->coreFrame()->view()
581         pointers.
582
583         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
584         (-[AccessibilityWebPageObject accessibilityHitTest:]):
585
586 2011-03-14  Alice Liu  <alice.liu@apple.com>
587
588         Reviewed by Sam Weinig.
589
590         Provide API for creating WKImage from CGImageRef
591         https://bugs.webkit.org/show_bug.cgi?id=56159
592
593         Add function for creating a WKImage from CGImage data.
594         * Shared/API/c/cg/WKImageCG.cpp:
595         (WKImageCreateFromCGImage): Added. Creates a graphics context for the bitmap-backed image and draws into it. 
596         * Shared/API/c/cg/WKImageCG.h:
597
598 2011-03-14  Balazs Kelemen  <kbalazs@webkit.org>
599
600         Reviewed by Adam Roben.
601
602         [Qt][WK2]Unbreak InjectedBundle on Qt
603         https://bugs.webkit.org/show_bug.cgi?id=54109
604
605         Add API's to WKURL and WKString to satisfy
606         WebKitTestRunner's needs.
607
608         * Shared/API/c/WKString.cpp:
609         (WKStringIsEqualToUTF8CStringIgnoringCase):
610         * Shared/API/c/WKString.h:
611         * Shared/API/c/WKURL.cpp:
612         (WKURLCopyHostName):
613         (WKURLCopyScheme):
614         * Shared/API/c/WKURL.h:
615         * Shared/WebString.h:
616         (WebKit::WebString::equalToUTF8StringIgnoringCase):
617         * Shared/WebURL.h: Added OwnPtr<KURL> member to be able
618         to lazily parse the URL and store the result.
619         (WebKit::WebURL::host):
620         (WebKit::WebURL::protocol):
621         (WebKit::WebURL::parseURLIfNecessary):
622         * win/WebKit2.def: Revert the symbol exports that were
623         needed to use KURL in WebKitTestRunner.
624
625 2011-03-14  Jeff Miller  <jeffm@apple.com>
626
627         Reviewed by Adam Roben.
628
629         Add WKViewSetScrollOffsetOnNextResize() to C API on Windows
630         https://bugs.webkit.org/show_bug.cgi?id=56340
631
632         * UIProcess/API/C/win/WKView.cpp:
633         (WKViewSetScrollOffsetOnNextResize): Added.
634         * UIProcess/API/C/win/WKView.h: Added WKViewSetScrollOffsetOnNextResize().
635         * UIProcess/win/WebView.cpp:
636         (WebKit::WebView::onSizeEvent): Apply any scroll offset when setting the drawing area size.
637         (WebKit::WebView::setScrollOffsetOnNextResize): Added.
638         * UIProcess/win/WebView.h: Added setScrollOffsetOnNextResize().
639
640 2011-03-14  Brian Weinstein  <bweinstein@apple.com>
641
642         Reviewed by Adam Roben and Gavin Barraclough.
643
644         FileSystemWin.cpp needs listDirectory() implementation
645         https://bugs.webkit.org/show_bug.cgi?id=56331
646         <rdar://problem/9126635>
647         
648         Move PathWalker down into WebCore, and call the PathWalker in WebCore
649         (that now has a second argument, the pattern to take).
650
651         * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
652         (WebKit::PluginInfoStore::pluginPathsInDirectory):
653
654 2011-03-14  Sam Weinig  <sam@webkit.org>
655
656         Reviewed by Darin Adler.
657
658         WebKit2: No icon shown for <input type=file>
659         <rdar://problem/8988982>
660         https://bugs.webkit.org/show_bug.cgi?id=54288
661
662         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
663         (WebKit::WebChromeClient::chooseIconForFiles):
664         Add implementation for chooseIconForFiles which calls down to Icon::createIconForFiles.
665
666 2011-03-14  Brady Eidson  <beidson@apple.com>
667
668         Reviewed by Dan Bernstein.
669
670         <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
671         Need WK2 API to view/manage origins with LocalStorage
672
673         Hookup the existing API stubs to the WebCore implementations:
674         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp:
675         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
676         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
677         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
678
679 2011-03-13  Brady Eidson  <beidson@apple.com>
680
681         Reviewed by Sam Weinig.
682
683         <rdar://problem/9127270> and https://bugs.webkit.org/show_bug.cgi?id=56282
684
685         Pass the path along with creation parameters:
686         * Shared/WebProcessCreationParameters.cpp:
687         (WebKit::WebProcessCreationParameters::encode):
688         (WebKit::WebProcessCreationParameters::decode):
689         * Shared/WebProcessCreationParameters.h:
690
691         Add SPI to set the path:
692         * UIProcess/API/C/WKContext.cpp:
693         (WKContextSetLocalStorageDirectory):
694         * UIProcess/API/C/WKContextPrivate.h:
695
696         Pass the path along in the process creation parameters:
697         * UIProcess/WebContext.cpp:
698         (WebKit::WebContext::ensureWebProcess):
699         (WebKit::WebContext::localStorageDirectory):
700         * UIProcess/WebContext.h:
701         (WebKit::WebContext::setLocalStorageDirectory):
702
703         * UIProcess/gtk/WebContextGtk.cpp:
704         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
705         * UIProcess/mac/WebContextMac.mm:
706         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
707         * UIProcess/qt/WebContextQt.cpp:
708         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
709         * UIProcess/win/WebContextWin.cpp:
710         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
711
712         Include the path with settings updates, because WebCore needs it set on the Settings object:
713         * WebProcess/WebPage/WebPage.cpp:
714         (WebKit::WebPage::updatePreferences):
715
716         * WebProcess/WebProcess.cpp:
717         (WebKit::WebProcess::initializeWebProcess):
718         * WebProcess/WebProcess.h:
719         (WebKit::WebProcess::localStorageDirectory):
720
721         Sandboxing stuff:
722         * WebProcess/com.apple.WebProcess.sb:
723         * WebProcess/mac/WebProcessMac.mm:
724         (WebKit::initializeSandbox):
725
726 2011-03-12  Jer Noble  <jer.noble@apple.com>
727
728         Reviewed by Mark Rowe.
729
730         WebKit2: Build WKFullScreenWindowController cleanly in 32-bit.
731         https://bugs.webkit.org/show_bug.cgi?id=56260
732
733         Include <Carbon/Carbon.h> instead of <HIToolbox/MacApplication.h>.
734
735         * UIProcess/mac/WKFullScreenWindowController.mm:
736
737 2011-03-13  Sam Weinig  <sam@webkit.org>
738
739         Reviewed by Anders Carlsson.
740
741         Add ability to create a WKErrorRef
742         <rdar://problem/9115768>
743         https://bugs.webkit.org/show_bug.cgi?id=56279
744
745         * Shared/API/c/cf/WKErrorCF.cpp: Added.
746         (WKErrorCreateWithCFError):
747         (WKErrorCopyCFError):
748         * Shared/API/c/cf/WKErrorCF.h: Added.
749         Add new API to create a WKErrorRef from a CFErrorRef
750         and vice-versa.
751
752         * WebKit2.xcodeproj/project.pbxproj:
753         * win/WebKit2.vcproj:
754         * win/WebKit2Generated.make:
755         Add new files.
756
757 2011-03-13  Pratik Solanki  <psolanki@apple.com>
758
759         Reviewed by Brady Eidson.
760
761         Make adjustMIMETypeIfNecessary use CFNetwork directly
762         https://bugs.webkit.org/show_bug.cgi?id=55912
763
764         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
765         (InitWebCoreSystemInterface): Support for new WKSI functions.
766
767 2011-03-13  Dan Bernstein  <mitz@apple.com>
768
769         Reviewed by Darin Adler.
770
771         WebPageProxy cleanup
772         https://bugs.webkit.org/show_bug.cgi?id=56267
773
774         * UIProcess/WebPageProxy.cpp: Moved all Mac-only function implementations from
775         here to WebPageProxyMac.mm.
776         * UIProcess/WebPageProxy.h: Cleaned up #includes.
777         * UIProcess/mac/WebPageProxyMac.mm: Moved all Mac-only function implementations
778         here.
779         (WebKit::WebPageProxy::updateWindowIsVisible):
780         (WebKit::WebPageProxy::windowAndViewFramesChanged):
781         (WebKit::WebPageProxy::getMarkedRange):
782         (WebKit::WebPageProxy::characterIndexForPoint):
783         (WebKit::WebPageProxy::firstRectForCharacterRange):
784         (WebKit::WebPageProxy::writeSelectionToPasteboard):
785         (WebKit::WebPageProxy::setDragImage):
786         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
787         (WebKit::WebPageProxy::interpretKeyEvent):
788         (WebKit::WebPageProxy::sendComplexTextInputToPlugin):
789         (WebKit::WebPageProxy::uppercaseWord):
790         (WebKit::WebPageProxy::lowercaseWord):
791         (WebKit::WebPageProxy::capitalizeWord):
792         (WebKit::WebPageProxy::setSmartInsertDeleteEnabled):
793         (WebKit::WebPageProxy::didPerformDictionaryLookup):
794         (WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
795         (WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
796         (WebKit::WebPageProxy::setComplexTextInputEnabled):
797
798 2011-03-13  Dan Bernstein  <mitz@apple.com>
799
800         Reviewed by Darin Adler.
801
802         <rdar://problem/8949683> WebKit2: Drag image is offset when the page is scrolled down
803         https://bugs.webkit.org/show_bug.cgi?id=56265
804
805         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
806         (WebKit::WebDragClient::startDrag): Send the location in view coordinates rather than
807         document coordinates.
808
809 2011-03-13  Dan Bernstein  <mitz@apple.com>
810
811         Reviewed by Mark Rowe.
812
813         Fix a crash when dragging.
814
815         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
816         (WebKit::convertImageToBitmap): Retain the saved context.
817
818 2011-03-12  Darin Adler  <darin@apple.com>
819
820         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
821         (WebKit::WebDragClient::startDrag): Fixed typo in a comment.
822
823 2011-03-11  Darin Adler  <darin@apple.com>
824
825         Reviewed by Sam Weinig.
826
827         Dragging image to desktop gives webloc instead of image file in WebKit2
828         https://bugs.webkit.org/show_bug.cgi?id=56193
829
830         * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
831         (WebKit::convertImageToBitmap): Added. Factored out from startDrag to
832         make the startDrag code clearer.
833         (WebKit::WebDragClient::startDrag): Streamlined code a bit.
834         (WebKit::cachedImage): Added. Helper for function below.
835         (WebKit::arrayForURLsWithTitles): Added. Helper for function below.
836         (WebKit::WebDragClient::declareAndWriteDragImage): Added code to handle file
837         promises and removed a log of uneeded code.
838         (-[WKPasteboardFilePromiseOwner copyDropDirectory]): Added.
839         (promisedDataClient): Added.
840         (-[WKPasteboardOwner clearImage]): Added.
841         (-[WKPasteboardOwner initWithImage:]): Added.
842         (-[WKPasteboardOwner dealloc]): Added.
843         (-[WKPasteboardOwner finalize]): Added.
844         (-[WKPasteboardOwner pasteboard:provideDataForType:]): Added.
845         (-[WKPasteboardOwner pasteboardChangedOwner:]): Added.
846         (matchesExtensionOrEquivalent): Added.
847         (-[WKPasteboardOwner namesOfPromisedFilesDroppedAtDestination:]): Added.
848         Much of the new code above came from the WebKit1 drag code.
849
850         * WebProcess/WebPage/WebPage.cpp:
851         (WebKit::WebPage::dragEnded): Added call to Mac-only platformDragEnded.
852         * WebProcess/WebPage/WebPage.h: Added Mac-only platformDragEnded and m_dragSource.
853         * WebProcess/WebPage/mac/WebPageMac.mm:
854         (WebKit::WebPage::setDragSource): Added.
855         (WebKit::WebPage::platformDragEnded): Added.
856
857 2011-03-12  Mark Rowe  <mrowe@apple.com>
858
859         Fix the 32-bit build.
860
861         This involves hacking around some HIToolbox headers that do things of dubious correctness,
862         and fixing the usual CGRect vs NSRect issues.
863         
864         * UIProcess/mac/WKFullScreenWindowController.mm:
865         (-[WKFullScreenWindowController enterFullScreen:]): NSRect is not CGRect.
866         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm:
867         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
868
869 2011-03-12  Anders Carlsson  <andersca@apple.com>
870
871         Reviewed by Sam Weinig.
872
873         * WebProcess/WebPage/WebFrame.cpp:
874         (WebKit::WebFrame::url):
875         Get the URL from the loader, not from the document.
876
877         (WebKit::WebFrame::suggestedFilenameForResourceWithURL):
878         Return the correct suggested filename for the main resource.
879
880         (WebKit::WebFrame::mimeTypeForResourceWithURL):
881         Return the correct mime type for the main resource.
882
883 2011-03-12  Anders Carlsson  <andersca@apple.com>
884
885         Reviewed by Sam Weinig.
886
887         Should be able to download a PDF to the Downloads folder
888         https://bugs.webkit.org/show_bug.cgi?id=56256
889
890         * UIProcess/API/C/WKPage.h:
891         Add WKPageSaveDataToFileInDownloadsFolderCallback to the UI client.
892
893         * UIProcess/API/mac/PDFViewController.h:
894         * UIProcess/API/mac/PDFViewController.mm:
895         (-[WKPDFView _applyPDFPreferences]):
896         (-[WKPDFView _updatePreferences:]):
897         Use new PDFViewController::page getter.
898
899         (-[WKPDFView PDFViewSavePDFToDownloadFolder:]):
900         Call PDFViewController::savePDFToDownloadsFolder.
901
902         (WebKit::releaseCFData):
903         (WebKit::PDFViewController::savePDFToDownloadsFolder):
904         Create a WebData that wraps the CFData, then pass it along to
905         WebPageProxy::saveDataToFileInDownloadsFolder.
906
907         * UIProcess/WebPageProxy.cpp:
908         (WebKit::WebPageProxy::saveDataToFileInDownloadsFolder):
909         Call WebUIClient::saveDataToFileInDownloadsFolder.
910
911         (WebKit::WebUIClient::saveDataToFileInDownloadsFolder):
912         * UIProcess/WebUIClient.h:
913         Call the UI client callback function.
914
915 2011-03-12  Anders Carlsson  <andersca@apple.com>
916
917         Reviewed by Sam Weinig.
918
919         WebData should be able to wrap already existing data
920         https://bugs.webkit.org/show_bug.cgi?id=56254
921
922         * Shared/WebData.h:
923         (WebKit::WebData::createWithoutCopying):
924         (WebKit::WebData::create):
925         (WebKit::WebData::~WebData):
926         (WebKit::WebData::bytes):
927         (WebKit::WebData::size):
928         (WebKit::WebData::WebData):
929         (WebKit::WebData::fastFreeBytes):
930
931 2011-03-12  Jer Noble  <jer.noble@apple.com>
932
933         Reviewed by Eric Carlson.
934
935         WebKit2: Initialize the WebFullScreenManagerProxy with a WKView
936         https://bugs.webkit.org/show_bug.cgi?id=56250
937
938         * UIProcess/API/mac/WKView.mm:
939         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Call fullScreenManager()->setView(self).
940
941 2011-03-11  Jer Noble  <jer.noble@apple.com>
942
943         Reviewed by Anders Carlsson.
944
945         Add full screen animation code to WebFullScreenManager.
946         https://bugs.webkit.org/show_bug.cgi?id=56220
947
948         * WebProcess/FullScreen/WebFullScreenManager.cpp: .
949         (WebKit::WebFullScreenManager::~WebFullScreenManager): Added.
950         (WebKit::WebFullScreenManager::exitFullScreenForElement): Remove ASSERTs.
951         (WebKit::WebFullScreenManager::willEnterFullScreen): Set the full screen renderer's background color.
952         (WebKit::WebFullScreenManager::didEnterFullScreen): Ditto.
953         (WebKit::WebFullScreenManager::willExitFullScreen): Ditto.
954         (WebKit::WebFullScreenManager::didExitFullScreen): Ditto.
955         * WebProcess/FullScreen/WebFullScreenManager.h: Make a few functions pure virtual to be implemented in a 
956             concrete subclass.
957         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Added.
958         * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Added.
959         (-[WebFullScreenManagerAnimationListener initWithManager:WebKit::began:finished:]): Listener for CAAnimations.
960         (-[WebFullScreenManagerAnimationListener animationDidStart:]): Added.
961         (-[WebFullScreenManagerAnimationListener animationDidStop:finished:]): Added.
962         (-[WebFullScreenManagerAnimationListener invalidate]): Added.
963         (WebKit::WebFullScreenManager::create): Now creates a WebFullScreenManagerMac.
964         (WebKit::WebFullScreenManagerMac::create): Added.
965         (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): Added.
966         (WebKit::WebFullScreenManagerMac::~WebFullScreenManagerMac): Added.
967         (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Set up the remote layer host.
968         (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Create a CATransform3D
969             which will animate the full screen renderer from its initial position to its final one.
970         (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto.
971
972 2011-03-11  Jer Noble  <jer.noble@apple.com>
973
974         Reviewed by Anders Carlsson.
975
976         Hook up new WKFullScreenWindowController functions to WebFullScreenManagerProxy
977         https://bugs.webkit.org/show_bug.cgi?id=56218
978
979         * UIProcess/WebFullScreenManagerProxy.cpp:
980         * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Added.
981         (WebKit::WebFullScreenManagerProxy::enterFullScreen): Call into WKFullScreenWindowController.
982         (WebKit::WebFullScreenManagerProxy::exitFullScreen): Ditto.
983         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Ditto.
984         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Ditto.
985         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Ditto.
986         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Ditto.
987         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Ditto.
988         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Ditto.
989         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Ditto.
990         * UIProcess/API/mac/WKView.mm:
991         (-[WKView fullScreenWindowController]): Lazily instantiate a WKFullScreenWindowController.
992         * UIProcess/API/mac/WKViewInternal.h:
993
994 2011-03-11  Jer Noble  <jer.noble@apple.com>
995
996         Reviewed by Anders Carlsson.
997
998         Add the WKFullScreenWindowController, mostly cribbed from WebKit's WebFullScreenController.
999
1000         [WebKit2] Implement a full screen window controller
1001         https://bugs.webkit.org/show_bug.cgi?id=56210
1002
1003         * UIProcess/mac/WKFullScreenWindowController.h: Added.
1004         * UIProcess/mac/WKFullScreenWindowController.mm: Added.
1005         (-[WKFullScreenWindowController init]): Remove the _mediaEventListener.
1006         (-[WKFullScreenWindowController dealloc]): Make sure to cancel previous async requests.
1007         (-[WKFullScreenWindowController windowDidLoad]): Remove the Tiger protection.
1008         (-[WKFullScreenWindowController webView]): Type change.
1009         (-[WKFullScreenWindowController setWebView:]): Type change.
1010         (-[WKFullScreenWindowController applicationDidResignActive:]): Case changes.
1011         (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Case changes.
1012         (-[WKFullScreenWindowController enterFullScreen:]): Removed most of the animation code
1013             which will reappear in WebFullScreenManager.
1014         (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Added.
1015         (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added.
1016         (-[WKFullScreenWindowController exitFullScreen]): Ditto to enterFullScreen.
1017         (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Added.
1018         (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Added.
1019         (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Set up the
1020             layer tree host.
1021         (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Tear down same.
1022         (-[WKFullScreenWindowController getFullScreenRect:WebCore::]): Added.
1023         (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): Case changes.
1024         (-[WKFullScreenWindowController _disableIdleDisplaySleep]): Ditto.
1025         (-[WKFullScreenWindowController _enableIdleDisplaySleep]): Ditto.
1026         (-[WKFullScreenWindowController _disableIdleSystemSleep]): Ditto.
1027         (-[WKFullScreenWindowController _enableIdleSystemSleep]): Ditto.
1028         (-[WKFullScreenWindowController _enableTickleTimer]): Ditto.
1029         (-[WKFullScreenWindowController _disableTickleTimer]): Ditto.
1030         (-[WKFullScreenWindowController _tickleTimerFired]): Ditto.
1031         (-[WKFullScreenWindowController _updatePowerAssertions]): Use _isPlaying ivar.
1032         (-[WKFullScreenWindowController _manager]): Added.
1033         (-[WKFullScreenWindowController _requestExit]): Case changes.
1034         (-[WKFullScreenWindowController _requestExitFullScreenWithAnimation:]): Ditto.
1035         (-[WKFullScreenWindowController _swapView:with:]): Added.
1036         (-[WKFullScreenWindowController _fullScreenWindow]): Case changes.
1037         (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): Geometry no
1038             longer needs to be flipped.
1039         (-[WKFullScreenWindow cancelOperation:]): Case changes.
1040
1041 2011-03-11  Jer Noble  <jer.noble@apple.com>
1042
1043         Reviewed by Anders Carlsson.
1044
1045         Create new interface stubs to support full screen mode in WebKit2.
1046
1047         WebKit2: Plumb new full screen animation APIs through WebKit2.
1048         https://bugs.webkit.org/show_bug.cgi?id=55993
1049
1050         * UIProcess/WebFullScreenManagerProxy.cpp:
1051         (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): Added.
1052         (WebKit::WebFullScreenManagerProxy::invalidate): Clear m_webView.
1053         (WebKit::WebFullScreenManagerProxy::setWebView): Set m_webView.
1054         (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): Added.
1055         (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): Added.
1056         (WebKit::WebFullScreenManagerProxy::beganEnterFullScreenAnimation): Added stub.
1057         (WebKit::WebFullScreenManagerProxy::finishedEnterFullScreenAnimation): Added stub.
1058         (WebKit::WebFullScreenManagerProxy::beganExitFullScreenAnimation): Added stub.
1059         (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): Added stub.
1060         (WebKit::WebFullScreenManagerProxy::enterAcceleratedCompositingMode): Added stub.
1061         (WebKit::WebFullScreenManagerProxy::exitAcceleratedCompositingMode): Added stub.
1062         (WebKit::WebFullScreenManagerProxy::getFullScreenRect): Added stub.
1063         * UIProcess/WebFullScreenManagerProxy.h:
1064         * UIProcess/WebFullScreenManagerProxy.messages.in: Added new message definitions.
1065         * UIProcess/WebPageProxy.cpp: Moved include of WebFullScreenManagerProxy.h into source file.
1066         * UIProcess/WebPageProxy.h: Ditto.
1067         * WebProcess/FullScreen/WebFullScreenManager.cpp:
1068         (WebKit::WebFullScreenManager::element): Added.
1069         (WebKit::WebFullScreenManager::supportsFullScreen): Send message through WebPage.
1070         (WebKit::WebFullScreenManager::enterFullScreenForElement): Ditto.
1071         (WebKit::WebFullScreenManager::exitFullScreenForElement): Ditto.
1072         (WebKit::WebFullScreenManager::beganEnterFullScreenAnimation): Added..
1073         (WebKit::WebFullScreenManager::finishedEnterFullScreenAnimation): Added.
1074         (WebKit::WebFullScreenManager::beganExitFullScreenAnimation): Added.
1075         (WebKit::WebFullScreenManager::finishedExitFullScreenAnimation): Added.
1076         (WebKit::WebFullScreenManager::setRootFullScreenLayer): Added stub.
1077         (WebKit::WebFullScreenManager::getFullScreenRect): Added.
1078         (WebKit::WebFullScreenManager::beginEnterFullScreenAnimation): Added stub.
1079         (WebKit::WebFullScreenManager::beginExitFullScreenAnimation): Added stub.
1080         * WebProcess/FullScreen/WebFullScreenManager.h:
1081         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added new message definitions.
1082         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1083         (WebKit::WebChromeClient::setRootFullScreenLayer): Added.
1084         * WebProcess/WebCoreSupport/WebChromeClient.h:
1085
1086 2011-03-11  Alice Liu  <alice.liu@apple.com>
1087
1088         Reviewed by Sam Weinig.
1089
1090         Support encoding /decoding WebData in usermessages
1091         https://bugs.webkit.org/show_bug.cgi?id=56158
1092
1093         Added encoding/decoding for APIObject::TypeData
1094         * Shared/UserMessageCoders.h:
1095         (WebKit::UserMessageEncoder::baseEncode):
1096         (WebKit::UserMessageDecoder::baseDecode):
1097
1098 2011-03-11  Alice Liu  <alice.liu@apple.com>
1099
1100         Reviewed by Sam Weinig.
1101
1102         Add api for "remove" to WKMutableDictionary
1103         https://bugs.webkit.org/show_bug.cgi?id=56157
1104
1105         * Shared/API/c/WKMutableDictionary.cpp:
1106         (WKDictionaryRemoveItem): Added; call remove on MutableDictionary impl.
1107         * Shared/API/c/WKMutableDictionary.h:
1108         * Shared/MutableDictionary.cpp:
1109         (WebKit::MutableDictionary::remove): Added; call remove on the underlying hashmap.
1110         * Shared/MutableDictionary.h:
1111
1112 2011-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
1113
1114         Unreviewed, rolling out r80899 and r80912.
1115         http://trac.webkit.org/changeset/80899
1116         http://trac.webkit.org/changeset/80912
1117         https://bugs.webkit.org/show_bug.cgi?id=56236
1118
1119         Caused animation tests to crash on Snow Leopard WebKit2
1120         (Requested by rniwa on #webkit).
1121
1122         * Shared/ShareableBitmap.cpp:
1123         (WebKit::ShareableBitmap::create):
1124         (WebKit::ShareableBitmap::createShareable):
1125         (WebKit::ShareableBitmap::resize):
1126         * Shared/ShareableBitmap.h:
1127         (WebKit::ShareableBitmap::numBytesForSize):
1128         (WebKit::ShareableBitmap::sizeInBytes):
1129         * UIProcess/DrawingAreaProxyImpl.cpp:
1130         (WebKit::DrawingAreaProxyImpl::update):
1131         * WebKit2.xcodeproj/project.pbxproj:
1132         * WebProcess/WebPage/DrawingArea.h:
1133         (WebKit::DrawingArea::didUpdate):
1134         * WebProcess/WebPage/DrawingArea.messages.in:
1135         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1136         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
1137         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
1138         (WebKit::DrawingAreaImpl::didUpdate):
1139         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1140         (WebKit::DrawingAreaImpl::display):
1141         * WebProcess/WebPage/DrawingAreaImpl.h:
1142         * WebProcess/WebPage/SharedMemoryCache.cpp: Removed.
1143         * WebProcess/WebPage/SharedMemoryCache.h: Removed.
1144         * win/WebKit2.vcproj:
1145
1146 2011-03-11  Brian Weinstein  <bweinstein@apple.com>
1147
1148         Windows build fix. Add SharedMemoryCache to the vcproj.
1149
1150         * win/WebKit2.vcproj:
1151
1152 2011-03-11  Alexey Proskuryakov  <ap@apple.com>
1153
1154         Reviewed by Sam Weinig.
1155
1156         https://bugs.webkit.org/show_bug.cgi?id=56222
1157         A window remains frozen if web process crashes during printing
1158
1159         * UIProcess/API/mac/PageClientImpl.h:
1160         * UIProcess/API/mac/PageClientImpl.mm:
1161         * UIProcess/PageClient.h:
1162         * UIProcess/WebPageProxy.cpp:
1163         (WebKit::WebPageProxy::setComplexTextInputEnabled):
1164         * UIProcess/WebPageProxy.h:
1165         Moved setAutodisplay code into WKPrintingView.
1166
1167         * UIProcess/API/mac/WKPrintingView.h:
1168         * UIProcess/API/mac/WKView.mm:
1169         (-[WKView printOperationWithPrintInfo:forFrame:]):
1170         Keep a reference to the actual WKView, so that we can manipulate how it displays, even if
1171         page goes away.
1172
1173         * UIProcess/API/mac/WKPrintingView.mm:
1174         (-[WKPrintingView initWithFrameProxy:WebKit::view:]):
1175         (-[WKPrintingView _setAutodisplay:]):
1176         (-[WKPrintingView _suspendAutodisplay]):
1177         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
1178         Move setAutodisplay here.
1179
1180 2011-03-11  Anders Carlsson  <andersca@apple.com>
1181
1182         Reviewed by Sam Weinig.
1183
1184         Add a shared memory cache to the web process
1185         https://bugs.webkit.org/show_bug.cgi?id=56232
1186
1187         Add a very simple shared memory cache to the web process, so that we don't have to allocate and
1188         free memory over and over when painting.
1189
1190         * Shared/ShareableBitmap.cpp:
1191         (WebKit::ShareableBitmap::create):
1192         (WebKit::ShareableBitmap::createShareable):
1193         (WebKit::ShareableBitmap::resize):
1194         * Shared/ShareableBitmap.h:
1195         (WebKit::ShareableBitmap::numBytesNeededForBitmapSize):
1196         (WebKit::ShareableBitmap::sizeInBytes):
1197         Rename numBytesForSize to numBytesNeededForBitmapSize.
1198
1199         * UIProcess/DrawingAreaProxyImpl.cpp:
1200         (WebKit::DrawingAreaProxyImpl::update):
1201         Always send back a DidUpdate message, even if we didn't use the update info.
1202         This is needed so that the web process knows when the UI process is done with the shared memory inside
1203         the update info struct.
1204
1205         * WebKit2.xcodeproj/project.pbxproj:
1206         Add new files.
1207
1208         * WebProcess/WebPage/DrawingArea.h:
1209         (WebKit::DrawingArea::didUpdate):
1210         * WebProcess/WebPage/DrawingArea.messages.in:
1211         DidUpdate now takes a boolean.
1212
1213         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1214         (WebKit::sharedMemoryCache):
1215         Add shared memory cache.
1216
1217         (WebKit::DrawingAreaImpl::~DrawingAreaImpl):
1218         Return the shared memory to the cache.
1219
1220         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
1221         display now takes an extra boolean.
1222
1223         (WebKit::DrawingAreaImpl::didUpdate):
1224         Return the shared memory to the cache.
1225
1226         (WebKit::DrawingAreaImpl::display):
1227         If useSharedMemoryCache is true, get shared memory from the cache.
1228
1229         * WebProcess/WebPage/SharedMemoryCache.cpp: Added.
1230         (WebKit::SharedMemoryCache::acquireSharedMemory):
1231         If the memory we currently hold on to is big enough, return it.
1232
1233         (WebKit::SharedMemoryCache::releaseSharedMemory):
1234         If we're already holding on to shared memory, evict it if the returned
1235         shared memory object is bigger than the one we currently hold.
1236
1237         (WebKit::SharedMemoryCache::clearCacheTimerFired):
1238         Null out the shared memory object.
1239
1240 2011-03-11  Jessie Berlin  <jberlin@apple.com>
1241
1242         Reviewed by Adam Roben.
1243
1244         Crash calling WebContext::clearResourceCaches(InMemoryResourceCachesOnly) before the Web
1245         Process has finished launching.
1246         https://bugs.webkit.org/show_bug.cgi?id=56208
1247
1248         Only send the message if the Web Process is valid.
1249
1250         * UIProcess/WebContext.cpp:
1251         (WebKit::WebContext::clearResourceCaches):
1252
1253 2011-03-11  Anders Carlsson  <andersca@apple.com>
1254
1255         Reviewed by Dan Bernstein.
1256
1257         Don't paint more than 60 times per second
1258         https://bugs.webkit.org/show_bug.cgi?id=56206
1259         <rdar://problem/9085989>
1260
1261         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1262         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1263         Initialize m_lastDisplayTime to 0. Change the display timer to call displayTimerFired.
1264
1265         (WebKit::DrawingAreaImpl::didUpdate):
1266         Call displayTimerFired instead of display.
1267
1268         (WebKit::DrawingAreaImpl::displayTimerFired):
1269         If we're asked to paint again less than 1/60th of a second after we've already painted,
1270         defer painting.
1271
1272         (WebKit::DrawingAreaImpl::display):
1273         Update m_lastDisplayTime.
1274
1275 2011-03-11  Mark Rowe  <mrowe@apple.com>
1276
1277         Reviewed by Alice Liu.
1278
1279         <rdar://problem/9120161> WKPageRestoreFromSessionState does not set the pending API request URL.
1280
1281         * UIProcess/cf/WebPageProxyCF.cpp:
1282         (WebKit::WebPageProxy::restoreFromSessionStateData): If we're navigating to a back/forward item
1283         as part of the restoration, call setPendingAPIRequestURL. When there's a provisional URL this will
1284         be done by our call to loadURL elsewhere in the function.
1285
1286 2011-03-10  Alexey Proskuryakov  <ap@apple.com>
1287
1288         Reviewed by Jon Honeycutt.
1289
1290         WebKit2 UI process crashes if web process crashes while computing page rects for printing
1291         https://bugs.webkit.org/show_bug.cgi?id=56160
1292         <rdar://problem/9027410>
1293
1294         * UIProcess/API/mac/WKPrintingView.mm:
1295         (-[WKPrintingView _suspendAutodisplay]): Added a null check for page, matching one that
1296         we have when resuming autodisplay.
1297         (-[WKPrintingView _delayedResumeAutodisplayTimerFired]): Added a FIXME.
1298         (pageDidComputePageRects): Sanitize results coming from the web process (and avoid crashing
1299         when there is a communication error, so results are all null).
1300         (-[WKPrintingView knowsPageRange:]): If there is no page any more, we can't tell how many
1301         pages it had.
1302         (-[WKPrintingView rectForPage:]): Handle the case where we are neither calculating pages
1303         nor knowing them, as it happens when the web process crashes.        
1304
1305 2011-03-10  Mark Rowe  <mrowe@apple.com>
1306
1307         Rubber-stamped by Sam Weinig.
1308
1309         Part of <rdar://problem/8728860> WebKit2 needs to be made localizable
1310
1311         The presence of CFBundleDevelopmentRegion in the application's Info.plist prevents
1312         the default localization that we set during launch from being respected.
1313
1314         * PluginProcess/Info.plist: Remove CFBundleDevelopmentRegion.
1315         * WebProcess/Info.plist: Ditto.
1316
1317 2011-03-10  Martin Robinson  <mrobinson@igalia.com>
1318
1319         Build for WebKit2 GTK+ after r80714.
1320
1321         * GNUmakefile.am: Update source list.
1322         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 
1323         (WebKit::x11Display): Add missing semicolon.
1324
1325 2011-03-10  Chris Fleizach  <cfleizach@apple.com>
1326
1327         Reviewed by Darin Adler.
1328
1329         REGRESSION (WebKit2): VoiceOver focus no longer follows keyboard focus
1330         https://bugs.webkit.org/show_bug.cgi?id=55959
1331
1332         NSApplication has to return the focused element within the app in order
1333         for NSAccessibilityHandleFocusChanged() to work. The default implementation
1334         relies on keyWindow. Consequently, in WK2, the WebProcess must override that method
1335         to return the appropriate focused element within the WebProcess, since
1336         there is no keyWindow.
1337
1338         * WebKit2.xcodeproj/project.pbxproj:
1339         * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm:
1340         (-[AccessibilityWebPageObject accessibilityFocusedUIElement]):
1341         * WebProcess/WebProcess.cpp:
1342         (WebKit::WebProcess::focusedWebPage):
1343         * WebProcess/WebProcess.h:
1344         * WebProcess/mac/NSApplicationOverride.mm: Added.
1345         (-[NSApplication accessibilityFocusedUIElement]):
1346
1347 2011-03-10  Oleg Romashin  <romaxa@gmail.com>
1348
1349         Reviewed by Andreas Kling.
1350
1351         Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part3
1352         Solving conflict of Qt and Xlib includes
1353
1354         * Shared/Plugins/NPIdentifierData.cpp:
1355         * Shared/Plugins/NPIdentifierData.h:
1356         * Shared/Plugins/NPObjectProxy.cpp:
1357         * Shared/Plugins/NPVariantData.h:
1358
1359 2011-03-10  Sam Weinig  <sam@webkit.org>
1360
1361         Reviewed by Mark Rowe.
1362
1363         - Fix plugins in release and production builds.
1364
1365         * WebKit2.xcodeproj/project.pbxproj:
1366         Make sure to base the PluginProcess target on the correct xcconfig file
1367         in all configurations.
1368
1369 2011-03-09  Matthew Delaney  <mdelaney@apple.com>
1370
1371         Reviewed by Simon Fraser.
1372
1373         Plumb through settings for accelerated drawing for canvas
1374         https://bugs.webkit.org/show_bug.cgi?id=56039
1375
1376         * Shared/WebPreferencesStore.h:
1377         * UIProcess/API/C/WKPreferences.cpp:
1378         * UIProcess/API/C/WKPreferencesPrivate.h:
1379         * WebProcess/WebPage/WebPage.cpp:
1380
1381 2011-03-10  Jessie Berlin  <jberlin@apple.com>
1382
1383         Reviewed by Oliver Hunt and Brian Weinstein.
1384
1385         WebKit2: Need a way to clear only the in-memory resource caches
1386         https://bugs.webkit.org/show_bug.cgi?id=56022
1387
1388         Add a parameter to WKContextClearResourceCaches to specify whether to clear all the caches
1389         or just the memory caches.
1390
1391         * Shared/ResourceCachesToClear.h: Added.
1392         * UIProcess/API/C/WKAPICast.h:
1393         (WebKit::toResourceCachesToClear):
1394
1395         * UIProcess/API/C/WKContext.cpp:
1396         (WKContextClearResourceCaches):
1397         Add the new parameter.
1398         * UIProcess/API/C/WKContext.h:
1399         * UIProcess/WebContext.cpp:
1400         (WebKit::WebContext::clearResourceCaches):
1401         Ditto.
1402         * UIProcess/WebContext.h:
1403
1404         * WebProcess/WebProcess.cpp:
1405         (WebKit::WebProcess::clearResourceCaches):
1406         Pass the new parameter through to the platform-specific functions.
1407         * WebProcess/WebProcess.h:
1408         Add the new parameter and give it a default of AllResourceCaches.
1409         * WebProcess/WebProcess.messages.in:
1410         Ditto.
1411         * WebProcess/gtk/WebProcessGtk.cpp:
1412         (WebKit::WebProcess::platformClearResourceCaches):
1413         Ditto.
1414         * WebProcess/qt/WebProcessQt.cpp:
1415         (WebKit::WebProcess::platformClearResourceCaches):
1416         Ditto.
1417         * WebProcess/win/WebProcessWin.cpp:
1418         (WebKit::WebProcess::platformClearResourceCaches):
1419         When told to clear only the in-memory caches, return early so as not to clear the CFNetwork
1420         disk cache.
1421         * WebProcess/mac/WebProcessMac.mm:
1422         (WebKit::WebProcess::platformClearResourceCaches):
1423         Ditto.
1424
1425         * WebKit2.xcodeproj/project.pbxproj:
1426         Add ResourceCachesToClear.h
1427         * win/WebKit2.vcproj:
1428         Ditto.
1429
1430 2011-03-10  Jeff Miller  <jeffm@apple.com>
1431
1432         Reviewed by Adam Roben.
1433
1434         WKViewRegisterEditCommandCallback should use WKViewUndoType
1435         https://bugs.webkit.org/show_bug.cgi?id=56120
1436
1437         * UIProcess/API/C/win/WKView.h: Change undoOrRedo parameter in WKViewRegisterEditCommandCallback to be WKViewUndoType.
1438
1439 2011-03-10  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
1440
1441         Reviewed by Kenneth Rohde Christiansen.
1442
1443         Tiled backing store's delegated scroll request uses incorrect convention
1444         https://bugs.webkit.org/show_bug.cgi?id=56011
1445
1446         Adapt all of the internal API to match the delta to point
1447         conversion at the WebCore side.
1448
1449         * UIProcess/API/qt/qwkpage.cpp:
1450         (QWKPagePrivate::pageDidRequestScroll):
1451         * UIProcess/API/qt/qwkpage_p.h:
1452         * UIProcess/PageClient.h:
1453         * UIProcess/WebPageProxy.cpp:
1454         (WebKit::WebPageProxy::pageDidRequestScroll):
1455         * UIProcess/WebPageProxy.h:
1456         * UIProcess/WebPageProxy.messages.in:
1457         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1458         (WebKit::WebChromeClient::delegatedScrollRequested):
1459         * WebProcess/WebCoreSupport/WebChromeClient.h:
1460         * WebProcess/WebPage/WebPage.cpp:
1461         (WebKit::WebPage::pageDidRequestScroll):
1462         * WebProcess/WebPage/WebPage.h:
1463
1464 2011-03-10  Balazs Kelemen  <kbalazs@webkit.org>
1465
1466         Reviewed by Andreas Kling.
1467
1468         [WK2] Make non-transparent windowless plugins paint on X11
1469         https://bugs.webkit.org/show_bug.cgi?id=55660
1470
1471         Implement painting for non-transparent windowless X11 plugins.
1472         The essence of the logic has been adapted from WebCore.
1473         The implementation is stubbed for GTK and working only on Qt
1474         but it should be really easy to finish it for GTK.
1475
1476         * WebKit2.pro:
1477         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
1478         (WebKit::NPN_GetValue): Handle X11 specific values that are necessary.
1479         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1480         (WebKit::NetscapePlugin::NetscapePlugin): Initialize the X11 specific
1481         members that has been added.
1482         (WebKit::NetscapePlugin::callSetWindow): Always set the x and y coordinates
1483         of the NP_Window to 0 on X11 since we are using a backings store as the
1484         painting area for the plugin.
1485         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1486         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp: Removed in favour
1487         of a common implementation for X11.
1488         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp: Ditto.
1489         * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Added.
1490         (WebKit::getPluginDisplay):
1491
1492         Platform specific static getters.
1493         (WebKit::x11Display):
1494         (WebKit::displayDepth):
1495         (WebKit::rootWindowID):
1496         (WebKit::x11Screen):
1497
1498         (WebKit::NetscapePlugin::platformPostInitialize): Set up the visual
1499         settings and the colormap for the plugin.
1500         (WebKit::NetscapePlugin::platformDestroy):
1501         (WebKit::NetscapePlugin::platformInvalidate): Remained stub.
1502         (WebKit::NetscapePlugin::platformGeometryDidChange): Create a new
1503         pixmap that fits the geometry.
1504         (WebKit::NetscapePlugin::platformPaint): Propagate a paint event
1505         to the plugin, sync with it if necessary and draw the pixmap to
1506         the screen.
1507         (WebKit::toNP): Remained stub.
1508         (WebKit::NetscapePlugin::platformHandleMouseEvent): Remained stub.
1509         (WebKit::NetscapePlugin::platformHandleWheelEvent): Remained stub.
1510         (WebKit::NetscapePlugin::platformSetFocus): Remained stub.
1511         (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): Remained stub.
1512         (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): Remained stub.
1513         (WebKit::NetscapePlugin::platformHandleKeyboardEvent): Remained stub.
1514         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1515         (WebKit::WebFrameLoaderClient::createPlugin): Hack. Inject wmode=opaque
1516         key-value pair to the plugin parameters to force Flash to act in
1517         non-transparent windowless mode. Qt also doing this in WebCore.
1518
1519 2011-03-09  Peter Kasting  <pkasting@google.com>
1520
1521         Reviewed by Mihai Parparita.
1522
1523         Unify Windows version checks.
1524         https://bugs.webkit.org/show_bug.cgi?id=55979
1525
1526         * UIProcess/win/WebPageProxyWin.cpp:
1527         (WebKit::WebPageProxy::standardUserAgent):
1528
1529 2011-03-09  Adele Peterson  <adele@apple.com>
1530
1531         Reviewed by Anders Carlsson.
1532
1533         Fix for https://bugs.webkit.org/show_bug.cgi?id=56068
1534         <rdar://problem/9058245> WebKit2: Can't uncheck 'Spelling and Grammar' contextual items
1535
1536         * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::contextMenuItemSelected):
1537         Add cases for ContextMenuItemTagCorrectSpellingAutomatically, ContextMenuItemTagCheckSpellingWhileTyping, 
1538         and ContextMenuItemTagCheckGrammarWithSpelling
1539
1540 2011-03-09  Alexey Proskuryakov  <ap@apple.com>
1541
1542         Reviewed by Dan Bernstein.
1543
1544         Frequent crashes when printing in WebPageProxy::setAutodisplay
1545         https://bugs.webkit.org/show_bug.cgi?id=56057
1546         <rdar://problem/9053290>
1547
1548         * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _delayedResumeAutodisplayTimerFired]):
1549         Null check the page, there is no reason for it to still exist.
1550
1551 2011-03-09  Brent Fulgham  <bfulgham@webkit.org>
1552
1553         Unreviewed build correction.
1554
1555         * UIProcess/DrawingAreaProxy.messages.in: Exclude the other
1556           method using LayerTreeContext for non-accelerated composition case.
1557
1558 2011-03-09  Sam Weinig  <sam@webkit.org>
1559
1560         Reviewed by Anders Carlsson.
1561
1562         Change plugins to use their own executable on Mac OS X
1563         https://bugs.webkit.org/show_bug.cgi?id=55991
1564
1565         * Configurations/PluginProcess.xcconfig: Copied from Source/WebKit2/Configurations/WebProcess.xcconfig.
1566         * PluginProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist.
1567         Add files necessary for adding PluginProcess.app.
1568
1569         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1570         (WebKit::ProcessLauncher::launchProcess):
1571         Launch the PluginProcess.app when launching a plugin process.
1572
1573         * WebKit2.xcodeproj/project.pbxproj:
1574         Add new executable and new files, removes some unneeded copying
1575         and duplicate compiling of files.
1576
1577         * WebProcess/Info.plist:
1578         Sorted.
1579
1580 2011-03-09  Jessie Berlin  <jberlin@apple.com>
1581
1582         Reviewed by Adam Roben.
1583
1584         Use the Cookie Storage from the Private Browsing Storage Session directly
1585         https://bugs.webkit.org/show_bug.cgi?id=55986
1586
1587         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
1588         (InitWebCoreSystemInterface):
1589
1590 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
1591
1592         Fix compilation after r80596, add soup Download stubs.
1593
1594         * GNUmakefile.am:
1595         * WebProcess/Downloads/soup/DownloadSoup.cpp: Added.
1596         (WebKit::Download::start):
1597         (WebKit::Download::startWithHandle):
1598         (WebKit::Download::cancel):
1599         (WebKit::Download::platformInvalidate):
1600         (WebKit::Download::didDecideDestination):
1601         (WebKit::Download::platformDidFinish):
1602
1603 2011-03-09  Alejandro G. Castro  <alex@igalia.com>
1604
1605         Fix GTK+ compilation after r80619. Add WebFullScreenManager.
1606
1607         * GNUmakefile.am:
1608
1609 2011-03-08  Jer Noble  <jer.noble@apple.com>
1610
1611         Reviewed by Sam Weinig.
1612
1613         WebKit2: Plumb through the FULLSCREEN_API Chrome client calls
1614         https://bugs.webkit.org/show_bug.cgi?id=55273
1615
1616         The FULLSCREEN_API Chrome client calls need to be plumbed through from the 
1617         WebProcess to the UIProcess.  To do this, WebFullScreenManager (and Proxy)
1618         classes have been added to WebPage.
1619
1620         * DerivedSources.make: Added rules necessary to build DerivedSources for new .in files.
1621         * DerivedSources.pro: Ditto.
1622         * Platform/CoreIPC/MessageID.h: Added message types for WebFullScreenManager.
1623         * Shared/API/c/WKBase.h: Added WKFullScreenManagerRef.
1624         * Shared/APIObject.h: Added APIType for WebFullScreenManager.
1625         * UIProcess/WebFullScreenManagerProxy.cpp: Added.
1626         * UIProcess/WebFullScreenManagerProxy.h: Added.
1627         * UIProcess/WebFullScreenManagerProxy.messages.in: Added.
1628         * UIProcess/WebPageProxy.cpp:
1629         (WebKit::WebPageProxy::close): Invalidate and clear m_fullScreenManager.
1630         (WebKit::WebPageProxy::processDidCrash): Ditto.
1631         (WebKit::WebPageProxy::didReceiveMessage): Pass messages on to WebFullScreenManagerProxy.
1632         (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto.
1633         (WebKit::WebPageProxy::fullScreenManager): Added. Lazy instantiation of m_fullScreenManager.
1634         * UIProcess/WebPageProxy.h:
1635         * UIProcess/WebPageProxy.messages.in:
1636         * UIProcess/WebUIClient.cpp:
1637         * UIProcess/WebUIClient.h:
1638         * WebKit2.xcodeproj/project.pbxproj: Added references to new classes in project file.
1639         * WebKit2.pro: Ditto.
1640         * win/WebKit2.vcproj: Ditto.
1641         * WebKit2.pri: Added new directories to include file path.
1642         * win/WebKit2Common.vsprops: Ditto.
1643         * WebProcess/FullScreen/WebFullScreenManager.cpp: Added.
1644         * WebProcess/FullScreen/WebFullScreenManager.h: Added.
1645         * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added.
1646         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1647         (WebKit::WebChromeClient::supportsFullScreenForElement): Pass through to WebFullScreenManager.
1648         (WebKit::WebChromeClient::enterFullScreenForElement): Ditto.
1649         (WebKit::WebChromeClient::exitFullScreenForElement): Ditto.
1650         * WebProcess/WebPage/WebPage.cpp:
1651         (WebKit::WebPage::close): Invalidate and clear m_fullScreenManager.
1652         (WebKit::WebPage::fullScreenManager): Lazy instantiation of m_fullScreenManager.
1653         (WebKit::WebPage::didReceiveMessage): Pass messages through to WebFullScreenManager.
1654         * WebProcess/WebPage/WebPage.h:
1655
1656 2011-03-08  Jer Noble  <jer.noble@apple.com>
1657
1658         Reviewed by Sam Weinig.
1659
1660         WebKit2: Plumb through the "supportsFullScreen" preference.
1661         https://bugs.webkit.org/show_bug.cgi?id=55261
1662
1663         The "supportsFullScreen" preference needs to be plumbed through from
1664         the UIProcess to the WebProcess.
1665
1666         * Shared/WebPreferencesStore.h: Add a new macro entry.
1667         * UIProcess/API/C/WKPreferences.cpp: Implement preferences getter and setter.
1668         (WKPreferencesSetFullScreenEnabled):
1669         (WKPreferencesGetFullScreenEnabled):
1670         * UIProcess/API/C/WKPreferences.h:
1671         * WebProcess/WebPage/WebPage.cpp:
1672         (WebKit::WebPage::updatePreferences): Sync the fullScreenEnabled setting through to
1673             the settings object.
1674
1675 2011-03-08  Jeff Miller  <jeffm@apple.com>
1676
1677         Reviewed by Adele Peterson.
1678
1679         WebKit2: Implement Windows glue for Undo/Redo
1680         https://bugs.webkit.org/show_bug.cgi?id=55961
1681         
1682         Expose Undo/Redo infrastructure through WKView on Windows by
1683         adding an undo client as well as APIs to reapply and unapply
1684         an edit command.
1685
1686         * UIProcess/API/C/win/WKView.cpp:
1687         (WKViewSetViewUndoClient): Added.
1688         (WKViewReapplyEditCommand): Added.
1689         (WKViewUnapplyEditCommand): Added.
1690         * UIProcess/API/C/win/WKView.h: Added WKViewUndoClient, WKViewSetViewUndoClient(), and WKViewUnapplyEditCommand().
1691         * UIProcess/WebPageProxy.cpp:
1692         (WebKit::WebPageProxy::isValidEditCommand): Added, used to validated an edit command from a WKView API.
1693         * UIProcess/WebPageProxy.h: Added isValidEditCommand().
1694         * UIProcess/win/WebUndoClient.cpp: Added, APIClient for WKViewUndoClient. 
1695         (WebKit::WebUndoClient::registerEditCommand): Added.
1696         (WebKit::WebUndoClient::clearAllEditCommands): Added.
1697         * UIProcess/win/WebUndoClient.h: Added, APIClient for WKViewUndoClient.
1698         * UIProcess/win/WebView.cpp:
1699         (WebKit::WebView::initializeUndoClient): Added.
1700         (WebKit::WebView::close): Clear out undo client.
1701         (WebKit::WebView::registerEditCommand): Implemented to call through to WKViewUndoClient.
1702         (WebKit::WebView::clearAllEditCommands): Implmented to call through to WKViewUndoClient.
1703         (WebKit::WebView::reapplyEditCommand): Added.
1704         (WebKit::WebView::unapplyEditCommand): Added.
1705         * UIProcess/win/WebView.h: Added undo client support.
1706         * win/WebKit2.vcproj: Added WebUndoClient.cpp and WebUndoClient.h.
1707
1708 2011-03-08  Jeff Miller  <jeffm@apple.com>
1709
1710         Reviewed by Sam Weinig.
1711
1712         WebKit2: Expose WebEditCommandProxy in the C API on Windows
1713         https://bugs.webkit.org/show_bug.cgi?id=55962
1714         
1715         Make WebEditCommandProxy a subclass of APIObject, and define
1716         WKEditCommandRef as the type that will be exposed through the C API.
1717
1718         * Shared/API/c/win/WKBaseWin.h: Add WKEditCommandRef.
1719         * Shared/APIObject.h: Add platform-specific TypeEditCommandProxy.
1720         * UIProcess/API/C/win/WKAPICastWin.h: Add API mapping for WKEditCommandRef.
1721         * UIProcess/WebEditCommandProxy.h: Subclass WebEditCommandProxy from APIObject.
1722         (WebKit::WebEditCommandProxy::type): Added.
1723
1724 2011-03-08  Jeff Miller  <jeffm@apple.com>
1725
1726         Reviewed by Oliver Hunt.
1727
1728         WebKit2: Redo is broken
1729         https://bugs.webkit.org/show_bug.cgi?id=55978
1730         
1731         WebEditCommandProxy::unapply() and WebEditCommandProxy::reapply() were registering the wrong edit command when an undo or redo happens.
1732         For example, when we unapply(), we should register a Redo command, not an Undo command.
1733
1734         * UIProcess/WebEditCommandProxy.cpp:
1735         (WebKit::WebEditCommandProxy::unapply): Register a Redo command, not an Undo command.
1736         (WebKit::WebEditCommandProxy::reapply): Register an Undo command, not a Redo command.
1737
1738 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
1739
1740         Reviewed by Adam Roben.
1741
1742         https://bugs.webkit.org/show_bug.cgi?id=55977
1743         Refine CF/CFNet distinctions for better code sharing.
1744         1. Rename Downloads/cf/win/DownloadCFNetWin.cpp to DownloadCFWin.cpp
1745            since it does not use any CFNETWORK features.
1746         2. Create new cfnet directory.
1747         3. Move Downloads/cf/DownloadCFNet.cpp to Downloads/cfnet
1748         4. Update project file.
1749
1750         * WebProcess/Downloads/cf/DownloadCFNet.cpp: Removed.
1751         * WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp: Removed.
1752         * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Copied from WebProcess/Downloads/cf/win/DownloadCFNetWin.cpp.
1753         * WebProcess/Downloads/cfnet: Added.
1754         * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: Copied from WebProcess/Downloads/cf/DownloadCFNet.cpp.
1755         * win/WebKit2.vcproj:
1756
1757 2011-03-08  Mark Rowe  <mrowe@apple.com>
1758
1759         Reviewed by Brady Eidson.
1760
1761         <http://webkit.org/b/55976> Provisional URL should be loaded when restoring session state even if there are back / forward list entries.
1762
1763         * UIProcess/cf/WebPageProxyCF.cpp:
1764         (WebKit::WebPageProxy::restoreFromSessionStateData): If there's a provisional URL that we will load then restore the session state
1765         without navigating to the current item.
1766         * WebProcess/WebPage/WebPage.messages.in: Expose the ability to restore the session state without navigating to the current item.
1767
1768 2011-03-08  Brent Fulgham  <bfulgham@webkit.org>
1769
1770         Reviewed by Anders Carlsson.
1771
1772         https://bugs.webkit.org/show_bug.cgi?id=55956
1773         WebKit2 Changes to correct WinCairo port build
1774
1775         * Shared/LayerTreeContext.h: Don't exclude CoreIPC declarations for non-accelerated
1776           compositing case.
1777         * UIProcess/DrawingAreaProxy.h: Add "stdint.h" include needed for Cairo build.
1778         * UIProcess/DrawingAreaProxyImpl.cpp: Exclude accelerated compositing code for
1779           WinCairo build.
1780         (WebKit::DrawingAreaProxyImpl::~DrawingAreaProxyImpl):
1781         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
1782         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
1783         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
1784         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
1785         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
1786         * UIProcess/DrawingAreaProxyImpl.h: Exclude declarations for code only used when
1787           accelerated compositing is enabled.
1788         (WebKit::DrawingAreaProxyImpl::isInAcceleratedCompositingMode):
1789         * UIProcess/win/WebView.cpp: Protect CG-specific drawing code.
1790         (WebKit::WebView::setFindIndicator):
1791         * WebProcess/Downloads/Download.h: Allow CFLite implentation to share overwrite flag,
1792           as well as destination and bundle paths.
1793         * WebProcess/Downloads/curl/DownloadCurl.cpp: Remove stub (to share CFNet implementation
1794           of file handling.  This will be moved to a common area in a future patch.)
1795         * WebProcess/WebPage/DrawingAreaImpl.cpp: Exclude accelerated-compositing paths.
1796         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
1797         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
1798         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1799         * WebProcess/WebPage/WebPage.cpp: Protect CG-specific drawing code.
1800         (WebKit::WebPage::drawRectToPDF):
1801         (WebKit::WebPage::drawPagesToPDF):
1802         * win/WebKit2.vcproj: Exclude unused LayerTreeContext from WinCairo
1803
1804 2011-03-08  Ivan Krstić  <ike@apple.com>
1805
1806         Reviewed by Sam Weinig.
1807
1808         Re-fix: can't paste from 3rd party text editor into WebKit2 window
1809         <rdar://problem/8978624>
1810
1811         * WebProcess/com.apple.WebProcess.sb:
1812
1813 2011-03-08  Martin Robinson  <mrobinson@igalia.com>
1814
1815         Fix the WebKit2 compilation after r80578.
1816
1817         * UIProcess/gtk/WebView.cpp:
1818         (WebKit::WebView::setFocus): Added.
1819         * UIProcess/gtk/WebView.h:
1820
1821 2011-03-08  Jessie Berlin  <jberlin@apple.com>
1822
1823         Reviewed by Anders Carlsson.
1824
1825         Crash in CFNetwork visiting google.com
1826         https://bugs.webkit.org/show_bug.cgi?id=55958
1827
1828         * Shared/API/c/cf/WKURLResponseCF.cpp:
1829         (WKURLResponseCopyCFURLResponse):
1830         If the response to copy is null, return 0;
1831
1832 2011-03-08  John Sullivan  <sullivan@apple.com>
1833
1834         Reverted the patch for https://bugs.webkit.org/show_bug.cgi?id=55940
1835         
1836         The patch was insufficient, and it wasn't useful for the intended client use either.
1837
1838         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1839         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1840         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1841
1842 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
1843
1844         Unreviewed, fixed GTK+ compilation after r80569.
1845
1846         * UIProcess/gtk/WebView.cpp:
1847         (WebKit::WebView::windowToScreen):
1848         * UIProcess/gtk/WebView.h:
1849
1850 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
1851
1852         Reviewed by Sam Weinig.
1853
1854         WK2: Cannot set focus on an element when focus is outside of WKView
1855         https://bugs.webkit.org/show_bug.cgi?id=55281
1856
1857         * UIProcess/API/mac/PageClientImpl.h:
1858         * UIProcess/API/mac/PageClientImpl.mm:
1859         (WebKit::PageClientImpl::setFocus):
1860         * UIProcess/API/qt/qwkpage_p.h:
1861         (QWKPagePrivate::setFocus):
1862         * UIProcess/PageClient.h:
1863         * UIProcess/WebPageProxy.cpp:
1864         (WebKit::WebPageProxy::setFocus):
1865         * UIProcess/WebPageProxy.h:
1866         * UIProcess/WebPageProxy.messages.in:
1867         * UIProcess/win/WebView.h:
1868         (WebKit::WebView::setFocus):
1869         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1870         (WebKit::WebChromeClient::focus):
1871         (WebKit::WebChromeClient::unfocus):
1872
1873 2011-03-08  Jeff Miller  <jeffm@apple.com>
1874
1875         Unreviewed, fix last change so WKBaseWin.h is in alphabetical order in the project XML.
1876
1877         * win/WebKit2.vcproj: Move WKBaseWin.h to be in alphabetical order.
1878
1879 2011-03-08  Jeff Miller  <jeffm@apple.com>
1880
1881         Reviewed by Darin Adler.
1882
1883         Remove Source/WebKit2/UIProcess/API/C/win/WKBaseWin.h
1884         https://bugs.webkit.org/show_bug.cgi?id=55952
1885
1886         * UIProcess/API/C/win/WKBaseWin.h: Removed.
1887         * win/WebKit2.vcproj: Refer to the Shared version of WKBaseWin.h instead of the one in UIProcess.
1888
1889 2011-03-08  Alejandro G. Castro  <alex@igalia.com>
1890
1891         Reviewed by Martin Robinson.
1892
1893         [GTK] Add new files to compilation after r77974
1894         https://bugs.webkit.org/show_bug.cgi?id=54076
1895
1896         The commit added new code to allow passing context to policy
1897         delegate methods, we also added dummy ResourceRequest and
1898         ResourceResponse decoders until we implement them.
1899
1900         * GNUmakefile.am:
1901         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
1902         (CoreIPC::decodeResourceRequest):
1903         (CoreIPC::decodeResourceResponse):
1904
1905 2011-03-08  Chris Fleizach  <cfleizach@apple.com>
1906
1907         Reviewed by Darin Adler.
1908
1909         AX: Webkit2 not sending UAZoomFocusChanged notifications
1910         https://bugs.webkit.org/show_bug.cgi?id=55916
1911
1912         Needed to implement the windowToScreen() method so that the right frame
1913         could be calculated to send for zoom focus changes.
1914
1915         * UIProcess/API/mac/PageClientImpl.h:
1916         * UIProcess/API/mac/PageClientImpl.mm:
1917         (WebKit::PageClientImpl::windowToScreen):
1918         * UIProcess/API/qt/qwkpage.cpp:
1919         (QWKPagePrivate::windowToScreen):
1920         * UIProcess/API/qt/qwkpage_p.h:
1921         * UIProcess/PageClient.h:
1922         * UIProcess/WebPageProxy.cpp:
1923         (WebKit::WebPageProxy::windowToScreen):
1924         * UIProcess/WebPageProxy.h:
1925         * UIProcess/WebPageProxy.messages.in:
1926         * UIProcess/win/WebView.cpp:
1927         (WebKit::WebView::windowToScreen):
1928         * UIProcess/win/WebView.h:
1929         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1930         (WebKit::WebChromeClient::windowToScreen):
1931         * WebProcess/WebPage/WebPage.cpp:
1932         (WebKit::WebPage::windowToScreen):
1933         * WebProcess/WebPage/WebPage.h:
1934
1935 2011-03-08  John Sullivan  <sullivan@apple.com>
1936
1937         Reviewed by Darin Adler.
1938
1939         https://bugs.webkit.org/show_bug.cgi?id=55940
1940         WebKit2 should support Ignore policy from injected bundle client
1941
1942         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1943         Added WKBundlePagePolicyActionIgnore.
1944         
1945         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1946         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1947         If the injected bundle client returns WKBundlePagePolicyActionIgnore, convert it
1948         to the loader's PolicyIgnore.
1949
1950 2011-03-08  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1951
1952         Reviewed by Kenneth Rohde Christiansen.
1953
1954         [Qt] [Symbian] [WK2] Fix building WebKit 2 API tests
1955         https://bugs.webkit.org/show_bug.cgi?id=55876
1956
1957         Make sure TESTS_SOURCE_DIR is set for Symbian the same way
1958         as it is for WK1.
1959
1960         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp:
1961         (tst_QGraphicsWKView::loadEmptyPage):
1962         * UIProcess/API/qt/tests/tests.pri:
1963
1964 2011-03-07  Damian Kaleta  <dkaleta@apple.com>
1965
1966         Reviewed by Anders Carlsson.
1967
1968         QuickTime plugin should opt in to a 32-bit non-executable heap
1969         https://bugs.webkit.org/show_bug.cgi?id=55704
1970         <rdar://problem/8105706>
1971
1972         * UIProcess/Plugins/PluginProcessProxy.cpp:
1973         (WebKit::pluginNeedsExecutableHeap): Decides per plugin if it should opt-in to a 32-bit non-executable heap.
1974         By default it should opt-out.
1975         (WebKit::PluginProcessProxy::PluginProcessProxy):
1976
1977 2011-03-07  Sam Weinig  <sam@webkit.org>
1978
1979         Reviewed by Anders Carlsson.
1980
1981         Add unableToImplementPolicy callback for WebKit2 policy client
1982         <rdar://problem/9071902>
1983         https://bugs.webkit.org/show_bug.cgi?id=55884
1984
1985         * UIProcess/API/C/WKPage.h:
1986         * UIProcess/WebPageProxy.cpp:
1987         (WebKit::WebPageProxy::unableToImplementPolicy):
1988         * UIProcess/WebPageProxy.h:
1989         * UIProcess/WebPageProxy.messages.in:
1990         * UIProcess/WebPolicyClient.cpp:
1991         (WebKit::WebPolicyClient::unableToImplementPolicy):
1992         * UIProcess/WebPolicyClient.h:
1993         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1994         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
1995         (WebKit::InjectedBundlePagePolicyClient::unableToImplementPolicy):
1996         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
1997         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1998         (WebKit::WebFrameLoaderClient::dispatchUnableToImplementPolicy):
1999         Pipe unableToImplementPolicy through both the bundle and the main WebKit2 API.
2000
2001 2011-03-07  Sam Weinig  <sam@webkit.org>
2002
2003         Reviewed by Anders Carlsson.
2004
2005         Replace WebKit2's decidePolicyForMIMEType with decidePolicyForResponse
2006         https://bugs.webkit.org/show_bug.cgi?id=55827
2007
2008         - Renamed FrameLoaderClient::dispatchDecidePolicyForMIMEType to dispatchDecidePolicyForResponse
2009           and pass the entire response, instead of just the MIMEType.
2010         - Updated both UIProcess API and bundle API to also be based on the whole response, not just the
2011           MIMEType.
2012
2013         * UIProcess/API/C/WKPage.h:
2014         * UIProcess/WebPageProxy.cpp:
2015         (WebKit::WebPageProxy::decidePolicyForResponse):
2016         * UIProcess/WebPageProxy.h:
2017         * UIProcess/WebPageProxy.messages.in:
2018         * UIProcess/WebPolicyClient.cpp:
2019         (WebKit::WebPolicyClient::decidePolicyForResponse):
2020         * UIProcess/WebPolicyClient.h:
2021         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2022         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
2023         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForResponse):
2024         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
2025         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2026         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2027         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2028
2029 2011-03-06  Jessie Berlin  <jberlin@apple.com>
2030
2031         Reviewed by Sam Weinig.
2032
2033         WebKit2: Use CFNetwork Sessions API.
2034         https://bugs.webkit.org/show_bug.cgi?id=55435.
2035
2036         When Private Browsing is enabled, use cookies from a in-memory cookie storage based on the
2037         Private Browsing Storage Session.
2038
2039         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2040         (InitWebCoreSystemInterface):
2041         Add support for using the new WKSI functions in WebCore.
2042
2043 2011-03-06  Oleg Romashin  <romaxa@gmail.com>
2044
2045         Reviewed by Kenneth Rohde Christiansen.
2046
2047         [Qt][WK2] Make Qt port compiling with ENABLE_PLUGIN_PROCESS=1, part1
2048         Adding dummy Qt files for Plugin Process implementation,
2049         Adding missing sources into Qt pro files
2050         https://bugs.webkit.org/show_bug.cgi?id=55719
2051
2052         * DerivedSources.pro:
2053         * PluginProcess/qt: Added.
2054         * PluginProcess/qt/PluginControllerProxyQt.cpp: Added.
2055         (WebKit::PluginControllerProxy::platformInitialize):
2056         (WebKit::PluginControllerProxy::platformDestroy):
2057         (WebKit::PluginControllerProxy::platformGeometryDidChange):
2058         * PluginProcess/qt/PluginProcessMainQt.cpp: Added.
2059         (WebKit::PluginProcessMain):
2060         * PluginProcess/qt/PluginProcessQt.cpp: Added.
2061         (WebKit::PluginProcess::platformInitialize):
2062         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: Added.
2063         (WebKit::PluginProcessProxy::platformInitializePluginProcess):
2064         * WebKit2.pri:
2065         * WebKit2.pro:
2066         * WebKit2API.pri:
2067         * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: Added.
2068         (WebKit::PluginProxy::needsBackingStore):
2069
2070 2011-03-05  Sam Weinig  <sam@webkit.org>
2071
2072         Reviewed by Dan Bernstein.
2073
2074         Remove unneeded onPageClose function from DrawingArea
2075         https://bugs.webkit.org/show_bug.cgi?id=55836
2076
2077         * WebProcess/WebPage/DrawingArea.h:
2078         Remove empty function.
2079
2080         * WebProcess/WebPage/WebPage.cpp:
2081         (WebKit::WebPage::close):
2082         Remove only called
2083
2084 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2085
2086         WK2 Mac build fix.
2087
2088         * UIProcess/API/C/WKPage.cpp:
2089         (WKPageComputePagesForPrinting):
2090         (WKPageBeginPrinting):
2091
2092         * UIProcess/API/C/WKPagePrivate.h:
2093
2094 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2095
2096         WK2 Mac build fix.
2097
2098         * UIProcess/API/C/WKPagePrivate.h:
2099
2100 2011-03-04  Jon Honeycutt  <jhoneycutt@apple.com>
2101
2102         WK2 needs printing support on Windows
2103         https://bugs.webkit.org/show_bug.cgi?id=55800
2104         <rdar://problem/8903808>
2105
2106         Reviewed by Darin Adler.
2107
2108         * UIProcess/API/C/WKPage.cpp:
2109         (ComputedPagesContext::ComputedPagesContext):
2110         (computedPagesCallback):
2111         From the Vector of WebCore::IntRects, build up a Vector of WKRects.
2112         Call the callback, passing these rects and the scale factor.
2113         (printInfoFromWKPrintInfo):
2114         Return a PrintInfo structure from the WKPrintInfo.
2115         (WKPageComputePagesForPrinting):
2116         Call WebPageProxy::computePagesForPrinting(). Pass
2117         computedPagesCallback as the callback function, so that we can
2118         translate the WebCore rect type to WKRect before calling the caller's
2119         callback function.
2120         (WKPageBeginPrinting):
2121         Call WebPageProxy::beginPrinting().
2122         (WKPageDrawPagesToPDF):
2123         Call WebPageProxy::drawPagesToPDF().
2124
2125         * UIProcess/API/C/WKPagePrivate.h:
2126         Declare the WKPrintInfo type and new functions.
2127
2128         * UIProcess/WebPageProxy.cpp:
2129         Compile this code on Windows.
2130
2131         * UIProcess/WebPageProxy.h:
2132         Ditto.
2133
2134         * UIProcess/win/WebView.cpp:
2135         (WebKit::WebView::paint):
2136         We're painting the window; leave printing mode.
2137
2138         * WebProcess/WebPage/WebPage.cpp:
2139         Compile this code on Windows.
2140
2141         * WebProcess/WebPage/WebPage.h:
2142         Ditto.
2143
2144         * WebProcess/WebPage/WebPage.messages.in:
2145         Ditto.
2146
2147 2011-03-04  Steve Falkenburg  <sfalken@apple.com>
2148
2149         Reviewed by Darin Adler.
2150
2151         Adopt VersionStamper tool for Windows WebKit DLLs
2152         https://bugs.webkit.org/show_bug.cgi?id=55784
2153         <rdar://problem/9021320>
2154
2155         We now use a tool to stamp the version number onto the Apple WebKit DLLs
2156         during the post-build step.
2157
2158         Fetch the WebKit version from a string resource instead of the version resource.
2159
2160         * UIProcess/win/WebPageProxyWin.cpp:
2161         (WebKit::userVisibleWebKitVersionString): Fetch version from a string resource.
2162         * win/WebKit2.rc: Removed version, added stringtable.
2163         * win/WebKit2WebProcess.rc: Removed.
2164         * win/WebKit2WebProcess.vcproj:
2165         * win/WebKit2WebProcessPostBuild.cmd: Don't run autoversion script. It isn't used in this project.
2166         * win/WebKit2WebProcessPreBuild.cmd: Stamp version.
2167         * win/WebKitPostBuild.cmd: Stamp version.
2168
2169 2011-03-04  Jeff Miller  <jeffm@apple.com>
2170
2171         Reviewed by Darin Adler.
2172
2173         Add WKPageValidateCommand()
2174         https://bugs.webkit.org/show_bug.cgi?id=55793
2175         
2176         On the Mac, validation of edit menu commands is handled within WebKit2 in WKView.mm.
2177         However, on Windows we need to do this in the client, so expose this functionality
2178         in the API via WKPageValidateCommand().
2179         
2180         Change the Mac implementation to call WebPageProxy::validateCommand() with a callback
2181         to match this new API, so it no longer has to go through PageClient to get notified
2182         when a command is validated.  This makes PageClient::setEditCommandState() obsolete,
2183         so I removed the stub implementations in qt and gtk as well.
2184
2185         * UIProcess/API/C/WKPage.cpp:
2186         (WKPageValidateCommand): Added.
2187         * UIProcess/API/C/WKPage.h: Added WKPageValidateCommand().
2188         * UIProcess/API/mac/PageClientImpl.h: Removed setEditCommandState().
2189         * UIProcess/API/mac/PageClientImpl.mm: Removed setEditCommandState().
2190         * UIProcess/API/mac/WKView.mm:
2191         (validateCommandCallback): Added.
2192         (-[WKView validateUserInterfaceItem:]): Pass callback to validateCommand().
2193         * UIProcess/API/qt/qwkpage.cpp: Removed setEditCommandState().
2194         * UIProcess/API/qt/qwkpage_p.h: Removed setEditCommandState().
2195         * UIProcess/PageClient.h: Removed setEditCommandState().
2196         * UIProcess/WebPageProxy.cpp: Removed didValidateCommand().
2197         (WebKit::WebPageProxy::validateCommand): This now takes a callback.
2198         (WebKit::WebPageProxy::validateCommandCallback): Added.
2199         (WebKit::WebPageProxy::processDidCrash): Invalidate m_validateCommandCallbacks.
2200         * UIProcess/WebPageProxy.h: Removed didValidateCommand(), validateCommand() now takes a callback.
2201         (WebKit::ValidateCommandCallback::create): Added.
2202         (WebKit::ValidateCommandCallback::~ValidateCommandCallback): Added.
2203         (WebKit::ValidateCommandCallback::performCallbackWithReturnValue): Added.
2204         (WebKit::ValidateCommandCallback::invalidate): Added.
2205         (WebKit::ValidateCommandCallback::ValidateCommandCallback): Added.
2206         * UIProcess/WebPageProxy.messages.in: Removed DidValidateCommand, added ValidateCommandCallback.
2207         * UIProcess/gtk/WebView.cpp: Removed setEditCommandState().
2208         * UIProcess/gtk/WebView.h: Removed setEditCommandState().
2209         * UIProcess/win/WebView.cpp: Removed setEditCommandState().
2210         * UIProcess/win/WebView.h: Removed setEditCommandState().
2211         * WebProcess/WebPage/WebPage.cpp:
2212         (WebKit::WebPage::validateCommand): This now takes a callbackID.
2213         * WebProcess/WebPage/WebPage.h: validateCommand now takes a callbackID.
2214         * WebProcess/WebPage/WebPage.messages.in: ValidateCommand now takes a callbackID.
2215
2216 2011-03-04  Brian Weinstein  <bweinstein@apple.com>
2217
2218         Reviewed by Darin Adler.
2219
2220         Reference-counting for WKBundlePageResourceLoadClient::willSendRequestForFrame seems unclear/wrong
2221         https://bugs.webkit.org/show_bug.cgi?id=53919
2222         <rdar://problem/8966020>
2223         
2224         Adopt the result of m_client.willSendRequestForFrame (which will be leaked by the client).
2225
2226         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
2227         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
2228
2229 2011-03-04  Darin Adler  <darin@apple.com>
2230
2231         Reviewed by Mark Rowe.
2232
2233         WebKit2 session state should include even loads too new to be in the back/forward list
2234         https://bugs.webkit.org/show_bug.cgi?id=55781
2235         part of <rdar://problem/8968847>
2236
2237         * UIProcess/cf/WebPageProxyCF.cpp:
2238         (WebKit::WebPageProxy::sessionStateData): Save URLs that are early enough in the loading
2239         process to not be included in the back/forward list yet: The pending API request URL and
2240         the provisional URL.
2241         (WebKit::WebPageProxy::restoreFromSessionStateData): Call loadURL if the back/forward
2242         list is not restored and a URL is present. Later we can improve the way we handle the
2243         case where we have both a back/forward list and a URL.
2244
2245 2011-03-04  Jessie Berlin  <jberlin@apple.com>
2246
2247         Reviewed by Darin Adler.
2248
2249         WebKit2: Use CFNetwork Sessions API.
2250         https://bugs.webkit.org/show_bug.cgi?id=55435.
2251
2252         Add in the CFURLSTORAGESESSIONS guards that I incorrectly left out because the code was
2253         contained within guards that made USE(CFURLSTORAGESESSIONS) always be true.
2254
2255         * UIProcess/mac/WebContextMac.mm:
2256         (WebKit::WebContext::platformInitializeWebProcess):
2257         * UIProcess/win/WebContextWin.cpp:
2258         (WebKit::WebContext::platformInitializeWebProcess):
2259
2260 2011-03-04  Jessie Berlin  <jberlin@apple.com>
2261
2262         Reviewed by Maciej Stachowiak.
2263
2264         WebKit2: Use CFNetwork Sessions API.
2265         https://bugs.webkit.org/show_bug.cgi?id=55435.
2266
2267         When Private Browsing is enabled, get the cached url response from the cache associated with
2268         the Private Browsing Storage Session.
2269
2270         * WebProcess/WebPage/mac/WebPageMac.mm:
2271         (WebKit::WebPage::platformHasLocalDataForURL):
2272         If Private Browsing is enabled, call into WKSI to get the response.
2273         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2274         Ditto.
2275         * WebProcess/WebPage/win/WebPageWin.cpp:
2276         (WebKit::WebPage::platformHasLocalDataForURL):
2277         If Private Browsing is enabled, call into WKSI to get the CFURLCacheRef.
2278         (WebKit::WebPage::cachedResponseMIMETypeForURL):
2279         Ditto.
2280
2281 2011-03-04  Jeff Miller  <jeffm@apple.com>
2282
2283         Reviewed by Darin Adler.
2284
2285         Move WKViewExecuteCommand() to WKPageExecuteCommand()
2286         https://bugs.webkit.org/show_bug.cgi?id=55744
2287         
2288         Executing a command operates on a page, so it makes more sense for it to be in WKPage.
2289         This also makes it available on all platforms, not just Windows.
2290
2291         * UIProcess/API/C/WKPage.cpp:
2292         (WKPageExecuteCommand): Added.
2293         * UIProcess/API/C/WKPage.h: Add WKPageExecuteCommand().
2294         * UIProcess/API/C/win/WKView.cpp: Remove WKViewExecuteCommand().
2295         * UIProcess/API/C/win/WKView.h: Remove WKViewExecuteCommand().
2296
2297 2011-03-04  Dan Bernstein  <mitz@apple.com>
2298
2299         LLVM Compiler build fix.
2300
2301         * WebProcess/WebPage/WebPage.cpp:
2302         (WebKit::WebPage::runJavaScriptInMainFrame):
2303
2304 2011-03-03  Timothy Hatcher  <timothy@apple.com>
2305
2306         Make the WKPageRunJavaScriptFunction callback take a WKSerializedScriptValueRef.
2307
2308         https://webkit.org/b/55623
2309
2310         Reviewed by Darin Adler.
2311
2312         * UIProcess/API/C/WKPage.cpp:
2313         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
2314         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
2315         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
2316         * UIProcess/WebPageProxy.cpp:
2317         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
2318         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
2319         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
2320         from the DataReference before calling the callback.
2321         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
2322         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
2323         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
2324         * WebProcess/WebPage/WebPage.cpp:
2325         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
2326         And use ScriptValueCallback to send the message back.
2327
2328 2011-03-03  Brian Weinstein  <bweinstein@apple.com>
2329
2330         Reviewed by Adam Roben.
2331
2332         Cleanup from https://bugs.webkit.org/show_bug.cgi?id=55427.
2333         
2334         Call WebCore::startObservingCookieChanges and WebCore::stopObservingCookieChanges
2335         on all platforms, and stub the functions on platforms that don't implement them.
2336
2337         * WebProcess/Cookies/WebCookieManager.cpp:
2338         (WebKit::WebCookieManager::startObservingCookieChanges):
2339         (WebKit::WebCookieManager::stopObservingCookieChanges):
2340
2341 2011-03-03  Jeff Miller  <jeffm@apple.com>
2342
2343         Reviewed by Darin Adler.
2344
2345         Refactor classes in GenericCallback.h
2346         https://bugs.webkit.org/show_bug.cgi?id=55732
2347         
2348         Since we're going to need to add additional callback classes, make a CallbackBase class that manages
2349         the context and the callback ID.  The existing callback classes (VoidCallback, GenericCallback, and
2350         ComputedPagesCallback) now all derive from CallbackBase.
2351         
2352         Fix bug in VoidCallback where we meant to implement the destructor, but we were implementing the default
2353         constructor instead (we forgot the leading ~).
2354  
2355         * UIProcess/GenericCallback.h:
2356         (WebKit::CallbackBase::~CallbackBase):
2357         (WebKit::CallbackBase::callbackID):
2358         (WebKit::CallbackBase::CallbackBase):
2359         (WebKit::CallbackBase::context):
2360         (WebKit::CallbackBase::generateCallbackID):
2361         (WebKit::VoidCallback::~VoidCallback):
2362         (WebKit::VoidCallback::performCallback):
2363         (WebKit::VoidCallback::invalidate):
2364         (WebKit::VoidCallback::VoidCallback):
2365         (WebKit::GenericCallback::create):
2366         (WebKit::GenericCallback::~GenericCallback):
2367         (WebKit::GenericCallback::performCallbackWithReturnValue):
2368         (WebKit::GenericCallback::invalidate):
2369         (WebKit::GenericCallback::GenericCallback):
2370         (WebKit::ComputedPagesCallback::create):
2371         (WebKit::ComputedPagesCallback::~ComputedPagesCallback):
2372         (WebKit::ComputedPagesCallback::performCallbackWithReturnValue):
2373         (WebKit::ComputedPagesCallback::invalidate):
2374         (WebKit::ComputedPagesCallback::ComputedPagesCallback):
2375
2376 2011-03-03  Adam Roben  <aroben@apple.com>
2377
2378         Don't assume the web process has had a chance to paint before the view has to paint
2379
2380         Fixes <http://webkit.org/b/55739> REGRESSION (r80307): Lots of tests crashing in
2381         BackingStore::paint
2382
2383         Reviewed by Anders Carlsson.
2384
2385         * UIProcess/DrawingAreaProxyImpl.cpp:
2386         (WebKit::DrawingAreaProxyImpl::paint): Bail if the web process hasn't had a chance to paint
2387         yet.
2388
2389 2011-03-03  Adam Roben  <aroben@apple.com>
2390
2391         Throw away DrawingAreaProxyImpl's backing store after not painting for 5 seconds
2392
2393         The intent is to save memory for views that aren't painting.
2394
2395         Fixes <http://webkit.org/b/51262> <rdar://problem/8782537> WebPageProxy should delete its
2396         backing store after not painting for a while
2397
2398         Reviewed by Anders Carlsson.
2399
2400         * UIProcess/DrawingAreaProxyImpl.cpp:
2401         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize our timer.
2402         (WebKit::DrawingAreaProxyImpl::paint): Don't bail if we don't have a backing store (but do
2403         bail if we're in accelerated compositing mode); we might have thrown it away to save memory
2404         but now are being asked to paint by the view. The existing code in this function will handle
2405         getting a new backing store if possible by blocking for a little while to try to receive a
2406         DidUpdateBackingStoreState message. Added an assertion that we do have a backing store if we
2407         don't have any outstanding UpdateBackingStoreState requests. After painting, call
2408         discardBackingStoreSoon to update our timer.
2409         (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): Set the timer for 5 seconds in the
2410         future.
2411         (WebKit::DrawingAreaProxyImpl::discardBackingStore): Throw away the backing store, and tell
2412         the web process we'll need a full backing store update on the next paint.
2413
2414         * UIProcess/DrawingAreaProxyImpl.h: Added m_discardBackingStoreTimer.
2415
2416 2011-03-03  Adam Roben  <aroben@apple.com>
2417
2418         Add a way to tell the web process to perform a full backing store update on its next paint
2419
2420         Messages::DrawingArea::UpdateBackingStoreState now takes a boolean specifying whether the
2421         full backing store update should happen immediately or should be deferred until the next
2422         paint or compositing mode change occurs. The deferred update isn't used yet, but will be
2423         used when we start throwing away backing stores to save memory.
2424
2425         Fixes <http://webkit.org/b/55730> UI process needs a way to tell the web process its backing
2426         store needs a full update on the next paint
2427
2428         Reviewed by Anders Carlsson.
2429
2430         * UIProcess/DrawingAreaProxyImpl.cpp:
2431         (WebKit::DrawingAreaProxyImpl::paint): If we have an outstanding backing store state change
2432         request, tell the web process to perform the backing store update right away, in case we
2433         previously told it it could defer the update.
2434         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Specify that we need an immediate backing
2435         store update.
2436         (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): We can no longer assert that we
2437         were waiting for a DidUpdateBackingStoreState message when we receive one, as it's possible
2438         for the web process to decide to send us this message on its own (if we asked it to do a
2439         deferred backing store update and then it needed to paint some part of the page). Specify
2440         that we need an immediate backing store update if the web process hasn't updated to our
2441         latest state, as we're about to draw potentially out-of-date bits to the screen and want to
2442         get the right bits as soon as possible. Also added a FIXME about a potential optimization.
2443         (WebKit::DrawingAreaProxyImpl::backingStoreStateDidChange): Added a RespondImmediatelyOrNot
2444         parameter, which is just passed through to sendUpdateBackingStoreState.
2445         (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Added a RespondImmediatelyOrNot
2446         parameter that is used to specify to the web process whether to perform the full backing
2447         store update immediately. We now only wait for a DidUpdateBackingStoreState message (and
2448         thus suppress any more UpdateBackingStoreState messages until one is received) when we ask
2449         the web process for an immediate response; otherwise we could end up accidentally calling
2450         waitForAndDispatchDidUpdateBackingStoreState when the web process hasn't been told to send
2451         us such a message.
2452
2453         * UIProcess/DrawingAreaProxyImpl.h: Added RespondImmediatelyOrNot.
2454
2455         * WebProcess/WebPage/DrawingArea.h:
2456         (WebKit::DrawingArea::updateBackingStoreState): Added respondImmediately argument.
2457
2458         * WebProcess/WebPage/DrawingArea.messages.in: Added respondImmediately argument to
2459         UpdateBackingStoreState message.
2460
2461         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2462         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member that's used to track
2463         whether we should send a DidUpdateBackingStoreState message instead of an Update or
2464         compositing mode change message. This will be set to true when a deferred backing store
2465         update is pending.
2466         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): If a deferred update is pending, send a
2467         DidUpdateBackingStoreState message instead of a compositing mode change message.
2468         (WebKit::DrawingAreaImpl::updateBackingStoreState): Added respondImmediately argument. If
2469         we've already been told about this state ID (as can happen when the UI process decides it
2470         needs an immediate update to a state that it previously requested a deferred update to),
2471         don't bother updating the page's size, etc. In addition, if we've already sent a
2472         DidUpdateBackingStoreState message for this state, we don't have to do anything at all.
2473         Moved code to send the DidUpdateBackingStoreState message from here...
2474         (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): ...to here.
2475         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Always update our dirty region,
2476         even if painting is suspended or we're in the process of updating the backing store state.
2477         It causes no harm and simplifies the code. If a deferred update is pending, send a
2478         DidUpdateBackingStoreState message instead of a compositing mode change message. Also
2479         removed a redundant if.
2480         (WebKit::DrawingAreaImpl::display): Added an assertion that this isn't called while updating
2481         backing store state, as otherwise we might end up sending two DidUpdateBackingStoreState
2482         messages. If a deferred update is pending, send a DidUpdateBackingStoreState message instead
2483         of an Update message.
2484
2485         * WebProcess/WebPage/DrawingAreaImpl.h: Updated updateBackingStoreState to match the base
2486         class. Added sendDidUpdateBackingStoreState and m_shouldSendDidUpdateBackingStoreState.
2487
2488 2011-03-03  Andy Estes  <aestes@apple.com>
2489
2490         Reviewed by Darin Adler.
2491
2492         When displaying the missing plug-in sheet, pass the 'pluginspage'
2493         attribute to the UI process.
2494         https://bugs.webkit.org/show_bug.cgi?id=55553
2495
2496         * UIProcess/API/C/WKPage.h: Add pluginsPageURL as the third argument to
2497         missingPluginButtonClicked.
2498         * UIProcess/WebPageProxy.cpp:
2499         (WebKit::WebPageProxy::missingPluginButtonClicked): Ditto.
2500         * UIProcess/WebPageProxy.h: Ditto.
2501         * UIProcess/WebPageProxy.messages.in: Ditto.
2502         * UIProcess/WebUIClient.cpp:
2503         (WebKit::WebUIClient::missingPluginButtonClicked): Ditto.
2504         * UIProcess/WebUIClient.h: Ditto.
2505         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2506         (WebKit::WebChromeClient::missingPluginButtonClicked): Get the value of
2507         pluginspageAttr.
2508
2509 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
2510
2511         Suggested by Dan Bernstein.
2512
2513         Move "const" around "NSString *", so that it suddenly begins to make sense.
2514
2515         * WebProcess/mac/FullKeyboardAccessWatcher.mm:
2516
2517 2011-03-03  Jeff Miller  <jeffm@apple.com>
2518
2519         Reviewed by Anders Carlsson.
2520
2521         WebKit2: Add WKViewRef API for executing edit commands
2522         https://bugs.webkit.org/show_bug.cgi?id=49829
2523
2524         Added WKViewExecuteCommand() and documented some of the WebCore EditorCommand strings.
2525
2526         * UIProcess/API/C/win/WKView.cpp:
2527         (WKViewExecuteCommand): Added.
2528         * UIProcess/API/C/win/WKView.h: Added WKViewExecuteCommand() and comment block with WebCore EditorCommand strings.
2529
2530 2011-03-03  Jessie Berlin  <jberlin@apple.com>
2531
2532         Reviewed by Adam Roben.
2533
2534         WebKit2: Use CFNetwork Sessions API.
2535         https://bugs.webkit.org/show_bug.cgi?id=55435
2536
2537         Set the Private Browsing Storage Session on requests when Private Browsing is enabled.
2538
2539         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2540         (InitWebCoreSystemInterface):
2541         Support using WKCopyRequestWithStorageSession in WebCore.
2542
2543 2011-03-03  Adam Roben  <aroben@apple.com>
2544
2545         Don't try to paint outside the page's bounds
2546
2547         When the page is resized smaller, we would allocate a ShareableBitmap at the old, larger
2548         size, even though we only needed to paint at the new, smaller size.
2549
2550         The assertion added in this patch will fire during the WebKit2/ResizeViewWhileHidden API
2551         test if this fix gets broken in the future.
2552
2553         Fixes <http://webkit.org/b/55715> DrawingAreaImpl allocates more memory than necessary when
2554         the page is resized smaller
2555
2556         Reviewed by Anders Carlsson.
2557
2558         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2559         (WebKit::DrawingAreaImpl::updateBackingStoreState): Update our dirty region even if painting
2560         is suspended (but still refrain from updating it when in accelerated compositing mode).
2561         Rather than unite our existing dirty region with the page's new bounds, overwrite our dirty
2562         region with the page's new bounds. This prevents us from accumulating a dirty region that is
2563         larger than the page in the case where the page is being resized smaller.
2564         (WebKit::DrawingAreaImpl::display): Added an assertion that we're not trying to paint
2565         outside of the page's bounds.
2566
2567 2011-03-03  Maciej Stachowiak  <mjs@apple.com>
2568
2569         Reviewed by Brady Eidson.
2570
2571         WebProcess is calling CFURLCacheRemoveAllCachedResponses when loading, results in origin-load for all resources
2572         https://bugs.webkit.org/show_bug.cgi?id=55701
2573         <rdar://problem/9074017>
2574
2575         * Shared/WebProcessCreationParameters.cpp:
2576         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): Initialize cache-clearing
2577         flag parameters to false.
2578         (WebKit::WebProcessCreationParameters::encode): Serialize them properly.
2579         (WebKit::WebProcessCreationParameters::decode): And deserialize.
2580
2581 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
2582
2583         Reviewed by Darin Adler.
2584
2585         REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
2586         https://bugs.webkit.org/show_bug.cgi?id=55633
2587         <rdar://problem/8963023>
2588
2589         * WebKit2.xcodeproj/project.pbxproj:
2590         * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
2591         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
2592         (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
2593         (-[FullKeyboardAccessWatcher init]):
2594         (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
2595         Get the current state of full keyboard access, listening for change notifications.
2596
2597         * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
2598
2599         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
2600         WebKit1 also doesn't implement this on platforms other than Mac.
2601
2602         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
2603         Just ask FullKeyboardAccessWatcher.
2604
2605         * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
2606         * WebProcess/WebCoreSupport/WebChromeClient.h:
2607         Added keyboardUIMode(), removed tabsToLinks().
2608
2609         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
2610         * WebProcess/WebPage/WebPage.h:
2611         Generate keyboard UI mode from tabToLinks preference and current state of FKA.
2612
2613 2011-03-03  Sam Weinig  <sam@webkit.org>
2614
2615         Reviewed by Anders Carlsson.
2616
2617         Give the Bundle's policy client the option of deciding the policy
2618         https://bugs.webkit.org/show_bug.cgi?id=55699
2619
2620         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
2621         Add WKBundlePagePolicyAction enum and make it the return value of
2622         the WKBundlePagePolicyClient functions.
2623
2624         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
2625         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
2626         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
2627         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
2628         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
2629         Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
2630
2631         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2632         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
2633         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
2634         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2635         Call the policy function early if the bundle handles it.
2636
2637 2011-03-02  Brian Weinstein  <bweinstein@apple.com>
2638
2639         Reviewed by Adam Roben.
2640
2641         Rest of WebKit2: Need a way to send notifications to client when cookies change
2642         https://bugs.webkit.org/show_bug.cgi?id=55427
2643         <rdar://problem/9056027>
2644         
2645         This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
2646         listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
2647         when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
2648         change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
2649
2650         * UIProcess/API/C/WKCookieManager.cpp:
2651         (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
2652         (WKCookieManagerStartObservingCookieChanges): Ditto.
2653         (WKCookieManagerStopObservingCookieChanges): Ditto.
2654
2655         * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
2656             which is responsible for cookiesDidChange.
2657
2658         * UIProcess/WebCookieManagerProxy.cpp:
2659         (WebKit::WebCookieManagerProxy::initializeClient):
2660         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
2661         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
2662         (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
2663             modified.
2664         * UIProcess/WebCookieManagerProxy.h:
2665         * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
2666
2667         * UIProcess/WebCookieManagerProxyClient.cpp: Added.
2668         (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
2669             cookies changed.
2670         * UIProcess/WebCookieManagerProxyClient.h: Added.
2671     
2672         * WebProcess/Cookies/WebCookieManager.cpp:
2673         (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
2674             (on platforms that support it).
2675         (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
2676         (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
2677         * WebProcess/Cookies/WebCookieManager.h:
2678         * WebProcess/Cookies/WebCookieManager.messages.in:
2679         
2680         Add new files.
2681         * WebKit2.pro:
2682         * WebKit2.xcodeproj/project.pbxproj:
2683         * GNUmakefile.am:
2684         * win/WebKit2.vcproj:
2685
2686 2011-03-03  Anders Carlsson  <andersca@apple.com>
2687
2688         Reviewed by Darin Adler.
2689
2690         Remove CanRunBeforeUnloadConfirmPanel sync message
2691         https://bugs.webkit.org/show_bug.cgi?id=55689
2692
2693         * Shared/WebPageCreationParameters.cpp:
2694         (WebKit::WebPageCreationParameters::encode):
2695         (WebKit::WebPageCreationParameters::decode):
2696         Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
2697         being encoded/decoded.
2698
2699         * Shared/WebPageCreationParameters.h:
2700         Add canRunBeforeUnloadConfirmPanel.
2701
2702         * UIProcess/WebPageProxy.cpp:
2703         (WebKit::WebPageProxy::initializeUIClient):
2704         Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
2705
2706         (WebKit::WebPageProxy::creationParameters):
2707         Initialize parameters.canRunBeforeUnloadConfirmPanel.
2708
2709         * UIProcess/WebPageProxy.messages.in:
2710         Remove CanRunBeforeUnloadConfirmPanel message.
2711
2712         * UIProcess/WebUIClient.cpp:
2713         (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
2714         * UIProcess/WebUIClient.h:
2715         Make canRunBeforeUnloadConfirmPanel const.
2716
2717         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2718         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
2719         Ask the web page instead of sending a synchronous message.
2720
2721         * WebProcess/WebPage/WebPage.cpp:
2722         (WebKit::WebPage::WebPage):
2723         Initialize m_canRunBeforeUnloadConfirmPanel.
2724
2725         * WebProcess/WebPage/WebPage.h:
2726         (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
2727         (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
2728         Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
2729
2730         (WebKit::WebPage::setCanRunModal):
2731         Add setter for m_canRunModal.
2732
2733         * WebProcess/WebPage/WebPage.messages.in:
2734         Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
2735
2736 2011-03-03  Adam Roben  <aroben@apple.com>
2737
2738         Create the CFBundleRef for WebKit.dll on Windows if needed
2739
2740         WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
2741         out or crash on Windows 7 Release (WebKit2 Tests)
2742
2743         Reviewed by Darin Adler.
2744
2745         * Shared/win/WebKitBundle.cpp: Added.
2746         (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
2747         and returns a new bundle.
2748         (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
2749
2750         * Shared/win/WebKitBundle.h: Added.
2751
2752         * UIProcess/win/WebInspectorProxyWin.cpp:
2753         (WebKit::WebInspectorProxy::inspectorPageURL):
2754         * WebProcess/WebPage/win/WebInspectorWin.cpp:
2755         (WebKit::WebInspector::localizedStringsURL):
2756         Changed to use webKitBundle() to ensure that the bundle has been created.
2757
2758         * win/WebKit2.vcproj: Added new files.
2759
2760 2011-03-03  Peter Kasting  <pkasting@google.com>
2761
2762         Reviewed by James Robinson.
2763
2764         Drop redundant "Windows; " from the Windows-specific User Agent string.
2765         https://bugs.webkit.org/show_bug.cgi?id=54567
2766
2767         * UIProcess/win/WebPageProxyWin.cpp:
2768         (WebKit::WebPageProxy::standardUserAgent):
2769
2770 2011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>
2771
2772         Unreviewed, rolling out r80188.
2773         http://trac.webkit.org/changeset/80188
2774         https://bugs.webkit.org/show_bug.cgi?id=55647
2775
2776         Broke the WebKit API tests. (Requested by xenon on #webkit).
2777
2778         * UIProcess/API/C/WKPage.cpp:
2779         (WKPageRunJavaScriptInMainFrame):
2780         (callRunJavaScriptBlockAndRelease):
2781         * UIProcess/API/C/WKPage.h:
2782         * UIProcess/WebPageProxy.cpp:
2783         (WebKit::WebPageProxy::close):
2784         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
2785         (WebKit::WebPageProxy::processDidCrash):
2786         * UIProcess/WebPageProxy.h:
2787         * UIProcess/WebPageProxy.messages.in:
2788         * WebProcess/WebPage/WebPage.cpp:
2789         (WebKit::WebPage::runJavaScriptInMainFrame):
2790
2791 2011-03-02  Jeff Miller  <jeffm@apple.com>
2792
2793         Reviewed by Darin Adler.
2794
2795         Rename WebKit::WebPage::validateMenuItem() to validateCommand()
2796         https://bugs.webkit.org/show_bug.cgi?id=55636
2797         
2798         Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
2799
2800         * UIProcess/API/mac/WKView.mm:
2801         (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
2802         * UIProcess/WebPageProxy.cpp:
2803         (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
2804         (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
2805         * UIProcess/WebPageProxy.h:
2806         * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
2807         * WebProcess/WebPage/WebPage.cpp:
2808         (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
2809         * WebProcess/WebPage/WebPage.h:
2810         * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
2811
2812 2011-03-02  Anders Carlsson  <andersca@apple.com>
2813
2814         Reviewed by Sam Weinig.
2815
2816         WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
2817         https://bugs.webkit.org/show_bug.cgi?id=55635
2818
2819         * Shared/WebPageCreationParameters.cpp:
2820         (WebKit::WebPageCreationParameters::encode):
2821         (WebKit::WebPageCreationParameters::decode):
2822         Encode and decode areMemoryCacheClientCallsEnabled.
2823
2824         * Shared/WebPageCreationParameters.h:
2825         Add areMemoryCacheClientCallsEnabled member variable.
2826
2827         * UIProcess/WebPageProxy.cpp:
2828         (WebKit::WebPageProxy::WebPageProxy):
2829         Initialize m_areMemoryCacheClientCallsEnabled.
2830
2831         (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
2832         Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
2833
2834         (WebKit::WebPageProxy::creationParameters):
2835         Set areMemoryCacheClientCallsEnabled.
2836
2837         * WebProcess/WebPage/WebPage.cpp:
2838         (WebKit::WebPage::WebPage):
2839         Call WebPage::setMemoryCacheMessagesEnabled.
2840
2841 2011-03-02  Timothy Hatcher  <timothy@apple.com>
2842
2843         Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
2844
2845         https://webkit.org/b/55623
2846
2847         Reviewed by Darin Adler.
2848
2849         * UIProcess/API/C/WKPage.cpp:
2850         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
2851         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
2852         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
2853         * UIProcess/WebPageProxy.cpp:
2854         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
2855         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
2856         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
2857         from the DataReference before calling the callback.
2858         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
2859         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
2860         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
2861         * WebProcess/WebPage/WebPage.cpp:
2862         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
2863         And use ScriptValueCallback to send the message back.
2864
2865 2011-03-02  Jessie Berlin  <jberlin@apple.com>
2866
2867         Reviewed by Adam Roben.
2868
2869         WebKit2: Use CFNetwork Sessions API.
2870         https://bugs.webkit.org/show_bug.cgi?id=55435
2871
2872         Add the ability to create a Private Browsing Storage Session.
2873
2874         * Shared/WebProcessCreationParameters.cpp:
2875         (WebKit::WebProcessCreationParameters::encode):
2876         Encode the UI Process bundle identifier.
2877         (WebKit::WebProcessCreationParameters::decode):
2878         Decode the UI Process bundle identifier.
2879         * Shared/WebProcessCreationParameters.h:
2880
2881         * UIProcess/mac/WebContextMac.mm:
2882         (WebKit::WebContext::platformInitializeWebProcess):
2883         Grab the bundle identifier and use it to set the WebProcessCreationParameter.
2884         * UIProcess/win/WebContextWin.cpp:
2885         (WebKit::WebContext::platformInitializeWebProcess):
2886         Ditto.
2887
2888         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
2889         (InitWebCoreSystemInterface):
2890         Support using the wkCreatePrivateStorageSession WKSI in WebCore.
2891
2892         * WebProcess/WebProcess.cpp:
2893         (WebKit::WebProcess::initializeWebProcess):
2894         Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
2895         from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
2896         same identifier as WebKit2.
2897
2898 2011-03-01  Brian Weinstein  <bweinstein@apple.com>
2899
2900         Reviewed by Adam Roben.
2901
2902         Part of WebKit2: Need a way to send notifications to client when cookies change
2903         https://bugs.webkit.org/show_bug.cgi?id=55427
2904         <rdar://problem/9056027>
2905
2906         * WebProcess/Cookies/WebCookieManager.cpp:
2907         (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
2908             message to the UI process.
2909
2910         * WebProcess/Cookies/WebCookieManager.h:
2911         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2912         (WebKit::WebPlatformStrategies::createCookiesStrategy):
2913         (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
2914         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2915
2916 2011-03-02  Andras Becsi  <abecsi@webkit.org>
2917
2918         Reviewed by Laszlo Gombos.
2919
2920         [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
2921         https://bugs.webkit.org/show_bug.cgi?id=55478
2922
2923         On case insensitive systems the generated forwarding headers cause build problems.
2924
2925         * Scripts/generate-forwarding-headers.pl: The generated header should
2926         also contain the framework name.
2927
2928 2011-03-01  Jeff Miller  <jeffm@apple.com>
2929
2930         Reviewed by Darin Adler.
2931
2932         Expose some selection state fields in WKPage
2933         https://bugs.webkit.org/show_bug.cgi?id=55541
2934         
2935         Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
2936         Edit menu items properly on Windows when using WebKit2.
2937
2938         * UIProcess/API/C/WKPage.cpp:
2939         (WKPageCanDelete): Added.
2940         (WKPageHasSelectedRange): Added.
2941         (WKPageIsContentEditable): Added.
2942         * UIProcess/API/C/WKPage.h: Added new functions.
2943         * UIProcess/WebPageProxy.h:
2944         (WebKit::WebPageProxy::canDelete): Added.
2945         (WebKit::WebPageProxy::hasSelectedRange): Added.
2946         (WebKit::WebPageProxy::isContentEditable): Added.
2947
2948 2011-03-01  Mark Rowe  <mrowe@apple.com>
2949
2950         Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
2951
2952         * Configurations/Base.xcconfig:
2953
2954 2011-03-01  Mark Rowe  <mrowe@apple.com>
2955
2956         Reviewed by Sam Weinig.
2957
2958         Add verification scripts to WebKit2 project and fix the issues they reveal.
2959
2960         * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
2961         library functions from being exported as weak externals.
2962         * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
2963         * Shared/WebContextMenuItem.cpp:
2964         (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
2965         * UIProcess/WebPageGroup.cpp:
2966         (WebKit::webPageGroupMap): Ditto.
2967         * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
2968         Run verification scripts at the appropriate times.
2969         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2970         (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
2971         (WebKit::WebEditorClient::respondToChangedContents): Ditto.
2972         (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
2973         (WebKit::WebEditorClient::didEndEditing): Ditto.
2974         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
2975         (WebKit::idToHistoryItemMap): Ditto.
2976         (WebKit::historyItemToIDMap): Ditto.
2977
2978 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
2979
2980         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
2981
2982         * UIProcess/API/qt/qwkpage.cpp:
2983         (QWKPage::viewportAttributesForSize):
2984
2985 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
2986
2987         Unreviewed, missed updating a call to WebCore::computeViewportAttributes
2988         who's prototype changed.
2989
2990         Viewport Warning/Error Messages Are Now Inaccurate
2991         https://bugs.webkit.org/show_bug.cgi?id=53707
2992
2993         * UIProcess/API/qt/qwkpage.cpp:
2994         (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
2995
2996 2011-03-01  Anders Carlsson  <andersca@apple.com>
2997
2998         Reviewed by Sam Weinig.
2999
3000         WKPluginSiteDataManagerClearAllSiteData is not working
3001         https://bugs.webkit.org/show_bug.cgi?id=55528
3002         <rdar://problem/9071823>
3003
3004         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3005         (WebKit::NetscapePluginModule::tryGetSitesWithData):
3006         Remove version checks, checking that the function pointer is not null is enough.
3007
3008         (WebKit::NetscapePluginModule::tryClearSiteData):
3009         Remove version checks, checking that the function pointer is not null is enough.
3010         Also, correctly convert a null String to a null CString.
3011
3012 2011-03-01  Adam Roben  <aroben@apple.com>
3013
3014         Incorporate a review comment I missed in r80051
3015
3016         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
3017
3018 2011-03-01  Adam Roben  <aroben@apple.com>
3019
3020         Make the PLUGIN_ARCHITECTURE() macro work with MSVC
3021
3022         Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
3023         plugins tests crashing in NetscapePlugin::initialize on Windows
3024
3025         Reviewed by Anders Carlsson.
3026
3027         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
3028         PLUGIN_ARCHITECTURE() is defined for some platform.
3029
3030         * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
3031         macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
3032         replaced the nonsense OS(WIN) with OS(WINDOWS).
3033
3034         * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
3035
3036 2011-03-01  Sam Weinig  <sam@webkit.org>
3037
3038         Reviewed by Timothy Hatcher.
3039
3040         WebKit2 needs to be made localizable
3041         https://bugs.webkit.org/show_bug.cgi?id=55483
3042
3043         * PluginProcess/mac/PluginProcessMainMac.mm:
3044         * WebProcess/mac/WebProcessMainMac.mm:
3045         Set the default localization from the passed in parameter.
3046
3047         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
3048         Add the preferred localization as a parameter when launching processes
3049         so that they can set their localization to match the launching app.
3050
3051         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3052         Use WebCore's localizedString function on the mac, to actually localize
3053         these strings.
3054
3055         (WebKit::WebPlatformStrategies::imageTitle):
3056         Switch to using replace, instead of concatenation, to give localizers a chance
3057         to rearrange the wording.
3058
3059 2011-03-01  Balazs Kelemen  <kbalazs@webkit.org>
3060
3061         Reviewed by Anders Carlsson.
3062
3063         [Qt][WK2] Plugin initialization
3064         https://bugs.webkit.org/show_bug.cgi?id=48127
3065
3066         Apply the quirks that are necessary for the flash plugin
3067         to not crash on X11.
3068
3069         * Platform/qt/ModuleQt.cpp:
3070         (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
3071         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3072         (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
3073         if PLUGIN_ARCHITECTURE is X11.
3074         * Shared/Plugins/Netscape/NetscapePluginModule.h:
3075         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
3076         (WebKit::initializeGTK):  The same hack that we do in WebCore.
3077         Call gtk_init because flash don't do it for itself.
3078         (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
3079         Do the hacks that we need to do before calling NP_Initialize on the
3080         flash plugin to save it form crashing.
3081         * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
3082         Added RequiresGTKToolKit quirk for X11.
3083         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
3084         (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
3085         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3086         (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
3087         quirks to be available in NPN_GetValue.
3088
3089 2011-03-01  Adam Roben  <aroben@apple.com>
3090
3091         Convert seconds to milliseconds before calling ::SetTimer
3092
3093         Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
3094         early on Windows
3095
3096         Reviewed by Anders Carlsson.
3097
3098         * Platform/win/RunLoopWin.cpp:
3099         (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
3100         ::SetTimer expects.
3101
3102 2011-03-01  Andras Becsi  <abecsi@webkit.org>
3103
3104         Reviewed by Csaba Osztrogonác.
3105
3106         [Qt] Clean up the project files and move common options to WebKit.pri.
3107
3108         * WebKit2.pro: Deduplicate options.
3109
3110 2011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>
3111
3112         Reviewed by Andreas Kling.
3113
3114         [Qt] WebKit2 needs to support font size changing and getting default font size
3115         https://bugs.webkit.org/show_bug.cgi?id=53671
3116
3117         Added new enum for font size type and added methods to set and get default font sizes.
3118
3119         * UIProcess/API/qt/qwkpreferences.cpp:
3120         (QWKPreferences::setFontSize): Added.
3121         (QWKPreferences::fontSize): Added.
3122         * UIProcess/API/qt/qwkpreferences.h:
3123
3124 2011-02-28  Alice Liu  <alice.liu@apple.com>
3125
3126         Reviewed by Adam Roben and Gavin Barraclough.
3127
3128         https://bugs.webkit.org/show_bug.cgi?id=54898
3129         InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
3130
3131         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
3132         (WKBundleHitTestResultCopyNodeHandle): 
3133         Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
3134         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
3135         Renamed from "get" to "copy", because it leaksRef.
3136
3137 2011-02-28  Alice Liu  <alice.liu@apple.com>
3138
3139         Reviewed by Gavin Barraclough.
3140
3141         https://bugs.webkit.org/show_bug.cgi?id=55442
3142         Webarchives don't contain subframe content
3143
3144         * WebProcess/WebPage/WebPage.cpp:
3145         (WebKit::WebPage::getWebArchiveOfFrame):
3146         Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
3147
3148 2011-02-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
3149
3150         Reviewed by Kenneth Rohde Christiansen.
3151
3152         [Qt][WK2] Add a way to test the WebKit 2 APIs
3153         https://bugs.webkit.org/show_bug.cgi?id=55408
3154
3155         Add an initial test for the WebKit 2 APIs of Qt.
3156
3157         * UIProcess/API/qt/tests/html/basic_page.html: Added.
3158         * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
3159         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
3160         (View::View):
3161         (View::resizeEvent):
3162         (tst_QGraphicsWKView::init):
3163         (tst_QGraphicsWKView::cleanup):
3164         (tst_QGraphicsWKView::loadEmptyPage):
3165         * UIProcess/API/qt/tests/tests.pri: Added.
3166         * UIProcess/API/qt/tests/tests.pro: Added.
3167         * UIProcess/API/qt/tests/util.h: Added.
3168         (waitForSignal):
3169
3170 2011-02-28  Anders Carlsson  <andersca@apple.com>
3171
3172         Fix clang build.
3173
3174         * UIProcess/API/mac/FindIndicatorWindow.mm:
3175         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
3176         (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
3177         (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
3178         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
3179         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
3180         (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
3181         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
3182         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
3183
3184 2011-02-28  Dan Bernstein  <mitz@apple.com>
3185
3186         Rubber-stamped by Anders Carlsson.
3187
3188         Do not copy config.h into WebKit2.
3189
3190         * WebKit2.xcodeproj/project.pbxproj:
3191
3192 2011-02-28  Dan Bernstein  <mitz@apple.com>
3193
3194         LLVM Compiler build fix.
3195
3196         * Scripts/webkit2/messages.py:
3197         * UIProcess/WebPageProxy.h:
3198
3199 2011-02-28  Anders Carlsson  <andersca@apple.com>
3200
3201         Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
3202
3203         Open PDF in Preview doesn't work
3204         https://bugs.webkit.org/show_bug.cgi?id=55400
3205         <rdar://problem/8750353>
3206
3207         * UIProcess/API/mac/PDFViewController.mm:
3208         (-[WKPDFView initWithFrame:PDFViewController:]):
3209         Set the WKPDFView as the delegate of itself.
3210
3211         (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
3212         Call PDFViewController::openPDFInFinder.
3213
3214         (WebKit::PDFViewController::PDFViewController):
3215         Initialize m_hasWrittenPDFToDisk to false.
3216
3217         (WebKit::PDFViewController::openPDFInFinder):
3218         Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
3219         
3220         (WebKit::temporaryPDFDirectoryPath):
3221         Create a directory to put PDFs in.
3222
3223         (WebKit::PDFViewController::pathToPDFOnDisk):
3224         Return a path to a (non-existent) file in the temporary PDF directory.
3225
3226 2011-02-28  Alexey Proskuryakov  <ap@apple.com>
3227
3228         Reviewed by Dan Bernstein.
3229
3230         Frequent crashes in CFURLCache code on Snow Leopard
3231         https://bugs.webkit.org/show_bug.cgi?id=55412
3232         <rdar://problem/9063922>
3233
3234         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
3235         creates a string with maximum possible buffer size. A path with garbage at the end confused
3236         CFURLCache into corrupting its data structures.
3237
3238         * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
3239         This problem wouldn't have occured if we didn't use CString in the first place.
3240
3241         * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
3242         Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
3243         have liked trailing slash).
3244
3245         * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
3246         Made slash removal conditional for robustness.
3247
3248         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
3249         Use actual string length, not CString::length().
3250
3251 2011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
3252
3253         Reviewed by Anders Carlsson.
3254
3255         [Qt][WK2] Plugin initialization
3256         https://bugs.webkit.org/show_bug.cgi?id=48127
3257
3258         Specialize the way of initializing the plugin for X11.
3259         Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
3260         across platforms.
3261
3262         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
3263         (WebKit::NetscapePluginModule::tryLoad):
3264         * config.h:
3265
3266 2011-02-28  Sam Weinig  <sam@webkit.org>
3267
3268         Reviewed by Brady Eidson.
3269
3270         WK2 Context Menus - Implement LookUpInDictionary
3271         https://bugs.webkit.org/show_bug.cgi?id=55405
3272
3273         * Shared/DictionaryPopupInfo.cpp:
3274         (WebKit::DictionaryPopupInfo::encode):
3275         (WebKit::DictionaryPopupInfo::decode):
3276         * Shared/DictionaryPopupInfo.h:
3277         Add type to differentiate between HotKey and ContextMenu triggered
3278         dictionary popups. This is necessary since HotKey triggered ones want
3279         to override the style to always be overlay.
3280
3281         * UIProcess/API/mac/PageClientImpl.mm:
3282         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3283         Only force the overlay style for HotKey triggered dictionary lookups.
3284
3285         * WebProcess/WebPage/WebPage.h:
3286         * WebProcess/WebPage/mac/WebPageMac.mm:
3287         (WebKit::WebPage::performDictionaryLookupAtLocation):
3288         (WebKit::WebPage::performDictionaryLookupForRange):
3289         Factor out shared functionality into performDictionaryLookupForRange.
3290
3291         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
3292         (WebKit::WebContextMenuClient::lookUpInDictionary):
3293         Get selected range and call newly factored out performDictionaryLookupForRange.
3294
3295 2011-02-28  Anders Carlsson  <andersca@apple.com>
3296
3297         Reviewed by Dan Bernstein.
3298
3299         PDFViewController should hold a reference to the PDF data
3300         https://bugs.webkit.org/show_bug.cgi?id=55394
3301
3302         * UIProcess/API/mac/PDFViewController.h:
3303         * UIProcess/API/mac/PDFViewController.mm:
3304         (WebKit::PDFViewController::setPDFDocumentData):
3305
3306 2011-02-28  Sam Weinig  <sam@webkit.org>
3307
3308         Reviewed by Darin Adler.
3309
3310         Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
3311         https://bugs.webkit.org/show_bug.cgi?id=48234
3312
3313         * Shared/TextInfo.cpp: Removed.
3314         * Shared/TextInfo.h: Removed.
3315         Replace this with the more appropriately DictionaryPopupInfo.
3316
3317         * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
3318         (WebKit::DictionaryPopupInfo::encode):
3319         (WebKit::DictionaryPopupInfo::decode):
3320         * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
3321         (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
3322         Replace individual font related fields with FontInfo.
3323
3324         * Shared/FontInfo.cpp: Added.
3325         (WebKit::FontInfo::FontInfo):
3326         (WebKit::FontInfo::encode):
3327         (WebKit::FontInfo::decode):
3328         * Shared/FontInfo.h: Added.
3329         Add class to encapsulate passing a font description over the wire.
3330
3331         * Shared/PlatformPopupMenuData.cpp:
3332         (WebKit::PlatformPopupMenuData::encode):
3333         (WebKit::PlatformPopupMenuData::decode):
3334         * Shared/PlatformPopupMenuData.h:
3335         Add FontInfo as extra data for the Mac.
3336
3337         * UIProcess/API/mac/PageClientImpl.h:
3338         * UIProcess/API/mac/PageClientImpl.mm:
3339         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3340         * UIProcess/PageClient.h:
3341         Add scaleFactor and use it to construct a font at the right size.
3342
3343         * UIProcess/WebPageProxy.cpp:
3344         (WebKit::WebPageProxy::showPopupMenu):
3345         (WebKit::WebPageProxy::didPerformDictionaryLookup):
3346         * UIProcess/WebPageProxy.h:
3347         * UIProcess/WebPageProxy.messages.in:
3348         * UIProcess/WebPopupMenuProxy.h:
3349         * UIProcess/mac/WebPopupMenuProxyMac.h:
3350         (WebKit::WebPopupMenuProxyMac::create):
3351         * UIProcess/mac/WebPopupMenuProxyMac.mm:
3352         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
3353         (WebKit::WebPopupMenuProxyMac::populate):
3354         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
3355         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
3356         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
3357         * UIProcess/qt/WebPopupMenuProxyQt.h:
3358         * UIProcess/win/WebPopupMenuProxyWin.cpp:
3359         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
3360         * UIProcess/win/WebPopupMenuProxyWin.h:
3361         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
3362         (WebKit::WebPopupMenu::setUpPlatformData):
3363         * WebProcess/WebPage/mac/WebPageMac.mm:
3364         (WebKit::WebPage::performDictionaryLookupAtLocation):
3365         Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
3366
3367         * WebKit2.pro:
3368         * WebKit2.xcodeproj/project.pbxproj:
3369         * win/WebKit2.vcproj:
3370         Add new files.
3371
3372 2011-02-28  Adam Roben  <aroben@apple.com>
3373
3374         One more rename as a followup to r79868
3375
3376         Rubber-stamped by Anders Carlsson.
3377
3378         * UIProcess/DrawingAreaProxyImpl.cpp:
3379         * UIProcess/DrawingAreaProxyImpl.h:
3380         Rename stateDidChange to backingStoreStateDidChange.
3381
3382 2011-02-28  Adam Roben  <aroben@apple.com>
3383
3384         Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
3385
3386         Rubber-stamped (and suggested) by Anders Carlsson.
3387
3388         * UIProcess/DrawingAreaProxy.h:
3389         * UIProcess/DrawingAreaProxy.messages.in:
3390         * UIProcess/DrawingAreaProxyImpl.cpp:
3391         * UIProcess/DrawingAreaProxyImpl.h:
3392         * WebProcess/WebPage/DrawingArea.h:
3393         * WebProcess/WebPage/DrawingArea.messages.in:
3394         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3395         * WebProcess/WebPage/DrawingAreaImpl.h:
3396         Perform the rename.
3397
3398 2011-02-28  Adam Roben  <aroben@apple.com>
3399
3400         Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
3401
3402         The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
3403         DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
3404         store. (Currently, this is just when the size changes.) This function will sometimes (but
3405         not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
3406         to the web process. This means it's now possible for the state IDs sent in consecutive
3407         UpdateState messages to increase by more than one, but that's OK.
3408
3409         This should cause no change in behavior.
3410
3411         Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
3412         its state changes, not just when we send an UpdateState message
3413
3414         Reviewed by Anders Carlsson.
3415
3416         * UIProcess/DrawingAreaProxyImpl.cpp:
3417         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
3418         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
3419         (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
3420         sendUpdateState whenever our state has changed for any reason since the last UpdateState
3421         message was sent.
3422         (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
3423         through to sendUpdateState.
3424         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
3425         the state ID we send to the web process from here to stateDidChange, and added an assertion.
3426
3427         * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
3428         the comment explaining its meaning.
3429
3430 2011-02-28  Adam Roben  <aroben@apple.com>
3431
3432         Pass the right dirty rect to Plugin::paint
3433
3434         A typo in r79040 broke this. Much of this patch is just support for testing the fix.
3435
3436         Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
3437         Large portions of pages with plugins paint black
3438
3439         Reviewed by Anders Carlsson.
3440
3441         * WebProcess/Plugins/PluginView.cpp:
3442         (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
3443         rather than just passing along the dirty rect that was passed into this function. This is
3444         the bug fix.
3445
3446         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3447         (WKBundlePageForceRepaint):
3448         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
3449         Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
3450
3451         * WebProcess/WebPage/WebPage.cpp:
3452         (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
3453         (WebKit::WebPage::forceRepaint): ...from here.
3454
3455         * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
3456
3457 2011-02-27  Sam Weinig  <sam@webkit.org>
3458
3459         Reviewed by Dan Bernstein.
3460
3461         Force dictionary popup to use overlay type
3462         <rdar://problem/9052483>
3463         https://bugs.webkit.org/show_bug.cgi?id=55337
3464
3465         * UIProcess/API/mac/PageClientImpl.mm:
3466         (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
3467         used for the hot key version of the dictionary popup, force the overlay
3468         style.
3469
3470 2011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
3471
3472         Reviewed by Kenneth Rohde Christiansen.
3473
3474         [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
3475         https://bugs.webkit.org/show_bug.cgi?id=55330
3476
3477         Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
3478         on its use.
3479
3480         * UIProcess/API/qt/qgraphicswkview.cpp:
3481         * UIProcess/API/qt/qgraphicswkview.h: