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