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