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