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