Replace static_casts with to* functions for document types.
[WebKit-https.git] / Source / WebKit2 / ChangeLog
1 2013-03-13  Abhishek Arya  <inferno@chromium.org>
2
3         Replace static_casts with to* functions for document types.
4         https://bugs.webkit.org/show_bug.cgi?id=112225
5
6         Reviewed by Ryosuke Niwa.
7
8         * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Remove the redundant helper.
9
10 2013-03-13  Zan Dobersek  <zdobersek@igalia.com>
11
12         [GTK] Build fixes after 145552
13         https://bugs.webkit.org/show_bug.cgi?id=112267
14
15         Reviewed by Gustavo Noronha Silva.
16
17         * GNUmakefile.am: Narrow down the dependency CFLAGS list to only ones that are actually needed
18         to build the platformgtk_sources into libPlatformGtk2.la. At the moment this means only
19         GTK+-2.0 CFLAGS are used.
20
21 2013-03-13  Antoine Quint  <graouts@apple.com>
22
23         Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation
24         https://bugs.webkit.org/show_bug.cgi?id=112271
25
26         Reviewed by Tim Horton.
27
28         Add a new stopFadeOutAnimation() on PageOverlay that we call when
29         WebInspectorClient::highlight() is called and a page overlay
30         is already available. This ensures that any fade-out animation
31         is cleared before proceeding with showing the page overlay
32         for the new highlight.
33
34         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
35         (WebKit::WebInspectorClient::highlight):
36         * WebProcess/WebPage/PageOverlay.cpp:
37         (WebKit::PageOverlay::stopFadeOutAnimation):
38         (WebKit):
39         * WebProcess/WebPage/PageOverlay.h:
40         (PageOverlay):
41
42 2013-03-13  Pavel Feldman  <pfeldman@chromium.org>
43
44         Web Inspector: get rid of hiddenPanels filter
45         https://bugs.webkit.org/show_bug.cgi?id=112252
46
47         Reviewed by Vsevolod Vlasov.
48
49         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
50         * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h:
51         (WebInspectorFrontendClient):
52
53 2013-03-13  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
54
55         [WK2][Qt] Regression(145517) WebProcess asserts in debug build on WebKitTestRunner start
56         https://bugs.webkit.org/show_bug.cgi?id=112223
57
58         Reviewed by Simon Hausmann.
59
60         We need to only enable the cookie jar and the disk cache conditionally
61         in the web process since we removed default paths and WKTR doesn't provide
62         them.
63
64         * WebProcess/qt/WebProcessQt.cpp:
65         (WebKit::WebProcess::platformSetCacheModel):
66         (WebKit::WebProcess::platformInitializeWebProcess):
67
68 2013-03-12  Christophe Dumez  <ch.dumez@sisa.samsung.com>
69
70         [EFL][WK2] ewk_popup_menu_close() does not work as intended
71         https://bugs.webkit.org/show_bug.cgi?id=110209
72
73         Reviewed by Laszlo Gombos.
74
75         ewk_popup_menu_close() is called by the browser to notify WebKit that
76         the popup menu was closed. However, the implementation was calling
77         EwkView::closePopupMenu() which was asking the browser to close the
78         popup menu via an Evas smart function. This patch fixes the behavior
79         and ewk_popup_menu_close() now calls WKPopupMenuListenerSetSelection()
80         C API so that the WebProcess is notified that the popup menu was
81         hidden.
82
83         * UIProcess/API/efl/ewk_popup_menu.cpp:
84         (EwkPopupMenu::close):
85
86 2013-03-12  Huang Dongsung  <luxtella@company100.net>
87
88         Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer().
89         https://bugs.webkit.org/show_bug.cgi?id=111835
90
91         Reviewed by Luiz Agostini.
92
93         Amend CoordinatedLayerTreeHost because
94         CoordinatedGraphicsLayer::setRootLayer() is removed.
95
96         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
97         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
98
99 2013-03-12  Dean Jackson  <dino@apple.com>
100
101         Primary plugin hit detection needs to run after plugin creation
102         https://bugs.webkit.org/show_bug.cgi?id=112206
103
104         Reviewed by Tim Horton.
105
106         On some pages, the plugins are created after the page has loaded, and
107         thus our heuristic to determine the primary plugin fails. Run this
108         heuristic more often: after each PluginView is created. It already exits
109         early if it has found a primary. But we also need to make sure that it
110         doesn't run before load.
111
112         * WebProcess/WebPage/WebPage.cpp:
113         (WebKit::WebPage::addPluginView): Run detection when view is added.
114         (WebKit::WebPage::didFinishLoad): Remember that we have loaded.
115         (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Look at the PluginViews to see if we have a plugin.
116         (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset both flags.
117         * WebProcess/WebPage/WebPage.h:
118         (WebPage): New member variable, m_readyToFindPrimarySnapshottedPlugin.
119
120 2013-03-12  Beth Dakin  <bdakin@apple.com>
121
122         WKView -printOperationWithPrintInfo:forFrame: doesn’t use the print info that is 
123         passed in
124         https://bugs.webkit.org/show_bug.cgi?id=112212
125         -and corresponding-
126         <rdar://problem/12994883>
127
128         Reviewed by Anders Carlsson.
129
130         We should call [NSPrintOperation printOperationWithView: printInfo:] to use the 
131         printInfo parameter instead of [NSPrintOperation printOperationWithView:] which 
132         will just use the sharedPrintInfo.
133         * UIProcess/API/mac/WKView.mm:
134         (-[WKView printOperationWithPrintInfo:forFrame:]):
135
136 2013-03-12  Geoffrey Garen  <ggaren@apple.com>
137
138         Moved RunLoopTimer and SchedulePair to WTF
139         https://bugs.webkit.org/show_bug.cgi?id=112171
140
141         Reviewed by Oliver Hunt.
142
143         This will allow us to use timers in lower level primitives without
144         duplicating all the code.
145
146         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
147         (WebFrameNetworkingContext):
148
149 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
150
151         [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles
152         https://bugs.webkit.org/show_bug.cgi?id=112163
153
154         Reviewed by Martin Robinson.
155
156         * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for
157         references to HILDON_CPPFLAGS and HILDON_CFLAGS.
158
159 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
160
161         [GTK] Set up the libPlatformGtk.la library
162         https://bugs.webkit.org/show_bug.cgi?id=111738
163
164         Reviewed by Martin Robinson.
165
166         * GNUmakefile.am: Reference platformgtk_cppflags variable, libPlatformGtk.la along with webcoregtk_cppflags variable, libWebCoreGtk.la.
167         Adjust the path to GtkVersioning.c, the file has moved under Source/Platform.
168
169 2013-03-12  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
170
171         [WK2][EFL] Fix EwkContext class API
172         https://bugs.webkit.org/show_bug.cgi?id=111706
173
174         Reviewed by Alexey Proskuryakov.
175
176         * UIProcess/API/C/efl/WKView.cpp:
177         (createWKView):
178         * UIProcess/API/efl/ewk_context.cpp:
179         (EwkContext::findOrCreateWrapper):
180
181             Renamed from create() as it returns the same instance of EwkContext
182             for the given WKContextRef if present.
183
184         (EwkContext::create):
185         (EwkContext::defaultContext):
186
187             Returns raw pointer rather than PassRefPtr<EwkContext> as ownership
188             is not transferred.
189
190         (ewk_context_default_get):
191         * UIProcess/API/efl/ewk_context_private.h:
192         (EwkContext):
193         * UIProcess/efl/WebInspectorProxyEfl.cpp:
194         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
195
196 2013-03-12  Zan Dobersek  <zdobersek@igalia.com>
197
198         [GTK] Enable Web Audio in development builds
199         https://bugs.webkit.org/show_bug.cgi?id=111831
200
201         Reviewed by Philippe Normand.
202
203         * GNUmakefile.am: Link the plugin process against libWebCoreModules.la as well.
204
205 2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
206
207         [Qt][WK2] Layer QtDownloadManager on the C API
208         https://bugs.webkit.org/show_bug.cgi?id=109562
209
210         Reviewed by Simon Hausmann.
211         Signed off for WebKit2 by Benjamin Poulain.
212
213         * UIProcess/API/cpp/qt/WKURLQt.cpp:
214         (WebKit::adoptToQString):
215         (WebKit):
216         (WebKit::adoptToQUrl):
217         * UIProcess/API/cpp/qt/WKURLQt.h:
218         (WebKit):
219         * UIProcess/API/qt/qquickwebview.cpp:
220         (QQuickWebViewPrivate::handleDownloadRequest):
221         * UIProcess/qt/QtDownloadManager.cpp:
222         (WebKit::toQtDownloadManager):
223         (WebKit):
224         (WebKit::QtDownloadManager::QtDownloadManager):
225         (WebKit::QtDownloadManager::addDownload):
226         (WebKit::QtDownloadManager::didReceiveResponse):
227         (WebKit::QtDownloadManager::didCreateDestination):
228         (WebKit::QtDownloadManager::didFinishDownload):
229         (WebKit::QtDownloadManager::didFailDownload):
230         (WebKit::QtDownloadManager::didReceiveDataForDownload):
231         * UIProcess/qt/QtDownloadManager.h:
232         (WebKit):
233         (QtDownloadManager):
234         * UIProcess/qt/QtWebContext.cpp:
235         (WebKit::QtWebContext::QtWebContext):
236         * UIProcess/qt/QtWebError.cpp:
237         (WebKit::QtWebError::url):
238         (WebKit::QtWebError::description):
239
240 2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
241
242         [Qt][WK2] Layer QtWebIconDatabaseClient on the C API
243         https://bugs.webkit.org/show_bug.cgi?id=109564
244
245         Reviewed by Simon Hausmann.
246         Signed off for WebKit2 by Benjamin Poulain.
247
248         * Target.pri:
249         * UIProcess/API/C/qt/WKIconDatabaseQt.cpp: Added.
250         (WKIconDatabaseTryGetQImageForURL):
251           - New API added to get a QImage from the IconDatabase.
252             Based on WKIconDatabaseCG.h/cpp
253         * UIProcess/API/C/qt/WKIconDatabaseQt.h: Added.
254         * UIProcess/API/cpp/qt/WKURLQt.cpp:
255         (WKURLCreateWithQString):
256         (WKURLCopyQString):
257         (WKURLCreateWithQUrl):
258         (WKURLCopyQUrl):
259           - The WKUrlRef behind the scene is a WTF::String and encoding it back and forth to
260             a QUrl can slightly change its string representation. Allow converting a WKUrlRef
261             to and from a QString to ensure this.
262         * UIProcess/API/cpp/qt/WKURLQt.h:
263         * UIProcess/API/qt/qwebiconimageprovider.cpp:
264         (QWebIconImageProvider::iconURLForPageURLInContext):
265           - The icon URL isn't accessible form the C API and shouldn't need to be.
266             Use an ID incremented on each update to trigger an update of the QML Image component.
267         (QWebIconImageProvider::requestImage):
268           - The IconDatabase was previously assumed to resize the image to the requested size,
269             but this parameter is ignored, as stated in a comment in WebIconDatabase::imageForPageURL.
270             Explicitely do the resize after fetching the original icon to also be able to report
271             the original size properly to QtQuick.
272         * UIProcess/API/qt/qwebiconimageprovider_p.h:
273         * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml:
274           - Set the image to load asynchronously to further test the possibility of threading issues
275             in QtWebIconDatabaseClient::iconImageForPageURL
276           - Add a few barriers to fix some issues where the load succeeded signal would be wrongly
277             catched by init() before the next test.
278         * UIProcess/qt/QtWebContext.cpp:
279         (WebKit::QtWebContext::QtWebContext):
280         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
281         (WebKit):
282         (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
283         (WebKit::QtWebIconDatabaseClient::~QtWebIconDatabaseClient):
284         (WebKit::QtWebIconDatabaseClient::updateID):
285         (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL):
286         (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
287           - Remove the Mutex. This mutex was useless given that it would only
288             be locked from a single thread. Since the IconDatabase runs in its own thread,
289             it already is thread-safe to access.
290         (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
291         (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
292         * UIProcess/qt/QtWebIconDatabaseClient.h:
293         (QtWebIconDatabaseClient):
294         * WebKit2.pri:
295
296 2013-03-11  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
297
298         [Qt][WK2] Specify storage paths through the C API
299         https://bugs.webkit.org/show_bug.cgi?id=111435
300
301         Reviewed by Simon Hausmann.
302         Signed off for WebKit2 by Benjamin Poulain.
303
304         The WKIconDatabase should be opened through a call to
305         WKContextSetIconDatabasePath. To avoid having some paths
306         returned through WebContext::platformDefault* and some others
307         through the C API, make sure that all those paths are set
308         through the C API.
309
310         * Shared/qt/QtDefaultDataLocation.cpp: Removed.
311         * Shared/qt/QtDefaultDataLocation.h: Removed.
312         * Target.pri:
313         * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp:
314         (WebKit::cacheFile):
315           - This part is left alone behind the C API.
316             Since PluginProcessProxy have no knowledge of the WebContext
317             it is rather difficult to fetch a configured directory that
318             could be used for this purpose (like the disk cache storage).
319             Hard-code a compatible logic to keep the current behavior.
320         (WebKit::removeCacheFile):
321         (WebKit):
322         (WebKit::readMetaDataFromCacheFile):
323         (WebKit::writeToCacheFile):
324         (WebKit::tryReadPluginMetaDataFromCacheFile):
325           - Update the code to better handle an empty cache file path.
326         * UIProcess/qt/QtWebContext.cpp:
327         (WebKit::QtWebContext::defaultContext):
328         (WebKit::defaultLocation):
329         (WebKit):
330         (WebKit::QtWebContext::preparedStoragePath):
331         * UIProcess/qt/QtWebContext.h:
332         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
333         (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient):
334         * UIProcess/qt/WebContextQt.cpp:
335         (WebKit::WebContext::applicationCacheDirectory):
336         (WebKit::WebContext::platformDefaultDatabaseDirectory):
337         (WebKit::WebContext::platformDefaultIconDatabasePath):
338         (WebKit::WebContext::platformDefaultLocalStorageDirectory):
339         (WebKit::WebContext::platformDefaultDiskCacheDirectory):
340         (WebKit::WebContext::platformDefaultCookieStorageDirectory):
341
342 2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
343
344         [Qt] Properly layer QtWebContext on top of the C API
345         https://bugs.webkit.org/show_bug.cgi?id=108475
346
347         Reviewed by Simon Hausmann.
348         Signed off for WebKit2 by Benjamin Poulain.
349
350         * UIProcess/API/qt/qquickwebview.cpp:
351         (QQuickWebViewPrivate::initialize):
352         * UIProcess/qt/QtWebContext.cpp:
353         (WebKit::initializeContextInjectedBundleClient):
354         (WebKit::QtWebContext::QtWebContext):
355         (WebKit::QtWebContext::create):
356         (WebKit::QtWebContext::defaultContext):
357         * UIProcess/qt/QtWebContext.h:
358         (WebKit):
359         (QtWebContext):
360         (WebKit::QtWebContext::context):
361
362 2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
363
364         [Qt][WK2] Allow QtWebContext to call directly to QQuickWebView with a WKPageRef
365         https://bugs.webkit.org/show_bug.cgi?id=109829
366
367         Reviewed by Allan Sandfeld Jensen.
368         Signed off for WebKit2 by Benjamin Poulain.
369
370         Instead of going through WebPageProxy and PageClient to forward
371         injected bundle messages received by the context, maintain a static map
372         of WKPageRef to QQuickWebViewPrivate.
373
374         * UIProcess/API/qt/qquickwebview.cpp:
375         (QQuickWebViewPrivate::get):
376         (QQuickWebViewPrivate::~QQuickWebViewPrivate):
377         (QQuickWebViewPrivate::initialize):
378         (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject):
379         * UIProcess/API/qt/qquickwebview_p_p.h:
380         (QQuickWebViewPrivate):
381         * UIProcess/API/qt/raw/qrawwebview.cpp:
382         * UIProcess/API/qt/raw/qrawwebview_p_p.h:
383         * UIProcess/PageClient.h:
384         (PageClient):
385         * UIProcess/WebPageProxy.h:
386         (WebPageProxy):
387         * UIProcess/qt/QtPageClient.cpp:
388         * UIProcess/qt/QtPageClient.h:
389         (QtPageClient):
390         * UIProcess/qt/QtWebContext.cpp:
391         (WebKit::didReceiveMessageFromInjectedBundle):
392         * UIProcess/qt/WebPageProxyQt.cpp:
393
394 2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
395
396         [Qt][WK2] Keep the WebContext alive during the whole application's lifetime
397         https://bugs.webkit.org/show_bug.cgi?id=109827
398
399         Reviewed by Simon Hausmann.
400         Signed off for WebKit2 by Benjamin Poulain.
401
402         The lifetime of the WebContext is difficult to manage because of a circular
403         reference kept with the WebProcessProxy until it shuts itself down, 60
404         seconds after the last page is closed. There was some notification
405         in place to handle this in the upper layer, but having to go through the
406         C API (done in a following patch) makes this quite awkward.
407
408         Keeping the WebContext alive also includes the icon database which is
409         quite heavy, in the future we should only enable it once the
410         QQuickWebView::icon property is read.
411
412         * UIProcess/API/qt/qquickwebview.cpp:
413         (QQuickWebViewPrivate::QQuickWebViewPrivate):
414         (QQuickWebViewPrivate::handleDownloadRequest):
415         (QQuickWebViewPrivate::updateIcon):
416         * UIProcess/API/qt/qquickwebview_p_p.h:
417         (QQuickWebViewPrivate):
418         * UIProcess/API/qt/qwebiconimageprovider.cpp:
419         (QWebIconImageProvider::requestImage):
420         * UIProcess/qt/QtWebContext.cpp:
421         (WebKit):
422         (WebKit::QtWebContext::QtWebContext):
423         (WebKit::QtWebContext::~QtWebContext):
424         (WebKit::QtWebContext::create):
425         (WebKit::QtWebContext::defaultContext):
426         * UIProcess/qt/QtWebContext.h:
427         (QtWebContext):
428         (WebKit::QtWebContext::downloadManager):
429         (WebKit::QtWebContext::iconDatabase):
430         * UIProcess/qt/WebContextQt.cpp:
431         (WebKit::WebContext::platformInvalidateContext):
432
433 2013-02-14  Jocelyn Turcotte  <jocelyn.turcotte@digia.com>
434
435         [Qt][WK2] Favor QUrl and QString over WTF::String in the Qt API layer
436         https://bugs.webkit.org/show_bug.cgi?id=109468
437
438         Reviewed by Allan Sandfeld Jensen.
439         Signed off for WebKit2 by Benjamin Poulain.
440
441         In preparation for patches using the C API types in some areas, remove the
442         usage of WTF::String on the affected line.
443
444         Use a QUrl for icon URL to avoid unnecessary conversion.
445         Use a QString for the page URL to keep it compatible with WebPageProxy and
446         WebIconDatabase and avoid QUrl parsing.
447
448         * UIProcess/API/qt/qquickwebview.cpp:
449         (QQuickWebViewPrivate::_q_onIconChangedForPageURL):
450         (QQuickWebViewPrivate::updateIcon):
451         (QQuickWebView::emitUrlChangeIfNeeded):
452         (QQuickWebView::icon):
453         * UIProcess/API/qt/qquickwebview_p_p.h:
454         (QQuickWebViewPrivate):
455         * UIProcess/API/qt/qwebiconimageprovider.cpp:
456         (QWebIconImageProvider::iconURLForPageURLInContext):
457         * UIProcess/API/qt/qwebiconimageprovider_p.h:
458         * UIProcess/qt/QtWebIconDatabaseClient.cpp:
459         (WebKit::QtWebIconDatabaseClient::iconForPageURL):
460         (WebKit::QtWebIconDatabaseClient::iconImageForPageURL):
461         (WebKit::QtWebIconDatabaseClient::retainIconForPageURL):
462         (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL):
463         * UIProcess/qt/QtWebIconDatabaseClient.h:
464         (QtWebIconDatabaseClient):
465
466 2013-03-12  Manuel Rego Casasnovas  <rego@igalia.com>
467
468         [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English
469         https://bugs.webkit.org/show_bug.cgi?id=111973
470
471         Reviewed by Carlos Garcia Campos.
472
473         The problem is that the UIProcess locale is reseted to C in
474         gtk_test_init, however the WebProcess does not inherit the locale set in
475         the UIProcess and it uses the system one (that could be different to
476         English). So, there were problems in some tests that are comparing
477         strings from both processes like WebKit2APITests/TestPrinting and
478         WebKit2APITests/TestWebKitWebContext. The solution is to set the locale
479         environment variable LC_ALL to C in order to reset WebProcess locale
480         too.
481
482         * UIProcess/API/gtk/tests/TestMain.cpp:
483         (main): Set environment variable LC_ALL to C.
484
485 2013-03-11  Brady Eidson  <beidson@apple.com>
486
487         Loads are never canceled in the NetworkProcess
488         <rdar://problem/12890500> and https://bugs.webkit.org/show_bug.cgi?id=112103
489
490         Reviewed by Alexey Proskuryakov.
491
492         If a connection to a WebProcess is closed (gracefully or by crashing) then:
493         - All scheduled loads for that connection should be forgotten.
494         - All in-progress loads for that connection should be aborted asap.
495
496         * NetworkProcess/NetworkResourceLoader.cpp:
497         (WebKit::requestsToCleanupMutex): The "request to stop" mechanism is now called "request to cleanup"
498         (WebKit::requestsToCleanup):
499         (WebKit::NetworkResourceLoader::scheduleCleanupOnMainThread):
500         (WebKit::NetworkResourceLoader::performCleanups):
501         (WebKit::NetworkResourceLoader::cleanup):
502         (WebKit::NetworkResourceLoader::didFinishLoading):
503         (WebKit::NetworkResourceLoader::didFail):
504
505         (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): If there is a resource handle, let
506           the loading thread notice the connection is invalid. Otherwise request to cleanup the loader.
507         (WebKit::NetworkResourceLoader::sendAbortingOnFailure):
508         (WebKit::NetworkResourceLoader::sendSyncAbortingOnFailure):
509         (WebKit::NetworkResourceLoader::abortInProgressLoad): Cancel the resource handle and schedule main thread cleanup.
510         (WebKit::NetworkResourceLoader::didReceiveResponse): Use sendAbortingOnFailure instead of send.
511         (WebKit::NetworkResourceLoader::didReceiveData): Ditto.
512
513         (WebKit::NetworkResourceLoader::willSendRequest): Call abortInProgressLoad if the sync message failed.
514         (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto.
515         * NetworkProcess/NetworkResourceLoader.h:
516
517         Make connectionToWebProcessDidClose() pure virtual, moving its implementation to the subclasses:
518         * NetworkProcess/SchedulableLoader.cpp:
519         * NetworkProcess/SchedulableLoader.h:
520
521         * NetworkProcess/SyncNetworkResourceLoader.cpp:
522         (WebKit::SyncNetworkResourceLoader::start): Call cleanup().
523         (WebKit::SyncNetworkResourceLoader::connectionToWebProcessDidClose): Call cleanup().
524         (WebKit::SyncNetworkResourceLoader::cleanup): Factor out the sync loader cleanup code.
525         * NetworkProcess/SyncNetworkResourceLoader.h:
526
527 2013-03-11  Tim Horton  <timothy_horton@apple.com>
528
529         PDFPlugin: Return PDFKit's data instead of the original resource data for save/etc.
530         https://bugs.webkit.org/show_bug.cgi?id=111956
531         <rdar://problem/13352282>
532
533         Reviewed by Alexey Proskuryakov.
534
535         If we return the original resource data, we lose changes made to annotations.
536
537         * WebProcess/Plugins/PDF/PDFPlugin.mm:
538         (WebKit::PDFPlugin::pdfDocumentDidLoad): Adopt the renamed rawData().
539         (WebKit::PDFPlugin::saveToPDF): Use liveData so that "Save to PDF" persists changes to annotations.
540         (WebKit::PDFPlugin::openWithNativeApplication): Use liveData so that "Open With [native application]" persists changes to annotations.
541
542         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h:
543         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
544         (WebKit::PDFPluginAnnotation::commit): Added, inform PDFPlugin that we're mutating the document.
545         * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
546         (WebKit::PDFPluginChoiceAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document.
547         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
548         (WebKit::PDFPluginTextAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document.
549
550         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
551         (WebKit::SimplePDFPlugin::didMutatePDFDocument): Added.
552         (WebKit::SimplePDFPlugin::liveData): Added.
553         (WebKit::SimplePDFPlugin::rawData): Renamed from data(). Return NSData for consistency.
554         (WebKit::SimplePDFPlugin::pdfDocumentWasMutated): Added.
555         * WebProcess/Plugins/PDF/SimplePDFPlugin.mm:
556         (WebKit::SimplePDFPlugin::liveData): Return PDFKit's data if the user has mutated the
557         document, otherwise the raw data. This way, PDFs that PDFKit can't process will still
558         be downloadable as long as the user doesn't interact with annotations.
559         (WebKit::SimplePDFPlugin::liveResourceData): Return a SharedData wrapping the PDFDocument's data.
560         
561         * WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
562         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
563         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
564         * WebProcess/Plugins/Plugin.h:
565         * WebProcess/Plugins/PluginProxy.h:
566         * WebProcess/Plugins/PluginView.cpp:
567         * WebProcess/Plugins/PluginView.h:
568         * WebProcess/WebPage/WebPage.cpp:
569         (WebKit::WebPage::getMainResourceDataOfFrame):
570         Use a SharedData instead of raw data for getResourceData, and rename it liveResourceData().
571
572 2013-03-11  Tim Horton  <timothy_horton@apple.com>
573
574         [wk2] WebProcess and WebContentService don't respect system localization
575         https://bugs.webkit.org/show_bug.cgi?id=112091
576         <rdar://problem/13233590>
577
578         Reviewed by Dan Bernstein.
579
580         Allow CFBundle to use localizations that don't exist in the main bundle,
581         so that, for example, injected bundles can load and use strings from localized frameworks.
582
583         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
584         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
585         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
586
587 2013-03-11  Jochen Eisinger  <jochen@chromium.org>
588
589         Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture
590         https://bugs.webkit.org/show_bug.cgi?id=111959
591
592         Reviewed by Alexey Proskuryakov.
593
594         * WebProcess/Notifications/WebNotificationManager.cpp:
595         (WebKit::WebNotificationManager::didClickNotification):
596         * WebProcess/Plugins/PluginView.cpp:
597         (WebKit::PluginView::evaluate):
598         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
599         (WebKit::WebContextMenuClient::searchWithGoogle):
600
601 2013-03-11  Tim Horton  <timothy_horton@apple.com>
602
603         PDFPlugin: Make scrolling between pages in non-continuous modes work
604         https://bugs.webkit.org/show_bug.cgi?id=111415
605         <rdar://problem/12555320>
606
607         Reviewed by Alexey Proskuryakov.
608
609         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
610         Add some more PDFLayerController SPI.
611
612         * WebProcess/Plugins/PDF/PDFPlugin.h:
613         (PDFPlugin): Override handleWheelEvent.
614
615         * WebProcess/Plugins/PDF/PDFPlugin.mm:
616         (WebKit::PDFPlugin::handleWheelEvent):
617         If PDFLayerController is in non-continuous mode, allow scrolling between
618         pages by intercepting scroll events, and checking whether we're at the
619         top or bottom of a page. If we are, and a single event exceeds the threshold
620         of 20px (0px for legacy scroll wheels), we jump to the next or previous
621         page and scroll to the right place. Do not allow momentum scrolling to
622         switch pages.
623
624 2013-03-11  Mark Lam  <mark.lam@apple.com>
625
626         Fix some WebDatabaseManagerProxy methods to only send to one WebProcsess
627         instead of broadcasting to all WebProcesses.
628         https://bugs.webkit.org/show_bug.cgi?id=112074.
629
630         Reviewed by Alexey Proskuryakov.
631
632         The reason for this is because the intent of these messages is to act on
633         the tracker database that is shared between all WebProcesses. It is
634         redundant and inefficient for multiple WebProcesses to service the same
635         request/message. And because of multi-process contention on accessing
636         the tracker database, the results returned to the UIProcess may also be
637         erroneous.
638
639         For example, if getDatabaseOrigins() is broadcasted to all WebProcesses,
640         they will contend to open the tracker database at the same time. If one
641         of these processes fails because the database is already in use, then
642         it may return with an empty list when it should not be empty.
643
644         With this fix, only one WebProcess gets the message and will perform the
645         requested query/action on behalf of all WebProcesses.
646
647         * UIProcess/WebContext.h:
648         (WebKit::WebContext::sendToOneProcess):
649         * UIProcess/WebDatabaseManagerProxy.cpp:
650         (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
651         (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
652         (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
653         (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
654         (WebKit::WebDatabaseManagerProxy::deleteAllDatabases):
655         (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
656
657 2013-03-11  Jeffrey Pfau  <jpfau@apple.com>
658
659         List cache partitions as units instead of as their contents
660         https://bugs.webkit.org/show_bug.cgi?id=111909
661
662         Reviewed by Maciej Stachowiak.
663
664         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
665         (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Attempt to enumerate cache partitions based on information we have
666
667 2013-01-30  Jer Noble  <jer.noble@apple.com>
668
669         Full screen mode should not exit when application resigns active state.
670         https://bugs.webkit.org/show_bug.cgi?id=106129
671
672         Reviewed by Darin Adler.
673
674         Allow the user to close the full screen window with Cmd-w by making the full screen window
675         closable, and by intercepting performClose:.
676
677         * UIProcess/mac/WKFullScreenWindowController.mm:
678         (-[WKFullScreenWindowController init]): Create a closable full screen window.
679         (-[WKFullScreenWindowController performClose:]): When we receive a close request in full screen mode,
680             animate out of full screen.
681
682 2013-03-11  Zan Dobersek  <zdobersek@igalia.com>
683
684         [GTK] WebKit2-only build fails
685         https://bugs.webkit.org/show_bug.cgi?id=112033
686
687         Reviewed by Gustavo Noronha Silva.
688
689         * GNUmakefile.am: Introduce the artifical dependency of libwebkit2gtk on libwebkitgtk only
690         if building WebKit1 as well. Similarly with the WebKitPluginProcess, depend on libwebkitgtk
691         only if building WebKit1, the dependency is otherwise not necessary.
692
693 2013-03-11  Tim Horton  <timothy_horton@apple.com>
694
695         [wk2] Search With [your search provider here] should use NSPerformService in WebKit2/Mac
696         https://bugs.webkit.org/show_bug.cgi?id=111995
697         <rdar://problem/12975669>
698
699         Reviewed by Sam Weinig.
700
701         * UIProcess/WebPageProxy.h:
702         (WebPageProxy): Add searchTheWeb().
703         * UIProcess/WebPageProxy.messages.in: Add SearchTheWeb message.
704         * UIProcess/mac/WebPageProxyMac.mm:
705         (WebKit::WebPageProxy::searchTheWeb): Added. Call out to NSPerformService to search with the system default
706         search provider, in the browser.
707
708         * WebProcess/Plugins/PDF/PDFPlugin.h:
709         (PDFPlugin): Add performWebSearch().
710         * WebProcess/Plugins/PDF/PDFPlugin.mm:
711         (-[WKPDFLayerControllerDelegate performWebSearch:]): Added, forward the delegate callback to PDFPlugin.
712         (WebKit::PDFPlugin::performWebSearch): Added, forward the search string to WebPageProxy.
713         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
714         (WebKit::WebContextMenuClient::searchWithGoogle): Don't build the old load-Google-in-the-main-frame code on Mac.
715         * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm:
716         (WebKit::WebContextMenuClient::searchWithGoogle): Instead, send the search string to WebPageProxy.
717
718 2013-03-11  Helder Correia  <helder.correia@nokia.com>
719
720         [WK2] Add C API preference: accelerated compositing for overflow scroll
721         https://bugs.webkit.org/show_bug.cgi?id=111916
722
723         Reviewed by Simon Fraser.
724
725         * UIProcess/API/C/WKPreferences.cpp:
726         (WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled):
727         (WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled):
728         * UIProcess/API/C/WKPreferencesPrivate.h:
729
730 2013-03-11  Brady Eidson  <beidson@apple.com>
731
732         CoreIPC crash in NetworkProcess after WebProcess crash.
733         <rdar://problem/13124146> and https://bugs.webkit.org/show_bug.cgi?id=112046
734
735         Reviewed by Alexey Proskuryakov.
736
737         * NetworkProcess/SchedulableLoader.cpp:
738         (WebKit::SchedulableLoader::connectionToWebProcessDidClose): Don't null out the connection backpointer on crash.
739
740 2013-03-11  Alexey Proskuryakov  <ap@apple.com>
741
742         Make it possible to reuse sandbox extensions
743         https://bugs.webkit.org/show_bug.cgi?id=111883
744
745         Reviewed by Anders Carlsson.
746
747         This allows for properly keeping extensions in NetworkBlobRegistry for as long as
748         they are needed.
749
750         The patch also fixes a bug where extensions would leak when navigating between
751         file:// pages.
752
753         * NetworkProcess/SchedulableLoader.cpp:
754         Revoke the extensions, but don't invalidate - we may need them later.
755
756         * Shared/Downloads/Download.cpp:
757         (WebKit::Download::didFinish):
758         (WebKit::Download::didFail):
759         (WebKit::Download::didCancel):
760         Replaced invalidate() with revoke() and clearing out. SandboxExtension destructor
761         now requires revocations wto be balanced, as otherwise understanding dual reference
762         counting in SandboxExtension would be too difficult.
763
764         * Shared/SandboxExtension.h: We now keep track of how many times the extension
765         was consumed. Eventually, we should refactor the class to not have such duplicate
766         reference counting.
767         * Shared/mac/SandboxExtensionMac.mm:
768         (WebKit::SandboxExtension::SandboxExtension): Initialize use count.
769         (WebKit::SandboxExtension::~SandboxExtension): We now require consume/revoke calls
770         to be balanced. This is not hard to do in existing usage, and makes the design much
771         more reliable.
772         (WebKit::SandboxExtension::revoke): Don't permanently destroy the extension when
773         invalidatid, we may need it in the future.
774         (WebKit::SandboxExtension::consume): Added use counting.
775
776         * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): This extension
777         is not going to be reused.
778
779         * WebProcess/WebPage/WebPage.cpp:
780         (WebKit::WebPage::performDragControllerAction): Pending extensions are not consumed,
781         so there is no need to revoke.
782         (WebKit::WebPage::SandboxExtensionTracker::invalidate): Pending extension is not
783         consumed, and the other two always are.
784         (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
785         Pending extension is never consumed in place, no need to revoke.
786         (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Do not unset
787         reused committed extension yet - we may need it later if provisional load fails.
788         Thanks to use counting, we can now consume the same extension as both committed
789         and provisional.
790         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Now the
791         committed extension can be revoked and replaced.
792         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): Just revoke
793         provisional extension, committed one is still in place.
794
795 2013-03-11  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
796
797         [EFL] Build fix after r143192 when SPELLCHECK is off
798
799         Unreviewed build fix when SPELLCHECK macro is off.
800
801         * UIProcess/efl/TextCheckerEfl.cpp:
802         (WebKit):
803
804 2013-03-10  Tim Horton  <timothy_horton@apple.com>
805
806         WebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect larger than the FrameView’s size
807         https://bugs.webkit.org/show_bug.cgi?id=111820
808         <rdar://problem/13375785>
809
810         Reviewed by Simon Fraser.
811
812         We have to clear the image - there could be area that won’t be painted by the FrameView,
813         or the FrameView could have a transparent background.
814
815         * WebProcess/WebPage/WebPage.cpp:
816         (WebKit::WebPage::scaledSnapshotWithOptions):
817
818 2013-03-10  Tim Horton  <timothy_horton@apple.com>
819
820         Fix a typo in http://trac.webkit.org/changeset/145332.
821
822         Unreviewed.
823
824         ENABLE() doesn't use the WTF_ prefix.
825
826         * WebProcess/WebPage/WebPage.h:
827
828 2013-03-10  Sam Weinig  <sam@webkit.org>
829
830         Add bundle API to get the current selection as a WKDOMRange
831         https://bugs.webkit.org/show_bug.cgi?id=111947
832         <rdar://problem/13205460>
833
834         Reviewed by Gavin Barraclough.
835
836         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
837         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
838         (-[WKWebProcessPlugInBrowserContextController selectedRange]):
839         Add new selectedRange property.
840
841         * WebProcess/WebPage/WebPage.cpp:
842         (WebKit::frameWithSelection):
843         (WebKit::WebPage::currentSelectionAsRange):
844         * WebProcess/WebPage/WebPage.h:
845         Get the range by finding the frame that has a selection, and then normalizing it.
846
847 2013-03-10  Tim Horton  <timothy_horton@apple.com>
848
849         Add a heuristic to determine the “primary” snapshotted plugin
850         https://bugs.webkit.org/show_bug.cgi?id=111932
851         <rdar://problem/13270208>
852
853         Reviewed by Dean Jackson.
854
855         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
856         (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
857         Forward didCommitLoad to WebPage. Move existing code that manipulated WebPage
858         itself during didCommitLoad into WebPage, where it belongs.
859         (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): Forward didFinishLoad to WebPage.
860         * WebProcess/WebPage/WebPage.cpp:
861         (WebKit::WebPage::WebPage): Initialize m_didFindPrimarySnapshottedPlugin to false.
862         (WebKit::WebPage::didCommitLoad): Move code from WebPageFrameLoaderClient.
863         Reset the flag that says we've already found a snapshotted plugin.
864         (WebKit::WebPage::didFinishLoad):
865         Call determinePrimarySnapshottedPlugIn when any frame finishes loading. We call this for subframes,
866         not just the main frame, in case the main frame loads with no "primary" plugins, but a subframe later loads with one.
867         (WebKit::WebPage::determinePrimarySnapshottedPlugIn):
868         Attempt to find the primary snapshotted plugin on the page, by hit-testing a grid of points spaced 200px apart.
869         A plugin is considered if it is snapshotted and > 450x300. We scan vertically and left-to-right, only discarding
870         a previous candidate if another candidate is at least 110% the size of the previous candidate.
871         This tends to select plugins near the top left of the page, unless there is a significantly larger plugin elsewhere.
872         (WebKit::WebPage::resetPrimarySnapshottedPlugIn):
873         * WebProcess/WebPage/WebPage.h:
874         (WebPage):
875
876 2013-03-10  Sheriff Bot  <webkit.review.bot@gmail.com>
877
878         Unreviewed, rolling out r145039 and r145096.
879         http://trac.webkit.org/changeset/145039
880         http://trac.webkit.org/changeset/145096
881         https://bugs.webkit.org/show_bug.cgi?id=111945
882
883         broke find indicator updates with scrolling subframes
884         (Requested by thorton on #webkit).
885
886         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
887         (WebKit::TiledCoreAnimationDrawingArea::scroll):
888         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
889
890 2013-03-10  Andreas Kling  <akling@apple.com>
891
892         WebPluginSiteDataManager should use OwnPtr.
893         <http://webkit.org/b/111940>
894
895         Reviewed by Anders Carlsson.
896
897         * UIProcess/Plugins/WebPluginSiteDataManager.cpp:
898         (WebKit::WebPluginSiteDataManager::invalidate):
899         (WebKit::WebPluginSiteDataManager::getSitesWithData):
900         (WebKit::WebPluginSiteDataManager::clearSiteData):
901         (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
902         (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
903         * UIProcess/Plugins/WebPluginSiteDataManager.h:
904         (WebPluginSiteDataManager):
905
906 2013-03-09  Manuel Rego Casasnovas  <rego@igalia.com>
907
908         [GTK][WK2] Fix compilation warning missing-field-initializers in webkit-2.0 stable branch
909         https://bugs.webkit.org/show_bug.cgi?id=111863
910
911         Reviewed by Benjamin Poulain.
912
913         * UIProcess/API/gtk/WebKitUIClient.cpp:
914         (attachUIClientToView): Include missing initializer for pluginLoadPolicy.
915
916 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
917
918         Unreviewed, rolling out r145254, r145264, and r145288.
919         http://trac.webkit.org/changeset/145254
920         http://trac.webkit.org/changeset/145264
921         http://trac.webkit.org/changeset/145288
922         https://bugs.webkit.org/show_bug.cgi?id=111917
923
924         Test breakage hints at conceptual unsoundness (Requested by ap
925         on #webkit).
926
927         * NetworkProcess/SchedulableLoader.cpp:
928         (WebKit::SchedulableLoader::invalidateSandboxExtensions):
929         * Shared/Downloads/Download.cpp:
930         (WebKit::Download::didFinish):
931         (WebKit::Download::didFail):
932         (WebKit::Download::didCancel):
933         * Shared/SandboxExtension.h:
934         (SandboxExtension):
935         (WebKit::SandboxExtension::invalidate):
936         * Shared/WebMemorySampler.cpp:
937         (WebKit::WebMemorySampler::stop):
938         * Shared/mac/SandboxExtensionMac.mm:
939         (WebKit::SandboxExtension::SandboxExtension):
940         (WebKit::SandboxExtension::invalidate):
941         (WebKit::SandboxExtension::consume):
942         * WebProcess/WebPage/WebPage.cpp:
943         (WebKit::WebPage::performDragControllerAction):
944         (WebKit::WebPage::SandboxExtensionTracker::invalidate):
945         (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
946         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
947         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
948
949 2013-03-08  Dean Jackson  <dino@apple.com>
950
951         Don't snapshot Java plugins
952         https://bugs.webkit.org/show_bug.cgi?id=111899
953
954         Reviewed by Tim Horton.
955
956         If the plugin is Java, return true from shouldAlwaysAutoStart.
957
958         * WebProcess/Plugins/PluginView.cpp:
959         (WebKit::PluginView::shouldAlwaysAutoStart): Check the mimetype for Java.
960
961 2013-03-08  Alexey Proskuryakov  <ap@apple.com>
962
963         <rdar://problem/13338743> Fix sandbox profile preprocessor flags for compatibility with new clang.
964
965         Reviewed by Alexey Proskuryakov.
966         Patch by Bob Wilson.
967
968         * DerivedSources.make: Only use -traditional when we have to work around old
969         behavior of -std=c89.
970
971 2013-03-08  Joone Hur  <joone.hur@intel.com>
972
973         Unreviewed build fix for EFL, GTK and Qt after r145254.
974
975         * Shared/SandboxExtension.h:
976         (WebKit::SandboxExtension::revoke):
977
978 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
979
980         non-Mac ports build fix after r145235.
981
982         * UIProcess/WebInspectorProxy.cpp:
983         (WebKit::createInspectorPageGroup):
984
985 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
986
987         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
988         https://bugs.webkit.org/show_bug.cgi?id=111297
989
990         Reviewed by Kenneth Rohde Christiansen.
991
992         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
993         * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
994         * WebProcess/WebPage/WebPage.cpp:
995         * WebProcess/WebPage/WebPage.h:
996
997 2013-03-08  Alexey Proskuryakov  <ap@apple.com>
998
999         Make it possible to reuse sandbox extensions
1000         https://bugs.webkit.org/show_bug.cgi?id=111883
1001
1002         Reviewed by Anders Carlsson.
1003
1004         Replaced invalidate() with revoke().
1005
1006         We now count how many times consume() was called, and keep the extension active
1007         for as long as revoke() hasn't been called as many times. Also, we only permanently
1008         destroy the extension in destructor.
1009
1010         This allows for properly keeping extensions in NetworkBlobRegistry for as long as
1011         they are needed.
1012
1013         * NetworkProcess/SchedulableLoader.cpp:
1014         (WebKit::SchedulableLoader::invalidateSandboxExtensions):
1015         * Shared/Downloads/Download.cpp:
1016         (WebKit::Download::didFinish):
1017         (WebKit::Download::didFail):
1018         (WebKit::Download::didCancel):
1019         * Shared/SandboxExtension.h:
1020         (SandboxExtension):
1021         * Shared/WebMemorySampler.cpp:
1022         (WebKit::WebMemorySampler::stop):
1023         * Shared/mac/SandboxExtensionMac.mm:
1024         (WebKit::SandboxExtension::SandboxExtension):
1025         (WebKit::SandboxExtension::revoke):
1026         (WebKit::SandboxExtension::consume):
1027         * WebProcess/WebPage/WebPage.cpp:
1028         (WebKit::WebPage::performDragControllerAction):
1029         (WebKit::WebPage::SandboxExtensionTracker::invalidate):
1030         (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension):
1031         (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad):
1032         (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad):
1033
1034 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1035
1036         [WK2][GTK] Invalid request returned by webkit_download_get_request if called before download starts
1037         https://bugs.webkit.org/show_bug.cgi?id=111574
1038
1039         Reviewed by Alexey Proskuryakov.
1040
1041         webkit_download_get_request() creates the WebKitURIRequest object
1042         on demand using the ResourceRequest from the DownloadProxy. The
1043         ResourceRequest of the DownloadProxy is set in
1044         DownloadProxy::didStart(), so if we call
1045         webkit_download_get_request() before didStart we return an invalid
1046         WebKitURIRequest created from a NULL ResourceRequest. This is not
1047         a problem for downloads started in the web process, because we
1048         create the WebKitDownload after DownloadProxy::didStart(). For
1049         downloads started manually with webkit_web_context_download_uri()
1050         we need to create download object with the ResourceRequest passed
1051         to the DownloadProxy.
1052
1053         * UIProcess/API/gtk/WebKitDownload.cpp:
1054         (webkitDownloadCreateForRequest): New helper function for
1055         downloads started manually to created them with a given
1056         ResourceRequest.
1057         * UIProcess/API/gtk/WebKitDownloadPrivate.h:
1058         * UIProcess/API/gtk/WebKitWebContext.cpp:
1059         (webkitWebContextStartDownload): Use
1060         webkitDownloadCreateForRequest().
1061         * UIProcess/API/gtk/tests/TestDownloads.cpp:
1062         (testDownloadLocalFile):
1063         (testDownloadLocalFileError):
1064         (testDownloadRemoteFile):
1065         (testDownloadRemoteFileError):
1066         (testPolicyResponseDownload):
1067
1068 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1069
1070         <rdar://problem/13363499> Blobs are not cleaned up when WebProcess terminates
1071         https://bugs.webkit.org/show_bug.cgi?id=111803
1072
1073         Reviewed by Brady Eidson.
1074
1075         Track which blobs were created for each connection, and unregister them when
1076         the connection closes.
1077
1078         Normally, this happens when a document is destroyed through PublicURLManager
1079         in WebProcess. But we don't get there when the web process crashes, or is terminated
1080         without waiting for document destruction.
1081
1082         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
1083         (WebKit::NetworkBlobRegistry::registerBlobURL):
1084         (WebKit::NetworkBlobRegistry::unregisterBlobURL):
1085         (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
1086         * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
1087         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1088         (WebKit::NetworkConnectionToWebProcess::didClose):
1089         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1090         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1091         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1092
1093 2013-03-08  Timothy Hatcher  <timothy@apple.com>
1094
1095         Make the WebKit2 Web Inspector use tiled drawing and accelerated drawing.
1096
1097         <rdar://problem/12676223>
1098
1099         Reviewed by David Kilzer.
1100
1101         * UIProcess/WebInspectorProxy.cpp:
1102         (WebKit::createInspectorPageGroup): Call setAcceleratedDrawingEnabled with true on 10.8+.
1103         * UIProcess/mac/WebInspectorProxyMac.mm:
1104         (-[WKWebInspectorWKView _shouldUseTiledDrawingArea]): Added. Return YES on 10.8+.
1105
1106 2013-03-08  Huang Dongsung  <luxtella@company100.net>
1107
1108         Coordinated Graphics: Handle scrolling correctly.
1109         https://bugs.webkit.org/show_bug.cgi?id=111406
1110
1111         Reviewed by Simon Fraser.
1112
1113         Coordinated Graphics deals with fast scrolling and slow scrolling in the same
1114         routine, so WebChromeClient::invalidateContentsForSlowScroll() should call
1115         DrawingArea:scroll().
1116
1117         When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we
1118         should call scheduleLayerFlush() to notify to UI Process. In addition, when we
1119         don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to
1120         update non composited contents.
1121
1122         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1123         (WebKit::WebChromeClient::invalidateContentsForSlowScroll):
1124         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1125         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
1126
1127 2013-03-08  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1128
1129         [WK2][EFL] Remove EwkView::setImageData()
1130         https://bugs.webkit.org/show_bug.cgi?id=111849
1131
1132         Reviewed by Andreas Kling.
1133
1134         EwkView::setImageData() removed as it is not used at the moment 
1135         (it used to be part of eliminated non coord graphics code path). 
1136
1137         * UIProcess/API/efl/EwkView.cpp:
1138         * UIProcess/API/efl/EwkView.h:
1139         (EwkView):
1140         * UIProcess/cairo/BackingStoreCairo.cpp:
1141         (WebKit::BackingStore::incorporateUpdate):
1142
1143 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1144
1145         [GTK] Memory leak in webkit_web_view_load_request() in WebKit2 API
1146         https://bugs.webkit.org/show_bug.cgi?id=111160
1147
1148         Reviewed by Benjamin Poulain.
1149
1150         leakRef() is used for the returned PassRefPtr without taking the
1151         ownership of the leaked ref.
1152
1153         * UIProcess/API/gtk/WebKitWebView.cpp:
1154         (webkit_web_view_load_request): Use RefPtr local variable.
1155
1156 2013-03-07  Huang Dongsung  <luxtella@company100.net>
1157
1158         [EFL] EwkView should keep css position instead of scroll position in device pixel.
1159         https://bugs.webkit.org/show_bug.cgi?id=110847
1160
1161         Reviewed by Kenneth Rohde Christiansen.
1162
1163         Signed off for WebKit2 by Benjamin Poulain.
1164
1165         There are bugs that some code expect that EwkView::pagePosition() returns css
1166         position while others expect that it returns scroll position in device pixel.
1167         In addition, some code call EwkView::setPagePosition() with css position while
1168         others call it with scroll position in device pixel.
1169
1170         This patch makes all code use setPagePosition() and pagePosition() with
1171         UI pixels (a.k.a Density Independent Pixel).
1172
1173         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
1174         (WebKit::PageViewportControllerClientEfl::setViewportPosition):
1175         * UIProcess/efl/WebView.cpp:
1176         (WebKit::WebView::paintToCairoSurface):
1177         (WebKit::WebView::updateViewportSize):
1178         (WebKit::WebView::transformToScene):
1179         (WebKit::WebView::pageDidRequestScroll):
1180
1181 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1182
1183         https://bugs.webkit.org/show_bug.cgi?id=111801
1184         https://bugs.webkit.org/show_bug.cgi?id=111801
1185
1186         Reviewed by Geoff Garen.
1187
1188         Move unnecessary includes out of headers.
1189
1190         * NetworkProcess/HostRecord.h:
1191         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1192         * NetworkProcess/NetworkProcess.cpp:
1193         * NetworkProcess/NetworkResourceLoadScheduler.cpp:
1194         * NetworkProcess/NetworkResourceLoadScheduler.h:
1195         * NetworkProcess/NetworkResourceLoader.h:
1196         * NetworkProcess/SchedulableLoader.cpp:
1197         * NetworkProcess/SchedulableLoader.h:
1198         * NetworkProcess/SyncNetworkResourceLoader.cpp:
1199
1200 2013-03-07  Andreas Kling  <akling@apple.com>
1201
1202         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
1203         <http://webkit.org/b/71354>
1204         <rdar://problem/10565998>
1205
1206         Reviewed by Anders Carlsson.
1207
1208         On Mac, we already cache the window rect through the WindowAndViewFramesChanged
1209         message, so simply return that in WebChromeClient::windowRect() instead of
1210         sending a synchronous query to the UIProcess.
1211
1212         If a programmatic resize is requested, we bypass the cache until we've received
1213         a new WindowAndViewFramesChanged message. This compromise allows us to return
1214         cached rects in the common case, and handles creating a new window and immediately
1215         resizing it gracefully.
1216
1217         Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than
1218         IntRect/IntPoint to match the ChromeClient::windowRect() return type.
1219
1220         * UIProcess/API/mac/WKView.mm:
1221         (-[WKView _updateWindowAndViewFrames]):
1222         * UIProcess/WebPageProxy.h:
1223         (WebPageProxy):
1224         * UIProcess/mac/WebPageProxyMac.mm:
1225         (WebKit::WebPageProxy::windowAndViewFramesChanged):
1226         * WebProcess/Plugins/PluginView.cpp:
1227         (WebKit::PluginView::windowAndViewFramesChanged):
1228         * WebProcess/Plugins/PluginView.h:
1229         (PluginView):
1230         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1231         (WebKit::WebChromeClient::setWindowRect):
1232         (WebKit::WebChromeClient::windowRect):
1233         * WebProcess/WebPage/WebPage.cpp:
1234         (WebKit::WebPage::WebPage):
1235         (WebKit::WebPage::sendSetWindowFrame):
1236         (WebKit::WebPage::windowAndViewFramesChanged):
1237         * WebProcess/WebPage/WebPage.h:
1238         (WebPage):
1239         (WebKit::WebPage::windowFrameInScreenCoordinates):
1240         (WebKit::WebPage::viewFrameInWindowCoordinates):
1241         (WebKit::WebPage::hasCachedWindowFrame):
1242         (WebKit::WebPage::accessibilityPosition):
1243         * WebProcess/WebPage/WebPage.messages.in:
1244         * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
1245         (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
1246
1247 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
1248
1249         Don't try to create a sandbox extension when path is empty
1250         https://bugs.webkit.org/show_bug.cgi?id=111788
1251
1252         Reviewed by Anders Carlsson.
1253
1254         * Shared/FileAPI/BlobRegistrationData.cpp:
1255         (WebKit::BlobRegistrationData::BlobRegistrationData): Skip File objects with empty
1256         paths to avoid logging an error to console.
1257
1258 2013-03-07  Mark Lam  <mark.lam@apple.com>
1259
1260         WebPageProxy::exceededDatabaseQuota() needs to be serialized.
1261         https://bugs.webkit.org/show_bug.cgi?id=111631.
1262
1263         Reviewed by Geoffrey Garen.
1264
1265         Previously, WebPageProxy::exceededDatabaseQuota() is called synchronously
1266         with script execution in the WebProcess. Hence, it is never called in a
1267         recursive manner.
1268
1269         In webkit2, we can have multiple WebProcesses concurrently triggering a
1270         call to this function. While the function is waiting on feedback from a
1271         UI dialog, the wait loop may re-enter the function to service a second
1272         request to call this function from another WebProcess. This results in
1273         problems where some of the WebProcesses will not get a proper reply, and
1274         therefore hangs perpetually waiting for a non-forthcoming reply.
1275
1276         This changeset changes the function to queue the requests and ensure
1277         that we do not recursively callback to the UI client.
1278
1279         * Platform/CoreIPC/HandleMessage.h:
1280         (CoreIPC::callMemberFunction):
1281         * UIProcess/WebPageProxy.cpp:
1282         (ExceededDatabaseQuotaRecords):
1283         (Record):
1284         (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
1285         (WebKit::ExceededDatabaseQuotaRecords::ExceededDatabaseQuotaRecords):
1286         (WebKit::ExceededDatabaseQuotaRecords::~ExceededDatabaseQuotaRecords):
1287         (WebKit::ExceededDatabaseQuotaRecords::shared):
1288         (WebKit::ExceededDatabaseQuotaRecords::createRecord):
1289         (WebKit::ExceededDatabaseQuotaRecords::add):
1290         (WebKit::ExceededDatabaseQuotaRecords::next):
1291         (WebKit::WebPageProxy::exceededDatabaseQuota):
1292         * UIProcess/WebPageProxy.h:
1293         * UIProcess/WebPageProxy.messages.in:
1294
1295 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
1296
1297         CFNetwork cache partitioning does not work properly on subdomains
1298         https://bugs.webkit.org/show_bug.cgi?id=111772
1299
1300         Reviewed by David Kilzer.
1301
1302         Ensure that the CFString is UTF-8 so that WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition will always work.
1303
1304         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
1305         (WebKit::partitionName): Create a UTF-8 CFString explicitly
1306
1307 2013-03-07  Beth Dakin  <bdakin@apple.com>
1308
1309         Need API to draw custom overhang area
1310         https://bugs.webkit.org/show_bug.cgi?id=111679
1311         -and corresponding-
1312         <rdar://problem/13291415>
1313
1314         Reviewed by Simon Fraser.
1315
1316         The new API is WKBundlePageSetTopOverhangImage() and 
1317         WKBundlePageSetBottomOverhangImage(). When the API is called, WebPage will get 
1318         GraphicsLayers for the appropriate area from FrameView, and then set the image as 
1319         the contents of the layer.
1320
1321         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
1322         (WKBundlePageSetTopOverhangImage):
1323         (WKBundlePageSetBottomOverhangImage):
1324         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1325         * WebProcess/WebPage/WebPage.h:
1326         (WebPage):
1327         * WebProcess/WebPage/mac/WebPageMac.mm:
1328         (WebKit::WebPage::setTopOverhangImage):
1329         (WebKit):
1330         (WebKit::WebPage::setBottomOverhangImage):
1331
1332 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
1333
1334         Reduce page cache size on Mac
1335         https://bugs.webkit.org/show_bug.cgi?id=111795
1336
1337         Rubber stamped by Geoff Garen
1338
1339         5 entries is unnecessarily large; research show 3 should suffice.
1340         On a low memory warning we should clear this completely.
1341
1342         * Shared/CacheModel.cpp:
1343         (WebKit::calculateCacheSizes):
1344             - reduce maximum to 3.
1345
1346 2013-03-07  Anders Carlsson  <andersca@apple.com>
1347
1348         Add a didFocusTextField callback to the injected bundle form client
1349         https://bugs.webkit.org/show_bug.cgi?id=111771
1350
1351         Reviewed by Andreas Kling.
1352
1353         Add a new client callback that's invoked whenever a text input field is focused.
1354
1355         * Shared/APIClientTraits.cpp:
1356         (WebKit):
1357         * Shared/APIClientTraits.h:
1358         * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
1359         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
1360         (WebKit::InjectedBundlePageFormClient::didFocusTextField):
1361         (WebKit):
1362         * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h:
1363         (InjectedBundlePageFormClient):
1364         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
1365         (WebKit::WebChromeClient::focusedNodeChanged):
1366
1367 2013-03-07  Tim Horton  <timothy_horton@apple.com>
1368
1369         Null-check the page overlay before trying to use it.
1370
1371         Reviewed by Simon Fraser.
1372
1373         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1374         (WebKit::TiledCoreAnimationDrawingArea::scroll):
1375
1376 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
1377
1378         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
1379         https://bugs.webkit.org/show_bug.cgi?id=109932
1380
1381         Reviewed by Martin Robinson.
1382
1383         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
1384         They are now available by default due to the limited set of supported compilers.
1385
1386 2013-03-05  Gustavo Noronha Silva  <gns@gnome.org>
1387
1388         [GTK] Enable translations for WebKit2
1389         https://bugs.webkit.org/show_bug.cgi?id=111398
1390
1391         Reviewed by Martin Robinson.
1392
1393         * GNUmakefile.am: define PACKAGE_LOCALE_DIR when building WebProcess's main module.
1394         * WebProcess/gtk/WebProcessMainGtk.cpp:
1395         (WebKit::WebProcessMainGtk): register the i18n domain name, and prefer UTF-8, since
1396         we're GTK+; at the moment we're just using the same name as WebKitGTK+, pro: the
1397         translation module can be reused, con: you can't have different versions of
1398         WebKitGTK+ and WebKit2GTK+ installed, because the module would not be fit for reuse
1399         in that case.
1400         * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
1401         (WebKit::childSetupFunction): do not set LC_ALL environment variable explicitly,
1402         the child process will already inherit the environment of the parent, which should
1403         have all the variables set properly.
1404
1405 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
1406
1407         SandboxExtension::createHandle raises an uncaught Objective-C exception if path is empty
1408         https://bugs.webkit.org/show_bug.cgi?id=111689
1409
1410         Reviewed by Filip Pizlo.
1411
1412         * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandle):
1413         Use a function from WebCore platform layer instead of Foundation one equivalent.
1414         We already do this elsewhere in this file.
1415
1416 2013-03-06  Tim Horton  <timothy_horton@apple.com>
1417
1418         [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll
1419         https://bugs.webkit.org/show_bug.cgi?id=111662
1420         <rdar://problem/13355808>
1421
1422         Reviewed by Simon Fraser.
1423
1424         Instead of setNeedsDisplay()ing the whole page overlay layer every time through
1425         TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is
1426         necessary to keep things painted in the right place when we scroll (the overlay
1427         is fixed to the size of the view), but is quite wasteful in apps that don’t scroll.
1428
1429         This works with threaded scrolling because overlay installation forces us
1430         into main-thread scrolling mode.
1431
1432         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1433         (WebKit::TiledCoreAnimationDrawingArea::scroll):
1434         (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
1435
1436 2013-03-06  Tim Horton  <timothy_horton@apple.com>
1437
1438         [wk2] Page overlays should use the accelerated drawing setting instead of hardcoding it on
1439         https://bugs.webkit.org/show_bug.cgi?id=111654
1440         <rdar://problem/13364085>
1441
1442         Reviewed by Simon Fraser.
1443
1444         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1445         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
1446         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
1447
1448 2013-03-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1449
1450         [EFL][WK2] Enable interactive form validation for email and url input type validation
1451         https://bugs.webkit.org/show_bug.cgi?id=111026
1452
1453         Reviewed by Laszlo Gombos.
1454
1455         WebKit EFL can check if input value is valid by enabling this feature.
1456
1457         * UIProcess/API/efl/EwkView.cpp:
1458         (EwkView::EwkView):
1459
1460 2013-03-06  Alexey Proskuryakov  <ap@apple.com>
1461
1462         [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information
1463         https://bugs.webkit.org/show_bug.cgi?id=111623
1464
1465         Reviewed by Brady Eidson.
1466
1467         * Shared/WebCoreArgumentCoders.cpp:
1468         * Shared/WebCoreArgumentCoders.h:
1469         (CoreIPC::::encode): Made the decision on whether to serialize WebCore data in
1470         ResourceResponse dynamic. If the platform data is out of date, we need both
1471         (because some platforms use encodePlatformData() to pass additional information).
1472         (CoreIPC::::decode): Decode platform data first, because this overwrites the ResourceResponse.
1473
1474         * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData): Don't
1475         encode NSURLResponse if it's out of date. We may have a bad NSURLResponse with 0
1476         status code given to client, but it was almost certainly the same on sending side.
1477         WebCore doesn't mutate real responses - it either keeps them as is, or builds
1478         entirely synthetic ones.
1479
1480 2013-03-04  Jer Noble  <jer.noble@apple.com>
1481
1482         Default mouse cursor behavior should be auto-hide for full screen video with custom controls
1483         https://bugs.webkit.org/show_bug.cgi?id=107601
1484
1485         Reviewed by Beth Dakin.
1486
1487         Enable the CURSOR_VISIBILITY feature.
1488
1489         * Configurations/FeatureDefines.xcconfig:
1490
1491 2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1492
1493         [GTK][WK2] Implement WebInspector::localizedStringsURL() to return the file URL of localizedStrings.js
1494         https://bugs.webkit.org/show_bug.cgi?id=111448
1495
1496         Reviewed by Alexey Proskuryakov.
1497
1498         Implement WebInspector::localizedStringsURL() method to return the
1499         file URL of the localizedStrings.js.
1500
1501         This prevents printing warnings about "Localized string not found" in
1502         the console.
1503
1504         * WebProcess/WebPage/gtk/WebInspectorGtk.cpp:
1505         (WebKit::WebInspector::localizedStringsURL):
1506
1507 2013-03-06  Sudarsana Nagineni  <sudarsana.nagineni@intel.com>
1508
1509         [EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_changed failing
1510         https://bugs.webkit.org/show_bug.cgi?id=110608
1511
1512         Reviewed by Kenneth Rohde Christiansen.
1513
1514         Test was expecting ContentsSizeChanged signal from ViewClientEfl, but
1515         WebView was not calling client callback if useFixedLayout() is true.
1516
1517         This patch prevent early return if useFixedLayout() is true and call
1518         client callback didChangeContentsSize(), which will emit the signal.
1519
1520         * UIProcess/efl/ViewClientEfl.cpp:
1521         (WebKit::ViewClientEfl::didChangeContentsSize):
1522         * UIProcess/efl/WebView.cpp:
1523         (WebKit::WebView::didChangeContentsSize):
1524
1525 2013-03-06  Manuel Rego Casasnovas  <rego@igalia.com>
1526
1527         [WK2][GTK] Fix unit test WebKit2APITests/WebKitWebView/mouse-target
1528         https://bugs.webkit.org/show_bug.cgi?id=82866
1529
1530         Reviewed by Martin Robinson.
1531
1532         Test was failing because of new media controls needs more space to be
1533         painted than just 10x10 pixels. This is similar to r144070.
1534
1535         * UIProcess/API/gtk/tests/TestWebKitWebView.cpp:
1536         (testWebViewMouseTarget): Modified HTML in order to give more space to the media controls.
1537
1538 2013-03-06  Tim Horton  <timothy_horton@apple.com>
1539
1540         [wk2] Page Overlays: Hook up the layer border/repaint counter setting to the overlay layer
1541         https://bugs.webkit.org/show_bug.cgi?id=111547
1542         <rdar://problem/13355801>
1543
1544         Reviewed by Simon Fraser.
1545
1546         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
1547         (WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
1548         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
1549         Keep the page overlay layer's debug border and repaint counter settings updated.
1550
1551 2013-03-06  Geoffrey Garen  <ggaren@apple.com>
1552
1553         Joing the adoptNS/adoptCF/adoptRef club.
1554         https://bugs.webkit.org/show_bug.cgi?id=111467
1555
1556         Reviewed by Darin Adler.
1557
1558         Responding to review comments by Darin Adler.
1559
1560         * NetworkProcess/mac/NetworkProcessMac.mm:
1561         (WebKit::NetworkProcess::platformInitializeNetworkProcess):
1562         * WebProcess/mac/WebProcessMac.mm:
1563         (WebKit::WebProcess::platformInitializeWebProcess): Tighten up this code
1564         by reducing extraneous local variables.
1565
1566 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
1567
1568         Track sandbox extensions for blobs in NetworkProcess
1569         https://bugs.webkit.org/show_bug.cgi?id=111484
1570
1571         Reviewed by Sam Weinig.
1572
1573         * WebKit2.xcodeproj/project.pbxproj:
1574         * NetworkProcess/FileAPI: Added.
1575         * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: Added.
1576         * NetworkProcess/FileAPI/NetworkBlobRegistry.h: Added.
1577         Added a registry that wraps normal in-process "BlobRegistryImpl", and also tracks
1578         sandbox extensions for blobs. It will also track process connections, so that
1579         blobs could be removed when a process crashes.
1580
1581         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
1582         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
1583         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
1584         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
1585         Use NetworkBlobRegistry.
1586
1587         * NetworkProcess/SchedulableLoader.h:
1588         * NetworkProcess/SchedulableLoader.cpp:
1589         (WebKit::SchedulableLoader::SchedulableLoader): Add extensions for blobs, both in
1590         request URL and in request data.
1591         (WebKit::SchedulableLoader::consumeSandboxExtensions): Request may now have multiple
1592         extensions.
1593         (WebKit::SchedulableLoader::invalidateSandboxExtensions): Ditto.
1594
1595         * Shared/FileAPI/BlobRegistrationData.cpp: Fixed extension creation - actually
1596         store the result.
1597
1598 2013-03-06  Andras Becsi  <andras.becsi@digia.com>
1599
1600         [Qt][WK2] Fix the Mac build after r144787
1601         https://bugs.webkit.org/show_bug.cgi?id=111569
1602
1603         Reviewed by Csaba Osztrogonác.
1604
1605         Use uint_64 explicitly instead of size_t.
1606
1607         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1608         (CoreIPC::::encode):
1609         (CoreIPC::::decode):
1610
1611 2013-03-05  Kent Tamura  <tkent@chromium.org>
1612
1613         Rename WebCore/editing/visible_units.* to VisibleUnits.*
1614         https://bugs.webkit.org/show_bug.cgi?id=111426
1615
1616         Reviewed by Alexey Proskuryakov.
1617
1618         * WebProcess/WebPage/mac/WebPageMac.mm:
1619
1620 2013-03-06  Zeno Albisser  <zeno@webkit.org>
1621
1622         DataReference::vector() should be const.
1623         https://bugs.webkit.org/show_bug.cgi?id=109928
1624
1625         Reviewed by Anders Carlsson.
1626
1627         * Platform/CoreIPC/DataReference.h:
1628         (CoreIPC::DataReference::vector):
1629
1630 2013-03-06  Luiz Agostini  <luiz.agostini@nokia.com>
1631
1632         Accelerated overflow scrolling for Coordinated Graphics.
1633         https://bugs.webkit.org/show_bug.cgi?id=110323
1634
1635         Reviewed by Noam Rosenthal.
1636         Signed off for WebKit2 by Simon Fraser.
1637
1638         A scroll offset is applied to individual layers on UI process and the
1639         web process is notified assynchronously.
1640         The new API WKCoordinatedScene may be used to scroll layers in the UI process.
1641
1642         * CMakeLists.txt:
1643
1644         Encoding and decoding the new members of CoordinatedGraphicsLayerState.
1645
1646         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1647         (CoreIPC::::encode):
1648         (CoreIPC::::decode):
1649
1650         Adding acceleratedCompositingForOverflowScrollEnabled to WebPreferencesStore.
1651
1652         * Shared/WebPreferencesStore.h:
1653         * WebProcess/WebPage/WebPage.cpp:
1654         (WebKit::WebPage::updatePreferences):
1655
1656         New API WKCoordinatedScene is used to scroll layers on UI side.
1657
1658         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
1659         * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
1660         * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
1661
1662         A new message is used to send scroll commit messages to web process.
1663
1664         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1665         (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
1666         (WebKit):
1667         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1668         (CoordinatedLayerTreeHostProxy):
1669         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1670         (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost):
1671         (WebKit::CoordinatedLayerTreeHost::detachLayer):
1672         (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer):
1673         (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect):
1674         (WebKit::CoordinatedLayerTreeHost::purgeBackingStores):
1675         (WebKit::CoordinatedLayerTreeHost::commitScrollOffset):
1676         (WebKit):
1677         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1678         (CoordinatedLayerTreeHost):
1679         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in:
1680
1681 2013-03-06  Huang Dongsung  <luxtella@company100.net>
1682
1683         [EFL][WK2] Convert from device view size to UI view size only in EwkView.
1684         https://bugs.webkit.org/show_bug.cgi?id=110197
1685
1686         Reviewed by Kenneth Rohde Christiansen.
1687
1688         Signed off for WebKit2 by Benjamin Poulain.
1689
1690         Device scale factor is a property of the physical display, so only EwkView
1691         should deal with converting device view size to UI (a.k.a Density Independent Pixel)
1692         view size. It increases readability because we can regard a view size in
1693         other classes (e.g. WebView, PageViewportController, WebPage) except for
1694         EwkView as UI size.
1695
1696         * UIProcess/API/efl/EwkView.cpp:
1697         (EwkView::setDeviceScaleFactor):
1698         (EwkView::setDeviceSize):
1699         (EwkView::size):
1700         (EwkView::deviceSize):
1701         (EwkView::scheduleUpdateDisplay):
1702         (EwkView::createGLSurface):
1703         (EwkView::handleEvasObjectCalculate):
1704         * UIProcess/API/efl/EwkView.h:
1705         (EwkView):
1706         * UIProcess/efl/WebView.cpp:
1707         (WebKit::WebView::paintToCurrentGLContext):
1708         (WebKit::WebView::updateViewportSize):
1709
1710 2013-03-06  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1711
1712         [EFL][WK2] Use Vector::reserveInitialCapacity() in WebEventFactory::createWebTouchEvent()
1713         https://bugs.webkit.org/show_bug.cgi?id=111530
1714
1715         Reviewed by Benjamin Poulain.
1716
1717         In WebEventFactory::createWebTouchEvent(), when constructing the vector of touch points,
1718         we already know in advance the total number of touch points. Therefore, we should
1719         leverage WTF::Vector::reserveInitialCapacity() and WTF::Vector::uncheckedAppend() to save
1720         some capacity checks.
1721
1722         * Shared/efl/WebEventFactory.cpp:
1723         (WebKit::WebEventFactory::createWebTouchEvent):
1724
1725 2013-03-05  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
1726
1727         [WK2][EFL] Enable asynchronous spell checking by default
1728         https://bugs.webkit.org/show_bug.cgi?id=111295
1729
1730         Reviewed by Benjamin Poulain.
1731
1732         Asynchronous spell checking feature is disabled by default for wk2 platforms.
1733         It means all requests of spell checking are sent synchronously.
1734
1735         WebKit-EFL implements requestCheckingOfString method which allows
1736         to check spelling asynchronously.
1737
1738         * UIProcess/API/efl/EwkView.cpp:
1739         (EwkView::EwkView):
1740
1741 2013-03-05  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1742
1743         [EFL] Ensure right format is used in SnapshotImageGL.
1744         https://bugs.webkit.org/show_bug.cgi?id=111333
1745
1746         Reviewed by Benjamin Poulain.
1747
1748         GL_BGRA format is not standard for glReadPixels with GLES.
1749         This patch ensures that GL_RGBA is used in SnapshotImageGL
1750         while using GLES.
1751
1752         * UIProcess/API/efl/SnapshotImageGL.cpp:
1753         (getImageSurfaceFromFrameBuffer):
1754
1755 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
1756
1757         Each web process truncates the disk cache to zero on launch
1758         https://bugs.webkit.org/show_bug.cgi?id=111467
1759
1760         Reviewed by Darin Adler.
1761
1762         Let's not do that.
1763
1764         * WebProcess/mac/WebProcessMac.mm:
1765         (WebKit::WebProcess::platformInitializeWebProcess):
1766
1767 2013-03-05  Anders Carlsson  <andersca@apple.com>
1768
1769         Reset the values if there is a quota error
1770         https://bugs.webkit.org/show_bug.cgi?id=111500
1771
1772         Reviewed by Beth Dakin.
1773
1774         * WebProcess/Storage/StorageAreaProxy.cpp:
1775         (WebKit::StorageAreaProxy::didSetItem):
1776         (WebKit::StorageAreaProxy::resetValues):
1777         (WebKit):
1778         * WebProcess/Storage/StorageAreaProxy.h:
1779         (StorageAreaProxy):
1780
1781 2013-03-05  Anders Carlsson  <andersca@apple.com>
1782
1783         Keep track of pending value changes in StorageAreaProxy
1784         https://bugs.webkit.org/show_bug.cgi?id=111496
1785
1786         Reviewed by Beth Dakin.
1787
1788         Add a HashCountedSet to keep track of the number of pending value
1789         changes for a given key. If we get incoming storage events from other
1790         processes while we have pending value changes, ignore the events.
1791
1792         * WebProcess/Storage/StorageAreaProxy.cpp:
1793         (WebKit::StorageAreaProxy::setItem):
1794         (WebKit::StorageAreaProxy::didSetItem):
1795         (WebKit::StorageAreaProxy::dispatchStorageEvent):
1796         (WebKit::StorageAreaProxy::shouldApplyChangesForKey):
1797         (WebKit):
1798         * WebProcess/Storage/StorageAreaProxy.h:
1799         (StorageAreaProxy):
1800
1801 2013-03-05  Ryuan Choi  <ryuan.choi@samsung.com>
1802
1803         [EFL] Build break with latest EFL libraries
1804         https://bugs.webkit.org/show_bug.cgi?id=111028
1805
1806         Reviewed by Dirk Pranke.
1807
1808         * PlatformEfl.cmake: Added ECORE_XXX_INCLUDE_DIRS.
1809
1810 2013-03-05  Anders Carlsson  <andersca@apple.com>
1811
1812         Use a named parameter for whether a quota error ocurred or not
1813         https://bugs.webkit.org/show_bug.cgi?id=111490
1814
1815         Reviewed by Beth Dakin.
1816
1817         This is clearer than setItem returning true on error.
1818         Also, actually set the item in the storage map.
1819
1820         * UIProcess/Storage/StorageManager.cpp:
1821         (StorageManager::StorageArea):
1822         (WebKit::StorageManager::StorageArea::setItem):
1823         (WebKit::StorageManager::setItem):
1824
1825 2013-03-05  Kiran Muppala  <cmuppala@apple.com>
1826
1827         Use new assertion API for process suppression on Mac
1828         https://bugs.webkit.org/show_bug.cgi?id=111387
1829
1830         Reviewed by Alexey Proskuryakov.
1831
1832         * Shared/ChildProcess.h:
1833         (WebKit::ChildProcess::processSuppressionEnabled): Rename
1834         m_processVisibleAssertion to m_processSuppressionAssertion.
1835         * Shared/mac/ChildProcessMac.mm:
1836         (WebKit::ChildProcess::setProcessSuppressionEnabled): Ditto. And,
1837         replace calls to WKNSProcessInfoProcessAssertionWithTypes() with call to
1838         -[NSProcessInfo beginSuspensionOfSystemBehaviors:].
1839
1840 2013-03-05  Anders Carlsson  <andersca@apple.com>
1841
1842         Move storageType() to StorageAreaProxy
1843         https://bugs.webkit.org/show_bug.cgi?id=111488
1844
1845         Reviewed by Andreas Kling.
1846
1847         * WebProcess/Storage/StorageAreaProxy.cpp:
1848         (WebKit::StorageAreaProxy::StorageAreaProxy):
1849         (WebKit::StorageAreaProxy::storageType):
1850         (WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame):
1851         * WebProcess/Storage/StorageAreaProxy.h:
1852         (StorageAreaProxy):
1853         * WebProcess/Storage/StorageNamespaceProxy.cpp:
1854         * WebProcess/Storage/StorageNamespaceProxy.h:
1855
1856 2013-03-05  Jeffrey Pfau  <jpfau@apple.com>
1857
1858         Clear associated cache partitions when deleting origins' cache
1859         https://bugs.webkit.org/show_bug.cgi?id=111383
1860
1861         Reviewed by Maciej Stachowiak.
1862
1863         Clear the cache partitions associated with the origin being cleared.
1864
1865         * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
1866         (WebKit):
1867         (WebKit::partitionName):
1868         (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames):
1869
1870 2013-03-05  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1871
1872         [WK2][EFL] WebPageProxy::setThemePath() should check that the page is valid
1873         https://bugs.webkit.org/show_bug.cgi?id=109917
1874
1875         Reviewed by Alexey Proskuryakov.
1876
1877         WebPageProxy::setThemePath() should check that the page is valid before
1878         sending IPC message.
1879
1880         * UIProcess/efl/WebPageProxyEfl.cpp:
1881         (WebKit::WebPageProxy::setThemePath):
1882
1883 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
1884
1885         <rdar://problem/13269245> Crashes creating WebKit processes in WKSandboxExtensionConsume
1886         https://bugs.webkit.org/show_bug.cgi?id=111456
1887
1888         Reviewed by Anders Carlsson.
1889
1890         It's too late to be draconian about this condition here, crashing doesn't help
1891         diagnose what went wrong when creating a sandbox extension.
1892
1893         Other SandboxExtension functions already have null checks for WKSandboxExtensionRef,
1894         and so should consumePermanently().
1895
1896         * Shared/mac/SandboxExtensionMac.mm:
1897         (WebKit::SandboxExtension::createHandle): For now, added logging when extension
1898         creation fails. If that proves insufficiently helpful in practice, we can change
1899         to a CRASH() later.
1900         (WebKit::SandboxExtension::createHandleForTemporaryFile): Ditto.
1901         (WebKit::SandboxExtension::consumePermanently): Gracefully fail if there is no extension
1902         to consume.
1903
1904 2013-03-05  Gwang Yoon Hwang  <ryumiel@company100.net>
1905
1906         Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
1907         https://bugs.webkit.org/show_bug.cgi?id=108294
1908
1909         Reviewed by Anders Carlsson.
1910
1911         There are two changes in WK2.
1912         1. Change CoordinatedLayerTreeHostProxy to use CoordinatedGraphicsState.
1913         2. Add encode/decode of CoordinatedGraphicsState in CoordinatedGraphicsArgumentCoders.
1914
1915         This patch is based on Dongsung Huang, and Noam's work in
1916         https://bugs.webkit.org/show_bug.cgi?id=108294
1917
1918         No new tests, covered by existing tests.
1919
1920         * Scripts/webkit2/messages.py:
1921         (headers_for_type):
1922         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
1923         (CoreIPC::::encode):
1924             Encoding UpdateImageBacking and CreateUpdateAtlas can fail when
1925             encoding WebCoordinatedSurface::Handle fails, but we don't
1926             recover in the case.
1927         (CoreIPC::::decode):
1928         (CoreIPC):
1929         * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
1930         (WebCore):
1931         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
1932         (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
1933         (WebKit):
1934         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
1935         (WebCore):
1936         (CoordinatedLayerTreeHostProxy):
1937         (WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene):
1938         * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
1939         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
1940         (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
1941         (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded):
1942         (WebKit::CoordinatedLayerTreeHost::syncLayerState):
1943         (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded):
1944         (WebKit):
1945         (WebKit::CoordinatedLayerTreeHost::updateImageBacking):
1946         (WebKit::CoordinatedLayerTreeHost::setBackgroundColor):
1947         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
1948         (CoordinatedLayerTreeHost):
1949
1950 2013-03-05  Sam Weinig  <sam@webkit.org>
1951
1952         Follow up to https://bugs.webkit.org/show_bug.cgi?id=111453, forgot to mark the files as Private.
1953
1954         * WebKit2.xcodeproj/project.pbxproj:
1955
1956 2013-03-05  Sam Weinig  <sam@webkit.org>
1957
1958         Elevate accessors of C-SPI API variants to Objective-C SPI
1959         https://bugs.webkit.org/show_bug.cgi?id=111453
1960         <rdar://problem/13340357>
1961
1962         Reviewed by Alexey Proskuryakov.
1963
1964         * Shared/mac/ObjCObjectGraphCoders.mm:
1965         * UIProcess/API/mac/WKBrowsingContextControllerInternal.h:
1966         * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h:
1967         * UIProcess/API/mac/WKBrowsingContextGroup.mm:
1968         * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h.
1969         * UIProcess/API/mac/WKProcessGroup.mm:
1970         * UIProcess/API/mac/WKProcessGroupPrivate.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h.
1971         * UIProcess/API/mac/WKView.mm:
1972         * WebKit2.xcodeproj/project.pbxproj:
1973         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
1974         (-[WKWebProcessPlugInController _bundleRef]):
1975         * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h.
1976         Add access to C-SPI WebKit types as Objective-C SPI.
1977
1978 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
1979
1980         Make AsyncFileReader work without ScriptExecutionContext
1981         https://bugs.webkit.org/show_bug.cgi?id=111376
1982
1983         Reviewed by Anders Carlsson.
1984
1985         * NetworkProcess/NetworkResourceLoader.cpp:
1986         * NetworkProcess/NetworkResourceLoader.h:
1987         Removed a dummy implementation of createAsyncFileStream, which is no longer needed.
1988
1989 2013-03-05  Alexey Proskuryakov  <ap@apple.com>
1990
1991         <rdar://problem/13345116> REGRESSION: Child processes get access to user cache
1992         and temporary directories instead of private ones
1993
1994         Reviewed by Sam Weinig.
1995
1996         * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox):
1997         Restore the correct order of calls, so sandbox parameters respect WebKit pseudo
1998         containers.
1999
2000 2013-03-05  David Kilzer  <ddkilzer@apple.com>
2001
2002         BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
2003         <http://webkit.org/b/106742>
2004
2005         Fixes the following build failures:
2006
2007             Undefined symbols for architecture i386:
2008               "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
2009                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
2010               NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
2011               "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
2012                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
2013             ld: symbol(s) not found for architecture i386
2014
2015         * Configurations/FeatureDefines.xcconfig:
2016         - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
2017
2018 2013-03-05  Tim Horton  <timothy_horton@apple.com>, Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2019
2020         [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled
2021         https://bugs.webkit.org/show_bug.cgi?id=81042
2022
2023         Reviewed by Enrica Casucci.
2024
2025         Expose WK2 setting to enable/disabled asynchronous spell checking.
2026         It's used by WebKitTestRunner to reset the setting at the beginning
2027         of the test.
2028         WebKit2 ports might be interested in this setting if they are going
2029         to enable this feature.
2030
2031         * Shared/WebPreferencesStore.h:
2032         * UIProcess/API/C/WKPreferences.cpp:
2033         (WKPreferencesSetAsynchronousSpellCheckingEnabled):
2034         (WKPreferencesGetAsynchronousSpellCheckingEnabled):
2035         * UIProcess/API/C/WKPreferences.h:
2036         * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
2037         (WKBundleSetAsynchronousSpellCheckingEnabled):
2038         * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
2039         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2040         (WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled):
2041         * WebProcess/InjectedBundle/InjectedBundle.h:
2042         * WebProcess/WebPage/WebPage.cpp:
2043         (WebKit::WebPage::updatePreferences):
2044
2045 2013-03-03  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2046
2047         [WK2][EFL] Add requestCheckingOfString implementation.
2048         https://bugs.webkit.org/show_bug.cgi?id=108172
2049
2050         Reviewed by Hajime Morrita.
2051
2052         Provide implementation of 'requestCheckingOfString' for WK2-EFL.
2053         It uses the unified text checker feature.
2054
2055         * UIProcess/efl/TextCheckerEfl.cpp:
2056         (WebKit::TextChecker::requestCheckingOfString):
2057
2058 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2059
2060         Support WebSpeech - Speech Synthesis
2061         https://bugs.webkit.org/show_bug.cgi?id=106742
2062
2063         Reviewed by Simon Fraser.
2064
2065         Enable speech synthesis for the Mac.
2066
2067         * Configurations/FeatureDefines.xcconfig:
2068
2069 2013-03-04  Anders Carlsson  <andersca@apple.com>
2070
2071         UI process storage areas should hold on to storage maps
2072         https://bugs.webkit.org/show_bug.cgi?id=111374
2073
2074         Reviewed by Beth Dakin.
2075
2076         Pass the session storage quota size through to the storage area constructor and
2077         create a StorageMap with the given quota size.
2078
2079         * UIProcess/Storage/StorageManager.cpp:
2080         (StorageManager::StorageArea):
2081         (WebKit::StorageManager::StorageArea::create):
2082         (WebKit::StorageManager::StorageArea::StorageArea):
2083         (StorageManager::SessionStorageNamespace):
2084         (WebKit::StorageManager::SessionStorageNamespace::create):
2085         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
2086         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
2087         (WebKit::StorageManager::createSessionStorageNamespace):
2088         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
2089         * UIProcess/Storage/StorageManager.h:
2090         (StorageManager):
2091         * UIProcess/WebPageProxy.cpp:
2092         (WebKit::WebPageProxy::WebPageProxy):
2093
2094 2013-03-04  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
2095
2096         Unreviewed build fix after r144675.
2097
2098         Work around picky/old C++ compilers by separating the '>>' in
2099         nested templates with a space.
2100
2101         * UIProcess/Storage/StorageManager.cpp:
2102         (StorageManager::StorageArea):
2103
2104 2013-03-04  Anders Carlsson  <andersca@apple.com>
2105
2106         More work on UI side storage
2107         https://bugs.webkit.org/show_bug.cgi?id=111370
2108
2109         Reviewed by Andreas Kling.
2110
2111         Add a DispatchStorageEvent message and begin hooking it up.
2112
2113         * UIProcess/Storage/StorageManager.cpp:
2114         (StorageManager::StorageArea):
2115         (WebKit::StorageManager::StorageArea::setItem):
2116         (WebKit):
2117         (WebKit::StorageManager::StorageArea::dispatchEvents):
2118         (WebKit::StorageManager::setItem):
2119         (WebKit::StorageManager::findStorageArea):
2120         * UIProcess/Storage/StorageManager.h:
2121         (StorageManager):
2122         * UIProcess/Storage/StorageManager.messages.in:
2123         * WebProcess/Storage/StorageAreaProxy.cpp:
2124         (WebKit::StorageAreaProxy::setItem):
2125         (WebKit::StorageAreaProxy::dispatchStorageEvent):
2126         (WebKit):
2127         * WebProcess/Storage/StorageAreaProxy.h:
2128         (StorageAreaProxy):
2129         * WebProcess/Storage/StorageAreaProxy.messages.in:
2130
2131 2013-03-04  Jer Noble  <jer.noble@apple.com>
2132
2133         Unreviewed build fix: wrap references to PluginInfoStore with 
2134         guards for platforms which do not enable NETSCAPE_PLUGIN_AP.
2135
2136         * UIProcess/WebContext.cpp:
2137         (WebKit::WebContext::WebContext):
2138         (WebKit::WebContext::~WebContext):
2139         * UIProcess/WebContext.h:
2140
2141 2013-03-04  Anders Carlsson  <andersca@apple.com>
2142
2143         Create and destroy storage areas in the UI process
2144         https://bugs.webkit.org/show_bug.cgi?id=111361
2145
2146         Reviewed by Sam Weinig.
2147
2148         * UIProcess/Storage/StorageManager.cpp:
2149         (StorageManager::StorageArea):
2150         Keep track of listener connection and storage area ID pairs.
2151         
2152         (WebKit::StorageManager::StorageArea::~StorageArea):
2153         Assert that we don't have any listeners left.
2154
2155         (WebKit::StorageManager::StorageArea::addListener):
2156         Add the pair to the set of listeners.
2157         
2158         (WebKit::StorageManager::StorageArea::removeListener):
2159         Remove the pair from the set of listeners.
2160         
2161         (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea):
2162         Given an origin, look up or create the storage area.
2163
2164         (WebKit::StorageManager::createStorageArea):
2165         Create the storage area if it doesn't already exist.
2166
2167         (WebKit::StorageManager::destroyStorageArea):
2168         Look up the storage area and destroy it.
2169
2170         * UIProcess/Storage/StorageManager.h:
2171         Add a map of open storage areas.
2172
2173 2013-03-04  Jer Noble  <jer.noble@apple.com>
2174
2175         Add API to allow WK2 clients to query the list of installed plug-ins.
2176         https://bugs.webkit.org/show_bug.cgi?id=111245
2177
2178         Reviewed by Alexey Proskuryakov.
2179
2180         Add API in WKContext, implemented by WebContext, that allows callers to register a callback 
2181         retrieve an array containing installed plugin information. This API is exposed through WebContext 
2182         because it owns the PluginInfoStore used to fulfill the request.
2183
2184         Bump the WKContextClient API by 1:
2185         * Shared/APIClientTraits.cpp:
2186         * Shared/APIClientTraits.h:
2187         * UIProcess/API/C/WKContext.h:
2188
2189         Add a client protocol to PluginInfoStore to notify the client when plugIn information has been
2190         successfully loaded:
2191         * UIProcess/Plugins/PluginInfoStore.cpp:
2192         (WebKit::PluginInfoStore::PluginInfoStore): Initialize m_client to 0.
2193         (WebKit::PluginInfoStore::loadPluginsIfNecessary): If the client is present, notify after loading the plugin store.
2194         * UIProcess/Plugins/PluginInfoStore.h:
2195         (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Default destructor.
2196         (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Default constructor.
2197         (WebKit::PluginInfoStore::setClient): Simple setter.
2198         (WebKit::PluginInfoStore::client): Simple getter.
2199
2200         * UIProcess/WebContext.cpp:
2201         (WebKit::WebContext::WebContext): Set self as the client of PluginInfoStore.
2202         (WebKit::WebContext::~WebContext): Clear the client of PluginInfoStore.
2203         (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): Pass the callback to own client.
2204         * UIProcess/WebContext.h:
2205         * UIProcess/WebContextClient.cpp:
2206         (WebKit::WebContextClient::plugInInformationBecameAvailable): Pass the callback to the registered WK callback, if present.
2207         * UIProcess/WebContextClient.h:
2208
2209 2013-03-04  Tim Horton  <timothy_horton@apple.com>
2210
2211         PDFPlugin: Hook up Services
2212         https://bugs.webkit.org/show_bug.cgi?id=111246
2213         <rdar://problem/13062672>
2214
2215         Reviewed by Alexey Proskuryakov.
2216
2217         Make the Application->Services menu work when the focused selection is a PDFPlugin.
2218
2219         * Shared/EditorState.cpp:
2220         (WebKit::EditorState::encode):
2221         (WebKit::EditorState::decode):
2222         * Shared/EditorState.h:
2223         (WebKit::EditorState::EditorState):
2224         (EditorState):
2225         Add isInPlugin property to EditorState.
2226
2227         * UIProcess/API/mac/WKView.mm:
2228         (-[WKView validRequestorForSendType:returnType:]):
2229         If the selection is currently in a Plugin, we only currently have the ability
2230         to retrieve the selection as a plain-text string, so restrict sendType to NSStringPboardType.
2231
2232         * WebProcess/Plugins/PDF/SimplePDFPlugin.h:
2233         * WebProcess/Plugins/Plugin.h:
2234         * WebProcess/Plugins/PluginView.h:
2235         * WebProcess/Plugins/PluginProxy.h:
2236         * WebProcess/Plugins/Netscape/NetscapePlugin.h:
2237         Add getStringSelection.
2238
2239         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
2240         Add pdfLayerController:didChangeSelection: delegate method.
2241
2242         * WebProcess/Plugins/PDF/PDFPlugin.h:
2243         (PDFPlugin):
2244         Add getStringSelection and notifySelectionChanged.
2245
2246         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2247         (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeSelection:]):
2248         Forward selection change notifications to our PDFPlugin.
2249
2250         (WebKit::PDFPlugin::notifySelectionChanged):
2251         Forward selection change notifications to our WebPage.
2252
2253         (WebKit::PDFPlugin::getStringSelection):
2254         Retrieve PDFLayerController's selection as a plain text string.
2255         
2256         * WebProcess/Plugins/PluginView.cpp:
2257         (WebKit::PluginView::countFindMatches):
2258         (WebKit::PluginView::findString):
2259         Drive-bys, check for existance and initialization of the plugin before using it.
2260
2261         (WebKit::PluginView::getStringSelection): Added.
2262
2263         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2264         (WebKit::WebEditorClient::respondToChangedSelection):
2265         Use didChangeSelection instead of sending the EditorStateChanged message directly.
2266
2267         * WebProcess/WebPage/WebPage.cpp:
2268         (WebKit::WebPage::editorState):
2269         If a plugin is focused and has a selection, return a EditorState that reflects that.
2270         Since PDFs aren't editable (when editing annotations, the plugin doesn't have focus),
2271         I'm not adding support for the editing-related properties when a plugin has focus.
2272
2273         (WebKit::WebPage::focusedPluginViewForFrame):
2274         (WebKit::WebPage::pluginViewForFrame):
2275         Make these class methods instead of static functions so we can use them from
2276         WebPageMac too, instead of duplicating code there.
2277
2278         (WebKit::WebPage::didChangeSelection): Added.
2279
2280         * WebProcess/WebPage/WebPage.h:
2281         Add didChangeSelection and [focused]PluginViewForFrame.
2282
2283         * WebProcess/WebPage/mac/WebPageMac.mm:
2284         (WebKit::WebPage::getStringSelectionForPasteboard):
2285         Defer to the focused plugin (if it exists) when retrieving the plain-text selection.
2286
2287 2013-03-04  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2288
2289         [WK2][EFL] Add callbacks to the WKViewClient to handle Web Process crash and relaunch
2290         https://bugs.webkit.org/show_bug.cgi?id=109828
2291
2292         Reviewed by Kenneth Rohde Christiansen.
2293
2294         Providing WKViewClient with Web Process crash and Web Process relaunch
2295         callbacks brings better design as WebView should not be aware of
2296         EFL-specific code handling the corresponding events.
2297
2298         The implementation of the mentioned Web Process callbacks was also added.
2299
2300         * UIProcess/API/C/efl/WKView.cpp:
2301         (WKViewSetThemePath):
2302         * UIProcess/API/C/efl/WKView.h:
2303         * UIProcess/efl/ViewClientEfl.cpp:
2304         (WebKit::ViewClientEfl::webProcessCrashed):
2305         (WebKit):
2306         (WebKit::ViewClientEfl::webProcessDidRelaunch):
2307         (WebKit::ViewClientEfl::ViewClientEfl):
2308         * UIProcess/efl/ViewClientEfl.h:
2309         (ViewClientEfl):
2310         * UIProcess/efl/WebView.cpp:
2311         (WebKit::WebView::setThemePath):
2312
2313             Accepts WTF::String instead of WKStringRef as it is
2314             more appropriate for C++ API implementation class.
2315
2316         (WebKit::WebView::processDidCrash):
2317         (WebKit::WebView::didRelaunchProcess):
2318         * UIProcess/efl/WebView.h:
2319         (WebView):
2320         * UIProcess/efl/WebViewClient.cpp:
2321         (WebKit::WebViewClient::webProcessCrashed):
2322         (WebKit):
2323         (WebKit::WebViewClient::webProcessDidRelaunch):
2324         * UIProcess/efl/WebViewClient.h:
2325
2326 2013-03-04  Anders Carlsson  <andersca@apple.com>
2327
2328         Complete the plug-in URL string before sending it to the UI process
2329         https://bugs.webkit.org/show_bug.cgi?id=111355
2330         <rdar://problem/13326713>
2331
2332         Reviewed by Andreas Kling.
2333
2334         If the URL is not absolute, we won't be able to find it by path extension in the plug-in info store.
2335
2336         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2337         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
2338
2339 2013-03-04  Carlos Garcia Campos  <cgarcia@igalia.com>
2340
2341         [GTK] Some WebKit2 GTK+ unit tests are failing in 32 bits bot
2342         https://bugs.webkit.org/show_bug.cgi?id=111346
2343
2344         Reviewed by Martin Robinson.
2345
2346         The problem is the use of a temporary CString object in the macro
2347         g_assert_cmpstr. It's a common mistake because we usually forget
2348         that g_assert_cmpstr is not a function but a macro, that expands
2349         to multiple lines. This patch adds a new macro ASSERT_CMP_CSTRING
2350         with the same implementation that g_assert_cmpstr, but using
2351         CStrings instead of const char*. It fixes all the cases where a
2352         temporary CString was used in g_assert_cmpstr, and uses the new
2353         macro also for the cases where we were caching the CString just
2354         for g_assert_cmpstr.
2355
2356         * UIProcess/API/gtk/tests/TestDownloads.cpp:
2357         (testDownloadRemoteFile):
2358         * UIProcess/API/gtk/tests/TestInspectorServer.cpp:
2359         (testInspectorServerPageList):
2360         * UIProcess/API/gtk/tests/TestLoaderClient.cpp:
2361         * UIProcess/API/gtk/tests/TestMain.h:
2362         * UIProcess/API/gtk/tests/TestResources.cpp:
2363         * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp:
2364         (testGetFaviconURI):
2365         * UIProcess/API/gtk/tests/TestWebKitSettings.cpp:
2366         (assertThatUserAgentIsSentInHeaders):
2367         (testWebKitSettingsUserAgent):
2368
2369 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2370
2371         Add build flag for FontLoader
2372         https://bugs.webkit.org/show_bug.cgi?id=111289
2373
2374         Reviewed by Benjamin Poulain.
2375
2376         Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default).
2377
2378         * Configurations/FeatureDefines.xcconfig:
2379
2380 2013-03-03  Tim Horton  <timothy_horton@apple.com>
2381
2382         PDFPlugin: Rename delegate method from openWithPreview to openWithNativeApplication
2383         https://bugs.webkit.org/show_bug.cgi?id=111258
2384
2385         Reviewed by Alexey Proskuryakov.
2386
2387         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h:
2388         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2389         (-[WKPDFLayerControllerDelegate openWithNativeApplication]):
2390         Rename from openWithPreview to openWithNativeApplication to match PDFKit.
2391
2392 2013-03-03  Huang Dongsung  <luxtella@company100.net>
2393
2394         [EFL][QT][WK2] Turn on ApplyDeviceScaleFactorInCompositor always.
2395         https://bugs.webkit.org/show_bug.cgi?id=110298
2396
2397         Reviewed by Kenneth Rohde Christiansen.
2398
2399         Currently, EFL and Qt turn on ApplyDeviceScaleFactorInCompositor when using
2400         fixed layout, but ApplyDeviceScaleFactorInCompositor is not related to fixed
2401         layout. It is confusing that a platform WebView deals with device view size or
2402         DIP view size case by case. So this patch always turns on
2403         ApplyDeviceScaleFactorInCompositor.
2404
2405         In addition, move the code that turns on ScrollingCoordinatorEnabled to
2406         CoordinatedLayerTreeHost.
2407
2408         * UIProcess/API/efl/EwkView.cpp:
2409         (EwkView::setDeviceScaleFactor):
2410             We should make WebPage know new DIP size.
2411         (EwkView::setSize):
2412             When we set ApplyDeviceScaleFactorInCompositor to true, make WebPage
2413             know the DIP size as a view size.
2414         * UIProcess/efl/WebView.cpp:
2415         (WebKit::WebView::updateViewportSize):
2416         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
2417         (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
2418         * WebProcess/WebPage/DrawingAreaImpl.cpp:
2419         (WebKit::DrawingAreaImpl::DrawingAreaImpl):
2420         * WebProcess/WebPage/WebPage.cpp:
2421         (WebKit::WebPage::setUseFixedLayout):
2422             WebPage sends the DIP size to Web Process even when we don't use fixed layout.
2423
2424 2013-03-03  Sam Weinig  <sam@webkit.org>
2425
2426         Shared Web Workers have an incorrect visible process name
2427         https://bugs.webkit.org/show_bug.cgi?id=111277
2428
2429         Reviewed by Dan Bernstein.
2430
2431         * SharedWorkerProcess/SharedWorkerProcess.cpp:
2432         (WebKit::SharedWorkerProcess::initializeSharedWorkerProcess):
2433         * SharedWorkerProcess/SharedWorkerProcess.h:
2434         (SharedWorkerProcess):
2435         * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm:
2436         (WebKit::SharedWorkerProcess::initializeProcessName):
2437         The SharedWorkerProcess is not an internet plug-in!
2438
2439 2013-03-03  Adam Barth  <abarth@webkit.org>
2440
2441         Unreviewed attempted build fix. Adds back some includes removed in
2442         http://trac.webkit.org/changeset/144565.
2443
2444         * Shared/WebRenderLayer.cpp:
2445         * Shared/WebRenderObject.cpp:
2446         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2447         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2448         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2449         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2450         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2451         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2452         * WebProcess/Plugins/PluginView.cpp:
2453         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2454         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2455         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2456         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2457         * WebProcess/WebPage/mac/WebPageMac.mm:
2458         * WebProcess/WebProcess.cpp:
2459         * WebProcess/soup/WebProcessSoup.cpp:
2460
2461 2013-03-03  Adam Barth  <abarth@webkit.org>
2462
2463         Unreviewed rollout of http://trac.webkit.org/r144530
2464         As described in https://bugs.webkit.org/show_bug.cgi?id=111167 and
2465         https://bugs.webkit.org/show_bug.cgi?id=111035, this patch caused a
2466         large number of ASSERTs in chromium-win.
2467
2468         * NetworkProcess/HostRecord.h:
2469         * NetworkProcess/NetworkResourceLoadScheduler.h:
2470         * NetworkProcess/NetworkResourceLoader.h:
2471         (WebCore):
2472         * Shared/WebRenderLayer.cpp:
2473         * Shared/WebRenderObject.cpp:
2474         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2475         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2476         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2477         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2478         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2479         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2480         * WebProcess/Plugins/PluginView.cpp:
2481         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2482         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2483         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2484         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2485         * WebProcess/WebPage/mac/WebPageMac.mm:
2486         * WebProcess/WebProcess.cpp:
2487         * WebProcess/soup/WebProcessSoup.cpp:
2488
2489 2013-03-02  Sam Weinig  <sam@webkit.org>
2490
2491         WebKit2 is missing the setShowsURLsInToolTips preference
2492         https://bugs.webkit.org/show_bug.cgi?id=111259
2493         <rdar://problem/12991891>
2494
2495         Reviewed by Maciej Stachowiak.
2496
2497         * Shared/WebPreferencesStore.h:
2498         * UIProcess/API/C/WKPreferences.cpp:
2499         (WKPreferencesSetShowsURLsInToolTipsEnabled):
2500         (WKPreferencesGetShowsURLsInToolTipsEnabled):
2501         * UIProcess/API/C/WKPreferencesPrivate.h:
2502         * WebProcess/WebPage/WebPage.cpp:
2503         (WebKit::WebPage::updatePreferences):
2504         Pipe it through.
2505
2506 2013-03-02  Benjamin Poulain  <bpoulain@apple.com>
2507
2508         Move computedStyleIncludingVisitedInfo from TestRunner to Internals
2509         https://bugs.webkit.org/show_bug.cgi?id=109772
2510
2511         Reviewed by Andreas Kling.
2512
2513         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2514         * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
2515         * WebProcess/WebPage/WebFrame.cpp:
2516         * WebProcess/WebPage/WebFrame.h:
2517         (WebFrame):
2518
2519 2013-03-01  Kiran Muppala  <cmuppala@apple.com>
2520
2521         Remove call to set task priority of WebKit2 processes on Mac
2522         https://bugs.webkit.org/show_bug.cgi?id=111239
2523
2524         Reviewed by Darin Adler.
2525
2526         Remove call to set task prioirty of WebKit2 processes on Mac as it
2527         is no longer necessary.
2528
2529         * Shared/mac/ChildProcessMac.mm:
2530         (WebKit::ChildProcess::platformInitialize): Remove call to setpriority().
2531
2532 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
2533
2534         Reduce amount of rebuilding when touching networking headers
2535         https://bugs.webkit.org/show_bug.cgi?id=111035
2536
2537         Reviewed by Eric Seidel.
2538
2539         Adding includes that are now necessary because WebCore headers don't have them
2540         any more.
2541
2542         * NetworkProcess/HostRecord.h:
2543         * NetworkProcess/NetworkResourceLoadScheduler.h:
2544         * NetworkProcess/NetworkResourceLoader.h:
2545         * Shared/WebRenderLayer.cpp:
2546         * Shared/WebRenderObject.cpp:
2547         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2548         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2549         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2550         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2551         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2552         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2553         * WebProcess/Plugins/PluginView.cpp:
2554         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2555         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2556         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2557         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2558         * WebProcess/WebPage/mac/WebPageMac.mm:
2559         * WebProcess/WebProcess.cpp:
2560         * WebProcess/soup/WebProcessSoup.cpp:
2561
2562 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
2563
2564         Make in-memory blobs work in NetworkProcess
2565         https://bugs.webkit.org/show_bug.cgi?id=111132
2566
2567         Reviewed by Sam Weinig.
2568
2569         * NetworkProcess/NetworkConnectionToWebProcess.cpp:
2570         (WebKit::NetworkConnectionToWebProcess::registerBlobURL):
2571         (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL):
2572         (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL):
2573         * NetworkProcess/NetworkConnectionToWebProcess.h:
2574         Implement BlobRegistry interface by using BlobRegistryImpl (same one as used in
2575         WebProcess in non-PPT mode).
2576
2577         * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added three messages
2578         needed for BlobRegistry.
2579
2580         * NetworkProcess/NetworkProcess.cpp:
2581         * NetworkProcess/NetworkProcessPlatformStrategies.cpp: Added.
2582         * NetworkProcess/NetworkProcessPlatformStrategies.h: Added.
2583         Added a mostly empty platform strategy, just for FormData to talk to BlobRegistry.
2584         Perhaps we'll find a way to avoid this WebCore code path in NetworkProcess, because
2585         we obviously know which registry implementation is in use in this process.
2586
2587         * Shared/FileAPI: Added.
2588         * Shared/FileAPI/BlobRegistrationData.cpp: Added.
2589         * Shared/FileAPI/BlobRegistrationData.h: Added.
2590         Added a class for passing BlobData and extension handles over IPC.
2591         This uses a trick with mutable a member to avoid copying decoded BlobStorageData.
2592
2593         * WebKit2.xcodeproj/project.pbxproj:
2594         * WebProcess/FileAPI: Added.
2595         * WebProcess/FileAPI/BlobRegistryProxy.cpp: Added.
2596         * WebProcess/FileAPI/BlobRegistryProxy.h: Added.
2597         A proxy implementation of BlobRegistry that just sends requests over IPC. We only
2598         need async ones.
2599
2600         * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
2601         (WebKit::WebPlatformStrategies::createBlobRegistry):
2602         * WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2603         Create an appropriate BlobRegistry.
2604
2605 2013-03-01  Zan Dobersek  <zdobersek@igalia.com>
2606
2607         Uncomment ENABLE_SVG guards to avoid having WebKitPluginProcess link
2608         against libWebCoreSVG.la when SVG is disabled.
2609
2610         Rubber-stamped by Gustavo Noronha.
2611
2612         * GNUmakefile.am:
2613
2614 2013-02-28  Sam Weinig  <sam@webkit.org>
2615
2616         Add SPI for marking a WebView as doing things on behalf of another process
2617         https://bugs.webkit.org/show_bug.cgi?id=111125
2618
2619         Reviewed by Alexey Proskuryakov.
2620
2621         * NetworkProcess/mac/RemoteNetworkingContext.h:
2622         * NetworkProcess/mac/RemoteNetworkingContext.mm:
2623         (WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
2624         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
2625         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2626         (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
2627         Stub out sourceApplicationAuditData() client function.
2628
2629 2013-03-01  Sheriff Bot  <webkit.review.bot@gmail.com>
2630
2631         Unreviewed, rolling out r144422 and r144424.
2632         http://trac.webkit.org/changeset/144422
2633         http://trac.webkit.org/changeset/144424
2634         https://bugs.webkit.org/show_bug.cgi?id=111167
2635
2636         Caused over 20 tests to fail assertion on Chromium Win port as
2637         ASSERTION FAILED: m_platformRequestUpdated (Requested by
2638         toyoshim on #webkit).
2639
2640         * NetworkProcess/HostRecord.h:
2641         * NetworkProcess/NetworkResourceLoadScheduler.h:
2642         * NetworkProcess/NetworkResourceLoader.h:
2643         (WebCore):
2644         * Shared/WebRenderLayer.cpp:
2645         * Shared/WebRenderObject.cpp:
2646         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2647         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2648         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2649         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2650         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2651         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2652         * WebProcess/Plugins/PluginView.cpp:
2653         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2654         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2655         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2656         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2657         * WebProcess/WebPage/mac/WebPageMac.mm:
2658         * WebProcess/WebProcess.cpp:
2659         * WebProcess/soup/WebProcessSoup.cpp:
2660
2661 2013-03-01  Andras Becsi  <andras.becsi@digia.com>
2662
2663         [Qt][WK2] Fix failing API tests after r143935
2664         https://bugs.webkit.org/show_bug.cgi?id=111086
2665
2666         Reviewed by Jocelyn Turcotte.
2667
2668         Convert a leftorver resume call to the new resumeAndUpdateContent() call
2669         in PageViewportControllerClientQt so that the notifications about zoom
2670         animation state changes reach the API tests.
2671
2672         * UIProcess/qt/PageViewportControllerClientQt.cpp:
2673         (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged):
2674
2675 2013-03-01  Grzegorz Czajkowski  <g.czajkowski@samsung.com>, Mariusz Grzegorczyk <mariusz.g@samsung.com>
2676
2677         [WK2] Asynchronous spell checking implementation
2678         https://bugs.webkit.org/show_bug.cgi?id=109577
2679
2680         Reviewed by Enrica Casucci.
2681
2682         Associate the abstract 'WebCore::TextCheckingRequest' object with the unique identifier
2683         on WebProcess side. The request data from the 'TextCheckingRequest' are retrieved and
2684         passed to the UIProcess. The WK2 client (TextChecker{Gtk/Mac/Efl/Qt}.cpp) gets
2685         the 'TextCheckerCompletion' object with the request data and possibility to notify
2686         the WebProcess about the spelling results.
2687         Finally, the WebPage object calls on the proper 'TextCheckingRequest' object
2688         didSuccess/didCancel method to notify the WebCore about the spelling result.
2689
2690         * CMakeLists.txt:
2691         * GNUmakefile.list.am:
2692         Add 'TextCheckerCompletion.{h/cpp}' to the WebKit2 cmake based and
2693         WK2-Gtk+ builds.
2694
2695         * Scripts/webkit2/messages.py:
2696         (headers_for_type):
2697         Add exception for 'TextCheckingRequestData' class to properly find header
2698         file for it.
2699
2700         * Shared/WebCoreArgumentCoders.cpp:
2701         * Shared/WebCoreArgumentCoders.h:
2702         Teach 'ArgumentCoder' how to encode/decode 'TextCheckingRequestData' class.
2703
2704         * Target.pri:
2705         Add 'TextCheckerCompletion.{h/cpp}' to the WK2-Qt build.
2706
2707         * UIProcess/TextChecker.h:
2708         Add 'requestCheckingOfString' method to the TextChecker's interface.
2709
2710         * UIProcess/TextCheckerCompletion.cpp: Added.
2711         (WebKit::TextCheckerCompletion::create):
2712         (WebKit::TextCheckerCompletion::TextCheckerCompletion):
2713
2714         (WebKit::TextCheckerCompletion::spellDocumentTag):
2715         Return the WebPageProxy's spellDocumentTag as the client might be
2716         interested in from which page the request came.
2717
2718         (WebKit::TextCheckerCompletion::textCheckingRequestData):
2719         Allow to retrieve 'TextCheckingRequestData' object.
2720
2721         (WebKit::TextCheckerCompletion::didFinishCheckingText):
2722         (WebKit::TextCheckerCompletion::didCancelCheckingText):
2723         Notify the 'WebPageProxy' object that the given request has been
2724         handled or canceled.
2725
2726         * UIProcess/TextCheckerCompletion.h: Added.
2727         Introduce a new class for WK2 to retrieve the request data and
2728         call didFinishCheckingText/didCancelCheckingText.
2729
2730         * UIProcess/WebPageProxy.cpp:
2731         (WebKit::WebPageProxy::requestCheckingOfString):
2732         Create 'TextCheckerCompletion' object and pass it
2733         to the 'TextChecker::requestCheckingOfString' method.
2734
2735         (WebKit::WebPageProxy::didFinishCheckingText):
2736         (WebKit::WebPageProxy::didCancelCheckingText):
2737         Send the messages to WebProcess that the given request has been
2738         handled or canceled.
2739
2740         * UIProcess/WebPageProxy.h:
2741         (WebPageProxy):
2742         Add public declarations for 'didFinishCheckingText', 'didCancelCheckingText'.
2743         Add private declarations for 'requestCheckingOfString'.
2744         Move the 'spellDocumentTag()' method to to the public section to be
2745         accessible from 'TextCheckerCompletion' class.
2746
2747         * UIProcess/WebPageProxy.messages.in:
2748         A new entry for 'RequestCheckingOfString'.
2749
2750         * UIProcess/efl/TextCheckerEfl.cpp:
2751         (WebKit::TextChecker::requestCheckingOfString):
2752         (WebKit):
2753         * UIProcess/gtk/TextCheckerGtk.cpp:
2754         (WebKit::TextChecker::requestCheckingOfString):
2755         (WebKit):
2756         * UIProcess/mac/TextCheckerMac.mm:
2757         (WebKit::TextChecker::requestCheckingOfString):
2758         (WebKit):
2759         * UIProcess/qt/TextCheckerQt.cpp:
2760         (WebKit::TextChecker::requestCheckingOfString):
2761         (WebKit):
2762         Add dummy implementations for 'requestCheckingOfString'.
2763
2764         * WebKit2.xcodeproj/project.pbxproj:
2765         Add 'TextCheckerCompletion.{h/cpp} to Mac build.
2766
2767         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2768         (WebKit::generateTextCheckingRequestID):
2769         Helper function to generate the unique identifier for the abstract
2770         'TextCheckingRequest' object.
2771
2772         (WebKit::WebEditorClient::requestCheckingOfString):
2773         Associate 'TextCheckingRequest' with the unique identifier and add them
2774         to the map object.
2775         Get the request data and send it to the UIProcess.
2776
2777         * WebProcess/WebPage/WebPage.cpp:
2778         (WebKit::WebPage::addTextCheckingRequest):
2779         Add the identifier and the request to the map object.
2780
2781         (WebKit::WebPage::didFinishCheckingText):
2782         (WebKit::WebPage::didCancelCheckingText):
2783         Call didSucceed/didCancel on the 'TextCheckingRequest' to notify the WebCore
2784         about spellcheking results.
2785         Remove the request from the map object.
2786
2787         * WebProcess/WebPage/WebPage.h:
2788         Add declarations for 'addTextCheckingRequest', 'didFinishCheckingText' and
2789         'didCancelCheckingText.'
2790
2791         * WebProcess/WebPage/WebPage.messages.in:
2792         Add a new entry for DidFinishCheckingText, DidCancelCheckingText.
2793
2794 2013-02-28  Alexey Proskuryakov  <ap@apple.com>
2795
2796         Reduce amount of rebuilding when touching networking headers
2797         https://bugs.webkit.org/show_bug.cgi?id=111035
2798
2799         Reviewed by Eric Seidel.
2800
2801         Adding includes that are now necessary because WebCore headers don't have them
2802         any more.
2803
2804         * NetworkProcess/HostRecord.h:
2805         * NetworkProcess/NetworkResourceLoadScheduler.h:
2806         * NetworkProcess/NetworkResourceLoader.h:
2807         * Shared/WebRenderLayer.cpp:
2808         * Shared/WebRenderObject.cpp:
2809         * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
2810         * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
2811         * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
2812         * WebProcess/InjectedBundle/InjectedBundle.cpp:
2813         * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
2814         * WebProcess/Plugins/PDF/PDFPlugin.mm:
2815         * WebProcess/Plugins/PluginView.cpp:
2816         * WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
2817         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
2818         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
2819         * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
2820         * WebProcess/WebPage/mac/WebPageMac.mm:
2821         * WebProcess/WebProcess.cpp:
2822         * WebProcess/soup/WebProcessSoup.cpp:
2823
2824 2013-02-28  Seokju Kwon  <seokju.kwon@gmail.com>
2825
2826         [WK2] Refactoring : Fix indentation and braces in WebInspectorClient.h|cpp
2827         https://bugs.webkit.org/show_bug.cgi?id=109925
2828
2829         Reviewed by Benjamin Poulain.
2830
2831         The contents of an outermost namespace block should not be indented.
2832         And One-line control clauses should not use braces.
2833
2834         * WebProcess/WebCoreSupport/WebInspectorClient.cpp:
2835         (WebKit::WebInspectorClient::closeInspectorFrontend):
2836         * WebProcess/WebCoreSupport/WebInspectorClient.h:
2837         (WebCore):
2838
2839 2013-02-28  Kiran Muppala  <cmuppala@apple.com>
2840
2841         Add a pre-bootstrap message for NetworkProcess XPC service
2842         https://bugs.webkit.org/show_bug.cgi?id=111127
2843
2844         Reviewed by Sam Weinig.
2845
2846         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
2847         (WebKit::XPCServiceEventHandler): Hold on to the pre-bootstrap message.
2848         * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2849         (WebKit::XPCServiceEventHandler): Ditto.
2850         * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2851         (WebKit::connectToService): Send a pre-bootstrap message for NetworkProcess
2852         XPC service.
2853
2854 2013-02-28  Conrad Shultz  <conrad_shultz@apple.com>
2855
2856         Need API to control page underlay color
2857         https://bugs.webkit.org/show_bug.cgi?id=110918
2858
2859         Reviewed by Simon Fraser.
2860
2861         * Shared/WebPageCreationParameters.cpp:
2862         (WebKit::WebPageCreationParameters::encode):
2863         Encode underlayColor.
2864         (WebKit::WebPageCreationParameters::decode):
2865         Decode underlayColor.
2866
2867         * Shared/WebPageCreationParameters.h:
2868         (WebPageCreationParameters):
2869         Add underlayColor member.
2870
2871         * UIProcess/API/mac/WKView.mm:
2872         (-[WKView underlayColor]):
2873         Accessor; retrieves the WebCore::Color from the WebPageProxy and converts it to an NSColor.
2874         (-[WKView setUnderlayColor:]):
2875         Mutator; converts the NSColor to a WebCore::Color and passes it to the WebPageProxy.
2876
2877         * UIProcess/API/mac/WKViewPrivate.h:
2878         Add underlayColor @property.
2879
2880         * UIProcess/WebPageProxy.cpp:
2881         (WebKit::WebPageProxy::setUnderlayColor):
2882         Mutator; dispatches SetUnderlayColor to WebPage.
2883         (WebKit::WebPageProxy::creationParameters):
2884         Set the parameters' underlayColor member appropriately.
2885
2886         * UIProcess/WebPageProxy.h:
2887         Declare new member functions and variable.
2888         (WebKit::WebPageProxy::underlayColor):
2889         Accessor.
2890
2891         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
2892         (WebKit::WebChromeClient::underlayColor):
2893         Return the associated WebPage's underlayColor.
2894
2895         * WebProcess/WebCoreSupport/WebChromeClient.h:
2896         (WebChromeClient):
2897         Declare underlayColor().
2898
2899         * WebProcess/WebPage/WebPage.cpp:
2900         (WebKit::WebPage::WebPage):
2901         Apply any underlayColor that was supplied as part of the WebPageCreationParameters.
2902
2903         * WebProcess/WebPage/WebPage.h:
2904         Declare new member functions and variable.
2905         (WebKit::WebPage::underlayColor):
2906         Accessor.
2907
2908         * WebProcess/WebPage/WebPage.messages.in:
2909         Add SetUnderlayColor message.
2910
2911 2013-02-28  Anders Carlsson  <andersca@apple.com>
2912
2913         Add the notion of an allowed connection to SessionStorageNamespace
2914         https://bugs.webkit.org/show_bug.cgi?id=111122
2915
2916         Reviewed by Sam Weinig.
2917
2918         Group together each session storage namespace with an allowed connection.
2919         This will help ensure that rouge web processes will not be able to access session storage
2920         from pages in other processes.
2921         
2922         * UIProcess/Storage/StorageManager.cpp:
2923         (StorageManager::SessionStorageNamespace):
2924         (WebKit::StorageManager::SessionStorageNamespace::allowedConnection):
2925         (WebKit::StorageManager::SessionStorageNamespace::create):
2926         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
2927         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
2928         Add an m_allowedConnection member variable, as well as setters and getters.
2929
2930         (WebKit::StorageManager::createSessionStorageNamespace):
2931         Take an optional allowed connection. (It can be null if the process has not finished launching).
2932
2933         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
2934         New function to set the allowed connection for a session storage namespace.
2935
2936         (WebKit::StorageManager::createStorageArea):
2937         Add another FIXME.
2938
2939         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
2940         Pass the connection to the SessionStorageNamespace constructor.
2941
2942         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal):
2943         Set the allowed connection.
2944
2945         * UIProcess/WebPageProxy.cpp:
2946         (WebKit::WebPageProxy::WebPageProxy):
2947         Pass the connection to createSessionStorageNamespace.
2948
2949         (WebKit::WebPageProxy::connectionWillOpen):
2950         Call setAllowedSessionStorageNamespaceConnection.
2951         
2952         (WebKit::WebPageProxy::connectionWillClose):
2953         Call setAllowedSessionStorageNamespaceConnection with a null connection.
2954
2955         * UIProcess/WebProcessProxy.cpp:
2956         (WebKit::WebProcessProxy::connectionWillOpen):
2957         Call connectionWillOpen on all pages.
2958
2959         (WebKit::WebProcessProxy::connectionWillClose):
2960         Call connectionWillClose on all pages.
2961
2962 2013-02-28  Kiran Muppala  <cmuppala@apple.com>
2963
2964         Add private API to disable WKView window occlusion detection
2965         https://bugs.webkit.org/show_bug.cgi?id=111107
2966
2967         Reviewed by Simon Fraser.
2968
2969         * UIProcess/API/mac/WKView.mm:
2970         (-[WKView _enableWindowOcclusionNotifications]): Check if occlusion
2971         detection is enabled before enabling notifications.
2972         (windowBecameOccluded): Ditto before changing window occlusion state.
2973         (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
2974         Initialize occlusion detection enabled flag to "YES".
2975         (-[WKView windowOcclusionDetectionEnabled]):
2976         (-[WKView setWindowOcclusionDetectionEnabled:]):
2977         * UIProcess/API/mac/WKViewPrivate.h:
2978
2979 2013-02-28  Anders Carlsson  <andersca@apple.com>
2980
2981         Add the notion of an allowed connection to SessionStorageNamespace
2982         https://bugs.webkit.org/show_bug.cgi?id=111122
2983
2984         Reviewed by Sam Weinig.
2985
2986         Group together each session storage namespace with an allowed connection.
2987         This will help ensure that rouge web processes will not be able to access session storage
2988         from pages in other processes.
2989         
2990         * UIProcess/Storage/StorageManager.cpp:
2991         (StorageManager::SessionStorageNamespace):
2992         (WebKit::StorageManager::SessionStorageNamespace::allowedConnection):
2993         (WebKit::StorageManager::SessionStorageNamespace::create):
2994         (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace):
2995         (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection):
2996         Add an m_allowedConnection member variable, as well as setters and getters.
2997
2998         (WebKit::StorageManager::createSessionStorageNamespace):
2999         Take an optional allowed connection. (It can be null if the process has not finished launching).
3000
3001         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection):
3002         New function to set the allowed connection for a session storage namespace.
3003
3004         (WebKit::StorageManager::createStorageArea):
3005         Add another FIXME.
3006
3007         (WebKit::StorageManager::createSessionStorageNamespaceInternal):
3008         Pass the connection to the SessionStorageNamespace constructor.
3009
3010         (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal):
3011         Set the allowed connection.
3012
3013         * UIProcess/WebPageProxy.cpp:
3014         (WebKit::WebPageProxy::WebPageProxy):
3015         Pass the connection to createSessionStorageNamespace.
3016
3017         (WebKit::WebPageProxy::connectionWillOpen):
3018         Call setAllowedSessionStorageNamespaceConnection.
3019         
3020         (WebKit::WebPageProxy::connectionWillClose):
3021         Call setAllowedSessionStorageNamespaceConnection with a null connection.
3022
3023         * UIProcess/WebProcessProxy.cpp:
3024         (WebKit::WebProcessProxy::connectionWillOpen):
3025         Call connectionWillOpen on all pages.
3026
3027         (WebKit::WebProcessProxy::connectionWillClose):
3028         Call connectionWillClose on all pages.
3029
3030 2013-02-28  Anders Carlsson  <andersca@apple.com>
3031
3032         Implement more StorageAreaProxy member functions
3033         https://bugs.webkit.org/show_bug.cgi?id=111103
3034
3035         Reviewed by Sam Weinig.
3036
3037         * Shared/SecurityOriginData.cpp:
3038         (WebKit::SecurityOriginData::securityOrigin):
3039         * Shared/SecurityOriginData.h:
3040         Add helper to create a WebCore::SecurityOrigin from a SecurityOriginData object.
3041
3042         * WebProcess/Storage/StorageAreaProxy.cpp:
3043         (WebKit::StorageAreaProxy::key):
3044         Fill the storage map and call through to StorageMap::key.
3045
3046         (WebKit::StorageAreaProxy::contains):
3047         Fill the storage map and call through to StorageMap::contains.
3048
3049         (WebKit::StorageAreaProxy::memoryBytesUsedByCache):
3050         Return 0; this matches StorageAreaImpl.
3051
3052 2013-02-28  Tim Horton  <timothy_horton@apple.com>
3053
3054         PDFPlugin: PDF orientation isn't respected when printing or print-previewing
3055         https://bugs.webkit.org/show_bug.cgi?id=110925
3056         <rdar://problem/13008621>
3057
3058         Reviewed by Alexey Proskuryakov.
3059
3060         * WebProcess/WebPage/mac/WebPageMac.mm:
3061         (WebKit::drawPDFPage): Teach drawPDFPage about PDFPage's rotation property, and use it
3062         to swap the PDF's cropbox. Painting now matches PDFViewController's historical behavior.
3063
3064 2013-02-28  Sam Weinig  <sam@webkit.org>
3065
3066         Don't install unused XPCServices on Lion
3067         <rdar://problem/13264712>
3068
3069         Rubber-stamped by Anders Carlsson
3070
3071         * Configurations/BaseXPCService.xcconfig:
3072
3073 2013-02-28  David Kilzer  <ddkilzer@apple.com>
3074
3075         BUILD FIX (r144221): SetSmartInsertDeleteEnabled should be wrapped in PLATFORM(MAC)
3076
3077         * WebProcess/WebPage/WebPage.messages.in: Move
3078         SetSmartInsertDeleteEnabled from USE(APPKIT) to PLATFORM(MAC).
3079
3080 2013-02-27  Csaba Osztrogonác  <ossy@webkit.org>
3081
3082         [WK2] One more unreviewed buildfix for EFL, GTK and Qt after r144218.
3083
3084         * CMakeLists.txt:
3085         * GNUmakefile.list.am:
3086         * Target.pri:
3087         * WebProcess/Storage/StorageNamespaceProxy.cpp:
3088         (WebKit::StorageNamespaceProxy::copy):
3089
3090 2013-02-27  Zan Dobersek  <zdobersek@igalia.com>
3091
3092         Unreviewed (speculative) build fixes for EFL, GTK and Qt after r144218.
3093
3094         * CMakeLists.txt:
3095         * DerivedSources.pri:
3096         * GNUmakefile.list.am:
3097         * Target.pri:
3098
3099 2013-02-27  John Bauman  <jbauman@chromium.org>
3100
3101         Plugin in iframe may not display
3102         https://bugs.webkit.org/show_bug.cgi?id=109879
3103
3104         Reviewed by Simon Fraser.
3105
3106         Update geometry when cliprect changes.
3107
3108         * WebProcess/Plugins/PluginView.cpp:
3109         (WebKit::PluginView::clipRectChanged):
3110         * WebProcess/Plugins/PluginView.h:
3111
3112 2013-02-27  Jer Noble  <jer.noble@apple.com>
3113
3114         REGRESSION (48533): Full-frame plugins stopped working (download instead of loading the plugin)
3115         https://bugs.webkit.org/show_bug.cgi?id=111003
3116
3117         Reviewed by Anders Carlsson.
3118
3119         Also query the Page's pluginData when determining whether a given MIME type can be shown.
3120
3121         * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
3122         (WKBundlePageCanShowMIMEType):
3123         * WebProcess/WebPage/WebPage.cpp:
3124         (WebKit::WebPage::canShowMIMEType):
3125         * WebProcess/WebPage/WebPage.h:
3126
3127 2013-02-27  Manuel Rego Casasnovas  <rego@igalia.com>
3128
3129         Add smartInsertDeleteEnabled setting to WebCore::Page
3130         https://bugs.webkit.org/show_bug.cgi?id=107840
3131
3132         Reviewed by Ryosuke Niwa.
3133
3134         * Shared/WebPageCreationParameters.cpp:
3135         (WebKit::WebPageCreationParameters::encode):
3136         (WebKit::WebPageCreationParameters::decode): Remove code related to
3137         isSmartInsertDeleteEnabled.
3138         * Shared/WebPageCreationParameters.h:
3139         (WebPageCreationParameters): Remove isSmartInsertDeleteEnabled.
3140         * Shared/WebPreferencesStore.h:
3141         (WebKit): Add macro for smartInsertDeleteEnabled setting.
3142         * UIProcess/API/C/WKPreferences.cpp:
3143         (WKPreferencesSetSmartInsertDeleteEnabled):
3144         (WKPreferencesGetSmartInsertDeleteEnabled): Implement methods using the
3145         new setting.
3146         * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
3147         * UIProcess/WebPageProxy.cpp:
3148         (WebKit::WebPageProxy::initializeWebPage): Set smartInsertDeleteEnabled
3149         setting using m_isSmartInsertDeleteEnabled to keep initial value on Mac.
3150         (WebKit::WebPageProxy::creationParameters): Remove usage of
3151         parameters.isSmartInsertDeleteEnabled.
3152         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3153         (WebKit::WebEditorClient::smartInsertDeleteEnabled): Enable method for
3154         all platforms.
3155         * WebProcess/WebPage/WebPage.cpp:
3156         (WebKit::WebPage::WebPage): Remove m_isSmartInsertDeleteEnabled
3157         initialization.
3158         (WebKit::WebPage::updatePreferences): Set smartInsertDeleteEnabled
3159         setting.
3160         (WebKit::WebPage::isSmartInsertDeleteEnabled): Implement method using
3161         settings.
3162         (WebKit):
3163         (WebKit::WebPage::setSmartInsertDeleteEnabled): Implement method using
3164         settings.
3165         * WebProcess/WebPage/WebPage.h:
3166         (WebPage): Enable methods dealing with smartInsertDeleteEnabled for all
3167         platforms and remove m_isSmartInsertDeleteEnabled as it will be a
3168         setting.
3169
3170
3171 2013-02-27  Anders Carlsson  <andersca@apple.com>
3172
3173         More storage scaffolding
3174         https://bugs.webkit.org/show_bug.cgi?id=110997
3175
3176         Reviewed by Andreas Kling.
3177
3178         * DerivedSources.make:
3179         Add StorageAreaProxy.
3180         
3181         * UIProcess/Storage/StorageManager.cpp:
3182         (WebKit::StorageManager::setItem):
3183         Send back a DidSetItem message.
3184         
3185         * WebKit2.xcodeproj/project.pbxproj:
3186         Add generated files.
3187
3188         * WebProcess/Storage/StorageAreaProxy.cpp:
3189         (WebKit::StorageAreaProxy::StorageAreaProxy):
3190         Add the message receiver.
3191         
3192         (WebKit::StorageAreaProxy::~StorageAreaProxy):
3193         Remove the message receiver.
3194         
3195         (WebKit::StorageAreaProxy::didSetItem):
3196         add stub.
3197
3198         * WebProcess/Storage/StorageAreaProxy.h:
3199         (StorageAreaProxy):
3200         * WebProcess/Storage/StorageAreaProxy.messages.in: Added.
3201
3202 2013-02-27  Sam Weinig  <sam@webkit.org>
3203
3204         REGRESSION: Loading flash switches to discrete graphics, 100 MB on membuster
3205         <rdar://problem/13229828>
3206
3207         Reviewed by Dan Bernstein.
3208
3209         Due the change in CFBundleIdentifier, the WebProcess and PluginProcess were
3210         unnecessarily muxing (they used to be whitelisted by OpenGL) to the discrete
3211         GPU.
3212
3213         * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3214         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
3215         * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
3216         * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:
3217         * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist:
3218         * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist:
3219         Add NSSupportsAutomaticGraphicsSwitching YES.
3220
3221         * WebKit2.xcodeproj/project.pbxproj:
3222         Re-add the PluginService.32-64.Info.plist plist to the project file.
3223
3224 2013-02-26  Alexey Proskuryakov  <ap@apple.com>
3225
3226         Don't add a body to platform request until necessary
3227         https://bugs.webkit.org/show_bug.cgi?id=110900
3228
3229         Reviewed by Brady Eidson.
3230
3231         * NetworkProcess/NetworkResourceLoader.cpp:
3232         (WebKit::NetworkResourceLoader::willSendRequest): Restore body after IPC. There
3233         is no way for the client to change it.
3234
3235         * Shared/Downloads/mac/DownloadMac.mm:
3236         (WebKit::Download::start):
3237         (WebKit::Download::startWithHandle):
3238         Pass UpdateHTTPBody when passing a request to NSURLConnection.
3239
3240         * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData):
3241         Never serialize the request body. It's slow, and sometimes impossible, so just
3242         keeping things consistent.
3243
3244         * Shared/mac/WebURLRequestMac.mm: (WebKit::WebURLRequest::platformRequest):
3245         Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess.
3246
3247         * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
3248         (WebKit::CustomProtocolManagerProxy::startLoading): Ditto.
3249
3250         * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
3251         (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame):
3252         Restore existing body after a client call..
3253
3254         * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformCanHandleRequest):
3255         Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess.
3256
3257 2013-02-27  Glenn Adams  <glenn@skynav.com>
3258
3259         Add ENABLE_CSS3_TEXT_LINE_BREAK flag.
3260         https://bugs.webkit.org/show_bug.cgi?id=110944
3261
3262         Reviewed by Dean Jackson.
3263
3264         * Configurations/FeatureDefines.xcconfig:
3265
3266 2013-02-27  Michael Brüning  <michael.bruning@digia.com>
3267
3268         [Qt][WK2] Replace use of WebPreferences with use of WKPrefences C API
3269         https://bugs.webkit.org/show_bug.cgi?id=108952
3270
3271         Reviewed by Simon Hausmann.
3272
3273         Signed off for WebKit2 by Benjamin Poulain.
3274
3275         This patch moves the view classes and preferences in the Qt API
3276         to use the C API for accessing and manipulating preferences as
3277         part of the cleanup and move towards using the C API as base for
3278         the Qt WebKit2 API.
3279
3280         Adds the function WebKit::adoptToQString for convenience when
3281         dealing with QString and copied String objects.
3282
3283         Removes the ScrollAnimatorEnabled options from QWebPreferences.
3284
3285         * UIProcess/API/cpp/qt/WKStringQt.cpp:
3286         (WebKit::adoptToQString):
3287         * UIProcess/API/cpp/qt/WKStringQt.h:
3288         (WebKit):
3289         * UIProcess/API/qt/qquickwebview.cpp:
3290         (QQuickWebViewPrivate::initialize):
3291         * UIProcess/API/qt/qwebpreferences.cpp:
3292         (QWebPreferencesPrivate::testAttribute):
3293         (QWebPreferencesPrivate::setAttribute):
3294         (QWebPreferencesPrivate::setFontFamily):
3295         (QWebPreferencesPrivate::fontFamily):
3296         (QWebPreferencesPrivate::setFontSize):
3297         (QWebPreferencesPrivate::fontSize):
3298         * UIProcess/API/qt/qwebpreferences_p.h:
3299         * UIProcess/API/qt/qwebpreferences_p_p.h:
3300
3301 2013-02-26  Anders Carlsson  <andersca@apple.com>
3302
3303         Implement StorageAreaProxy::getItem and StorageAreaProxy::setItem
3304         https://bugs.webkit.org/show_bug.cgi?id=110927
3305
3306         Reviewed by Sam Weinig.
3307
3308         * UIProcess/Storage/StorageManager.cpp:
3309         (WebKit::StorageManager::setItem):
3310         * UIProcess/Storage/StorageManager.h:
3311         Add empty stub.
3312         
3313         * UIProcess/Storage/StorageManager.messages.in:
3314         Add SetItem message.
3315
3316         * WebProcess/Storage/StorageAreaProxy.cpp:
3317         (WebKit::StorageAreaProxy::getItem):
3318         Fill the storage map and get the item from it.
3319
3320         (WebKit::StorageAreaProxy::setItem):
3321         Update the storage map and send a SetItem message to the UI process.
3322
3323 2013-02-26  Anders Carlsson  <andersca@apple.com>
3324
3325         StorageAreaProxy should hold on to a StorageMap and not a HashMap
3326         https://bugs.webkit.org/show_bug.cgi?id=110919
3327
3328         Reviewed by Jessie Berlin.
3329
3330         Create a storage map instead of a hash map.
3331
3332         * WebProcess/Storage/StorageAreaProxy.cpp:
3333         (WebKit::StorageAreaProxy::length):
3334         (WebKit::StorageAreaProxy::loadValuesIfNeeded):
3335         * WebProcess/Storage/StorageAreaProxy.h:
3336         (WebCore):
3337         (StorageAreaProxy):
3338
3339 2013-02-26  Anders Carlsson  <andersca@apple.com>
3340
3341         Fix a copy/paste error in WebLoaderClient::didBlockInsecurePluginVersion
3342         https://bugs.webkit.org/show_bug.cgi?id=110914
3343         <rdar://problem/13297581>
3344
3345         Reviewed by Beth Dakin.
3346
3347         Pass kWKErrorCodeInsecurePlugInVersion to the pluginDidFail callback.
3348
3349         * UIProcess/WebLoaderClient.cpp:
3350         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
3351
3352 2013-02-26  Jer Noble  <jer.noble@apple.com>
3353
3354         Unreviewed build fix; use correct macro for platform name in FeatureDefines.xcconfig.
3355
3356         * Configurations/FeatureDefines.xcconfig:
3357
3358 2013-02-26  Manuel Rego Casasnovas  <rego@igalia.com>
3359
3360         [WK2][GTK] REGRESSION (r143463): unit test failure in WebKit2APITests/TestContextMenu
3361         https://bugs.webkit.org/show_bug.cgi?id=110869
3362
3363         Reviewed by Martin Robinson.
3364
3365         Test was failing because of new media controls needs more space to be
3366         painted than just 10x10 pixels.
3367
3368         * UIProcess/API/gtk/tests/TestContextMenu.cpp:
3369         (testContextMenuDefaultMenu): Modified test in order to give more space
3370         to the media controls.
3371
3372 2013-02-26  Dean Jackson  <dino@apple.com>
3373
3374         Draw intermediate snapshots if possible
3375         https://bugs.webkit.org/show_bug.cgi?id=110811
3376
3377         Reviewed by Simon Fraser.
3378
3379         After http://webkit.org/b/110495 we delayed snapshotting until we've
3380         received a nice image, but this made the page look like it is broken.
3381         We should draw any intermediate snapshots that we find, which might
3382         include content such as progress bars/spinners.
3383
3384         * WebProcess/Plugins/PluginView.cpp:
3385         (WebKit): Reinstate 60 attempts at snapshots before giving up.
3386         (WebKit::PluginView::isAcceleratedCompositingEnabled): We do not
3387         want accelerated compositing enabled when we are trying to capture
3388         snapshots.
3389
3390 2013-02-26  Andras Becsi  <andras.becsi@digia.com>
3391
3392         Remove nonexistent StringPairVector.h from Target.pri after r142839
3393
3394         Unreviewed gardening.
3395
3396         * Target.pri:
3397
3398 2013-02-26  Simon Hausmann  <simon.hausmann@digia.com>
3399
3400         Unreviewed trivial !ENABLE(NETSCAPE_PLUGIN_API) build fix
3401
3402         Add an intermediate pluginName string variable instead of
3403         accessing plugin.info outside the feature #ifdef.
3404
3405         * UIProcess/WebPageProxy.cpp:
3406         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
3407
3408 2013-02-25  Huang Dongsung  <luxtella@company100.net>
3409
3410         Coordinated Graphics: remove redundant update of non compositing layer.
3411         https://bugs.webkit.org/show_bug.cgi?id=110444
3412
3413         Reviewed by Noam Rosenthal.
3414
3415         Currently, we update non compositing layer when the page scrolled. However, it
3416         is not needed, because TiledBackingStore can scroll without tile update.
3417
3418         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
3419         (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents):
3420         * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
3421         (CoordinatedLayerTreeHost):
3422
3423 2013-02-25  Jer Noble  <jer.noble@apple.com>
3424
3425         REGRESSION(r143981): Crash in WebFrameLoaderClient::dispatchDidStartProvisionalLoad()
3426         https://bugs.webkit.org/show_bug.cgi?id=110848
3427
3428         Reviewed by Ryosuke Niwa.
3429
3430         NULL-check the result of document->documentElement().
3431
3432         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3433         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3434
3435 2013-02-25  Anders Carlsson  <andersca@apple.com>
3436
3437         Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information
3438         https://bugs.webkit.org/show_bug.cgi?id=110821
3439
3440         Reviewed by Beth Dakin.
3441
3442         * UIProcess/API/C/WKPage.cpp:
3443         (WKPageGetPluginInformationPluginspageAttributeURLKey):
3444         (WKPageGetPluginInformationPluginURLKey):
3445         Add two new API key getters.
3446         
3447         * UIProcess/API/C/WKPage.h:
3448         Add a new callback and deprecate the old callback.
3449         
3450         * UIProcess/WebLoaderClient.cpp:
3451         (WebKit::WebLoaderClient::didFailToInitializePlugin):
3452         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
3453         (WebKit::WebLoaderClient::pluginLoadPolicy):
3454         Make the pluginInformationDictionary a static member function of WebPageProxy so it
3455         can be called from WebUIClient as well.
3456         
3457         * UIProcess/WebPageProxy.cpp:
3458         (WebKit::WebPageProxy::getPluginPath):
3459         Pass the bundle version as well.
3460
3461         (WebKit::WebPageProxy::pluginInformationPluginspageAttributeURLKey):
3462         (WebKit::WebPageProxy::pluginInformationPluginURLKey):
3463         Add two new keys.
3464
3465         (WebKit::WebPageProxy::pluginInformationDictionary):
3466         Handle more keys.
3467
3468         (WebKit::WebPageProxy::unavailablePluginButtonClicked):
3469         Get the plug-in bundle identifier and version.
3470
3471         * UIProcess/WebPageProxy.messages.in:
3472         Pass along more information; the frame and page URLs.
3473
3474         * UIProcess/WebUIClient.cpp:
3475         (WebKit::WebUIClient::unavailablePluginButtonClicked):
3476         Call the new callback if it's supported.
3477
3478         * UIProcess/WebUIClient.h:
3479         (WebUIClient):
3480         * UIProcess/mac/WebInspectorProxyMac.mm:
3481         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3482         Update for API changes.
3483
3484         * WebProcess/WebCoreSupport/WebChromeClient.cpp:
3485         (WebKit::WebChromeClient::unavailablePluginButtonClicked):
3486         Ensure that the pluginspage attribute is a valid URL.
3487
3488 2013-02-21  Jeffrey Pfau  <jpfau@apple.com>
3489
3490         Optionally partition cache to prevent using cache for tracking
3491         https://bugs.webkit.org/show_bug.cgi?id=110269
3492
3493         Reviewed by Maciej Stachowiak.
3494
3495         Update WKSI bindings and add feature defines.
3496
3497         * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage
3498         * WebCoreSupport/WebSystemInterface.mm:
3499         (InitWebCoreSystemInterface):
3500
3501 2013-02-25  Jer Noble  <jer.noble@apple.com>
3502
3503         Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files.
3504         https://bugs.webkit.org/show_bug.cgi?id=110806
3505
3506         Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090.
3507
3508         Reviewed by Alexey Proskuryakov.
3509
3510         * Configurations/FeatureDefines.xcconfig:
3511
3512 2013-02-25  Jer Noble  <jer.noble@apple.com>
3513
3514         Full screen mode should not exit when application resigns active state.
3515         https://bugs.webkit.org/show_bug.cgi?id=106129
3516
3517         Reviewed by Darin Adler.
3518
3519         Now that full screen windows get their own full screen space, there is no reason to exit full
3520         screen mode when the application resigns active state. Instead, the windowserver will bring the
3521         space containing the newly active application to the foreground. The user can then swipe back
3522         to the full screen space (or use Mission Control) to get back to the full screen window.
3523
3524         * UIProcess/mac/WKFullScreenWindowController.mm:
3525         (-[WKFullScreenWindowController windowDidLoad]): Remove the applicationDidResignActive: notification from WKFullScreenWindowController.
3526
3527 2013-02-25  Jer Noble  <jer.noble@apple.com>
3528
3529         Safari shows empty window and paints webpage in full-screen background
3530         https://bugs.webkit.org/show_bug.cgi?id=103712
3531
3532         Reviewed by Darin Adler.
3533
3534         When canceling full screen mode due to a provisional load, exit normally instead of closing the
3535         full screen window controller. Additionally, to ensure full screen is cancelled when the enclosing
3536         frame around a full screen iframe is navigated, check to see if the navigating document contains
3537         a full screen element, rather than checking whether the document itself is full screen.
3538
3539         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3540         (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
3541
3542 2013-02-25  Anders Carlsson  <andersca@apple.com>
3543
3544         Fix build.
3545
3546         * UIProcess/WebPageProxy.cpp:
3547         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3548
3549 2013-02-25  Anders Carlsson  <andersca@apple.com>
3550
3551         Add a new pluginDidFail callback that takes a WKDictionary of plug-in information
3552         https://bugs.webkit.org/show_bug.cgi?id=110793
3553         <rdar://problem/13265303>
3554
3555         Reviewed by Sam Weinig.
3556
3557         Add a new pluginDidFail callback that takes a WKDictionaryRef and also pass in the
3558         frame and page URLs.
3559
3560         * UIProcess/API/C/WKPage.h:
3561         * UIProcess/WebLoaderClient.cpp:
3562         (WebKit::pluginInformationDictionary):
3563         (WebKit::WebLoaderClient::didFailToInitializePlugin):
3564         (WebKit::WebLoaderClient::didBlockInsecurePluginVersion):
3565         (WebKit::WebLoaderClient::pluginLoadPolicy):
3566         * UIProcess/WebLoaderClient.h:
3567         * UIProcess/WebPageProxy.cpp:
3568         (WebKit::WebPageProxy::didFailToInitializePlugin):
3569         (WebKit::WebPageProxy::didBlockInsecurePluginVersion):
3570         * UIProcess/WebPageProxy.h:
3571         * UIProcess/WebPageProxy.messages.in:
3572         * WebProcess/Plugins/PluginView.cpp:
3573         (WebKit::PluginView::didFailToInitializePlugin):
3574         * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
3575         (WebKit::WebFrameLoaderClient::createJavaAppletWidget):
3576         * WebProcess/WebPage/WebPage.cpp:
3577         (WebKit::WebPage::createPlugin):
3578
3579 2013-02-25  Tim Horton  <timothy_horton@apple.com>
3580
3581         PDFPlugin: Tab between text annotations
3582         https://bugs.webkit.org/show_bug.cgi?id=106539
3583         <rdar://problem/12751789>
3584
3585         Reviewed by Darin Adler.
3586
3587         Use [PDFLayerController activateNextAnnotation:] to advance focus when the tab key is hit while inside a PDF form.
3588
3589         Also, a drive-by fix to make the lifetime of PDFPluginAnnotationEventListener's m_annotation pointer more explicit.
3590
3591         * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add activateNextAnnotation: SPI.
3592         * WebProcess/Plugins/PDF/PDFPlugin.h:
3593         (PDFPlugin): Add focus(Next|Previous)Annotation.
3594         * WebProcess/Plugins/PDF/PDFPlugin.mm:
3595         (WebKit::PDFPlugin::focusNextAnnotation): Ask PDFLayerController to focus the next annotation.
3596         (WebKit::PDFPlugin::focusPreviousAnnotation): Ask PDFLayerController to focus the next annotation.
3597         * WebProcess/Plugins/PDF/PDFPluginAnnotation.h: Drive-by, initialize m_parent to 0.
3598         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::setAnnotation): Added.
3599         * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
3600         (WebKit::PDFPluginAnnotation::attach): Use eventNames() instead of string literals.
3601         (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation): Clear the event listener's reference to its annotation.
3602         (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent): Null-check the event listener's annotation.
3603         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h:
3604         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotation): Create our PDFPluginTextAnnotationEventListener.
3605         (PDFPluginTextAnnotationEventListener): Added an event listener (for keydown events in form fields).
3606         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::create):
3607         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::setTextAnnotation):
3608         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::PDFPluginTextAnnotationEventListener):
3609         * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
3610         (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation): Unregister our keydown event listener.
3611         (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Register our keydown event listener.
3612         (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::handleEvent): Ask PDFPlugin to focus
3613         the next/previous annotation when the tab key is pressed (Shift-Tab goes backwards).
3614
3615 2013-02-25  Alexey Proskuryakov  <ap@apple.com>
3616
3617         <rdar://problem/12976385> Remove rule to silence attempts to create the ~/Library/Caches/com.apple.WebKit2.WebProcessService directory
3618
3619         Reviewed by Anders Carlsson.
3620
3621         * WebProcess/com.apple.WebProcess.sb.in: Remove the obsolete rule. We no longer
3622         have a "WebProcessService".
3623
3624 2013-02-25  Andras Becsi  <andras.becsi@digia.com>
3625
3626         [Qt][WK2] Remove unneeded method didResumeContent from PageViewportController clients
3627         https://bugs.webkit.org/show_bug.cgi?id=110751
3628
3629         Reviewed by Jocelyn Turcotte.
3630
3631         This is a clean-up in the PageViewportController clients that removes leftover
3632         code from previous design that is partially unused and unnecessary, to simplify
3633         the interaction between PageViewportController and clients.
3634
3635         * UIProcess/PageViewportController.cpp:
3636         (WebKit::PageViewportController::resumeContent):
3637         * UIProcess/PageViewportControllerClient.h:
3638         (PageViewportControllerClient):
3639         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3640         * UIProcess/efl/PageViewportControllerClientEfl.h:
3641         (PageViewportControllerClientEfl):
3642         * UIProcess/qt/PageViewportControllerClientQt.cpp:
3643         (WebKit::PageViewportControllerClientQt::animateContentRectVisible):
3644         (WebKit::PageViewportControllerClientQt::flickMoveEnded):
3645         (WebKit::PageViewportControllerClientQt::resumeAndUpdateContent):
3646         (WebKit::PageViewportControllerClientQt::pinchGestureCancelled):
3647         * UIProcess/qt/PageViewportControllerClientQt.h:
3648         (PageViewportControllerClientQt):
3649
3650 2013-02-25  Andreas Kling  <akling@apple.com>
3651
3652         Reduce amount of code that includes StylePropertySet.h
3653         <http://webkit.org/b/101149>
3654
3655         Reviewed by Antti Koivisto.
3656
3657         * WebProcess/WebCoreSupport/WebEditorClient.cpp:
3658
3659 2013-02-24  Andreas Kling  <akling@apple.com>
3660
3661         Reduce include graph of JSDOMBinding.h
3662         <http://webkit.org/b/110709>
3663
3664         Reviewed by Antti Koivisto.
3665
3666         * Shared/WebRenderObject.cpp:
3667         (WebKit::WebRenderObject::WebRenderObject):
3668         * WebProcess/Storage/StorageAreaProxy.cpp:
3669
3670 2013-02-22  Sam Weinig  <sam@webkit.org>
3671
3672         Add temporary work around for 32-bit plugins not working in production builds as XPCServices
3673         https://bugs.webkit.org/show_bug.cgi?id=110680
3674         <rdar://problem/13236883>
3675
3676         Reviewed by Anders Carlsson.
3677
3678         * UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
3679         (WebKit::shouldUseXPC):
3680         Temporarily don't use XPC for plug-ins for Safari while we figure out why the
3681         32-bit XPCService is being built universal.
3682
3683 2013-02-22  Tim Horton  <timothy_horton@apple.com>
3684
3685         [WK2] The root and page overlay layers should be the size of the view, not the content
3686         https://bugs.webkit.org/show_bug.cgi?id=110660
3687         <rdar://problem/13096456>
3688
3689         Reviewed by Simon Fraser.
3690
3691         Use the view size for the size of the root and page overlay layers.
3692         For one, we never update these layers' sizes when the content size changes, causing size mismatches.
3693         In addition, there's no reason an overlay shouldn't be able to draw outside of the bounds of the content.
3694
3695         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
3696         (WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
3697         (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer):
3698
3699 2013-02-22  Anders Carlsson  <andersca@apple.com>
3700
3701         pluginLoadStrategy should take a WKDictionaryRef for extensibility
3702         https://bugs.webkit.org/show_bug.cgi?id=110656
3703         <rdar://problem/13265303>
3704
3705         Reviewed by Jessie Berlin.
3706
3707         Change pluginLoadStrategy to take a WKDictionaryRef instead of a number of parameters;
3708         this lets us add more plug-in information if needed. Also add the page URL and rename documentURL to frameURL.
3709
3710         * UIProcess/API/C/WKPage.cpp:
3711         (WKPageGetPluginInformationBundleIdentifierKey):
3712         (WKPageGetPluginInformationBundleVersionKey):
3713         (WKPageGetPluginInformationDisplayNameKey):
3714         (WKPageGetPluginInformationFrameURLKey):
3715         (WKPageGetPluginInformationMIMETypeKey):
3716         (WKPageGetPluginInformationPageURLKey):
3717         * UIProcess/API/C/WKPage.h:
3718         * UIProcess/WebLoaderClient.cpp:
3719         (WebKit):
3720         (WebKit::WebLoaderClient::pluginLoadPolicy):
3721         * UIProcess/WebLoaderClient.h:
3722         (WebLoaderClient):
3723         * UIProcess/WebPageProxy.cpp:
3724         (WebKit::WebPageProxy::getPluginPath):
3725         (WebKit::WebPageProxy::pluginInformationBundleIdentifierKey):
3726         (WebKit):
3727         (WebKit::WebPageProxy::pluginInformationBundleVersionKey):
3728         (WebKit::WebPageProxy::pluginInformationDisplayNameKey):
3729         (WebKit::WebPageProxy::pluginInformationFrameURLKey):
3730         (WebKit::WebPageProxy::pluginInformationMIMETypeKey):
3731         (WebKit::WebPageProxy::pluginInformationPageURLKey):
3732         * UIProcess/WebPageProxy.h:
3733         (WebPageProxy):
3734         * UIProcess/WebPageProxy.messages.in:
3735         * WebProcess/WebPage/WebPage.cpp:
3736         (WebKit::WebPage::createPlugin):
3737         (WebKit::WebPage::canPluginHandleResponse):
3738
3739 2013-02-22  Anders Carlsson  <andersca@apple.com>
3740
3741         Move pluginLoadPolicy to the page loader client
3742         https://bugs.webkit.org/show_bug.cgi?id=110635
3743         <rdar://problem/13265303>
3744         
3745         Reviewed by Sam Weinig.
3746
3747         Move the pluginLoadPolicy callback to the page loader client where it belongs.
3748
3749         * UIProcess/API/C/WKPage.h:
3750         * UIProcess/WebLoaderClient.cpp:
3751         (WebKit::toWKPluginLoadPolicy):
3752         (WebKit):
3753         (WebKit::toPluginModuleLoadPolicy):
3754         (WebKit::WebLoaderClient::pluginLoadPolicy):
3755         * UIProcess/WebLoaderClient.h:
3756         (WebLoaderClient):
3757         * UIProcess/WebPageProxy.cpp:
3758         (WebKit::WebPageProxy::getPluginPath):
3759         * UIProcess/WebUIClient.cpp:
3760         (WebKit):
3761         * UIProcess/WebUIClient.h:
3762         (WebUIClient):
3763         * UIProcess/mac/WebInspectorProxyMac.mm:
3764         (WebKit::WebInspectorProxy::platformCreateInspectorPage):
3765
3766 2013-02-21  Jer Noble  <jer.noble@apple.com>
3767
3768         Two video contollers appear after exiting the fullscreen video when using menubar to exit.
3769         https://bugs.webkit.org/show_bug.cgi?id=110506
3770
3771         Reviewed by Eric Carlson.
3772
3773         When we are notified that the fullscreen window is about to exit fullscreen mode unrequested,
3774         call requestExitFullScreen(), as that will result in Document::webkitExitFullScreen() correctly
3775         tearing down the fullscreen state.
3776
3777         * UIProcess/mac/WKFullScreenWindowController.mm:
3778         (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]):
3779
3780 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
3781
3782         Yet another unreviewed buildfix after r143714.
3783
3784         * UIProcess/efl/WebView.cpp:
3785         (WebKit::WebView::paintToCairoSurface):
3786
3787 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
3788
3789         Unreviewed preventive buildfix after my last commit.
3790
3791         * UIProcess/API/efl/EwkView.cpp:
3792         * UIProcess/efl/WebView.cpp:
3793
3794 2013-02-22  Balazs Kelemen  <kbalazs@webkit.org>
3795
3796         [CoordGfx] Minor cleanup in CoordinatedGraphicsScene::paintToGraphicsContext
3797         https://bugs.webkit.org/show_bug.cgi?id=109824
3798
3799         Reviewed by Andreas Kling.
3800
3801         Avoid ugly ifdefs by using PlatformGraphicsContext.
3802
3803         * UIProcess/API/efl/EwkView.cpp:
3804         (EwkView::displayTimerFired):
3805
3806 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3807
3808         [WK2][EFL] Remove declaration of non-existent functions from EwkView
3809         https://bugs.webkit.org/show_bug.cgi?id=110572
3810
3811         Reviewed by Kenneth Rohde Christiansen.
3812
3813         Removed declarations of non-existent EwkView::paintToCurrentGLContext() and
3814         EwkView::paintToCairoSurface(cairo_surface_t*) that were accidentally
3815         left at r143699.
3816
3817         * UIProcess/API/efl/EwkView.h:
3818         (EwkView):
3819
3820 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3821
3822         [WK2][EFL] Clean up PageViewportControllerClientEfl class
3823         https://bugs.webkit.org/show_bug.cgi?id=110438
3824
3825         Reviewed by Andreas Kling.
3826
3827         Cleaned up PageViewportControllerClientEfl class from unused methods
3828         and class members, eliminated access to WK2 internals from this class.
3829
3830         * UIProcess/efl/PageViewportControllerClientEfl.cpp:
3831         (WebKit::PageViewportControllerClientEfl::didChangeContentsSize):
3832         * UIProcess/efl/PageViewportControllerClientEfl.h:
3833         (WebKit::PageViewportControllerClientEfl::~PageViewportControllerClientEfl):
3834         (PageViewportControllerClientEfl):
3835         * UIProcess/efl/WebView.cpp:
3836         (WebKit::WebView::WebView):
3837         (WebKit::WebView::updateViewportSize):
3838
3839 2013-02-22  Michał Pakuła vel Rutka  <m.pakula@samsung.com>
3840
3841         [WK2][EFL][GTK][Qt] Add context menu item tags for C API
3842         https://bugs.webkit.org/show_bug.cgi?id=109815
3843
3844         Reviewed by Anders Carlsson.
3845
3846         This patch adds context menu item tags used by EFL, GTK and Qt ports, defined in
3847         WebCore to WK2 C API.
3848
3849         * Shared/API/c/WKContextMenuItemTypes.h:
3850         * Shared/API/c/WKSharedAPICast.h:
3851         (WebKit::toAPI):
3852         (WebKit::toImpl):
3853
3854 2013-02-22  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3855
3856         [WK2][EFL] Move AC code from EwkView to WebView
3857         https://bugs.webkit.org/show_bug.cgi?id=110216
3858
3859         Reviewed by Anders Carlsson.
3860
3861         Accelerated compositing code is moved from EwkView to WebView.
3862         Added new WKView API to be used from EwkView instead of direct accessing
3863         to coordinated graphics scene.
3864
3865         * UIProcess/API/C/efl/WKView.cpp:
3866         (WKViewSetUserViewportTranslation):
3867         (WKViewUserViewportToContents):
3868         (WKViewPaintToCurrentGLContext):
3869         (WKViewPaintToCairoSurface):
3870         * UIProcess/API/C/efl/WKView.h:
3871
3872             Added WKView API functions.
3873
3874         * UIProcess/API/efl/EwkView.cpp:
3875         (EwkView::EwkView):
3876         (EwkView::displayTimerFired):
3877         (EwkView::feedTouchEvent):
3878         (EwkView::createGLSurface):
3879         (EwkView::handleEvasObjectCalculate):
3880         (EwkView::handleEwkViewMouseWheel):
3881         (EwkView::handleEwkViewMouseDown):
3882         (EwkView::handleEwkViewMouseUp):
3883         (EwkView::handleEwkViewMouseMove):
3884         * UIProcess/API/efl/EwkView.h:
3885         (EwkView):
3886
3887             Using new WKView API.
3888
3889         * UIProcess/efl/WebView.cpp:
3890         (WebKit::WebView::initialize):
3891         (WebKit):
3892         (WebKit::WebView::paintToCurrentGLContext):
3893         (WebKit::WebView::paintToCairoSurface):
3894         (WebKit::WebView::userViewportToContents):
3895         (WebKit::WebView::transformFromScene):
3896         (WebKit::WebView::transformToScene):
3897         (WebKit::WebView::coordinatedGraphicsScene):
3898         (WebKit::WebView::enterAcceleratedCompositingMode):
3899         (WebKit::WebView::exitAcceleratedCompositingMode):
3900         * UIProcess/efl/WebView.h:
3901         (WebCore):
3902         (WebKit::WebView::setUserViewportTranslation):
3903         (WebView):
3904
3905             Added WebView methods to support new WKView API.
3906
3907 2013-02-21  Dima Gorbik  <dgorbik@apple.com>
3908
3909         QuickTime plugin doesn't load when accelerated compositing is disabled
3910         https://bugs.webkit.org/show_bug.cgi?id=110534
3911
3912         Reviewed by Anders Carlsson.
3913
3914         We shouldn't disable accelerated compositing for plugins, because
3915         plugins such as QuickTime rely on this and will try to set other drawing
3916         models that we don't support.
3917
3918         * WebProcess/Plugins/PluginView.cpp:
3919         (WebKit::PluginView::isAcceleratedCompositingEnabled):
3920
3921 2013-02-21  Dean Jackson  <dino@apple.com>
3922
3923         Plug-in snapshotting code always accepts first snapshot
3924         https://bugs.webkit.org/show_bug.cgi?id=110495
3925
3926         Reviewed by Tim Horton.
3927
3928         When we detect a plugin that can be snapshotted we start capturing
3929         images until we find one that we believe isn't blank, or we timeout.
3930         I introduced a regression recently where we swap renderers as
3931         soon as the snapshot arrives, whether or not is is blank.
3932
3933         The fix was to have the embedder (currently only WK2) be the one
3934         who tells the HTMLPlugInElement to start displaying snapshots.
3935
3936         * WebProcess/Plugins/PluginView.cpp:
3937         (WebKit::PluginView::pluginSnapshotTimerFired): When we find a
3938         snapshot that we like, tell the HTMLPlugInElement to move to
3939         the snapshot view.
3940
3941 2013-02-21  Carlos Garcia Campos  <cgarcia@igalia.com>
3942
3943         Unreviewed. Fix make distcheck.
3944
3945         * GNUmakefile.am: Add -DBUILDING_WEBKIT flags to introspection
3946         scanner.
3947         * GNUmakefile.list.am: Add missing header to compilation and
3948         remove one that no longer exists.
3949
3950 2013-02-21  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3951
3952         [WK2][EFL] Move PageViewportController and PageViewportControllerClientEfl out from WebView
3953         https://bugs.webkit.org/show_bug.cgi?id=110345
3954
3955         Reviewed by Andreas Kling.
3956
3957         WebView does not need to know about both PageViewportController and 
3958         PageViewportControllerClientEfl. Considering the fact that PageViewportController
3959         will stop being WK2 internal and will be based on WK2 C API, it 
3960         should be owned by EwkView rather than WebView.
3961
3962         This patch is also a preparation for WKViewClient API extension to cover all
3963         the places where PageViewportController and PageViewportControllerClientEfl
3964         are accessed directly from WebView at the moment.
3965
3966         * UIProcess/API/efl/EwkView.cpp:
3967         (EwkView::EwkView):
3968         * UIProcess/API/efl/EwkView.h:
3969         (WebKit):
3970         (EwkView::pageViewportControllerClient):
3971         (EwkView::pageViewportController):
3972         (EwkView):
3973         * UIProcess/efl/WebView.cpp:
3974         (WebKit::WebView::didCommitLoad):
3975         (WebKit::WebView::updateViewportSize):
3976         (WebKit::WebView::didChangeContentsSize):
3977         (WebKit::WebView::didChangeViewportProperties):
3978         (WebKit::WebView::pageDidRequestScroll):
3979         (WebKit::WebView::didRenderFrame):
3980         (WebKit::WebView::pageTransitionViewportReady):
3981         * UIProcess/efl/WebView.h:
3982         (WebView):
3983
3984 2013-02-20  Tim Horton  <timothy_horton@apple.com>
3985
3986         Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes in the hosting window
3987         https://bugs.webkit.org/show_bug.cgi?id=110415
3988         <rdar://problem/13095405>
3989
3990         Reviewed by Simon Fraser.
3991
3992         * UIProcess/API/mac/WKView.mm: Add _viewInWindowChangesDeferredCount and _viewInWindowChangeWasDeferred to WKViewData.
3993         (-[WKView viewDidMoveToWindow]): If we're deferring window changes, don't include the ViewIsInWindow flag
3994         when sending viewStateDidChange. Instead, save the fact that we want to do that later aside.
3995         (-[WKView beginDeferringViewInWindowChanges]):
3996         (-[WKView endDeferringViewInWindowChanges]): Straightforward begin/end pair. When we exit the last pair and
3997         have a pending window change, let the WebPageProxy know. WebPageProxy will do the check to ensure that
3998         the in-window state has actually changed.
3999         (-[WKView isDeferringViewInWindowChanges]):
4000         * UIProcess/API/mac/WKViewPrivate.h: 
4001
4002 2013-02-20  Kiran Muppala  <cmuppala@apple.com>
4003
4004         Disable window occlusion notifications for App Store on Mac.
4005         https://bugs.webkit.org/show_bug.cgi?id=110417
4006
4007         Reviewed by Simon Fraser.
4008
4009         Temporary fix to workaround issues with window occlusion notifications
4010         in App Store.
4011
4012         * UIProcess/API/mac/WKView.mm:
4013         (+[WKView _registerWindowOcclusionNotificationHandlers]): Return early
4014         if the main bundle identifier matches that of App Store.
4015
4016 2013-02-20  Mark Rowe  <mrowe@apple.com>
4017
4018         <https://webkit.org/b/110410> Specify the plug-in process / service entitlements via the Xcode configuration.
4019
4020         This is the modern mechanism for applying entitlements to production builds,
4021         and it simplifies the maintenance of entitlements going forward. It also allows
4022         us to fix the new XPC PluginServices to have the same entitlements as PluginProcess.
4023
4024         Reviewed by Alexey Proskuryakov.
4025
4026         * Configurations/Base.xcconfig: Ad-hoc sign all WebKit2 components.
4027         * Configurations/PluginProcess.xcconfig: Specify the entitlements to use.
4028         * Configurations/PluginService.32.xcconfig: Ditto.
4029         * Configurations/PluginService.64.xcconfig: Ditto.
4030         * Configurations/PluginService.Development.xcconfig: Ditto.
4031         * Configurations/PluginService.entitlements: Renamed from Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements.
4032         Move the entitlements in to the Configurations directory to make them easier to find.
4033         * PluginProcess/mac/add-entitlements.sh: Removed. In my testing the dependency issue mentioned
4034         in the script is not an issue with current versions of Xcode. If we see it again we can come
4035         up with a workaround that doesn't involve performing the signing via a script phase.
4036         * WebKit2.xcodeproj/project.pbxproj:
4037
4038 2013-02-20  Mark Rowe  <mrowe@apple.com>
4039
4040         <https://webkit.org/b/110409> Remove duplication between 32- and 64-bit PluginService plists.
4041
4042         Reviewed by Dan Bernstein.
4043
4044         The only difference between the plists was the CFBundleIdentifier. Since the values are the
4045         same as the product name, we can just use the value of the PRODUCT_NAME configuration setting.
4046
4047         * Configurations/PluginService.32.xcconfig:
4048         * Configurations/PluginService.64.xcconfig:
4049         * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Renamed from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist.
4050         * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: Removed.
4051
4052 2013-02-20  Simon Fraser  <simon.fraser@apple.com>
4053
4054         Zoomed, slow-scrolling pages keep recreating tiles when scrolled
4055         https://bugs.webkit.org/show_bug.cgi?id=110379
4056
4057         Reviewed by Tim Horton.
4058
4059         Make the visible rect and exposed rects passed through
4060         the drawing area to the tile cache FloatRects instead of IntRects.
4061
4062         * UIProcess/API/mac/WKView.mm:
4063         (-[WKView setFrameSize:]):
4064         (-[WKView _updateWindowAndViewFrames]):
4065         (-[WKView enableFrameSizeUpdates]):
4066         (-[WKView setMinimumWidthForAutoLayout:]):
4067         * UIProcess/WebPageProxy.h:
4068         * UIProcess/mac/WebPageProxyMac.mm:
4069         (WebKit::WebPageProxy::viewExposedRectChanged):
4070         * WebProcess/WebPage/DrawingArea.h:
4071         (WebKit::DrawingArea::setExposedRect):
4072         * WebProcess/WebPage/WebPage.cpp:
4073         (WebKit::WebPage::viewExposedRectChanged):
4074         * WebProcess/WebPage/WebPage.h:
4075         * WebProcess/WebPage/WebPage.messages.in:
4076         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
4077         (TiledCoreAnimationDrawingArea):
4078         * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
4079         (WebKit::TiledCoreAnimationDrawingArea::setExposedRect):
4080
4081 2013-02-20  Dirk Schulze  <krit@webkit.org>
4082
4083         Enable CANVAS_PATH flag
4084         https://bugs.webkit.org/show_bug.cgi?id=108508
4085
4086         Reviewed by Simon Fraser.