454a24dbcf046b460837f209b8a2c9c1c7514bbb
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2011-02-23  Benjamin Poulain  <benjamin.poulain@nokia.com>
2
3         Reviewed by Andreas Kling.
4
5         [Qt] [WK2] When the context menu is empty, we should still send the signal QWKPage::showContextMenu()
6         https://bugs.webkit.org/show_bug.cgi?id=54996
7
8         Send the signal QWKPage::showContextMenu() with an empty menu even if the content menu generated
9         is empty/contain only disabled elements.
10
11         * UIProcess/API/qt/qgraphicswkview.cpp:
12         (QGraphicsWKView::showContextMenu):
13         * UIProcess/qt/WebContextMenuProxyQt.cpp:
14         (WebKit::WebContextMenuProxyQt::showContextMenu):
15
16 2011-02-22  Dan Bernstein  <mitz@apple.com>
17
18         LLVM Compiler build fix.
19
20         * Scripts/webkit2/messages.py:
21         * WebProcess/ApplicationCache/WebApplicationCacheManager.h:
22
23 2011-02-22  Laszlo Gombos  <laszlo.1.gombos@nokia.com>
24
25         Reviewed by Alexey Proskuryakov.
26
27         Drop the language tag part from the User Agent string
28         https://bugs.webkit.org/show_bug.cgi?id=54560
29
30         * UIProcess/gtk/WebPageProxyGtk.cpp:
31         (WebKit::WebPageProxy::standardUserAgent):
32
33         * UIProcess/mac/WebPageProxyMac.mm:
34         (WebKit::WebPageProxy::standardUserAgent):
35
36         * UIProcess/qt/WebPageProxyQt.cpp:
37         (WebKit::WebPageProxy::standardUserAgent):
38
39         * UIProcess/win/WebPageProxyWin.cpp:
40         (WebKit::WebPageProxy::standardUserAgent): Drop the language tag
41         part and fix style.
42
43 2011-02-22  Sam Weinig  <sam@webkit.org>
44
45         Reviewed by Anders Carlsson.
46
47         Add WebKit2 API to force a repaint with an invalidation
48         https://bugs.webkit.org/show_bug.cgi?id=55015
49
50         * Shared/ForceRepaintFlags.h: Added.
51         * UIProcess/API/C/WKPage.cpp:
52         (WKPageForceRepaint):
53         (WKPageForceRepaintWithInvalidation):
54         * UIProcess/API/C/WKPage.h:
55         Add WKPageForceRepaintWithInvalidation which does the same thing WKPageForceRepaint
56         but also calls setNeedsDisplay on the entire bounds of the page.
57
58         * UIProcess/WebPageProxy.cpp:
59         (WebKit::WebPageProxy::forceRepaint):
60         * UIProcess/WebPageProxy.h:
61         * WebProcess/WebPage/WebPage.cpp:
62         (WebKit::WebPage::forceRepaint):
63         * WebProcess/WebPage/WebPage.h:
64         * WebProcess/WebPage/WebPage.messages.in:
65         Pipe the flag down to the WebProcess.
66
67         * WebKit2.pro:
68         * WebKit2.xcodeproj/project.pbxproj:
69         * win/WebKit2.vcproj:
70         Add ForceRepaintFlags.h.
71
72 2011-02-22  Simon Fraser  <simon.fraser@apple.com>
73
74         Reviewed by Dan Bernstein.
75
76         <rdar://problem/9039670>
77         
78         Make sure that we set the accelerateDrawing property on the LayerTreeHosts's
79         non-composited content layer if the preference is set.
80
81         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
82         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
83
84 2011-02-22  Brady Eidson  <beidson@apple.com>
85
86         Fix it Windows-style.
87
88         * WebProcess/WebProcess.cpp:
89         (WebKit::WebProcess::getSitesWithPluginData):
90         (WebKit::WebProcess::clearPluginSiteData):
91
92 2011-02-22  Anders Carlsson  <andersca@apple.com>
93
94         Reviewed by Dan Bernstein.
95
96         Rename WebProcess::shutdownIfPossible to WebProcess::terminateIfPossible
97         https://bugs.webkit.org/show_bug.cgi?id=55008
98
99         * WebProcess/Downloads/DownloadManager.cpp:
100         (WebKit::DownloadManager::downloadFinished):
101         * WebProcess/WebProcess.cpp:
102         (WebKit::WebProcess::removeWebPage):
103         (WebKit::WebProcess::terminateIfPossible):
104         (WebKit::WebProcess::getSitesWithPluginData):
105         * WebProcess/WebProcess.h:
106         * WebProcess/gtk/WebProcessGtk.cpp:
107         (WebKit::WebProcess::platformTerminate):
108         * WebProcess/mac/WebProcessMac.mm:
109         (WebKit::WebProcess::platformTerminate):
110         * WebProcess/qt/WebProcessQt.cpp:
111         (WebKit::WebProcess::platformTerminate):
112         * WebProcess/win/WebProcessWin.cpp:
113         (WebKit::WebProcess::platformTerminate):
114
115 2011-02-22  Brady Eidson  <beidson@apple.com>
116
117         Windows build-fix attempt.
118
119         * win/WebKit2Generated.make:
120
121 2011-02-22  Csaba Osztrogon√°c  <ossy@webkit.org>
122
123         Unreviewed.
124
125         <rdar://problem/8762042> and  https://bugs.webkit.org/show_bug.cgi?id=54514
126         API to view and delete Application Cache data by origin.
127
128         [Qt][WK2] Buildfix after r79364.
129
130         * DerivedSources.pro:
131         * WebKit2.pri:
132
133 2011-02-22  Brady Eidson  <beidson@apple.com>
134
135         Reviewed by Anders Carlsson and looked over by Brian Weinstein.
136
137         <rdar://problem/8762042> and https://bugs.webkit.org/show_bug.cgi?id=54514
138         API to view and delete Application Cache data by origin.
139
140         I couldn't help myself - I also re-alphabetized WebResourceCacheManager in many places where
141         it's sorting was wrong due to a last minute name change.
142
143         Project file changes:
144         * GNUmakefile.am:
145         * win/WebKit2.vcproj:
146         * win/WebKit2Common.vsprops:
147         * win/WebKit2Generated.make:
148         * WebKit2.pro:
149         * WebKit2.xcodeproj/project.pbxproj:
150
151         WK2 build-system and API paperwork:
152         * DerivedSources.make:
153         * Platform/CoreIPC/MessageID.h:
154         * Shared/API/c/WKBase.h:
155         * Shared/APIObject.h:
156         * UIProcess/API/C/WKAPICast.h:
157
158         Add a helper to perform an ArrayCallback with a Vector of SecurityOriginDatas:
159         * Shared/SecurityOriginData.cpp:
160         (WebKit::performAPICallbackWithSecurityOriginDataVector):
161         * Shared/SecurityOriginData.h:
162         * UIProcess/WebResourceCacheManagerProxy.cpp:
163         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
164
165         Add an ApplicationCacheManagerProxy to the context and invalidate it at the appropriate times:
166         * UIProcess/WebContext.cpp:
167         (WebKit::WebContext::WebContext):
168         (WebKit::WebContext::~WebContext):
169         (WebKit::WebContext::processDidClose):
170         (WebKit::WebContext::didReceiveMessage): Route messages to the right proxy.
171         * UIProcess/WebContext.h:
172         (WebKit::WebContext::applicationCacheManagerProxy):
173         (WebKit::WebContext::resourceCacheManagerProxy):
174
175         Add API to get the ApplicationCacheManager for a context:
176         * UIProcess/API/C/WKContext.cpp:
177         (WKContextGetApplicationCacheManager):
178         (WKContextGetResourceCacheManager):
179         * UIProcess/API/C/WKContext.h:
180
181         Route messages to the right place:
182         * UIProcess/WebProcessProxy.cpp:
183         (WebKit::WebProcessProxy::didReceiveMessage):
184         * WebProcess/WebProcess.cpp:
185         (WebKit::WebProcess::didReceiveMessage):
186
187         Add the API object, which wraps to WebApplicationCacheManagerProxy:
188         * UIProcess/API/C/WKApplicationCacheManager.cpp: Added.
189         (WKApplicationCacheManagerGetTypeID):
190         (WKApplicationCacheManagerGetApplicationCacheOrigins):
191         (WKApplicationCacheManagerDeleteEntriesForOrigin):
192         (WKApplicationCacheManagerDeleteAllEntries):
193         * UIProcess/API/C/WKApplicationCacheManager.h: Added.
194
195         The UIProcess implementation of the manager to send messages to the WebProcess and pipe a callback back up to the client:
196         * UIProcess/WebApplicationCacheManagerProxy.cpp: Added.
197         (WebKit::WebApplicationCacheManagerProxy::create):
198         (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy):
199         (WebKit::WebApplicationCacheManagerProxy::~WebApplicationCacheManagerProxy):
200         (WebKit::WebApplicationCacheManagerProxy::invalidate):
201         (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage):
202         (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
203         (WebKit::WebApplicationCacheManagerProxy::didGetApplicationCacheOrigins): Use performAPICallbackWithSecurityOriginDataVector here.
204         (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
205         (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries):
206         * UIProcess/WebApplicationCacheManagerProxy.h: Added.
207         (WebKit::WebApplicationCacheManagerProxy::clearContext):
208         (WebKit::WebApplicationCacheManagerProxy::type):
209         * UIProcess/WebApplicationCacheManagerProxy.messages.in: Added.
210
211         The WebProcess implementation to response to UIProcess messages and actually do the dirty-work in WebCore:
212         * WebProcess/ApplicationCache: Added.
213         * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: Added.
214         (WebKit::WebApplicationCacheManager::shared):
215         (WebKit::WebApplicationCacheManager::WebApplicationCacheManager):
216         (WebKit::WebApplicationCacheManager::didReceiveMessage):
217         (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins):
218         (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin):
219         (WebKit::WebApplicationCacheManager::deleteAllEntries):
220         * WebProcess/ApplicationCache/WebApplicationCacheManager.h: Added.
221         * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: Added.
222
223 2011-02-22  Anders Carlsson  <andersca@apple.com>
224
225         Reviewed by Sam Weinig.
226
227         Get rid of WebProcessManager
228         https://bugs.webkit.org/show_bug.cgi?id=55001
229
230         WebProcessManager had become a stupid map of WebContext > WebProcess relations,
231         which isn't really useful since the WebContext already knows about its process.
232
233         * Shared/WebURLRequest.cpp:
234         * UIProcess/API/mac/WKView.mm:
235         * UIProcess/WebContext.cpp:
236         (WebKit::WebContext::~WebContext):
237         (WebKit::WebContext::ensureWebProcess):
238         (WebKit::WebContext::processDidFinishLaunching):
239         * UIProcess/WebProcessManager.cpp: Removed.
240         * UIProcess/WebProcessManager.h: Removed.
241         * UIProcess/WebProcessProxy.cpp:
242         (WebKit::WebProcessProxy::didClose):
243         * WebKit2.pro:
244         * WebKit2.xcodeproj/project.pbxproj:
245         * win/WebKit2.vcproj:
246
247 2011-02-22  Anders Carlsson  <andersca@apple.com>
248
249         Reviewed by Darin Adler.
250
251         Get rid of WebProcessManager::getAllWebProcessContexts
252         https://bugs.webkit.org/show_bug.cgi?id=55000
253
254         * Shared/WebURLRequest.cpp:
255         (WebKit::WebURLRequest::setDefaultTimeoutInterval):
256         Call WebContext::allContexts instead.
257
258         * UIProcess/WebContext.cpp:
259         * UIProcess/WebContext.h:
260         Add a vector of WebContext objects. Update it when creating and destroying contexts.
261
262         * UIProcess/WebProcessManager.cpp:
263         * UIProcess/WebProcessManager.h:
264         Remove WebProcessManager::getAllWebProcessContexts.
265
266 2011-02-22  Sam Weinig  <sam@webkit.org>
267
268         Reviewed by Anders Carlsson.
269
270         Re-add early bail out in dispatchDecidePolicyForNavigationAction with prevents
271         a crash running fast/loader/empty-embed-src-attribute.html. This matches a 
272         bail out in the default policy delegate in WebKit1.
273
274         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
275         (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
276
277 2011-02-22  Anders Carlsson  <andersca@apple.com>
278
279         Reviewed by Dan Bernstein.
280
281         Grammar correction from Spelling & Grammar window doesn't work
282         https://bugs.webkit.org/show_bug.cgi?id=54982
283         <rdar://problem/8940918>
284
285         * UIProcess/API/mac/WKView.mm:
286         (-[WKView isGrammarCheckingEnabled]):
287         (-[WKView setGrammarCheckingEnabled:]):
288         Call down to the text checker.
289
290         * UIProcess/TextChecker.h:
291         Add updateSpellingUIWithGrammarString.
292
293         * UIProcess/WebPageProxy.cpp:
294         (WebKit::WebPageProxy::updateSpellingUIWithGrammarString):
295         Call TextChecker::updateSpellingUIWithGrammarString.
296
297         * UIProcess/WebPageProxy.messages.in:
298         Add UpdateSpellingUIWithGrammarString message.
299
300         * UIProcess/gtk/TextCheckerGtk.cpp:
301         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
302         * UIProcess/qt/TextCheckerQt.cpp:
303         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
304         * UIProcess/win/TextCheckerWin.cpp:
305         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
306         Add stubs.
307
308         * UIProcess/mac/TextCheckerMac.mm:
309         (WebKit::TextChecker::updateSpellingUIWithGrammarString):
310         Update the spelling panel.
311
312         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
313         (WebKit::WebEditorClient::updateSpellingUIWithGrammarString):
314         Send an UpdateSpellingUIWithGrammarString message to the UI process.
315
316 2011-02-22  Balazs Kelemen  <kbalazs@webkit.org>
317
318         Reviewed by Anders Carlsson.
319
320         notImplemented() should behave identical in WebCore and WebKit2
321         https://bugs.webkit.org/show_bug.cgi?id=54449
322
323         Use NotImplemented.h from WebCore. Initialize logging channels.
324         Remove the WebKit2 concept of notImplemented().
325
326         * Platform/gtk/SharedMemoryGtk.cpp:
327         * Platform/gtk/WorkQueueGtk.cpp:
328         * Platform/qt/WorkQueueQt.cpp:
329         * Platform/win/WorkQueueWin.cpp:
330         * Shared/NotImplemented.h: Removed.
331         * Shared/Plugins/NPIdentifierData.cpp:
332         * Shared/Plugins/NPRemoteObjectMap.cpp:
333         * Shared/Plugins/NPVariantData.cpp:
334         * Shared/cairo/ShareableBitmapCairo.cpp:
335         * Shared/gtk/ShareableBitmapGtk.cpp:
336         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
337         * Shared/qt/WebCoreArgumentCodersQt.cpp:
338         * Shared/win/LayerTreeContextWin.cpp:
339         * UIProcess/API/mac/PageClientImpl.mm:
340         * UIProcess/API/qt/qwkpage.cpp:
341         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
342         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
343         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
344         * UIProcess/WebContext.cpp:
345         (WebKit::WebContext::WebContext):
346         * UIProcess/WebInspectorProxy.cpp:
347         * UIProcess/gtk/TextCheckerGtk.cpp:
348         * UIProcess/gtk/WebInspectorGtk.cpp:
349         * UIProcess/gtk/WebPreferencesGtk.cpp:
350         * UIProcess/qt/TextCheckerQt.cpp:
351         * UIProcess/qt/WebInspectorProxyQt.cpp:
352         * UIProcess/win/TextCheckerWin.cpp:
353         * UIProcess/win/WebContextMenuProxyWin.cpp:
354         * WebKit2.pro:
355         * WebKit2.xcodeproj/project.pbxproj:
356         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
357         * WebProcess/Downloads/curl/DownloadCurl.cpp:
358         * WebProcess/Downloads/mac/DownloadMac.mm:
359         * WebProcess/Downloads/qt/DownloadQt.cpp:
360         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
361         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
362         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
363         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
364         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
365         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
366         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
367         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
368         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
369         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
370         * WebProcess/WebCoreSupport/WebDragClient.cpp:
371         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
372         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
373         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
374         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
375         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
376         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
377         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
378         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
379         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
380         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
381         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
382         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
383         * WebProcess/WebProcess.cpp:
384         (WebKit::WebProcess::WebProcess):
385         * WebProcess/gtk/WebProcessGtk.cpp:
386         * config.h:
387         * win/WebKit2.vcproj:
388
389 2011-02-22  Brian Weinstein  <bweinstein@apple.com>
390
391         Rubber-stamped by Brady Eidson.
392
393         Invalidate the WebResourceCacheManagerProxy in WebContext::processDidClose.
394
395         * UIProcess/WebContext.cpp:
396         (WebKit::WebContext::processDidClose):
397
398 2011-02-21  Adam Roben  <aroben@apple.com>
399
400         Make DrawingAreaProxyImpl keep track of the most recent state ID it sent to the web process
401
402         This will be useful for sending repeated messages for the same state ID to the web process.
403         We don't do this currently, but will need to if we're asked to paint after we've thrown away
404         our backing store to save memory.
405
406         Fixes <http://webkit.org/b/54916> DrawingAreaProxyImpl should keep track of the state ID it
407         last sent to the web process
408
409         Reviewed by Anders Carlsson.
410
411         * UIProcess/DrawingAreaProxyImpl.cpp:
412         (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): Initialize m_requestedStateID, and
413         reordered member initialization to match the new declaration order.
414         (WebKit::DrawingAreaProxyImpl::didUpdateState): Added an assertion that the stateID we got
415         from the web process is no newer than the most recent one we requested.
416         (WebKit::DrawingAreaProxyImpl::sendUpdateState): Changed to increment and send
417         m_requestedStateID instead of a new global stateID.
418
419         * UIProcess/DrawingAreaProxyImpl.h: Added m_requestedStateID, and moved the state IDs before
420         other data members. Also beefed the comment explaining m_currentStateID.
421
422 2011-02-22  Andras Becsi  <abecsi@webkit.org>
423
424         Reviewed by Laszlo Gombos.
425
426         [Qt] Redesign the build system
427         https://bugs.webkit.org/show_bug.cgi?id=51339
428
429         Part 2.
430
431         Build WebCore as a static library, compile the WebKit API and WebKit2 API
432         in a final step and link to WebKit2, WebCore and JSC libraries to fix
433         linking issues resulting from stripped away symbols.
434
435         * WebKit2.pri: Add include paths.
436         * WebKit2.pro: Move include paths to WebKit2.pri and move
437         the API source to WebKit/qt/QtWebKit.pro
438
439 2011-02-22  Benjamin Poulain  <benjamin.poulain@nokia.com>
440
441         Reviewed by Kenneth Rohde Christiansen.
442
443         [Qt] [WK2] Improve the memory handling of the context menu for WebKit 2
444         https://bugs.webkit.org/show_bug.cgi?id=54902
445
446         Refactor the context menu handling of Qt to make it simpler to manage memory.
447
448         WebContextMenuProxyQt uses smart pointer for all the references to menu so
449         there is no need to delete it explicitely.
450
451         Passing the QMenu from QWKPage to the client of the signal now uses a QSharedPointer so
452         the client can choose to handle the memory, but there is no leak if it does not.
453
454         * UIProcess/API/qt/qgraphicswkview.cpp:
455         (QGraphicsWKView::QGraphicsWKView):
456         (QGraphicsWKView::showContextMenu):
457         * UIProcess/API/qt/qgraphicswkview.h:
458         * UIProcess/API/qt/qwkpage.h:
459         * UIProcess/qt/WebContextMenuProxyQt.cpp:
460         (WebKit::WebContextMenuProxyQt::showContextMenu):
461         (WebKit::WebContextMenuProxyQt::createContextMenu):
462         * UIProcess/qt/WebContextMenuProxyQt.h:
463
464 2011-02-22  Philippe Normand  <pnormand@igalia.com>
465
466         Reviewed by Xan Lopez.
467
468         [GTK] make distcheck fails
469         https://bugs.webkit.org/show_bug.cgi?id=54943
470
471         Removed reference to NotImplemented.h which was removed.
472
473         * GNUmakefile.am:
474
475 2011-02-22  Kimmo Kinnunen  <kimmo.t.kinnunen@nokia.com>
476
477         Reviewed by Kenneth Rohde Christiansen.
478
479         [Qt] QtWebProcess should be installed with 'make install'
480         https://bugs.webkit.org/show_bug.cgi?id=44100
481
482         Follow the standard in other project files and allow install
483         location to be changed with INSTALL_BINS variable.
484
485         * WebProcess.pro: Install QtWebProcess.
486
487 2011-02-22  Sheriff Bot  <webkit.review.bot@gmail.com>
488
489         Unreviewed, rolling out r79296.
490         http://trac.webkit.org/changeset/79296
491         https://bugs.webkit.org/show_bug.cgi?id=54941
492
493         Breaks compilation on SnowLeapard Intel Release (Requested by
494         kbalazs_ on #webkit).
495
496         * Platform/gtk/SharedMemoryGtk.cpp:
497         * Platform/gtk/WorkQueueGtk.cpp:
498         * Platform/qt/WorkQueueQt.cpp:
499         * Platform/win/WorkQueueWin.cpp:
500         * Shared/NotImplemented.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp.
501         * Shared/Plugins/NPIdentifierData.cpp:
502         * Shared/Plugins/NPRemoteObjectMap.cpp:
503         * Shared/Plugins/NPVariantData.cpp:
504         * Shared/cairo/ShareableBitmapCairo.cpp:
505         * Shared/gtk/ShareableBitmapGtk.cpp:
506         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
507         * Shared/qt/WebCoreArgumentCodersQt.cpp:
508         * Shared/win/LayerTreeContextWin.cpp:
509         * UIProcess/API/mac/PageClientImpl.mm:
510         * UIProcess/API/qt/qwkpage.cpp:
511         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
512         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
513         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
514         * UIProcess/WebContext.cpp:
515         (WebKit::WebContext::WebContext):
516         * UIProcess/WebInspectorProxy.cpp:
517         * UIProcess/gtk/TextCheckerGtk.cpp:
518         * UIProcess/gtk/WebInspectorGtk.cpp:
519         * UIProcess/gtk/WebPreferencesGtk.cpp:
520         * UIProcess/qt/TextCheckerQt.cpp:
521         * UIProcess/qt/WebInspectorProxyQt.cpp:
522         * UIProcess/win/TextCheckerWin.cpp:
523         * UIProcess/win/WebContextMenuProxyWin.cpp:
524         * WebKit2.pro:
525         * WebKit2.xcodeproj/project.pbxproj:
526         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
527         * WebProcess/Downloads/curl/DownloadCurl.cpp:
528         * WebProcess/Downloads/mac/DownloadMac.mm:
529         * WebProcess/Downloads/qt/DownloadQt.cpp:
530         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
531         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
532         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
533         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
534         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
535         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
536         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
537         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
538         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
539         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
540         * WebProcess/WebCoreSupport/WebDragClient.cpp:
541         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
542         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
543         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
544         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
545         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
546         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
547         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
548         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
549         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
550         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
551         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
552         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
553         * WebProcess/WebProcess.cpp:
554         (WebKit::WebProcess::WebProcess):
555         * WebProcess/gtk/WebProcessGtk.cpp:
556         * config.h:
557         * win/WebKit2.vcproj:
558
559 2011-02-16  Balazs Kelemen  <kbalazs@webkit.org>
560
561         Reviewed by Anders Carlsson.
562
563         notImplemented() should behave identical in WebCore and WebKit2
564         https://bugs.webkit.org/show_bug.cgi?id=54449
565
566         Use NotImplemented.h from WebCore. Initialize logging channels.
567         Remove the WebKit2 concept of notImplemented().
568
569         * Platform/gtk/SharedMemoryGtk.cpp:
570         * Platform/gtk/WorkQueueGtk.cpp:
571         * Platform/qt/WorkQueueQt.cpp:
572         * Platform/win/WorkQueueWin.cpp:
573         * Shared/NotImplemented.h: Removed.
574         * Shared/Plugins/NPIdentifierData.cpp:
575         * Shared/Plugins/NPRemoteObjectMap.cpp:
576         * Shared/Plugins/NPVariantData.cpp:
577         * Shared/cairo/ShareableBitmapCairo.cpp:
578         * Shared/gtk/ShareableBitmapGtk.cpp:
579         * Shared/gtk/WebCoreArgumentCodersGtk.cpp:
580         * Shared/qt/WebCoreArgumentCodersQt.cpp:
581         * Shared/win/LayerTreeContextWin.cpp:
582         * UIProcess/API/qt/qwkpage.cpp:
583         * UIProcess/Launcher/gtk/ThreadLauncherGtk.cpp:
584         * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
585         * UIProcess/Plugins/gtk/PluginInfoStoreGtk.cpp:
586         * UIProcess/WebContext.cpp:
587         (WebKit::WebContext::WebContext):
588         * UIProcess/WebInspectorProxy.cpp:
589         * UIProcess/gtk/TextCheckerGtk.cpp:
590         * UIProcess/gtk/WebInspectorGtk.cpp:
591         * UIProcess/gtk/WebPreferencesGtk.cpp:
592         * UIProcess/qt/TextCheckerQt.cpp:
593         * UIProcess/qt/WebInspectorProxyQt.cpp:
594         * UIProcess/win/TextCheckerWin.cpp:
595         * UIProcess/win/WebContextMenuProxyWin.cpp:
596         * WebKit2.pro:
597         * WebProcess/Downloads/cf/DownloadCFNet.cpp:
598         * WebProcess/Downloads/curl/DownloadCurl.cpp:
599         * WebProcess/Downloads/mac/DownloadMac.mm:
600         * WebProcess/Downloads/qt/DownloadQt.cpp:
601         * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
602         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
603         * WebProcess/Plugins/Netscape/NPJSObject.cpp:
604         * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
605         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
606         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
607         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
608         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
609         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
610         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
611         * WebProcess/WebCoreSupport/WebDragClient.cpp:
612         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
613         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
614         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
615         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
616         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
617         * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp:
618         * WebProcess/WebCoreSupport/gtk/WebPopupMenuGtk.cpp:
619         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
620         * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
621         * WebProcess/WebCoreSupport/qt/WebContextMenuClientQt.cpp:
622         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
623         * WebProcess/WebPage/qt/WebInspectorQt.cpp:
624         * WebProcess/WebProcess.cpp:
625         (WebKit::WebProcess::WebProcess):
626         * WebProcess/gtk/WebProcessGtk.cpp:
627
628 2011-02-21  Timothy Hatcher  <timothy@apple.com>
629
630         Set and update the window title for the Web Inspector in WebKit2.
631
632         https://webkit.org/b/50945
633         rdar://problem/8762410
634
635         Reviewed by Adam Roben.
636
637         * UIProcess/WebInspectorProxy.cpp:
638         (WebKit::WebInspectorProxy::inspectedURLChanged): Added. Call platformInspectedURLChanged.
639         * UIProcess/WebInspectorProxy.h:
640         * UIProcess/WebInspectorProxy.messages.in: Added InspectedURLChanged.
641         * UIProcess/mac/WebInspectorProxyMac.mm:
642         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
643         * UIProcess/win/WebInspectorProxyWin.cpp:
644         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Set the window title.
645         * UIProcess/gtk/WebInspectorGtk.cpp:
646         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
647         * UIProcess/qt/WebInspectorProxyQt.cpp:
648         (WebKit::WebInspectorProxy::platformInspectedURLChanged): Added. Not implemented.
649         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
650         (WebKit::WebInspectorFrontendClient::inspectedURLChanged): Call WebInspector::inspectedURLChanged.
651         * WebProcess/WebPage/WebInspector.cpp:
652         (WebKit::WebInspector::inspectedURLChanged): Added. Send the InspectedURLChanged message.
653         * WebProcess/WebPage/WebInspector.h:
654
655 2011-02-21  Sam Weinig  <sam@webkit.org>
656
657         Reviewed by Anders Carlsson.
658
659         Can't paste from 3rd party text editor into WebKit2 window.
660         <rdar://problem/8978624>
661
662         * WebProcess/com.apple.WebProcess.sb:
663
664 2011-02-21  Anders Carlsson  <andersca@apple.com>
665
666         Reviewed by Dan Bernstein.
667
668         Initialize DrawingAreaProxy::m_size
669         https://bugs.webkit.org/show_bug.cgi?id=54913
670
671         This was removed in r76962 since it caused flashes when switching drawing areas due to
672         entering and exiting composited mode, but since we no longer switch drawing areas we can
673         put it back.
674
675         * UIProcess/DrawingAreaProxy.cpp:
676         (WebKit::DrawingAreaProxy::DrawingAreaProxy):
677
678 2011-02-21  Adam Roben  <aroben@apple.com>
679
680         Add some assertions about the state IDs we receive from the web process
681
682         Rubber-stamped by Anders Carlsson.
683
684         * UIProcess/DrawingAreaProxyImpl.cpp:
685         (WebKit::DrawingAreaProxyImpl::update):
686         (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
687         (WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
688         Assert that the state ID the web process sent us is no newer than our own state ID.
689
690 2011-02-21  Adam Roben  <aroben@apple.com>
691
692         Rename DrawingArea[Proxy]Impl's "sequence number" concept to "state ID".
693
694         As explained in r79251, DrawingAreaProxyImpl has some state that, when it changes, causes
695         all operations performed before that state change to become invalid. Currently, this state
696         consists of a single piece of data: the view's size. Eventually it will encompass more data
697         (e.g., the backing store we're drawing into; when we start throwing away the backing store
698         to save memory, our state will have changed, and any operations that were intended for the
699         old backing store will have become invalid). r79251 effectively transformed
700         DrawingArea[Proxy]Impl's "sequence number," which incremented every time DrawingAreaImpl
701         sent DrawingAreaProxyImpl a message, to a "state ID," which only increments when the view's
702         size changes.
703
704         This patch is just a set of simple renames to reflect the transformation that r79251
705         effected. It should not introduce any changes in behavior. The renames are:
706           - Messages::DrawingArea::SetSize -> UpdateState
707           - Messages::DrawingAreaProxy::DidSetSize -> DidUpdateState
708           - DrawingAreaProxyImpl::m_lastDidSetSizeSequenceNumber -> m_currentStateID
709           - DrawingAreaProxyImpl::m_isWaitingForDidSetSize -> m_isWaitingForDidUpdateState
710           - DrawingAreaProxyImpl::waitForAndDispatchDidSetSize -> waitForAndDispatchDidUpdateState
711           - DrawingAreaImpl::m_inSetSize -> m_inUpdateState
712           - generateSequenceNumber -> generateStateID
713           - sequenceNumber -> stateID
714
715         Fixes <http://webkit.org/b/54911> DrawingArea[Proxy]Impl's "sequence number" concept should
716         be renamed to "state ID"
717
718         Reviewed by Anders Carlsson.
719
720         * UIProcess/DrawingAreaProxy.h:
721         * UIProcess/DrawingAreaProxy.messages.in:
722         * UIProcess/DrawingAreaProxyImpl.cpp:
723         * UIProcess/DrawingAreaProxyImpl.h:
724         * WebProcess/WebPage/DrawingArea.h:
725         * WebProcess/WebPage/DrawingArea.messages.in:
726         * WebProcess/WebPage/DrawingAreaImpl.cpp:
727         * WebProcess/WebPage/DrawingAreaImpl.h:
728         Performed the renames described above.
729
730 2011-02-21  Alexey Proskuryakov  <ap@apple.com>
731
732         Reviewed by Adam Roben.
733
734         REGRESSION (WebKit2): HTTP requests time out after 60 seconds
735         https://bugs.webkit.org/show_bug.cgi?id=54755
736         <rdar://problem/9006592>
737
738         * Shared/API/c/WKURLRequest.cpp:
739         (WKURLRequestSetDefaultTimeoutInterval):
740         * Shared/API/c/WKURLRequest.h:
741         Added an API to set a default timeout interval for requests created from URLs. The API
742         affects both the UI process and requests created internally by the Web process. Requests
743         created from NSURLRequest or CFURLRequest take timeout from those.
744
745         * Shared/WebURLRequest.cpp: (WebKit::WebURLRequest::setDefaultTimeoutInterval):
746         * Shared/WebURLRequest.h:
747         Pipe the default timeout interval from WKURLRequest down to actual implementation. Since
748         WebURLRequest is currently implemented with WebCore::ResourceRequest, it automatically respects
749         NSURLRequest default timeout interval.
750
751         * UIProcess/WebProcessManager.cpp: (WebKit::WebProcessManager::getAllWebProcessContexts):
752         * UIProcess/WebProcessManager.h:
753         Added a way to enumerate all contexts running in separate processes.
754
755         * Shared/WebProcessCreationParameters.cpp:
756         (WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
757         (WebKit::WebProcessCreationParameters::encode):
758         (WebKit::WebProcessCreationParameters::decode):
759         * Shared/WebProcessCreationParameters.h:
760         (WebKit::WebContext::ensureWebProcess):
761         (WebKit::WebContext::setDefaultRequestTimeoutInterval):
762         * UIProcess/WebContext.h:
763         * WebProcess/WebProcess.cpp:
764         (WebKit::WebProcess::initializeWebProcess):
765         (WebKit::WebProcess::setDefaultRequestTimeoutInterval):
766         * WebProcess/WebProcess.h:
767         * WebProcess/WebProcess.messages.in:
768         Use UI process default timeout interval in separate process contexts, too.
769
770 2011-02-18  Brian Weinstein  <bweinstein@apple.com>
771
772         Reviewed by Adam Roben.
773
774         WebResourceCacheManager should be responsible for managing the CFURLCache as well
775         as the WebCore memory cache.
776         https://bugs.webkit.org/show_bug.cgi?id=54886
777         Part of <rdar://problem/8971738>
778
779         * WebProcess/ResourceCache/WebResourceCacheManager.cpp:
780         (WebKit::WebResourceCacheManager::getCacheOrigins): Call through to cFURLCacheHostNames, and add
781             create SecurityOrigin's for them and add them to the set of SecurityOrigins with cache.
782         (WebKit::WebResourceCacheManager::clearCacheForOrigin): Call through to clear the CFURLCache for
783             the origin's hostname.
784         * WebProcess/ResourceCache/WebResourceCacheManager.h:
785
786         * WebProcess/ResourceCache/cf: Added.
787         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: Added.
788         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Call through to WebKitSystemInterface.
789         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): Ditto.
790
791         * win/WebKit2.vcproj: Added new file.
792         * WebKit2.xcodeproj/project.pbxproj: Ditto.
793
794 2011-02-21  Adam Roben  <aroben@apple.com>
795
796         Move control of the sequence number from DrawingAreaImpl to DrawingAreaProxyImpl
797
798         DrawingAreaProxyImpl has some state that, when it changes, causes all operations performed
799         before that state change to become invalid. When painting, we need to have performed at
800         least one Update for the most recent state; otherwise, we'll be painting old/incorrect bits
801         into the view.
802
803         Currently, this state consists of a single piece of data: the view's size. Whenever the
804         state (i.e., size) changes, we tell the web process via the SetSize message, and the web
805         process lets us know that it has updated to match the new state (i.e., size) via the
806         DidSetSize message.
807
808         When it's time to paint, if we're waiting for the web process to update to match our current
809         state (i.e., size), we block for a little while hoping to receive a DidSetSize message so
810         that we can paint up-to-date bits into the window. This can cause us to receive messages
811         out-of-order; the DidSetSize message will be processed immediately, and any messages that
812         were sent before the DidSetSize message will be processed later. Since the messages from
813         before the DidSetSize message correspond to an old state (i.e., size), they are no longer
814         useful (e.g., they contain bits of the page that are drawn at the wrong size/location), so
815         we discard them.
816
817         The way we identify and discard these messages is by keeping track of a sequence number.
818         Currently, DrawingAreaImpl sends a monotonically-increasing sequence number to
819         DrawingAreaProxyImpl with every message. Whenever DrawingAreaProxyImpl receives a DidSetSize
820         message, it records the sequence number that came along with it. If we then later receive
821         any messages that have a lower sequence number, we know they correspond to an old state
822         (i.e., size) and can discard them.
823
824         This patch moves control of the sequence number to DrawingAreaProxyImpl.
825         DrawingAreaProxyImpl now sends a monotonically-increasing sequence number in the SetSize
826         message. DrawingAreaImpl records this sequence number when it receives the SetSize message,
827         and sends it back to DrawingAreaProxyImpl in every message. Otherwise the logic is the same
828         as before.
829
830         This should cause no changes in behavior, but will allow DrawingAreaProxyImpl to request a
831         full backing store update (by incrementing the sequence number) at times other than when the
832         view's size changes (e.g., after it has thrown away its backing store in order to save
833         memory).
834
835         Fixes <http://webkit.org/b/54907> DrawingAreaProxyImpl should tell DrawingAreaImpl what
836         sequence number to use
837
838         Reviewed by Anders Carlsson.
839
840         * UIProcess/DrawingAreaProxyImpl.cpp:
841         (WebKit::generateSequenceNumber): Moved here from DrawingAreaImpl.cpp.
842         (WebKit::DrawingAreaProxyImpl::sendSetSize): Changed to pass a new sequence number in the
843         SetSize message.
844         (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidSetSize): Added a FIXME about a
845         potential improvement.
846
847         * WebProcess/WebPage/DrawingArea.h:
848         (WebKit::DrawingArea::setSize): Updated to match the message's new parameters.
849
850         * WebProcess/WebPage/DrawingArea.messages.in: Added a sequenceNumber parameter to SetSize.
851
852         * WebProcess/WebPage/DrawingAreaImpl.cpp:
853         (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize m_sequenceNumber.
854         (WebKit::DrawingAreaImpl::setSize): Record the new sequence number from the UI process.
855
856         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
857         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
858         (WebKit::DrawingAreaImpl::display):
859         Send m_sequenceNumber, instead of a new sequence number, back to the UI process.
860
861         * WebProcess/WebPage/DrawingAreaImpl.h: Added m_sequenceNumber, updated setSize function to
862         match the base class.
863
864 2011-02-21  Gavin Barraclough  <barraclough@apple.com>
865
866         Reviewed by Sam Weinig.
867
868         Bug 54894 - Make inheritance structure described by ClassInfo match C++ class hierarchy.
869
870         The ClassInfo objects describe an inheritance hierarchy, with each ClassInfo instance
871         containing a pointer to its parent class. These links should reflect the inheritance
872         hierarchy of C++ classes below JSObject. For the large part it does, but in some cases
873         entries in the C++ hierarchy are skipped over. This presently likely doesn't matter,
874         since intervening C++ classes may not have ClassInfo - but would be a potential bug
875         were ClassInfo were to be added.
876
877         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
878
879 2011-02-21  Balazs Kelemen  <kbalazs@webkit.org>
880
881         Reviewed by Kenneth Rohde Christiansen.
882
883         [Qt] Implement WorkQueue::sheduleWorkAfterDelay
884         https://bugs.webkit.org/show_bug.cgi?id=54878
885
886         * Platform/qt/WorkQueueQt.cpp:
887         (WorkQueue::scheduleWorkAfterDelay):
888
889 2011-02-20  Alejandro G. Castro  <alex@igalia.com>
890
891         Reviewed by Martin Robinson.
892
893         [GTK] Add WebResourceCacheDataManager to the compilation after r78848
894         https://bugs.webkit.org/show_bug.cgi?id=54732
895
896         Added resource cache manager API to GTK+ compilation after r78848.
897
898         * GNUmakefile.am:
899
900 2011-02-20  Sam Weinig  <sam@webkit.org>
901
902         Reviewed by Dan Bernstein.
903
904         Crash in WebProcess at com.apple.WebCore: WebCore::Page::goToItem + 46
905         <rdar://problem/8942726>
906
907         * WebProcess/WebPage/WebPage.cpp:
908         (WebKit::WebPage::goForward):
909         (WebKit::WebPage::goBack):
910         (WebKit::WebPage::goToBackForwardItem):
911         Defend agains null HistoryItems.
912
913 2011-02-20  Anders Carlsson  <andersca@apple.com>
914
915         Reviewed by Maciej Stachowiak.
916
917         Crash when a plug-in requests a javascript: url that destroys the plug-in
918         https://bugs.webkit.org/show_bug.cgi?id=54837
919         <rdar://problem/9005475>
920
921         * WebProcess/Plugins/PluginProxy.cpp:
922         (WebKit::PluginProxy::destroy):
923         Null out m_pluginController.
924
925         * WebProcess/Plugins/PluginView.cpp:
926         (WebKit::PluginView::performJavaScriptURLRequest):
927         Don't access the frame through m_pluginElement since it will be nulled out
928         when the plug-in is destroyed.
929
930 2011-02-20  Anders Carlsson  <andersca@apple.com>
931
932         Reviewed by Sam Weinig.
933
934         Fix another crash when a plug-in is destroyed when evaluating JavaScript
935         https://bugs.webkit.org/show_bug.cgi?id=54834
936         <rdar://problem/9005475>
937
938         This contains three separate fixes:
939
940         - In unprotectPluginFromDestruction we can't just destroy the plug-in once
941           the count reaches zero, because the plug-in might still have code executing
942           on the stack. To fix this we use a zero-delay timer to defer destruction
943           of the plug-in.
944
945         - Trying to get the NPObject for the window using NPN_GetValue would return
946           NPERR_NO_ERROR, even if the returned NPObject was null. Fix this to return
947           NPERR_GENERIC_ERROR instead.
948
949         - Protect the plug-in from destruction anytime an NPAPI call that sends a 
950           synchronous IPC message is made.
951
952         * PluginProcess/PluginControllerProxy.cpp:
953         (WebKit::PluginControllerProxy::PluginControllerProxy):
954         (WebKit::PluginControllerProxy::destroy):
955         (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
956         * PluginProcess/PluginControllerProxy.h:
957         * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
958         (WebKit::PluginDestructionProtector::PluginDestructionProtector):
959         (WebKit::NPN_GetValue):
960         (WebKit::NPN_Evaluate):
961         (WebKit::NPN_GetProperty):
962         (WebKit::NPN_SetProperty):
963         (WebKit::NPN_RemoveProperty):
964         (WebKit::NPN_HasProperty):
965         (WebKit::NPN_HasMethod):
966         (WebKit::NPN_Enumerate):
967         (WebKit::NPN_Construct):
968         (WebKit::NPN_GetValueForURL):
969         (WebKit::NPN_SetValueForURL):
970
971 2011-02-19  Sam Weinig  <sam@webkit.org>
972
973         Reviewed by Anders Carlsson.
974
975         Add phase in addition to momentumPhase to platform wheel events
976         Part of <rdar://problem/8945362>
977
978         Rename existing phase to momentumPhase.
979
980         * Shared/WebEvent.h:
981         (WebKit::WebWheelEvent::momentumPhase):
982         * Shared/WebEventConversion.cpp:
983         (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent):
984         * Shared/WebWheelEvent.cpp:
985         (WebKit::WebWheelEvent::WebWheelEvent):
986         (WebKit::WebWheelEvent::encode):
987         (WebKit::WebWheelEvent::decode):
988         * Shared/mac/WebEventFactory.mm:
989         (WebKit::phaseForEvent):
990         (WebKit::momentumPhaseForEvent):
991         (WebKit::WebEventFactory::createWebWheelEvent):
992
993 2011-02-19  Anders Carlsson  <andersca@apple.com>
994
995         Reviewed by Dan Bernstein.
996
997         Crash when trying to take a snapshot of an uninitialized plug-in
998         https://bugs.webkit.org/show_bug.cgi?id=54812
999
1000         * WebProcess/Plugins/PluginView.cpp:
1001         (WebKit::PluginView::notifyWidget):
1002         Don't try to create a snapshot of the plug-in if it hasn't been initialized.
1003
1004 2011-02-18  Gavin Barraclough  <barraclough@apple.com>
1005
1006         Reviewed by Sam Weinig.
1007
1008         Bug 54786 - Devirtualize JSCell::classInfo()
1009
1010         Instead of making a virtual function call, add a pointer to the ClassInfo
1011         onto Structure.
1012
1013         This removes a virtual function call, and paves the way towards removing all
1014         the createStructure methods, and StructureFlags/AnonymousSlotCount properties
1015         (these should be able to move onto ClassInfo).
1016
1017         Calls to Structure::create must now pass a pointer to the ClassInfo for the
1018         structure. All objects now have a ClassInfo pointer, non-object cell types
1019         still do not.
1020
1021         Changes are most mechanical, involving three steps:
1022             * Remove virtual classInfo() methods.
1023             * Add &s_info parameter to calls to Structure::create.
1024             * Rename ClassInfo static members on classes from 'info' to 's_info',
1025               for consistency.
1026
1027         * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
1028         (WebKit::JSNPMethod::JSNPMethod):
1029         * WebProcess/Plugins/Netscape/JSNPMethod.h:
1030         (WebKit::JSNPMethod::createStructure):
1031         * WebProcess/Plugins/Netscape/JSNPObject.cpp:
1032         (WebKit::JSNPObject::JSNPObject):
1033         * WebProcess/Plugins/Netscape/JSNPObject.h:
1034         (WebKit::JSNPObject::createStructure):
1035
1036 2011-02-19  Sam Weinig  <sam@webkit.org>
1037
1038         Reviewed by Anders Carlsson.
1039
1040         Rename performLookupAtCurrentMouseLocation to performDictionaryLookupAtCurrentMouseLocation
1041
1042         * UIProcess/API/mac/WKView.mm:
1043         (-[WKView performDictionaryLookupAtCurrentMouseLocation]):
1044         * UIProcess/API/mac/WKViewPrivate.h:
1045
1046 2011-02-19  Charlie Reis  <creis@chromium.org>
1047
1048         Reviewed by Mihai Parparita.
1049
1050         Ensure loading has stopped in HistoryController::goToItem
1051         https://bugs.webkit.org/show_bug.cgi?id=54517
1052
1053         Add a FrameLoaderClient callback for whether to stop loading before goToItem.
1054
1055         Test: http/tests/navigation/forward-to-fragment-fires-onload.html
1056
1057         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1058         (WebFrameLoaderClient::shouldStopLoadingForHistoryItem): Added.
1059         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1060
1061 2011-02-18  Sam Weinig  <sam@webkit.org>
1062
1063         Reviewed by Adele Peterson.
1064
1065         Real fix for <rdar://problem/9025723> CrashTracer: [USER] 
1066         1 crash in WebProcess at com.apple.WebKit2: 
1067         WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
1068
1069         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1070         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
1071         Add null check for the FrameView. This function can be called when the
1072         FrameView is being torn down during a transition to a new FrameView.
1073
1074         * WebProcess/WebPage/WebPage.cpp:
1075         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
1076         Revert last attempt.
1077
1078 2011-02-18  Anders Carlsson  <andersca@apple.com>
1079
1080         Reviewed by Sam Weinig.
1081
1082         Hang trying to load nytimes.com with Flash installed
1083         <rdar://problem/9018113> 
1084
1085         * Platform/CoreIPC/Connection.cpp:
1086         (CoreIPC::Connection::sendSyncMessage):
1087         Call beginWaitForSyncReply() before sending the message. Otherwise, in some cases we could
1088         have gotten back a synchronous request before calling beginWaitForSyncReply(), and then we wouldn't
1089         process it correctly. (Which would lead to the hang).
1090
1091 2011-02-18  Simon Fraser  <simon.fraser@apple.com>
1092
1093         Reviewed by Kevin Decker.
1094
1095         <rdar://problem/9021296> Some plug-ins are the wrong size after zooming
1096         
1097         Use the same frame/bounds adjustment that we use for NSView-based
1098         plugins in WebKit2, which allows plug-ins and their snapshots to
1099         render with the correct size after scaling.
1100
1101         * WebProcess/Plugins/PluginView.cpp:
1102         (WebKit::PluginView::setBoundsSize):
1103         (WebKit::PluginView::viewGeometryDidChange):
1104         (WebKit::PluginView::clipRectInWindowCoordinates):
1105         * WebProcess/Plugins/PluginView.h:
1106
1107 2011-02-18  Beth Dakin  <bdakin@apple.com>
1108
1109         Rubber-stamped by Adele Peterson.
1110
1111         Fix for <rdar://problem/9025723> CrashTracer: [USER] 
1112         1 crash in WebProcess at com.apple.WebKit2: 
1113         WebKit::WebPage::didChangeScrollOffsetForMainFrame + 31
1114
1115         Simple null-check.
1116         * WebProcess/WebPage/WebPage.cpp:
1117         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
1118
1119 2011-02-18  Viatcheslav Ostapenko  <ostapenko.viatcheslav@nokia.com>
1120
1121         Reviewed by Kenneth Rohde Christiansen.
1122
1123         Tiled backing store area is too big.
1124         Error in area calculcation causes size of backing store
1125         up to 8 times bigger than viewport with default multipliers.
1126         https://bugs.webkit.org/show_bug.cgi?id=54587
1127
1128         * UIProcess/TiledDrawingAreaProxy.cpp:
1129         (WebKit::TiledDrawingAreaProxy::calculateKeepRect):
1130         (WebKit::TiledDrawingAreaProxy::calculateCoverRect):
1131
1132 2011-02-18  John Sullivan  <sullivan@apple.com>
1133
1134         Reviewed by Maciej Stachowiak.
1135
1136         <rdar://problem/9026169>
1137         https://bugs.webkit.org/show_bug.cgi?id=54780
1138         pendingAPIRequestURL isn't updated for WKPageGoToBackForwardListItem
1139
1140         * UIProcess/WebPageProxy.cpp:
1141         (WebKit::WebPageProxy::goToBackForwardItem):
1142         Update the pending API URL.
1143
1144 2011-02-18  Anders Carlsson  <andersca@apple.com>
1145
1146         Reviewed by Sam Weinig.
1147
1148         Accelerated content fades in when using a layer backed WKView
1149         <rdar://problem/9021586>
1150
1151         * UIProcess/API/mac/WKView.mm:
1152         (-[WKView _enterAcceleratedCompositingMode:]):
1153         Make a new nested CATransaction and disable animations when adding the layer 
1154         hosting subview. This avoids an implicit fade animation that would otherwise occur.
1155
1156 2011-02-18  Simon Fraser  <simon.fraser@apple.com>
1157
1158         Reviewed by Dan Bernstein.
1159
1160         Plugin snapshot location is wrong for subframes
1161         https://bugs.webkit.org/show_bug.cgi?id=54776
1162         
1163         Only change the CTM to the way that the plugin expects it
1164         when painting the plugin, not when drawing the snapshot.
1165         This fixes the snapshot location when painting flattened
1166         frames.
1167
1168         * WebProcess/Plugins/PluginView.cpp:
1169         (WebKit::PluginView::paint):
1170
1171 2011-02-18  Anders Carlsson  <andersca@apple.com>
1172
1173         Reviewed by Simon Fraser.
1174
1175         Implement NetscapePlugin::pluginComplexTextInputIdentifier
1176         https://bugs.webkit.org/show_bug.cgi?id=54770
1177
1178         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1179         (WebKit::NetscapePlugin::pluginComplexTextInputIdentifier):
1180
1181 2011-02-18  Sam Weinig  <sam@webkit.org>
1182
1183         Reviewed by Maciej Stachowiak.
1184
1185         Add the ability to ask the WKPage if the main frame is pinned
1186         to the right or left hand side.
1187         Part of <rdar://problem/9017043>.
1188
1189         * UIProcess/API/C/WKPage.cpp:
1190         (WKPageIsPinnedToLeftSide):
1191         (WKPageIsPinnedToRightSide):
1192         * UIProcess/API/C/WKPage.h:
1193         Add new API calls.
1194
1195         * UIProcess/WebPageProxy.cpp:
1196         (WebKit::WebPageProxy::WebPageProxy):
1197         (WebKit::WebPageProxy::close):
1198         (WebKit::WebPageProxy::processDidCrash):
1199         (WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
1200         * UIProcess/WebPageProxy.h:
1201         (WebKit::WebPageProxy::isPinnedToLeftSide):
1202         (WebKit::WebPageProxy::isPinnedToRightSide):
1203         Initialize, reset and update the pinned state.
1204
1205         * UIProcess/WebPageProxy.messages.in:
1206         Add message to update the pinned state.
1207
1208         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
1209         (WebKit::WebFrameLoaderClient::didChangeScrollOffset):
1210         * WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
1211         * WebProcess/WebPage/WebPage.cpp:
1212         (WebKit::WebPage::WebPage):
1213         (WebKit::WebPage::didChangeScrollOffsetForMainFrame):
1214         * WebProcess/WebPage/WebPage.h:
1215         Cache the pinned state, and only update the UIProcess when it
1216         changes.
1217
1218 2011-02-18  Anders Carlsson  <andersca@apple.com>
1219
1220         Reviewed by Simon Fraser.
1221
1222         Fix assertion in SharedMemory::create when trying to snapshot 0x0 plug-in
1223         https://bugs.webkit.org/show_bug.cgi?id=54768
1224
1225         * PluginProcess/PluginControllerProxy.cpp:
1226         (WebKit::PluginControllerProxy::snapshot):
1227         Don't try to create a handle from a null ShareableBitmap.
1228
1229         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1230         (WebKit::NetscapePlugin::snapshot):
1231         Check for a zero sized plug-in before trying to create a snapshot.
1232
1233 2011-02-18  Anders Carlsson  <andersca@apple.com>
1234
1235         Reviewed by Simon Fraser.
1236
1237         WKView flashes when entering/exiting compositing mode
1238         https://bugs.webkit.org/show_bug.cgi?id=54695
1239         <rdar://problem/9011554>
1240
1241         * UIProcess/API/mac/WKView.mm:
1242         (-[WKView _exitAcceleratedCompositingMode]):
1243         Remove the layer hosting view before clearing out its layer, otherwise we can get
1244         white flashes when exiting accelerated compositing mode.
1245
1246         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1247         When entering accelerated compositing mode, we want to defer sending the message
1248         until we've actually committed the layer tree and pushed all changes over to the
1249         UI process.
1250
1251         (WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
1252         Tell the layer tree host to force a repaint. This will ensure that all layer tree
1253         changes are pushed over to the UI process. When that is done, send the new layer tree
1254         context over to the UI process.
1255
1256         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1257         When exiting compositing mode in response to a didSetSize, we want to exit accelerated 
1258         compositing mode right away to avoid flashes. This is safe since we've laid out the page
1259         already so we won't end up reentering setRootCompositingLayer.
1260
1261         (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
1262         Tell the layer tree host to notify us when the next layer tree flush happened, so we can
1263         let the UI process know. If we're entering accelerated compositing mode in response to a
1264         SetSize message, the new layer tree context will be passed in the DidSetSize message.
1265
1266         * WebProcess/WebPage/DrawingAreaImpl.h:
1267         Add layerHostDidFlushLayers.
1268
1269         * WebProcess/WebPage/LayerTreeHost.h:
1270         Add setShouldNotifyAfterNextScheduledLayerFlush.
1271
1272         * WebProcess/WebPage/mac/LayerTreeHostMac.h:
1273         Add a m_notifyAfterScheduledLayerFlush flag.
1274
1275         * WebProcess/WebPage/mac/LayerTreeHostMac.mm:
1276         (WebKit::LayerTreeHostMac::LayerTreeHostMac):
1277         Initialize m_notifyAfterScheduledLayerFlush to false.
1278
1279         (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush):
1280         Set m_notifyAfterScheduledLayerFlush to true.
1281
1282         (WebKit::LayerTreeHostMac::flushPendingLayerChangesRunLoopObserverCallback):
1283         If m_notifyAfterScheduledLayerFlush is true, call DrawingAreaImpl::layerHostDidFlushLayers.
1284
1285 2011-02-18  Alexey Proskuryakov  <ap@apple.com>
1286
1287         Reviewed by Adele Peterson.
1288
1289         REGRESSION (WebKit2): Wrong frame printed on tivofaq.com
1290         https://bugs.webkit.org/show_bug.cgi?id=54677
1291         <rdar://problem/8994133>
1292
1293         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1294         (WebKit::area): Use visible frame bounds.
1295         (WebKit::findLargestFrameInFrameSet): Added a comment explaining what we're up to here.
1296         WebKit2 shouldn't be making policy decisions for the client, but it gets dangerously close
1297         to that. We used to expose the same as WK1 API though.
1298
1299 2011-02-18  Balazs Kelemen  <kbalazs@webkit.org>
1300
1301         Unreviwed.
1302
1303         Remove CleanupHandler since we do not use it anymore.
1304
1305         * Shared/qt/CleanupHandler.cpp: Removed.
1306         * Shared/qt/CleanupHandler.h: Removed.
1307
1308 2011-02-18  Alejandro G. Castro  <alex@igalia.com>
1309
1310         Fix GTK build by fixing signature of platformPaint(), required after r78956.
1311
1312         * WebProcess/Plugins/Netscape/gtk/NetscapePluginGtk.cpp:
1313         (WebKit::NetscapePlugin::platformPaint):
1314
1315 2011-02-17  Dan Bernstein  <mitz@apple.com>
1316
1317         LLVM Compiler build fix.
1318
1319         * UIProcess/WebResourceCacheManagerProxy.h:
1320         * WebProcess/ResourceCache/WebResourceCacheManager.h:
1321
1322 2011-02-17  Simon Fraser  <simon.fraser@apple.com>
1323
1324         Fix Windows and Qt builds by fixing signature of platformPaint().
1325
1326         * WebProcess/Plugins/Netscape/qt/NetscapePluginQt.cpp:
1327         (WebKit::NetscapePlugin::platformPaint):
1328         * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp:
1329         (WebKit::NetscapePlugin::platformPaint):
1330
1331 2011-02-17  Simon Fraser  <simon.fraser@apple.com>
1332
1333         Reviewed by Sam Weinig.
1334
1335         WebKit2 snapshots don't show plug-ins
1336         https://bugs.webkit.org/show_bug.cgi?id=54716
1337         
1338         Fix WebKit2 plug-ins to do a software paint for
1339         snapshotting.
1340
1341         * PluginProcess/PluginControllerProxy.h:
1342         * PluginProcess/PluginControllerProxy.cpp:
1343         (WebKit::PluginControllerProxy::snapshot): Respond to the snapshot
1344         message by getting a sharable bitmap from the plugin, and returning
1345         a handle to it in the reply.
1346
1347         * PluginProcess/PluginControllerProxy.messages.in: Add the snapshot
1348         message.
1349         
1350         * Shared/Plugins/PluginQuirks.h:
1351         * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
1352         (WebKit::NetscapePluginModule::determineQuirks): Add a quirk for the
1353         ability to be snapshotted, which we only set for Flash at the moment.
1354         
1355         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
1356         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
1357         (WebKit::NetscapePlugin::snapshot): Create a shareable bitmap, and
1358         paint into it.
1359         (WebKit::NetscapePlugin::supportsSnapshotting): Test the quirk.
1360
1361         * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
1362         (WebKit::NetscapePlugin::platformPaint): Allow the paint to happen
1363         if we're snapshotting, even when using the CoreAnimation drawing
1364         model.
1365         
1366         * WebProcess/Plugins/Plugin.h: New snapshot method.
1367         
1368         * WebProcess/Plugins/PluginProxy.h:
1369         * WebProcess/Plugins/PluginProxy.cpp:
1370         (WebKit::PluginProxy::snapshot): Send a sync message to the plugin process,
1371         asking for a snapshot in a shareble bitmap.
1372         
1373         * WebProcess/Plugins/PluginView.h:
1374         * WebProcess/Plugins/PluginView.cpp:
1375         (WebKit::PluginView::paint): Use the snapshot if we have one, to avoid
1376         calling into the plugin to draw, which may run script.
1377         
1378         (WebKit::PluginView::notifyWidget): Generate the snapshot before
1379         a flattening paint, and throw it away after.
1380
1381 2011-02-17  Jessie Berlin  <jberlin@apple.com>
1382
1383         Reviewed by Adam Roben.
1384
1385         WebKit2: The CFNetwork Cache should be shared between the UI Process and the Web Process on
1386         Windows.
1387         https://bugs.webkit.org/show_bug.cgi?id=54683
1388
1389         * Shared/WebProcessCreationParameters.cpp:
1390         (WebKit::WebProcessCreationParameters::encode):
1391         (WebKit::WebProcessCreationParameters::decode):
1392         * Shared/WebProcessCreationParameters.h:
1393  
1394         * UIProcess/win/WebContextWin.cpp:
1395         (WebKit::WebContext::platformInitializeWebProcess):
1396         Make sure to remove the ending slash, as CFNetwork does not recognize the directory with
1397         that slash.
1398
1399         * WebProcess/win/WebProcessWin.cpp:
1400         (WebKit::WebProcess::platformInitializeWebProcess):
1401         Create a cache using the path, disk capacity, and memory capacity and set it as default.
1402
1403 2011-02-17  Anders Carlsson  <andersca@apple.com>
1404
1405         Reviewed by Sam Weinig.
1406
1407         Web and/or plug-in process crashes when NPN_Evaluate destroys the plug-in
1408         https://bugs.webkit.org/show_bug.cgi?id=54686
1409         <rdar://problem/9013384>
1410
1411         This patch fixes two bugs with a plug-in calling NPN_Evaluate to destroy itself:
1412
1413         - The PluginProxy object would be destroyed in the middle of PluginProxy::evaluate.
1414           This would cause the web process to crash.
1415
1416         - The PluginControllerProxy would call NPP_Destroy while the plug-in was busy running
1417           code. This would cause the plug-in process to crash.
1418
1419         To fix this, we add protectPluginFromDestruction/unprotectPluginFromDestruction to
1420         PluginControllerProxy and use it to defer calling destroy() in the plug-in process,
1421         and defer actually destroying the plug-in in the web process.
1422
1423         https://bugs.webkit.org/show_bug.cgi?id=54171 tracks adding a test for this.
1424
1425         * PluginProcess/PluginControllerProxy.cpp:
1426         (WebKit::PluginControllerProxy::PluginControllerProxy):
1427         (WebKit::PluginControllerProxy::destroy):
1428         (WebKit::PluginControllerProxy::evaluate):
1429         (WebKit::PluginControllerProxy::protectPluginFromDestruction):
1430         (WebKit::PluginControllerProxy::unprotectPluginFromDestruction):
1431         * PluginProcess/PluginControllerProxy.h:
1432         (WebKit::PluginControllerProxy::asPluginController):
1433         * PluginProcess/WebProcessConnection.cpp:
1434         (WebKit::WebProcessConnection::destroyPluginControllerProxy):
1435         (WebKit::WebProcessConnection::didReceiveMessage):
1436         (WebKit::WebProcessConnection::didReceiveSyncMessage):
1437         * PluginProcess/WebProcessConnection.h:
1438         (WebKit::WebProcessConnection::connection):
1439         * WebProcess/Plugins/PluginController.h:
1440         (WebKit::PluginController::PluginDestructionProtector::PluginDestructionProtector):
1441         (WebKit::PluginController::PluginDestructionProtector::~PluginDestructionProtector):
1442         * WebProcess/Plugins/PluginProxy.cpp:
1443         (WebKit::PluginProxy::evaluate):
1444         * WebProcess/Plugins/PluginView.cpp:
1445         (WebKit::PluginView::protectPluginFromDestruction):
1446         (WebKit::PluginView::unprotectPluginFromDestruction):
1447         * WebProcess/Plugins/PluginView.h:
1448
1449 2011-02-17  Sam Weinig  <sam@webkit.org>
1450
1451         Build fix.
1452
1453         * WebProcess/WebPage/mac/WebPageMac.mm:
1454         (WebKit::WebPage::performDictionaryLookupAtLocation):
1455
1456 2011-02-17  Sam Weinig  <sam@webkit.org>
1457
1458         Reviewed by Maciej Stachowiak.
1459
1460         WebKit2: Support Dictionary popup
1461         <rdar://problem/7660670>
1462
1463         * Shared/TextInfo.cpp: Added.
1464         (WebKit::TextInfo::encode):
1465         (WebKit::TextInfo::decode):
1466         * Shared/TextInfo.h: Added.
1467         (WebKit::TextInfo::TextInfo):
1468         Add class to represent the location and style of a run of text.
1469
1470         * UIProcess/PageClient.h:
1471         * UIProcess/API/mac/PageClientImpl.h:
1472         * UIProcess/API/mac/PageClientImpl.mm:
1473         (WebKit::PageClientImpl::didPerformDictionaryLookup):
1474         Invoke the dictionary popup.
1475
1476         * UIProcess/API/mac/WKView.mm:
1477         (-[WKView performLookupAtCurrentMouseLocation]):
1478         Tell the WebProcess to get get the text under the mouse and cause
1479         the dictionary popup to appear.
1480
1481         * UIProcess/API/mac/WKViewPrivate.h:
1482         Add performLookupAtCurrentMouseLocation.
1483
1484         * UIProcess/WebPageProxy.cpp:
1485         (WebKit::WebPageProxy::performDictionaryLookupAtLocation):
1486         (WebKit::WebPageProxy::didPerformDictionaryLookup):
1487         * UIProcess/WebPageProxy.h:
1488         * UIProcess/WebPageProxy.messages.in:
1489         * WebProcess/WebPage/WebPage.cpp:
1490         * WebProcess/WebPage/WebPage.h:
1491         * WebProcess/WebPage/WebPage.messages.in:
1492         Pipe messages through.
1493
1494         * WebProcess/WebPage/mac/WebPageMac.mm:
1495         (WebKit::characterRangeAtPoint): Fix to return PassRefPtr
1496         and not potentially stale pointers.
1497
1498         (WebKit::WebPage::characterIndexForPoint):
1499         Change to use a RefPtr.
1500
1501         (WebKit::WebPage::performDictionaryLookupAtLocation):
1502         Add simple heuristic to get the word at the current point (or the current selection
1503         if it is at that point) and grab the style of the word to send the UIProcess.
1504
1505         * WebKit2.pro:
1506         * WebKit2.xcodeproj/project.pbxproj:
1507         * win/WebKit2.vcproj:
1508         Add new files.
1509
1510 2011-02-17  Brian Weinstein  <bweinstein@apple.com>
1511
1512         Qt build fix.
1513
1514         * WebKit2.pro: Update after renaming of MemoryCache to ResourceCache.
1515
1516 2011-02-17  Brian Weinstein  <bweinstein@apple.com>
1517
1518         Mac build fix.
1519
1520         * WebKit2.xcodeproj/project.pbxproj: Use relative to group instead of absolute paths. Not everyone's home
1521             directory is /Users/brian_weinstein.
1522
1523 2011-02-16  Brian Weinstein  <bweinstein@apple.com>
1524
1525         Reviewed by Brady Eidson.
1526
1527         WebKit2: Need a way to manage the WebCore Cache
1528         https://bugs.webkit.org/show_bug.cgi?id=54501
1529         
1530         Implement a WebKit2 API to manage the WebCore memory cache. This API exposes three functions:
1531         
1532         1) A method to get a list of all security origins that have entries in the WebCore memory cache.
1533         2) A method to remove all entries in the WebCore memory cache from a SecurityOrigin.
1534         3) A method to remove all entries from the WebCore memory cache.
1535
1536         * Platform/CoreIPC/MessageID.h: Add two new MessageClasses.
1537         * Shared/API/c/WKBase.h:
1538         * Shared/APIObject.h: Add a CacheManager type.
1539         * Shared/WebSecurityOrigin.h: Typedef WKCacheManagerRef.
1540         (WebKit::WebSecurityOrigin::createFromString): Creates a WebCore::SecurityOrigin using 
1541             SecurityOrigin::createFromString.
1542         (WebKit::WebSecurityOrigin::toString): Calls through to SecurityOrigin::toString.
1543         * UIProcess/API/C/WKAPICast.h:
1544
1545         * UIProcess/API/C/WKCacheManager.cpp: Added.
1546         (WKCacheManagerGetTypeID): Returns the WebResourceCacheManagerProxy type.
1547         (WKCacheManagerGetCacheOrigins): Calls through to WebResourceCacheManagerProxy::getCacheOrigins.
1548         (callGetCacheOriginsBlockBlockAndDispose):
1549         (WKCacheManagerGetCacheOrigins_b):
1550         (WKCacheManagerDeleteCacheForOrigin): Calls through to WebResourceCacheManagerProxy::deleteCacheForOrigin.
1551         (WKCacheManagerDeleteAllCache): Calls through to WebResourceCacheManagerProxy::deleteAllCache.
1552         * UIProcess/API/C/WKCacheManager.h: Added.
1553
1554         * UIProcess/API/C/WKContext.cpp:
1555         (WKContextGetCacheManager): Calls to get the WebResourceCacheManagerProxy.
1556         * UIProcess/API/C/WKContext.h:
1557
1558         * UIProcess/WebResourceCacheManagerProxy.cpp: Added.
1559         (WebKit::WebResourceCacheManagerProxy::create): Calls through to the constructor.
1560         (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): Initialize the m_webContext variable.
1561         (WebKit::WebResourceCacheManagerProxy::~WebResourceCacheManagerProxy):
1562         (WebKit::WebResourceCacheManagerProxy::invalidate): Invalidate the callback map.
1563         (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): Call through to the web process to get the cache
1564             origins.
1565         (WebKit::WebResourceCacheManagerProxy::didGetCacheOrigins): Call the callback.
1566         (WebKit::WebResourceCacheManagerProxy::deleteCacheForOrigin): Call through to the web process to delete cache
1567             for the given origin. 
1568         (WebKit::WebResourceCacheManagerProxy::deleteAllCache): Call through to the web process to delete all of the cache.
1569         * UIProcess/WebResourceCacheManagerProxy.h: Added.
1570         (WebKit::WebResourceCacheManagerProxy::clearContext):
1571         (WebKit::WebResourceCacheManagerProxy::type):
1572         * UIProcess/WebResourceCacheManagerProxy.messages.in: Added.
1573
1574         * UIProcess/WebContext.cpp:
1575         (WebKit::WebContext::WebContext): Initialize new member variable.
1576         (WebKit::WebContext::~WebContext):  Invalidates new member variable.
1577         (WebKit::WebContext::didReceiveMessage): Passes cache messages to the cache manager.
1578         * UIProcess/WebContext.h:
1579         (WebKit::WebContext::cacheManagerProxy):
1580         * UIProcess/WebProcessProxy.cpp:
1581         (WebKit::WebProcessProxy::didReceiveMessage): Add a new message class.
1582
1583         * WebProcess/ResourceCache/WebResourceCacheManager.cpp: Added.
1584         (WebKit::WebResourceCacheManager::shared):
1585         (WebKit::WebResourceCacheManager::WebResourceCacheManager):
1586         (WebKit::WebResourceCacheManager::~WebResourceCacheManager):
1587         (WebKit::WebResourceCacheManager::didReceiveMessage): Calls through to didReceiveWebResourceCacheManagerMessage.
1588         (WebKit::WebResourceCacheManager::getCacheOrigins): Gets a list of origins with cache entries from the memory
1589             cache, and puts them into a vector to send to the UI process.
1590         (WebKit::WebResourceCacheManager::deleteCacheForOrigin): Calls through to ResourceCache to delete all cache entries
1591             from a given origin.
1592         (WebKit::WebResourceCacheManager::deleteAllCache):
1593         * WebProcess/ResourceCache/WebResourceCacheManager.h: Added.
1594         * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: Added.
1595
1596         * WebProcess/WebProcess.cpp:
1597         (WebKit::WebProcess::didReceiveMessage):
1598         (WebKit::WebProcess::clearResourceCaches): Tell the memory cache to evict its resources. This was done on WebKit1, 
1599             but not WebKit2.
1600         * WebProcess/WebProcess.h:
1601         
1602         * WebKit2.xcodeproj/project.pbxproj: Added new files.
1603         * win/WebKit2.vcproj: Ditto.
1604         * win/WebKit2Common.vsprops: Added new include directory.
1605         * win/WebKit2Generated.make: Added new header.
1606
1607 2011-02-16  David Hyatt  <hyatt@apple.com>
1608
1609         Reviewed by Dan Bernstein.
1610
1611         https://bugs.webkit.org/show_bug.cgi?id=54244
1612         
1613         Convert the line box tree to floating point and eliminate font rounding hacks.  This patch removes all of the rounding
1614         hacks from the Font code and makes sure all Font APIs involving width measurement and width offsets use floats.
1615         
1616         The line box tree's x, y and logicalWidth members have all been converted to floats and all of the line box APIs have
1617         been changed as well.
1618         
1619         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).
1620         
1621         Background and border painting is using a rounding model, so borders and backgrounds will round to the nearest pixel when painting.
1622         
1623         Replaced elements still snap to integer positions on lines, and they use a rounding model as well, although their underlying line boxes
1624         still have a precise floating point position.
1625
1626         Justification will now allow subpixel positioning to occur as well.  Platforms that don't support subpixel positioning should already
1627         be rounding justification spacing in their font code.
1628
1629         Many layout test results change on Mac, since rounding hacks were used there and are now gone.
1630
1631         * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp:
1632         (WebKit::WebPopupMenu::setUpPlatformData):
1633
1634 2011-02-10  Luiz Agostini  <luiz.agostini@openbossa.org>
1635
1636         Reviewed by Adam Roben.
1637
1638         HTML5 <details> and <summary>: localized text
1639         https://bugs.webkit.org/show_bug.cgi?id=54260
1640
1641         The method defaultDetailsSummaryText was added to LocalizationStrategy class. It is used to
1642         provide the default label to be used by a <details> tag that has no <summary> child.
1643
1644         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
1645         (WebKit::WebPlatformStrategies::defaultDetailsSummaryText):
1646         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
1647
1648 2011-02-17  Adam Roben  <aroben@apple.com>
1649
1650         Make sure layout is up-to-date before rendering the layer tree in DrawingAreaImpl
1651
1652         Fixes <http://webkit.org/b/54646> <rdar://problem/9016889> Assertion failure in
1653         FrameView::paintContents when calling WKPageForceRepaint on a page that uses accelerated
1654         compositing
1655
1656         Reviewed by Anders Carlsson.
1657
1658         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1659         (WebKit::DrawingAreaImpl::forceRepaint): Lay out before we do anything else.
1660
1661 2011-02-17  Alejandro G. Castro  <alex@igalia.com>
1662
1663         Reviewed by Martin Robinson.
1664
1665         [GTK] Add WKPluginSiteDataManager.cpp compilation after r78647
1666         https://bugs.webkit.org/show_bug.cgi?id=54564
1667
1668         * GNUmakefile.am: Added files to compilation.
1669         * Shared/Plugins/Netscape/NetscapePluginModule.h: used
1670         npruntime_internal.h in the include to avoid problems with X
1671         types.
1672         * WebProcess/WebProcess.cpp:
1673         (WebKit::WebProcess::setAlwaysUsesComplexTextCodePath): fixed
1674         ambiguous reference to Font caused by the X headers required by
1675         the plugins.
1676
1677 2011-02-16  Matthew Delaney  <mdelaney@apple.com>
1678
1679         Reviewed by Simon Fraser.
1680
1681         Allow acceleratesDrawing for WebKit2
1682         https://bugs.webkit.org/show_bug.cgi?id=54511
1683
1684         Plumb through preference for accelerated drawing.
1685         
1686         If accelerated drawing is enabled, keep the DrawingAreaImpl in
1687         accelerated compositing mode.
1688
1689         * Shared/WebPreferencesStore.h:
1690         * UIProcess/API/C/WKPreferences.cpp:
1691         (WKPreferencesSetAcceleratedDrawingEnabled):
1692         (WKPreferencesGetAcceleratedDrawingEnabled):
1693         * UIProcess/API/C/WKPreferencesPrivate.h:
1694         * WebProcess/WebPage/DrawingAreaImpl.cpp:
1695         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
1696         (WebKit::DrawingAreaImpl::setRootCompositingLayer):
1697         (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
1698         * WebProcess/WebPage/DrawingAreaImpl.h:
1699         * WebProcess/WebPage/WebPage.cpp:
1700         (WebKit::WebPage::updatePreferences):
1701
1702 2011-02-16  Yael Aharon  <yael.aharon@nokia.com>
1703
1704         Reviewed by Andreas Kling.
1705
1706         [Qt] White screen is displayed when tiled backing store is enabled in MiniBrowser.
1707         https://bugs.webkit.org/show_bug.cgi?id=54583
1708
1709         Make sure to invalidate all the tiles, including the last one.
1710
1711         * UIProcess/TiledDrawingAreaProxy.cpp:
1712         (WebKit::TiledDrawingAreaProxy::invalidate):
1713
1714 2011-02-16  Yael Aharon  <yael.aharon@nokia.com>
1715
1716         Reviewed by Andreas Kling.
1717
1718         [Qt] Tiles are not created for webkit2 after r77286.
1719         https://bugs.webkit.org/show_bug.cgi?id=54577
1720
1721         When using the default tile size of 1024x1024, only one tile is created.
1722         Make sure to create this tile by undoing what seems to be a typo in r77286.
1723
1724         * UIProcess/TiledDrawingAreaProxy.cpp:
1725         (WebKit::TiledDrawingAreaProxy::paint):
1726         (WebKit::TiledDrawingAreaProxy::createTiles):
1727
1728 == Rolled over to ChangeLog-2011-02-16 ==