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