3b506cd7f940b733499baedaafb438761aea7562
[WebKit.git] / Source / WebKit2 / ChangeLog
1 2011-03-03  Alexey Proskuryakov  <ap@apple.com>
2
3         Reviewed by Darin Adler.
4
5         REGRESSION (WebKit2): Tab keys no longer observe Full Keyboard Access
6         https://bugs.webkit.org/show_bug.cgi?id=55633
7         <rdar://problem/8963023>
8
9         * WebKit2.xcodeproj/project.pbxproj:
10         * WebProcess/mac/FullKeyboardAccessWatcher.h: Added.
11         * WebProcess/mac/FullKeyboardAccessWatcher.mm: Added.
12         (-[FullKeyboardAccessWatcher retrieveKeyboardUIModeFromPreferences:]):
13         (-[FullKeyboardAccessWatcher init]):
14         (+[FullKeyboardAccessWatcher fullKeyboardAccessEnabled]):
15         Get the current state of full keyboard access, listening for change notifications.
16
17         * WebProcess/WebProcess.h:  Added fullKeyboardAccessEnabled().
18
19         * WebProcess/WebProcess.cpp: (WebKit::WebProcess::fullKeyboardAccessEnabled):
20         WebKit1 also doesn't implement this on platforms other than Mac.
21
22         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::fullKeyboardAccessEnabled):
23         Just ask FullKeyboardAccessWatcher.
24
25         * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::keyboardUIMode):
26         * WebProcess/WebCoreSupport/WebChromeClient.h:
27         Added keyboardUIMode(), removed tabsToLinks().
28
29         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyboardUIMode):
30         * WebProcess/WebPage/WebPage.h:
31         Generate keyboard UI mode from tabToLinks preference and current state of FKA.
32
33 2011-03-03  Sam Weinig  <sam@webkit.org>
34
35         Reviewed by Anders Carlsson.
36
37         Give the Bundle's policy client the option of deciding the policy
38         https://bugs.webkit.org/show_bug.cgi?id=55699
39
40         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
41         Add WKBundlePagePolicyAction enum and make it the return value of
42         the WKBundlePagePolicyClient functions.
43
44         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.cpp:
45         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNavigationAction):
46         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForNewWindowAction):
47         (WebKit::InjectedBundlePagePolicyClient::decidePolicyForMIMEType):
48         * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h:
49         Pass the return value back to the caller. For unimplemented functions, return WKBundlePagePolicyActionPassThrough.
50
51         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
52         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForMIMEType):
53         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
54         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
55         Call the policy function early if the bundle handles it.
56
57 2011-03-02  Brian Weinstein  <bweinstein@apple.com>
58
59         Reviewed by Adam Roben.
60
61         Rest of WebKit2: Need a way to send notifications to client when cookies change
62         https://bugs.webkit.org/show_bug.cgi?id=55427
63         <rdar://problem/9056027>
64         
65         This patch adds the communication from the WebProcess <-> UIProcess about starting/stopping
66         listening for cookies changing, and adds a mechanism for the WebProcess to notify the UIProcess
67         when the cookies have changed. The WebProcess sends a message to the UIProcess when the cookies
68         change, and the UIProcess passes this along to the WebCookieManagerProxyClient.
69
70         * UIProcess/API/C/WKCookieManager.cpp:
71         (WKCookieManagerSetClient): Call through to WebCookieManagerProxy.
72         (WKCookieManagerStartObservingCookieChanges): Ditto.
73         (WKCookieManagerStopObservingCookieChanges): Ditto.
74
75         * UIProcess/API/C/WKCookieManager.h: Add new functions and a WKCookieManagerClient
76             which is responsible for cookiesDidChange.
77
78         * UIProcess/WebCookieManagerProxy.cpp:
79         (WebKit::WebCookieManagerProxy::initializeClient):
80         (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Send the message down to the web process.
81         (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto.
82         (WebKit::WebCookieManagerProxy::cookiesDidChange): Tell the WKCookieManagerClient the cookies were
83             modified.
84         * UIProcess/WebCookieManagerProxy.h:
85         * UIProcess/WebCookieManagerProxy.messages.in: Add new messages.
86
87         * UIProcess/WebCookieManagerProxyClient.cpp: Added.
88         (WebKit::WebCookieManagerProxyClient::cookiesDidChange): Calls through to the client saying that
89             cookies changed.
90         * UIProcess/WebCookieManagerProxyClient.h: Added.
91     
92         * WebProcess/Cookies/WebCookieManager.cpp:
93         (WebKit::WebCookieManager::startObservingCookieChanges): Call through to WebCore::startObservingCookieChanges
94             (on platforms that support it).
95         (WebKit::WebCookieManager::stopObservingCookieChanges): Ditto (for stopObservingCookieChanges).
96         (WebKit::WebCookieManager::dispatchDidModifyCookies): Send a message to the UI process that cookies changed.
97         * WebProcess/Cookies/WebCookieManager.h:
98         * WebProcess/Cookies/WebCookieManager.messages.in:
99         
100         Add new files.
101         * WebKit2.pro:
102         * WebKit2.xcodeproj/project.pbxproj:
103         * GNUmakefile.am:
104         * win/WebKit2.vcproj:
105
106 2011-03-03  Anders Carlsson  <andersca@apple.com>
107
108         Reviewed by Darin Adler.
109
110         Remove CanRunBeforeUnloadConfirmPanel sync message
111         https://bugs.webkit.org/show_bug.cgi?id=55689
112
113         * Shared/WebPageCreationParameters.cpp:
114         (WebKit::WebPageCreationParameters::encode):
115         (WebKit::WebPageCreationParameters::decode):
116         Encode and decode canRunBeforeUnloadConfirmPanel, as well as canRunModal, which wasn't
117         being encoded/decoded.
118
119         * Shared/WebPageCreationParameters.h:
120         Add canRunBeforeUnloadConfirmPanel.
121
122         * UIProcess/WebPageProxy.cpp:
123         (WebKit::WebPageProxy::initializeUIClient):
124         Send SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
125
126         (WebKit::WebPageProxy::creationParameters):
127         Initialize parameters.canRunBeforeUnloadConfirmPanel.
128
129         * UIProcess/WebPageProxy.messages.in:
130         Remove CanRunBeforeUnloadConfirmPanel message.
131
132         * UIProcess/WebUIClient.cpp:
133         (WebKit::WebUIClient::canRunBeforeUnloadConfirmPanel):
134         * UIProcess/WebUIClient.h:
135         Make canRunBeforeUnloadConfirmPanel const.
136
137         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
138         (WebKit::WebChromeClient::canRunBeforeUnloadConfirmPanel):
139         Ask the web page instead of sending a synchronous message.
140
141         * WebProcess/WebPage/WebPage.cpp:
142         (WebKit::WebPage::WebPage):
143         Initialize m_canRunBeforeUnloadConfirmPanel.
144
145         * WebProcess/WebPage/WebPage.h:
146         (WebKit::WebPage::canRunBeforeUnloadConfirmPanel):
147         (WebKit::WebPage::setCanRunBeforeUnloadConfirmPanel):
148         Add getter and setter for m_canRunBeforeUnloadConfirmPanel.
149
150         (WebKit::WebPage::setCanRunModal):
151         Add setter for m_canRunModal.
152
153         * WebProcess/WebPage/WebPage.messages.in:
154         Add SetCanRunBeforeUnloadConfirmPanel and SetCanRunModal messages.
155
156 2011-03-03  Adam Roben  <aroben@apple.com>
157
158         Create the CFBundleRef for WebKit.dll on Windows if needed
159
160         WebKit part of <http://webkit.org/b/55672> <rdar://problem/9080867> All inspector tests time
161         out or crash on Windows 7 Release (WebKit2 Tests)
162
163         Reviewed by Darin Adler.
164
165         * Shared/win/WebKitBundle.cpp: Added.
166         (WebKit::createWebKitBundle): Returns a pre-existing bundle, if possible, otherwise creates
167         and returns a new bundle.
168         (WebKit::webKitBundle): Creates and caches a bundle, and returns it.
169
170         * Shared/win/WebKitBundle.h: Added.
171
172         * UIProcess/win/WebInspectorProxyWin.cpp:
173         (WebKit::WebInspectorProxy::inspectorPageURL):
174         * WebProcess/WebPage/win/WebInspectorWin.cpp:
175         (WebKit::WebInspector::localizedStringsURL):
176         Changed to use webKitBundle() to ensure that the bundle has been created.
177
178         * win/WebKit2.vcproj: Added new files.
179
180 2011-03-03  Peter Kasting  <pkasting@google.com>
181
182         Reviewed by James Robinson.
183
184         Drop redundant "Windows; " from the Windows-specific User Agent string.
185         https://bugs.webkit.org/show_bug.cgi?id=54567
186
187         * UIProcess/win/WebPageProxyWin.cpp:
188         (WebKit::WebPageProxy::standardUserAgent):
189
190 2011-03-02  Sheriff Bot  <webkit.review.bot@gmail.com>
191
192         Unreviewed, rolling out r80188.
193         http://trac.webkit.org/changeset/80188
194         https://bugs.webkit.org/show_bug.cgi?id=55647
195
196         Broke the WebKit API tests. (Requested by xenon on #webkit).
197
198         * UIProcess/API/C/WKPage.cpp:
199         (WKPageRunJavaScriptInMainFrame):
200         (callRunJavaScriptBlockAndRelease):
201         * UIProcess/API/C/WKPage.h:
202         * UIProcess/WebPageProxy.cpp:
203         (WebKit::WebPageProxy::close):
204         (WebKit::WebPageProxy::runJavaScriptInMainFrame):
205         (WebKit::WebPageProxy::processDidCrash):
206         * UIProcess/WebPageProxy.h:
207         * UIProcess/WebPageProxy.messages.in:
208         * WebProcess/WebPage/WebPage.cpp:
209         (WebKit::WebPage::runJavaScriptInMainFrame):
210
211 2011-03-02  Jeff Miller  <jeffm@apple.com>
212
213         Reviewed by Darin Adler.
214
215         Rename WebKit::WebPage::validateMenuItem() to validateCommand()
216         https://bugs.webkit.org/show_bug.cgi?id=55636
217         
218         Since this method can validate more than menu items, validateCommand() is a better name.  Also rename various messages and WebKit::WebPageProxy::didValidateMenuItem() to didValidateCommand().
219
220         * UIProcess/API/mac/WKView.mm:
221         (-[WKView validateUserInterfaceItem:]): Call validateCommand() instead of validateMenuItem().
222         * UIProcess/WebPageProxy.cpp:
223         (WebKit::WebPageProxy::validateCommand): Renamed from validateMenuItem().
224         (WebKit::WebPageProxy::didValidateCommand): Renamed from didValidateMenuItem().
225         * UIProcess/WebPageProxy.h:
226         * UIProcess/WebPageProxy.messages.in: Renamed DidValidateMenuItem to DidValidateCommand.
227         * WebProcess/WebPage/WebPage.cpp:
228         (WebKit::WebPage::validateCommand): Renamed from validateMenuItem().
229         * WebProcess/WebPage/WebPage.h:
230         * WebProcess/WebPage/WebPage.messages.in: Renamed ValidateMenuItem to ValidateCommand.
231
232 2011-03-02  Anders Carlsson  <andersca@apple.com>
233
234         Reviewed by Sam Weinig.
235
236         WKPageSetMemoryCacheClientCallsEnabled doesn't persist if web process crashes
237         https://bugs.webkit.org/show_bug.cgi?id=55635
238
239         * Shared/WebPageCreationParameters.cpp:
240         (WebKit::WebPageCreationParameters::encode):
241         (WebKit::WebPageCreationParameters::decode):
242         Encode and decode areMemoryCacheClientCallsEnabled.
243
244         * Shared/WebPageCreationParameters.h:
245         Add areMemoryCacheClientCallsEnabled member variable.
246
247         * UIProcess/WebPageProxy.cpp:
248         (WebKit::WebPageProxy::WebPageProxy):
249         Initialize m_areMemoryCacheClientCallsEnabled.
250
251         (WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled):
252         Update m_areMemoryCacheClientCallsEnabled. Send a message if necessary.
253
254         (WebKit::WebPageProxy::creationParameters):
255         Set areMemoryCacheClientCallsEnabled.
256
257         * WebProcess/WebPage/WebPage.cpp:
258         (WebKit::WebPage::WebPage):
259         Call WebPage::setMemoryCacheMessagesEnabled.
260
261 2011-03-02  Timothy Hatcher  <timothy@apple.com>
262
263         Make the runJavaScriptInMainFrame callback send a WKSerializedScriptValueRef.
264
265         https://webkit.org/b/55623
266
267         Reviewed by Darin Adler.
268
269         * UIProcess/API/C/WKPage.cpp:
270         (WKPageRunJavaScriptInMainFrame): Use ScriptValueCallback.
271         (callRunJavaScriptBlockAndRelease): Use WKSerializedScriptValueRef.
272         * UIProcess/API/C/WKPage.h: Use WKSerializedScriptValueRef.
273         * UIProcess/WebPageProxy.cpp:
274         (WebKit::WebPageProxy::close): Call invalidateCallbackMap for m_scriptValueCallbacks.
275         (WebKit::WebPageProxy::runJavaScriptInMainFrame): Take a ScriptValueCallback.
276         (WebKit::WebPageProxy::scriptValueCallback): Added. Create a WebSerializedScriptValue
277         from the DataReference before calling the callback.
278         (WebKit::WebPageProxy::processDidCrash): Call invalidateCallbackMap for m_scriptValueCallbacks.
279         * UIProcess/WebPageProxy.h: Added ScriptValueCallback and m_scriptValueCallbacks.
280         * UIProcess/WebPageProxy.messages.in: Added ScriptValueCallback.
281         * WebProcess/WebPage/WebPage.cpp:
282         (WebKit::WebPage::runJavaScriptInMainFrame): Create a DataReference from a WebCore::SerializedScriptValue.
283         And use ScriptValueCallback to send the message back.
284
285 2011-03-02  Jessie Berlin  <jberlin@apple.com>
286
287         Reviewed by Adam Roben.
288
289         WebKit2: Use CFNetwork Sessions API.
290         https://bugs.webkit.org/show_bug.cgi?id=55435
291
292         Add the ability to create a Private Browsing Storage Session.
293
294         * Shared/WebProcessCreationParameters.cpp:
295         (WebKit::WebProcessCreationParameters::encode):
296         Encode the UI Process bundle identifier.
297         (WebKit::WebProcessCreationParameters::decode):
298         Decode the UI Process bundle identifier.
299         * Shared/WebProcessCreationParameters.h:
300
301         * UIProcess/mac/WebContextMac.mm:
302         (WebKit::WebContext::platformInitializeWebProcess):
303         Grab the bundle identifier and use it to set the WebProcessCreationParameter.
304         * UIProcess/win/WebContextWin.cpp:
305         (WebKit::WebContext::platformInitializeWebProcess):
306         Ditto.
307
308         * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
309         (InitWebCoreSystemInterface):
310         Support using the wkCreatePrivateStorageSession WKSI in WebCore.
311
312         * WebProcess/WebProcess.cpp:
313         (WebKit::WebProcess::initializeWebProcess):
314         Set the base for the Private Browsing Storage Session identifier to be the bundle identifier
315         from the UI Process so that WebKit1 would create a Private Browsing Storage Session with the
316         same identifier as WebKit2.
317
318 2011-03-01  Brian Weinstein  <bweinstein@apple.com>
319
320         Reviewed by Adam Roben.
321
322         Part of WebKit2: Need a way to send notifications to client when cookies change
323         https://bugs.webkit.org/show_bug.cgi?id=55427
324         <rdar://problem/9056027>
325
326         * WebProcess/Cookies/WebCookieManager.cpp:
327         (WebKit::WebCookieManager::dispatchDidModifyCookies): Add a stub with a FIXME to send a 
328             message to the UI process.
329
330         * WebProcess/Cookies/WebCookieManager.h:
331         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
332         (WebKit::WebPlatformStrategies::createCookiesStrategy):
333         (WebKit::WebPlatformStrategies::notifyCookiesChanged): Call WebCookieManager::dispatchDidModifyCookies.
334         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
335
336 2011-03-02  Andras Becsi  <abecsi@webkit.org>
337
338         Reviewed by Laszlo Gombos.
339
340         [Qt][WK2] generate-forwarding-headers.pl should generate paths with framework names
341         https://bugs.webkit.org/show_bug.cgi?id=55478
342
343         On case insensitive systems the generated forwarding headers cause build problems.
344
345         * Scripts/generate-forwarding-headers.pl: The generated header should
346         also contain the framework name.
347
348 2011-03-01  Jeff Miller  <jeffm@apple.com>
349
350         Reviewed by Darin Adler.
351
352         Expose some selection state fields in WKPage
353         https://bugs.webkit.org/show_bug.cgi?id=55541
354         
355         Added WKPageCanDelete(), WKPageHasSelectedRange(), and WKPageIsContentEditable() so we can enable some
356         Edit menu items properly on Windows when using WebKit2.
357
358         * UIProcess/API/C/WKPage.cpp:
359         (WKPageCanDelete): Added.
360         (WKPageHasSelectedRange): Added.
361         (WKPageIsContentEditable): Added.
362         * UIProcess/API/C/WKPage.h: Added new functions.
363         * UIProcess/WebPageProxy.h:
364         (WebKit::WebPageProxy::canDelete): Added.
365         (WebKit::WebPageProxy::hasSelectedRange): Added.
366         (WebKit::WebPageProxy::isContentEditable): Added.
367
368 2011-03-01  Mark Rowe  <mrowe@apple.com>
369
370         Hide the typeinfo name symbols for std::exception and std::bad_alloc too.
371
372         * Configurations/Base.xcconfig:
373
374 2011-03-01  Mark Rowe  <mrowe@apple.com>
375
376         Reviewed by Sam Weinig.
377
378         Add verification scripts to WebKit2 project and fix the issues they reveal.
379
380         * Configurations/Base.xcconfig: Add linker flags to prevent C++ standard
381         library functions from being exported as weak externals.
382         * Configurations/WebKit2.xcconfig: Inherit linker flags from the project level.
383         * Shared/WebContextMenuItem.cpp:
384         (WebKit::WebContextMenuItem::separatorItem): Use DEFINE_STATIC_LOCAL.
385         * UIProcess/WebPageGroup.cpp:
386         (WebKit::webPageGroupMap): Ditto.
387         * WebKit2.xcodeproj/project.pbxproj: Don't copy .in files in to the framework.
388         Run verification scripts at the appropriate times.
389         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
390         (WebKit::WebEditorClient::didBeginEditing): Use DEFINE_STATIC_LOCAL.
391         (WebKit::WebEditorClient::respondToChangedContents): Ditto.
392         (WebKit::WebEditorClient::respondToChangedSelection): Ditto.
393         (WebKit::WebEditorClient::didEndEditing): Ditto.
394         * WebProcess/WebPage/WebBackForwardListProxy.cpp:
395         (WebKit::idToHistoryItemMap): Ditto.
396         (WebKit::historyItemToIDMap): Ditto.
397
398 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
399
400         Unreviewed. Roll out r80068 and r80073 due to breaking WebKit2 Qt port.
401
402         * UIProcess/API/qt/qwkpage.cpp:
403         (QWKPage::viewportAttributesForSize):
404
405 2011-03-01  Joseph Pecoraro  <joepeck@webkit.org>
406
407         Unreviewed, missed updating a call to WebCore::computeViewportAttributes
408         who's prototype changed.
409
410         Viewport Warning/Error Messages Are Now Inaccurate
411         https://bugs.webkit.org/show_bug.cgi?id=53707
412
413         * UIProcess/API/qt/qwkpage.cpp:
414         (QWKPage::viewportAttributesForSize): pass in a value for the document argument.
415
416 2011-03-01  Anders Carlsson  <andersca@apple.com>
417
418         Reviewed by Sam Weinig.
419
420         WKPluginSiteDataManagerClearAllSiteData is not working
421         https://bugs.webkit.org/show_bug.cgi?id=55528
422         <rdar://problem/9071823>
423
424         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
425         (WebKit::NetscapePluginModule::tryGetSitesWithData):
426         Remove version checks, checking that the function pointer is not null is enough.
427
428         (WebKit::NetscapePluginModule::tryClearSiteData):
429         Remove version checks, checking that the function pointer is not null is enough.
430         Also, correctly convert a null String to a null CString.
431
432 2011-03-01  Adam Roben  <aroben@apple.com>
433
434         Incorporate a review comment I missed in r80051
435
436         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Clarified error message.
437
438 2011-03-01  Adam Roben  <aroben@apple.com>
439
440         Make the PLUGIN_ARCHITECTURE() macro work with MSVC
441
442         Fixes <http://webkit.org/b/55513> <rdar://problem/9069189> REGRESSION (r79925): Lots of
443         plugins tests crashing in NetscapePlugin::initialize on Windows
444
445         Reviewed by Anders Carlsson.
446
447         * Shared/Plugins/Netscape/NetscapePluginModule.cpp: Added a compile-time check to make sure
448         PLUGIN_ARCHITECTURE() is defined for some platform.
449
450         * config.h: Removed the parentheses from the use of "defined" in the PLUGIN_ARCHITECTURE()
451         macro. This matches PLATFORM(), OS(), etc., and makes the macro work on Windows. Also
452         replaced the nonsense OS(WIN) with OS(WINDOWS).
453
454         * win/WebKit2.vcproj: Added config.h for editing convenience. Let VS do its thang.
455
456 2011-03-01  Sam Weinig  <sam@webkit.org>
457
458         Reviewed by Timothy Hatcher.
459
460         WebKit2 needs to be made localizable
461         https://bugs.webkit.org/show_bug.cgi?id=55483
462
463         * PluginProcess/mac/PluginProcessMainMac.mm:
464         * WebProcess/mac/WebProcessMainMac.mm:
465         Set the default localization from the passed in parameter.
466
467         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
468         Add the preferred localization as a parameter when launching processes
469         so that they can set their localization to match the launching app.
470
471         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
472         Use WebCore's localizedString function on the mac, to actually localize
473         these strings.
474
475         (WebKit::WebPlatformStrategies::imageTitle):
476         Switch to using replace, instead of concatenation, to give localizers a chance
477         to rearrange the wording.
478
479 2011-03-01  Balazs Kelemen  <kbalazs@webkit.org>
480
481         Reviewed by Anders Carlsson.
482
483         [Qt][WK2] Plugin initialization
484         https://bugs.webkit.org/show_bug.cgi?id=48127
485
486         Apply the quirks that are necessary for the flash plugin
487         to not crash on X11.
488
489         * Platform/qt/ModuleQt.cpp:
490         (WebKit::Module::load): Use the ResolveAllSymbols hint as we do in WebCore.
491         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
492         (WebKit::NetscapePluginModule::tryLoad): Call applyX11QuirksBeforeLoad
493         if PLUGIN_ARCHITECTURE is X11.
494         * Shared/Plugins/Netscape/NetscapePluginModule.h:
495         * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
496         (WebKit::initializeGTK):  The same hack that we do in WebCore.
497         Call gtk_init because flash don't do it for itself.
498         (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): Added for X11.
499         Do the hacks that we need to do before calling NP_Initialize on the
500         flash plugin to save it form crashing.
501         * Shared/Plugins/PluginQuirks.h: Use PLUGIN_ARCHITECTURE macros.
502         Added RequiresGTKToolKit quirk for X11.
503         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
504         (WebKit::NPN_GetValue): Handle the RequiresGTKToolKit quirk on X11.
505         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
506         (WebKit::NetscapePlugin::quirks): Added getter for the PluginModule's
507         quirks to be available in NPN_GetValue.
508
509 2011-03-01  Adam Roben  <aroben@apple.com>
510
511         Convert seconds to milliseconds before calling ::SetTimer
512
513         Fixes <http://webkit.org/b/55417> <rdar://problem/9065287> RunLoop::Timer fires 1000x too
514         early on Windows
515
516         Reviewed by Anders Carlsson.
517
518         * Platform/win/RunLoopWin.cpp:
519         (RunLoop::TimerBase::start): Convert the timeout interval to milliseconds, since that's what
520         ::SetTimer expects.
521
522 2011-03-01  Andras Becsi  <abecsi@webkit.org>
523
524         Reviewed by Csaba Osztrogonác.
525
526         [Qt] Clean up the project files and move common options to WebKit.pri.
527
528         * WebKit2.pro: Deduplicate options.
529
530 2011-03-01  Juha Savolainen  <juha.savolainen@weego.fi>
531
532         Reviewed by Andreas Kling.
533
534         [Qt] WebKit2 needs to support font size changing and getting default font size
535         https://bugs.webkit.org/show_bug.cgi?id=53671
536
537         Added new enum for font size type and added methods to set and get default font sizes.
538
539         * UIProcess/API/qt/qwkpreferences.cpp:
540         (QWKPreferences::setFontSize): Added.
541         (QWKPreferences::fontSize): Added.
542         * UIProcess/API/qt/qwkpreferences.h:
543
544 2011-02-28  Alice Liu  <alice.liu@apple.com>
545
546         Reviewed by Adam Roben and Gavin Barraclough.
547
548         https://bugs.webkit.org/show_bug.cgi?id=54898
549         InjectedBundleNodeHandle dies too early in WKBundleHitTestResultGetNodeHandle
550
551         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
552         (WKBundleHitTestResultCopyNodeHandle): 
553         Instead of .get(), call .release.leakRef() like other functions that return WKBundleNodeHandleRef.
554         * WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
555         Renamed from "get" to "copy", because it leaksRef.
556
557 2011-02-28  Alice Liu  <alice.liu@apple.com>
558
559         Reviewed by Gavin Barraclough.
560
561         https://bugs.webkit.org/show_bug.cgi?id=55442
562         Webarchives don't contain subframe content
563
564         * WebProcess/WebPage/WebPage.cpp:
565         (WebKit::WebPage::getWebArchiveOfFrame):
566         Pass the frame's document instead of just the frame, to use a different LegacyWebArchive::create function.
567
568 2011-02-28  Benjamin Poulain  <benjamin.poulain@nokia.com>
569
570         Reviewed by Kenneth Rohde Christiansen.
571
572         [Qt][WK2] Add a way to test the WebKit 2 APIs
573         https://bugs.webkit.org/show_bug.cgi?id=55408
574
575         Add an initial test for the WebKit 2 APIs of Qt.
576
577         * UIProcess/API/qt/tests/html/basic_page.html: Added.
578         * UIProcess/API/qt/tests/qgraphicswkview/qgraphicswkview.pro: Added.
579         * UIProcess/API/qt/tests/qgraphicswkview/tst_qgraphicswkview.cpp: Added.
580         (View::View):
581         (View::resizeEvent):
582         (tst_QGraphicsWKView::init):
583         (tst_QGraphicsWKView::cleanup):
584         (tst_QGraphicsWKView::loadEmptyPage):
585         * UIProcess/API/qt/tests/tests.pri: Added.
586         * UIProcess/API/qt/tests/tests.pro: Added.
587         * UIProcess/API/qt/tests/util.h: Added.
588         (waitForSignal):
589
590 2011-02-28  Anders Carlsson  <andersca@apple.com>
591
592         Fix clang build.
593
594         * UIProcess/API/mac/FindIndicatorWindow.mm:
595         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
596         (WebKit::ChunkedUpdateDrawingAreaProxy::deprecatedUpdate):
597         (WebKit::ChunkedUpdateDrawingAreaProxy::didReceiveMessage):
598         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
599         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
600         (WebKit::ChunkedUpdateDrawingArea::deprecatedResumePainting):
601         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
602         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
603
604 2011-02-28  Dan Bernstein  <mitz@apple.com>
605
606         Rubber-stamped by Anders Carlsson.
607
608         Do not copy config.h into WebKit2.
609
610         * WebKit2.xcodeproj/project.pbxproj:
611
612 2011-02-28  Dan Bernstein  <mitz@apple.com>
613
614         LLVM Compiler build fix.
615
616         * Scripts/webkit2/messages.py:
617         * UIProcess/WebPageProxy.h:
618
619 2011-02-28  Anders Carlsson  <andersca@apple.com>
620
621         Reviewed by Dan Bernstein, Sam Weinig, Alexey Proskuryakov and Darin Adler.
622
623         Open PDF in Preview doesn't work
624         https://bugs.webkit.org/show_bug.cgi?id=55400
625         <rdar://problem/8750353>
626
627         * UIProcess/API/mac/PDFViewController.mm:
628         (-[WKPDFView initWithFrame:PDFViewController:]):
629         Set the WKPDFView as the delegate of itself.
630
631         (-[WKPDFView PDFViewOpenPDFInNativeApplication:]):
632         Call PDFViewController::openPDFInFinder.
633
634         (WebKit::PDFViewController::PDFViewController):
635         Initialize m_hasWrittenPDFToDisk to false.
636
637         (WebKit::PDFViewController::openPDFInFinder):
638         Write the PDF to disk if needed and then open it using -[NSWorkspace openFile:].
639         
640         (WebKit::temporaryPDFDirectoryPath):
641         Create a directory to put PDFs in.
642
643         (WebKit::PDFViewController::pathToPDFOnDisk):
644         Return a path to a (non-existent) file in the temporary PDF directory.
645
646 2011-02-28  Alexey Proskuryakov  <ap@apple.com>
647
648         Reviewed by Dan Bernstein.
649
650         Frequent crashes in CFURLCache code on Snow Leopard
651         https://bugs.webkit.org/show_bug.cgi?id=55412
652         <rdar://problem/9063922>
653
654         CString is evil, it has two lengths which can be different - specifically, fileSystemRepresentation()
655         creates a string with maximum possible buffer size. A path with garbage at the end confused
656         CFURLCache into corrupting its data structures.
657
658         * Shared/WebProcessCreationParameters.h: Added a FIXME about merging Mac and Windows code.
659         This problem wouldn't have occured if we didn't use CString in the first place.
660
661         * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess):
662         Added an assertion matching Windows behavior (seems likely that NSURLCache also wouldn't
663         have liked trailing slash).
664
665         * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess):
666         Made slash removal conditional for robustness.
667
668         * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess):
669         Use actual string length, not CString::length().
670
671 2011-02-28  Balazs Kelemen  <kbalazs@webkit.org>
672
673         Reviewed by Anders Carlsson.
674
675         [Qt][WK2] Plugin initialization
676         https://bugs.webkit.org/show_bug.cgi?id=48127
677
678         Specialize the way of initializing the plugin for X11.
679         Introduce PLUGIN_ARCHITECTURE macros to allow code sharing
680         across platforms.
681
682         * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
683         (WebKit::NetscapePluginModule::tryLoad):
684         * config.h:
685
686 2011-02-28  Sam Weinig  <sam@webkit.org>
687
688         Reviewed by Brady Eidson.
689
690         WK2 Context Menus - Implement LookUpInDictionary
691         https://bugs.webkit.org/show_bug.cgi?id=55405
692
693         * Shared/DictionaryPopupInfo.cpp:
694         (WebKit::DictionaryPopupInfo::encode):
695         (WebKit::DictionaryPopupInfo::decode):
696         * Shared/DictionaryPopupInfo.h:
697         Add type to differentiate between HotKey and ContextMenu triggered
698         dictionary popups. This is necessary since HotKey triggered ones want
699         to override the style to always be overlay.
700
701         * UIProcess/API/mac/PageClientImpl.mm:
702         (WebKit::PageClientImpl::didPerformDictionaryLookup):
703         Only force the overlay style for HotKey triggered dictionary lookups.
704
705         * WebProcess/WebPage/WebPage.h:
706         * WebProcess/WebPage/mac/WebPageMac.mm:
707         (WebKit::WebPage::performDictionaryLookupAtLocation):
708         (WebKit::WebPage::performDictionaryLookupForRange):
709         Factor out shared functionality into performDictionaryLookupForRange.
710
711         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
712         (WebKit::WebContextMenuClient::lookUpInDictionary):
713         Get selected range and call newly factored out performDictionaryLookupForRange.
714
715 2011-02-28  Anders Carlsson  <andersca@apple.com>
716
717         Reviewed by Dan Bernstein.
718
719         PDFViewController should hold a reference to the PDF data
720         https://bugs.webkit.org/show_bug.cgi?id=55394
721
722         * UIProcess/API/mac/PDFViewController.h:
723         * UIProcess/API/mac/PDFViewController.mm:
724         (WebKit::PDFViewController::setPDFDocumentData):
725
726 2011-02-28  Sam Weinig  <sam@webkit.org>
727
728         Reviewed by Darin Adler.
729
730         Size of text in popup menu doesn't match size of text in <select> itself in WebKit2
731         https://bugs.webkit.org/show_bug.cgi?id=48234
732
733         * Shared/TextInfo.cpp: Removed.
734         * Shared/TextInfo.h: Removed.
735         Replace this with the more appropriately DictionaryPopupInfo.
736
737         * Shared/DictionaryPopupInfo.cpp: Copied from Source/WebKit2/Shared/TextInfo.cpp.
738         (WebKit::DictionaryPopupInfo::encode):
739         (WebKit::DictionaryPopupInfo::decode):
740         * Shared/DictionaryPopupInfo.h: Copied from Source/WebKit2/Shared/TextInfo.h.
741         (WebKit::DictionaryPopupInfo::DictionaryPopupInfo):
742         Replace individual font related fields with FontInfo.
743
744         * Shared/FontInfo.cpp: Added.
745         (WebKit::FontInfo::FontInfo):
746         (WebKit::FontInfo::encode):
747         (WebKit::FontInfo::decode):
748         * Shared/FontInfo.h: Added.
749         Add class to encapsulate passing a font description over the wire.
750
751         * Shared/PlatformPopupMenuData.cpp:
752         (WebKit::PlatformPopupMenuData::encode):
753         (WebKit::PlatformPopupMenuData::decode):
754         * Shared/PlatformPopupMenuData.h:
755         Add FontInfo as extra data for the Mac.
756
757         * UIProcess/API/mac/PageClientImpl.h:
758         * UIProcess/API/mac/PageClientImpl.mm:
759         (WebKit::PageClientImpl::didPerformDictionaryLookup):
760         * UIProcess/PageClient.h:
761         Add scaleFactor and use it to construct a font at the right size.
762
763         * UIProcess/WebPageProxy.cpp:
764         (WebKit::WebPageProxy::showPopupMenu):
765         (WebKit::WebPageProxy::didPerformDictionaryLookup):
766         * UIProcess/WebPageProxy.h:
767         * UIProcess/WebPageProxy.messages.in:
768         * UIProcess/WebPopupMenuProxy.h:
769         * UIProcess/mac/WebPopupMenuProxyMac.h:
770         (WebKit::WebPopupMenuProxyMac::create):
771         * UIProcess/mac/WebPopupMenuProxyMac.mm:
772         (WebKit::WebPopupMenuProxyMac::WebPopupMenuProxyMac):
773         (WebKit::WebPopupMenuProxyMac::populate):
774         (WebKit::WebPopupMenuProxyMac::showPopupMenu):
775         * UIProcess/qt/WebPopupMenuProxyQt.cpp:
776         (WebKit::WebPopupMenuProxyQt::showPopupMenu):
777         * UIProcess/qt/WebPopupMenuProxyQt.h:
778         * UIProcess/win/WebPopupMenuProxyWin.cpp:
779         (WebKit::WebPopupMenuProxyWin::showPopupMenu):
780         * UIProcess/win/WebPopupMenuProxyWin.h:
781         * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
782         (WebKit::WebPopupMenu::setUpPlatformData):
783         * WebProcess/WebPage/mac/WebPageMac.mm:
784         (WebKit::WebPage::performDictionaryLookupAtLocation):
785         Pass scale factor through and rename TextInfo -> DictionaryPopupInfo.
786
787         * WebKit2.pro:
788         * WebKit2.xcodeproj/project.pbxproj:
789         * win/WebKit2.vcproj:
790         Add new files.
791
792 2011-02-28  Adam Roben  <aroben@apple.com>
793
794         One more rename as a followup to r79868
795
796         Rubber-stamped by Anders Carlsson.
797
798         * UIProcess/DrawingAreaProxyImpl.cpp:
799         * UIProcess/DrawingAreaProxyImpl.h:
800         Rename stateDidChange to backingStoreStateDidChange.
801
802 2011-02-28  Adam Roben  <aroben@apple.com>
803
804         Rename DrawingArea[Proxy]Impl's "state ID" concept to "backing store state ID"
805
806         Rubber-stamped (and suggested) by Anders Carlsson.
807
808         * UIProcess/DrawingAreaProxy.h:
809         * UIProcess/DrawingAreaProxy.messages.in:
810         * UIProcess/DrawingAreaProxyImpl.cpp:
811         * UIProcess/DrawingAreaProxyImpl.h:
812         * WebProcess/WebPage/DrawingArea.h:
813         * WebProcess/WebPage/DrawingArea.messages.in:
814         * WebProcess/WebPage/DrawingAreaImpl.cpp:
815         * WebProcess/WebPage/DrawingAreaImpl.h:
816         Perform the rename.
817
818 2011-02-28  Adam Roben  <aroben@apple.com>
819
820         Decouple state changes from sending of UpdateState messages in DrawingAreaProxyImpl
821
822         The new DrawingAreaProxyImpl::stateDidChange function should be called whenever
823         DrawingAreaProxyImpl's state changes in a way that will require allocating a new backing
824         store. (Currently, this is just when the size changes.) This function will sometimes (but
825         not always, as when we're waiting for a DidUpdateState message) send an UpdateState message
826         to the web process. This means it's now possible for the state IDs sent in consecutive
827         UpdateState messages to increase by more than one, but that's OK.
828
829         This should cause no change in behavior.
830
831         Fixes <http://webkit.org/b/55382> DrawingAreaProxyImpl's state ID should be updated whenever
832         its state changes, not just when we send an UpdateState message
833
834         Reviewed by Anders Carlsson.
835
836         * UIProcess/DrawingAreaProxyImpl.cpp:
837         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Updated for rename.
838         (WebKit::DrawingAreaProxyImpl::sizeDidChange): Changed to call stateDidChange.
839         (WebKit::DrawingAreaProxyImpl::didUpdateState): Updated for rename, and changed to call
840         sendUpdateState whenever our state has changed for any reason since the last UpdateState
841         message was sent.
842         (WebKit::DrawingAreaProxyImpl::stateDidChange): Added. Increments m_nextStateID and calls
843         through to sendUpdateState.
844         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Updated for rename, moved incrementing of
845         the state ID we send to the web process from here to stateDidChange, and added an assertion.
846
847         * UIProcess/DrawingAreaProxyImpl.h: Renamed m_requestedStateID to m_nextStateID, and updated
848         the comment explaining its meaning.
849
850 2011-02-28  Adam Roben  <aroben@apple.com>
851
852         Pass the right dirty rect to Plugin::paint
853
854         A typo in r79040 broke this. Much of this patch is just support for testing the fix.
855
856         Fixes <http://webkit.org/b/55365> <rdar://problem/9031089> REGRESSION (r79040): WebKit2:
857         Large portions of pages with plugins paint black
858
859         Reviewed by Anders Carlsson.
860
861         * WebProcess/Plugins/PluginView.cpp:
862         (WebKit::PluginView::paint): Pass the dirty rect we calculated earlier to Plugin::paint,
863         rather than just passing along the dirty rect that was passed into this function. This is
864         the bug fix.
865
866         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
867         (WKBundlePageForceRepaint):
868         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
869         Added new SPI. Just calls through to WebPage::forceRepaintWithoutCallback.
870
871         * WebProcess/WebPage/WebPage.cpp:
872         (WebKit::WebPage::forceRepaintWithoutCallback): Moved code to force a repaint here...
873         (WebKit::WebPage::forceRepaint): ...from here.
874
875         * WebProcess/WebPage/WebPage.h: Added forceRepaintWithoutCallback.
876
877 2011-02-27  Sam Weinig  <sam@webkit.org>
878
879         Reviewed by Dan Bernstein.
880
881         Force dictionary popup to use overlay type
882         <rdar://problem/9052483>
883         https://bugs.webkit.org/show_bug.cgi?id=55337
884
885         * UIProcess/API/mac/PageClientImpl.mm:
886         (WebKit::PageClientImpl::didPerformDictionaryLookup): As this is only
887         used for the hot key version of the dictionary popup, force the overlay
888         style.
889
890 2011-02-27  Benjamin Poulain  <benjamin.poulain@nokia.com>
891
892         Reviewed by Kenneth Rohde Christiansen.
893
894         [Qt] [WK2] QGraphicsWKView::showContextMenu() should be public
895         https://bugs.webkit.org/show_bug.cgi?id=55330
896
897         Move QGraphicsWKView::showContextMenu() to the public API. Add documentation
898         on its use.
899
900         * UIProcess/API/qt/qgraphicswkview.cpp:
901         * UIProcess/API/qt/qgraphicswkview.h:
902
903 2011-02-27  Alejandro G. Castro  <alex@igalia.com>
904
905         Unreviewed, fixed GTK compilation after r79806.
906
907         * UIProcess/gtk/WebView.cpp:
908         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
909         * UIProcess/gtk/WebView.h:
910
911 2011-02-26  Anders Carlsson  <andersca@apple.com>
912
913         Reviewed by Dan Bernstein.
914
915         Asynchronous response to FramePolicyListener is not finishing the load
916         https://bugs.webkit.org/show_bug.cgi?id=55305
917         <rdar://problem/9044356>
918
919         Always initialize the receivedPolicyAction reply parameter.
920
921         * UIProcess/WebPageProxy.cpp:
922         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
923         (WebKit::WebPageProxy::decidePolicyForMIMEType):
924
925 2011-02-26  Anders Carlsson  <andersca@apple.com>
926
927         Reviewed by Sam Weinig.
928
929         DidFinishLoadingDataForCustomRepresentation should pass along the suggested filename
930         https://bugs.webkit.org/show_bug.cgi?id=55304
931
932         * UIProcess/API/mac/PDFViewController.h:
933         * UIProcess/API/mac/PDFViewController.mm:
934         (WebKit::PDFViewController::setPDFDocumentData):
935         * UIProcess/API/mac/PageClientImpl.h:
936         * UIProcess/API/mac/PageClientImpl.mm:
937         (WebKit::PageClientImpl::didFinishLoadingDataForCustomRepresentation):
938         * UIProcess/API/mac/WKView.mm:
939         (-[WKView _didFinishLoadingDataForCustomRepresentationWithSuggestedFilename:dataReference:CoreIPC::]):
940         * UIProcess/API/mac/WKViewInternal.h:
941         * UIProcess/API/qt/qwkpage.cpp:
942         (QWKPagePrivate::didFinishLoadingDataForCustomRepresentation):
943         * UIProcess/API/qt/qwkpage_p.h:
944         * UIProcess/PageClient.h:
945         * UIProcess/WebPageProxy.cpp:
946         (WebKit::WebPageProxy::didFinishLoadingDataForCustomRepresentation):
947         * UIProcess/WebPageProxy.h:
948         * UIProcess/WebPageProxy.messages.in:
949         * UIProcess/win/WebView.cpp:
950         (WebKit::WebView::didFinishLoadingDataForCustomRepresentation):
951         * UIProcess/win/WebView.h:
952         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
953         (WebKit::WebFrameLoaderClient::finishedLoading):
954
955 2011-02-26  Anders Carlsson  <andersca@apple.com>
956
957         Reviewed by Oliver Hunt.
958
959         DrawingArea should not be reference counted
960         https://bugs.webkit.org/show_bug.cgi?id=55284
961
962         * Shared/DrawingAreaInfo.h:
963         * Shared/WebPageCreationParameters.cpp:
964         (WebKit::WebPageCreationParameters::encode):
965         (WebKit::WebPageCreationParameters::decode):
966         * Shared/WebPageCreationParameters.h:
967         * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp:
968         (WebKit::ChunkedUpdateDrawingAreaProxy::ChunkedUpdateDrawingAreaProxy):
969         (WebKit::ChunkedUpdateDrawingAreaProxy::setPageIsVisible):
970         (WebKit::ChunkedUpdateDrawingAreaProxy::update):
971         (WebKit::ChunkedUpdateDrawingAreaProxy::sendSetSize):
972         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
973         * UIProcess/DrawingAreaProxy.cpp:
974         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
975         * UIProcess/DrawingAreaProxy.h:
976         (WebKit::DrawingAreaProxy::type):
977         * UIProcess/DrawingAreaProxyImpl.cpp:
978         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
979         * UIProcess/DrawingAreaProxyImpl.h:
980         * UIProcess/TiledDrawingAreaProxy.cpp:
981         (WebKit::TiledDrawingAreaProxy::TiledDrawingAreaProxy):
982         * UIProcess/TiledDrawingAreaProxy.h:
983         * UIProcess/WebPageProxy.cpp:
984         (WebKit::WebPageProxy::didReceiveSyncMessage):
985         (WebKit::WebPageProxy::creationParameters):
986         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
987         * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp:
988         (WebKit::ChunkedUpdateDrawingArea::ChunkedUpdateDrawingArea):
989         (WebKit::ChunkedUpdateDrawingArea::display):
990         (WebKit::ChunkedUpdateDrawingArea::setSize):
991         (WebKit::ChunkedUpdateDrawingArea::didReceiveMessage):
992         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
993         * WebProcess/WebPage/DrawingArea.cpp:
994         (WebKit::DrawingArea::create):
995         (WebKit::DrawingArea::DrawingArea):
996         * WebProcess/WebPage/DrawingArea.h:
997         * WebProcess/WebPage/DrawingAreaImpl.cpp:
998         (WebKit::DrawingAreaImpl::create):
999         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1000         * WebProcess/WebPage/DrawingAreaImpl.h:
1001         * WebProcess/WebPage/TiledDrawingArea.cpp:
1002         (WebKit::TiledDrawingArea::TiledDrawingArea):
1003         * WebProcess/WebPage/TiledDrawingArea.h:
1004         * WebProcess/WebPage/WebPage.cpp:
1005         (WebKit::WebPage::drawRect):
1006         * WebProcess/WebPage/WebPage.h:
1007
1008 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
1009
1010         Reviewed by Pavel Feldman.
1011
1012         DumpRenderTree should reset frame opener between tests.
1013         https://bugs.webkit.org/show_bug.cgi?id=54874
1014
1015         Added clearOpener method to WKBundleWebFramePrivate.
1016
1017         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1018         (WKBundleFrameClearOpener):
1019         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1020
1021 2011-02-26  Yael Aharon  <yael.aharon@nokia.com>
1022
1023         Reviewed by Andreas Kling.
1024
1025         [Qt] Fix the focus in MiniBrowser.
1026         https://bugs.webkit.org/show_bug.cgi?id=55288
1027
1028         Implement basic functionality for focus in QWKPagePrivate.
1029
1030         * UIProcess/API/qt/qwkpage.cpp:
1031         (QWKPagePrivate::isViewWindowActive):
1032         (QWKPagePrivate::isViewFocused):
1033         (QWKPagePrivate::isViewVisible):
1034
1035 2011-02-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1036
1037         Unreviewed, rolling out r79764.
1038         http://trac.webkit.org/changeset/79764
1039         https://bugs.webkit.org/show_bug.cgi?id=55295
1040
1041         "broke Chromium builds" (Requested by rniwa on #webkit).
1042
1043         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1044         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1045
1046 2011-02-26  Vsevolod Vlasov  <vsevik@chromium.org>
1047
1048         Reviewed by Pavel Feldman.
1049
1050         DumpRenderTree should reset frame opener between tests.
1051         https://bugs.webkit.org/show_bug.cgi?id=54874
1052
1053         Added clearOpener method to WKBundleWebFramePrivate.
1054
1055         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1056         (WKBundleFrameClearOpener):
1057         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1058
1059 2011-02-25  Anders Carlsson  <andersca@apple.com>
1060
1061         Reviewed by Darin Adler.
1062
1063         Plug-in process crashes when using GuardMalloc
1064         https://bugs.webkit.org/show_bug.cgi?id=55279
1065         <rdar://problem/9044618>
1066
1067         Update m_environmentPointer after copying the environment variables.
1068         
1069         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1070         (WebKit::EnvironmentVariables::copyEnvironmentVariables):
1071
1072 2011-02-25  Darin Adler  <darin@apple.com>
1073
1074         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1075         (WebKit::ProcessLauncher::launchProcess): Fixed backwards logic from last change.
1076
1077 2011-02-25  Darin Adler  <darin@apple.com>
1078
1079         Reviewed by Mark Rowe.
1080
1081         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1082         (WebKit::ProcessLauncher::launchProcess): Fixed performance problem in production
1083         builds by only setting DYLD_FRAMEWORK_PATH in engineering configurations.
1084
1085 2011-02-25  Darin Adler  <darin@apple.com>
1086
1087         Reviewed by Anders Carlsson.
1088
1089         <rdar://problem/8036034> WebKit2 should work even if DYLD_FRAMEWORK_PATH is not set
1090
1091         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
1092         (WebKit::EnvironmentVariables::~EnvironmentVariables): Use fastFree, not delete, on
1093         the strings here because they are allocated with fastMalloc, not new.
1094         (WebKit::EnvironmentVariables::set): Use const more.
1095         (WebKit::EnvironmentVariables::get): Ditto.
1096         (WebKit::EnvironmentVariables::appendValue): Ditto.
1097         (WebKit::EnvironmentVariables::valueIfVariableHasName): Ditto. Also fix mistake
1098         where this would match if the name matched only a prefix of the environment variable's
1099         name. We want to match the whole name, so we need to use memcmp, not strncmp.
1100         (WebKit::EnvironmentVariables::createStringForVariable): Use const more.
1101         (WebKit::ProcessLauncher::launchProcess): Use clearer name, frameworkExecutablePath,
1102         for what was called bundlePath before. Append the frameworks path to DYLD_FRAMEWORK_PATH,
1103         ensuring we can pick up other frameworks from the same directory in the web process.
1104         Use a const_cast instead of a C-style cast.
1105
1106 2011-02-25  Chris Fleizach  <cfleizach@apple.com>
1107
1108         Reviewed by Anders Carlsson.
1109
1110         AX: WK2: AXApplication not returning the AXFocusedUIElement within the web area
1111         https://bugs.webkit.org/show_bug.cgi?id=55277
1112
1113         * UIProcess/API/mac/WKView.mm:
1114         (-[WKView accessibilityFocusedUIElement]):
1115
1116 2011-02-25  Alexey Proskuryakov  <ap@apple.com>
1117
1118         Reviewed by Anders Carlsson.
1119
1120         https://bugs.webkit.org/show_bug.cgi?id=55276
1121         WebPage::close() accesses "this" after it is destroyed.
1122
1123         This was making many tests crash with GuardMalloc.
1124
1125         * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): Access "this" before it can be
1126         destroyed, not after.
1127
1128 2011-02-25  Balazs Kelemen  <kbalazs@webkit.org>
1129
1130         Unreviewed.
1131         Add missing sources to WebKit2API.pri.
1132
1133         * WebKit2API.pri:
1134
1135 2011-02-25  Anders Carlsson  <andersca@apple.com>
1136
1137         Reviewed by Darin Adler.
1138
1139         A WKView without a window will cause CG errors in the console
1140         https://bugs.webkit.org/show_bug.cgi?id=55264
1141         <rdar://problem/9044281>
1142
1143         Check that the window has a valid window number before trying to get its graphics context.
1144
1145         * UIProcess/API/mac/PageClientImpl.mm:
1146         (WebKit::PageClientImpl::containingWindowGraphicsContext):
1147
1148 2011-02-25  Brian Weinstein  <bweinstein@apple.com>
1149
1150         Reviewed by Brady Eidson and looked over by Jessie Berlin.
1151
1152         WebKit2: Need a way to manage cookies from the web process
1153         https://bugs.webkit.org/show_bug.cgi?id=55086
1154         
1155         Call through to WebCore::CookieJar in our WebCookieManager functions.
1156
1157         * WebProcess/Cookies/WebCookieManager.cpp:
1158         (WebKit::WebCookieManager::getHostnamesWithCookies):
1159         (WebKit::WebCookieManager::deleteCookiesForHostname):
1160         (WebKit::WebCookieManager::deleteAllCookies):
1161
1162 2011-02-25  Anders Carlsson  <andersca@apple.com>
1163
1164         Reviewed by Sam Weinig.
1165
1166         Option-clicking on links doesn't download them due to sandbox violation
1167         https://bugs.webkit.org/show_bug.cgi?id=55250
1168         <rdar://problem/9018359>
1169
1170         The change to make DecidePolicyForNavigationAction sync didn't handle the case when the
1171         decided policy was "Download". Fix this by passing along the download ID back to the web process.
1172
1173         * Platform/CoreIPC/HandleMessage.h:
1174         (CoreIPC::callMemberFunction):
1175         Add new overload.
1176
1177         * UIProcess/WebPageProxy.cpp:
1178         (WebKit::WebPageProxy::WebPageProxy):
1179         Initialize m_syncNavigationActionPolicyDownloadID.
1180
1181         (WebKit::WebPageProxy::receivedPolicyDecision):
1182         Set m_syncNavigationActionPolicyDownloadID to the download ID.
1183
1184         (WebKit::WebPageProxy::decidePolicyForNavigationAction):
1185         Return the m_syncNavigationActionPolicyDownloadID.
1186
1187         * UIProcess/WebPageProxy.h:
1188         * UIProcess/WebPageProxy.messages.in:
1189         Add a DownloadID reply parameter.
1190
1191         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1192         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
1193         Don't pass a zero download ID to didReceivePolicyDecision.
1194
1195 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1196
1197         Reviewed by Martin Robinson.
1198
1199         [GTK] Implement WebContext and NativeKeyboardEvent classes for WebKit2
1200         https://bugs.webkit.org/show_bug.cgi?id=48510
1201
1202         * GNUmakefile.am:
1203         * Shared/NativeWebKeyboardEvent.h: Added the GTK event attribute
1204         and constructors, in our case we need it because we use a pointer
1205         and copy the event.
1206         (WebKit::NativeWebKeyboardEvent::nativeEvent):
1207         * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Added.
1208         (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): We need
1209         to copy the event in the constructor to avoid two references to
1210         the same event.
1211         * Shared/gtk/WebEventFactory.cpp: Changed the prototype of the
1212         functions to add const, we need it for the NativeWebKeyboardEvent
1213         constructor.
1214         (WebKit::modifiersForEvent):
1215         (WebKit::WebEventFactory::createWebKeyboardEvent):
1216         * UIProcess/gtk/WebContextGtk.cpp: Added. Stubbed implementation
1217         for GTK port. Yet to implement.
1218         (WebKit::WebContext::applicationCacheDirectory):
1219         (WebKit::WebContext::platformInitializeWebProcess):
1220         (WebKit::WebContext::platformDefaultDatabaseDirectory):
1221         * UIProcess/gtk/WebView.cpp:
1222         (WebKit::WebView::handleKeyboardEvent):
1223
1224 2011-02-25  Anders Carlsson  <andersca@apple.com>
1225
1226         Reviewed by Sam Weinig.
1227
1228         Get rid of more old accelerated compositing code
1229         https://bugs.webkit.org/show_bug.cgi?id=55235
1230
1231         * Shared/CoreIPCSupport/DrawingAreaProxyMessageKinds.h:
1232         * UIProcess/ChunkedUpdateDrawingAreaProxy.h:
1233         * UIProcess/DrawingAreaProxy.h:
1234         * UIProcess/DrawingAreaProxyImpl.cpp:
1235         * UIProcess/DrawingAreaProxyImpl.h:
1236         * WebProcess/WebPage/ChunkedUpdateDrawingArea.h:
1237         * WebProcess/WebPage/DrawingArea.h:
1238         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1239         * WebProcess/WebPage/DrawingAreaImpl.h:
1240
1241 2011-02-25  Andras Becsi  <abecsi@webkit.org>
1242
1243         Reviewed by Csaba Osztrogonác.
1244
1245         [Qt] Make the WebKit2 build system less confusing for non-Qt developers
1246         https://bugs.webkit.org/show_bug.cgi?id=55213
1247
1248         * WebKit2API.pri: Added.
1249
1250 2011-02-25  Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1251
1252         Reviewed by Martin Robinson.
1253
1254         [GTK] Implement WebView and WebKitWebView classes for WebKit2
1255         https://bugs.webkit.org/show_bug.cgi?id=48509
1256
1257         * GNUmakefile.am:
1258         * UIProcess/API/C/gtk/WKView.cpp:
1259         * UIProcess/API/C/gtk/WKView.h: Removed gdkrectangle from
1260         constructor.
1261         * UIProcess/gtk/WebViewWidget.cpp: Added. The GObject interface
1262         for WebView. The GObject is the GtkWidget handle which is used by
1263         WebView class for GTK port.
1264         * UIProcess/gtk/WebViewWidget.h: Added. The GObject interface
1265         declarations for GtkWidget handle for GTK port.
1266         * UIProcess/gtk/WebView.cpp: Added. The native GtkWidget handle
1267         for GTK port which is associated with each WKViewRef.
1268         * UIProcess/gtk/WebView.h: Added. Class which implements the
1269         PageClient interface. It is a wrapper over the native GtkWidget
1270         handle associated with each WKViewRef for GTK port.
1271
1272 2011-02-25  Alejandro G. Castro  <alex@igalia.com>
1273
1274         Fix GTK compilation after r79654.
1275
1276         * GNUmakefile.am:
1277
1278 2011-02-24  Brian Weinstein  <bweinstein@apple.com>
1279
1280         Qt build fix.
1281
1282         * WebKit2.pri:
1283
1284 2011-02-24  Brady Eidson  <beidson@apple.com>
1285
1286         Reviewed by Sam Weinig and looked over by Brian Weinstein.
1287
1288         Part of <rdar://problem/8762095> and https://bugs.webkit.org/show_bug.cgi?id=55172
1289         Need WebKit2 API to view/manage origins with LocalStorage.
1290
1291         Project file stuff:
1292         * GNUmakefile.am:
1293         * WebKit2.pri:
1294         * WebKit2.pro:
1295         * WebKit2.xcodeproj/project.pbxproj:
1296         * win/WebKit2.vcproj:
1297         * win/WebKit2Common.vsprops:
1298         * win/WebKit2Generated.make:
1299
1300         WK2 derived sources and API stuff:
1301         * DerivedSources.make:
1302         * DerivedSources.pro:
1303         * Platform/CoreIPC/MessageID.h:
1304         * Shared/API/c/WKBase.h:
1305         * Shared/APIObject.h:
1306         * UIProcess/API/C/WKAPICast.h:
1307
1308         Add an KeyValueStorageManager to the context and invalidate it at the appropriate times:
1309         * UIProcess/WebContext.cpp:
1310         (WebKit::WebContext::WebContext):
1311         (WebKit::WebContext::~WebContext):
1312         (WebKit::WebContext::disconnectProcess):
1313         (WebKit::WebContext::didReceiveMessage):
1314         * UIProcess/WebContext.h:
1315         (WebKit::WebContext::keyValueStorageManagerProxy):
1316
1317         Add API to get the KeyValueStorageManager for a context:
1318         * UIProcess/API/C/WKContext.cpp:
1319         (WKContextGetKeyValueStorageManager):
1320         * UIProcess/API/C/WKContext.h:
1321
1322         Route messages to the right place:
1323         * UIProcess/WebProcessProxy.cpp:
1324         (WebKit::WebProcessProxy::didReceiveMessage):
1325         * WebProcess/WebProcess.cpp:
1326         (WebKit::WebProcess::didReceiveMessage):
1327
1328         Add the API object, which wraps to WebKeyValueStorageManagerProxy:
1329         * UIProcess/API/C/WKKeyValueStorageManager.cpp: Added.
1330         (WKKeyValueStorageManagerGetTypeID):
1331         (WKKeyValueStorageManagerGetKeyValueStorageOrigins):
1332         (WKKeyValueStorageManagerDeleteEntriesForOrigin):
1333         (WKKeyValueStorageManagerDeleteAllEntries):
1334         * UIProcess/API/C/WKKeyValueStorageManager.h: Added.
1335
1336         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
1337         * UIProcess/WebKeyValueStorageManagerProxy.cpp: Added.
1338         (WebKit::WebKeyValueStorageManagerProxy::create):
1339         (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy):
1340         (WebKit::WebKeyValueStorageManagerProxy::~WebKeyValueStorageManagerProxy):
1341         (WebKit::WebKeyValueStorageManagerProxy::invalidate):
1342         (WebKit::WebKeyValueStorageManagerProxy::didReceiveMessage):
1343         (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins):
1344         (WebKit::WebKeyValueStorageManagerProxy::didGetKeyValueStorageOrigins):
1345         (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin):
1346         (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries):
1347         * UIProcess/WebKeyValueStorageManagerProxy.h: Added.
1348         (WebKit::WebKeyValueStorageManagerProxy::clearContext):
1349         (WebKit::WebKeyValueStorageManagerProxy::type):
1350         * UIProcess/WebKeyValueStorageManagerProxy.messages.in: Added.
1351
1352         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
1353         * WebProcess/KeyValueStorage: Added.
1354         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Added.
1355         (WebKit::WebKeyValueStorageManager::shared):
1356         (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager):
1357         (WebKit::WebKeyValueStorageManager::didReceiveMessage):
1358         (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
1359         (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin):
1360         (WebKit::WebKeyValueStorageManager::deleteAllEntries):
1361         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Added.
1362         * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Added.
1363
1364 2011-02-24  Darin Adler  <darin@apple.com>
1365
1366         Reviewed by Anders Carlsson.
1367
1368         WebKit2: Image-based cursors do not work
1369         https://bugs.webkit.org/show_bug.cgi?id=55184
1370
1371         * Shared/ShareableBitmap.h: Added releaseData function
1372         declaration. This is only defined for CG, but we can declare
1373         it without defining it on non-CG platforms without causing problems.
1374
1375         * Shared/WebCoreArgumentCoders.cpp: Added.
1376         (CoreIPC::encodeImage): Added. For use in the Cursor argument coder.
1377         (CoreIPC::decodeImage): Ditto.
1378
1379         * Shared/WebCoreArgumentCoders.h: Added code to the Cursor encoder
1380         and decoder to handle image-based cursors, using the new encodeImage
1381         and decodeImage functions.
1382
1383         * Shared/cg/ShareableBitmapCG.cpp:
1384         (WebKit::ShareableBitmap::releaseData): Added.
1385         (WebKit::ShareableBitmap::createGraphicsContext): Use
1386         CGBitmapContextCreateWithData instead of CGBitmapContextCreate,
1387         to guarantee we outlast the CGBitmapContext we create.
1388         (WebKit::ShareableBitmap::paint): Got rid of unnneeded local variable.
1389
1390         * Shared/cg/WebCoreArgumentCodersCG.cpp: Added.
1391         (CoreIPC::createImage): Added. For use by CoreIPC::decodeImage.
1392
1393         * WebKit2.xcodeproj/project.pbxproj: Added WebCoreArgumentCoders.cpp
1394         and WebCoreArgumentCodersCG.cpp.
1395         * win/WebKit2.vcproj: Ditto.
1396
1397 2011-02-24  Anders Carlsson  <andersca@apple.com>
1398
1399         Reviewed by Dan Bernstein.
1400
1401         Crash when trying to send a sync message on an invalid connection
1402         https://bugs.webkit.org/show_bug.cgi?id=55190
1403         <rdar://problem/9035806>
1404
1405         * Platform/CoreIPC/Connection.cpp:
1406         (CoreIPC::Connection::sendSyncMessage):
1407         Don't try to call a client function if isValid() returns false since the client
1408         will be null in that case.
1409
1410 2011-02-24  Anders Carlsson  <andersca@apple.com>
1411
1412         Reviewed by Dan Bernstein.
1413
1414         Remove the layer backed drawing area
1415         https://bugs.webkit.org/show_bug.cgi?id=55174
1416
1417         * GNUmakefile.am:
1418         * Shared/DrawingAreaInfo.h:
1419         * UIProcess/API/mac/WKView.mm:
1420         * UIProcess/LayerBackedDrawingAreaProxy.cpp: Removed.
1421         * UIProcess/LayerBackedDrawingAreaProxy.h: Removed.
1422         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm: Removed.
1423         * UIProcess/win/LayerBackedDrawingAreaProxyWin.cpp: Removed.
1424         * UIProcess/win/WebView.cpp:
1425         * WebKit2.xcodeproj/project.pbxproj:
1426         * WebProcess/WebPage/DrawingArea.cpp:
1427         (WebKit::DrawingArea::create):
1428         * WebProcess/WebPage/LayerBackedDrawingArea.cpp: Removed.
1429         * WebProcess/WebPage/LayerBackedDrawingArea.h: Removed.
1430         * WebProcess/WebPage/mac/LayerBackedDrawingAreaMac.mm: Removed.
1431         * WebProcess/WebPage/win/LayerBackedDrawingAreaWin.cpp: Removed.
1432         * win/WebKit2.vcproj:
1433
1434 2011-02-24  Mike Thole  <mthole@apple.com>
1435
1436         Reviewed by Sam Weinig.
1437
1438         WK2: Add ability to get document node for a WKBundleNodeHandle
1439         https://bugs.webkit.org/post_bug.cgi
1440
1441         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
1442         (WKBundleNodeHandleCopyDocument):
1443         * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
1444         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
1445         (WebKit::InjectedBundleNodeHandle::document):
1446         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
1447
1448 2011-02-24  Brady Eidson  <beidson@apple.com>
1449
1450         Reviewed by Adam Roben and looked at by Brian Weinstein.
1451
1452         https://bugs.webkit.org/show_bug.cgi?id=55165
1453         Can call CF API with a null CFArray in WebResourceCacheManager
1454
1455         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
1456         (WebKit::WebResourceCacheManager::getCacheOrigins): cfURLCacheHostNames() can return a null CFArrayRef, 
1457           so the call to CFArrayGetCount must be null checked.
1458
1459 2011-02-24  Anders Carlsson  <andersca@apple.com>
1460
1461         Reviewed by Simon Fraser.
1462
1463         ASSERTION FAILED: !isInAcceleratedCompositingMode() when entering accelerated compositing early
1464         https://bugs.webkit.org/show_bug.cgi?id=55162
1465         <rdar://problem/9048523>
1466
1467         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1468         (WebKit::DrawingAreaImpl::updateState):
1469         Call setShouldNotifyAfterNextScheduledLayerFlush(false) so the web process process won't send an
1470         EnterAcceleratedCompositingMode message.
1471
1472         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1473         setShouldNotifyAfterNextScheduledLayerFlush now takes a boolean.
1474
1475         * WebProcess/WebPage/LayerTreeHost.h:
1476         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1477         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1478         (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
1479         Make this take a boolean.
1480
1481 2011-02-24  Peter Kasting  <pkasting@google.com>
1482
1483         Reviewed by Eric Seidel.
1484
1485         Drop the "U; " encryption level from the User Agent string.
1486         https://bugs.webkit.org/show_bug.cgi?id=54566
1487
1488         * UIProcess/gtk/WebPageProxyGtk.cpp:
1489         (WebKit::WebPageProxy::standardUserAgent):
1490         * UIProcess/mac/WebPageProxyMac.mm:
1491         (WebKit::WebPageProxy::standardUserAgent):
1492         * UIProcess/qt/WebPageProxyQt.cpp:
1493         (WebKit::WebPageProxy::standardUserAgent):
1494         * UIProcess/win/WebPageProxyWin.cpp:
1495         (WebKit::WebPageProxy::standardUserAgent):
1496
1497 2011-02-24  Andrew Wilson  <atwilson@chromium.org>
1498
1499         Unreviewed, rolling out r79570.
1500         http://trac.webkit.org/changeset/79570
1501         https://bugs.webkit.org/show_bug.cgi?id=54874
1502
1503         Breaks chromium build because glue/mocks/mock_web_frame.h/cc
1504         was not updated
1505
1506         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1507         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1508
1509 2011-02-23  Brian Weinstein  <bweinstein@apple.com>
1510
1511         Reviewed by Adam Roben and looked over by Jessie Berlin.
1512
1513         Part of WebKit2: Need a way to manage cookies from the web process
1514         https://bugs.webkit.org/show_bug.cgi?id=55086
1515         
1516         This patch adds the plumbing and classes that are needed to manage cookies from the web process.
1517         The functions that the API calls are currently stubs, but will be implemented in a follow-up patch.
1518
1519         Project file changes.
1520         * DerivedSources.make:
1521         * DerivedSources.pro:
1522         * GNUmakefile.am:
1523         * WebKit2.pri:
1524         * WebKit2.pro:
1525         * WebKit2.xcodeproj/project.pbxproj:
1526         * win/WebKit2.vcproj:
1527         * win/WebKit2Common.vsprops:
1528         * win/WebKit2Generated.make:
1529
1530         Add some needed plumbing for WebCookieManager{Proxy}.
1531         * Platform/CoreIPC/MessageID.h:
1532         * Shared/API/c/WKBase.h:
1533         * Shared/APIObject.h:
1534         * UIProcess/API/C/WKAPICast.h:
1535
1536         * UIProcess/API/C/WKContext.cpp:
1537         (WKContextGetCookieManager): Gets the cookie manager proxy.
1538         * UIProcess/API/C/WKContext.h:
1539         * UIProcess/API/C/WKCookieManager.cpp: Added.
1540         (WKCookieManagerGetTypeID):
1541         (WKCookieManagerGetHostnamesWithCookies): Calls through to WebCookieManagerProxy.
1542         (WKCookieManagerDeleteCookiesForHostname): Ditto.
1543         (WKCookieManagerDeleteAllCookies): Ditto.
1544         * UIProcess/API/C/WKCookieManager.h: Added.
1545
1546         * UIProcess/WebProcessProxy.cpp:
1547         (WebKit::WebProcessProxy::didReceiveMessage): Add a case for the cookie manager.
1548         * UIProcess/WebContext.cpp:
1549         (WebKit::WebContext::WebContext): Initialize the cookie manager.
1550         (WebKit::WebContext::~WebContext): Invalidate the cookie manager.
1551         (WebKit::WebContext::disconnectProcess): Ditto.
1552         (WebKit::WebContext::didReceiveMessage): Add a case for the cookie manager.
1553         * UIProcess/WebContext.h:
1554         (WebKit::WebContext::cookieManagerProxy): Returns the cookie manager.
1555         * WebProcess/WebProcess.cpp:
1556         (WebKit::WebProcess::didReceiveMessage): Add a case for the cookie manager.
1557
1558         * UIProcess/WebCookieManagerProxy.cpp: Added.
1559         (WebKit::WebCookieManagerProxy::create):
1560         (WebKit::WebCookieManagerProxy::WebCookieManagerProxy):
1561         (WebKit::WebCookieManagerProxy::~WebCookieManagerProxy):
1562         (WebKit::WebCookieManagerProxy::invalidate):
1563         (WebKit::WebCookieManagerProxy::didReceiveMessage): 
1564         (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Call through to the web process to get hostnames with cookies.
1565         (WebKit::WebCookieManagerProxy::didGetHostnamesWithCookies): Call the callback we were passed in getHostnamesWithCookies.
1566         (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Call through to the web process to delete cookies
1567             for the origin.
1568         (WebKit::WebCookieManagerProxy::deleteAllCookies): Call through to the web process to delete all cookies.
1569         * UIProcess/WebCookieManagerProxy.h: Added.
1570         (WebKit::WebCookieManagerProxy::clearContext):
1571         (WebKit::WebCookieManagerProxy::type):
1572         * UIProcess/WebCookieManagerProxy.messages.in: Added.
1573
1574         * WebProcess/Cookies: Added.
1575         * WebProcess/Cookies/WebCookieManager.cpp: Added.
1576         (WebKit::WebCookieManager::shared):
1577         (WebKit::WebCookieManager::WebCookieManager):
1578         (WebKit::WebCookieManager::didReceiveMessage): Call through to didReceiveWebCookieManagerMessage.
1579         (WebKit::WebCookieManager::getHostnamesWithCookies): Build an array from a HashSet (that isn't filled yet), and 
1580             convert that HashSet to a Vector to send to the UI process.
1581         (WebKit::WebCookieManager::deleteCookiesForHostname): Added a stub.
1582         (WebKit::WebCookieManager::deleteAllCookies): Ditto.
1583         * WebProcess/Cookies/WebCookieManager.h: Added.
1584         * WebProcess/Cookies/WebCookieManager.messages.in: Added.
1585
1586 2011-02-24   Amruth Raj  <amruthraj@motorola.com> and Ravi Phaneendra Kasibhatla  <ravi.kasibhatla@motorola.com> and Alejandro G. Castro  <alex@igalia.com>
1587
1588         Reviewed by Martin Robinson.
1589
1590         [GTK] Implement WebEventFactory, WebErrors classes for WebKit2
1591         https://bugs.webkit.org/show_bug.cgi?id=48510
1592
1593         * GNUmakefile.am:
1594         * Shared/gtk/WebEventFactory.cpp: Added. implementation for
1595         WebMouseEvent, WebWheelEvent, WebKeyboardEvent.
1596         * Shared/gtk/WebEventFactory.h: Added.
1597         * WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp: Added. Stubbed
1598         implementation for GTK port.
1599
1600 2011-02-24  Vsevolod Vlasov  <vsevik@chromium.org>
1601
1602         Reviewed by Alexey Proskuryakov.
1603
1604         DumpRenderTree should reset frame opener between tests.
1605         https://bugs.webkit.org/show_bug.cgi?id=54874
1606
1607         Added clearOpener method to WKBundleWebFramePrivate.
1608
1609         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
1610         (WKBundleFrameClearOpener):
1611         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
1612
1613 2011-02-24  Benjamin Poulain  <benjamin.poulain@nokia.com>
1614
1615         Reviewed by Eric Seidel.
1616
1617         Support building WebKit with Python 3
1618         https://bugs.webkit.org/show_bug.cgi?id=55038
1619
1620         Update the generator scripts to support Python 3.
1621
1622         * Scripts/generate-message-receiver.py: print is a function in Python 3, write the output to
1623         sys.stdout to be compatible with Python 2 and 3.
1624         * Scripts/generate-messages-header.py:
1625         * Scripts/webkit2/messages.py: dist.iteritems does not exist in Python 3, fallback
1626           to dict.items which is common to Python 2 and 3.
1627
1628 2011-02-24  Andras Becsi  <abecsi@webkit.org>
1629
1630         Reviewed by Laszlo Gombos.
1631
1632         [Qt] MinGW build fails to link
1633         https://bugs.webkit.org/show_bug.cgi?id=55050
1634
1635         Prepend the libraries of subcomponents instead of appending them
1636         to fix the library order according to the dependency of the libraries
1637
1638         * WebKit2.pri:
1639
1640 2011-02-24  Andras Becsi  <abecsi@webkit.org>
1641
1642         Reviewed by Csaba Osztrogonác.
1643
1644         [Qt] REGRESSION(69304): WKNativeEvent.h forwarding header is always regenerated
1645         https://bugs.webkit.org/show_bug.cgi?id=47589
1646
1647         In case of file name clashes only generate forwarding header for the current platform.
1648
1649         * Scripts/generate-forwarding-headers.pl:
1650
1651 2011-02-23  Anders Carlsson  <andersca@apple.com>
1652
1653         Reviewed by Sam Weinig.
1654
1655         Remove some of the old accelerated compositing code
1656         https://bugs.webkit.org/show_bug.cgi?id=55084
1657
1658         * UIProcess/API/mac/PageClientImpl.h:
1659         * UIProcess/API/mac/PageClientImpl.mm:
1660         (WebKit::PageClientImpl::exitAcceleratedCompositingMode):
1661         * UIProcess/API/mac/WKView.mm:
1662         * UIProcess/API/mac/WKViewInternal.h:
1663         * UIProcess/API/qt/qwkpage_p.h:
1664         * UIProcess/PageClient.h:
1665         * UIProcess/WebPageProxy.cpp:
1666         (WebKit::WebPageProxy::exitAcceleratedCompositingMode):
1667         * UIProcess/WebPageProxy.h:
1668         * UIProcess/WebPageProxy.messages.in:
1669         * UIProcess/mac/LayerBackedDrawingAreaProxyMac.mm:
1670         (WebKit::LayerBackedDrawingAreaProxy::attachCompositingContext):
1671         (WebKit::LayerBackedDrawingAreaProxy::detachCompositingContext):
1672         * UIProcess/win/WebView.cpp:
1673         * UIProcess/win/WebView.h:
1674         * WebProcess/WebPage/WebPage.cpp:
1675         (WebKit::WebPage::enterAcceleratedCompositingMode):
1676         (WebKit::WebPage::exitAcceleratedCompositingMode):
1677         * WebProcess/WebPage/WebPage.h:
1678
1679 2011-02-23  Enrica Casucci  <enrica@apple.com>
1680
1681         Reverting an unintentional change that was part of http://trac.webkit.org/changeset/79494.
1682         Unreviewed.
1683
1684         * WebProcess/WebPage/mac/WebPageMac.mm:
1685         (WebKit::WebPage::interceptEditingKeyboardEvent):
1686
1687 2011-02-18  Enrica Casucci  <enrica@apple.com>
1688
1689         Reviewed by Adam Roben.
1690
1691         Mac OS X Services are not available for selected text in WebKit2 windows.
1692         https://bugs.webkit.org/show_bug.cgi?id=54777
1693         <rdar://problem/8666428>
1694         
1695         This patch adds support for Mac OS X Services in WebKit2 windows.
1696         In WKView we now call registerServicesMenuSendTypes providing the
1697         pasteboard types supported by WebKit and we also implement the two
1698         protocol methods required to validate the send type and write the
1699         content to the pasteboard. Unfortunately, AppKit expects the content
1700         to be available in the pasteboard upon return from writeSelectionToPasteboard and
1701         this is the reason why the call to the WebProcess is synchronous.
1702
1703         * Shared/SelectionState.h:
1704         (WebKit::SelectionState::SelectionState): Extended to include
1705         isContentRichlyEditable
1706         * Shared/mac/PasteboardTypes.h:
1707         * Shared/mac/PasteboardTypes.mm:
1708         (WebKit::PasteboardTypes::forSelection): Added.
1709         * UIProcess/API/mac/WKView.mm:
1710         (-[WKView initWithFrame:contextRef:pageGroupRef:]): Added call
1711         to registerServicesMenuSendTypes.
1712         (-[WKView writeSelectionToPasteboard:types:]): Added.
1713         (-[WKView validRequestorForSendType:returnType:]): Added.
1714         * UIProcess/WebPageProxy.cpp:
1715         (WebKit::WebPageProxy::writeSelectionToPasteboard):
1716         * UIProcess/WebPageProxy.h:
1717         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
1718         (WebKit::WebEditorClient::respondToChangedSelection): Modified to
1719         support the new SelectionState value.
1720         * WebProcess/WebPage/WebPage.h:
1721         * WebProcess/WebPage/WebPage.messages.in:
1722         * WebProcess/WebPage/mac/WebPageMac.mm:
1723         (WebKit::WebPage::writeSelectionToPasteboard): Added synchronous
1724         message to write the selected content to the pasteboard.
1725
1726 2011-02-23  Anders Carlsson  <andersca@apple.com>
1727
1728         Reviewed by Sam Weinig.
1729
1730         Add a ShareableBitmap::create overload that takes an existing SharedMemory object
1731         https://bugs.webkit.org/show_bug.cgi?id=55081
1732
1733         * Shared/ShareableBitmap.cpp:
1734         (WebKit::ShareableBitmap::createShareable):
1735         (WebKit::ShareableBitmap::create):
1736         * Shared/ShareableBitmap.h:
1737
1738 2011-02-23  Anders Carlsson  <andersca@apple.com>
1739
1740         Reviewed by Dan Bernstein.
1741
1742         Web Inspector toolbar looks bad in WebKit2
1743         https://bugs.webkit.org/show_bug.cgi?id=55076
1744         <rdar://problem/8866258>
1745
1746         * UIProcess/API/mac/WKView.mm:
1747         (-[WKView mouseDownCanMoveWindow]):
1748         Return NO from mouseDownCanMoveWindow to prevent drags in the (now transparent) inspector WKView
1749         from dragging the window around.
1750
1751         * UIProcess/mac/WebInspectorProxyMac.mm:
1752         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
1753         Call [WKView setDrawsBackground:NO].
1754
1755 2011-02-23  Sam Weinig  <sam@webkit.org>
1756
1757         Reviewed by Anders Carlsson.
1758
1759         Remove WKPageForceRepaintWithInvalidation and instead make WKPageForceRepaint
1760         always dirty the entire page.
1761
1762         * Shared/ForceRepaintFlags.h: Removed.
1763         * UIProcess/API/C/WKPage.cpp:
1764         (WKPageForceRepaint):
1765         * UIProcess/API/C/WKPage.h:
1766         * UIProcess/WebPageProxy.cpp:
1767         (WebKit::WebPageProxy::forceRepaint):
1768         * UIProcess/WebPageProxy.h:
1769         * WebKit2.pro:
1770         * WebKit2.xcodeproj/project.pbxproj:
1771         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1772         (WebKit::DrawingAreaImpl::forceRepaint):
1773         * WebProcess/WebPage/WebPage.cpp:
1774         (WebKit::WebPage::forceRepaint):
1775         * WebProcess/WebPage/WebPage.h:
1776         * WebProcess/WebPage/WebPage.messages.in:
1777         * win/WebKit2.vcproj:
1778
1779 2011-02-23  Anders Carlsson  <andersca@apple.com>
1780
1781         Reviewed by Sam Weinig.
1782
1783         Race condition when creating and destroying pages quickly
1784         https://bugs.webkit.org/show_bug.cgi?id=55061
1785         <rdar://problem/8708435>
1786
1787         When the last page in a web process is closed, the web process would
1788         previously terminate, even if the UI process had created a new page
1789         (the CreateNewPage message just wouldn't have reached the web process yet).
1790
1791         Fix this by adding a ShouldTerminate message that the web process sends when it's
1792         about to terminate. If the UI process has any pending pages, downloads etc. it will
1793         prevent the web process from terminating. Otherwise, it will immmediately disconnect
1794         the WebPageProxy so that creating a page after that will launch a new web process.
1795
1796         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
1797         (WebKit::WebPluginSiteDataManager::shouldTerminate):
1798         * UIProcess/Plugins/WebPluginSiteDataManager.h:
1799         * UIProcess/WebContext.cpp:
1800         (WebKit::WebContext::shouldTerminate):
1801         (WebKit::WebContext::disconnectProcess):
1802         * UIProcess/WebContext.h:
1803         * UIProcess/WebProcessProxy.cpp:
1804         (WebKit::WebProcessProxy::disconnect):
1805         (WebKit::WebProcessProxy::didReceiveSyncMessage):
1806         (WebKit::WebProcessProxy::didClose):
1807         (WebKit::WebProcessProxy::shouldTerminate):
1808         * UIProcess/WebProcessProxy.h:
1809         * UIProcess/WebProcessProxy.messages.in:
1810         * WebProcess/WebProcess.cpp:
1811         (WebKit::WebProcess::terminateIfPossible):
1812
1813 2011-02-23  Mike Thole  <mthole@apple.com>
1814
1815         Reviewed by Darin Adler.
1816
1817         WKBundleNavigationAction.h should be exposed as a public header
1818         https://bugs.webkit.org/show_bug.cgi?id=55059
1819
1820         * WebKit2.xcodeproj/project.pbxproj:
1821         Changed WKBundleNavigationAction.h from 'project' to 'public'.
1822
1823 2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
1824
1825         Reviewed by Laszlo Gombos.
1826
1827         [Qt] Make sure Symbian binary UIDs are unique
1828
1829         * WebProcess.pro: Resolve the UID collision with QtTestBrowser.pro
1830         by changing the UID.
1831
1832 2011-02-23  Siddharth Mathur  <siddharth.mathur@nokia.com>
1833
1834         Reviewed by Laszlo Gombos.
1835
1836         [Qt] Fix the Symbian build after r79334
1837         https://bugs.webkit.org/show_bug.cgi?id=55044
1838
1839         * WebKit2.pri: Copy the rules from JavaScriptCore.pri for
1840         defineTest().
1841
1842         Remove addWebKit2LibWholeArchive as it is no longer needed.
1843
1844 2011-02-23  Alejandro G. Castro  <alex@igalia.com>
1845
1846         Unreviewed, fixed GTK WebKit2 compilation after r79366.
1847
1848         * GNUmakefile.am:
1849
1850 2011-02-23  Patrick Gansterer  <paroga@webkit.org>
1851
1852         Reviewed by Darin Adler.
1853
1854         Rename PLATFORM(CF) to USE(CF)
1855         https://bugs.webkit.org/show_bug.cgi?id=53540
1856
1857         * UIProcess/WebBackForwardList.h:
1858         * UIProcess/WebPageProxy.cpp:
1859         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1860         (WebKit::formatLocalizedString):
1861
1862 2011-02-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
1863
1864         Reviewed by Andreas Kling.
1865
1866         [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
1867         https://bugs.webkit.org/show_bug.cgi?id=54996
1868
1869         Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
1870         is empty/contain only disabled elements.
1871
1872         * UIProcess/API/qt/qgraphicswkview.cpp:
1873         (QGraphicsWKView::showContextMenu):
1874         * UIProcess/qt/WebContextMenuProxyQt.cpp:
1875         (WebKit::WebContextMenuProxyQt::showContextMenu):
1876
1877 2011-02-22  Dan Bernstein  <mitz@apple.com>
1878
1879         LLVM Compiler build fix.
1880
1881         * Scripts/webkit2/messages.py:
1882         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
1883
1884 2011-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
1885
1886         Reviewed by Alexey Proskuryakov.
1887
1888         Drop the language tag part from the User Agent string
1889         https://bugs.webkit.org/show_bug.cgi?id=54560
1890
1891         * UIProcess/gtk/WebPageProxyGtk.cpp:
1892         (WebKit::WebPageProxy::standardUserAgent):
1893
1894         * UIProcess/mac/WebPageProxyMac.mm:
1895         (WebKit::WebPageProxy::standardUserAgent):
1896
1897         * UIProcess/qt/WebPageProxyQt.cpp:
1898         (WebKit::WebPageProxy::standardUserAgent):
1899
1900         * UIProcess/win/WebPageProxyWin.cpp:
1901         (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
1902         part and fix style.
1903
1904 2011-02-22  Sam Weinig  <sam@webkit.org>
1905
1906         Reviewed by Anders Carlsson.
1907
1908         Add WebKit2 API to force a repaint with an invalidation
1909         https://bugs.webkit.org/show_bug.cgi?id=55015
1910
1911         * Shared/ForceRepaintFlags.h: Added.
1912         * UIProcess/API/C/WKPage.cpp:
1913         (WKPageForceRepaint):
1914         (WKPageForceRepaintWithInvalidation):
1915         * UIProcess/API/C/WKPage.h:
1916         Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
1917         but also calls setNeedsDisplay on the entire bounds of the page.
1918
1919         * UIProcess/WebPageProxy.cpp:
1920         (WebKit::WebPageProxy::forceRepaint):
1921         * UIProcess/WebPageProxy.h:
1922         * WebProcess/WebPage/WebPage.cpp:
1923         (WebKit::WebPage::forceRepaint):
1924         * WebProcess/WebPage/WebPage.h:
1925         * WebProcess/WebPage/WebPage.messages.in:
1926         Pipe the flag down to the WebProcess.
1927
1928         * WebKit2.pro:
1929         * WebKit2.xcodeproj/project.pbxproj:
1930         * win/WebKit2.vcproj:
1931         Add ForceRepaintFlags.h.
1932
1933 2011-02-22  Simon Fraser  <simon.fraser@apple.com>
1934
1935         Reviewed by Dan Bernstein.
1936
1937         <rdar://problem/9039670>
1938         
1939         Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
1940         non-composited content layer if the preference is set.
1941
1942         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1943         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1944
1945 2011-02-22  Brady Eidson  <beidson@apple.com>
1946
1947         Fix it Windows-style.
1948
1949         * WebProcess/WebProcess.cpp:
1950         (WebKit::WebProcess::getSitesWithPluginData):
1951         (WebKit::WebProcess::clearPluginSiteData):
1952
1953 2011-02-22  Anders Carlsson  <andersca@apple.com>
1954
1955         Reviewed by Dan Bernstein.
1956
1957         Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
1958         https://bugs.webkit.org/show_bug.cgi?id=55008
1959
1960         * WebProcess/Downloads/DownloadManager.cpp:
1961         (WebKit::DownloadManager::downloadFinished):
1962         * WebProcess/WebProcess.cpp:
1963         (WebKit::WebProcess::removeWebPage):
1964         (WebKit::WebProcess::terminateIfPossible):
1965         (WebKit::WebProcess::getSitesWithPluginData):
1966         * WebProcess/WebProcess.h:
1967         * WebProcess/gtk/WebProcessGtk.cpp:
1968         (WebKit::WebProcess::platformTerminate):
1969         * WebProcess/mac/WebProcessMac.mm:
1970         (WebKit::WebProcess::platformTerminate):
1971         * WebProcess/qt/WebProcessQt.cpp:
1972         (WebKit::WebProcess::platformTerminate):
1973         * WebProcess/win/WebProcessWin.cpp:
1974         (WebKit::WebProcess::platformTerminate):
1975
1976 2011-02-22  Brady Eidson  <beidson@apple.com>
1977
1978         Windows build-fix attempt.
1979
1980         * win/WebKit2Generated.make:
1981
1982 2011-02-22  Csaba Osztrogonác  <ossy@webkit.org>
1983
1984         Unreviewed.
1985
1986         <rdar://problem/8762042> and  https://bugs.webkit.org/show_bug.cgi?id=54514
1987         API to view and delete Application Cache data by origin.
1988
1989         [Qt][WK2] Buildfix after r79364.
1990
1991         * DerivedSources.pro:
1992         * WebKit2.pri:
1993
1994 2011-02-22  Brady Eidson  <beidson@apple.com>
1995
1996         Reviewed by Anders Carlsson and looked over by Brian Weinstein.
1997
1998         <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
1999         API to view and delete Application Cache data by origin.
2000
2001         I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
2002         it's sorting was wrong due to a last minute name change.
2003
2004         Project file changes:
2005         * GNUmakefile.am:
2006         * win/WebKit2.vcproj:
2007         * win/WebKit2Common.vsprops:
2008         * win/WebKit2Generated.make:
2009         * WebKit2.pro:
2010         * WebKit2.xcodeproj/project.pbxproj:
2011
2012         WK2 build-system and API paperwork:
2013         * DerivedSources.make:
2014         * Platform/CoreIPC/MessageID.h:
2015         * Shared/API/c/WKBase.h:
2016         * Shared/APIObject.h:
2017         * UIProcess/API/C/WKAPICast.h:
2018
2019         Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
2020         * Shared/SecurityOriginData.cpp:
2021         (WebKit::performAPICallbackWithSecurityOriginDataVector):
2022         * Shared/SecurityOriginData.h:
2023         * UIProcess/WebResourceCacheManagerProxy.cpp:
2024         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2025
2026         Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
2027         * UIProcess/WebContext.cpp:
2028         (WebKit::WebContext::WebContext):
2029         (WebKit::WebContext::~WebContext):
2030         (WebKit::WebContext::processDidClose):
2031         (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
2032         * UIProcess/WebContext.h:
2033         (WebKit::WebContext::applicationCacheManagerProxy):
2034         (WebKit::WebContext::resourceCacheManagerProxy):
2035
2036         Add API to get the ApplicationCacheManager for a context:
2037         * UIProcess/API/C/WKContext.cpp:
2038         (WKContextGetApplicationCacheManager):
2039         (WKContextGetResourceCacheManager):
2040         * UIProcess/API/C/WKContext.h:
2041
2042         Route messages to the right place:
2043         * UIProcess/WebProcessProxy.cpp:
2044         (WebKit::WebProcessProxy::didReceiveMessage):
2045         * WebProcess/WebProcess.cpp:
2046         (WebKit::WebProcess::didReceiveMessage):
2047
2048         Add the API object, which wraps to WebApplicationCacheManagerProxy:
2049         * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
2050         (WKApplicationCacheManagerGetTypeID):
2051         (WKApplicationCacheManagerGetApplicationCacheOrigins):
2052         (WKApplicationCacheManagerDeleteEntriesForOrigin):
2053         (WKApplicationCacheManagerDeleteAllEntries):
2054         * UIProcess/API/C/WKApplicationCacheManager.h: Added.
2055
2056         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
2057         * UIProcess/WebApplicationCacheManagerProxy.cpp: Added.
2058         (WebKit::WebApplicationCacheManagerProxy::create):
2059         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
2060         (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy):
2061         (WebKit::WebApplicationCacheManagerProxy::invalidate):
2062         (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
2063         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
2064         (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
2065         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
2066         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
2067         * UIProcess/WebApplicationCacheManagerProxy.h: Added.
2068         (WebKit::WebApplicationCacheManagerProxy::clearContext):
2069         (WebKit::WebApplicationCacheManagerProxy::type):
2070         * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added.
2071
2072         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
2073         * WebProcess/ApplicationCache: Added.
2074         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added.
2075         (WebKit::WebApplicationCacheManager::shared):
2076         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
2077         (WebKit::WebApplicationCacheManager::didReceiveMessage):
2078         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
2079         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
2080         (WebKit::WebApplicationCacheManager::deleteAllEntries):
2081         * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added.
2082         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added.
2083
2084 2011-02-22  Anders Carlsson  <andersca@apple.com>
2085
2086         Reviewed by Sam Weinig.
2087
2088         Get rid of WebProcessManager
2089         https://bugs.webkit.org/show_bug.cgi?id=55001
2090
2091         WebProcessManager had become a stupid map of WebContext > WebProcess relations,
2092         which isn't really useful since the WebContext already knows about its process.
2093
2094         * Shared/WebURLRequest.cpp:
2095         * UIProcess/API/mac/WKView.mm:
2096         * UIProcess/WebContext.cpp:
2097         (WebKit::WebContext::~WebContext):
2098         (WebKit::WebContext::ensureWebProcess):
2099         (WebKit::WebContext::processDidFinishLaunching):
2100         * UIProcess/WebProcessManager.cpp: Removed.
2101         * UIProcess/WebProcessManager.h: Removed.
2102         * UIProcess/WebProcessProxy.cpp:
2103         (WebKit::WebProcessProxy::didClose):
2104         * WebKit2.pro:
2105         * WebKit2.xcodeproj/project.pbxproj:
2106         * win/WebKit2.vcproj:
2107
2108 2011-02-22  Anders Carlsson  <andersca@apple.com>
2109
2110         Reviewed by Darin Adler.
2111
2112         Get rid of WebProcessManager::getAllWebProcessContexts
2113         https://bugs.webkit.org/show_bug.cgi?id=55000
2114
2115         * Shared/WebURLRequest.cpp:
2116         (WebKit::WebURLRequest::setDefaultTimeoutInterval):
2117         Call WebContext::allContexts instead.
2118
2119         * UIProcess/WebContext.cpp:
2120         * UIProcess/WebContext.h:
2121         Add a vector of WebContext objects. Update it when creating and destroying contexts.
2122
2123         * UIProcess/WebProcessManager.cpp:
2124         * UIProcess/WebProcessManager.h:
2125         Remove WebProcessManager::getAllWebProcessContexts.
2126
2127 2011-02-22  Sam Weinig  <sam@webkit.org>
2128
2129         Reviewed by Anders Carlsson.
2130
2131         Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents
2132         a crash running fast/loader/empty-embed-src-attribute.html. This matches a 
2133         bail out in the default policy delegate in WebKit1.
2134
2135         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2136         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2137
2138 2011-02-22  Anders Carlsson  <andersca@apple.com>
2139
2140         Reviewed by Dan Bernstein.
2141
2142         Grammar correction from Spelling & Grammar window doesn't work
2143         https://bugs.webkit.org/show_bug.cgi?id=54982
2144         <rdar://problem/8940918>
2145
2146         * UIProcess/API/mac/WKView.mm:
2147         (-[WKView isGrammarCheckingEnabled]):
2148         (-[WKView setGrammarCheckingEnabled:]):
2149         Call down to the text checker.
2150
2151         * UIProcess/TextChecker.h:
2152         Add updateSpellingUIWithGrammarString.
2153
2154         * UIProcess/WebPageProxy.cpp:
2155         (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
2156         Call TextChecker::updateSpellingUIWithGrammarString.
2157
2158         * UIProcess/WebPageProxy.messages.in:
2159         Add UpdateSpellingUIWithGrammarString message.
2160
2161         * UIProcess/gtk/TextCheckerGtk.cpp:
2162         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2163         * UIProcess/qt/TextCheckerQt.cpp:
2164         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2165         * UIProcess/win/TextCheckerWin.cpp:
2166         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2167         Add stubs.
2168
2169         * UIProcess/mac/TextCheckerMac.mm:
2170         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
2171         Update the spelling panel.
2172
2173         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2174         (WebKit::WebEditorClient::updateSpellingUIWithGrammarString):
2175         Send an UpdateSpellingUIWithGrammarString message to the UI process.
2176
2177 2011-02-22  Balazs Kelemen  <kbalazs@webkit.org>
2178
2179         Reviewed by Anders Carlsson.
2180
2181         notImplemented() should behave identical in WebCore and WebKit2
2182         https://bugs.webkit.org/show_bug.cgi?id=54449
2183
2184         Use NotImplemented.h from WebCore. Initialize logging channels.
2185         Remove the WebKit2 concept of notImplemented().
2186
2187         * Platform/gtk/SharedMemoryGtk.cpp:
2188         * Platform/gtk/WorkQueueGtk.cpp:
2189         * Platform/qt/WorkQueueQt.cpp:
2190         * Platform/win/WorkQueueWin.cpp:
2191         * Shared/NotImplemented.h: Removed.
2192         * Shared/Plugins/NPIdentifierData.cpp:
2193         * Shared/Plugins/NPRemoteObjectMap.cpp:
2194         * Shared/Plugins/NPVariantData.cpp:
2195         * Shared/cairo/ShareableBitmapCairo.cpp:
2196         * Shared/gtk/ShareableBitmapGtk.cpp:
2197         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2198         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2199         * Shared/win/LayerTreeContextWin.cpp:
2200         * UIProcess/API/mac/PageClientImpl.mm:
2201         * UIProcess/API/qt/qwkpage.cpp:
2202         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2203         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2204         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2205         * UIProcess/WebContext.cpp:
2206         (WebKit::WebContext::WebContext):
2207         * UIProcess/WebInspectorProxy.cpp:
2208         * UIProcess/gtk/TextCheckerGtk.cpp:
2209         * UIProcess/gtk/WebInspectorGtk.cpp:
2210         * UIProcess/gtk/WebPreferencesGtk.cpp:
2211         * UIProcess/qt/TextCheckerQt.cpp:
2212         * UIProcess/qt/WebInspectorProxyQt.cpp:
2213         * UIProcess/win/TextCheckerWin.cpp:
2214         * UIProcess/win/WebContextMenuProxyWin.cpp:
2215         * WebKit2.pro:
2216         * WebKit2.xcodeproj/project.pbxproj:
2217         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2218         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2219         * WebProcess/Downloads/mac/DownloadMac.mm:
2220         * WebProcess/Downloads/qt/DownloadQt.cpp:
2221         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2222         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2223         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2224         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2225         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2226         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2227         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2228         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2229         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2230         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2231         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2232         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2233         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2234         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2235         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2236         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2237         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2238         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2239         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2240         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2241         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2242         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2243         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2244         * WebProcess/WebProcess.cpp:
2245         (WebKit::WebProcess::WebProcess):
2246         * WebProcess/gtk/WebProcessGtk.cpp:
2247         * config.h:
2248         * win/WebKit2.vcproj:
2249
2250 2011-02-22  Brian Weinstein  <bweinstein@apple.com>
2251
2252         Rubber-stamped by Brady Eidson.
2253
2254         Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.
2255
2256         * UIProcess/WebContext.cpp:
2257         (WebKit::WebContext::processDidClose):
2258
2259 2011-02-21  Adam Roben  <aroben@apple.com>
2260
2261         Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process
2262
2263         This will be useful for sending repeated messages for the same state ID to the web process.
2264         We don't do this currently, but will need to if we're asked to paint after we've thrown away
2265         our backing store to save memory.
2266
2267         Fixes <http://webkit.org/b/54916> DrawingAreaProxyImpl should keep track of the state ID it
2268         last sent to the web process
2269
2270         Reviewed by Anders Carlsson.
2271
2272         * UIProcess/DrawingAreaProxyImpl.cpp:
2273         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and
2274         reordered member initialization to match the new declaration order.
2275         (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got
2276         from the web process is no newer than the most recent one we requested.
2277         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send
2278         m_requestedStateID instead of a new global stateID.
2279
2280         * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before
2281         other data members. Also beefed the comment explaining m_currentStateID.
2282
2283 2011-02-22  Andras Becsi  <abecsi@webkit.org>
2284
2285         Reviewed by Laszlo Gombos.
2286
2287         [Qt] Redesign the build system
2288         https://bugs.webkit.org/show_bug.cgi?id=51339
2289
2290         Part 2.
2291
2292         Build WebCore as a static library, compile the WebKit API and WebKit2 API
2293         in a final step and link to WebKit2, WebCore and JSC libraries to fix
2294         linking issues resulting from stripped away symbols.
2295
2296         * WebKit2.pri: Add include paths.
2297         * WebKit2.pro: Move include paths to WebKit2.pri and move
2298         the API source to WebKit/qt/QtWebKit.pro
2299
2300 2011-02-22  Benjamin Poulain  <benjamin.poulain@nokia.com>
2301
2302         Reviewed by Kenneth Rohde Christiansen.
2303
2304         [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2
2305         https://bugs.webkit.org/show_bug.cgi?id=54902
2306
2307         Refactor the context menu handling of Qt to make it simpler to manage memory.
2308
2309         WebContextMenuProxyQt uses smart pointer for all the references to menu so
2310         there is no need to delete it explicitely.
2311
2312         Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so
2313         the client can choose to handle the memory, but there is no leak if it does not.
2314
2315         * UIProcess/API/qt/qgraphicswkview.cpp:
2316         (QGraphicsWKView::QGraphicsWKView):
2317         (QGraphicsWKView::showContextMenu):
2318         * UIProcess/API/qt/qgraphicswkview.h:
2319         * UIProcess/API/qt/qwkpage.h:
2320         * UIProcess/qt/WebContextMenuProxyQt.cpp:
2321         (WebKit::WebContextMenuProxyQt::showContextMenu):
2322         (WebKit::WebContextMenuProxyQt::createContextMenu):
2323         * UIProcess/qt/WebContextMenuProxyQt.h:
2324
2325 2011-02-22  Philippe Normand  <pnormand@igalia.com>
2326
2327         Reviewed by Xan Lopez.
2328
2329         [GTK] make distcheck fails
2330         https://bugs.webkit.org/show_bug.cgi?id=54943
2331
2332         Removed reference to NotImplemented.h which was removed.
2333
2334         * GNUmakefile.am:
2335
2336 2011-02-22  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
2337
2338         Reviewed by Kenneth Rohde Christiansen.
2339
2340         [Qt] QtWebProcess should be installed with 'make install'
2341         https://bugs.webkit.org/show_bug.cgi?id=44100
2342
2343         Follow the standard in other project files and allow install
2344         location to be changed with INSTALL_BINS variable.
2345
2346         * WebProcess.pro: Install QtWebProcess.
2347
2348 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
2349
2350         Unreviewed, rolling out r79296.
2351         http://trac.webkit.org/changeset/79296
2352         https://bugs.webkit.org/show_bug.cgi?id=54941
2353
2354         Breaks compilation on SnowLeapard Intel Release (Requested by
2355         kbalazs_ on #webkit).
2356
2357         * Platform/gtk/SharedMemoryGtk.cpp:
2358         * Platform/gtk/WorkQueueGtk.cpp:
2359         * Platform/qt/WorkQueueQt.cpp:
2360         * Platform/win/WorkQueueWin.cpp:
2361         * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
2362         * Shared/Plugins/NPIdentifierData.cpp:
2363         * Shared/Plugins/NPRemoteObjectMap.cpp:
2364         * Shared/Plugins/NPVariantData.cpp:
2365         * Shared/cairo/ShareableBitmapCairo.cpp:
2366         * Shared/gtk/ShareableBitmapGtk.cpp:
2367         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2368         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2369         * Shared/win/LayerTreeContextWin.cpp:
2370         * UIProcess/API/mac/PageClientImpl.mm:
2371         * UIProcess/API/qt/qwkpage.cpp:
2372         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2373         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2374         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2375         * UIProcess/WebContext.cpp:
2376         (WebKit::WebContext::WebContext):
2377         * UIProcess/WebInspectorProxy.cpp:
2378         * UIProcess/gtk/TextCheckerGtk.cpp:
2379         * UIProcess/gtk/WebInspectorGtk.cpp:
2380         * UIProcess/gtk/WebPreferencesGtk.cpp:
2381         * UIProcess/qt/TextCheckerQt.cpp:
2382         * UIProcess/qt/WebInspectorProxyQt.cpp:
2383         * UIProcess/win/TextCheckerWin.cpp:
2384         * UIProcess/win/WebContextMenuProxyWin.cpp:
2385         * WebKit2.pro:
2386         * WebKit2.xcodeproj/project.pbxproj:
2387         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2388         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2389         * WebProcess/Downloads/mac/DownloadMac.mm:
2390         * WebProcess/Downloads/qt/DownloadQt.cpp:
2391         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2392         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2393         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2394         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2395         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2396         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2397         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2398         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2399         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2400         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2401         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2402         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2403         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2404         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2405         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2406         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2407         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2408         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2409         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2410         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2411         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2412         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2413         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2414         * WebProcess/WebProcess.cpp:
2415         (WebKit::WebProcess::WebProcess):
2416         * WebProcess/gtk/WebProcessGtk.cpp:
2417         * config.h:
2418         * win/WebKit2.vcproj:
2419
2420 2011-02-16  Balazs Kelemen  <kbalazs@webkit.org>
2421
2422         Reviewed by Anders Carlsson.
2423
2424         notImplemented() should behave identical in WebCore and WebKit2
2425         https://bugs.webkit.org/show_bug.cgi?id=54449
2426
2427         Use NotImplemented.h from WebCore. Initialize logging channels.
2428         Remove the WebKit2 concept of notImplemented().
2429
2430         * Platform/gtk/SharedMemoryGtk.cpp:
2431         * Platform/gtk/WorkQueueGtk.cpp:
2432         * Platform/qt/WorkQueueQt.cpp:
2433         * Platform/win/WorkQueueWin.cpp:
2434         * Shared/NotImplemented.h: Removed.
2435         * Shared/Plugins/NPIdentifierData.cpp:
2436         * Shared/Plugins/NPRemoteObjectMap.cpp:
2437         * Shared/Plugins/NPVariantData.cpp:
2438         * Shared/cairo/ShareableBitmapCairo.cpp:
2439         * Shared/gtk/ShareableBitmapGtk.cpp:
2440         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
2441         * Shared/qt/WebCoreArgumentCodersQt.cpp:
2442         * Shared/win/LayerTreeContextWin.cpp:
2443         * UIProcess/API/qt/qwkpage.cpp:
2444         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
2445         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
2446         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
2447         * UIProcess/WebContext.cpp:
2448         (WebKit::WebContext::WebContext):
2449         * UIProcess/WebInspectorProxy.cpp:
2450         * UIProcess/gtk/TextCheckerGtk.cpp:
2451         * UIProcess/gtk/WebInspectorGtk.cpp:
2452         * UIProcess/gtk/WebPreferencesGtk.cpp:
2453         * UIProcess/qt/TextCheckerQt.cpp:
2454         * UIProcess/qt/WebInspectorProxyQt.cpp:
2455         * UIProcess/win/TextCheckerWin.cpp:
2456         * UIProcess/win/WebContextMenuProxyWin.cpp:
2457         * WebKit2.pro:
2458         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
2459         * WebProcess/Downloads/curl/DownloadCurl.cpp:
2460         * WebProcess/Downloads/mac/DownloadMac.mm:
2461         * WebProcess/Downloads/qt/DownloadQt.cpp:
2462         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
2463         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2464         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
2465         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
2466         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2467         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
2468         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
2469         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
2470         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2471         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2472         * WebProcess/WebCoreSupport/WebDragClient.cpp:
2473         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2474         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2475         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2476         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2477         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2478         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
2479         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
2480         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
2481         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
2482         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
2483         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
2484         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
2485         * WebProcess/WebProcess.cpp:
2486         (WebKit::WebProcess::WebProcess):
2487         * WebProcess/gtk/WebProcessGtk.cpp:
2488
2489 2011-02-21  Timothy Hatcher  <timothy@apple.com>
2490
2491         Set and update the window title for the Web Inspector in WebKit2.
2492
2493         https://webkit.org/b/50945
2494         rdar://problem/8762410
2495
2496         Reviewed by Adam Roben.
2497
2498         * UIProcess/WebInspectorProxy.cpp:
2499         (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged.
2500         * UIProcess/WebInspectorProxy.h:
2501         * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged.
2502         * UIProcess/mac/WebInspectorProxyMac.mm:
2503         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
2504         * UIProcess/win/WebInspectorProxyWin.cpp:
2505         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
2506         * UIProcess/gtk/WebInspectorGtk.cpp:
2507         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
2508         * UIProcess/qt/WebInspectorProxyQt.cpp:
2509         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
2510         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
2511         (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged.
2512         * WebProcess/WebPage/WebInspector.cpp:
2513         (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message.
2514         * WebProcess/WebPage/WebInspector.h:
2515
2516 2011-02-21  Sam Weinig  <sam@webkit.org>
2517
2518         Reviewed by Anders Carlsson.
2519
2520         Can't paste from 3rd party text editor into WebKit2 window.
2521         <rdar://problem/8978624>
2522
2523         * WebProcess/com.apple.WebProcess.sb:
2524
2525 2011-02-21  Anders Carlsson  <andersca@apple.com>
2526
2527         Reviewed by Dan Bernstein.
2528
2529         Initialize DrawingAreaProxy::m_size
2530         https://bugs.webkit.org/show_bug.cgi?id=54913
2531
2532         This was removed in r76962 since it caused flashes when switching drawing areas due to
2533         entering and exiting composited mode, but since we no longer switch drawing areas we can
2534         put it back.
2535
2536         * UIProcess/DrawingAreaProxy.cpp:
2537         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
2538
2539 2011-02-21  Adam Roben  <aroben@apple.com>
2540
2541         Add some assertions about the state IDs we receive from the web process
2542
2543         Rubber-stamped by Anders Carlsson.
2544
2545         * UIProcess/DrawingAreaProxyImpl.cpp:
2546         (WebKit::DrawingAreaProxyImpl::update):
2547         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
2548         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
2549         Assert that the state ID the web process sent us is no newer than our own state ID.
2550
2551 2011-02-21  Adam Roben  <aroben@apple.com>
2552
2553         Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID".
2554
2555         As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes
2556         all operations performed before that state change to become invalid. Currently, this state
2557         consists of a single piece of data: the view's size. Eventually it will encompass more data
2558         (e.g., the backing store we're drawing into; when we start throwing away the backing store
2559         to save memory, our state will have changed, and any operations that were intended for the
2560         old backing store will have become invalid). r79251 effectively transformed
2561         DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl
2562         sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's
2563         size changes.
2564
2565         This patch is just a set of simple renames to reflect the transformation that r79251
2566         effected. It should not introduce any changes in behavior. The renames are:
2567           - Messages::DrawingArea::SetSize -> UpdateState
2568           - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState
2569           - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID
2570           - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState
2571           - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState
2572           - DrawingAreaImpl::m_inSetSize -> m_inUpdateState
2573           - generateSequenceNumber -> generateStateID
2574           - sequenceNumber -> stateID
2575
2576         Fixes <http://webkit.org/b/54911> DrawingArea[Proxy]Impl's "sequence number" concept should
2577         be renamed to "state ID"
2578
2579         Reviewed by Anders Carlsson.
2580
2581         * UIProcess/DrawingAreaProxy.h:
2582         * UIProcess/DrawingAreaProxy.messages.in:
2583         * UIProcess/DrawingAreaProxyImpl.cpp:
2584         * UIProcess/DrawingAreaProxyImpl.h:
2585         * WebProcess/WebPage/DrawingArea.h:
2586         * WebProcess/WebPage/DrawingArea.messages.in:
2587         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2588         * WebProcess/WebPage/DrawingAreaImpl.h:
2589         Performed the renames described above.
2590
2591 2011-02-21  Alexey Proskuryakov  <ap@apple.com>
2592
2593         Reviewed by Adam Roben.
2594
2595         REGRESSION (WebKit2): HTTP requests time out after 60 seconds
2596         https://bugs.webkit.org/show_bug.cgi?id=54755
2597         <rdar://problem/9006592>
2598
2599         * Shared/API/c/WKURLRequest.cpp:
2600         (WKURLRequestSetDefaultTimeoutInterval):
2601         * Shared/API/c/WKURLRequest.h:
2602         Added an API to set a default timeout interval for requests created from URLs. The API
2603         affects both the UI process and requests created internally by the Web process. Requests
2604         created from NSURLRequest or CFURLRequest take timeout from those.
2605
2606         * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval):
2607         * Shared/WebURLRequest.h:
2608         Pipe the default timeout interval from WKURLRequest down to actual implementation. Since
2609         WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects
2610         NSURLRequest default timeout interval.
2611
2612         * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts):
2613         * UIProcess/WebProcessManager.h:
2614         Added a way to enumerate all contexts running in separate processes.
2615
2616         * Shared/WebProcessCreationParameters.cpp:
2617         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
2618         (WebKit::WebProcessCreationParameters::encode):
2619         (WebKit::WebProcessCreationParameters::decode):
2620         * Shared/WebProcessCreationParameters.h:
2621         (WebKit::WebContext::ensureWebProcess):
2622         (WebKit::WebContext::setDefaultRequestTimeoutInterval):
2623         * UIProcess/WebContext.h:
2624         * WebProcess/WebProcess.cpp:
2625         (WebKit::WebProcess::initializeWebProcess):
2626         (WebKit::WebProcess::setDefaultRequestTimeoutInterval):
2627         * WebProcess/WebProcess.h:
2628         * WebProcess/WebProcess.messages.in:
2629         Use UI process default timeout interval in separate process contexts, too.
2630
2631 2011-02-18  Brian Weinstein  <bweinstein@apple.com>
2632
2633         Reviewed by Adam Roben.
2634
2635         WebResourceCacheManager should be responsible for managing the CFURLCache as well
2636         as the WebCore memory cache.
2637         https://bugs.webkit.org/show_bug.cgi?id=54886
2638         Part of <rdar://problem/8971738>
2639
2640         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
2641         (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add
2642             create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache.
2643         (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for
2644             the origin's hostname.
2645         * WebProcess/ResourceCache/WebResourceCacheManager.h:
2646
2647         * WebProcess/ResourceCache/cf: Added.
2648         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added.
2649         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface.
2650         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto.
2651
2652         * win/WebKit2.vcproj: Added new file.
2653         * WebKit2.xcodeproj/project.pbxproj: Ditto.
2654
2655 2011-02-21  Adam Roben  <aroben@apple.com>
2656
2657         Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl
2658
2659         DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed
2660         before that state change to become invalid. When painting, we need to have performed at
2661         least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits
2662         into the view.
2663
2664         Currently, this state consists of a single piece of data: the view's size. Whenever the
2665         state (i.e., size) changes, we tell the web process via the SetSize message, and the web
2666         process lets us know that it has updated to match the new state (i.e., size) via the
2667         DidSetSize message.
2668
2669         When it's time to paint, if we're waiting for the web process to update to match our current
2670         state (i.e., size), we block for a little while hoping to receive a DidSetSize message so
2671         that we can paint up-to-date bits into the window. This can cause us to receive messages
2672         out-of-order; the DidSetSize message will be processed immediately, and any messages that
2673         were sent before the DidSetSize message will be processed later. Since the messages from
2674         before the DidSetSize message correspond to an old state (i.e., size), they are no longer
2675         useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so
2676         we discard them.
2677
2678         The way we identify and discard these messages is by keeping track of a sequence number.
2679         Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to
2680         DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize
2681         message, it records the sequence number that came along with it. If we then later receive
2682         any messages that have a lower sequence number, we know they correspond to an old state
2683         (i.e., size) and can discard them.
2684
2685         This patch moves control of the sequence number to DrawingAreaProxyImpl.
2686         DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize
2687         message. DrawingAreaImpl records this sequence number when it receives the SetSize message,
2688         and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same
2689         as before.
2690
2691         This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a
2692         full backing store update (by incrementing the sequence number) at times other than when the
2693         view's size changes (e.g., after it has thrown away its backing store in order to save
2694         memory).
2695
2696         Fixes <http://webkit.org/b/54907> DrawingAreaProxyImpl should tell DrawingAreaImpl what
2697         sequence number to use
2698
2699         Reviewed by Anders Carlsson.
2700
2701         * UIProcess/DrawingAreaProxyImpl.cpp:
2702         (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp.
2703         (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the
2704         SetSize message.
2705         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a
2706         potential improvement.
2707
2708         * WebProcess/WebPage/DrawingArea.h:
2709         (WebKit::DrawingArea::setSize): Updated to match the message's new parameters.
2710
2711         * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize.
2712
2713         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2714         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber.
2715         (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process.
2716
2717         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
2718         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
2719         (WebKit::DrawingAreaImpl::display):
2720         Send m_sequenceNumber, instead of a new sequence number, back to the UI process.
2721
2722         * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to
2723         match the base class.
2724
2725 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
2726
2727         Reviewed by Sam Weinig.
2728
2729         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
2730
2731         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
2732         containing a pointer to its parent class. These links should reflect the inheritance
2733         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
2734         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
2735         since intervening C++ classes may not have ClassInfo - but would be a potential bug
2736         were ClassInfo were to be added.
2737
2738         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2739
2740 2011-02-21  Balazs Kelemen  <kbalazs@webkit.org>
2741
2742         Reviewed by Kenneth Rohde Christiansen.
2743
2744         [Qt] Implement WorkQueue::sheduleWorkAfterDelay
2745         https://bugs.webkit.org/show_bug.cgi?id=54878
2746
2747         * Platform/qt/WorkQueueQt.cpp:
2748         (WorkQueue::scheduleWorkAfterDelay):
2749
2750 2011-02-20  Alejandro G. Castro  <alex@igalia.com>
2751
2752         Reviewed by Martin Robinson.
2753
2754         [GTK] Add WebResourceCacheDataManager to the compilation after r78848
2755         https://bugs.webkit.org/show_bug.cgi?id=54732
2756
2757         Added resource cache manager API to GTK+ compilation after r78848.
2758
2759         * GNUmakefile.am:
2760
2761 2011-02-20  Sam Weinig  <sam@webkit.org>
2762
2763         Reviewed by Dan Bernstein.
2764
2765         Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46
2766         <rdar://problem/8942726>
2767
2768         * WebProcess/WebPage/WebPage.cpp:
2769         (WebKit::WebPage::goForward):
2770         (WebKit::WebPage::goBack):
2771         (WebKit::WebPage::goToBackForwardItem):
2772         Defend agains null HistoryItems.
2773
2774 2011-02-20  Anders Carlsson  <andersca@apple.com>
2775
2776         Reviewed by Maciej Stachowiak.
2777
2778         Crash when a plug-in requests a javascript: url that destroys the plug-in
2779         https://bugs.webkit.org/show_bug.cgi?id=54837
2780         <rdar://problem/9005475>
2781
2782         * WebProcess/Plugins/PluginProxy.cpp:
2783         (WebKit::PluginProxy::destroy):
2784         Null out m_pluginController.
2785
2786         * WebProcess/Plugins/PluginView.cpp:
2787         (WebKit::PluginView::performJavaScriptURLRequest):
2788         Don't access the frame through m_pluginElement since it will be nulled out
2789         when the plug-in is destroyed.
2790
2791 2011-02-20  Anders Carlsson  <andersca@apple.com>
2792
2793         Reviewed by Sam Weinig.
2794
2795         Fix another crash when a plug-in is destroyed when evaluating JavaScript
2796         https://bugs.webkit.org/show_bug.cgi?id=54834
2797         <rdar://problem/9005475>
2798
2799         This contains three separate fixes:
2800
2801         - In unprotectPluginFromDestruction we can't just destroy the plug-in once
2802           the count reaches zero, because the plug-in might still have code executing
2803           on the stack. To fix this we use a zero-delay timer to defer destruction
2804           of the plug-in.
2805
2806         - Trying to get the NPObject for the window using NPN_GetValue would return
2807           NPERR_NO_ERROR, even if the returned NPObject was null. Fix this to return
2808           NPERR_GENERIC_ERROR instead.
2809
2810         - Protect the plug-in from destruction anytime an NPAPI call that sends a 
2811           synchronous IPC message is made.
2812
2813         * PluginProcess/PluginControllerProxy.cpp:
2814         (WebKit::PluginControllerProxy::PluginControllerProxy):
2815         (WebKit::PluginControllerProxy::destroy):
2816         (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
2817         * PluginProcess/PluginControllerProxy.h:
2818         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
2819         (WebKit::PluginDestructionProtector::PluginDestructionProtector):
2820         (WebKit::NPN_GetValue):
2821         (WebKit::NPN_Evaluate):
2822         (WebKit::NPN_GetProperty):
2823         (WebKit::NPN_SetProperty):
2824         (WebKit::NPN_RemoveProperty):
2825         (WebKit::NPN_HasProperty):
2826         (WebKit::NPN_HasMethod):
2827         (WebKit::NPN_Enumerate):
2828         (WebKit::NPN_Construct):
2829         (WebKit::NPN_GetValueForURL):
2830         (WebKit::NPN_SetValueForURL):
2831
2832 2011-02-19  Sam Weinig  <sam@webkit.org>
2833
2834         Reviewed by Anders Carlsson.
2835
2836         Add phase in addition to momentumPhase to platform wheel events
2837         Part of <rdar://problem/8945362>
2838
2839         Rename existing phase to momentumPhase.
2840
2841         * Shared/WebEvent.h:
2842         (WebKit::WebWheelEvent::momentumPhase):
2843         * Shared/WebEventConversion.cpp:
2844         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
2845         * Shared/WebWheelEvent.cpp:
2846         (WebKit::WebWheelEvent::WebWheelEvent):
2847         (WebKit::WebWheelEvent::encode):
2848         (WebKit::WebWheelEvent::decode):
2849         * Shared/mac/WebEventFactory.mm:
2850         (WebKit::phaseForEvent):
2851         (WebKit::momentumPhaseForEvent):
2852         (WebKit::WebEventFactory::createWebWheelEvent):
2853
2854 2011-02-19  Anders Carlsson  <andersca@apple.com>
2855
2856         Reviewed by Dan Bernstein.
2857
2858         Crash when trying to take a snapshot of an uninitialized plug-in
2859         https://bugs.webkit.org/show_bug.cgi?id=54812
2860
2861         * WebProcess/Plugins/PluginView.cpp:
2862         (WebKit::PluginView::notifyWidget):
2863         Don't try to create a snapshot of the plug-in if it hasn't been initialized.
2864
2865 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
2866
2867         Reviewed by Sam Weinig.
2868
2869         Bug 54786 - Devirtualize JSCell::classInfo()
2870
2871         Instead of making a virtual function call, add a pointer to the ClassInfo
2872         onto Structure.
2873
2874         This removes a virtual function call, and paves the way towards removing all
2875         the createStructure methods, and StructureFlags/AnonymousSlotCount properties
2876         (these should be able to move onto ClassInfo).
2877
2878         Calls to Structure::create must now pass a pointer to the ClassInfo for the
2879         structure. All objects now have a ClassInfo pointer, non-object cell types
2880         still do not.
2881
2882         Changes are most mechanical, involving three steps:
2883             * Remove virtual classInfo() methods.
2884             * Add &s_info parameter to calls to Structure::create.
2885             * Rename ClassInfo static members on classes from 'info' to 's_info',
2886               for consistency.
2887
2888         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
2889         (WebKit::JSNPMethod::JSNPMethod):
2890         * WebProcess/Plugins/Netscape/JSNPMethod.h:
2891         (WebKit::JSNPMethod::createStructure):
2892         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
2893         (WebKit::JSNPObject::JSNPObject):
2894         * WebProcess/Plugins/Netscape/JSNPObject.h:
2895         (WebKit::JSNPObject::createStructure):
2896
2897 2011-02-19  Sam Weinig  <sam@webkit.org>
2898
2899         Reviewed by Anders Carlsson.
2900
2901         Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation
2902
2903         * UIProcess/API/mac/WKView.mm:
2904         (-[WKView performDictionaryLookupAtCurrentMouseLocation]):
2905         * UIProcess/API/mac/WKViewPrivate.h:
2906
2907 2011-02-19  Charlie Reis  <creis@chromium.org>
2908
2909         Reviewed by Mihai Parparita.
2910
2911         Ensure loading has stopped in HistoryController::goToItem
2912         https://bugs.webkit.org/show_bug.cgi?id=54517
2913
2914         Add a FrameLoaderClient callback for whether to stop loading before goToItem.
2915
2916         Test: http/tests/navigation/forward-to-fragment-fires-onload.html
2917
2918         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2919         (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
2920         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2921
2922 2011-02-18  Sam Weinig  <sam@webkit.org>
2923
2924         Reviewed by Adele Peterson.
2925
2926         Real fix for <rdar://problem/9025723> CrashTracer: [USER] 
2927         1 crash in WebProcess at com.apple.WebKit2: 
2928         WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
2929
2930         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2931         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
2932         Add null check for the FrameView. This function can be called when the
2933         FrameView is being torn down during a transition to a new FrameView.
2934
2935         * WebProcess/WebPage/WebPage.cpp:
2936         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
2937         Revert last attempt.
2938
2939 2011-02-18  Anders Carlsson  <andersca@apple.com>
2940
2941         Reviewed by Sam Weinig.
2942
2943         Hang trying to load nytimes.com with Flash installed
2944         <rdar://problem/9018113> 
2945
2946         * Platform/CoreIPC/Connection.cpp:
2947         (CoreIPC::Connection::sendSyncMessage):
2948         Call beginWaitForSyncReply() before sending the message. Otherwise, in some cases we could
2949         have gotten back a synchronous request before calling beginWaitForSyncReply(), and then we wouldn't
2950         process it correctly. (Which would lead to the hang).
2951
2952 2011-02-18  Simon Fraser  <simon.fraser@apple.com>
2953
2954         Reviewed by Kevin Decker.
2955
2956         <rdar://problem/9021296> Some plug-ins are the wrong size after zooming
2957         
2958         Use the same frame/bounds adjustment that we use for NSView-based
2959         plugins in WebKit2, which allows plug-ins and their snapshots to
2960         render with the correct size after scaling.
2961
2962         * WebProcess/Plugins/PluginView.cpp:
2963         (WebKit::PluginView::setBoundsSize):
2964         (WebKit::PluginView::viewGeometryDidChange):
2965         (WebKit::PluginView::clipRectInWindowCoordinates):
2966         * WebProcess/Plugins/PluginView.h:
2967
2968 2011-02-18  Beth Dakin  <bdakin@apple.com>
2969
2970         Rubber-stamped by Adele Peterson.
2971
2972         Fix for <rdar://problem/9025723> CrashTracer: [USER] 
2973         1 crash in WebProcess at com.apple.WebKit2: 
2974         WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
2975
2976         Simple null-check.
2977         * WebProcess/WebPage/WebPage.cpp:
2978         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
2979
2980 2011-02-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
2981
2982         Reviewed by Kenneth Rohde Christiansen.
2983
2984         Tiled backing store area is too big.
2985         Error in area calculcation causes size of backing store
2986         up to 8 times bigger than viewport with default multipliers.
2987         https://bugs.webkit.org/show_bug.cgi?id=54587
2988
2989         * UIProcess/TiledDrawingAreaProxy.cpp:
2990         (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
2991         (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
2992
2993 2011-02-18  John Sullivan  <sullivan@apple.com>
2994
2995         Reviewed by Maciej Stachowiak.
2996
2997         <rdar://problem/9026169>
2998         https://bugs.webkit.org/show_bug.cgi?id=54780
2999         pendingAPIRequestURL isn't updated for WKPageGoToBackForwardListItem
3000
3001         * UIProcess/WebPageProxy.cpp:
3002         (WebKit::WebPageProxy::goToBackForwardItem):
3003         Update the pending API URL.
3004
3005 2011-02-18  Anders Carlsson  <andersca@apple.com>
3006
3007         Reviewed by Sam Weinig.
3008
3009         Accelerated content fades in when using a layer backed WKView
3010         <rdar://problem/9021586>
3011
3012         * UIProcess/API/mac/WKView.mm:
3013         (-[WKView _enterAcceleratedCompositingMode:]):
3014         Make a new nested CATransaction and disable animations when adding the layer 
3015         hosting subview. This avoids an implicit fade animation that would otherwise occur.
3016
3017 2011-02-18  Simon Fraser  <simon.fraser@apple.com>
3018
3019         Reviewed by Dan Bernstein.
3020
3021         Plugin snapshot location is wrong for subframes
3022         https://bugs.webkit.org/show_bug.cgi?id=54776
3023         
3024         Only change the CTM to the way that the plugin expects it
3025         when painting the plugin, not when drawing the snapshot.
3026         This fixes the snapshot location when painting flattened
3027         frames.
3028
3029         * WebProcess/Plugins/PluginView.cpp:
3030         (WebKit::PluginView::paint):
3031
3032 2011-02-18  Anders Carlsson  <andersca@apple.com>
3033
3034         Reviewed by Simon Fraser.
3035
3036         Implement NetscapePlugin::pluginComplexTextInputIdentifier
3037         https://bugs.webkit.org/show_bug.cgi?id=54770
3038
3039         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3040         (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
3041
3042 2011-02-18  Sam Weinig  <sam@webkit.org>
3043
3044         Reviewed by Maciej Stachowiak.
3045
3046         Add the ability to ask the WKPage if the main frame is pinned
3047         to the right or left hand side.
3048         Part of <rdar://problem/9017043>.
3049
3050         * UIProcess/API/C/WKPage.cpp:
3051         (WKPageIsPinnedToLeftSide):
3052         (WKPageIsPinnedToRightSide):
3053         * UIProcess/API/C/WKPage.h:
3054         Add new API calls.
3055
3056         * UIProcess/WebPageProxy.cpp:
3057         (WebKit::WebPageProxy::WebPageProxy):
3058         (WebKit::WebPageProxy::close):
3059         (WebKit::WebPageProxy::processDidCrash):
3060         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
3061         * UIProcess/WebPageProxy.h:
3062         (WebKit::WebPageProxy::isPinnedToLeftSide):
3063         (WebKit::WebPageProxy::isPinnedToRightSide):
3064         Initialize, reset and update the pinned state.
3065
3066         * UIProcess/WebPageProxy.messages.in:
3067         Add message to update the pinned state.
3068
3069         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3070         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
3071         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
3072         * WebProcess/WebPage/WebPage.cpp:
3073         (WebKit::WebPage::WebPage):
3074         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
3075         * WebProcess/WebPage/WebPage.h:
3076         Cache the pinned state, and only update the UIProcess when it
3077         changes.
3078
3079 2011-02-18  Anders Carlsson  <andersca@apple.com>
3080
3081         Reviewed by Simon Fraser.
3082
3083         Fix assertion in SharedMemory::create when trying to snapshot 0x0 plug-in
3084         https://bugs.webkit.org/show_bug.cgi?id=54768
3085
3086         * PluginProcess/PluginControllerProxy.cpp:
3087         (WebKit::PluginControllerProxy::snapshot):
3088         Don't try to create a handle from a null ShareableBitmap.
3089
3090         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3091         (WebKit::NetscapePlugin::snapshot):
3092         Check for a zero sized plug-in before trying to create a snapshot.
3093
3094 2011-02-18  Anders Carlsson  <andersca@apple.com>
3095
3096         Reviewed by Simon Fraser.
3097
3098         WKView flashes when entering/exiting compositing mode
3099         https://bugs.webkit.org/show_bug.cgi?id=54695
3100         <rdar://problem/9011554>
3101
3102         * UIProcess/API/mac/WKView.mm:
3103         (-[WKView _exitAcceleratedCompositingMode]):
3104         Remove the layer hosting view before clearing out its layer, otherwise we can get
3105         white flashes when exiting accelerated compositing mode.
3106
3107         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3108         When entering accelerated compositing mode, we want to defer sending the message
3109         until we've actually committed the layer tree and pushed all changes over to the
3110         UI process.
3111
3112         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
3113         Tell the layer tree host to force a repaint. This will ensure that all layer tree
3114         changes are pushed over to the UI process. When that is done, send the new layer tree
3115         context over to the UI process.
3116
3117         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
3118         When exiting compositing mode in response to a didSetSize, we want to exit accelerated 
3119         compositing mode right away to avoid flashes. This is safe since we've laid out the page
3120         already so we won't end up reentering setRootCompositingLayer.
3121
3122         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
3123         Tell the layer tree host to notify us when the next layer tree flush happened, so we can
3124         let the UI process know. If we're entering accelerated compositing mode in response to a
3125         SetSize message, the new layer tree context will be passed in the DidSetSize message.
3126
3127         * WebProcess/WebPage/DrawingAreaImpl.h:
3128         Add layerHostDidFlushLayers.
3129
3130         * WebProcess/WebPage/LayerTreeHost.h:
3131         Add setShouldNotifyAfterNextScheduledLayerFlush.
3132
3133         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
3134         Add a m_notifyAfterScheduledLayerFlush flag.
3135
3136         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
3137         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
3138         Initialize m_notifyAfterScheduledLayerFlush to false.
3139
3140         (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
3141         Set m_notifyAfterScheduledLayerFlush to true.
3142
3143         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
3144         If m_notifyAfterScheduledLayerFlush is true, call DrawingAreaImpl::layerHostDidFlushLayers.
3145
3146 2011-02-18  Alexey Proskuryakov  <ap@apple.com>
3147
3148         Reviewed by Adele Peterson.
3149
3150         REGRESSION (WebKit2): Wrong frame printed on tivofaq.com
3151         https://bugs.webkit.org/show_bug.cgi?id=54677
3152         <rdar://problem/8994133>
3153
3154         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3155         (WebKit::area): Use visible frame bounds.
3156         (WebKit::findLargestFrameInFrameSet): Added a comment explaining what we're up to here.
3157         WebKit2 shouldn't be making policy decisions for the client, but it gets dangerously close
3158         to that. We used to expose the same as WK1 API though.
3159
3160 2011-02-18  Balazs Kelemen  <kbalazs@webkit.org>
3161
3162         Unreviwed.
3163
3164         Remove CleanupHandler since we do not use it anymore.
3165
3166         * Shared/qt/CleanupHandler.cpp: Removed.
3167         * Shared/qt/CleanupHandler.h: Removed.
3168
3169 2011-02-18  Alejandro G. Castro  <alex@igalia.com>
3170
3171         Fix GTK build by fixing signature of platformPaint(), required after r78956.
3172
3173         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
3174         (WebKit::NetscapePlugin::platformPaint):
3175
3176 2011-02-17  Dan Bernstein  <mitz@apple.com>
3177
3178         LLVM Compiler build fix.
3179
3180         * UIProcess/WebResourceCacheManagerProxy.h:
3181         * WebProcess/ResourceCache/WebResourceCacheManager.h:
3182
3183 2011-02-17  Simon Fraser  <simon.fraser@apple.com>
3184
3185         Fix Windows and Qt builds by fixing signature of platformPaint().
3186
3187         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
3188         (WebKit::NetscapePlugin::platformPaint):
3189         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
3190         (WebKit::NetscapePlugin::platformPaint):
3191
3192 2011-02-17  Simon Fraser  <simon.fraser@apple.com>
3193
3194         Reviewed by Sam Weinig.
3195
3196         WebKit2 snapshots don't show plug-ins
3197         https://bugs.webkit.org/show_bug.cgi?id=54716
3198         
3199         Fix WebKit2 plug-ins to do a software paint for
3200         snapshotting.
3201
3202         * PluginProcess/PluginControllerProxy.h:
3203         * PluginProcess/PluginControllerProxy.cpp:
3204         (WebKit::PluginControllerProxy::snapshot): Respond to the snapshot
3205         message by getting a sharable bitmap from the plugin, and returning
3206         a handle to it in the reply.
3207
3208         * PluginProcess/PluginControllerProxy.messages.in: Add the snapshot
3209         message.
3210         
3211         * Shared/Plugins/PluginQuirks.h:
3212         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
3213         (WebKit::NetscapePluginModule::determineQuirks): Add a quirk for the
3214         ability to be snapshotted, which we only set for Flash at the moment.
3215         
3216         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
3217         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
3218         (WebKit::NetscapePlugin::snapshot): Create a shareable bitmap, and
3219         paint into it.
3220         (WebKit::NetscapePlugin::supportsSnapshotting): Test the quirk.
3221
3222         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
3223         (WebKit::NetscapePlugin::platformPaint): Allow the paint to happen
3224         if we're snapshotting, even when using the CoreAnimation drawing
3225         model.
3226         
3227         * WebProcess/Plugins/Plugin.h: New snapshot method.
3228         
3229         * WebProcess/Plugins/PluginProxy.h:
3230         * WebProcess/Plugins/PluginProxy.cpp:
3231         (WebKit::PluginProxy::snapshot): Send a sync message to the plugin process,
3232         asking for a snapshot in a shareble bitmap.
3233         
3234         * WebProcess/Plugins/PluginView.h:
3235         * WebProcess/Plugins/PluginView.cpp:
3236         (WebKit::PluginView::paint): Use the snapshot if we have one, to avoid
3237         calling into the plugin to draw, which may run script.
3238         
3239         (WebKit::PluginView::notifyWidget): Generate the snapshot before
3240         a flattening paint, and throw it away after.
3241
3242 2011-02-17  Jessie Berlin  <jberlin@apple.com>
3243
3244         Reviewed by Adam Roben.
3245
3246         WebKit2: The CFNetwork Cache should be shared between the UI Process and the Web Process on
3247         Windows.
3248         https://bugs.webkit.org/show_bug.cgi?id=54683
3249
3250         * Shared/WebProcessCreationParameters.cpp:
3251         (WebKit::WebProcessCreationParameters::encode):
3252         (WebKit::WebProcessCreationParameters::decode):
3253         * Shared/WebProcessCreationParameters.h:
3254  
3255         * UIProcess/win/WebContextWin.cpp:
3256         (WebKit::WebContext::platformInitializeWebProcess):
3257         Make sure to remove the ending slash, as CFNetwork does not recognize the directory with
3258         that slash.
3259
3260         * WebProcess/win/WebProcessWin.cpp:
3261         (WebKit::WebProcess::platformInitializeWebProcess):
3262         Create a cache using the path, disk capacity, and memory capacity and set it as default.
3263
3264 2011-02-17  Anders Carlsson  <andersca@apple.com>
3265
3266         Reviewed by Sam Weinig.
3267
3268         Web and/or plug-in process crashes when NPN_Evaluate destroys the plug-in
3269         https://bugs.webkit.org/show_bug.cgi?id=54686
3270         <rdar://problem/9013384>
3271
3272         This patch fixes two bugs with a plug-in calling NPN_Evaluate to destroy itself:
3273
3274         - The PluginProxy object would be destroyed in the middle of PluginProxy::evaluate.
3275           This would cause the web process to crash.
3276
3277         - The PluginControllerProxy would call NPP_Destroy while the plug-in was busy running
3278           code. This would cause the plug-in process to crash.
3279
3280         To fix this, we add protectPluginFromDestruction/unprotectPluginFromDestruction to
3281         PluginControllerProxy and use it to defer calling destroy() in the plug-in process,
3282         and defer actually destroying the plug-in in the web process.
3283
3284         https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding a test for this.
3285
3286         * PluginProcess/PluginControllerProxy.cpp:
3287         (WebKit::PluginControllerProxy::PluginControllerProxy):
3288         (WebKit::PluginControllerProxy::destroy):
3289         (WebKit::PluginControllerProxy::evaluate):
3290         (WebKit::PluginControllerProxy::protectPluginFromDestruction):
3291         (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
3292         * PluginProcess/PluginControllerProxy.h:
3293         (WebKit::PluginControllerProxy::asPluginController):
3294         * PluginProcess/WebProcessConnection.cpp:
3295         (WebKit::WebProcessConnection::destroyPluginControllerProxy):
3296         (WebKit::WebProcessConnection::didReceiveMessage):
3297         (WebKit::WebProcessConnection::didReceiveSyncMessage):
3298         * PluginProcess/WebProcessConnection.h:
3299         (WebKit::WebProcessConnection::connection):
3300         * WebProcess/Plugins/PluginController.h:
3301         (WebKit::PluginController::PluginDestructionProtector::PluginDestructionProtector):
3302         (WebKit::PluginController::PluginDestructionProtector::~PluginDestructionProtector):
3303         * WebProcess/Plugins/PluginProxy.cpp:
3304         (WebKit::PluginProxy::evaluate):
3305         * WebProcess/Plugins/PluginView.cpp:
3306         (WebKit::PluginView::protectPluginFromDestruction):
3307         (WebKit::PluginView::unprotectPluginFromDestruction):
3308         * WebProcess/Plugins/PluginView.h:
3309
3310 2011-02-17  Sam Weinig  <sam@webkit.org>
3311
3312         Build fix.
3313
3314         * WebProcess/WebPage/mac/WebPageMac.mm:
3315         (WebKit::WebPage::performDictionaryLookupAtLocation):
3316
3317 2011-02-17  Sam Weinig  <sam@webkit.org>
3318
3319         Reviewed by Maciej Stachowiak.
3320
3321         WebKit2: Support Dictionary popup
3322         <rdar://problem/7660670>
3323
3324         * Shared/TextInfo.cpp: Added.
3325         (WebKit::TextInfo::encode):
3326         (WebKit::TextInfo::decode):
3327         * Shared/TextInfo.h: Added.
3328         (WebKit::TextInfo::TextInfo):
3329         Add class to represent the location and style of a run of text.
3330
3331         * UIProcess/PageClient.h:
3332         * UIProcess/API/mac/PageClientImpl.h:
3333         * UIProcess/API/mac/PageClientImpl.mm:
3334         (WebKit::PageClientImpl::didPerformDictionaryLookup):
3335         Invoke the dictionary popup.
3336
3337         * UIProcess/API/mac/WKView.mm:
3338         (-[WKView performLookupAtCurrentMouseLocation]):
3339         Tell the WebProcess to get get the text under the mouse and cause
3340         the dictionary popup to appear.
3341
3342         * UIProcess/API/mac/WKViewPrivate.h:
3343         Add performLookupAtCurrentMouseLocation.
3344
3345         * UIProcess/WebPageProxy.cpp:
3346         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
3347         (WebKit::WebPageProxy::didPerformDictionaryLookup):
3348         * UIProcess/WebPageProxy.h:
3349         * UIProcess/WebPageProxy.messages.in:
3350         * WebProcess/WebPage/WebPage.cpp:
3351         * WebProcess/WebPage/WebPage.h:
3352         * WebProcess/WebPage/WebPage.messages.in:
3353         Pipe messages through.
3354
3355         * WebProcess/WebPage/mac/WebPageMac.mm:
3356         (WebKit::characterRangeAtPoint): Fix to return PassRefPtr
3357         and not potentially stale pointers.
3358
3359         (WebKit::WebPage::characterIndexForPoint):
3360         Change to use a RefPtr.
3361
3362         (WebKit::WebPage::performDictionaryLookupAtLocation):
3363         Add simple heuristic to get the word at the current point (or the current selection
3364         if it is at that point) and grab the style of the word to send the UIProcess.
3365
3366         * WebKit2.pro:
3367         * WebKit2.xcodeproj/project.pbxproj:
3368         * win/WebKit2.vcproj:
3369         Add new files.
3370
3371 2011-02-17  Brian Weinstein  <bweinstein@apple.com>
3372
3373         Qt build fix.
3374
3375         * WebKit2.pro: Update after renaming of MemoryCache to ResourceCache.
3376
3377 2011-02-17  Brian Weinstein  <bweinstein@apple.com>
3378
3379         Mac build fix.
3380
3381         * WebKit2.xcodeproj/project.pbxproj: Use relative to group instead of absolute paths. Not everyone's home
3382             directory is /Users/brian_weinstein.
3383
3384 2011-02-16  Brian Weinstein  <bweinstein@apple.com>
3385
3386         Reviewed by Brady Eidson.
3387
3388         WebKit2: Need a way to manage the WebCore Cache
3389         https://bugs.webkit.org/show_bug.cgi?id=54501
3390         
3391         Implement a WebKit2 API to manage the WebCore memory cache. This API exposes three functions:
3392         
3393         1) A method to get a list of all security origins that have entries in the WebCore memory cache.
3394         2) A method to remove all entries in the WebCore memory cache from a SecurityOrigin.
3395         3) A method to remove all entries from the WebCore memory cache.
3396
3397         * Platform/CoreIPC/MessageID.h: Add two new MessageClasses.
3398         * Shared/API/c/WKBase.h:
3399         * Shared/APIObject.h: Add a CacheManager type.
3400         * Shared/WebSecurityOrigin.h: Typedef WKCacheManagerRef.
3401         (WebKit::WebSecurityOrigin::createFromString): Creates a WebCore::SecurityOrigin using 
3402             SecurityOrigin::createFromString.
3403         (WebKit::WebSecurityOrigin::toString): Calls through to SecurityOrigin::toString.
3404         * UIProcess/API/C/WKAPICast.h:
3405
3406         * UIProcess/API/C/WKCacheManager.cpp: Added.
3407         (WKCacheManagerGetTypeID): Returns the WebResourceCacheManagerProxy type.
3408         (WKCacheManagerGetCacheOrigins): Calls through to WebResourceCacheManagerProxy::getCacheOrigins.
3409         (callGetCacheOriginsBlockBlockAndDispose):
3410         (WKCacheManagerGetCacheOrigins_b):
3411         (WKCacheManagerDeleteCacheForOrigin): Calls through to WebResourceCacheManagerProxy::deleteCacheForOrigin.
3412         (WKCacheManagerDeleteAllCache): Calls through to WebResourceCacheManagerProxy::deleteAllCache.
3413         * UIProcess/API/C/WKCacheManager.h: Added.
3414
3415         * UIProcess/API/C/WKContext.cpp:
3416         (WKContextGetCacheManager): Calls to get the WebResourceCacheManagerProxy.
3417         * UIProcess/API/C/WKContext.h:
3418
3419         * UIProcess/WebResourceCacheManagerProxy.cpp: Added.
3420         (WebKit::WebResourceCacheManagerProxy::create): Calls through to the constructor.
3421         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Initialize the m_webContext variable.
3422         (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy):
3423         (WebKit::WebResourceCacheManagerProxy::invalidate): Invalidate the callback map.
3424         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Call through to the web process to get the cache
3425             origins.
3426         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Call the callback.
3427         (WebKit::WebResourceCacheManagerProxy::deleteCacheForOrigin): Call through to the web process to delete cache
3428             for the given origin. 
3429         (WebKit::WebResourceCacheManagerProxy::deleteAllCache): Call through to the web process to delete all of the cache.
3430         * UIProcess/WebResourceCacheManagerProxy.h: Added.
3431         (WebKit::WebResourceCacheManagerProxy::clearContext):
3432         (WebKit::WebResourceCacheManagerProxy::type):
3433         * UIProcess/WebResourceCacheManagerProxy.messages.in: Added.
3434
3435         * UIProcess/WebContext.cpp:
3436         (WebKit::WebContext::WebContext): Initialize new member variable.
3437         (WebKit::WebContext::~WebContext):  Invalidates new member variable.
3438         (WebKit::WebContext::didReceiveMessage): Passes cache messages to the cache manager.
3439         * UIProcess/WebContext.h:
3440         (WebKit::WebContext::cacheManagerProxy):
3441         * UIProcess/WebProcessProxy.cpp:
3442         (WebKit::WebProcessProxy::didReceiveMessage): Add a new message class.
3443
3444         * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Added.
3445         (WebKit::WebResourceCacheManager::shared):
3446         (WebKit::WebResourceCacheManager::WebResourceCacheManager):
3447         (WebKit::WebResourceCacheManager::~WebResourceCacheManager):
3448         (WebKit::WebResourceCacheManager::didReceiveMessage): Calls through to didReceiveWebResourceCacheManagerMessage.
3449         (WebKit::WebResourceCacheManager::getCacheOrigins): Gets a list of origins with cache entries from the memory
3450             cache, and puts them into a vector to send to the UI process.
3451         (WebKit::WebResourceCacheManager::deleteCacheForOrigin): Calls through to ResourceCache to delete all cache entries
3452             from a given origin.
3453         (WebKit::WebResourceCacheManager::deleteAllCache):
3454         * WebProcess/ResourceCache/WebResourceCacheManager.h: Added.
3455         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Added.
3456
3457         * WebProcess/WebProcess.cpp:
3458         (WebKit::WebProcess::didReceiveMessage):
3459         (WebKit::WebProcess::clearResourceCaches): Tell the memory cache to evict its resources. This was done on WebKit1, 
3460             but not WebKit2.
3461         * WebProcess/WebProcess.h:
3462         
3463         * WebKit2.xcodeproj/project.pbxproj: Added new files.
3464         * win/WebKit2.vcproj: Ditto.
3465         * win/WebKit2Common.vsprops: Added new include directory.
3466         * win/WebKit2Generated.make: Added new header.
3467
3468 2011-02-16  David Hyatt  <hyatt@apple.com>
3469
3470         Reviewed by Dan Bernstein.
3471
3472         https://bugs.webkit.org/show_bug.cgi?id=54244
3473         
3474         Convert the line box tree to floating point and eliminate font rounding hacks.  This patch removes all of the rounding
3475         hacks from the Font code and makes sure all Font APIs involving width measurement and width offsets use floats.
3476         
3477         The line box tree's x, y and logicalWidth members have all been converted to floats and all of the line box APIs have
3478         been changed as well.
3479         
3480         In terms of pixel adjustments, overflow is using an enclosing model (so it will be enclosingIntRect of a line box's x/y/width/height).
3481         
3482         Background and border painting is using a rounding model, so borders and backgrounds will round to the nearest pixel when painting.
3483         
3484         Replaced elements still snap to integer positions on lines, and they use a rounding model as well, although their underlying line boxes
3485         still have a precise floating point position.
3486
3487         Justification will now allow subpixel positioning to occur as well.  Platforms that don't support subpixel positioning should already
3488         be rounding justification spacing in their font code.
3489
3490         Many layout test results change on Mac, since rounding hacks were used there and are now gone.
3491
3492         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
3493         (WebKit::WebPopupMenu::setUpPlatformData):
3494
3495 2011-02-10  Luiz Agostini  <luiz.agostini@openbossa.org>
3496
3497         Reviewed by Adam Roben.
3498
3499         HTML5 <details> and <summary>: localized text
3500         https://bugs.webkit.org/show_bug.cgi?id=54260
3501
3502         The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
3503         provide the default label to be used by a <details> tag that has no <summary> child.
3504
3505         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
3506         (WebKit::WebPlatformStrategies::defaultDetailsSummaryText):
3507         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
3508
3509 2011-02-17  Adam Roben  <aroben@apple.com>
3510
3511         Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl
3512
3513         Fixes <http://webkit.org/b/54646> <rdar://problem/9016889> Assertion failure in
3514         FrameView::paintContents when calling WKPageForceRepaint on a page that uses accelerated
3515         compositing
3516
3517         Reviewed by Anders Carlsson.
3518
3519         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3520         (WebKit::DrawingAreaImpl::forceRepaint): Lay out before we do anything else.
3521
3522 2011-02-17  Alejandro G. Castro  <alex@igalia.com>
3523
3524         Reviewed by Martin Robinson.
3525
3526         [GTK] Add WKPluginSiteDataManager.cpp compilation after r78647
3527         https://bugs.webkit.org/show_bug.cgi?id=54564
3528
3529         * GNUmakefile.am: Added files to compilation.
3530         * Shared/Plugins/Netscape/NetscapePluginModule.h: used
3531         npruntime_internal.h in the include to avoid problems with X
3532         types.
3533         * WebProcess/WebProcess.cpp:
3534         (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): fixed
3535         ambiguous reference to Font caused by the X headers required by
3536         the plugins.
3537
3538 2011-02-16  Matthew Delaney  <mdelaney@apple.com>
3539
3540         Reviewed by Simon Fraser.
3541
3542         Allow acceleratesDrawing for WebKit2
3543         https://bugs.webkit.org/show_bug.cgi?id=54511
3544
3545         Plumb through preference for accelerated drawing.
3546         
3547         If accelerated drawing is enabled, keep the DrawingAreaImpl in
3548         accelerated compositing mode.
3549
3550         * Shared/WebPreferencesStore.h:
3551         * UIProcess/API/C/WKPreferences.cpp:
3552         (WKPreferencesSetAcceleratedDrawingEnabled):
3553         (WKPreferencesGetAcceleratedDrawingEnabled):
3554         * UIProcess/API/C/WKPreferencesPrivate.h:
3555         * WebProcess/WebPage/DrawingAreaImpl.cpp:
3556         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
3557         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
3558         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
3559         * WebProcess/WebPage/DrawingAreaImpl.h:
3560         * WebProcess/WebPage/WebPage.cpp:
3561         (WebKit::WebPage::updatePreferences):
3562
3563 2011-02-16  Yael Aharon  <yael.aharon@nokia.com>
3564
3565