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