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